:root {
  --navy: #13284a;
  --navy-2: #1b355f;
  --navy-line: #2a4470;
  --primary: #1f4f9c;
  --primary-d: #183f7e;
  --primary-l: #e8eff9;
  --bg: #f3f5f9;
  --card: #ffffff;
  --line: #dfe4ec;
  --line-2: #edf0f5;
  --text: #1c2740;
  --muted: #5d6880;
  --muted-2: #8a93a6;
  --ok: #1f8a4c;
  --ok-bg: #dff3e6;
  --warn: #a86a00;
  --warn-bg: #fff3d6;
  --err: #c0362c;
  --err-bg: #fde7e5;
  --c1: #1f5fbf;
  --c2: #3f86e0;
  --c3: #7fb0ee;
  --c4: #b7d1f5;
  --c5: #c9d0dc;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(18, 38, 74, .04);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  color: var(--text);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { padding: 80px; text-align: center; color: var(--muted); }
h1, h2, h3 { margin: 0; font-weight: 700; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #dfe7f5; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { height: 60px; display: flex; align-items: center; padding: 0 24px; font-size: 19px; font-weight: 700; letter-spacing: .04em; color: #fff; border-bottom: 1px solid var(--navy-line); white-space: nowrap; }
.nav { padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-sec { font-size: 12px; color: #a9b7cf; padding: 16px 12px 6px; border-top: 1px solid var(--navy-line); margin-top: 10px; }
.nav-sec.first { border-top: 0; margin-top: 0; padding-top: 6px; }
.nav a { display: flex; align-items: center; gap: 14px; color: #e5ecf8; text-decoration: none; padding: 10px 14px; border-radius: 6px; font-size: 15px; font-weight: 500; }
.nav a:hover { background: var(--navy-2); }
.nav a.active { background: #26467a; color: #fff; }
.nav svg { width: 20px; height: 20px; flex: none; opacity: .9; }
.nav .divider { border-top: 1px solid var(--navy-line); margin: 10px 0; }
.side-foot { margin-top: auto; padding: 14px 24px; font-size: 11px; color: #7f8fab; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { height: 60px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 28px; gap: 16px; position: sticky; top: 0; z-index: 20; }
.top .company { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.top .spacer { flex: 1; }
.top .tlink { display: flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 6px; background: none; border: 0; cursor: pointer; }
.top .tlink:hover { background: var(--bg); }
.top .sep { width: 1px; height: 24px; background: var(--line); }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 44px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(18,38,74,.12); min-width: 200px; padding: 6px; z-index: 30; }
.menu-pop button, .menu-pop a { display: block; width: 100%; text-align: left; padding: 9px 12px; background: none; border: 0; border-radius: 6px; cursor: pointer; text-decoration: none; color: var(--text); }
.menu-pop button:hover, .menu-pop a:hover { background: var(--bg); }
.menu-pop .who { padding: 8px 12px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.top .burger { display: none; }
.period .lbl { white-space: nowrap; }
.badge-dot { display: inline-block; min-width: 18px; height: 18px; border-radius: 9px; background: var(--err); color: #fff; font-size: 11px; line-height: 18px; text-align: center; padding: 0 5px; }

.content { padding: 28px 32px 48px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; letter-spacing: .04em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }

/* ---------- components ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; }
.card-t { font-size: 17px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.card-t small { font-size: 12px; font-weight: 400; color: var(--muted); }
.grid { display: grid; gap: 18px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-dash { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.g-dash2 { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g-form { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); align-items: start; }
.mt { margin-top: 18px; }
.mt-s { margin-top: 10px; }
.kpi { padding: 18px 22px; }
.kpi .l { font-size: 15px; font-weight: 700; }
.kpi .v { font-size: 34px; font-weight: 700; letter-spacing: .01em; margin-top: 6px; line-height: 1.2; }
.kpi .v small { font-size: 15px; margin-left: 4px; font-weight: 700; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 8px 16px; cursor: pointer; font-weight: 500; text-decoration: none; color: var(--text); white-space: nowrap; min-height: 38px; }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-d); }
.btn.danger { color: var(--err); border-color: #efc2bd; }
.btn.danger:hover { background: var(--err-bg); }
.btn.sm { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

label.f { display: block; margin-bottom: 16px; }
label.f > span, .f-l { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.f-h { font-size: 12px; color: var(--muted); margin-top: 4px; }
.inp, select.inp, textarea.inp { width: 100%; border: 1px solid #cfd6e2; border-radius: 6px; padding: 8px 12px; background: #fff; min-height: 38px; }
textarea.inp { min-height: 90px; resize: vertical; line-height: 1.6; }
.inp:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l); }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 12px; background: #c6cdd9; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { left: 21px; }
.switch input:focus-visible { box-shadow: 0 0 0 3px var(--primary-l); }

.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filters .fi { display: flex; flex-direction: column; gap: 4px; }
.filters .fi > span { font-size: 12px; color: var(--muted); font-weight: 700; }
.filters .inline { flex-wrap: nowrap; }
.filters .inline .inp, .period .inp { width: auto; }
.period { display: flex; align-items: center; gap: 10px; }
.period .lbl { font-weight: 700; margin-right: 6px; }

table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { background: #eef1f6; text-align: left; font-weight: 700; padding: 9px 12px; white-space: nowrap; }
.t td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: #f7f9fc; }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.t .clip { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t .wrap { white-space: normal; word-break: break-all; }
.tbl-wrap { overflow-x: auto; }
.empty { color: var(--muted-2); text-align: center; padding: 28px 0; }
.pill { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.ng { background: var(--err-bg); color: var(--err); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.mute { background: #eceff4; color: var(--muted); }
.pill.blue { background: var(--primary-l); color: var(--primary); }
.ext { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.ext svg { width: 14px; height: 14px; }
.more { display: flex; justify-content: flex-end; margin-top: 10px; }
.more a { text-decoration: none; font-weight: 500; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }

.alert { border-radius: 6px; padding: 12px 16px; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.alert.warn { background: var(--warn-bg); color: #6f4800; border: 1px solid #f2d79a; }
.alert.err { background: var(--err-bg); color: #8a231b; border: 1px solid #f2c2bd; }
.alert.info { background: var(--primary-l); color: #173d77; border: 1px solid #c9daf3; }
.alert a { color: inherit; font-weight: 700; }

.tabs { display: inline-flex; gap: 4px; padding: 4px; background: #e4e9f2; border-radius: 10px; margin-bottom: 18px; overflow-x: auto; max-width: 100%; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 9px 22px; font-weight: 700; font-size: 15px; color: var(--muted); border-radius: 7px; cursor: pointer; white-space: nowrap; }
.tabs button svg { width: 18px; height: 18px; }
.tabs button:hover { background: rgba(255, 255, 255, .6); color: var(--text); }
.tabs button.on { background: var(--primary); color: #fff; box-shadow: 0 2px 6px rgba(31, 79, 156, .3); }
.tabs button:focus-visible { outline: 3px solid var(--primary-l); outline-offset: 1px; }

.legend { list-style: none; padding: 0; margin: 0; }
.legend li { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.legend li:last-child { border-bottom: 0; }
.legend i { width: 14px; height: 14px; border-radius: 2px; display: block; }
.legend b { font-weight: 500; font-variant-numeric: tabular-nums; }
.donut-wrap { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; }

.usage-row { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.usage-row .big { font-size: 26px; font-weight: 700; }
.usage-row .mid { font-size: 18px; font-weight: 500; }
.bar { height: 14px; background: #e3e8f0; border-radius: 3px; overflow: hidden; margin-top: 12px; }
.bar > i { display: block; height: 100%; background: var(--primary); }
.bar.warn > i { background: #d48a00; }
.bar.err > i { background: var(--err); }

.chart svg { width: 100%; height: auto; display: block; }
.chart .ax { font-size: 11px; fill: var(--muted); }
.chart .gl { stroke: #e7ebf2; }
.chart-tip { position: fixed; pointer-events: none; background: #13284a; color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 6px; z-index: 100; white-space: nowrap; }

.kwmap { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; line-height: 1.3; padding: 4px 0; }
.kwmap button { border: 0; background: none; cursor: pointer; padding: 2px 4px; border-radius: 4px; color: var(--primary); font-weight: 700; }
.kwmap button:hover { background: var(--primary-l); }

.modal-bg { position: fixed; inset: 0; background: rgba(15, 28, 52, .45); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 10px; width: 100%; max-width: 720px; box-shadow: 0 24px 60px rgba(10,20,40,.3); }
.modal.wide { max-width: 960px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.modal-h h2 { font-size: 18px; }
.modal-b { padding: 20px 22px; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
#toast div { background: #13284a; color: #fff; padding: 10px 18px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 14px; max-width: 90vw; }
#toast div.err { background: var(--err); }

.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(160deg, #13284a 0%, #1f4f9c 100%); }
.auth { background: #fff; border-radius: 12px; padding: 36px 36px 28px; width: 100%; max-width: 440px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.auth h1 { font-size: 22px; margin-bottom: 6px; }
.auth .sub { color: var(--muted); margin: 0 0 24px; font-size: 13px; }
.auth .btn.primary { width: 100%; min-height: 44px; font-size: 15px; }
.qr { display: flex; justify-content: center; padding: 8px; }
.qr img { width: 200px; height: 200px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #f3f5f9; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; word-break: break-all; font-size: 13px; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.otp { letter-spacing: .5em; font-size: 22px; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; }

.md h2 { font-size: 18px; margin: 20px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.md h3 { font-size: 16px; margin: 16px 0 6px; }
.md p { margin: 8px 0; }
.md ul, .md ol { padding-left: 22px; margin: 6px 0; }
.md li { margin: 3px 0; }
.md code { background: #f0f2f6; padding: 1px 5px; border-radius: 4px; }

.preview-box { position: sticky; top: 84px; }
.mini { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 8px 24px rgba(18,38,74,.12); }
.mini-h { color: #fff; display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-weight: 700; font-size: 16px; }
.mini-h img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #fff; }
.mini-sub { background: #f3f5f9; padding: 8px 16px; font-size: 12px; color: var(--muted); }
.mini-b { padding: 14px 16px; }
.mini-q { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.mini-q span { border: 1px solid #cfd6e3; border-radius: 999px; padding: 6px 12px; font-size: 12px; }
.mini-msg { background: #f3f5f9; border-radius: 10px; padding: 10px 12px; font-size: 12px; white-space: pre-wrap; }
.mini-launch { display: inline-flex; align-items: center; gap: 8px; color: #fff; border-radius: 999px; padding: 10px 20px; font-weight: 700; margin-top: 14px; }
.icon-prev { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); object-fit: cover; background: #f3f5f9; display: flex; align-items: center; justify-content: center; color: var(--muted-2); overflow: hidden; }
.icon-prev img { width: 100%; height: 100%; object-fit: cover; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.src-row { display: grid; grid-template-columns: 180px 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.log { background: #0f1d36; color: #cfe0ff; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; border-radius: 6px; padding: 10px 12px; max-height: 220px; overflow: auto; white-space: pre-wrap; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .8s linear infinite; vertical-align: middle; }
@keyframes sp { to { transform: rotate(360deg); } }
.note { font-size: 12px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }

@media (max-width: 1200px) {
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-dash, .g-dash2, .g-form { grid-template-columns: 1fr; }
  .preview-box { position: static; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .top .burger { display: inline-flex; }
  .period { flex-wrap: wrap; }
  .top { padding: 0 16px; }
  .content { padding: 20px 16px 40px; }
  .g4, .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .donut-wrap { grid-template-columns: 1fr; }
  .src-row { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 22px; }
  .kpi .v { font-size: 26px; }
  .top .tlink .lbl { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* =====================================================================
   Product theme (colors, KPI sparkline cards, colored section titles)
   ===================================================================== */
:root {
  --bg: #eef2f8;
  --k-blue: #2f6fe0;
  --k-teal: #0e9f8a;
  --k-orange: #e07b12;
  --k-purple: #7a4fd6;
  --k-green: #1f9d55;
  --k-pink: #d6456b;
  --k-indigo: #4257d6;
}
body { background: var(--bg); }

/* sidebar */
.side { background: linear-gradient(180deg, #14305d 0%, #0d1e3c 100%); }
.brand { gap: 12px; }
.brand::before { content: ""; width: 28px; height: 28px; flex: none; border-radius: 8px; background: linear-gradient(135deg, #6fb0ff 0%, #2f6fe0 55%, #7a4fd6 100%); box-shadow: 0 4px 12px rgba(47, 111, 224, .45); }
.nav a.active { background: linear-gradient(90deg, rgba(111, 176, 255, .30), rgba(111, 176, 255, .06)); box-shadow: inset 3px 0 0 #6fb0ff; }
.nav-sec { color: #8fb3ea; font-weight: 700; letter-spacing: .06em; }

/* top bar */
.top { box-shadow: 0 1px 0 rgba(16, 32, 64, .04); }

/* page header banner */
.page-head { background: linear-gradient(120deg, #15305e 0%, #1f4f9c 55%, #3a7bea 100%); color: #fff; border-radius: 14px; padding: 22px 26px; position: relative; overflow: hidden; align-items: center; box-shadow: 0 8px 24px rgba(31, 79, 156, .18); }
.page-head::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 70%); pointer-events: none; }
.page-head h1 { color: #fff; }
.page-head p { color: rgba(255, 255, 255, .82); }
.page-head > * { position: relative; z-index: 1; }
.page-head .lbl { color: #fff; }
.page-head .btn { border-color: rgba(255, 255, 255, .5); }
.page-head .btn.primary { background: #fff; color: var(--primary); border-color: #fff; }
.page-head .btn.primary:hover { background: #eaf1ff; }
.page-head .inp { border-color: transparent; }

/* cards & colored section titles */
.card { border-radius: 12px; border-color: #e3e8f1; box-shadow: 0 1px 2px rgba(16, 32, 64, .04), 0 6px 18px rgba(16, 32, 64, .05); }
.card-t { position: relative; padding-left: 14px; color: var(--ac-t, #173a7a); }
.card-t::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; border-radius: 3px; background: linear-gradient(180deg, var(--ac, #6fb0ff), var(--ac2, #2f6fe0)); }
.card.ac-blue { --ac: #6fb0ff; --ac2: var(--k-blue); --ac-t: #1d4fae; }
.card.ac-teal { --ac: #4fd1bd; --ac2: var(--k-teal); --ac-t: #0a7466; }
.card.ac-orange { --ac: #ffb760; --ac2: var(--k-orange); --ac-t: #a85700; }
.card.ac-purple { --ac: #b19bff; --ac2: var(--k-purple); --ac-t: #5a35b0; }
.card.ac-indigo { --ac: #8fa2ff; --ac2: #4f5fd6; --ac-t: #3340a8; }
.card.ac-green { --ac: #6fd99a; --ac2: var(--k-green); --ac-t: #157a40; }
.card.ac-pink { --ac: #ff8fac; --ac2: var(--k-pink); --ac-t: #a8294b; }

/* tables */
.t th { background: #f1f5fb; color: #3a4a6b; border-bottom: 1px solid #e3e8f1; }
.t th:first-child { border-top-left-radius: 8px; }
.t th:last-child { border-top-right-radius: 8px; }

/* buttons */
.btn.primary { background: linear-gradient(135deg, #3a7bea, #1f4f9c); border-color: #1f4f9c; box-shadow: 0 2px 6px rgba(31, 79, 156, .25); }
.btn.primary:hover { background: linear-gradient(135deg, #2f6fe0, #183f7e); }

/* KPI cards with background sparkline */
.kpi { position: relative; overflow: hidden; padding: 16px 18px 20px; border-top: 3px solid var(--kc, var(--k-blue)); min-height: 128px; }
.kpi .head { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.kpi .ic { width: 34px; height: 34px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--kc); background: color-mix(in srgb, var(--kc) 14%, #fff); }
.kpi .ic svg { width: 19px; height: 19px; }
.kpi .l { font-size: 14px; color: #3a4a6b; line-height: 1.3; }
.kpi .v { position: relative; z-index: 1; font-size: 32px; margin-top: 10px; color: #10234a; }
.kpi .v small { color: var(--kc); }
.kpi .s { position: relative; z-index: 1; color: #55617a; }
.kpi .s b { color: var(--kc); font-weight: 700; }
.kpi .spark { position: absolute; left: 0; right: 0; bottom: 0; height: 58%; pointer-events: none; }
.kpi .spark svg { width: 100%; height: 100%; display: block; }

/* colored tabs (each tab has its own color via --tc) */
.tabs { background: transparent; padding: 0; gap: 10px; display: flex; flex-wrap: wrap; border-radius: 0; overflow: visible; }
.tabs button { background: #fff; color: var(--tc, var(--primary)); border: 2px solid color-mix(in srgb, var(--tc, var(--primary)) 35%, #fff); border-radius: 999px; padding: 9px 22px 9px 18px; box-shadow: 0 1px 2px rgba(16, 32, 64, .05); }
.tabs button:hover { background: color-mix(in srgb, var(--tc, var(--primary)) 8%, #fff); color: var(--tc, var(--primary)); border-color: var(--tc, var(--primary)); }
.tabs button.on { background: var(--tc, var(--primary)); border-color: var(--tc, var(--primary)); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--tc, var(--primary)) 35%, transparent); }

/* filter card accent */
.card.filter-card { border-left: 4px solid var(--tc, var(--k-blue)); }
.page-head .inp { color: var(--text); background: #fff; }
.brand { font-size: 17px; padding: 0 20px; }
.kpi .spark { height: 46%; }
.legend li { font-size: 13px; white-space: nowrap; }
.kpi { padding-bottom: 58px; min-height: 0; }
.kpi .spark { height: 52px; }
.alert > svg { flex: none; margin-top: 2px; }

/* アップロード資料 */
.drop { display: flex; gap: 12px; align-items: center; border: 2px dashed #b9c7dc; border-radius: 10px; padding: 18px 20px; margin-top: 12px; cursor: pointer; background: #f7f9fc; color: #23406f; }
.drop:hover, .drop:focus, .drop.on { border-color: var(--primary, #2a5bd7); background: #eef4ff; outline: none; }
.up-log { list-style: none; padding: 0; margin: 10px 0 0; font-size: 13px; }
.up-log li { padding: 3px 0; }
.up-log li.ok { color: #1c7a3e; }
.up-log li.ng { color: #b3261e; }
.top a.company { color: inherit; text-decoration: none; }
.top a.company:hover { text-decoration: underline; }
.top .company small { font-weight: 400; font-size: 12px; color: #6b7a90; }
