:root {
    --ink: #17332d;
    --muted: #6d7d77;
    --paper: #f5f0e7;
    --surface: #fffdf8;
    --line: #dcd7cd;
    --green: #1f5a4a;
    --green-soft: #dbe8df;
    --coral: #e7775d;
    --amber: #e9b654;
    --shadow: 0 18px 50px rgba(23, 51, 45, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
.site-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 12px clamp(20px, 4vw, 64px); background: rgba(245, 240, 231, .93); border-bottom: 1px solid rgba(23, 51, 45, .12); backdrop-filter: blur(14px); }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; color: #fff; background: var(--green); border-radius: 50% 50% 45% 48%; font-family: Georgia, serif; font-size: 24px; font-weight: 700; }
.brand strong, .brand small { display: block; line-height: 1.2; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.file-badge { max-width: 280px; overflow: hidden; padding: 6px 12px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
main { width: min(1440px, 100%); margin: 0 auto; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; border: 0; border-radius: 8px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--green); }
.button-primary:hover { background: #17483c; }
.button-subtle { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.button-large { width: 100%; min-height: 56px; margin-top: 18px; font-size: 16px; }
.eyebrow { margin: 0 0 12px; color: var(--coral); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.upload-layout { min-height: calc(100vh - 130px); display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(40px, 7vw, 110px); padding: 70px clamp(24px, 7vw, 110px); }
.upload-copy h1 { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(46px, 6vw, 84px); font-weight: 500; letter-spacing: -.05em; line-height: 1.08; }
.upload-copy h1 span { color: var(--coral); }
.lead { max-width: 640px; margin: 28px 0 36px; color: #4f625c; font-size: 17px; line-height: 1.9; }
.feature-list { display: grid; gap: 16px; max-width: 560px; margin: 0; padding: 0; list-style: none; }
.feature-list li { display: flex; gap: 16px; align-items: center; padding-top: 14px; border-top: 1px solid rgba(23,51,45,.15); }
.feature-list li > span { color: var(--coral); font-family: Georgia, serif; font-size: 14px; }
.feature-list strong, .feature-list small { display: block; }
.feature-list small { margin-top: 3px; color: var(--muted); }
.upload-card { padding: clamp(24px, 4vw, 44px); background: var(--surface); border: 1px solid rgba(23,51,45,.12); border-radius: 18px; box-shadow: var(--shadow); }
.upload-card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 26px; }
.upload-card-head h2, .upload-card-head p { margin: 0; }
.upload-card-head h2 { font-size: 19px; }
.upload-card-head p { color: var(--muted); font-size: 12px; }
.step-dot { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--coral); border-radius: 50%; font-weight: 800; }
.drop-zone { display: grid; place-items: center; min-height: 250px; padding: 30px; text-align: center; background: #faf7f0; border: 2px dashed #b9c4bf; border-radius: 13px; cursor: pointer; transition: .2s; }
.drop-zone:hover, .drop-zone.is-dragging { background: var(--green-soft); border-color: var(--green); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong, .drop-zone small { display: block; }
.drop-zone small { margin-top: 7px; color: var(--muted); }
.upload-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px; color: #fff; background: var(--green); border-radius: 50%; font-size: 28px; }
.privacy-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; color: var(--muted); font-size: 12px; }
.privacy-note p { margin: 0; }
.privacy-note strong { color: var(--ink); }
.reviews-download-section { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(36px, 7vw, 100px); align-items: center; margin: 0 clamp(20px, 4vw, 64px) 72px; padding: clamp(34px, 5vw, 68px); color: #fff; background: var(--ink); border-radius: 22px; }
.reviews-copy h2 { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(34px, 4.2vw, 58px); font-weight: 500; letter-spacing: -.04em; line-height: 1.18; }
.reviews-copy > p:not(.eyebrow) { max-width: 610px; margin: 24px 0; color: rgba(255,255,255,.72); }
.review-fields { display: grid; gap: 9px; margin: 0; padding: 0; color: rgba(255,255,255,.82); font-size: 12px; list-style: none; }
.review-fields li { position: relative; padding-left: 22px; }
.review-fields li::before { position: absolute; left: 0; content: '✓'; color: var(--amber); font-weight: 800; }
.reviews-card { padding: clamp(24px, 4vw, 42px); color: var(--ink); background: var(--surface); border-radius: 16px; box-shadow: 0 22px 60px rgba(0,0,0,.2); }
.reviews-card .alert { margin: 0 0 18px; }
.field-label { display: grid; gap: 7px; margin-top: 16px; }
.field-label > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.field-label textarea, .field-label select { width: 100%; padding: 12px 14px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.field-label textarea { min-height: 128px; resize: vertical; line-height: 1.55; overflow-wrap: anywhere; }
.field-label textarea:focus, .field-label select:focus { outline: 3px solid rgba(31,90,74,.15); border-color: var(--green); }
.api-note { margin: 18px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.alert { display: flex; gap: 12px; align-items: flex-start; margin: 20px clamp(20px, 4vw, 64px); padding: 14px 18px; border-radius: 9px; font-size: 13px; }
.upload-card .alert { margin: 0 0 18px; }
.alert strong { flex: 0 0 auto; }
.alert-error { color: #7a2e23; background: #f9ddd5; border: 1px solid #efb6a8; }
.alert-warning { color: #5d4511; background: #fff0c9; border: 1px solid #eed289; }
.report-nav { position: sticky; top: 76px; z-index: 20; display: flex; gap: 30px; padding: 12px clamp(20px, 4vw, 64px); overflow-x: auto; background: var(--ink); color: #fff; }
.report-nav a { font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; opacity: .8; }
.report-nav a:hover { opacity: 1; }
.report-section { scroll-margin-top: 128px; padding: 64px clamp(20px, 4vw, 64px); }
.report-hero { display: flex; align-items: flex-end; justify-content: space-between; padding-bottom: 32px; }
.report-hero h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(34px, 4vw, 58px); font-weight: 500; letter-spacing: -.03em; }
.report-hero h1 span { color: #a9b2ae; }
.report-hero p { margin: 8px 0 0; color: var(--muted); }
.peak-callout { display: grid; min-width: 240px; padding: 22px 26px; color: #fff; background: var(--coral); border-radius: 12px; }
.peak-callout small { text-transform: uppercase; letter-spacing: .12em; }
.peak-callout strong { font-family: Georgia, serif; font-size: 34px; }
.peak-callout span { font-size: 12px; opacity: .9; }
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 0 clamp(20px, 4vw, 64px); }
.kpi-card { min-height: 150px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.kpi-card small, .kpi-card strong, .kpi-card span { display: block; }
.kpi-card small { color: var(--muted); font-size: 12px; font-weight: 700; }
.kpi-card strong { margin-top: 14px; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(24px, 2.6vw, 38px); line-height: 1.1; }
.kpi-card strong em { margin-left: 3px; font-family: inherit; font-size: 14px; font-style: normal; }
.kpi-card span { margin-top: 12px; color: var(--muted); font-size: 11px; }
.kpi-card.accent-dark { color: #fff; background: var(--ink); border-color: var(--ink); }
.kpi-card.accent-dark small, .kpi-card.accent-dark span, .kpi-card.accent-coral small, .kpi-card.accent-coral span { color: rgba(255,255,255,.75); }
.kpi-card.accent-coral { color: #fff; background: var(--coral); border-color: var(--coral); }
.kpi-card .product-name { font-family: inherit; font-size: clamp(20px, 2vw, 29px); }
.insight-strip { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 0; margin: 28px clamp(20px, 4vw, 64px) 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.insight-strip > * { margin: 0; padding: 18px 22px; border-right: 1px solid var(--line); }
.insight-strip > *:last-child { border-right: 0; }
.insight-title { display: grid; place-items: center; color: #fff; background: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.insight-strip p { font-size: 13px; }
.insight-strip b { margin-right: 9px; color: var(--coral); font-family: Georgia, serif; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 26px; }
.section-heading h2 { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(30px, 3.6vw, 48px); font-weight: 500; letter-spacing: -.03em; }
.section-heading > p { max-width: 520px; margin: 0; color: var(--muted); font-size: 13px; }
.two-column { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; }
.panel { min-width: 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.panel-wide { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.panel-head h3, .panel-head p { margin: 0; }
.panel-head h3 { font-size: 16px; }
.panel-head p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.panel-head select, .forecast-controls select, .forecast-controls input { min-height: 40px; padding: 0 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.bar-chart { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 42px minmax(80px, 1fr) 62px 46px; gap: 10px; align-items: center; font-size: 12px; }
.bar-track { height: 12px; background: #e8e8e1; border-radius: 99px; overflow: hidden; }
.bar-track i { display: block; height: 100%; min-width: 0; background: var(--green); border-radius: inherit; }
.bar-row.is-peak .bar-track i { background: var(--coral); }
.bar-row strong { text-align: right; }
.bar-row small { color: var(--muted); text-align: right; }
.period-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 26px; }
.period-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.period-preset { min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.period-preset:hover { border-color: var(--green); }
.period-preset.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.period-range { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.period-range label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.period-range input[type="date"] { min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; color: var(--ink); background: var(--surface); }
.sort-th { cursor: pointer; user-select: none; }
.sort-th:hover { color: var(--green); }
thead th[aria-sort] { color: var(--green); }
.sort-mark { font-size: 10px; }
tfoot .ranking-total th, tfoot .ranking-total td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; background: #f2eee4; color: var(--ink); }
tfoot .ranking-total th small { display: block; margin-top: 2px; font-weight: 400; font-size: 10px; color: var(--muted); }
.combo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.combo-size { display: flex; flex-wrap: wrap; gap: 6px; }
.combo-size button { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: 12px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.combo-size button:hover { border-color: var(--green); }
.combo-size button.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 11px 10px; text-align: right; border-bottom: 1px solid #e5e1d8; white-space: nowrap; }
thead th { color: var(--muted); background: #f7f4ed; font-size: 10px; letter-spacing: .04em; }
th:first-child, td:first-child { text-align: left; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.legend { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 10px; }
.legend i { width: 90px; height: 8px; background: linear-gradient(90deg, #edf3ef, var(--green)); border-radius: 99px; }
.heatmap-wrap { overflow-x: auto; }
.heatmap { min-width: 850px; }
.heatmap th, .heatmap td { padding: 7px; text-align: center; border: 3px solid var(--surface); }
.heatmap tbody th { background: #f7f4ed; }
.heatmap td { color: color-mix(in srgb, var(--ink) calc((1 - var(--heat)) * 100%), white); background: color-mix(in srgb, #eef4f0 calc((1 - var(--heat)) * 100%), var(--green)); font-variant-numeric: tabular-nums; }
@supports not (background: color-mix(in srgb, white, black)) { .heatmap td { background: var(--green-soft); } }
.menu-heatmap tbody th { min-width: 170px; text-align: left; }
.menu-heatmap th span, .menu-heatmap th small { display: block; }
.menu-heatmap th small { color: var(--muted); font-weight: 400; }
.category-layout { grid-template-columns: .7fr 1.3fr; }
.category-list { display: grid; }
.category-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.category-row:last-child { border-bottom: 0; }
.category-row .rank { color: var(--coral); font-family: Georgia, serif; }
.category-row strong, .category-row small, .category-row b { display: block; }
.category-row small { color: var(--muted); font-size: 10px; }
.category-row > div:last-child { text-align: right; }
.forecast-section { margin: 20px clamp(12px, 2vw, 32px); padding-left: clamp(16px, 2vw, 32px); padding-right: clamp(16px, 2vw, 32px); color: #fff; background: var(--ink); border-radius: 16px; }
.forecast-section .section-heading > p, .forecast-section .panel-head p, .forecast-section .method-note { color: rgba(255,255,255,.68); }
.forecast-controls { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 18px; padding: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; }
.forecast-controls label { display: grid; gap: 5px; }
.forecast-controls label span, .forecast-basis small { color: rgba(255,255,255,.7); font-size: 10px; font-weight: 700; }
.forecast-basis { display: grid; gap: 2px; margin-left: auto; }
.forecast-summary-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; }
.forecast-section .panel { color: var(--ink); }
.compact .bar-row { grid-template-columns: 42px 1fr 72px; }
.forecast-table-wrap { max-height: 430px; }
.recommendation { display: inline-block; min-width: 34px; padding: 2px 7px; color: #fff; background: var(--coral); border-radius: 99px; text-align: center; font-weight: 800; }
.method-note { margin: 16px 0 0; font-size: 11px; }
.data-check-list { margin: 0; }
.data-check-list div { display: grid; grid-template-columns: 130px 1fr; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.data-check-list div:last-child { border: 0; }
.data-check-list dt { color: var(--muted); font-size: 11px; }
.data-check-list dd { margin: 0; overflow-wrap: anywhere; text-align: right; }
.daily-table { max-height: 360px; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 30px clamp(20px, 4vw, 64px); color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
footer p { margin: 0; }
.logout-form { margin: 0; }

/* Simple administration dashboard */
:root {
    --ink: #1f2937;
    --muted: #6b7280;
    --paper: #f3f4f6;
    --surface: #ffffff;
    --line: #e5e7eb;
    --green: #2563eb;
    --green-soft: #dbeafe;
    --coral: #2563eb;
    --amber: #d97706;
    --shadow: none;
}
body { background: var(--paper); line-height: 1.5; }
.site-header { min-height: 64px; padding: 10px clamp(18px, 3vw, 40px); background: #fff; border-bottom: 1px solid var(--line); backdrop-filter: none; }
.brand { gap: 10px; }
.brand-mark { width: 34px; height: 34px; background: #2563eb; border-radius: 7px; font-family: inherit; font-size: 17px; }
.brand strong { font-size: 14px; }
.brand small { margin-top: 1px; font-size: 10px; letter-spacing: 0; }
.header-actions { gap: 8px; }
.button { min-height: 38px; padding: 0 14px; border-radius: 6px; font-size: 12px; transition: background .15s; }
.button:hover { transform: none; }
.button-primary { background: #2563eb; }
.button-primary:hover { background: #1d4ed8; }
.button-subtle { background: #fff; }
.button-large { min-height: 44px; margin-top: 14px; font-size: 13px; }
main { width: min(1400px, 100%); }
.admin-home { padding: 30px clamp(18px, 3vw, 40px) 48px; }
.page-heading, .dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.page-heading h1, .dashboard-heading h1 { margin: 0; font-family: inherit; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.page-heading p, .dashboard-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.admin-tool-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 18px; align-items: start; }
.admin-tool-card { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: none; }
.upload-card-head { margin-bottom: 16px; }
.upload-card-head h2 { font-size: 15px; }
.upload-card-head p { font-size: 11px; }
.drop-zone { min-height: 180px; padding: 22px; background: #f9fafb; border: 1px dashed #9ca3af; border-radius: 7px; }
.upload-icon { width: 38px; height: 38px; margin-bottom: 10px; background: #2563eb; border-radius: 7px; font-size: 20px; }
.privacy-note { margin-top: 12px; }
.reviews-card { color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: none; }
.field-label { margin-top: 12px; }
.field-label textarea { min-height: 112px; background: #f9fafb; }
.api-note { margin-top: 12px; }
.report-nav { top: 64px; gap: 6px; padding: 8px clamp(18px, 3vw, 40px); color: var(--muted); background: #fff; border-bottom: 1px solid var(--line); }
.report-nav a { padding: 6px 10px; border-radius: 5px; font-size: 11px; opacity: 1; }
.report-nav a:hover { color: #1d4ed8; background: #eff6ff; }
.dashboard-heading { margin: 0; padding: 26px clamp(18px, 3vw, 40px) 18px; }
.dashboard-period { display: grid; gap: 3px; text-align: right; }
.dashboard-period small { color: var(--muted); font-size: 10px; }
.dashboard-period strong { font-size: 13px; }
.alert { margin: 0 clamp(18px, 3vw, 40px) 14px; border-radius: 6px; }
.kpi-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding: 0 clamp(18px, 3vw, 40px) 24px; }
.kpi-card, .kpi-card.accent-dark, .kpi-card.accent-coral { min-height: 116px; padding: 16px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.kpi-card.accent-dark small, .kpi-card.accent-dark span, .kpi-card.accent-coral small, .kpi-card.accent-coral span { color: var(--muted); }
.kpi-card small { font-size: 10px; font-weight: 600; }
.kpi-card strong { margin-top: 10px; font-family: inherit; font-size: clamp(20px, 2vw, 28px); font-weight: 700; }
.kpi-card .product-name { font-size: clamp(16px, 1.6vw, 22px); }
.kpi-card span { margin-top: 8px; font-size: 9px; }
.report-section { scroll-margin-top: 112px; padding: 24px clamp(18px, 3vw, 40px); }
.report-section + .report-section { border-top: 1px solid var(--line); }
.section-heading { align-items: center; margin-bottom: 14px; }
.section-heading h2 { font-family: inherit; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.section-heading > p { font-size: 11px; }
.two-column { gap: 12px; }
.panel { padding: 18px; border-radius: 7px; }
.panel-wide { margin-top: 12px; }
.panel-head { margin-bottom: 14px; }
.panel-head h3 { font-size: 13px; }
.panel-head p { font-size: 10px; }
.bar-chart { gap: 8px; }
.bar-track { height: 9px; background: #e5e7eb; }
.bar-track i, .bar-row.is-peak .bar-track i { background: #2563eb; }
table { font-size: 11px; }
th, td { padding: 9px 8px; border-bottom-color: var(--line); }
thead th { color: #4b5563; background: #f9fafb; }
.legend i { background: linear-gradient(90deg, #eff6ff, #2563eb); }
.heatmap th, .heatmap td { border-color: #fff; }
.heatmap td { background: color-mix(in srgb, #eff6ff calc((1 - var(--heat)) * 100%), #2563eb); }
.category-row { padding: 12px 0; border-bottom-color: var(--line); }
.category-row .rank { color: #2563eb; font-family: inherit; font-size: 11px; }
.forecast-section { margin: 0; color: var(--ink); background: transparent; border-radius: 0; }
.forecast-section .section-heading > p, .forecast-section .panel-head p, .forecast-section .method-note { color: var(--muted); }
.forecast-controls { margin-bottom: 12px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.forecast-controls label span, .forecast-basis small { color: var(--muted); }
.forecast-summary-grid { gap: 12px; }
.recommendation { background: #2563eb; }
footer { padding: 18px clamp(18px, 3vw, 40px); background: #fff; border-top-color: var(--line); }
.auth-body { min-height: 100vh; background: #e9e5da; }
.auth-shell { display: grid; min-height: 100vh; place-items: center; padding: 36px 20px; }
.auth-card { width: min(100%, 520px); padding: clamp(28px, 6vw, 52px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 26px 80px rgba(24, 41, 35, .14); }
.auth-brand { display: inline-flex; gap: 12px; align-items: center; margin-bottom: 44px; color: var(--ink); text-decoration: none; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.auth-card h1 { margin: 4px 0 12px; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(32px, 7vw, 48px); font-weight: 500; letter-spacing: -.04em; }
.auth-lead { margin: 0 0 28px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.auth-form { display: grid; gap: 18px; }
.auth-field { display: grid; gap: 7px; }
.auth-field > span { font-size: 11px; font-weight: 800; }
.auth-field input { width: 100%; min-height: 50px; padding: 0 15px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; }
.auth-field input:focus { outline: 3px solid rgba(31,90,74,.15); border-color: var(--green); }
.auth-field small { color: var(--muted); font-size: 10px; }
.auth-alert { margin: 0 0 20px; }
.totp-setup { display: grid; justify-items: center; gap: 16px; margin-bottom: 24px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.totp-qr { display: block; width: min(240px, 100%); height: auto; image-rendering: pixelated; }
.totp-manual { width: 100%; text-align: center; }
.totp-manual small, .totp-manual code, .totp-manual p { display: block; }
.totp-manual small, .totp-manual p { color: var(--muted); font-size: 10px; }
.totp-manual code { margin: 7px 0; overflow-wrap: anywhere; color: var(--green); font-size: 15px; font-weight: 800; letter-spacing: .08em; }
.totp-manual p { margin: 0; }
.recovery-code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 24px 0; }
.recovery-code-grid code { padding: 11px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; text-align: center; font-weight: 800; letter-spacing: .06em; }
.auth-warning { margin: 0 0 22px; padding: 12px 14px; color: #5d4511; background: #fff0c9; border: 1px solid #eed289; border-radius: 8px; font-size: 11px; }
.auth-confirm { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; }
.auth-confirm input { width: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.auth-security-note { margin: 26px 0 0; padding-top: 20px; color: var(--muted); border-top: 1px solid var(--line); font-size: 9px; text-align: center; }

@media (max-width: 1050px) {
    .kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .admin-tool-grid { grid-template-columns: 1fr; }
    .insight-strip { grid-template-columns: 1fr; }
    .insight-strip > * { border-right: 0; border-bottom: 1px solid var(--line); }
    .two-column, .category-layout, .forecast-summary-grid { grid-template-columns: 1fr; }
    .reviews-download-section { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .site-header { position: static; min-height: 66px; }
    .brand strong { font-size: 13px; }
    .brand small, .file-badge, .button-subtle { display: none; }
    .header-actions .button { padding: 0 12px; font-size: 12px; }
    .admin-home { padding-top: 20px; }
    .reviews-download-section { margin: 0 12px 42px; padding: 30px 20px; border-radius: 14px; }
    .upload-copy h1 { font-size: 47px; }
    .report-nav { top: 0; }
    .dashboard-heading, .section-heading { align-items: flex-start; flex-direction: column; }
    .dashboard-period { text-align: left; }
    .peak-callout { width: 100%; }
    .alert { flex-direction: column; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .kpi-card { min-height: 130px; }
    .forecast-controls { align-items: stretch; flex-direction: column; }
    .forecast-basis { margin-left: 0; }
    footer { flex-direction: column; }
    .auth-shell { padding: 0; }
    .auth-card { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
    .auth-brand { margin-bottom: 34px; }
    .recovery-code-grid { grid-template-columns: 1fr; }
}

@media print {
    body { background: #fff; }
    .site-header, .report-nav, .forecast-controls .button, footer { display: none !important; }
    .report-section { padding: 28px 0; }
    .panel, .kpi-card { break-inside: avoid; box-shadow: none; }
    .forecast-section { margin: 10px 0; color: var(--ink); background: #eef3f0; }
}
