:root {
  color-scheme: light;
  --ink: #271d31;
  --muted: #716878;
  --paper: #faf7f2;
  --card: #fffdf9;
  --line: #e7dfd8;
  --coral: #df705e;
  --plum: #5e3a62;
  --mint: #bad8ca;
  --danger: #a63d3d;
  font-family: Tahoma, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(circle at 90% 0, #f3ded7 0, transparent 28rem), var(--paper); color: var(--ink); min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.admin-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 64px; }
.admin-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin-bottom: 34px; }
.admin-head h1 { margin: 3px 0 0; font-size: clamp(1.4rem, 3vw, 2.2rem); }
.admin-head p { margin: 0; color: var(--muted); }
.wordmark { color: inherit; display: flex; gap: 8px; align-items: center; text-decoration: none; }
.wordmark span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50% 50% 42% 58%; background: var(--coral); color: white; font-weight: 900; }
.wordmark strong { font-size: 1.1rem; }
.quiet-button, .refresh-button { border: 1px solid var(--line); background: rgba(255,255,255,.7); color: var(--ink); border-radius: 12px; padding: 10px 15px; }
.login-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; max-width: 860px; margin: 10vh auto 0; background: rgba(255,253,249,.94); border: 1px solid var(--line); border-radius: 28px; padding: clamp(26px, 5vw, 52px); box-shadow: 0 24px 80px rgba(53,38,58,.1); }
.eyebrow, .panel-heading span { color: var(--coral); font-size: .78rem; font-weight: 800; letter-spacing: .03em; }
.login-panel h2 { font-size: 2rem; margin: 8px 0; }
.login-panel p { line-height: 1.9; color: var(--muted); }
.login-panel form { display: flex; flex-direction: column; gap: 10px; }
.login-panel label { font-size: .86rem; font-weight: 700; }
.login-panel input { width: 100%; border: 1px solid var(--line); background: white; border-radius: 12px; padding: 13px 14px; outline: none; }
.login-panel input:focus { border-color: var(--plum); box-shadow: 0 0 0 3px rgba(94,58,98,.12); }
.login-panel button { border: 0; border-radius: 12px; padding: 13px; background: var(--plum); color: white; font-weight: 800; }
.form-error { min-height: 24px; color: var(--danger) !important; margin: 0 !important; }
.readiness-banner { padding: 14px 18px; margin-bottom: 18px; border-radius: 14px; background: #fff0d9; border: 1px solid #e9cfaa; line-height: 1.8; }
.readiness-banner.is-ready { background: #e8f4ed; border-color: #c0dccc; }
.metrics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.metrics article { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.metrics span { color: var(--muted); font-size: .78rem; }
.metrics strong { display: block; font-size: 2rem; margin-top: 8px; }
.metrics .metric-alert strong { color: var(--danger); }
.tabs { display: flex; gap: 8px; margin: 28px 0 14px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); padding: 12px 18px; }
.tabs button.is-active { color: var(--ink); border-color: var(--coral); font-weight: 800; }
.data-panel { display: none; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.data-panel.is-active { display: block; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 4px 0 0; }
.record-list { display: grid; gap: 10px; padding: 16px; }
.record { display: grid; grid-template-columns: 1fr auto; gap: 16px; border: 1px solid var(--line); border-radius: 15px; padding: 16px; }
.record h3 { margin: 0 0 8px; font-size: 1rem; }
.record p { margin: 5px 0; color: var(--muted); line-height: 1.7; }
.record-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: .76rem; color: var(--muted); }
.priority { border-radius: 999px; padding: 4px 9px; background: #f0ece8; }
.priority.urgent { background: #fde2e2; color: var(--danger); }
.record-actions { display: flex; flex-direction: column; gap: 8px; min-width: 130px; }
.record-actions select, .record-actions button { border: 1px solid var(--line); border-radius: 10px; padding: 9px; background: white; }
.record-actions button { background: var(--plum); color: white; border-color: var(--plum); }
.empty-state { text-align: center; color: var(--muted); padding: 48px 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: right; padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: .85rem; }
th { color: var(--muted); background: #fbf8f4; }
.status { display: inline-flex; border-radius: 999px; padding: 4px 9px; background: #e8f4ed; color: #30694a; }
.admin-toast { position: fixed; inset: auto 50% 22px auto; transform: translateX(50%) translateY(30px); background: var(--ink); color: white; padding: 12px 18px; border-radius: 12px; opacity: 0; pointer-events: none; transition: .2s; }
.admin-toast.is-visible { opacity: 1; transform: translateX(50%) translateY(0); }
.legal-shell { width: min(800px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 70px; }
.legal-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 6vw, 52px); margin-top: 24px; }
.legal-card h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin: 10px 0; }
.legal-card h2 { margin-top: 36px; }
.legal-card p, .legal-card li { color: #514956; line-height: 2; }
.legal-card a { color: var(--plum); }
.legal-note { border-right: 4px solid var(--coral); background: #fff5ea; padding: 14px 18px; border-radius: 12px; }
.standalone-form { margin: 24px 0; max-width: none; grid-template-columns: .8fr 1.2fr; padding: 24px; }
.standalone-form > div:last-child { display: grid; gap: 9px; align-content: start; }
@media (max-width: 880px) { .metrics { grid-template-columns: repeat(3, 1fr); } .login-panel { grid-template-columns: 1fr; gap: 18px; margin-top: 4vh; } .standalone-form { margin-top: 24px; } }
@media (max-width: 560px) { .admin-shell { width: min(100% - 20px, 1180px); padding-top: 16px; } .admin-head { grid-template-columns: auto 1fr; } .admin-head .quiet-button { grid-column: 1 / -1; } .metrics { grid-template-columns: repeat(2, 1fr); } .record { grid-template-columns: 1fr; } .record-actions { flex-direction: row; } .record-actions > * { flex: 1; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
