:root {
  --primary: #09004c;
  --primary-2: #150a75;
  --accent: #1bb36b;
  --accent-2: #e8fff3;
  --ink: #111827;
  --muted: #667085;
  --line: #e6e8ef;
  --bg: #f6f8fb;
  --card: #ffffff;
  --danger: #b42318;
  --shadow: 0 24px 60px rgba(9, 0, 76, .14);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--primary); padding: 10px 14px; border-radius: 10px; z-index: 30; }
.skip-link:focus { left: 16px; }
.site-header { background: var(--primary); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 6px 22px rgba(5, 0, 40, .25); }
.site-header.compact { position: static; }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand, .brand-link { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; background: #fff; color: var(--primary); display: grid; place-items: center; font-weight: 900; letter-spacing: -.03em; }
.brand small { display: block; color: rgba(255,255,255,.72); font-size: 12px; margin-top: -2px; }
.nav-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.nav-link, .nav-phone { text-decoration: none; border: 1px solid rgba(255,255,255,.24); color: #fff; padding: 10px 14px; border-radius: 999px; }
.nav-phone { background: rgba(255,255,255,.12); }
.hero { position: relative; overflow: hidden; padding: 54px 0 42px; color: #fff; background: radial-gradient(circle at 85% 5%, rgba(27,179,107,.55), transparent 30%), linear-gradient(135deg, var(--primary), #050027 68%); }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 34px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 64px); line-height: 1.02; margin: 12px 0 16px; letter-spacing: -.055em; max-width: 820px; }
.hero p { color: rgba(255,255,255,.82); font-size: clamp(16px, 2vw, 19px); max-width: 690px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: 12px; color: #a9ffd4; }
.eyebrow.dark { color: var(--primary); }
.hero-actions, .admin-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.btn { border: 0; padding: 12px 16px; border-radius: 14px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; min-height: 46px; }
.btn-light { color: var(--primary); background: #fff; }
.btn-outline-light { color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.42); }
.btn-primary { color: #fff; background: var(--primary); box-shadow: 0 12px 24px rgba(9,0,76,.18); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-ghost { color: var(--primary); background: #fff; border: 1px solid var(--line); }
.hero-shape { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; pointer-events: none; }
.hero-shape-one { width: 280px; height: 280px; right: -80px; top: 28px; background: rgba(27,179,107,.2); }
.hero-shape-two { width: 190px; height: 190px; left: 42%; bottom: -110px; background: rgba(255,255,255,.14); }
.search-panel { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.24); backdrop-filter: blur(18px); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.search-panel label, .password-label { display: grid; gap: 8px; font-weight: 800; }
.search-box { position: relative; margin: 8px 0 14px; }
.search-box input, .filter-grid select, .password-label input { width: 100%; min-height: 52px; border: 1px solid rgba(255,255,255,.26); border-radius: 16px; padding: 0 46px 0 14px; background: rgba(255,255,255,.96); color: var(--ink); outline: none; }
.search-box input:focus, .filter-grid select:focus, .password-label input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(27,179,107,.18); }
#clearSearch { position: absolute; right: 8px; top: 8px; width: 36px; height: 36px; border-radius: 12px; border: 0; background: #eef2ff; color: var(--primary); font-size: 22px; line-height: 1; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.quick-tag { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.12); color: #fff; border-radius: 999px; padding: 8px 10px; font-size: 13px; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -28px; position: relative; z-index: 4; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 14px 34px rgba(9,0,76,.08); }
.stat-card span { display: block; font-size: clamp(26px, 3vw, 36px); line-height: 1; font-weight: 900; color: var(--primary); letter-spacing: -.04em; }
.stat-card strong { display: block; margin-top: 8px; color: var(--muted); }
.stat-card.accent { background: var(--accent-2); border-color: rgba(27,179,107,.22); }
.toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 34px 0 16px; }
.result-summary { margin: 0; font-size: 22px; font-weight: 900; color: var(--primary); letter-spacing: -.025em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.segmented { display: inline-flex; background: #fff; border: 1px solid var(--line); padding: 5px; border-radius: 16px; gap: 4px; }
.view-button { border: 0; background: transparent; color: var(--muted); padding: 10px 12px; border-radius: 12px; font-weight: 800; }
.view-button.active { background: var(--primary); color: #fff; }
.day-strip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 20px; }
.day-chip { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; color: var(--primary); padding: 10px 14px; border-radius: 999px; font-weight: 800; }
.day-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.notices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.notice-card { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 18px; padding: 16px; color: #344054; }
.notice-card strong { color: var(--primary); }
.results { padding-bottom: 56px; }
.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.schedule-card, .card-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 12px 30px rgba(9,0,76,.06); }
.schedule-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.schedule-card:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(9,0,76,.12); border-color: rgba(9,0,76,.18); }
.card-topline { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 14px; }
.day-pill, .region-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 10px; font-weight: 900; font-size: 12px; }
.day-pill { color: var(--primary); background: #eef2ff; }
.region-pill { color: #076238; background: #eafff4; }
.schedule-card h3 { margin: 0 0 10px; font-size: 20px; color: var(--primary); letter-spacing: -.025em; }
.schedule-card p { margin: 0; color: #344054; white-space: pre-line; }
mark { background: #fff2a8; color: inherit; padding: 0 2px; border-radius: 3px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 12px; }
.section-title h2 { color: var(--primary); margin: 0; }
.group-list { display: grid; gap: 12px; }
details.region-group, details.area-group { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
details.region-group summary, details.area-group summary { cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 900; color: var(--primary); display: flex; justify-content: space-between; gap: 16px; }
details.region-group summary::-webkit-details-marker, details.area-group summary::-webkit-details-marker { display: none; }
.region-content { padding: 0 18px 18px; display: grid; gap: 10px; }
.mini-entry { border-top: 1px solid var(--line); padding: 12px 0; }
.mini-entry strong { color: var(--primary); }
.table-shell { width: 100%; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 20px; }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--line); }
th { background: var(--primary); color: #fff; position: sticky; top: 0; z-index: 1; }
td { color: #344054; white-space: pre-line; }
tbody tr:hover { background: #fafaff; }
.empty-state { text-align: center; background: #fff; border: 1px dashed #b8bdd3; border-radius: var(--radius); padding: 38px 20px; color: var(--muted); }
.empty-state strong { display: block; color: var(--primary); font-size: 22px; margin-bottom: 8px; }
.site-footer { background: #06002e; color: #fff; padding: 28px 0; }
.footer-grid { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-grid p, .footer-grid span { color: rgba(255,255,255,.72); margin: 4px 0 0; display: block; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #111827; color: #fff; padding: 12px 16px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .25s ease; box-shadow: 0 20px 40px rgba(0,0,0,.25); z-index: 60; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.admin-main { padding: 34px 0 60px; }
.admin-hero h1 { margin: 10px 0 8px; color: var(--primary); letter-spacing: -.04em; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; }
.card-panel h2 { color: var(--primary); margin-top: 0; letter-spacing: -.025em; }
.upload-drop { display: grid; place-items: center; text-align: center; gap: 6px; min-height: 190px; border: 2px dashed #b8bdd3; border-radius: 22px; background: #fbfcff; padding: 22px; cursor: pointer; transition: .2s ease; }
.upload-drop:hover, .upload-drop.dragover { border-color: var(--accent); background: var(--accent-2); }
.upload-drop input { display: none; }
.upload-drop span { color: var(--muted); }
.upload-drop strong { color: var(--primary); }
.admin-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 16px; }
.admin-stat { background: #f8f9ff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.admin-stat strong { display: block; color: var(--primary); font-size: 24px; }
.password-label input { border: 1px solid var(--line); padding: 0 14px; }
.admin-messages { margin-bottom: 12px; color: var(--muted); }
.empty-preview { padding: 22px; color: var(--muted); }
.recommendation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.recommendation-grid div { border: 1px solid var(--line); border-radius: 16px; background: #fbfcff; padding: 14px; }
.recommendation-grid strong { display: block; color: var(--primary); margin-bottom: 4px; }
.recommendation-grid span { color: var(--muted); font-size: 14px; }

@media (max-width: 980px) {
  .hero-grid, .admin-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .toolbar { flex-direction: column; }
  .toolbar-actions { justify-content: flex-start; }
  .recommendation-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .container { width: min(100% - 22px, 1180px); }
  .nav { min-height: 64px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
  .brand small { display: none; }
  .nav-phone { display: none; }
  .hero { padding: 34px 0 34px; }
  .hero h1 { font-size: 36px; }
  .search-panel { padding: 16px; }
  .filter-grid, .notices, .stats-row, .cards-grid, .recommendation-grid, .admin-stats { grid-template-columns: 1fr; }
  .toolbar-actions, .segmented { width: 100%; }
  .segmented { overflow-x: auto; }
  .view-button { flex: 1 0 auto; }
  .btn { width: 100%; }
  .day-strip { margin-left: -11px; margin-right: -11px; padding-left: 11px; padding-right: 11px; }
  .schedule-card { padding: 16px; border-radius: 18px; }
  .footer-grid { display: grid; }
}

@media print {
  .site-header, .hero, .toolbar-actions, .day-strip, .notices, .site-footer, .toast, .admin-main .admin-grid, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .container { width: 100%; }
  .stats-row { margin-top: 0; box-shadow: none; }
  .schedule-card, .card-panel, .stat-card, .table-shell { box-shadow: none; break-inside: avoid; }
  th { background: #09004c !important; color: #fff !important; }
  .results { padding-bottom: 0; }
}
