/* Sling Pilot Academy tour board. Same language as spa-enrollments and spa-flightplan:
   Inter, #1570EF accent, white cards on #F9FAFB, sentence case. */

:root {
  --bg: #F9FAFB;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --border-strong: #D0D5DD;
  --row-line: #F2F4F7;
  --text: #101828;
  --muted: #667085;
  --faint: #98A2B3;
  --accent: #1570EF;
  --accent-hover: #175CD3;
  --accent-soft: #EFF4FF;
  --accent-ring: rgba(21, 112, 239, .18);
  --green: #067647;
  --green-bg: #ECFDF3;
  --green-dot: #12B76A;
  --amber: #B54708;
  --amber-bg: #FFFAEB;
  --red: #B42318;
  --red-bg: #FEF3F2;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px; padding: 10px 24px; min-height: 60px; }
.top .logo { height: 34px; display: block; }
.top h1 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.top .spacer { flex: 1; }
.top .meta { display: flex; align-items: center; gap: 14px; }
.top .signout { color: var(--muted); font-size: 13px; text-decoration: none; white-space: nowrap; }
.top .signout:hover { color: var(--text); }

.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.seg button, .seg label { border: 0; background: transparent; color: var(--muted); font-weight: 500; padding: 5px 12px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; }
.seg .on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
.seg label { position: relative; }
.seg input[type=date] { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }

.updated { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.updated .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-dot); box-shadow: 0 0 0 3px rgba(18, 183, 106, .16); }
.updated.stale .dot { background: var(--amber); box-shadow: 0 0 0 3px rgba(247, 144, 9, .16); }

.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--border); background: var(--card); border-radius: 8px; color: var(--muted); }
.icon-btn:hover { border-color: var(--border-strong); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.busy svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.viewtag { font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); white-space: nowrap; }

/* Page */
main { padding: 20px 24px 40px; }
.datebar { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.datebar h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.datebar .summary { color: var(--muted); }
.datebar .summary b { color: var(--text); font-weight: 600; }
.notice { display: none; background: var(--amber-bg); border: 1px solid #FEDF89; color: var(--amber); padding: 9px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.notice.on { display: block; }
.notice.error { background: var(--red-bg); border-color: #FECDCA; color: var(--red); }

/* Campus cards */
.campus { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.campushead { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.code { font-weight: 700; font-size: 12px; letter-spacing: .08em; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 6px; }
.campushead .city { font-weight: 600; font-size: 14.5px; }
.campushead .count { margin-left: auto; color: var(--muted); font-size: 13px; }
.empty { padding: 14px 16px; color: var(--faint); }

table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--border); background: #FCFCFD; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 16px; }
th:last-child, td:last-child { padding-right: 12px; }
td { padding: 6px 12px; border-bottom: 1px solid var(--row-line); vertical-align: middle; height: 48px; }
tr:last-child td { border-bottom: 0; }
td.time { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.student { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.type { color: var(--muted); }
tr.past td { color: var(--faint); }
tr.past td.student, tr.past td.time { color: var(--muted); }
tr.changed td { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 40% { background: var(--accent-soft); } 100% { background: transparent; } }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; padding: 3px 9px 3px 8px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.pill.yes { color: var(--green); background: var(--green-bg); }
.pill.no { color: var(--amber); background: var(--amber-bg); }
.pill .at { font-weight: 400; opacity: .85; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--card); border-radius: 8px; padding: 6px 10px; font-weight: 600; font-size: 12.5px; white-space: nowrap; color: var(--text); text-decoration: none; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .5; cursor: default; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-size: 12px; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }

/* Sign-in card (TV passphrase) */
.signin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.signin form { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 28px; width: min(360px, 100%); text-align: center; box-shadow: 0 1px 3px rgba(16, 24, 40, .06); }
.signin img { height: 40px; margin-bottom: 14px; }
.signin h1 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 4px; }
.signin p { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.signin input { width: 100%; padding: 11px 12px; font-size: 17px; border: 1px solid var(--border-strong); border-radius: 8px; text-align: center; background: var(--card); }
.signin input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.signin button { width: 100%; margin-top: 12px; padding: 11px; font-weight: 600; background: var(--accent); color: #fff; border: 0; border-radius: 9px; }
.signin .err { color: var(--red); font-size: 13px; margin-top: 10px; }
.signin .foot { margin-top: 16px; font-size: 12.5px; color: var(--faint); }
.signin .foot a { color: var(--muted); }
