:root {
    --blue: #1877f2;
    --blue-dark: #166fe5;
    --blue-soft: #e7f3ff;
    --bg: #f0f2f5;
    --surface: #ffffff;
    --surface-soft: #f7f8fa;
    --text: #1c1e21;
    --muted: #65676b;
    --border: #d8dce3;
    --border-strong: #c5cad3;
    --green: #31a24c;
    --red: #d93025;
    --sidebar-width: 236px;
    --topbar-height: 58px;
    --shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

body[data-theme="dark"] { --bg:#10141b; --surface:#181d26; --surface-soft:#202631; --text:#edf1f7; --muted:#a8b0bd; --border:#343c49; --border-strong:#465162; --blue-soft:#172d4d; --shadow:0 1px 3px rgba(0,0,0,.5); color-scheme:dark; }
body[data-theme="dark"] .sidebar, body[data-theme="dark"] .data-table td, body[data-theme="dark"] .summary-table td, body[data-theme="dark"] .button.secondary { background:var(--surface); color:var(--text); }
body[data-theme="dark"] .nav-item, body[data-theme="dark"] .data-table td, body[data-theme="dark"] .detail-field strong { color:var(--text); }
body[data-theme="dark"] .data-table th, body[data-theme="dark"] .simple-table th, body[data-theme="dark"] .progress-table th, body[data-theme="dark"] .section-title { background:#222936; color:#dce2eb; }
body[data-theme="dark"] .detail-field, body[data-theme="dark"] input, body[data-theme="dark"] select, body[data-theme="dark"] textarea, body[data-theme="dark"] .drop-zone { background:#141922; color:var(--text); border-color:var(--border); }
body[data-theme="dark"] .activity-row:hover, body[data-theme="dark"] .data-table tbody tr:hover td { background:#202733; }
body[data-theme="dark"] .card, body[data-theme="dark"] .topbar, body[data-theme="dark"] .product-progress,
body[data-theme="dark"] .category-progress, body[data-theme="dark"] .product-progress > summary,
body[data-theme="dark"] .untracked-product, body[data-theme="dark"] .form-submit-bar { background:var(--surface); border-color:var(--border); }
body[data-theme="dark"] .sidebar-note, body[data-theme="dark"] .table-help, body[data-theme="dark"] .progress-metrics,
body[data-theme="dark"] .category-progress-list, body[data-theme="dark"] .info-strip { background:var(--surface-soft); border-color:var(--border); color:var(--muted); }
body[data-theme="dark"] .category-progress > summary { background:#172d4d; color:#dbeaff; }
body[data-theme="dark"] .simple-table td, body[data-theme="dark"] .card-header, body[data-theme="dark"] .activity-row,
body[data-theme="dark"] .steps li, body[data-theme="dark"] .progress-table td { border-color:var(--border); }
body.login-page[data-theme="dark"] { background:linear-gradient(135deg,#0d1420 0%,#121722 52%,#101b1c 100%); }
.topbar-logo-wrap { display:inline-flex; width:52px; height:38px; align-items:center; justify-content:center; }
.topbar-logo { display:block; width:100%; height:100%; object-fit:contain; }
.logo-dark { display:none; }
body[data-theme="dark"] .logo-light { display:none; }
body[data-theme="dark"] .logo-dark { display:block; }
.theme-toggle { color:var(--text); }
.danger-link { color:var(--red); font-weight:700; }
.button.danger { color: #fff; background: var(--red); border-color: var(--red); }
.button.danger:hover { color: #fff; background: #a51d18; border-color: #a51d18; }
.inline-form { display: inline-flex; margin: 0; }
.field-help { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.stage-badge { display:inline-flex; padding:4px 8px; border-radius:999px; color:#72500b; background:#fff1c7; font-size:10px; font-weight:750; }
.stage-editor { display:grid; grid-template-columns:minmax(260px,1fr) minmax(240px,1fr); gap:18px; align-items:end; padding:0 0 18px; border-bottom:1px solid var(--border); margin-bottom:18px; }
.stage-date { display:flex; flex-direction:column; gap:4px; }
.stage-date span, .stage-date small { color:var(--muted); font-size:11px; }
.editable-details .detail-field input { font-weight:650; }
.detail-save { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-top:18px; padding-top:16px; border-top:1px solid var(--border); color:var(--muted); font-size:11px; }
.login-centered { grid-template-columns:minmax(320px,420px); justify-content:center; }
.login-logo-wrap { display:flex; align-items:center; justify-content:center; width:100%; height:124px; margin:0 auto 3px; }
.login-logo { width:min(270px,86%); height:100%; object-fit:contain; object-position:center; margin:0 auto; }
.login-brand-caption { margin:0 0 20px; color:#21448c; font-size:8px; font-weight:800; letter-spacing:.18em; text-align:center; }
.ssg-button { background:#21448c !important; border-color:#f7aa19 !important; }
.login-theme-toggle { position:fixed; top:18px; right:18px; z-index:3; }
.monthly-upload { display:flex; flex-direction:column; gap:10px; padding:16px 18px; border-bottom:1px solid var(--border); }
.monthly-upload label { font-size:11px; font-weight:700; }
.monthly-upload small { color:var(--muted); line-height:1.4; }
@media (max-width:760px) { .stage-editor { grid-template-columns:1fr; } .detail-save { align-items:stretch; flex-direction:column; } }

* { box-sizing: border-box; }
html { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--text); }
body { margin: 0; background: var(--bg); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { transition: border-color .15s, box-shadow .15s, background .15s, transform .15s; }

.topbar {
    position: fixed; inset: 0 0 auto 0; height: var(--topbar-height); background: var(--surface);
    border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 18px;
    gap: 24px; z-index: 50;
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600; white-space: nowrap; }
.brand strong { color: var(--blue); }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff;
    background: linear-gradient(145deg, #2d88ff, #0866ff); font-weight: 800; font-size: 17px; }
.brand-large { font-size: 21px; }
.brand-large .brand-mark { width: 42px; height: 42px; font-size: 22px; }
.topbar-context { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.environment-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px #e4f6e8; }
.topbar-spacer { flex: 1; }
.user-menu { display: flex; align-items: center; gap: 8px; }
.avatar { width: 30px; height: 30px; display: inline-grid; place-items: center; color: #fff; background: #6b7a90; border-radius: 50%; font-weight: 700; text-transform: uppercase; }
.user-name { font-weight: 600; }
.link-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 7px; }
.link-button:hover { color: var(--blue); }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface-soft); cursor: pointer; }
.mobile-menu { display: none; }

.sidebar { position: fixed; top: var(--topbar-height); bottom: 0; left: 0; width: var(--sidebar-width); background: #fff;
    border-right: 1px solid var(--border); padding: 18px 10px; overflow-y: auto; z-index: 40; }
.nav-label { margin: 18px 12px 8px; color: #8a8d91; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.nav-label:first-child { margin-top: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 9px 12px; border-radius: 6px; color: #3a3d42; font-weight: 500; margin-bottom: 3px; }
.nav-item:hover { background: #f2f3f5; }
.nav-item.active { color: #0866ff; background: #e7f3ff; font-weight: 650; }
.nav-icon { display: inline-grid; place-items: center; width: 20px; color: #5f6368; font-size: 19px; }
.nav-item.active .nav-icon { color: var(--blue); }
.sidebar-note { margin: 28px 8px 0; padding: 13px; display: flex; gap: 10px; background: #f7f8fa; border: 1px solid #e3e6ea; border-radius: 8px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.sidebar-note strong { color: var(--text); }
.sidebar-note-icon { display: inline-grid; flex: 0 0 auto; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.sidebar-backdrop { display: none; }

.main-content { margin-left: var(--sidebar-width); padding: calc(var(--topbar-height) + 26px) 30px 50px; min-height: 100vh; }
.main-content > section { max-width: 1520px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-heading h1 { margin: 2px 0 7px; font-size: 27px; line-height: 1.2; letter-spacing: -.02em; }
.page-heading p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--blue) !important; font-size: 11px; font-weight: 750; letter-spacing: .08em; }
.page-actions { display: flex; align-items: center; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 15px; border: 1px solid transparent; border-radius: 6px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { background: #fff; border-color: var(--border-strong); color: #3a3d42; }
.button.secondary:hover { background: #f7f8fa; }
.button.full { width: 100%; }
.text-link { color: #0b66d4; font-weight: 600; }
.text-link:hover { text-decoration: underline; }

.card { background: var(--surface); border: 1px solid #e0e3e8; border-radius: 8px; box-shadow: var(--shadow); }
.card-header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #e5e7eb; }
.card-header h2 { margin: 0 0 4px; font-size: 16px; }
.card-header p { margin: 0; color: var(--muted); font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { display: flex; align-items: center; min-height: 94px; padding: 17px; gap: 14px; }
.metric-card p { margin: 0 0 5px; color: var(--muted); font-size: 12px; }
.metric-card strong { font-size: 25px; letter-spacing: -.02em; }
.metric-card strong.metric-text { font-size: 16px; }
.metric-icon { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 10px; font-size: 21px; font-weight: 700; }
.metric-icon.blue { color: #0866ff; background: #e7f3ff; }
.metric-icon.green { color: #1f8f3a; background: #e9f7ec; }
.metric-icon.purple { color: #7e43ce; background: #f1eafd; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 18px; }
.list-stack { padding: 3px 0; }
.activity-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #eceef1; }
.activity-row:last-child { border-bottom: 0; }
.activity-row:hover { background: #f8f9fb; }
.activity-main { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.activity-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-main small { color: var(--muted); }
.file-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 33px; height: 37px; color: #168c4a; background: #e8f6ed; border-radius: 5px; font-weight: 800; }
.status-badge, .source-badge { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 4px 8px; font-size: 10px; font-weight: 750; letter-spacing: .03em; }
.status-badge.success { color: #177b34; background: #e7f6eb; }
.source-badge { color: #3f638b; background: #e7f3ff; }
.source-badge.manual { color: #7343aa; background: #f1eafd; }
.quick-card .card-header { border-bottom: 0; }
.steps { list-style: none; padding: 0 19px 14px; margin: 0; }
.steps li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid #eceef1; }
.steps li > span { display: inline-grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.steps strong { font-size: 13px; }
.steps p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }

.alert { display: flex; align-items: center; gap: 10px; max-width: 1520px; margin: 0 auto 18px; padding: 12px 15px; border: 1px solid; border-radius: 7px; }
.alert > span:first-child { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-weight: 800; }
.alert.success { color: #176d30; border-color: #bde1c5; background: #edf8ef; }
.alert.success > span:first-child { color: #fff; background: var(--green); }
.alert.error { color: #a1261d; border-color: #efc4bf; background: #fff1f0; }
.alert.error > span:first-child { color: #fff; background: var(--red); }
.alert.compact { margin: 15px 0; font-size: 12px; }

.upload-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, .85fr); gap: 18px; margin-bottom: 18px; }
.upload-card form { padding: 18px; }
.drop-zone { position: relative; min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px dashed #c8cdd5; border-radius: 8px; background: #fafbfc; color: var(--muted); cursor: pointer; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--blue); background: #f5f9ff; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { color: #3a3d42; font-size: 15px; }
.upload-symbol { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 28px; font-weight: 700; margin-bottom: 5px; }
.info-strip { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 11px 13px; border: 1px solid #d7e7fb; border-radius: 6px; color: #52606f; background: #f5f9ff; font-size: 12px; }
.info-strip > span { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; color: white; background: var(--blue); font-weight: 700; }
.info-strip p { margin: 0; line-height: 1.5; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.requirements-card { align-self: start; }
.check-list { list-style: none; margin: 0; padding: 15px 18px 18px; }
.check-list li { display: flex; gap: 9px; padding: 10px 0; border-bottom: 1px solid #eceef1; line-height: 1.35; }
.check-list li:last-child { border-bottom: 0; }
.check-list span { color: var(--green); font-weight: 800; }
.history-card { margin-top: 18px; }
.responsive-table { overflow-x: auto; }
.simple-table { width: 100%; border-collapse: collapse; }
.simple-table th { padding: 11px 14px; color: var(--muted); background: #f7f8fa; text-align: left; font-size: 11px; white-space: nowrap; }
.simple-table td { padding: 12px 14px; border-top: 1px solid #e5e7eb; white-space: nowrap; }
.file-cell { display: flex; align-items: center; gap: 10px; }
.file-cell .file-icon { width: 28px; height: 31px; }

.summary-selector { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 14px 17px; margin-bottom: 16px; }
.summary-selector .filter-field { width: min(560px, 65%); }
.summary-source { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.summary-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.summary-metric { position: relative; min-height: 91px; display: flex; align-items: center; overflow: hidden; padding: 16px 17px 16px 22px; }
.summary-metric p { margin: 0 0 7px; color: var(--muted); font-size: 11px; }
.summary-metric strong { font-size: 21px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.metric-accent { position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--blue); }
.metric-accent.accent-1 { background: #31a24c; }
.metric-accent.accent-2 { background: #7e43ce; }
.metric-accent.accent-3 { background: #e07b21; }
.summary-card { overflow: hidden; }
.table-scroll-hint { color: var(--muted); font-size: 11px; }
.summary-table-wrap { width: 100%; overflow: auto; max-height: calc(100vh - 350px); }
.summary-table { min-width: 1780px; width: 100%; border-spacing: 0; border-collapse: separate; }
.summary-table th, .summary-table td { min-width: 118px; padding: 10px 11px; border-right: 1px solid #e4e7eb; border-bottom: 1px solid #e4e7eb; text-align: right; white-space: nowrap; }
.summary-table th { position: sticky; top: 37px; z-index: 3; color: #3f4247; background: #f7f8fa; font-size: 10px; }
.summary-table th:first-child, .summary-table th:nth-child(2), .summary-table td:first-child, .summary-table td:nth-child(2) { text-align: left; }
.summary-table th span, .summary-table th small { display: block; }
.summary-table th small { margin-top: 4px; color: #969ba2; font-size: 9px; }
.summary-table td { background: #fff; color: #35383d; font-size: 12px; }
.summary-table tbody tr:hover td { background: #f8fbff; }
.summary-table .summary-groups th { top: 0; height: 37px; padding: 9px 11px; color: #315f96; background: #eaf3ff; text-align: center; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.summary-table .total-row td { color: #173f70; background: #edf5ff; border-bottom-color: #c9def8; font-weight: 750; }

.compact-metrics .metric-card { min-height: 82px; }
.records-card { overflow: hidden; }
.filter-bar { display: flex; align-items: flex-end; gap: 12px; padding: 15px 17px; border-bottom: 1px solid #e5e7eb; }
.filter-field { display: flex; flex-direction: column; gap: 6px; }
.filter-field label, .form-context label { color: #4c4f54; font-size: 11px; font-weight: 700; }
.batch-field { width: min(360px, 32%); }
.search-field { flex: 1; }
input, select, textarea { width: 100%; min-height: 39px; border: 1px solid #ccd0d5; border-radius: 5px; background: #fff; color: var(--text); padding: 8px 10px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(24, 119, 242, .14); }
textarea { resize: vertical; line-height: 1.45; }
.search-input { position: relative; }
.search-input span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #8a8d91; font-size: 17px; }
.search-input input { padding-left: 34px; }
.filter-button { min-height: 39px; }
.clear-filter { align-self: center; }
.table-help { display: flex; align-items: center; gap: 7px; min-height: 39px; padding: 9px 17px; color: #57606b; background: #f8f9fb; font-size: 12px; border-bottom: 1px solid #e5e7eb; }
.data-table-wrap { width: 100%; overflow: auto; max-height: calc(100vh - 330px); }
.data-table { border-spacing: 0; border-collapse: separate; min-width: 100%; table-layout: fixed; }
.data-table th, .data-table td { min-width: 140px; max-width: 220px; padding: 10px 12px; border-right: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; background: #fff; }
.data-table th { position: sticky; top: 0; z-index: 4; height: 56px; color: #3f4247; background: #f5f6f8; font-size: 11px; font-weight: 700; }
.data-table th span, .data-table th small { display: block; }
.data-table th small { margin-top: 4px; color: #8a8d91; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.data-table td { height: 58px; color: #35383d; font-size: 12px; }
.data-table tbody tr:hover td { background: #f8fbff; }
.data-table .sticky-action { position: sticky; left: 0; z-index: 5; min-width: 126px; width: 126px; border-right: 1px solid #cfd4dc; box-shadow: 2px 0 4px rgba(0,0,0,.04); }
.data-table th.sticky-action { z-index: 8; background: #eef0f3; }
.row-action-cell { display: table-cell; }
.record-link { display: block; color: var(--blue); font-weight: 700; margin-bottom: 5px; }
.row-action-cell small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.cell-value { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; white-space: normal; line-height: 1.4; }
.empty-cell { color: #b0b3b8; }
.table-image { display: block; max-width: 68px; max-height: 52px; object-fit: contain; border: 1px solid #e3e6ea; border-radius: 4px; background: #fff; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 13px 17px; color: var(--muted); font-size: 12px; }
.page-button { padding: 7px 11px; border: 1px solid var(--border); border-radius: 5px; background: #fff; color: #3f4247; font-weight: 600; }
.page-button.disabled { pointer-events: none; opacity: .45; }

.form-heading { max-width: 1120px; margin-left: auto; margin-right: auto; }
.form-context { max-width: 1120px; margin: 0 auto 15px; padding: 14px 17px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.form-context > div { display: flex; align-items: center; gap: 11px; }
.form-context p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.form-context form { width: min(410px, 45%); }
.form-context select { margin-top: 5px; }
.npd-form { max-width: 1120px; margin: 0 auto; }
.form-section { margin-bottom: 14px; overflow: hidden; }
.section-title { display: flex; align-items: center; gap: 11px; padding: 14px 17px; border-bottom: 1px solid #e3e6ea; background: #fbfbfc; }
.section-title h2 { margin: 0 0 3px; font-size: 15px; }
.section-title p { margin: 0; color: var(--muted); font-size: 11px; }
.section-number { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-weight: 750; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; padding: 18px; }
.form-grid.compact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-field { min-width: 0; }
.form-field.span-2 { grid-column: span 2; }
.form-field label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: #3f4247; font-size: 12px; font-weight: 650; }
.form-field label small { color: #a0a4aa; font-size: 9px; font-weight: 650; }
.form-field input[type="file"] { padding: 7px; background: #fafbfc; }
.form-submit-bar { position: sticky; bottom: 12px; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 17px; border: 1px solid #d8dce3; border-radius: 8px; background: rgba(255,255,255,.96); box-shadow: 0 4px 18px rgba(0,0,0,.12); backdrop-filter: blur(10px); }
.form-submit-bar strong { font-size: 13px; }
.form-submit-bar p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }

.detail-card { padding: 18px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.detail-field { min-height: 86px; padding: 12px; border: 1px solid #e1e4e8; border-radius: 6px; background: #fbfbfc; }
.detail-field p { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 10px; color: var(--muted); font-size: 11px; }
.detail-field p small { color: #9a9da2; }
.detail-field strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.detail-field code { display: block; margin-top: 8px; padding: 5px; color: #57606b; background: #eef0f3; border-radius: 4px; font-size: 10px; overflow-wrap: anywhere; }
.detail-field img { max-width: 180px; max-height: 130px; object-fit: contain; }

.empty-state { min-height: 330px; padding: 45px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state.small { min-height: 210px; padding: 30px 20px; box-shadow: none; border: 0; }
.empty-state h2, .empty-state h3 { margin: 10px 0 6px; }
.empty-state p { max-width: 480px; margin: 0 0 17px; color: var(--muted); line-height: 1.5; }
.empty-icon { display: inline-grid; place-items: center; width: 50px; height: 50px; color: var(--blue); background: var(--blue-soft); border-radius: 50%; font-size: 24px; font-weight: 800; }

.login-page { min-height: 100vh; background: linear-gradient(135deg, #edf4fd 0%, #f4f1f7 48%, #edf7f5 100%); display: grid; place-items: center; padding: 24px; }
.login-layout { width: min(980px, 100%); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .75fr); align-items: center; gap: 70px; }
.login-intro h1 { max-width: 570px; margin: 28px 0 14px; font-size: 42px; line-height: 1.08; letter-spacing: -.035em; }
.login-intro > p { max-width: 570px; margin: 0 0 25px; color: #58626f; font-size: 17px; line-height: 1.55; }
.login-feature { display: flex; align-items: center; gap: 10px; margin: 11px 0; color: #4f5966; }
.login-feature span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: var(--green); font-size: 12px; }
.login-card { width: 100%; }
.card-body { padding: 28px; }
.login-card h2 { margin: 5px 0 5px; font-size: 24px; }
.muted { color: var(--muted); }
.stack-form { display: flex; flex-direction: column; gap: 7px; margin-top: 21px; }
.stack-form label { margin-top: 5px; font-size: 12px; font-weight: 650; }
.stack-form .button { margin-top: 13px; min-height: 43px; }
.form-note { margin: 18px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.error-page { width: min(520px, calc(100% - 32px)); padding: 45px; text-align: center; }
.error-page .empty-icon { margin-bottom: 8px; color: #b42318; background: #feeceb; }
.error-page p { color: var(--muted); margin-bottom: 22px; }

@media (max-width: 1040px) {
    .dashboard-grid, .upload-layout { grid-template-columns: 1fr; }
    .requirements-card { order: -1; }
    .form-grid.compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    :root { --topbar-height: 54px; }
    .mobile-menu { display: inline-grid; place-items: center; }
    .topbar { padding: 0 10px; gap: 10px; }
    .topbar-context, .user-name { display: none; }
    .sidebar { transform: translateX(-101%); transition: transform .2s ease; box-shadow: 4px 0 18px rgba(0,0,0,.14); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: var(--topbar-height) 0 0; background: rgba(0,0,0,.3); z-index: 35; }
    .main-content { margin-left: 0; padding: calc(var(--topbar-height) + 18px) 14px 35px; }
    .page-heading { flex-direction: column; }
    .page-actions { width: 100%; flex-wrap: wrap; }
    .page-actions .button { flex: 1; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric-card { min-height: 76px; }
    .filter-bar { align-items: stretch; flex-direction: column; }
    .batch-field { width: 100%; }
    .filter-button { width: 100%; }
    .form-context { align-items: stretch; flex-direction: column; }
    .form-context form { width: 100%; }
    .form-grid, .form-grid.compact-grid { grid-template-columns: 1fr; }
    .form-field.span-2 { grid-column: span 1; }
    .form-submit-bar { position: static; align-items: stretch; flex-direction: column; }
    .detail-grid { grid-template-columns: 1fr; }
    .summary-selector { align-items: stretch; flex-direction: column; }
    .summary-selector .filter-field { width: 100%; }
    .summary-metrics { grid-template-columns: 1fr; }
    .login-layout { grid-template-columns: 1fr; gap: 30px; }
    .login-intro h1 { font-size: 32px; }
    .login-feature { display: none; }
}
.upload-type-field { margin-bottom: 18px; }
.upload-type-field select { width: 100%; }
.upload-type-field small { display: block; margin-top: 7px; color: var(--muted); }
.password-card { max-width: 580px; }
.password-card .stack-form small { color: var(--muted); margin-top: -6px; }
.password-card .form-actions { justify-content: flex-end; }
.account-link { white-space: nowrap; }
.row-links { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.summary-methodology { margin: 0 0 18px; }
.diagnostics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.diagnostics-card { margin-bottom: 18px; }
.diagnostic-list { display: grid; gap: 10px; margin: 0; padding-left: 20px; color: var(--text); }
.diagnostic-list li span { display: block; color: var(--muted); margin-top: 3px; }
.warning-list li::marker { color: #d97706; }
.diagnostic-tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; padding: 18px; }
.diagnostic-tag { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; background: var(--surface-soft); min-width: 0; }
.diagnostic-tag strong, .diagnostic-tag small { display: block; overflow-wrap: anywhere; }
.diagnostic-tag small { color: var(--muted); margin-top: 4px; }
@media (max-width: 900px) { .diagnostics-grid { grid-template-columns: 1fr; } }
.performance-section { margin: 18px 0; overflow: hidden; }
.progress-metrics { padding: 16px; margin: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface-soft); }
.performance-filters { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto auto; align-items: end; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface-soft); }
.progress-metrics .metric-card { min-height: 86px; box-shadow: none; }
.progress-metrics small { display: block; margin-top: 5px; color: var(--muted); }
.gap-warning { border-left: 3px solid #d97706; }
.gap-good { border-left: 3px solid var(--green); }
.progress-table-wrap { max-height: 430px; }
.progress-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.progress-table th, .progress-table td { padding: 11px 13px; border-bottom: 1px solid var(--border); text-align: right; font-size: 12px; }
.progress-table th { position: sticky; top: 0; background: #f5f6f8; color: var(--muted); font-size: 10px; text-transform: uppercase; z-index: 2; }
.progress-table th:first-child, .progress-table td:first-child, .progress-table th:nth-last-child(-n+2), .progress-table td:nth-last-child(-n+2) { text-align: left; }
.negative-gap { color: #dc2626; font-weight: 750; }
.positive-gap { color: #16803c; font-weight: 750; }
.completion-pill { display: inline-block; min-width: 54px; padding: 4px 7px; border-radius: 12px; color: #175a9c; background: #eaf3ff; text-align: center; font-weight: 750; }
.progress-editor { margin-top: 18px; overflow: hidden; }
.progress-form { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); align-items: end; gap: 13px; padding: 17px; background: var(--surface-soft); }
.progress-form label { display: block; margin-bottom: 6px; color: #3f4247; font-size: 11px; font-weight: 700; }
.progress-notes { grid-column: span 3; }
@media (max-width: 1040px) { .progress-metrics { grid-template-columns: repeat(2, 1fr); } .progress-form { grid-template-columns: repeat(2, 1fr); } .progress-notes { grid-column: span 1; } }
@media (max-width: 760px) { .progress-metrics, .progress-form { grid-template-columns: 1fr; } }
.category-progress-list { padding: 0 16px 16px; background: var(--surface-soft); }
.category-progress { margin-top: 12px; border: 1px solid #d9dee5; border-radius: 8px; overflow: hidden; background: #fff; }
.category-progress > summary, .product-progress > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; cursor: pointer; list-style: none; }
.category-progress > summary::-webkit-details-marker, .product-progress > summary::-webkit-details-marker { display: none; }
.category-progress > summary { color: #173f70; background: #eaf3ff; }
.category-product-search { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-soft); }
.category-product-search label { flex: 0 0 auto; font-size: 11px; font-weight: 750; }
.category-product-search input { width: min(460px, 100%); }
.product-search-empty { margin: 0; padding: 16px; color: var(--muted); text-align: center; }
.product-progress[hidden], .product-search-empty[hidden] { display: none; }
.category-progress > summary span:first-child, .product-progress > summary span:first-child { display: flex; flex-direction: column; gap: 3px; }
.category-progress summary small { color: var(--muted); font-size: 10px; font-weight: 500; }
.category-totals { display: flex; flex-wrap: wrap; gap: 24px; color: var(--muted); font-size: 10px; }
.category-totals b { display: block; margin-top: 3px; color: var(--text); font-size: 13px; }
.product-progress { margin: 10px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.product-progress > summary { padding: 11px 13px; background: #fafbfc; }
.product-actions { display: flex; align-items: center; gap: 14px; }
.untracked-product { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; color: var(--muted); background: #fff; font-size: 11px; border-top: 1px solid var(--border); }
@media (max-width: 760px) { .category-progress > summary { align-items: flex-start; flex-direction: column; } .category-totals { width: 100%; justify-content: space-between; gap: 10px; } }
@media (max-width: 760px) { .performance-filters { grid-template-columns: 1fr; } }

/* Final theme overrides are intentionally last so legacy light rules cannot reduce dark-mode contrast. */
.login-page .login-centered {
    width: min(420px, 100%);
    grid-template-columns: minmax(0, 1fr);
    justify-content: center;
    gap: 0;
}
.login-page .login-card { width: 100%; margin: 0 auto; }
.login-page .login-logo { width: min(270px, 86%); height: 100%; margin: 0 auto; object-fit: contain; object-position: center; }

body[data-theme="dark"] {
    --bg: #000000;
    --surface: #090909;
    --surface-soft: #111111;
    --text: #ffffff;
    --muted: #dedede;
    --border: #292929;
    --border-strong: #444444;
    --blue-soft: #10284a;
    background: #000;
}
body.login-page[data-theme="dark"] { background: #000; }
body[data-theme="dark"] .topbar,
body[data-theme="dark"] .sidebar,
body[data-theme="dark"] .card,
body[data-theme="dark"] .data-table td,
body[data-theme="dark"] .summary-table td,
body[data-theme="dark"] .progress-table td,
body[data-theme="dark"] .product-progress,
body[data-theme="dark"] .product-progress > summary,
body[data-theme="dark"] .category-progress,
body[data-theme="dark"] .untracked-product,
body[data-theme="dark"] .button.secondary { background: #090909; color: #f7f7f7; border-color: #292929; }
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] .detail-field,
body[data-theme="dark"] .drop-zone { background: #030303; color: #fff; border-color: #3b3b3b; }
body[data-theme="dark"] .data-table th,
body[data-theme="dark"] .simple-table th,
body[data-theme="dark"] .progress-table th,
body[data-theme="dark"] .summary-table th,
body[data-theme="dark"] .section-title { background: #121212; color: #f4f4f4; }
body[data-theme="dark"] .nav-item { color: #e8e8e8; }
body[data-theme="dark"] .nav-item:hover,
body[data-theme="dark"] .nav-item:focus-visible { background: #242424; color: #fff; }
body[data-theme="dark"] .nav-item:hover .nav-icon,
body[data-theme="dark"] .nav-item:focus-visible .nav-icon { color: #fff; }
body[data-theme="dark"] .nav-item.active { background: #12305a; color: #fff; }
body[data-theme="dark"] .activity-row:hover,
body[data-theme="dark"] .activity-row:hover strong,
body[data-theme="dark"] .data-table tbody tr:hover td,
body[data-theme="dark"] .simple-table tbody tr:hover td,
body[data-theme="dark"] .progress-table tbody tr:hover td,
body[data-theme="dark"] .summary-table tbody tr:hover td { background: #1d1d1d; color: #fff; }
body[data-theme="dark"] .summary-table tbody tr:hover td *,
body[data-theme="dark"] .summary-table tbody tr:hover td a { color: #fff; }
body[data-theme="dark"] .summary-table .total-row td { background: #10284a; color: #f4f8ff; border-bottom-color: #285487; }
body[data-theme="dark"] .summary-table .total-row:hover td { background: #173a68; color: #fff; }
body[data-theme="dark"] .summary-table .summary-groups th { background: #10284a; color: #dcecff; }
body[data-theme="dark"] .summary-table code { background: #202020; color: #d9eaff; }
body[data-theme="dark"] .button.secondary:hover,
body[data-theme="dark"] .page-button:hover,
body[data-theme="dark"] .icon-button:hover { background: #292929; color: #fff; border-color: #666; }
body[data-theme="dark"] .text-link,
body[data-theme="dark"] .record-link { color: #72b4ff; }
body[data-theme="dark"] .text-link:hover,
body[data-theme="dark"] .record-link:hover { color: #b8d9ff; }
body[data-theme="dark"] .link-button:hover { color: #fff; background: #242424; }
body[data-theme="dark"] .danger-link,
body[data-theme="dark"] .danger-link:hover { color: #ff7f79; }
body[data-theme="dark"] .progress-form label,
body[data-theme="dark"] .filter-field label,
body[data-theme="dark"] .form-context label,
body[data-theme="dark"] .stack-form label { color: #f0f0f0; }
body[data-theme="dark"] .category-progress > summary { background: #10284a; color: #fff; }
body[data-theme="dark"],
body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] strong,
body[data-theme="dark"] .card,
body[data-theme="dark"] .detail-field,
body[data-theme="dark"] .metric-card,
body[data-theme="dark"] .activity-main strong,
body[data-theme="dark"] .category-totals b { color: #fff; }
body[data-theme="dark"] p,
body[data-theme="dark"] small,
body[data-theme="dark"] .muted,
body[data-theme="dark"] .page-heading p,
body[data-theme="dark"] .card-header p,
body[data-theme="dark"] .metric-card p,
body[data-theme="dark"] .activity-main small,
body[data-theme="dark"] .table-help,
body[data-theme="dark"] .form-submit-bar p,
body[data-theme="dark"] .detail-field p,
body[data-theme="dark"] .detail-field p small,
body[data-theme="dark"] .topbar-context,
body[data-theme="dark"] .sidebar-note { color: #dedede; }
body[data-theme="dark"] .data-table td,
body[data-theme="dark"] .summary-table td,
body[data-theme="dark"] .simple-table td,
body[data-theme="dark"] .progress-table td { color: #f8f8f8; }
body[data-theme="dark"] .progress-table td.negative-gap,
body[data-theme="dark"] .data-table td.negative-gap { color: #ff6b6b; }
body[data-theme="dark"] .progress-table td.positive-gap,
body[data-theme="dark"] .data-table td.positive-gap { color: #5ee58a; }
body[data-theme="dark"] .data-table th,
body[data-theme="dark"] .data-table th small,
body[data-theme="dark"] .summary-table th,
body[data-theme="dark"] .summary-table th small,
body[data-theme="dark"] .simple-table th,
body[data-theme="dark"] .progress-table th { color: #ededed; }
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder { color: #bfc3c9; opacity: 1; }
body[data-theme="dark"] .detail-card,
body[data-theme="dark"] .detail-card form,
body[data-theme="dark"] .detail-grid { color: #fff; }
body[data-theme="dark"] .detail-field { background: #101010; border-color: #3d3d3d; }
body[data-theme="dark"] .detail-field p,
body[data-theme="dark"] .detail-field p > span { color: #fff !important; font-weight: 700; }
body[data-theme="dark"] .detail-field p small { color: #e2e2e2 !important; font-weight: 600; }
body[data-theme="dark"] .detail-field input,
body[data-theme="dark"] .detail-field select,
body[data-theme="dark"] .detail-field textarea { background: #000; color: #fff; border-color: #555; caret-color: #fff; }
body[data-theme="dark"] .detail-field input:focus,
body[data-theme="dark"] .detail-field select:focus,
body[data-theme="dark"] .detail-field textarea:focus { border-color: #72b4ff; box-shadow: 0 0 0 2px rgba(114,180,255,.28); }
body[data-theme="dark"] .detail-field code { background: #1b1b1b; color: #e8f2ff; }
body[data-theme="dark"] .detail-save,
body[data-theme="dark"] .section-title p { color: #ededed; }
body[data-theme="dark"] .form-section .section-title h2,
body[data-theme="dark"] .form-section .section-title p,
body[data-theme="dark"] .form-section .form-field label { color: #fff !important; }
body[data-theme="dark"] .form-section .form-field label small { color: #dedede !important; }
body[data-theme="dark"] .form-section input,
body[data-theme="dark"] .form-section select,
body[data-theme="dark"] .form-section textarea { color: #fff; background: #000; border-color: #555; }
body[data-theme="dark"] .form-section input[type="file"] { background: #0b0b0b; color: #f5f5f5; }

@media (max-width: 500px) {
    .login-page { padding: 16px; }
    .login-page .login-logo-wrap { height: 100px; }
    .login-page .login-logo { width: min(230px, 84%); }
    .login-page .card-body { padding: 24px 22px; }
}

/* Horizontal SSG navigation shell */
:root { --topbar-height: 72px; }
.topbar {
    height: var(--topbar-height);
    padding: 0 28px;
    gap: 18px;
    color: #fff;
    background: linear-gradient(90deg, #153777 0%, #214b93 100%);
    border-bottom: 3px solid #f6aa19;
    box-shadow: 0 2px 10px rgba(10,35,78,.2);
}
.topbar .brand { flex: 0 0 auto; gap: 7px; color: #fff; }
.topbar .brand strong { color: #ffb21c; font-size: 15px; letter-spacing: .04em; }
.topbar-logo-wrap { width: 58px; height: 42px; }
.topbar .logo-light { display: none; }
.topbar .logo-dark { display: block; }
.header-nav { display: flex; align-items: stretch; align-self: stretch; min-width: 0; flex: 1; gap: 2px; }
.header-nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    color: #fff;
    border-radius: 7px 7px 0 0;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.header-nav-item::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.header-nav-item:hover,
.header-nav-item:focus-visible { color: #fff; background: rgba(255,255,255,.13); }
.header-nav-item.active { color: #ffb21c; background: rgba(255,255,255,.1); }
.header-nav-item.active::after { background: #ffb21c; }
.topbar .user-menu { flex: 0 0 auto; gap: 10px; color: #fff; }
.topbar .user-name { color: #fff; font-weight: 700; }
.topbar .link-button { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.topbar .link-button:hover { color: #ffca63; background: rgba(255,255,255,.1); }
.topbar .theme-toggle { color: #fff; background: rgba(255,255,255,.12); }
.topbar .theme-toggle:hover { color: #fff; background: rgba(255,255,255,.23); }
.main-content { margin-left: 0; padding: calc(var(--topbar-height) + 38px) 34px 52px; }
.main-content > section { max-width: 1680px; }
.sidebar { display: none; }

body[data-theme="dark"] .topbar { color: #fff; background: linear-gradient(90deg, #071a3d 0%, #102d63 100%); border-bottom-color: #f6aa19; }
body[data-theme="dark"] .header-nav-item { color: #fff; }
body[data-theme="dark"] .header-nav-item:hover,
body[data-theme="dark"] .header-nav-item:focus-visible { color: #fff; background: rgba(255,255,255,.16); }
body[data-theme="dark"] .header-nav-item.active { color: #ffc34d; background: rgba(255,255,255,.12); }

@media (max-width: 1180px) {
    .topbar { padding: 0 16px; }
    .header-nav-item { padding: 0 8px; font-size: 12px; }
    .topbar-logo-wrap { width: 50px; }
}

@media (max-width: 900px) {
    :root { --topbar-height: 60px; }
    .topbar { padding: 0 12px; gap: 10px; }
    .mobile-menu { display: inline-grid; flex: 0 0 auto; color: #fff; background: rgba(255,255,255,.14); }
    .topbar .brand { margin-right: auto; }
    .topbar-logo-wrap { width: 48px; height: 36px; }
    .header-nav {
        display: none;
        position: fixed;
        top: var(--topbar-height);
        left: 0;
        right: 0;
        height: auto;
        padding: 10px;
        flex-direction: column;
        align-items: stretch;
        color: #fff;
        background: #153777;
        border-bottom: 3px solid #f6aa19;
        box-shadow: 0 10px 24px rgba(0,0,0,.3);
        z-index: 45;
    }
    body.sidebar-open .header-nav { display: flex; }
    .header-nav-item { min-height: 44px; padding: 10px 14px; border-radius: 6px; }
    .header-nav-item::after { inset: auto auto 7px 14px; width: 32px; }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: var(--topbar-height) 0 0; background: rgba(0,0,0,.48); z-index: 35; }
    .main-content { margin-left: 0; padding: calc(var(--topbar-height) + 24px) 16px 40px; }
}

@media (max-width: 560px) {
    .topbar .brand > span:last-child { display: none; }
    .topbar .user-name { display: none; }
    .topbar .user-menu { gap: 3px; }
    .topbar .link-button { font-size: 12px; }
}
.password-input-wrap { position: relative; }
.priority-progress { scroll-margin-top: calc(var(--topbar-height) + 18px); margin: 0 0 24px; border-top: 3px solid #f6aa19; }
.priority-progress .card-header p { line-height: 1.6; }
.priority-progress .form-field:has(#target), .priority-progress .form-field:has(#achievement) { padding: 10px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); }
.password-input-wrap input { padding-right: 46px; }
.password-toggle { position: absolute; top: 50%; right: 5px; width: 36px; height: 34px; transform: translateY(-50%); border: 0; border-radius: 5px; color: #52606f; background: transparent; cursor: pointer; font-size: 18px; line-height: 1; }
.password-toggle:hover, .password-toggle:focus-visible { color: var(--blue); background: var(--blue-soft); outline: none; }
.password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.password-toggle .eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: inline; }
body[data-theme="dark"] .password-toggle { color: #e4e4e4; }
body[data-theme="dark"] .password-toggle:hover, body[data-theme="dark"] .password-toggle:focus-visible { color: #fff; background: #292929; }

/* Shared SSG product login shell */
.login-page {
    display: block;
    min-height: 100vh;
    padding: 52px 24px;
    background: linear-gradient(110deg, #edf5ff 0%, #f7f9fc 56%, #fff8e9 100%);
}
.login-page .login-theme-toggle {
    top: 16px;
    right: 16px;
    border: 1px solid rgba(25, 55, 96, .18);
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 3px 12px rgba(20, 42, 75, .12);
}
.login-page .login-shell {
    width: min(930px, 100%);
    min-height: min(868px, calc(100vh - 104px));
    margin: 0 auto;
    padding: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1.34fr) minmax(330px, 1fr);
    gap: 12px;
    align-items: stretch;
    border: 1px solid #d7e1ef;
    border-radius: 22px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 22px 55px rgba(25, 49, 83, .13);
}
.login-showcase,
.login-page .login-card {
    min-width: 0;
    border: 1px solid #dbe3ee;
    border-radius: 17px;
    background: rgba(255, 255, 255, .72);
}
.login-showcase {
    display: flex;
    align-items: center;
    padding: 46px;
}
.login-showcase-content { width: 100%; }
.login-page .login-logo-wrap {
    width: 205px;
    height: 112px;
    margin: 0 0 7px;
    justify-content: flex-start;
}
.login-page .login-logo {
    width: 100%;
    height: 100%;
    margin: 0;
    object-position: left center;
}
.login-page .login-brand-caption {
    margin: 0 0 13px;
    color: #21448c;
    text-align: left;
    font-size: 8px;
    letter-spacing: .18em;
}
.login-showcase h1 {
    margin: 0;
    color: #172033;
    font-size: clamp(32px, 3vw, 42px);
    line-height: 1.08;
    letter-spacing: -.045em;
}
.login-showcase h1 .login-heading-line { display: block; white-space: nowrap; }
.login-showcase h1 .accent { color: #f6a914; }
.login-intro-copy {
    max-width: 505px;
    margin: 19px 0 27px;
    color: #647086;
    font-size: 14px;
    line-height: 1.55;
}
.login-capability-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.login-capability-grid article {
    min-height: 96px;
    padding: 15px;
    border: 1px solid #d5e0ed;
    border-radius: 12px;
    background: rgba(255, 255, 255, .66);
    box-shadow: 0 7px 18px rgba(24, 51, 84, .05);
}
.login-capability-grid h3 {
    margin: 0 0 8px;
    color: #1e3d77;
    font-size: 12px;
}
.login-capability-grid p {
    margin: 0;
    color: #68758a;
    font-size: 11px;
    line-height: 1.45;
}
.login-page .login-card {
    display: flex;
    align-items: center;
    padding: 46px;
}
.login-form-content { width: 100%; }
.login-access-label {
    margin: 0 0 8px;
    color: #21448c;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .16em;
}
.login-page .login-card h2 {
    margin: 0 0 7px;
    color: #172033;
    font-size: 25px;
    letter-spacing: -.025em;
}
.login-form-copy {
    margin: 0 0 22px;
    color: #738096;
    font-size: 11px;
}
.login-page .stack-form { margin-top: 16px; }
.login-page .stack-form label { color: #26354d; font-size: 11px; }
.login-page .stack-form input {
    min-height: 42px;
    border-color: #bdcadc;
    border-radius: 8px;
    background: #fff;
}
.login-page .stack-form input:focus {
    border-color: #2f6ecb;
    box-shadow: 0 0 0 3px rgba(47, 110, 203, .14);
}
.login-page .ssg-button {
    min-height: 43px;
    border-color: #f6a914 !important;
    border-radius: 8px;
    background: #214b93 !important;
}
.login-page .ssg-button:hover { background: #173d7d !important; }

body.login-page[data-theme="dark"] {
    background: radial-gradient(circle at 13% 17%, #07101e 0, #02070e 43%, #070705 100%);
}
body.login-page[data-theme="dark"] .login-theme-toggle {
    color: #fff;
    border-color: #4b5260;
    background: #25272b;
}
body[data-theme="dark"] .login-page .login-shell,
body.login-page[data-theme="dark"] .login-shell {
    border-color: #18365c;
    background: rgba(6, 13, 22, .88);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .48);
}
body.login-page[data-theme="dark"] .login-showcase,
body.login-page[data-theme="dark"] .login-card {
    border-color: #263241;
    background: #0b1119;
}
body.login-page[data-theme="dark"] .login-brand-caption,
body.login-page[data-theme="dark"] .login-access-label { color: #f6a914; }
body.login-page[data-theme="dark"] .login-showcase h1,
body.login-page[data-theme="dark"] .login-card h2,
body.login-page[data-theme="dark"] .stack-form label { color: #fff; }
body.login-page[data-theme="dark"] .login-intro-copy,
body.login-page[data-theme="dark"] .login-form-copy { color: #bec8d7; }
body.login-page[data-theme="dark"] .login-capability-grid article {
    border-color: #29415f;
    background: #0c141e;
    box-shadow: none;
}
body.login-page[data-theme="dark"] .login-capability-grid h3 { color: #f3f7ff; }
body.login-page[data-theme="dark"] .login-capability-grid p { color: #b8c4d4; }
body.login-page[data-theme="dark"] .stack-form input {
    color: #fff;
    border-color: #34465d;
    background: #161d27;
}
body.login-page[data-theme="dark"] .stack-form input:focus {
    border-color: #5c91df;
    box-shadow: 0 0 0 3px rgba(92, 145, 223, .19);
}

@media (max-width: 820px) {
    .login-page { padding: 54px 16px 24px; }
    .login-page .login-shell {
        min-height: auto;
        grid-template-columns: 1fr;
    }
    .login-showcase,
    .login-page .login-card { padding: 34px; }
    .login-showcase h1 .login-heading-line { white-space: normal; }
}
@media (max-width: 500px) {
    .login-showcase,
    .login-page .login-card { padding: 25px 21px; }
    .login-page .login-logo-wrap { width: 170px; height: 92px; }
    .login-showcase h1 { font-size: 31px; }
    .login-capability-grid { grid-template-columns: 1fr; }
}
