:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #0f172a;
  background: #f3f6f7;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 20% 15%, #164e63 0, #0f172a 34%, #020617 100%);
}
.auth-panel { width: min(440px, 100%); background: #fff; border-radius: 26px; padding: 34px; box-shadow: 0 35px 90px #02061780; }
.brand-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: #2dd4bf; color: #042f2e; font-size: 23px; font-weight: 800; }
.brand-mark.small { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; }
.eyebrow { margin: 28px 0 8px; color: #0f766e; font-size: 13px; font-weight: 750; letter-spacing: .08em; }
.auth-panel h1 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.auth-copy { color: #64748b; line-height: 1.8; margin: 14px 0 24px; }
.form-stack { display: grid; gap: 16px; }
.form-stack label { display: grid; gap: 8px; font-size: 14px; font-weight: 650; }
.form-stack input { width: 100%; height: 48px; border: 1px solid #cbd5e1; border-radius: 12px; padding: 0 14px; outline: none; background: #fff; }
.form-stack input:focus { border-color: #14b8a6; box-shadow: 0 0 0 3px #14b8a61f; }
.primary, .secondary { border: 0; border-radius: 12px; font-weight: 700; }
.primary { height: 50px; background: #0f172a; color: #fff; }
.primary:hover { background: #1e293b; }
.secondary { padding: 10px 14px; background: #e2e8f0; color: #334155; white-space: nowrap; }
.notice { padding: 13px 14px; border: 1px solid #fde68a; border-radius: 12px; background: #fffbeb; color: #92400e; font-size: 14px; line-height: 1.55; }
.message { min-height: 22px; color: #be123c; font-size: 14px; }
.security-note { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid #e2e8f0; color: #94a3b8; font-size: 12px; }

.workspace { min-height: 100vh; display: grid; grid-template-columns: 255px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #020617; color: #e2e8f0; padding: 22px 16px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 22px; border-bottom: 1px solid #1e293b; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 5px; color: #64748b; font-size: 11px; }
.sidebar nav { display: grid; gap: 6px; margin-top: 24px; }
.sidebar nav button, .logout { height: 44px; border: 0; border-radius: 11px; text-align: left; padding: 0 13px; background: transparent; color: #94a3b8; }
.sidebar nav button:hover, .sidebar nav .nav-active { background: #134e4a55; color: #5eead4; }
.logout { margin-top: auto; border: 1px solid #334155; color: #cbd5e1; }

.content { min-width: 0; padding: 0 28px 42px; }
.content > header { height: 72px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e2e8f0; }
.content h2, .content p { margin: 0; }
.content header p { margin-top: 5px; color: #64748b; font-size: 13px; }
.identity { text-align: right; }
.identity strong, .identity span { display: block; }
.identity span { margin-top: 4px; color: #64748b; font-size: 12px; }
.context-bar { margin-top: 18px; display: grid; grid-template-columns: 150px minmax(190px, 1fr) minmax(190px, 1fr) minmax(250px, 1.25fr); gap: 12px; align-items: end; padding: 15px 17px; border: 1px solid #dbe4e8; border-radius: 16px; background: #fff; box-shadow: 0 7px 24px #0f172a08; }
.context-bar label { display: grid; gap: 6px; color: #64748b; font-size: 11px; font-weight: 750; letter-spacing: .03em; }
.context-bar select { width: 100%; height: 40px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 0 34px 0 11px; background: #f8fafc; color: #1e293b; outline: none; }
.context-bar select:focus { border-color: #14b8a6; box-shadow: 0 0 0 3px #14b8a619; }
.context-status { min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 11px; background: #f1f5f9; }
.context-status > span { flex: 0 0 auto; border-radius: 999px; padding: 5px 8px; background: #ccfbf1; color: #115e59; font-size: 11px; font-weight: 800; }
.context-status > span.fixture { background: #fef3c7; color: #92400e; }
.context-status small { color: #64748b; line-height: 1.4; }
.role-guide { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border: 1px solid #bae6fd; border-radius: 14px; background: #f0f9ff; color: #0c4a6e; }
.role-guide > div { display: grid; gap: 4px; }
.role-guide span { color: #475569; font-size: 13px; line-height: 1.5; }
.role-guide button { flex: 0 0 auto; border: 0; border-radius: 10px; padding: 10px 13px; background: #0f172a; color: #fff; font-weight: 750; }
.role-guide.role-reviewer { border-color: #99f6e4; background: #f0fdfa; color: #115e59; }
.view-panel { animation: panel-in .18s ease-out; }
@keyframes panel-in { from { opacity: .35; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.hero { margin-top: 26px; display: flex; justify-content: space-between; gap: 24px; padding: 30px; border-radius: 22px; background: #020617; color: #fff; box-shadow: 0 20px 48px #0f172a1c; }
.hero p { color: #5eead4; font-size: 14px; }
.hero h3 { margin: 15px 0 10px; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.04em; }
.hero span { color: #94a3b8; line-height: 1.65; }
.hero-action { display: block; margin-top: 20px; border: 1px solid #5eead4; border-radius: 11px; padding: 10px 14px; background: #134e4a; color: #ccfbf1; font-weight: 750; }
.hero-action:hover { background: #115e59; }
.hero-stat { min-width: 150px; display: grid; place-items: center; align-content: center; border: 1px solid #334155; border-radius: 18px; background: #ffffff08; }
.hero-stat b { font-size: 38px; color: #5eead4; }
.hero-stat small { margin-top: 4px; color: #94a3b8; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.metrics article, .reports-section, .audit-panel, .panel-card, .view-intro { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; box-shadow: 0 8px 28px #0f172a0a; }
.metrics article { padding: 20px; }
.metrics span, .metrics small { display: block; color: #64748b; }
.metrics b { display: block; margin: 10px 0 8px; font-size: 28px; }
.metrics small { font-size: 12px; line-height: 1.45; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 18px; margin-top: 18px; }
.panel-card, .reports-section, .audit-panel { padding: 22px; }
.reports-section, .audit-panel { margin-top: 18px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-title h3 { margin: 0; font-size: 18px; }
.section-title p { margin-top: 6px; color: #64748b; font-size: 13px; line-height: 1.5; }
.workflow-section { margin-top: 18px; }
.workflow-section .eyebrow { margin: 0 0 6px; }
.workflow-stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.workflow-stage { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; min-height: 185px; padding: 16px 13px; border: 1px solid #e2e8f0; border-radius: 15px; background: #f8fafc; }
.workflow-stage:not(:last-child)::after { content: ""; position: absolute; top: 31px; right: -11px; width: 11px; height: 2px; background: #cbd5e1; }
.stage-number { display: grid; place-items: center; align-self: start; width: 30px; height: 30px; border-radius: 50%; background: #e2e8f0; color: #334155; font-weight: 800; }
.stage-ok .stage-number { background: #d1fae5; color: #047857; }
.stage-progress .stage-number { background: #e0f2fe; color: #0369a1; }
.stage-warn .stage-number { background: #fef3c7; color: #b45309; }
.workflow-stage h4 { margin: 4px 0 7px; font-size: 14px; line-height: 1.35; }
.workflow-stage strong { font-size: 11px; }
.workflow-stage p { margin-top: 14px; color: #475569; font-size: 12px; line-height: 1.55; }
.workflow-stage small { display: block; margin-top: 9px; color: #94a3b8; font-size: 11px; line-height: 1.45; }
.view-intro { margin-top: 26px; padding: 26px; }
.view-intro .eyebrow { margin: 0 0 8px; }
.view-intro h3 { margin: 0 0 8px; font-size: 26px; }
.view-intro > p:last-child { color: #64748b; line-height: 1.65; }

.org-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 18px; }
.org-summary article { padding: 19px 20px; border: 1px solid #dfe7ea; border-radius: 17px; background: #fff; box-shadow: 0 8px 26px #0f172a08; }
.org-summary span, .org-summary small { display: block; color: #64748b; }
.org-summary span { font-size: 12px; font-weight: 700; }
.org-summary b { display: block; margin: 10px 0 7px; font-size: 20px; }
.org-summary small { font-size: 12px; line-height: 1.5; }
.org-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 18px; margin-top: 18px; }
.org-table { margin-top: 18px; overflow-x: auto; }
.org-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.org-table th, .org-table td { padding: 12px 10px; border-bottom: 1px solid #e2e8f0; text-align: left; white-space: nowrap; }
.org-table th { color: #64748b; background: #f8fafc; font-size: 11px; letter-spacing: .03em; }
.org-table td:first-child { font-weight: 750; color: #1e293b; }
.org-table .selected-row { background: #ecfdf5; }
.org-table .muted { color: #94a3b8; }
.rule-list { display: grid; gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.rule-list li { display: grid; gap: 5px; padding: 12px 13px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.rule-list b { font-size: 13px; }
.rule-list span { color: #64748b; font-size: 12px; line-height: 1.55; }
.fixture-notice { display: flex; gap: 12px; align-items: center; margin-top: 16px; padding: 13px 15px; border: 1px solid #fcd34d; border-radius: 13px; background: #fffbeb; color: #78350f; }
.fixture-notice span { font-size: 13px; line-height: 1.55; }

.review-hero { margin-top: 26px; display: flex; align-items: stretch; justify-content: space-between; gap: 22px; padding: 26px; border-radius: 20px; background: linear-gradient(135deg, #042f2e, #0f172a); color: #fff; box-shadow: 0 18px 42px #0f172a1a; }
.review-hero .eyebrow { margin: 0 0 8px; color: #5eead4; }
.review-hero h3 { margin: 0 0 9px; font-size: 27px; }
.review-hero p:last-child { max-width: 760px; color: #cbd5e1; line-height: 1.65; }
.review-stat { flex: 0 0 230px; display: grid; align-content: center; gap: 7px; padding: 18px; border: 1px solid #ffffff26; border-radius: 16px; background: #ffffff0d; }
.review-stat span, .review-stat small { color: #94a3b8; font-size: 12px; }
.review-stat b { color: #5eead4; font-size: 18px; }
.review-layout { display: grid; grid-template-columns: minmax(290px, .7fr) minmax(0, 1.3fr); gap: 18px; margin-top: 18px; }
.review-queue { display: grid; gap: 9px; margin-top: 18px; }
.review-task { width: 100%; display: grid; gap: 8px; border: 1px solid #e2e8f0; border-radius: 13px; padding: 14px; background: #f8fafc; color: #1e293b; text-align: left; }
.review-task:hover, .review-task.active { border-color: #14b8a6; background: #f0fdfa; box-shadow: 0 0 0 3px #14b8a612; }
.review-task-top { display: flex; justify-content: space-between; gap: 10px; }
.review-task-top b { font-size: 14px; }
.review-task-top strong, .review-task small { font-size: 11px; }
.review-task small { color: #64748b; line-height: 1.45; }
.run-error { margin: 8px 0 0; color: #b45309; line-height: 1.55; }
.run-retry { margin-left: auto; }
.review-detail { min-height: 430px; }
.review-detail-head { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid #e2e8f0; }
.review-detail-head .eyebrow { margin: 0 0 7px; }
.review-detail-head h3 { margin: 0; font-size: 23px; }
.review-detail-head p:last-child { margin-top: 8px; color: #64748b; line-height: 1.6; }
.review-status { flex: 0 0 auto; align-self: start; border-radius: 999px; padding: 7px 10px; background: #f1f5f9; font-size: 12px; }
.review-checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
.review-checks div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 13px; border: 1px solid #e2e8f0; border-radius: 11px; background: #f8fafc; font-size: 13px; }
.review-checks b { flex: 0 0 auto; }
.review-detail > h4 { margin: 21px 0 9px; }
.review-detail ul { margin: 0; padding-left: 20px; color: #475569; font-size: 13px; line-height: 1.75; }
.review-warning { margin-top: 18px; padding: 13px 14px; border: 1px solid #fcd34d; border-radius: 12px; background: #fffbeb; color: #92400e; font-size: 13px; line-height: 1.6; }
.review-record { display: grid; gap: 5px; margin-top: 14px; padding: 13px 14px; border: 1px solid #bae6fd; border-radius: 12px; background: #f0f9ff; }
.review-record b { color: #0c4a6e; font-size: 12px; }
.review-record span { color: #475569; font-size: 12px; line-height: 1.55; }
.review-comment { display: grid; gap: 7px; margin-top: 16px; color: #334155; font-size: 12px; font-weight: 750; }
.review-comment textarea { width: 100%; resize: vertical; border: 1px solid #cbd5e1; border-radius: 12px; padding: 11px 12px; background: #fff; color: #1e293b; font: inherit; font-weight: 400; line-height: 1.55; outline: none; }
.review-comment textarea:focus { border-color: #14b8a6; box-shadow: 0 0 0 3px #14b8a61f; }
.review-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.review-actions button:disabled { cursor: wait; opacity: .62; }
#createMonthlyRun:disabled, .run-retry:disabled { cursor: not-allowed; opacity: .6; filter: grayscale(.35); }
.run-activity { padding: 10px 12px; border-radius: 8px; background: #f1f5f9; color: #334155; line-height: 1.6; }
.compact-primary { height: auto; padding: 10px 14px; }
.empty-state { min-height: 330px; display: grid; place-items: center; align-content: center; gap: 8px; color: #64748b; text-align: center; }
.empty-state b { color: #334155; }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: min(420px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 13px; background: #0f172a; color: #fff; box-shadow: 0 16px 48px #02061755; font-size: 13px; line-height: 1.55; }

.source-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 18px; }
.source-card { padding: 20px; border: 1px solid #dfe7ea; border-radius: 17px; background: #fff; box-shadow: 0 8px 26px #0f172a08; }
.source-card h4 { margin: 0; font-size: 17px; }
.source-card p { display: grid; gap: 5px; margin-top: 18px; color: #475569; font-size: 13px; line-height: 1.5; }
.source-card p b { color: #94a3b8; font-size: 11px; letter-spacing: .06em; }
.monthly-run-panel { margin-top: 18px; }
.monthly-run-panel .section-title { align-items: flex-start; }
.run-help { display: flex; gap: 10px; margin-top: 16px; padding: 12px 14px; border: 1px solid #bae6fd; border-radius: 12px; background: #f0f9ff; color: #475569; font-size: 12px; line-height: 1.55; }
.run-help b { flex: 0 0 auto; color: #0c4a6e; }
.monthly-run-list { display: grid; gap: 12px; margin-top: 16px; }
.monthly-run-card { display: grid; gap: 13px; padding: 16px; border: 1px solid #e2e8f0; border-radius: 14px; background: #f8fafc; }
.monthly-run-head { display: flex; justify-content: space-between; gap: 14px; }
.monthly-run-head > div { display: grid; gap: 5px; min-width: 0; }
.monthly-run-head b { overflow-wrap: anywhere; font-size: 13px; }
.monthly-run-head small { color: #64748b; font-size: 11px; line-height: 1.45; }
.monthly-run-head > strong { flex: 0 0 auto; font-size: 12px; }
.run-source-list { display: flex; flex-wrap: wrap; gap: 7px; }
.run-source { border-radius: 999px; padding: 6px 9px; background: #e2e8f0; color: #475569; font-size: 11px; }
.source-ready, .source-available { background: #d1fae5; color: #047857; }
.source-waiting { background: #fef3c7; color: #92400e; }
.run-checks { padding-top: 11px; border-top: 1px solid #e2e8f0; color: #64748b; font-size: 12px; line-height: 1.6; }
.run-checks span { display: inline-block; margin-right: 14px; }
.run-artifacts { display: flex; flex-wrap: wrap; gap: 8px; }
.run-artifacts a { border-radius: 9px; padding: 8px 10px; background: #ccfbf1; color: #115e59; font-size: 12px; font-weight: 750; text-decoration: none; }
.run-artifacts span, .run-empty { color: #94a3b8; font-size: 12px; }
.run-empty { padding: 22px; border: 1px dashed #cbd5e1; border-radius: 12px; text-align: center; }

.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.report-card { display: flex; flex-direction: column; min-height: 255px; border: 1px solid #e2e8f0; border-radius: 15px; padding: 18px; background: #f8fafc; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-topline > span { color: #64748b; font-size: 12px; font-weight: 700; }
.card-topline strong, .voucher-card > span { font-size: 12px; font-weight: 750; }
.report-card h4 { margin: 16px 0 8px; font-size: 17px; }
.report-card p { color: #64748b; font-size: 13px; line-height: 1.65; }
.progress-track { height: 6px; margin-top: auto; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: #14b8a6; }
.card-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 13px; }
.card-actions small { color: #64748b; }
.detail-button { border: 0; background: transparent; color: #0f766e; font-weight: 750; }
.detail-button:hover { color: #134e4a; text-decoration: underline; }
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-group button { border: 1px solid #dbe4e8; border-radius: 999px; padding: 7px 11px; background: #fff; color: #64748b; font-size: 12px; }
.filter-group button.filter-active { border-color: #0f766e; background: #ccfbf1; color: #115e59; }
.tone-ok { color: #047857; }
.tone-progress { color: #0369a1; }
.tone-warn { color: #b45309; }

.exception-list { display: grid; gap: 10px; margin-top: 18px; }
.exception-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 15px 16px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; }
.exception-row h4 { margin: 0; font-size: 14px; }
.exception-row p { margin-top: 6px; color: #64748b; font-size: 12px; line-height: 1.55; }
.exception-row > small { color: #94a3b8; font-size: 11px; }
.priority { display: grid; place-items: center; width: 76px; height: 30px; border-radius: 9px; font-size: 11px; font-weight: 800; }
.priority.p0 { background: #ffe4e6; color: #be123c; }
.priority.p1 { background: #fef3c7; color: #b45309; }
.compact .exception-row { padding: 12px; }
.compact .exception-row:nth-child(n+4) { display: none; }

.flow-list { display: grid; gap: 7px; padding: 0; margin: 18px 0 0; list-style: none; }
.flow-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 11px; align-items: start; }
.flow-list li > span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #ccfbf1; color: #115e59; font-size: 12px; font-weight: 800; }
.flow-list b { font-size: 13px; }
.flow-list p { margin-top: 3px; color: #64748b; font-size: 11px; line-height: 1.45; }

.voucher-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.voucher-card { min-height: 260px; padding: 23px; border: 1px solid #e2e8f0; border-radius: 18px; background: #fff; }
.voucher-card.featured { background: #082f49; color: #fff; }
.voucher-card h4 { margin: 14px 0 10px; font-size: 19px; }
.voucher-card p { color: #cbd5e1; line-height: 1.7; }
.voucher-card > strong { display: block; margin-top: 24px; font-size: 36px; color: #5eead4; }
.voucher-card > small { color: #94a3b8; }
.voucher-card ul { display: grid; gap: 11px; padding-left: 20px; color: #475569; font-size: 13px; line-height: 1.5; }

.audit-list { display: grid; gap: 8px; margin-top: 16px; }
.audit-row { display: grid; grid-template-columns: 190px 1fr 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e2e8f0; font-size: 13px; }
.audit-row span { color: #64748b; }

.report-dialog { width: min(600px, calc(100% - 30px)); border: 0; border-radius: 22px; padding: 28px; box-shadow: 0 30px 90px #02061755; }
.report-dialog::backdrop { background: #02061799; backdrop-filter: blur(3px); }
.report-dialog form { float: right; }
.dialog-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f1f5f9; color: #475569; font-size: 24px; line-height: 1; }
.report-dialog .eyebrow { margin: 2px 0 8px; }
.report-dialog h3 { margin: 0; font-size: 26px; }
.dialog-status { margin-top: 14px; font-weight: 750; }
.detail-list { display: grid; gap: 14px; margin: 24px 0 0; }
.detail-list div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 14px; padding-top: 13px; border-top: 1px solid #e2e8f0; }
.detail-list dt { color: #94a3b8; font-size: 12px; font-weight: 750; }
.detail-list dd { margin: 0; color: #334155; font-size: 14px; line-height: 1.65; }

@media (max-width: 1080px) {
  .source-grid, .report-grid, .voucher-summary { grid-template-columns: repeat(2, 1fr); }
  .split-grid, .org-layout { grid-template-columns: 1fr; }
  .workflow-stages { grid-template-columns: repeat(3, 1fr); }
  .workflow-stage::after { display: none; }
  .context-bar { grid-template-columns: repeat(3, 1fr); }
  .context-status { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .workspace { display: block; }
  .sidebar { position: static; height: auto; padding: 14px; }
  .brand { padding-bottom: 14px; }
  .sidebar nav { display: flex; gap: 7px; margin-top: 12px; overflow-x: auto; padding-bottom: 2px; }
  .sidebar nav button { flex: 0 0 auto; height: 38px; }
  .logout { position: absolute; right: 14px; top: 16px; width: auto; height: 38px; }
  .content { padding: 0 16px 30px; }
  .content > header { height: 66px; }
  .content header p { display: none; }
  .context-bar { grid-template-columns: 1fr 1fr; }
  .context-status { grid-column: 1 / -1; }
  .hero { padding: 22px; display: block; }
  .hero-stat { margin-top: 20px; min-height: 100px; }
  .review-hero { display: block; }
  .review-stat { margin-top: 18px; }
  .review-layout { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .audit-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .auth-panel { padding: 26px 22px; border-radius: 22px; }
  .auth-panel h1 { font-size: 26px; }
  .content { padding: 0 12px 24px; }
  .hero { margin-top: 16px; border-radius: 18px; }
  .hero h3 { line-height: 1.3; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metrics article { padding: 16px; }
  .metrics b { font-size: 22px; }
  .source-grid, .report-grid, .voucher-summary { grid-template-columns: 1fr; }
  .role-guide { align-items: flex-start; flex-direction: column; }
  .workflow-stages { grid-template-columns: 1fr; }
  .workflow-stage { min-height: auto; }
  .review-checks { grid-template-columns: 1fr; }
  .review-detail-head { flex-direction: column; }
  .review-actions { flex-direction: column-reverse; }
  .review-actions button { width: 100%; }
  .context-bar, .org-summary { grid-template-columns: 1fr; }
  .context-status { grid-column: auto; }
  .reports-section, .audit-panel, .panel-card, .view-intro { padding: 17px; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .exception-row { grid-template-columns: 34px minmax(0, 1fr); }
  .exception-row > small { grid-column: 2; }
  .filter-group { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .detail-list div { grid-template-columns: 1fr; gap: 4px; }
  .fixture-notice { align-items: flex-start; flex-direction: column; }
}

[hidden] { display: none !important; }
