:root {
  color-scheme: light;
  --red: #c8102e;
  --red-dark: #930b21;
  --red-soft: #fff0f3;
  --ink: #17191d;
  --muted: #60656e;
  --line: #bcc2ca;
  --panel: #ffffff;
  --canvas: #e7e8eb;
  --shadow: 0 12px 35px rgba(29, 33, 41, .09);
  --radius: 15px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100%; color: var(--ink); font: 16px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--red-dark); }
h1, h2, h3, p { margin-top: 0; }
h1 { letter-spacing: -.035em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }

.staff-shell { max-width: 920px; margin: 0 auto; padding: 30px 18px 70px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.staff-title { display: flex; align-items: center; justify-content: flex-start; gap: 18px; margin: 0 0 22px; }
.staff-title h1 { margin: 0; font-size: clamp(29px, 5vw, 44px); }
.staff-title img { width: auto; height: clamp(40px, 7vw, 58px); object-fit: contain; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; background: var(--red); color: #fff; font-weight: 900; font-size: 22px; box-shadow: 0 6px 16px rgba(200,16,46,.25); }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.brand-sub { color: var(--muted); font-size: 13px; }
.hero { margin-bottom: 22px; }
.policy-page { max-width: 820px; }
.policy-page h1 { margin-bottom: 14px; font-size: clamp(29px, 5vw, 42px); }
.policy-page h2 { margin: 26px 0 8px; font-size: 19px; }
.policy-page p { max-width: 70ch; }
.hero h1 { margin-bottom: 6px; font-size: clamp(29px, 5vw, 44px); }
.hero p { color: var(--muted); font-size: 17px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 4vw, 28px); margin-bottom: 18px; }
.staff-shell .card { border: 2px solid #969fa9; box-shadow: 0 8px 23px rgba(29, 33, 41, .10); }
.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-number { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-right: 7px; color: #fff; background: var(--red); border-radius: 50%; font-size: 14px; vertical-align: 2px; }
.urgent-always { margin: -10px 0 22px; color: var(--red-dark); font-size: 14px; text-align: left; }
.urgent-guidance { margin-top: 18px; padding: 18px; border: 2px solid var(--red); border-radius: 12px; background: linear-gradient(135deg, #fff, var(--red-soft)); }
.urgent-guidance p:last-child { margin-bottom: 0; line-height: 1.5; }
.urgent-copy { margin-bottom: 10px; font-size: 18px; font-weight: 750; color: var(--red-dark); }
.known-card { border-left: 5px solid var(--red); }
.known-card .instruction { color: var(--ink); font-size: 18px; font-weight: 650; }
.known-before { font-size: 21px; color: var(--red-dark); font-weight: 850; }
.known-list { display: grid; gap: 10px; margin-top: 16px; }
.known-item { min-width: 0; max-width: 100%; overflow: hidden; padding: 14px; border: 1px solid #efb8c3; border-radius: 11px; background: #fff; color: var(--ink); }
.known-open { display: block; width: 100%; min-width: 0; max-width: 100%; padding: 0; text-align: left; border: 0; background: transparent; color: inherit; }
.known-open:hover strong { color: var(--red-dark); }
.known-item strong, .known-item span { display: block; }
.known-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.known-item span { color: var(--muted); margin-top: 2px; }
.known-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.supply-level-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.supply-level-grid .field { margin: 0; }
.supply-level-grid .field label { display: block; min-height: 20px; }
.drawer #supply-item-form > .field-grid, .drawer [data-bulk-fields] .field-grid { align-items: start; }
.drawer #supply-item-form > .field-grid .field, .drawer [data-bulk-fields] .field-grid .field { margin: 0; }
.drawer #supply-item-form > .field-grid .field label, .drawer [data-bulk-fields] .field-grid .field label { display: block; min-height: 20px; }
.supply-delete-zone { margin-top: 30px; text-align: center; }
.supply-delete-link { border: 0; background: transparent; color: #fff; font: inherit; font-size: 12px; text-decoration: underline; opacity: .72; cursor: pointer; padding: 4px 8px; }
.supply-delete-link:hover { opacity: 1; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
label, legend { font-weight: 750; }
.helper { margin: -1px 0 8px; color: var(--ink); font-size: 16px; }
.helper.strong { font-weight: 700; }
.helper-spacer { visibility: hidden; }
input, select, textarea { width: 100%; min-height: 46px; border: 1px solid #c6cad1; border-radius: 9px; padding: 10px 12px; color: var(--ink); background: #fff; }
textarea { min-height: 108px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid rgba(200,16,46,.18); border-color: var(--red); }
fieldset { border: 0; margin: 0; padding: 0; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label { display: block; min-height: 70px; border: 2px solid var(--line); border-radius: 11px; padding: 12px; background: #fff; }
.choice input:checked + label { border-color: var(--red); background: var(--red-soft); box-shadow: 0 0 0 2px rgba(200,16,46,.08); }
.choice small { display: block; color: var(--muted); font-weight: 500; margin-top: 2px; }
.upload-box { display: block; border: 2px dashed #b9bec6; border-radius: 12px; padding: 18px; text-align: center; background: #fafafa; }
.upload-box input { min-height: auto; border: 0; padding: 8px 0 0; }
.file-list { margin: 10px 0 0; color: var(--muted); }
.serial-reminder { margin-top: 14px; padding: 12px 14px; border: 1px solid #dfb52b; border-radius: 9px; background: #fff4bd; color: #584400; line-height: 1.4; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 45px; border: 0; border-radius: 9px; padding: 10px 17px; font-weight: 800; background: var(--red); color: #fff; }
.btn:hover { background: var(--red-dark); }
.btn.secondary { background: #eceef1; color: var(--ink); }
.btn.secondary:hover { background: #dfe2e7; }
.btn.ghost { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.btn.danger { background: #9f1239; }
.btn:disabled { opacity: .55; cursor: wait; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.success { text-align: center; padding: 48px 24px; }
.success-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; color: #fff; background: #198754; font-size: 34px; font-weight: 900; }

.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(16,18,22,.6); }
.modal { width: min(620px, 100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 25px 70px rgba(0,0,0,.28); }
.modal-head { display: flex; justify-content: space-between; gap: 12px; }
.icon-btn { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: #eceef1; font-size: 20px; }

.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 16px; background: #17191d; color: #fff; }
.sidebar .brand { padding: 0 7px 18px; border-bottom: 1px solid #33363d; }
.sidebar .brand-sub { color: #b9bec7; }
.nav { display: grid; gap: 6px; margin-top: 22px; }
.portal-switch { display: grid; gap: 6px; margin: 18px 7px 0; color: #b9bec7; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.portal-switch select { min-height: 40px; border: 1px solid #454a54; border-radius: 8px; padding: 0 10px; color: #fff; background: #252930; font: inherit; letter-spacing: 0; text-transform: none; }
.nav button { display: flex; align-items: center; width: 100%; padding: 12px 13px; border: 2px solid transparent; border-radius: 9px; text-align: left; color: #d9dce2; background: transparent; font-size: 16px; font-weight: 700; }
.nav button:hover, .nav button.active { color: #fff; background: #30333a; }
.nav button.active { border-color: #e04a61; }
.action-nav-flag { width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: #df3651; box-shadow: 0 0 0 3px rgba(223,54,81,.18); }
.sidebar-foot { position: absolute; left: 16px; right: 16px; bottom: 20px; color: #c5c8cf; }
.sidebar-role { margin-top: 2px; color: #aeb4be; font-size: 13px; }
.admin-head-actions { display: flex; align-items: center; gap: 9px; }
.theme-toggle { min-height: 40px; padding: 8px 12px; }
.admin-main { min-width: 0; padding: 27px clamp(18px, 3vw, 38px) 60px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 23px; }
.admin-head h1 { margin: 0; font-size: clamp(27px, 4vw, 38px); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 19px; }
.stat { padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.stat span { color: var(--muted); font-weight: 650; }
.stat strong { display: block; margin-top: 3px; font-size: 29px; }
.supply-status-card { width: 100%; border: 1px solid var(--line); text-align: left; font: inherit; cursor: pointer; }
.supply-status-card.stocked { background: #ecfdf3; border-color: #6bc996; }
.supply-status-card.stocked strong { color: #167348; }
.supply-status-card.attention { background: #fff4f5; border-color: #e88a99; }
.supply-status-card.attention strong { color: #a51e35; }
.filters { display: grid; grid-template-columns: minmax(190px, 1fr) repeat(3, minmax(130px, .45fr)); gap: 10px; margin-bottom: 14px; }
.table-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.admin-main .card, .admin-main .stat, .admin-main .table-card, .drawer { border-width: 2px; border-color: #969fa9; }
.ticket-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.ticket-table th { padding: 13px 14px; color: var(--muted); background: #f8f9fa; text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.ticket-table td { padding: 15px 14px; border-top: 1px solid #eceef1; vertical-align: top; }
.ticket-table tr[data-id] { cursor: pointer; }
.ticket-table tr[data-id]:hover { background: #fff8f9; }
.ticket-item { font-weight: 800; }
.ticket-problem { max-width: 430px; color: var(--muted); margin-top: 3px; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; font-size: 13px; font-weight: 800; background: #eceef1; white-space: nowrap; }
.pill.urgent, .pill.new { color: #9b0b24; background: #ffe5ea; }
.pill.completed, .pill.closed { color: #17633a; background: #dff6e8; }
.pill.scheduled { color: #755400; background: #fff2c7; }
.drawer-backdrop { position: fixed; z-index: 20; inset: 0; background: rgba(20,22,26,.42); }
.drawer { position: fixed; z-index: 21; top: 0; right: 0; width: min(680px, 100%); height: 100vh; overflow: auto; background: #fff; box-shadow: -20px 0 60px rgba(0,0,0,.18); padding: 23px; }
.drawer-head { display: flex; justify-content: space-between; gap: 15px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin-bottom: 3px; font-size: 27px; }
.ticket-number { color: var(--muted); }
.detail-section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.detail-section h3 { font-size: 17px; margin-bottom: 11px; }
.planning-details { border: 1px solid var(--line); border-radius: 10px; padding: 0 15px; background: #fafafa; }
.planning-details summary { cursor: pointer; padding: 14px 0; font-weight: 800; }
.planning-details p { color: var(--muted); }
.known-check { display: flex; align-items: center; gap: 10px; padding: 12px 0; font-weight: 800; }
.known-check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--red); }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.meta-box { padding: 12px; border-radius: 9px; background: #f6f7f9; }
.meta-box span { display: block; color: var(--muted); font-size: 13px; font-weight: 650; }
.meta-box strong { display: block; margin-top: 2px; }
.activity { display: grid; gap: 9px; }
.activity-item { padding-left: 13px; border-left: 3px solid #d9dce1; }
.activity-item p { margin-bottom: 2px; }
.activity-item time { color: var(--muted); font-size: 13px; }
.media-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.media-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.media-card img, .media-card video { width: 100%; height: 165px; object-fit: cover; border-radius: 7px; background: #111; }
.media-name { margin-top: 7px; word-break: break-word; font-size: 14px; }
.empty { padding: 35px; text-align: center; color: var(--muted); }
.report-grid, .location-grid, .settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.section-heading p, .module-list { color: var(--muted); font-size: 14px; }
.supply-club-select { min-width: 180px; margin: 0; font-size: 13px; }
.supply-club-select select { margin-top: 5px; }
.supply-dashboard-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 15px; margin-bottom: 18px; }
.supply-dashboard-top .supply-status-card { width: 100%; margin: 0; }
.supply-form-launches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.supply-form-launches .btn { display: flex; align-items: center; justify-content: center; margin: 0; min-height: 58px; text-align: center; }
.supply-form-launches .powell-supply-launch { border-color: var(--red); color: var(--red); }
.supply-send-list { display: grid; gap: 12px; margin-top: 22px; }
.supply-history-list { display: grid; gap: 12px; margin-top: 14px; }
.supply-history-card { padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.supply-history-card summary { list-style: none; }
.supply-history-card summary::-webkit-details-marker { display: none; }
.supply-history-card summary strong { display: block; margin-bottom: 4px; }
.supply-send-card { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(115px,.65fr) minmax(100px,.55fr) minmax(150px,.75fr); gap: 16px; align-items: end; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.supply-send-card h3 { margin: 0 0 4px; font-size: 16px; }
.supply-send-card p { margin: 0; }
.supply-send-powell { font-weight: 700; padding-bottom: 12px; }
.supply-send-needed { font-weight: 700; padding-bottom: 12px; }
.order-tracking-list { display: grid; gap: 8px; margin-top: 12px; }
.order-tracking-row { display: flex; align-items: center; gap: 10px; margin: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; }
.order-tracking-row input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }
.order-tracking-row small { display: block; margin-top: 2px; color: var(--muted); font-weight: 500; }
.rage-add-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(150px, .7fr) auto; gap: 11px; align-items: end; margin: 18px 0; }
.class-schedule-form { display: grid; gap: 12px; margin: 18px 0; }
.schedule-top-row, .schedule-details-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.schedule-top-row .field, .schedule-details-row .field, .schedule-alternate-row .field { margin-bottom: 0; }
.schedule-top-row .field:first-child { transform: translateY(24px); }
.schedule-alternate-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.alternating-field[hidden] { display: none !important; }
.schedule-toggle { width: fit-content; }
.class-schedule-form .form-actions { margin: 0; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr 40px; gap: 9px; align-items: center; margin: 10px 0; }
.bar { height: 10px; overflow: hidden; background: #eceef1; border-radius: 999px; }
.bar i { display: block; height: 100%; background: var(--red); border-radius: inherit; }
.login-shell { display: grid; min-height: 100vh; place-items: center; padding: 20px; background: radial-gradient(circle at 70% 15%, #fff0f3, transparent 35%), var(--canvas); }
.login-card { width: min(450px, 100%); }
.error { padding: 10px 12px; color: #8c1028; background: #ffe8ed; border-radius: 8px; margin-bottom: 12px; }
.toast { position: fixed; z-index: 100; right: 18px; bottom: 18px; max-width: 420px; padding: 13px 16px; color: #fff; background: #202329; border-radius: 10px; box-shadow: var(--shadow); }
.mobile-menu { display: none; align-items: center; justify-content: center; padding: 0; line-height: 1; }
.hamburger-lines { display: grid; gap: 3px; width: 17px; }
.hamburger-lines i { display: block; width: 17px; height: 2px; border-radius: 999px; background: currentColor; }
.approval-types { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.approval-type { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 7px; color: #8a1730; background: #ffe2e8; font-size: 12px; font-weight: 800; }

.routine-tabs { display: flex; gap: 8px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.routine-tabs button { position: relative; padding: 11px 14px; border: 0; border-bottom: 3px solid transparent; color: var(--muted); background: transparent; font-weight: 800; }
.routine-tabs button.active { color: var(--ink); border-bottom-color: var(--red); }
.routine-badge { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 5px; border-radius: 99px; color: #fff; background: var(--red); font-size: 12px; vertical-align: 1px; }
.solution-alert { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 18px 20px; border: 2px solid var(--red); border-radius: 13px; background: #fff0f3; color: #6e091c; }
.solution-alert strong { font-size: 18px; }
.solution-alert p { margin: 5px 0 0; }
.routine-filters { grid-template-columns: minmax(170px, .35fr) auto; align-items: center; }
.routine-toggle { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-weight: 700; }
.routine-toggle input { width: 19px; min-height: 19px; accent-color: var(--red); }
.routine-summary { margin: 0 0 10px; color: var(--muted); font-weight: 700; }
.routine-actions { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.routine-status { display: inline-flex; border-radius: 999px; padding: 4px 9px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.routine-status.overdue { color: #99142b; background: #ffe0e6; }
.routine-status.due { color: #735300; background: #fff0bf; }
.routine-status.upcoming { color: #21577c; background: #e2f2ff; }
.routine-status.later, .routine-status.ok { color: #17633a; background: #dff6e8; }
.versa-club { margin: 22px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.versa-club h3 { margin-bottom: 10px; }
.versa-row { display: grid; grid-template-columns: minmax(160px, 1fr) 135px 135px auto; gap: 10px; align-items: end; margin: 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafafa; }
.versa-row label { display: grid; gap: 5px; color: var(--muted); font-size: 13px; }
.versa-row input { min-height: 40px; }
.muted { color: var(--muted); }
.routine-manager { width: min(1100px, 100%); }
.routine-manager-row { display: grid; grid-template-columns: minmax(200px, 1.5fr) 115px 190px 110px auto; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.routine-manager-row input, .routine-manager-row select { min-height: 40px; }
.routine-manager-row .routine-toggle { font-size: 13px; white-space: nowrap; }
.routine-manager-row .routine-toggle input { width: 55px; }

/* Admin theme. */
body.admin-dark { --ink: #f1f3f6; --muted: #b5bac5; --line: #434a57; --panel: #1f242c; --canvas: #13161b; --shadow: 0 14px 36px rgba(0,0,0,.30); background: var(--canvas); }
.admin-dark .admin-main { background: radial-gradient(circle at 86% 3%, rgba(200,16,46,.12), transparent 28%), var(--canvas); }
.admin-dark .sidebar { background: #0d1015; border-right: 1px solid #303641; }
.admin-dark .sidebar .brand { border-color: #303641; }
.admin-dark .portal-switch select { border-color: #4a5361; background: #1b2027; }
.admin-dark .nav button { color: #c0c6d0; }
.admin-dark .nav button:hover, .admin-dark .nav button.active { color: #fff; background: #242a34; }
.admin-dark .card, .admin-dark .stat, .admin-dark .table-card, .admin-dark .drawer, .admin-dark .modal { background: #1f242c; border-color: #596372; }
.admin-dark .ticket-table th { background: #252b34; color: #c8cdd6; }
.admin-dark .ticket-table td, .admin-dark .drawer-head, .admin-dark .detail-section { border-color: #3c4350; }
.admin-dark .ticket-table tr[data-id]:hover { background: #2a2025; }
.admin-dark .meta-box { background: #292f39; }
.admin-dark .planning-details { background: #252b34; border-color: #434a57; }
.admin-dark input, .admin-dark select, .admin-dark textarea { background: #171b21; border-color: #555d6b; color: #f4f5f7; }
.admin-dark .btn.secondary, .admin-dark .icon-btn { background: #303743; color: #f4f5f7; }
.admin-dark .btn.ghost { background: transparent; color: #f4f5f7; border-color: #565e6d; }
.admin-dark .supply-form-launches .powell-supply-launch { background: #c8102e; border-color: #c8102e; color: #fff; }
.admin-dark .pill { background: #343b47; color: #e4e7eb; }
.admin-dark .pill.urgent, .admin-dark .pill.new { color: #ffd8df; background: #681b2a; }
.admin-dark .pill.completed, .admin-dark .pill.closed { color: #cef3dc; background: #1a5435; }
.admin-dark .pill.scheduled { color: #ffeab3; background: #70551c; }
.admin-dark .approval-type { color: #ffd4dc; background: #682033; }
.admin-dark .activity-item { border-left-color: #c8102e; }
.admin-dark .bar { background: #3a414c; }
.admin-dark .error { color: #ffd8df; background: #54202a; }
.admin-dark .drawer-backdrop { background: rgba(0,0,0,.62); }
.admin-dark .solution-alert { color: #ffd6de; background: #4d1722; border-color: #de4660; }
body.staff-dark { --ink: #f1f3f6; --muted: #b5bac5; --line: #434a57; --panel: #1f242c; --canvas: #13161b; --shadow: 0 14px 36px rgba(0,0,0,.30); background: radial-gradient(circle at 86% 3%, rgba(200,16,46,.12), transparent 28%), var(--canvas); background-attachment: fixed; }
.staff-dark .staff-title img { filter: brightness(0) invert(1); }
.staff-dark .urgent-always, .staff-dark .known-before, .staff-dark a { color: #ff8491; }
.staff-dark .staff-shell .card { border-color: #596372; }
.staff-dark .known-card { border-left-color: var(--red); }
.staff-dark .known-card .instruction, .staff-dark .known-item { color: var(--ink); }
.staff-dark .known-item { background: #171b21; border-color: #555d6b; }
.staff-dark .known-open:hover strong { color: #ff8491; }
.staff-dark input, .staff-dark select, .staff-dark textarea { background: #171b21; border-color: #555d6b; color: #f4f5f7; }
.staff-dark .choice label, .staff-dark .upload-box { background: #171b21; border-color: #555d6b; }
.staff-dark .choice input:checked + label { background: #4d1722; border-color: #de4660; }
.staff-dark .urgent-guidance { background: #4d1722; border-color: #de4660; }
.staff-dark .urgent-copy { color: #ffd6de; }
.staff-dark .serial-reminder { color: #ffe8a3; background: #3e3211; border-color: #ad8a1e; }
.staff-dark .btn.secondary { background: #303743; color: #f4f5f7; }
.staff-dark .btn.ghost { background: transparent; color: #f4f5f7; border-color: #565e6d; }
.staff-dark .modal { color: var(--ink); background: #1f242c; border: 1px solid #596372; }
.staff-dark .modal input, .staff-dark .modal textarea { background: #171b21; border-color: #555d6b; color: #f4f5f7; }
.staff-dark .modal .icon-btn { color: #f4f5f7; background: #303743; }
.rage-near-milestone td { color: #b42318; font-weight: 700; }
.rage-near-milestone .link-btn { color: #b42318; font-weight: 700; }
.admin-dark .rage-near-milestone td, .admin-dark .rage-near-milestone .link-btn { color: #ff8491; }
.admin-dark .versa-row { background: #252b34; border-color: #434a57; }
.filter-stock-club { margin-top: 26px; }
.filter-stock-club h3 { margin: 0 0 10px; }
.routine-club-line { display: flex; width: 100%; justify-content: space-between; gap: 12px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.routine-club-line:last-child { border-bottom: 0; }
.routine-club-line span { color: var(--muted); }
.routine-task-group { padding: 4px 0 10px; }
.routine-club-table { width: 100%; margin-top: 10px; border-collapse: collapse; }
.routine-club-table th, .routine-club-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.routine-club-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.routine-club-table .routine-club-line { display: table-row; width: auto; padding: 0; background: transparent; cursor: pointer; }
.routine-club-table .routine-club-line:hover td { background: rgba(200,16,46,.06); }

@media (max-width: 860px) {
  .admin-shell { display: block; }
  .sidebar { position: fixed; z-index: 40; left: -270px; width: 250px; transition: left .2s; }
  .sidebar.open { left: 0; }
  .mobile-menu { display: inline-flex; }
  .sidebar-close { position: absolute; top: 12px; right: 12px; align-items: center; justify-content: center; color: #fff; background: #303743; }
  .stats, .stats.rage-stats { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
  .rage-add-row { grid-template-columns: 1fr; }
  .schedule-top-row, .schedule-details-row, .schedule-alternate-row { grid-template-columns: 1fr; }
  .schedule-top-row .field:first-child { transform: none; }
  .ticket-table th:nth-child(3), .ticket-table td:nth-child(3), .ticket-table th:nth-child(5), .ticket-table td:nth-child(5) { display: none; }
  .versa-row { grid-template-columns: 1fr 1fr; }
  .versa-row strong { grid-column: 1 / -1; }
  .routine-manager-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .staff-shell { padding-top: 20px; }
  .field-grid, .supply-level-grid, .choice-row, .detail-meta, .report-grid, .location-grid, .settings-grid { grid-template-columns: 1fr; }
  .supply-send-card { grid-template-columns: 1fr; gap: 8px; }
  .supply-send-powell { padding-bottom: 0; }
  .supply-send-needed { padding-bottom: 0; }
  .supply-club-select { width: 100%; }
  .supply-dashboard-top { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .stats, .stats.rage-stats { grid-template-columns: 1fr 1fr; }
  .admin-main { padding: 18px 12px 50px; }
  .ticket-table { font-size: 15px; }
  .ticket-table th, .ticket-table td { padding: 12px 9px; }
  .ticket-table th:nth-child(2), .ticket-table td:nth-child(2) { display: none; }
  .media-grid { grid-template-columns: 1fr; }
  .staff-title { gap: 12px; }
  .admin-head-actions { gap: 6px; }
  .admin-head-actions .theme-toggle { font-size: 14px; }
  .solution-alert { align-items: flex-start; flex-direction: column; }
  .routine-filters { grid-template-columns: 1fr; }
  .versa-row { grid-template-columns: 1fr; }
}
