:root {
  color-scheme: light;
  --ink: #17324a;
  --muted: #617589;
  --navy: #102a43;
  --blue: #087e8b;
  --blue-dark: #06636e;
  --line: #dce5eb;
  --surface: #ffffff;
  --wash: #f3f7f9;
  --mint: #e8f6f2;
  --red: #9f2f35;
  --shadow: 0 16px 42px rgba(17, 44, 66, .07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--wash); color: var(--ink); line-height: 1.55; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #68c6cc; outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 5; padding: .7rem 1rem; background: white; border-radius: .5rem; }
.skip-link:focus { top: 1rem; }
.topbar { height: 74px; padding: 0 max(24px, calc((100% - 1100px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: white; }
.brand { color: white; text-decoration: none; font-weight: 720; letter-spacing: -.025em; display: flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #eaf8f4; color: var(--blue-dark); font-weight: 850; }
.brand-light { color: #b8d6df; font-weight: 500; }
.secure-label { font-size: .82rem; color: #c4d3dd; display: flex; align-items: center; gap: 8px; }
.secure-dot { width: 8px; height: 8px; border-radius: 50%; background: #62d3b3; box-shadow: 0 0 0 4px rgba(98,211,179,.13); }
.page-shell { max-width: 1100px; width: calc(100% - 48px); margin: 38px auto 64px; }
.hero { min-height: 230px; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 32px 48px; overflow: hidden; border-radius: 20px; background: linear-gradient(118deg, #e1f2f0 0%, #eaf2f6 62%, #e3edf3 100%); }
.hero-copy { max-width: 590px; }
.eyebrow { margin: 0 0 8px; color: var(--blue-dark); font-size: .71rem; letter-spacing: .14em; font-weight: 800; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 9px; color: var(--navy); font-size: clamp(2rem, 4vw, 2.65rem); line-height: 1.12; letter-spacing: -.045em; }
.hero-description { margin: 0; color: #516b7c; max-width: 510px; }
.hero-image-wrap { width: 255px; height: 166px; flex: 0 0 255px; overflow: hidden; border: 5px solid rgba(255,255,255,.62); border-radius: 18px; transform: rotate(2deg); box-shadow: 0 16px 28px rgba(16,42,67,.14); background: white; }
.hero-image { width: 100%; height: 100%; display: block; object-fit: cover; }
.panel { border: 1px solid rgba(202,216,225,.72); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.login-panel { max-width: 680px; margin: 26px auto 0; padding: 30px 34px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.panel-heading h2, .action-card h2 { margin: 0; color: var(--navy); font-size: 1.22rem; letter-spacing: -.025em; }
.panel-heading .eyebrow { margin-bottom: 3px; }
.lock-icon { color: var(--blue); font-size: 1rem; background: var(--mint); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; }
.muted { color: var(--muted); font-size: .91rem; }
.login-panel > .muted { margin: 13px 0 23px; }
label { display: block; margin: 0 0 7px; color: #334e64; font-size: .88rem; font-weight: 700; }
.key-entry { display: flex; gap: 10px; }
input { width: 100%; min-width: 0; border: 1px solid #cad8e1; background: #fbfdfe; color: var(--ink); padding: 12px 14px; border-radius: 9px; }
input:hover { border-color: #9ab2c1; }
.field-help { margin: 8px 0 0; color: #75899a; font-size: .78rem; }
.button { min-height: 43px; padding: 10px 16px; border: 1px solid transparent; border-radius: 9px; font-weight: 720; font-size: .86rem; transition: background .16s ease, transform .16s ease, border-color .16s ease; white-space: nowrap; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .6; cursor: wait; }
.button-primary { color: white; background: var(--blue); }
.button-primary:hover:not(:disabled) { background: var(--blue-dark); }
.button-secondary { color: #594518; background: #f6efdc; border-color: #ece0bd; }
.button-secondary:hover:not(:disabled) { background: #efe4c8; }
.button-outline { color: #34556c; background: white; border-color: #cbd9e1; }
.button-outline:hover:not(:disabled) { border-color: #83a6b7; background: #f6fafb; }
#admin-panel { margin-top: 26px; }
.intro-panel { padding: 20px 23px; display: flex; gap: 15px; align-items: flex-start; background: #f2faf7; border-color: #cce7dd; box-shadow: none; }
.intro-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 12px; color: #14775e; background: #d9f1e8; font-size: 1.15rem; font-weight: 800; }
.intro-panel h2 { margin: 0 0 5px; color: #174e43; font-size: 1rem; }
.intro-panel p { margin: 0; color: #496e65; font-size: .86rem; }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin-top: 18px; }
.action-card { min-height: 240px; padding: 23px; display: flex; flex-direction: column; align-items: flex-start; }
.card-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; margin-bottom: 14px; font-size: 1.5rem; font-weight: 500; }
.create-icon { color: #087e8b; background: #e2f5f2; }
.rotate-icon { color: #8b681b; background: #f8f1dd; }
.action-card p { margin: 9px 0 20px; color: var(--muted); font-size: .86rem; max-width: 430px; }
.action-card .button { margin-top: auto; }
.reveal-panel, .list-panel { margin-top: 18px; padding: 24px 26px; }
.one-time-badge { color: #7d5c18; background: #fbf3df; border-radius: 99px; padding: 5px 10px; font-size: .72rem; font-weight: 750; }
.reveal-panel > .muted { margin: 12px 0 15px; }
.code-row { display: flex; align-items: stretch; gap: 10px; }
.invite-code { min-width: 0; flex: 1; display: flex; align-items: center; overflow-wrap: anywhere; border: 1px solid #cbd9e1; border-radius: 9px; padding: 11px 13px; background: #f7fafb; color: #173b51; font-size: .94rem; letter-spacing: .025em; }
.list-heading { margin-bottom: 9px; }
.list-panel > .muted { margin-bottom: 16px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 15px; border-bottom: 1px solid #e7edf1; font-size: .84rem; }
th { background: #f5f8fa; color: #617589; font-size: .73rem; text-transform: uppercase; letter-spacing: .08em; }
tbody tr:last-child td { border-bottom: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; color: #25654e; font-size: .81rem; font-weight: 700; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4da77e; }
.status-pill.used { color: #6f5265; }
.status-pill.used::before { background: #98778e; }
.status-pill.inactive { color: #778590; }
.status-pill.inactive::before { background: #a9b4bc; }
.empty-state { text-align: center; color: var(--muted); padding: 24px 12px; }
.notice { margin: 14px 0 0; padding: 11px 13px; border-radius: 9px; font-size: .86rem; }
.notice-error { color: var(--red); border: 1px solid #f1cbca; background: #fff5f4; }
.global-status { max-width: 680px; margin: 18px auto 0; }
.session-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 16px 2px 0; color: #718494; font-size: .78rem; }
.text-button { padding: 5px; color: #315b70; background: transparent; border: 0; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 19px max(24px, calc((100% - 1100px) / 2)); color: #8192a0; background: #edf2f5; font-size: .77rem; }
@media (max-width: 700px) {
  .topbar { height: 64px; padding: 0 18px; }
  .secure-label { font-size: .72rem; }
  .page-shell { width: calc(100% - 32px); margin: 20px auto 42px; }
  .hero { min-height: auto; padding: 25px 22px; gap: 16px; border-radius: 16px; }
  .hero-image-wrap { flex-basis: 120px; width: 120px; height: 102px; border-width: 3px; border-radius: 13px; }
  .hero-description { font-size: .9rem; }
  .login-panel { margin-top: 18px; padding: 22px 20px; }
  .action-grid { grid-template-columns: 1fr; gap: 13px; margin-top: 13px; }
  .action-card { min-height: 0; padding: 20px; }
  .action-card p { margin-bottom: 16px; }
  .intro-panel { padding: 17px; }
  .reveal-panel, .list-panel { padding: 20px 17px; }
  .session-footer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .site-footer { padding: 17px; }
}
@media (max-width: 430px) {
  .hero { align-items: flex-start; flex-direction: column; }
  .hero-image-wrap { align-self: flex-end; margin-top: -7px; width: 140px; height: 94px; }
  .key-entry { flex-direction: column; }
  .key-entry .button { width: 100%; }
  .code-row { flex-direction: column; }
  .code-row .button { width: 100%; }
  .list-heading { align-items: flex-end; }
  th, td { padding: 10px 11px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
