:root { color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif; background: #f8fafc; color: #0f172a; }
.hidden { display: none !important; }
header h1 { margin: 0; font-size: 22px; }
header, nav, main { max-width: 1100px; margin: 0 auto; }
header { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px 16px 8px; }
header p, .muted { margin: 4px 0 0; color: #5c6b7a; }
.who { display: flex; gap: 12px; align-items: center; }
nav { display: flex; gap: 8px; padding: 8px 16px 0; }
nav button, button { border: 1px solid #c5d0da; background: #fff; border-radius: 8px; padding: 8px 12px; font: inherit; cursor: pointer; }
nav button.on { background: #1c2430; color: #fff; border-color: #1c2430; }
main { padding: 16px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.card { background: #fff; border: 1px solid #d7dee6; border-radius: 10px; padding: 12px; }
.card b { display: block; font-size: 22px; }
.bars { display: grid; gap: 8px; margin-bottom: 16px; }
.bar { display: grid; grid-template-columns: 120px 1fr 90px; gap: 8px; align-items: center; }
.bar span:last-child { text-align: right; color: #5c6b7a; }
.track { height: 10px; background: #e6ebf0; border-radius: 99px; overflow: hidden; }
.track i { display: block; height: 100%; background: #2f6f9f; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #d7dee6; border-radius: 10px; overflow: hidden; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #e6ebf0; vertical-align: top; }
th { font-size: 13px; color: #5c6b7a; font-weight: 600; }
.num { text-align: right; white-space: nowrap; }
.ok { color: #1d7a3a; }
.short, .snapshot { color: #8a5a00; }
.error, .timeout, .empty { color: #9d1c1c; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.panel { background: #fff; border: 1px solid #d7dee6; border-radius: 10px; padding: 12px 14px 8px; }
.panel h2, .day-head h2, .focus h2 { margin: 0 0 4px; font-size: 16px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: #5c6b7a; margin: 4px 0 0; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart .hit { cursor: pointer; fill: transparent; }
svg.chart .col.on .hit { fill: rgba(15, 23, 42, .06); }
.day-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin: 4px 0 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.chips, .weekdays { display: flex; flex-wrap: wrap; gap: 6px; }
.chip, .weekdays button, .preset { border: 1px solid #c5d0da; background: #fff; border-radius: 999px; padding: 6px 10px; cursor: pointer; font: inherit; }
.chip.on, .weekdays button.on, .preset.on { background: #1c2430; color: #fff; border-color: #1c2430; }
.search, .slot input[type="text"], .slot input[type="number"] { border: 1px solid #c5d0da; border-radius: 8px; padding: 8px 10px; font: inherit; }
.search { min-width: 220px; }
.alerts { display: grid; gap: 8px; margin-bottom: 12px; }
.alert { background: #fef2f2; color: #9d1c1c; border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.alert.warn { background: #fff7ed; color: #9a3412; }
.heat-wrap { overflow-x: auto; background: #fff; border: 1px solid #d7dee6; border-radius: 10px; }
table.heat { min-width: 100%; border: 0; }
table.heat th, table.heat td { text-align: center; white-space: nowrap; font-size: 13px; }
table.heat th.name, table.heat td.name { text-align: left; position: sticky; left: 0; background: #fff; }
.okcell { background: #ecfdf5; color: #065f46; cursor: pointer; }
.badcell { background: #fef2f2; color: #9d1c1c; font-weight: 700; cursor: pointer; }
.miss { background: #f8fafc; color: #94a3b8; }
.detail { margin-top: 10px; }
.slot { background: #fff; border: 1px solid #d7dee6; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.slot h2 { margin: 0; font-size: 16px; }
.slot-h { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.method-box { max-height: 220px; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-top: 8px; }
.method-box label { font-weight: 500; color: #1c2430; }
.rowline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.save { background: #2563eb; color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; font-weight: 700; cursor: pointer; }
.focus { background: #fff; border: 1px solid #d7dee6; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
tr.pick { cursor: pointer; }
tr.pick.on { background: #f8fafc; }
.bad { color: #9d1c1c; font-weight: 700; }
.schedule { display: grid; gap: 10px; }
.schedule article { background: #fff; border: 1px solid #d7dee6; border-radius: 10px; padding: 12px 14px; }
.schedule h2 { margin: 0 0 4px; font-size: 16px; }
iframe { width: 100%; height: 75vh; border: 1px solid #d7dee6; border-radius: 10px; background: #fff; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-wrap .card { width: 100%; max-width: 28rem; background: #fff; border: 1px solid #f1f5f9; border-radius: 1.5rem; box-shadow: 0 20px 40px rgba(15,23,42,.08); padding: 2rem; }
.icon { width: 4rem; height: 4rem; border-radius: 1rem; margin: 0 auto 1rem; overflow: hidden; box-shadow: 0 8px 20px rgba(15,23,42,.12); }
.icon img { width: 100%; height: 100%; display: block; }
.login-wrap h1 { margin: 0; text-align: center; font-size: 1.5rem; }
.sub { text-align: center; color: #64748b; font-size: .875rem; margin: .5rem 0 0; }
.login-wrap label { display: block; font-size: .75rem; font-weight: 700; color: #64748b; margin: .8rem 0 .35rem; }
.login-wrap input { width: 100%; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: .75rem; padding: .7rem .9rem; font-size: .95rem; font-weight: 600; }
.login-wrap .primary { width: 100%; margin-top: 1.1rem; border: 0; border-radius: .75rem; padding: .7rem 1rem; font-weight: 800; cursor: pointer; background: #2563eb; color: #fff; }
.login-wrap .primary:disabled { opacity: .7; cursor: wait; }
.err { margin: 1rem 0 0; padding: 1rem; background: #fef2f2; color: #dc2626; border-radius: .75rem; font-size: .875rem; font-weight: 700; }
.hint { color: #94a3b8; font-size: .75rem; text-align: center; margin: 1.5rem 0 0; }
@media (max-width: 800px) {
  .charts { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .bar { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
}
