:root {
  color-scheme: light;
  --navy: #082a46;
  --blue: #0b5e91;
  --sky: #dceff8;
  --ink: #142433;
  --muted: #607487;
  --line: #d9e3ea;
  --bg: #edf3f7;
  --white: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 2%, rgba(85, 173, 214, .16), transparent 24rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 28px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 7px; color: var(--blue); font-weight: 800; font-size: .78rem; letter-spacing: .16em; }
h1 { margin: 0; color: var(--navy); font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.03; letter-spacing: -.04em; }
.today-card { min-width: 205px; border-left: 3px solid #2a91c3; padding: 6px 0 6px 18px; }
.today-card span { display: block; color: var(--muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.today-card strong { display: block; margin-top: 4px; font-size: 1rem; color: var(--navy); }

.summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 22px 26px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(112deg, var(--navy), #0b4c73);
  box-shadow: 0 16px 36px rgba(8, 42, 70, .16);
}
.summary-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.22); border-radius: 12px; background: rgba(255,255,255,.08); }
.summary p { margin: 0 0 3px; color: #b9d6e7; font-size: .83rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.summary h2 { margin: 0; font-size: clamp(1.1rem, 2vw, 1.4rem); }
.countdown { min-width: 110px; padding-left: 24px; border-left: 1px solid rgba(255,255,255,.2); text-align: right; }
.countdown strong { display: block; font-size: 2rem; line-height: 1; }
.countdown span { color: #b9d6e7; font-size: .83rem; }

.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: 0 10px 28px rgba(34, 64, 87, .07); }
.table-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 23px 26px 20px; border-bottom: 1px solid var(--line); }
.table-heading h2 { margin: 0; color: var(--navy); font-size: 1.2rem; }
.table-heading p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.legend { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.legend i { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: #1785b7; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 13px 18px; background: #f3f7fa; color: #4c6578; font-size: .76rem; text-transform: uppercase; letter-spacing: .065em; text-align: left; white-space: nowrap; }
td { padding: 15px 18px; border-top: 1px solid #e8eef2; font-size: .94rem; }
tbody tr:first-child td { border-top: none; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #f8fbfd; }
td:first-child { color: #173650; font-weight: 680; }
.numeric { text-align: right; }
.past { color: #8b99a5; }
.past td:first-child { color: #7d8b96; font-weight: 560; }
.next { background: #eef8fc; box-shadow: inset 4px 0 #1686b8; }
.next:hover { background: #e8f5fa; }
.pill { display: inline-flex; min-width: 72px; justify-content: center; padding: 4px 9px; border-radius: 999px; background: #d5eef8; color: #07577e; font-weight: 800; font-variant-numeric: tabular-nums; }
.past .pill { background: #f0f3f5; color: #8a98a3; }
@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 620px); padding-top: 28px; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 16px; }
  .today-card { min-width: 0; }
  .summary { grid-template-columns: auto 1fr; padding: 19px; }
  .countdown { grid-column: 2; padding: 10px 0 0; border: 0; border-top: 1px solid rgba(255,255,255,.17); text-align: left; }
  .countdown strong { display: inline; margin-right: 5px; font-size: 1.5rem; }
  .table-heading { align-items: flex-start; flex-direction: column; }
  .table-wrap { overflow: visible; }
  table, tbody, tr, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody { padding: 8px 16px 16px; }
  tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 16px 4px; border-top: 1px solid var(--line); }
  tbody tr:first-child { border-top: none; }
  tbody tr.next { margin: 3px -8px; padding: 16px 12px; border: 0; border-radius: 8px; box-shadow: inset 4px 0 #1686b8; }
  td { padding: 0; border: 0; font-size: .9rem; }
  td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: .69rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
  td:first-child { grid-column: 1 / -1; font-size: 1rem; }
  .numeric { text-align: left; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.brand-bar { display:flex; justify-content:center; align-items:center; gap:24px; margin-bottom:24px; }
.company-logo { width:300px; max-width:100%; height:auto; max-height:140px; object-fit:contain; object-position:center; }
button, input { font:inherit; }
button, #logoSignIn { border:1px solid var(--line); border-radius:8px; padding:10px 14px; background:white; color:var(--navy); cursor:pointer; font-weight:650; }
button:hover { background:var(--sky); }
button:disabled { opacity:.5; cursor:default; }
:focus-visible { outline:3px solid #1686b8; outline-offset:3px; }
dialog { width:min(540px, calc(100% - 32px)); max-height:90vh; overflow:auto; padding:26px; border:1px solid var(--line); border-radius:14px; color:var(--ink); }
dialog::backdrop { background:rgba(8,42,70,.45); }
.settings-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.settings-heading h2 { margin:0; color:var(--navy); }
.logo-preview { display:block; width:100%; height:140px; object-fit:contain; object-position:left; background:white; border:1px solid var(--line); border-radius:8px; padding:12px; }
fieldset { border:0; margin:20px 0 0; padding:0; }
fieldset label { display:block; font-weight:650; margin-bottom:10px; }
input[type=file] { display:block; max-width:100%; }
#logoHelp { font-size:.875rem; color:var(--muted); }
#logoStatus { margin-bottom:0; }
@media(max-width:420px) { .brand-bar { gap:12px; } dialog { padding:18px; } }
