:root {
  --ink: #152421;
  --muted: #65736f;
  --line: #dfe6e2;
  --paper: #f3f5f0;
  --white: #fff;
  --green: #185f50;
  --green-2: #2c806a;
  --lime: #d9f06a;
  --shadow: 0 18px 55px rgba(21, 36, 33, .09);
}
.booting { overflow: hidden; }
.booting .app-shell { visibility: hidden; }
.boot-screen { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; background: #eef2ef; }
.boot-screen[hidden] { display: none; }
.boot-card { width: min(460px,100%); padding: 34px; border: 1px solid rgba(29,57,49,.12); border-radius: 24px; background: #fff; box-shadow: 0 24px 70px rgba(21,42,35,.12); }
.boot-card span { display: block; color: var(--green-2); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.boot-card strong { display: block; margin-top: 10px; color: var(--ink); font-size: 24px; }
.boot-card p { margin: 12px 0 0; color: var(--muted); line-height: 1.65; }
.boot-screen.failed .boot-card { border-color: rgba(167,71,63,.35); }
.boot-screen.failed .boot-card span { color: #a7473f; }
.system-bar { margin: -12px 0 18px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.78); color: var(--muted); font-size: 10px; font-weight: 800; }
.system-bar > :last-child { margin-left: auto; }
.system-mode { padding: 5px 8px; border-radius: 999px; }
.system-mode.public { color: #765d19; background: #f6edc4; }
.system-mode.protected { color: #256553; background: #e2f2ec; }
.management-button:disabled, button:disabled { cursor: not-allowed; opacity: .48; }
* { box-sizing: border-box; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 90% 0%, rgba(217,240,106,.3), transparent 28rem), var(--paper);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
button, input, select { font: inherit; }
.app-shell { width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding: 44px 0 28px; }
.hero {
  min-height: 280px;
  padding: 50px 58px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: hidden;
  color: #fff;
  border-radius: 30px;
  background: var(--ink);
  box-shadow: var(--shadow);
}
.hero:after {
  width: 360px; height: 360px; content: ""; position: absolute; top: -170px; right: 18%;
  border: 60px solid rgba(217,240,106,.12); border-radius: 50%;
}
.eyebrow, .section-kicker {
  margin: 0 0 9px; color: var(--green-2); font-size: 12px; font-weight: 800;
  letter-spacing: .15em; text-transform: uppercase;
}
.hero .eyebrow { color: var(--lime); }
.hero h1 { margin: 0; font-size: clamp(42px, 6vw, 76px); line-height: .98; letter-spacing: -.06em; }
.hero h1 span { color: var(--lime); }
.hero-copy { margin: 24px 0 0; color: #b9c6c2; line-height: 1.7; }
.period-card {
  width: 315px; padding: 25px 27px; z-index: 1; border: 1px solid rgba(255,255,255,.16);
  border-radius: 20px; background: rgba(255,255,255,.07); backdrop-filter: blur(10px);
}
.period-card span, .period-card small { display: block; color: #aebdb8; font-size: 12px; }
.period-card strong { display: block; margin: 7px 0 16px; color: var(--lime); font-size: 32px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.metric {
  min-height: 158px; padding: 25px 27px; display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid var(--line); border-radius: 22px; background: var(--white);
  box-shadow: 0 8px 30px rgba(21,36,33,.04);
}
.metric span, .metric small { color: var(--muted); font-size: 13px; }
.metric strong { font-size: 42px; line-height: 1; letter-spacing: -.04em; }
.metric-dark { color: #fff; border-color: var(--green); background: var(--green); }
.metric-dark span, .metric-dark small { color: #bcd8d1; }
.metric-accent { border-color: var(--lime); background: var(--lime); }
.metric-accent span, .metric-accent small { color: #45502b; }
.validation-band {
  margin: 0 0 18px;
  padding: 19px 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid #bfd5ce;
  border-radius: 18px;
  background: #e4f2ed;
}
.validation-band div { display: flex; align-items: center; gap: 12px; }
.validation-band strong { font-size: 15px; }
.validation-band p { margin: 0; color: #547168; font-size: 12px; line-height: 1.6; text-align: right; }
.validation-mark { padding: 7px 10px; color: #fff; border-radius: 999px; background: var(--green); font-size: 10px; font-weight: 800; white-space: nowrap; }
.overview-grid { display: grid; grid-template-columns: minmax(0,1.85fr) minmax(320px,.8fr); gap: 18px; margin-bottom: 18px; }
.panel { border: 1px solid var(--line); border-radius: 24px; background: var(--white); box-shadow: 0 8px 30px rgba(21,36,33,.04); }
.ranking-panel, .insight-panel { min-height: 610px; padding: 29px; }
.panel-heading, .table-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel h2, .dialog-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.unit-chip { padding: 8px 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 700; }
.ranking-chart { height: 515px; margin-top: 24px; padding-right: 9px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #b8c7c2 transparent; }
.rank-row { min-height: 36px; display: grid; grid-template-columns: 28px 122px minmax(140px,1fr) 44px; align-items: center; gap: 12px; font-size: 12px; }
.rank-number { color: #94a09d; text-align: right; }
.rank-person { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; }
.rank-person small { margin-left: 6px; color: #9aa6a2; font-weight: 500; }
.rank-track { height: 9px; overflow: hidden; border-radius: 999px; background: #edf1ef; }
.rank-bar { height: 100%; min-width: 4px; border-radius: inherit; background: var(--green-2); }
.rank-row:nth-child(-n+3) .rank-bar { background: var(--lime); box-shadow: inset 0 0 0 1px rgba(21,36,33,.08); }
.rank-value { text-align: right; font-weight: 800; }
.shift-breakdown { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-top: 24px; }
.shift-card { padding: 18px 12px; border-radius: 16px; background: #f2f5f3; }
.shift-card span, .shift-card small { display: block; color: var(--muted); font-size: 11px; }
.shift-card strong { display: block; margin: 7px 0 5px; font-size: 26px; }
.shift-card.p3 { background: #eef7bd; }
.insight-box { margin-top: 20px; padding: 25px; color: #fff; border-radius: 19px; background: var(--ink); }
.insight-box span, .insight-box p { color: #aebdb8; font-size: 12px; }
.insight-box strong { display: block; margin: 12px 0 9px; color: var(--lime); font-size: 22px; line-height: 1.35; }
.insight-box p { margin: 0; }
.insight-box.subtle { color: var(--ink); border: 1px solid var(--line); background: #f7f9f7; }
.insight-box.subtle span, .insight-box.subtle p { color: var(--muted); }
.insight-box.subtle strong { color: var(--ink); }
.table-panel { padding: 30px; }
.total-driver-panel { margin-top: 18px; }
.total-band { background: #f0f5d4; border-color: #d5e28f; }
.month-cell { color: var(--green); font-size: 14px; font-weight: 900; }
.summary-table tbody tr { cursor: default; }
.summary-table tfoot td {
  color: var(--ink);
  border-top: 2px solid var(--green);
  border-bottom: 0;
  background: #eef5f1;
  font-weight: 900;
}
.summary-table th:first-child, .summary-table td:first-child { text-align: left; }
.total-driver-panel tbody tr { cursor: default; }
.table-help { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.toolbar { display: flex; align-items: center; gap: 8px; }
.toolbar input, .toolbar select { height: 42px; padding: 0 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 11px; outline: none; background: #fff; font-size: 13px; }
.toolbar input { width: 174px; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(44,128,106,.12); }
.table-wrap { margin-top: 24px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 14px 12px; border-bottom: 1px solid #ebefed; text-align: right; white-space: nowrap; }
th { padding-top: 10px; color: #7d8a86; background: #fafbfa; font-size: 11px; font-weight: 700; }
th:nth-child(2), th:nth-child(3), td:nth-child(2), td:nth-child(3) { text-align: left; }
tbody tr { cursor: pointer; transition: background .15s ease; }
tbody tr:hover { background: #f4f8f6; }
.rank-cell { color: #96a19e; }
.name-cell { font-size: 14px; font-weight: 800; }
.laps-cell { color: var(--green); font-size: 15px; font-weight: 900; }
.p3-cell { color: #65711e; font-weight: 800; }
.empty-state { padding: 56px 0 28px; color: var(--muted); text-align: center; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 5px 0; color: #7e8a86; font-size: 11px; }
.driver-dialog { width: min(810px,calc(100% - 28px)); max-width: none; padding: 0; overflow: visible; border: 0; border-radius: 26px; background: transparent; }
.driver-dialog::backdrop { background: rgba(8,18,16,.64); backdrop-filter: blur(5px); }
.dialog-card { padding: 34px; position: relative; border-radius: 26px; background: #fff; box-shadow: 0 35px 100px rgba(0,0,0,.28); }
.close-button { width: 38px; height: 38px; position: absolute; top: 22px; right: 22px; cursor: pointer; color: var(--ink); border: 0; border-radius: 50%; background: #edf1ef; font-size: 25px; line-height: 1; }
.dialog-heading p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.detail-metrics { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin: 24px 0; }
.detail-metric { padding: 13px; border-radius: 13px; background: #f3f6f4; }
.detail-metric span, .detail-metric strong { display: block; }
.detail-metric span { color: var(--muted); font-size: 10px; }
.detail-metric strong { margin-top: 5px; font-size: 19px; }
.calendar-weekdays, .detail-calendar { display: grid; grid-template-columns: repeat(7,1fr); gap: 7px; }
.calendar-weekdays { margin-bottom: 7px; color: #89938f; text-align: center; font-size: 11px; }
.calendar-day { min-height: 74px; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.calendar-day.blank { visibility: hidden; }
.calendar-day .date { display: block; color: #84908c; font-size: 10px; }
.calendar-day strong { display: block; margin-top: 8px; font-size: 14px; }
.calendar-day small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.calendar-day.status-a { border-color: #bcded4; background: #e8f5f1; }
.calendar-day.status-p { border-color: #d6dfb4; background: #f3f6e7; }
.calendar-day.status-p3 { border-color: #d9e986; background: #eef7bd; }
.calendar-day.status-off, .calendar-day.status-leave { color: #87928e; background: #f3f4f3; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; color: var(--muted); font-size: 11px; }
.dot { width: 8px; height: 8px; display: inline-block; margin-right: 5px; border-radius: 50%; }
.dot-a { background: #57aa91; } .dot-p { background: #9baa54; } .dot-p3 { background: #c4d83c; } .dot-off { background: #c7cfcc; }
.sr-only { width: 1px; height: 1px; padding: 0; margin: -1px; position: absolute; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.period-card .period-holiday { min-height: 18px; margin-top: 7px; color: #d9f06a; line-height: 1.5; }
.month-switcher {
  margin: -72px 30px 24px auto;
  padding: 7px 8px 7px 15px;
  width: fit-content;
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
}
.month-switcher > span { color: #9fb0ab; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.month-switcher > div { display: flex; gap: 3px; }
.month-button {
  min-width: 48px;
  padding: 9px 10px;
  cursor: pointer;
  color: #b8c6c2;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}
.month-button:hover { color: #fff; background: rgba(255,255,255,.08); }
.month-button.active { color: var(--ink); background: var(--lime); }
[hidden] { display: none !important; }
.view-tabs {
  width: fit-content;
  margin: 18px 0;
  padding: 5px;
  display: flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 8px 28px rgba(21,36,33,.05);
}
.view-tab {
  padding: 11px 21px;
  cursor: pointer;
  color: var(--muted);
  border: 0;
  border-radius: 11px;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}
.view-tab:hover { color: var(--ink); }
.view-tab.active { color: #fff; background: var(--green); box-shadow: 0 5px 15px rgba(24,95,80,.2); }
.schedule-panel { padding: 31px; overflow: hidden; }
.schedule-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.schedule-header h2 { margin: 0; font-size: 29px; letter-spacing: -.04em; }
.schedule-header > div:first-child > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.schedule-rule { min-width: 430px; padding: 18px 20px; border-radius: 16px; background: var(--ink); }
.schedule-rule span { display: block; margin-bottom: 8px; color: #9fb0ab; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.schedule-rule strong { color: #fff; font-size: 14px; }
.schedule-rule i { padding: 0 7px; color: var(--lime); font-style: normal; }
.schedule-toolbar { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.schedule-legend { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 11px; }
.legend-box { width: 13px; height: 13px; display: inline-block; margin-right: 6px; vertical-align: -2px; border-radius: 4px; }
.legend-a { background: #cdebe2; }
.legend-p { background: #ebedcf; }
.legend-p3 { background: var(--lime); }
.legend-off { background: #e9edeb; }
.schedule-wrap { max-height: 690px; margin-top: 18px; overflow: auto; border: 1px solid var(--line); border-radius: 17px; background: #fff; scrollbar-width: thin; scrollbar-color: #aebdb8 transparent; }
.schedule-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.schedule-table th, .schedule-table td { height: 43px; padding: 5px 6px; border-right: 1px solid #e8ecea; border-bottom: 1px solid #e8ecea; text-align: center; }
.schedule-table thead th { height: 54px; position: sticky; top: 0; z-index: 5; color: var(--ink); background: #f5f7f5; box-shadow: 0 1px 0 var(--line); }
.schedule-table th.bus-col, .schedule-table td.bus-col { width: 78px; min-width: 78px; position: sticky; left: 0; z-index: 3; background: #fff; }
.schedule-table th.name-col, .schedule-table td.name-col { width: 102px; min-width: 102px; position: sticky; left: 78px; z-index: 3; background: #fff; box-shadow: 8px 0 12px -12px rgba(21,36,33,.55); }
.schedule-table thead th.bus-col, .schedule-table thead th.name-col { z-index: 7; background: #edf2ef; }
.schedule-table tbody tr:nth-child(2n) td { border-bottom-color: #cbd5d1; }
.schedule-table tbody tr:hover td.bus-col, .schedule-table tbody tr:hover td.name-col { background: #f4f8f6; }
.schedule-table td.bus-col { color: #73807c; font-size: 11px; font-weight: 700; }
.schedule-table td.name-col { cursor: pointer; text-align: left; font-size: 12px; font-weight: 800; }
.schedule-day-head { width: 46px; min-width: 46px; }
.schedule-day-head span, .schedule-day-head small { display: block; }
.schedule-day-head span { font-size: 12px; }
.schedule-day-head small { margin-top: 3px; color: #8b9793; font-size: 9px; font-weight: 600; }
.schedule-day-head.saturday span, .schedule-day-head.saturday small { color: #366f9d; }
.schedule-day-head.sunday span, .schedule-day-head.sunday small, .schedule-day-head.holiday span, .schedule-day-head.holiday small { color: #c04d46; }
.schedule-cell { width: 46px; min-width: 46px; font-size: 11px; font-weight: 900; }
.schedule-cell span { min-width: 31px; padding: 6px 4px; display: inline-block; border-radius: 8px; }
.schedule-cell.shift-a span { color: #145b4c; background: #d9eee8; }
.schedule-cell.shift-p span { color: #5d681f; background: #f0f1d9; }
.schedule-cell.shift-p3 span { color: #344500; background: var(--lime); box-shadow: inset 0 0 0 1px rgba(55,74,0,.13); }
.schedule-cell.shift-off span { color: #a1aaa7; background: #f1f3f2; font-size: 9px; }
.schedule-table tfoot td { height: 37px; color: var(--muted); background: #fafbfa; font-size: 10px; font-weight: 800; }
.schedule-table tfoot .summary-label { position: sticky; left: 0; z-index: 4; color: var(--ink); background: #edf2ef; text-align: right; }
.schedule-table tfoot tr:last-child td { border-bottom: 0; }
.schedule-table .summary-p3 { color: #566800; background: #f2f8cc; }
.schedule-tip { margin: 14px 2px 0; color: #7f8b87; font-size: 11px; }


.simulator-panel { margin: 0 0 18px; padding: 30px; overflow: hidden; }
.simulator-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.simulator-heading h2 { margin: 0; font-size: 27px; letter-spacing: -.04em; }
.simulator-heading > div:first-child > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.simulator-control {
  width: min(410px,100%); padding: 18px 20px; display: grid; grid-template-columns: 1fr auto; gap: 7px 14px;
  color: #fff; border-radius: 17px; background: var(--ink);
}
.simulator-control span { color: #aebdb8; font-size: 11px; font-weight: 800; }
.simulator-control strong { color: var(--lime); font-size: 25px; line-height: 1; }
.simulator-control input { width: 100%; grid-column: 1 / -1; accent-color: var(--lime); cursor: pointer; }
.simulator-control small { grid-column: 1 / -1; color: #b9c6c2; font-size: 10px; }
.simulation-quick-buttons { margin: 20px 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.simulation-quick {
  min-width: 48px; padding: 9px 12px; cursor: pointer; color: var(--muted);
  border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 12px; font-weight: 900;
}
.simulation-quick:hover { border-color: var(--green-2); }
.simulation-quick.active { color: #fff; border-color: var(--green); background: var(--green); }
.simulation-metrics { display: grid; grid-template-columns: repeat(5,1fr); gap: 9px; }
.simulation-metric { padding: 17px; border-radius: 15px; background: #f3f6f4; }
.simulation-metric span, .simulation-metric strong { display: block; }
.simulation-metric span { color: var(--muted); font-size: 10px; }
.simulation-metric strong { margin-top: 7px; font-size: 20px; }
.simulation-metric.focus { background: #eef7bd; }
.simulation-recommendation {
  margin: 14px 0 22px; padding: 13px 16px; color: #53633c; border: 1px solid #d7e49a;
  border-radius: 13px; background: #f7fadf; font-size: 12px; line-height: 1.65;
}
.simulation-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); gap: 22px; }
.simulation-grid h3 { margin: 0 0 10px; font-size: 15px; }
.simulation-grid .table-wrap { margin-top: 0; border: 1px solid var(--line); border-radius: 13px; }
.simulation-options-table tbody tr { cursor: pointer; }
.simulation-options-table tbody tr.selected { background: #eaf4ef; }
.simulation-options-table tbody tr.recommended td:first-child { box-shadow: inset 4px 0 0 var(--lime); }
.simulation-option { color: var(--green); font-size: 14px; font-weight: 900; }
.simulation-option small { margin-left: 5px; padding: 3px 5px; color: #53601a; border-radius: 5px; background: #eaf293; font-size: 8px; }
.simulation-gap { font-weight: 900; }
.simulation-driver-wrap { max-height: 430px; overflow: auto; }
.simulation-driver-wrap tbody tr { cursor: default; }
.simulation-delta { font-weight: 900; }
.simulation-delta.up { color: #b34e42; }
.simulation-delta.down { color: #39749d; }


.toolbar .export-button, .daily-controls .download-button {
  height: 42px; padding: 0 13px; cursor: pointer; color: #fff; border: 1px solid var(--green);
  border-radius: 11px; background: var(--green); font-size: 11px; font-weight: 850; white-space: nowrap;
}
.toolbar .export-button.secondary { color: var(--green); background: #fff; }
.schedule-toolbar .toolbar { flex-wrap: wrap; justify-content: flex-end; }
.daily-version-switch {
  margin-top: 18px; padding: 5px; width: fit-content; display: flex; gap: 4px;
  border: 1px solid var(--line); border-radius: 13px; background: #f3f6f4;
}
.daily-version-button {
  min-width: 150px; padding: 9px 14px; cursor: pointer; color: var(--muted); border: 0;
  border-radius: 9px; background: transparent; text-align: left;
}
.daily-version-button b, .daily-version-button span { display: block; }
.daily-version-button b { font-size: 12px; }
.daily-version-button span { margin-top: 3px; font-size: 9px; }
.daily-version-button.active { color: #fff; background: var(--green); }
.daily-omitted-row td { height: 34px; color: #7c8783; background: #ecefed; }
.daily-omitted-row .daily-bus { color: var(--ink); background: #e1e6e3; }

.daily-report-panel { padding: 31px; }
.daily-report-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.daily-report-toolbar h2 { margin: 0; font-size: 29px; letter-spacing: -.04em; }
.daily-report-toolbar > div:first-child > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.daily-controls { display: flex; align-items: center; gap: 7px; }
.daily-controls button, .daily-controls input {
  height: 42px; color: var(--ink); border: 1px solid var(--line); border-radius: 11px; background: #fff;
}
.daily-controls button { min-width: 42px; padding: 0 13px; cursor: pointer; font-size: 22px; font-weight: 800; }
.daily-controls button:disabled { cursor: default; opacity: .35; }
.daily-controls input { padding: 0 12px; font-size: 13px; font-weight: 700; }
.daily-controls .print-button { color: #fff; border-color: var(--green); background: var(--green); font-size: 12px; }
.daily-summary {
  margin: 24px 0 16px; padding: 13px 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 11px 24px;
  color: var(--muted); border: 1px solid var(--line); border-radius: 15px; background: #f7f9f7; font-size: 12px;
}
.daily-summary b { margin-left: 4px; color: var(--ink); }
.daily-type-badge { padding: 7px 11px; color: #fff; border-radius: 999px; background: var(--green); font-size: 10px; font-weight: 900; }
.daily-type-saturday { background: #376f9c; }
.daily-type-holiday { background: #b84e47; }
.daily-paper { max-width: 1080px; margin: 0 auto; padding: 30px; border: 1px solid #bcc5c2; background: #fff; box-shadow: 0 12px 35px rgba(21,36,33,.08); }
.daily-paper-heading { padding: 0 8px 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.daily-paper-heading h2 { margin: 0; font-size: 38px; letter-spacing: -.045em; }
.daily-paper-heading strong { font-size: 20px; }
.daily-table-wrap { margin-top: 0; overflow: visible; }
.daily-report-table { border: 2px solid #1b2321; table-layout: fixed; font-size: 13px; }
.daily-report-table th, .daily-report-table td { height: 43px; padding: 5px 6px; border: 1px solid #636b68; text-align: center; }
.daily-report-table th { color: #151b19; background: #f0f2f1; font-size: 12px; }
.daily-report-table th:nth-child(1) { width: 42px; }
.daily-report-table th:nth-child(2) { width: 70px; }
.daily-report-table th:nth-child(3), .daily-report-table th:nth-child(4) { width: 92px; }
.daily-report-table th:nth-child(n+5):nth-child(-n+9) { width: 82px; }
.daily-report-table th:nth-child(10) { width: 92px; }
.daily-report-table th:nth-child(7), .daily-report-table td:nth-child(7) { border-left: 4px double #1b2321; }
.daily-report-table tbody tr { cursor: default; }
.daily-report-table tbody tr:hover { background: transparent; }
.daily-report-table .daily-sequence { color: #69736f; font-weight: 700; }
.daily-report-table .daily-bus { font-size: 14px; font-weight: 900; }
.daily-report-table .daily-driver span, .daily-report-table .daily-driver small { display: block; }
.daily-report-table .daily-driver span { font-weight: 800; }
.daily-report-table .daily-driver small { margin-top: 2px; color: #87918e; font-size: 8px; font-weight: 800; }
.daily-report-table .daily-time { font-size: 14px; font-weight: 850; }
.daily-report-table .daily-note { color: #65736f; font-size: 10px; font-weight: 800; }
.daily-report-table .daily-spare { color: #a34a37; }
.daily-report-table .daily-p3-row .daily-bus { background: #eff7bd; }
.daily-report-table .daily-p3-row .daily-note { color: #5c691e; background: #f7fadf; }
.daily-notice { margin: 0; padding: 18px 10px 2px; text-align: center; font-size: 15px; font-weight: 800; line-height: 1.65; }


.holiday-panel { padding: 30px; }
.holiday-editor { margin-top: 14px; padding: 14px; display: grid; grid-template-columns: 150px 190px minmax(220px,1fr) auto; align-items: end; gap: 10px; border-radius: 14px; background: #f5f7f5; }
.holiday-editor label span { display: block; margin: 0 0 6px; color: var(--muted); font-size: 10px; font-weight: 800; }
.holiday-editor input, .holiday-editor select { width: 100%; height: 42px; padding: 0 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fff; font-size: 13px; }
.holiday-editor input:focus, .holiday-editor select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(44,128,106,.1); }
.holiday-guide { margin: 13px 3px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.holiday-table-wrap { max-height: 620px; overflow: auto; }
.holiday-table th, .holiday-table td { text-align: left; }
.holiday-table tbody tr { cursor: default; }
.holiday-date { font-weight: 850; }
.holiday-weekday.sunday, .holiday-weekday.holiday { color: #ad4d45; font-weight: 850; }
.holiday-weekday.saturday { color: #3b7098; font-weight: 850; }
.holiday-operation { color: #5d681d; font-weight: 850; }
.management-panel, .management-history-panel { padding: 30px; }
.management-history-panel { margin-top: 18px; }
.management-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.management-heading h2 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.management-heading p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.management-actions, .management-form-actions { display: flex; align-items: center; gap: 8px; }
.management-button {
  min-height: 42px; padding: 0 15px; cursor: pointer; border: 1px solid var(--line); border-radius: 11px;
  background: #fff; color: var(--ink); font-size: 12px; font-weight: 850; white-space: nowrap;
}
.management-button.primary { color: #fff; border-color: var(--green); background: var(--green); }
.management-button.secondary { color: var(--green); border-color: #b9d0c9; background: #fff; }
.management-button.danger { color: #a74a42; border-color: #ebcbc7; background: #fff7f6; }
.management-button.small { min-height: 33px; padding: 0 11px; font-size: 10px; }
.management-status {
  margin: 22px 0 14px; padding: 14px 17px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border: 1px solid #c9ddd7; border-radius: 13px; background: #edf6f2; font-size: 12px;
}
.management-status span { color: var(--muted); }
.management-status.dirty { border-color: #dfd58c; background: #fbf8dc; }
.management-status.dirty b { color: #786c18; }
.management-status.success { border-color: #b8d8cd; background: #e7f4ef; }
.management-toolbar { padding: 14px; display: flex; align-items: flex-end; gap: 10px; border-radius: 14px; background: #f5f7f5; }
.management-toolbar label { flex: 0 1 250px; }
.management-toolbar label span, .management-form label span { display: block; margin: 0 0 6px; color: var(--muted); font-size: 10px; font-weight: 800; }
.management-toolbar input, .management-form input, .management-form select {
  width: 100%; height: 42px; padding: 0 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  outline: none; background: #fff; font-size: 13px;
}
.management-toolbar input:focus, .management-form input:focus, .management-form select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(44,128,106,.1); }
.management-toolbar .danger { margin-left: auto; }
.management-table-wrap { max-height: 660px; overflow: auto; }
.management-table th, .management-table td, .management-history-table th, .management-history-table td { text-align: left; }
.management-table tbody tr, .management-history-table tbody tr { cursor: default; }
.management-table .management-row-actions { text-align: right; }
.management-bus { font-size: 14px; font-weight: 900; }
.management-stage { color: #52645e; font-weight: 800; }
.management-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 900; }
.management-badge.active { color: #256553; background: #e2f2ec; }
.management-badge.resigned { color: #9f4941; background: #f8e5e2; }
.management-badge.changed { color: #6b651d; background: #f4efbd; }
.management-badge.inferred { color: #3b6175; background: #e5f0f4; }
.management-latest { color: var(--muted); font-size: 11px; }
.management-conflict { color: #a7473f; font-weight: 900; }
.management-history-table .pending-row { background: #fffbed; }
.management-history-table .applied-row { background: #fbfcfb; }
.management-history-table .inferred-row { background: #f6fafb; }
.management-history-table .event-type { font-weight: 850; }
.management-source-label { color: #66808c; font-size: 10px; font-weight: 850; white-space: nowrap; }
.management-dialog { width: min(760px,calc(100% - 28px)); max-width: none; padding: 0; overflow: visible; border: 0; border-radius: 24px; background: transparent; }
.management-dialog::backdrop { background: rgba(8,18,16,.64); backdrop-filter: blur(5px); }
.management-form { padding: 34px; position: relative; border-radius: 24px; background: #fff; box-shadow: 0 35px 100px rgba(0,0,0,.28); }
.management-form-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.management-stage-field, .management-note-field { grid-column: 1 / -1; }
.management-form-preview { margin-top: 17px; padding: 14px 16px; color: #50605a; border-radius: 12px; background: #f2f6f4; font-size: 12px; line-height: 1.65; }
.management-form-actions { margin-top: 22px; justify-content: flex-end; }
.management-form-actions .management-button { min-width: 110px; }
.management-form.is-resigned .management-stage-field, .management-form.is-resigned label:has(#managementBus) { opacity: .42; }
.management-form select:disabled { cursor: not-allowed; background: #eef1ef; }

@media (max-width: 1040px) {
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .validation-band { align-items: flex-start; flex-direction: column; gap: 8px; }
  .validation-band p { text-align: left; }
  .ranking-panel, .insight-panel { min-height: auto; }
  .insight-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .insight-panel .panel-heading, .shift-breakdown { grid-column: 1/-1; }
  .insight-box { margin-top: 0; }
  .table-header { align-items: stretch; flex-direction: column; }
  .month-switcher { margin: 0 0 18px; background: var(--ink); }
  .schedule-header, .schedule-toolbar, .daily-report-toolbar, .simulator-heading { align-items: stretch; flex-direction: column; }
  .simulation-grid { grid-template-columns: 1fr; }
  .simulation-metrics { grid-template-columns: repeat(3,1fr); }
  .schedule-rule { min-width: 0; }
  .daily-table-wrap { overflow-x: auto; }
  .daily-report-table { min-width: 950px; }
}
@media (max-width: 720px) {
  .app-shell { width: min(100% - 24px,1440px); padding-top: 12px; }
  .hero { min-height: auto; padding: 34px 27px; align-items: stretch; flex-direction: column; border-radius: 22px; }
  .hero h1 { font-size: 45px; }
  .period-card { width: 100%; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric { min-height: 135px; padding: 18px; }
  .metric strong { font-size: 32px; }
  .ranking-panel, .insight-panel, .table-panel, .schedule-panel { padding: 21px; }
  .view-tabs { width: 100%; }
  .view-tab { flex: 1; padding-left: 8px; padding-right: 8px; }
  .month-switcher { width: 100%; padding: 7px; align-items: stretch; flex-direction: column; gap: 5px; }
  .month-switcher > span { padding-left: 5px; }
  .month-switcher > div { display: grid; grid-template-columns: repeat(6,1fr); }
  .month-button { min-width: 0; padding: 9px 4px; }
  .schedule-rule strong { line-height: 1.8; }
  .schedule-toolbar .toolbar { width: 100%; }
  .daily-report-panel { padding: 18px; }
  .simulator-panel { padding: 20px; }
  .simulation-metrics { grid-template-columns: repeat(2,1fr); }
  .simulation-quick-buttons { display: grid; grid-template-columns: repeat(5,1fr); }
  .simulation-quick { min-width: 0; }
  .daily-controls { display: grid; grid-template-columns: 42px minmax(0,1fr) 42px; }
  .daily-controls label, .daily-controls input { width: 100%; }
  .daily-controls .print-button { grid-column: 1 / 3; }
  .daily-controls .download-button { grid-column: 3 / 4; }
  .daily-version-switch { width: 100%; }
  .daily-version-button { min-width: 0; flex: 1; }
  .daily-summary { gap: 9px 15px; }
  .daily-paper { padding: 18px 12px; }
  .daily-paper-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .daily-paper-heading h2 { font-size: 31px; }
  .daily-paper-heading strong { font-size: 16px; }
  .rank-row { grid-template-columns: 24px 92px minmax(80px,1fr) 36px; gap: 8px; }
  .insight-panel { display: block; }
  .insight-box { margin-top: 12px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar input, .toolbar select, .toolbar label { width: 100%; }
  footer { flex-direction: column; }
  .dialog-card { padding: 27px 18px; }
  .detail-metrics { grid-template-columns: repeat(3,1fr); }
  .calendar-weekdays, .detail-calendar { gap: 4px; }
  .calendar-day { min-height: 59px; padding: 6px; }
  .calendar-day strong { margin-top: 5px; font-size: 11px; }
}

@media (max-width: 1040px) {
  .management-heading { flex-direction: column; }
  .management-actions { width: 100%; }
  .management-actions .management-button { flex: 1; }
}
@media (max-width: 720px) {
  .view-tabs { flex-wrap: wrap; }
  .view-tab { min-width: calc(33.333% - 4px); }
  .management-panel, .management-history-panel, .holiday-panel { padding: 20px; }
  .holiday-editor { grid-template-columns: 1fr; }
  .management-actions, .management-toolbar { align-items: stretch; flex-direction: column; }
  .management-toolbar label { flex-basis: auto; }
  .management-toolbar .danger { margin-left: 0; }
  .management-status { align-items: flex-start; flex-direction: column; }
  .management-form { padding: 28px 18px; }
  .management-form-grid { grid-template-columns: 1fr; }
  .management-stage-field, .management-note-field { grid-column: auto; }
}

@media print {
  body { background: white; } .app-shell { width: 100%; padding: 0; }
  .hero { min-height: auto; padding: 24px; border-radius: 0; box-shadow: none; }
  .toolbar, .ranking-panel, footer { display: none; }
  .overview-grid { grid-template-columns: 1fr; }
  .panel, .metric { box-shadow: none; break-inside: avoid; }
  body.print-daily { background: #fff; }
  body.print-daily .app-shell { width: 100%; padding: 0; }
  body.print-daily .app-shell > :not(#dailyView) { display: none !important; }
  body.print-daily #dailyView { display: block !important; }
  body.print-daily .daily-report-panel { padding: 0; border: 0; box-shadow: none; }
  body.print-daily .daily-report-toolbar, body.print-daily .daily-summary,
  body.print-daily .daily-version-switch { display: none !important; }
  body.print-daily .daily-paper { max-width: none; padding: 0; border: 0; box-shadow: none; }
  body.print-daily .daily-report-table { min-width: 0; font-size: 11px; }
  body.print-daily .daily-report-table th, body.print-daily .daily-report-table td { height: 33px; padding: 3px; }
  body.print-daily .daily-paper-heading h2 { font-size: 32px; }
  body.print-daily .daily-paper-heading strong { font-size: 17px; }
  body.print-daily .daily-notice { font-size: 12px; }
}
