:root {
  color-scheme: light dark;
  --ink: #132f46;
  --muted: #526575;
  --surface: #ffffff;
  --surface-soft: #eef6fd;
  --canvas: #f7fafc;
  --line: #cfdae3;
  --brand: #22577a;
  --brand-dark: #0b3854;
  --accent: #4ea550;
  --accent-soft: #e8f5e8;
  --warning-soft: #fff6d9;
  --shadow: 0 18px 45px rgba(16, 47, 70, 0.10);
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: inherit; }
.site-header { min-height: 78px; padding: 12px max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand img { display: block; width: 176px; max-height: 54px; object-fit: contain; }
.product-label { margin: 0; color: var(--muted); font-weight: 750; }
main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero { padding: clamp(64px, 9vw, 116px) 0 58px; max-width: 850px; }
.eyebrow { margin: 0 0 8px; color: var(--brand); font-size: .78rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { margin: 0; font-size: clamp(2.6rem, 7vw, 5.8rem); line-height: .98; letter-spacing: -.045em; }
h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.55rem); line-height: 1.08; }
h3 { margin: 0; font-size: 1.45rem; }
.hero-copy { max-width: 720px; margin: 24px 0 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); }
.notice { margin-bottom: 24px; padding: 16px 18px; border: 1px solid #ddb84d; border-radius: 12px; background: var(--warning-soft); color: #624900; }
.notice.error { border-color: #bd6a6a; background: #fff0f0; color: #761d1d; }
.login-panel, .workspace-heading, .state-card, .pending-card, .operations-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.login-panel { margin-bottom: 96px; padding: clamp(26px, 5vw, 52px); display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.login-panel p { color: var(--muted); }
form { display: grid; gap: 10px; }
label { font-weight: 750; }
input, select { width: 100%; min-height: 48px; margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); color: var(--ink); font: inherit; }
button, .primary-link { min-height: 46px; padding: 11px 20px; border: 0; border-radius: 100px; background: var(--brand); color: white; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button:hover, .primary-link:hover { background: var(--brand-dark); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #7ab7dd; outline-offset: 3px; }
.secondary-button { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.form-message { min-height: 1.5em; margin: 4px 0 0; color: #851f1f !important; }
.form-message.success { color: #235e2c !important; }
.workspace-heading { padding: 26px 30px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.workspace-heading p { margin: 8px 0 0; color: var(--muted); }
.section-heading { padding: 72px 0 24px; display: flex; justify-content: space-between; align-items: end; gap: 32px; }
.section-heading > p { max-width: 480px; margin: 0; color: var(--muted); }
.section-heading.compact { padding-top: 54px; }
.operations-copy { max-width: 500px; }
.operations-copy p { margin: 0; color: var(--muted); }
.operations-generated { margin-top: 4px !important; font-size: .86rem; }
.operations-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 16px; }
.operations-card { padding: 20px 22px; box-shadow: none; }
.operations-card-heading, .operations-jobs li { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.status-badge { padding: 5px 10px; border-radius: 100px; background: var(--accent-soft); color: #235e2c; font-size: .78rem; font-weight: 850; }
.status-attention .status-badge, .status-delayed .status-badge, .status-setup_incomplete .status-badge { background: var(--warning-soft); color: #765900; }
.operations-jobs { margin: 16px 0 0; padding: 0; list-style: none; }
.operations-jobs li { padding: 7px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; text-transform: capitalize; }
.operations-jobs strong { color: var(--ink); font-size: .78rem; }
.admin-readiness-reminder { margin: 16px 0 0; padding: 9px 11px; border: 1px solid #ddb84d; border-radius: 10px; background: var(--warning-soft); color: #624900; font-size: .82rem; font-weight: 800; }
.state-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.state-card { min-height: 280px; padding: 28px; display: flex; flex-direction: column; }
.state-card::before { content: ""; display: block; width: 46px; height: 5px; margin-bottom: 24px; border-radius: 5px; background: var(--accent); }
.state-meta { margin: 10px 0 22px; color: var(--muted); }
.tag-list { margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.tag { padding: 5px 10px; border-radius: 100px; background: var(--surface-soft); color: var(--brand-dark); font-size: .83rem; font-weight: 750; }
.tag.admin { background: var(--accent-soft); color: #235e2c; }
.state-card .primary-link { margin-top: auto; width: 100%; }
.pending-grid { display: grid; gap: 14px; }
.pending-card { padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; box-shadow: none; }
.pending-card p { margin: 4px 0 0; color: var(--muted); }
.pending-card a { color: var(--brand); font-weight: 800; }
.admin-drawer { margin: 72px 0 0; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); overflow: clip; }
.admin-drawer > summary { padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; cursor: pointer; list-style: none; }
.admin-drawer > summary::-webkit-details-marker { display: none; }
.admin-drawer > summary strong { display: block; font-size: 1.35rem; }
.drawer-hint { color: var(--brand); font-weight: 800; }
.admin-drawer[open] .drawer-hint { font-size: 0; }
.admin-drawer[open] .drawer-hint::after { content: "Close controls"; font-size: 1rem; }
.admin-drawer-body { padding: 0 28px 30px; border-top: 1px solid var(--line); }
.admin-intro { max-width: 780px; padding: 28px 0 20px; }
.admin-intro p { margin: 10px 0 0; color: var(--muted); }
.admin-form { max-width: 680px; padding: 24px; border-radius: 16px; background: var(--surface-soft); }
.admin-list-heading { margin-top: 34px; display: grid; grid-template-columns: 1fr auto minmax(160px, 220px); align-items: center; gap: 14px; }
.admin-list-heading label { color: var(--muted); }
.admin-list-heading select { margin: 0; }
.admin-list { margin-top: 16px; display: grid; gap: 12px; }
.admin-card { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: 15px; }
.admin-card h4 { margin: 0; font-size: 1.05rem; }
.admin-card p { margin: 3px 0 0; }
.admin-email { color: var(--ink); }
.admin-audit, .empty-state { color: var(--muted); font-size: .86rem; }
.compact-button { min-height: 38px; padding: 8px 16px; }
.danger-button { background: transparent; color: #8a2525; border: 1px solid #b96565; }
.danger-button:hover { background: #8a2525; color: white; }
footer { margin-top: 100px; padding: 32px 20px; background: var(--brand-dark); color: #edf7fc; text-align: center; }
footer p { margin: 0; }
@media (max-width: 720px) {
  main { width: min(100% - 28px, 1180px); }
  .site-header { min-height: 68px; padding: 10px 16px; }
  .brand img { width: 142px; }
  .product-label { max-width: 120px; font-size: .78rem; text-align: right; }
  .hero { padding: 48px 0 38px; }
  .login-panel { grid-template-columns: 1fr; gap: 24px; margin-bottom: 58px; }
  .workspace-heading, .section-heading, .pending-card { align-items: stretch; flex-direction: column; }
  .workspace-heading .secondary-button { width: 100%; }
  .section-heading { padding-top: 54px; }
  .state-grid { grid-template-columns: 1fr; }
  .operations-grid { grid-template-columns: 1fr; }
  .admin-drawer > summary, .admin-card { align-items: stretch; flex-direction: column; }
  .admin-list-heading { grid-template-columns: 1fr; }
  .admin-list-heading label { margin-top: 6px; }
  .admin-card .danger-button { width: 100%; }
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #edf5fa; --muted: #b5c5d0; --surface: #162b3a; --surface-soft: #203f54; --canvas: #0d1c27; --line: #3c5668; --brand: #79bde3; --brand-dark: #4a9ac9; --accent-soft: #173d28; --warning-soft: #3b310f; --shadow: 0 18px 45px rgba(0, 0, 0, .22); }
  button, .primary-link { background: #286d96; }
  button:hover, .primary-link:hover { background: #3985b1; }
  .secondary-button { background: transparent; color: #a5d9f4; border-color: #79bde3; }
  .tag.admin { color: #aee8b6; }
  .status-badge { color: #aee8b6; }
  .status-attention .status-badge, .status-delayed .status-badge, .status-setup_incomplete .status-badge { color: #f4d77f; }
  .admin-readiness-reminder { color: #f4d77f; }
  .form-message.success { color: #aee8b6 !important; }
  .danger-button { color: #f2a5a5; border-color: #a85c5c; }
  footer { background: #07131b; }
}
