/* 社内の業務アプリの作法（DealHub-D・脅威インテリ診断のポータル）に合わせる。
   グラデーションは額縁だけ（今いるメニュー・主ボタン・上の細い帯）。中身は白地に濃い文字。 */
:root {
  --ink: #08111A; --navy: #003870; --blue: #00468B;
  --text: #16202A; --sub: #5B6570; --line: #D5D9DE; --line-strong: #16202A; --bg: #F6F7F8; --paper: #FFFFFF;
  --frame: linear-gradient(135deg, #00468B 0%, #08111A 100%);
  --tone-teal: linear-gradient(135deg, #0E7C86, #0A3F4A);
  --tone-amber: linear-gradient(135deg, #A15C00, #5C3600);
  --tone-red: linear-gradient(135deg, #A32638, #5A1220);
  --tone-blue: linear-gradient(135deg, #1D6FB8, #0B2C5E);
  --tone-grey: linear-gradient(135deg, #55534F, #2E2D2B);
  --radius: 4px;
  --font: "BIZ UDPGothic", "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.7; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.band { height: 4px; background: var(--frame); }
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - 4px); }
main { min-width: 0; }
.side { background: var(--paper); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-weight: 700; letter-spacing: .02em; }
.brand svg { width: 34px; height: 24px; }
.brand small { display: block; font-weight: 400; color: var(--sub); font-size: 11px; letter-spacing: 0; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius); color: var(--text); text-decoration: none; font-size: 14px; }
.nav a:hover { background: #EEF1F4; }
.nav a.on { background: var(--frame); color: #fff; }
.nav svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; flex: none; }
.side .foot { margin-top: auto; font-size: 12px; color: var(--sub); padding: 8px; border-top: 1px dotted var(--line); }
.side .foot form { margin-top: 6px; }
main { padding: 28px 36px 60px; max-width: 1240px; width: 100%; }
.crumb { font-size: 12px; color: var(--sub); margin-bottom: 2px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--line-strong); padding-bottom: 12px; margin-bottom: 22px; }
.head h1 { font-size: 22px; margin: 0; letter-spacing: .02em; }
.head p { margin: 4px 0 0; color: var(--sub); font-size: 13px; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: var(--radius); padding: 9px 16px; font: inherit; font-size: 14px; cursor: pointer; color: #fff; background: var(--frame); text-decoration: none; white-space: nowrap; }
.btn.sub { background: #fff; color: var(--ink); border: 1px solid var(--ink); }
.btn.sub:hover { background: var(--ink); color: #fff; }
.btn.danger { background: var(--tone-red); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: 1.1fr .9fr; align-items: start; }
.stat { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: var(--radius); padding: 14px 16px; }
.stat.teal { border-left-color: #0E7C86; } .stat.amber { border-left-color: #A15C00; } .stat.red { border-left-color: #A32638; }
.stat b { display: block; font-size: 28px; line-height: 1.2; font-feature-settings: "tnum"; }
.stat span { font-size: 12px; color: var(--sub); }
.box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.sec { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin: 26px 0 10px; }
.sec::before { content: ""; width: 10px; height: 10px; background: var(--frame); border-radius: 2px; }
table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 14px; }
th { text-align: left; font-weight: 700; font-size: 12px; color: var(--sub); padding: 8px 10px; border-bottom: 2px solid var(--line-strong); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px dotted var(--line); vertical-align: middle; }
th.w-raw { min-width: 170px; }
td.num, th.num { text-align: right; font-feature-settings: "tnum"; white-space: nowrap; }
tr.review td { background: #FBF3F4; }
.tag { display: inline-block; color: #fff; font-size: 12px; padding: 1px 8px; border-radius: var(--radius); white-space: nowrap; }
.t-teal { background: var(--tone-teal); } .t-amber { background: var(--tone-amber); } .t-red { background: var(--tone-red); }
.t-blue { background: var(--tone-blue); } .t-grey { background: var(--tone-grey); }
.t-plain { background: #EEF0F2; color: var(--text); }
.muted { color: var(--sub); font-size: 13px; }
.mono { font-family: "BIZ UDGothic", ui-monospace, monospace; font-size: 13px; }
.note { border-left: 3px solid var(--blue); background: #fff; padding: 10px 14px; font-size: 13px; color: var(--text); border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: var(--radius); }
.note.warn { border-left-color: #A32638; }
.drop { border: 1px dashed #9AA3AD; border-radius: var(--radius); background: #fff; padding: 22px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.drop input[type=file] { font: inherit; font-size: 13px; }
.after-drop { margin-top: 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; }
.case-card { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; overflow: hidden; }
.case-card:hover { border-color: var(--blue); }
.case-thumb { height: 150px; overflow: hidden; border-bottom: 1px solid var(--line); background: #fff; }
.case-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.case-body { padding: 12px 14px; }
.case-body b { display: block; font-size: 15px; margin: 2px 0 4px; }
.case-body p { margin: 0; }
.case-imgs { grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); }
.case-imgs-1 { --n: 1; max-width: 860px; } .case-imgs-2 { --n: 2; } .case-imgs-3 { --n: 3; }
figure.viewer { margin: 0; }
.viewer rect.ok { fill: rgba(14, 124, 134, .08); stroke: #0E7C86; stroke-width: 3; }
.row-actions.left { justify-content: flex-start; margin-top: 10px; }
table.mini { font-size: 12px; margin-top: 6px; }
table.mini td, table.mini th { padding: 5px 6px; }
pre.code { background: #F6F7F8; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font-size: 11.5px; line-height: 1.5; overflow: auto; max-height: 260px; white-space: pre; }
.solves { margin: 0; padding-left: 1.2em; } .solves li { margin: 4px 0; }
button[disabled] { opacity: .5; cursor: default; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.inline { display: inline; }
.viewer { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.viewer img { display: block; width: 100%; height: auto; }
.viewer svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.viewer rect { fill: none; stroke: #0E7C86; stroke-width: 3; }
.viewer rect.rv { stroke: #A32638; stroke-width: 4; }
.viewer text { font: 700 26px var(--font); fill: #A32638; }
.fixform { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.fixform select, .fixform input[type=text], .fixform input[type=number], .field input, .field select { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid #9AA3AD; border-radius: var(--radius); background: #fff; }
.fixform input[type=number] { width: 84px; }
.field { display: grid; grid-template-columns: 220px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px dotted var(--line); align-items: start; }
.field label { font-weight: 700; font-size: 14px; }
.field .help { color: var(--sub); font-size: 12px; margin-top: 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.login { max-width: 400px; margin: 10vh auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 32px; }
.login h1 { font-size: 18px; margin: 14px 0 4px; }
.login label { display: block; font-size: 13px; font-weight: 700; margin: 16px 0 4px; }
.login input { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid #9AA3AD; border-radius: var(--radius); }
.login .btn { width: 100%; justify-content: center; margin-top: 22px; }
.err { color: #A32638; font-size: 13px; margin-top: 12px; }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: 13px; }
.steps li::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 2px; background: var(--frame); color: #fff; font-size: 12px; margin-right: 8px; }
.steps li b { font-size: 14px; }
.spin { display: inline-block; width: 10px; height: 10px; border: 2px solid #9AA3AD; border-top-color: var(--blue); border-radius: 50%; animation: r 1s linear infinite; vertical-align: -1px; margin-right: 4px; }
@keyframes r { to { transform: rotate(360deg); } }
@media (max-width: 900px) { main table { display: block; overflow-x: auto; max-width: 100%; } main td, main th { white-space: nowrap; } .head { flex-wrap: wrap; } .shell { grid-template-columns: minmax(0, 1fr); } .fixform select { max-width: 100%; } .side { border-right: 0; border-bottom: 1px solid var(--line); } .g4, .g2, .steps { grid-template-columns: 1fr; } main { padding: 20px 16px; } .field { grid-template-columns: 1fr; } }
