/* REDISH 物件管理ナビ デモ — 色は共通デザインの値（面・文字・アクセント・状態）を変数にして使う */
:root {
  --surface-paper: #f7f9fb; --surface-card: #ffffff; --surface-line: #d8e2e7;
  --text-ink: #1d2b32; --text-ink-2: #48606b;
  --accent: #0090b0; --accent-strong: #006e87; --accent-soft: #e3f2f7;
  --state-ok: #29794b; --state-ok-soft: #e6f2ea;
  --state-warn: #956000; --state-warn-soft: #f7efdc;
  --state-risk: #ab4c13; --state-risk-soft: #f8e9df;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif; background: var(--surface-paper); color: var(--text-ink); font-size: 14px; line-height: 1.6; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
.app { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.side { background: var(--surface-card); border-right: 1px solid var(--surface-line); padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.eyebrow { font-size: 12px; color: var(--text-ink-2); }
.brand h1 { font-size: 20px; color: var(--accent-strong); }
.org { font-size: 12px; margin-top: 2px; }
.doc-dates { font-size: 12px; color: var(--text-ink-2); margin-top: 4px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 12px; color: var(--text-ink-2); margin: 10px 0 2px; }
.nav button { text-align: left; background: none; border: 0; border-radius: 8px; padding: 7px 10px; font-size: 13.5px; }
.nav button:hover { background: var(--accent-soft); }
.nav button[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.about { border: 1px solid var(--surface-line); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; }
.about summary { cursor: pointer; font-weight: 700; }
.about p { margin-top: 6px; color: var(--text-ink-2); }
.route { margin: 6px 0 0; padding-left: 18px; }
.route a { color: var(--accent-strong); }
.reset { border: 1px solid var(--surface-line); background: var(--surface-card); border-radius: 8px; padding: 7px 10px; font-size: 13px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; font-size: 12px; color: var(--text-ink-2); }
.main { padding: 22px 26px 60px; min-width: 0; }
.screen-head { margin-bottom: 14px; }
.screen-head h2 { font-size: 22px; }
.lead { color: var(--text-ink-2); margin-top: 2px; }
.card { background: var(--surface-card); border: 1px solid var(--surface-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.card h3 { font-size: 15px; margin-bottom: 8px; }
.src { font-size: 12px; color: var(--text-ink-2); margin-top: 8px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.kpis.k3 { grid-template-columns: repeat(3, 1fr); }
.kpi { background: var(--surface-card); border: 1px solid var(--surface-line); border-radius: 12px; padding: 12px 14px; }
.kpi .k-label { font-size: 12px; color: var(--text-ink-2); }
.kpi .k-val { font-size: 30px; font-weight: 700; color: var(--accent-strong); font-variant-numeric: tabular-nums; line-height: 1.3; }
.kpi .k-val small { font-size: 13px; font-weight: 500; color: var(--text-ink-2); margin-left: 3px; }
.kpi .k-sub { font-size: 12px; color: var(--text-ink-2); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.two > .card { min-width: 0; }
.act { display: block; width: 100%; text-align: left; background: var(--surface-card); border: 1px solid var(--surface-line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.act:hover { border-color: var(--accent); }
.act b { font-size: 13.5px; }
.act p { font-size: 12.5px; color: var(--text-ink-2); margin-top: 2px; }
.act .row { display: flex; justify-content: space-between; gap: 8px; }
.pill { display: inline-block; font-size: 12px; border-radius: 999px; padding: 1px 9px; white-space: nowrap; background: var(--accent-soft); color: var(--accent-strong); }
.pill.warn { background: var(--state-warn-soft); color: var(--state-warn); }
.pill.ok { background: var(--state-ok-soft); color: var(--state-ok); }
.pill.risk { background: var(--state-risk-soft); color: var(--state-risk); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--surface-line); vertical-align: top; }
th { font-size: 12px; color: var(--text-ink-2); font-weight: 500; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr[data-act="case"] { cursor: pointer; }
tr[aria-selected="true"] { background: var(--accent-soft); }
.tbl-wrap { overflow-x: auto; }
.btn { background: var(--accent); color: var(--surface-card); border: 0; border-radius: 8px; padding: 8px 14px; font-weight: 700; }
.btn:hover { background: var(--accent-strong); }
.ghost { background: var(--surface-card); border: 1px solid var(--surface-line); border-radius: 8px; padding: 4px 10px; font-size: 12.5px; }
.ghost:hover { border-color: var(--accent); }
select, input[type="range"] { font: inherit; }
select { padding: 4px 6px; border: 1px solid var(--surface-line); border-radius: 6px; background: var(--surface-card); max-width: 100%; }
.hbar { display: grid; grid-template-columns: 150px 1fr 70px; align-items: center; gap: 8px; margin: 7px 0; font-size: 13px; }
.hbar .track { background: var(--accent-soft); border-radius: 6px; height: 16px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: 6px; transform-origin: left center; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.hbar .val { text-align: right; font-variant-numeric: tabular-nums; }
.cols { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 10px; }
.cols .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 12px; }
.cols .col i { display: block; width: 70%; height: var(--h); background: var(--accent); border-radius: 6px 6px 0 0; transform-origin: center bottom; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.line { width: 100%; max-width: 560px; height: auto; }
.line polyline { stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s ease-out; }
.line circle { fill: var(--accent-strong); transition: opacity 0.4s ease 0.9s; }
.axis { display: flex; justify-content: space-between; max-width: 560px; font-size: 12px; color: var(--text-ink-2); padding: 0 4px; }
.donut-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.donut { width: 170px; height: 170px; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 6; transition: stroke-dasharray 1s ease-out; }
.legend { list-style: none; margin: 0; padding: 0; font-size: 13px; flex: 1; min-width: 200px; }
.legend li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--surface-line); }
.legend li span:first-child::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--c); }
.wait[data-grow="bar"] { transform: scale(0, 1); }
.wait[data-grow="barv"] { transform: scale(1, 0); }
.wait[data-grow="line"] { stroke-dashoffset: 1; }
.wait[data-grow="fade"] circle, .wait[data-grow="fade"] { opacity: 0; }
.wait[data-grow="donut"] { stroke-dasharray: 0 100 !important; }
.slider-row { display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; flex-wrap: wrap; }
.slider-row input { flex: 1; min-width: 180px; accent-color: var(--accent); }
.detail { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 20px; font-size: 13px; }
.detail dt { color: var(--text-ink-2); font-size: 12px; }
.detail dd { margin: 0 0 6px; }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--text-ink); color: var(--surface-card); padding: 10px 16px; border-radius: 10px; z-index: 10; max-width: 80vw; }
.toast[hidden] { display: none; }
@media (max-width: 860px) {
  .app { display: block; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--surface-line); }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .nav-label { display: none; }
  .nav button { border: 1px solid var(--surface-line); }
  .main { padding: 16px 12px 50px; }
  .kpis, .kpis.k3, .two { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 110px 1fr 60px; }
}
@media (max-width: 480px) { .kpis, .kpis.k3 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
