/* Court Legend analytics dashboard, spec v1.3 section 10.1: light, business-style, laptop first (1440 / 1280). */
:root {
  --bg: #f5f6f8; --card: #fff; --line: #e2e5ea; --text: #1c2331; --muted: #667085; --dim: #98a2b3;
  --blue: #2f6fdf; --blue2: #9dbcf2; --green: #16935a; --amber: #b7791f; --red: #cf3e3e; --side: #fbfbfc;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.app { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }
aside { background: var(--side); border-right: 1px solid var(--line); padding: 16px 10px; }
aside .brand { font-weight: 700; font-size: 15px; padding: 2px 10px 14px; }
aside .brand small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
aside a { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 14px; }
aside a.on { background: #e8effc; color: var(--blue); font-weight: 600; }
aside a.later { color: var(--dim); }
aside a i { font-style: normal; font-size: 10px; color: var(--dim); border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; }
aside hr { border: 0; border-top: 1px solid var(--line); margin: 8px 6px; }
.main { padding: 14px 24px 28px; min-width: 0; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.top h1 { font-size: 20px; margin: 0; }
.meta { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--muted); flex-wrap: wrap; justify-content: flex-end; }
.meta b { color: var(--text); font-weight: 600; }
.env { font-weight: 700; font-size: 11px; padding: 2px 7px; border-radius: 4px; background: #e8effc; color: var(--blue); }
.env.live { background: #fde8e8; color: var(--red); }
.switch { display: inline-flex; align-items: center; gap: 6px; }
.switch span { width: 28px; height: 16px; border-radius: 8px; background: var(--blue); position: relative; display: inline-block; }
.switch span::after { content: ''; position: absolute; right: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.filters { display: flex; gap: 8px; align-items: center; padding: 10px 0 14px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.seg a { padding: 5px 11px; font-size: 13px; border-right: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.seg a:last-child { border-right: 0; } .seg a.on { background: var(--blue); color: #fff; }
.sel { border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 5px 10px; font-size: 13px; color: var(--muted); }
.sel b { color: var(--text); font-weight: 600; } .sel.more { color: var(--blue); border-color: #c8d8f6; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; min-width: 0; }
.card .n { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.card .v { font-size: 26px; font-weight: 700; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.card .v.early { font-size: 18px; color: var(--dim); font-weight: 600; padding: 6px 0 4px; }
.card .g { font-size: 12px; color: var(--muted); }
.card .s { font-size: 12px; color: var(--muted); margin-top: 4px; }
.card .c { font-size: 10.5px; color: var(--dim); margin-top: 4px; }
.card .def { font-size: 11px; color: var(--amber); margin-top: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-top: 4px; flex: none; }
.dot.ok { background: var(--green); } .dot.warn { background: var(--amber); } .dot.bad { background: var(--red); } .dot.grey { background: #d0d5dd; }
.strip { background: #fff; border: 1px dashed var(--line); border-radius: 8px; padding: 9px 14px; color: var(--muted); font-size: 13px; display: flex; gap: 28px; }
.strip b { color: var(--text); font-weight: 600; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.charts .wide { grid-column: span 2; }
.chart h3 { font-size: 14px; margin: 0 0 2px; } .chart p.sub { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
svg text { font: 11px system-ui, sans-serif; fill: #667085; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.attn { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px 14px; }
.al { display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); align-items: baseline; font-size: 13px; }
.al:first-child { border-top: 0; }
.sev { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; text-align: center; }
.sev.Critical { background: #fde8e8; color: var(--red); } .sev.Warning { background: #fdf3dc; color: var(--amber); } .sev.Info { background: #e8effc; color: var(--blue); } .sev.OK { background: #e3f5ec; color: var(--green); }
.al small { color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
th { text-align: right; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: normal; vertical-align: bottom; }
td { text-align: right; padding: 6px 8px; border-bottom: 1px solid #f0f2f5; white-space: nowrap; }
.two > div { min-width: 0; } .two .card { overflow-x: auto; }
th:first-child, td:first-child { text-align: left; }
tr.grey td { color: var(--dim); } td.hot { color: var(--red); font-weight: 700; } td.tag { color: var(--muted); }
.note { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bar { display: grid; grid-template-columns: 200px 1fr 110px; gap: 10px; align-items: center; font-size: 13px; margin: 5px 0; }
.bar .t { color: var(--text); } .bar .track { display: block; height: 14px; background: #eef1f5; border-radius: 3px; overflow: hidden; }
.bar .fill { display: block; height: 100%; background: var(--blue); } .bar .k { text-align: right; font-variant-numeric: tabular-nums; }
.bar .k small { color: var(--muted); margin-left: 4px; }
footer { margin-top: 22px; font-size: 11px; color: var(--dim); }
.card.span2 { grid-column: span 2; } .card.span4 { grid-column: span 4; }
.card .v.html { font-size: 13px; font-weight: 400; margin: 6px 0 4px; }
.rstrip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
.rs { padding: 2px 12px; border-left: 1px solid var(--line); } .rs:first-child { border-left: 0; padding-left: 0; }
.rs .rl { font-size: 12px; color: var(--muted); } .rs .rv { font-size: 22px; font-weight: 700; margin: 2px 0; font-variant-numeric: tabular-nums; }
.rs .rv span { font-size: 15px; font-weight: 600; } .rs .rv .early { color: var(--dim); } .rs .rn { font-size: 11px; color: var(--dim); }
.early { color: var(--dim); font-weight: 600; }
.notlive { margin-top: 10px; background: #fff; border: 1px dashed var(--line); border-radius: 8px; padding: 7px 14px; font-size: 12.5px; color: var(--muted); }
.notlive b { color: var(--text); margin-right: 6px; } .notlive small { color: var(--dim); margin-left: 6px; }
.jsw { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin: 2px 0 10px; }
.jsw a { padding: 4px 10px; font-size: 12px; color: var(--muted); text-decoration: none; border-right: 1px solid var(--line); } .jsw a:last-child { border-right: 0; }
.jsw a.on { background: #e8effc; color: var(--blue); font-weight: 600; }
.note.fn { margin-top: 3px; color: var(--amber); } sup { font-size: 9px; color: var(--amber); }
@media (max-width: 1000px) { .app { grid-template-columns: 1fr; } aside { display: none; } .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card.span4 { grid-column: span 2; } .rstrip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .charts, .two { grid-template-columns: 1fr; } .charts .wide { grid-column: auto; } .main { padding: 12px; } }
.card .def .info { position: relative; display: inline-block; width: 14px; height: 14px; line-height: 14px; border-radius: 50%; border: 1px solid var(--amber); color: var(--amber); font: italic 600 10px/14px Georgia, serif; text-align: center; cursor: help; margin-left: 2px; vertical-align: 1px; }
.card .def .info .tip { display: none; position: absolute; z-index: 20; left: 50%; top: 18px; transform: translateX(-60%); width: 280px; padding: 8px 10px; background: #fff; color: #344054; border: 1px solid #d0d5dd; border-radius: 6px; box-shadow: 0 4px 14px rgba(16,24,40,.12); font-size: 12px; font-weight: 400; line-height: 1.45; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-style: normal; text-align: left; }
.card .def .info:hover .tip, .card .def .info:focus .tip { display: block; }
