:root {
  color-scheme: light;
  --navy: #10264b;
  --navy-2: #1d3f72;
  --yellow: #ffe500;
  --ink: #172540;
  --muted: #6c7a91;
  --line: #dce4ef;
  --surface: #ffffff;
  --bg: #f2f6fb;
  --green: #12834a;
  --red: #b42318;
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); }
button, input, select { font: inherit; }
button { cursor: pointer; }

.login-page { position: relative; isolation: isolate; min-height: 100vh; overflow: hidden; background: #000; }
.login-background-video, .login-video-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.login-background-video { z-index: -2; object-fit: cover; object-position: 70% center; }
.login-video-overlay { z-index: -1; background: linear-gradient(90deg, #01040bf2 0%, #01040bcc 31%, #0006 58%, #0002 100%); }
.brand { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.brand img { width: 46px; height: 46px; object-fit: cover; border-radius: 13px; border: 2px solid #ffffff55; }
.brand strong { display: block; font-size: 22px; }
.brand span { font-size: 13px; color: #becbe0; }
.entry-badge { display: inline-flex; align-items: center; gap: 9px; width: max-content; margin: 0 0 22px; padding: 8px 13px; border: 1px solid #ffffff30; border-radius: 999px; color: #e2eaf5; background: #ffffff12; font-size: 12px; font-weight: 750; backdrop-filter: blur(16px); }
.entry-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 5px #ffe5001f; }
.login-panel { display: flex; align-items: center; min-height: 100vh; padding: clamp(28px, 5vw, 72px); }
.login-card { width: min(430px, 100%); margin-left: clamp(0px, 4vw, 64px); padding: clamp(28px, 4vw, 44px); border: 1px solid #ffffff; border-radius: 28px; background: #fffffff5; box-shadow: 0 28px 90px #0008, inset 0 1px 0 white; backdrop-filter: blur(16px); }
.login-card-brand { margin-bottom: 32px; color: var(--navy); }
.login-card-brand img { border-color: #d9e1ec; }
.login-card-brand span { color: #718096; }
.login-form-badge { margin-bottom: 24px; border-color: #dbe3ed; color: #4f5d70; background: #f7f9fb; backdrop-filter: none; }
.eyebrow { color: #2f62ad; font-size: 12px; font-weight: 800; letter-spacing: .13em; }
.login-card h2 { margin: 10px 0 10px; font-size: clamp(32px, 4vw, 42px); letter-spacing: -.045em; }
.login-card > p:not(.entry-badge) { color: var(--muted); margin: 0 0 31px; line-height: 1.65; }
.field { display: grid; gap: 8px; margin: 0 0 17px; }
.field label { font-size: 13px; font-weight: 700; }
.field input { width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; outline: none; color: var(--ink); background: #f8fafc; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.field input:focus { border-color: #2e64b4; background: white; box-shadow: 0 0 0 4px #2e64b419; }
.primary { border: 0; border-radius: 11px; padding: 13px 18px; color: var(--navy); background: var(--yellow); font-weight: 800; box-shadow: 0 8px 22px #a88f0030; }
.primary:hover { filter: brightness(.97); }
.primary:disabled { opacity: .55; cursor: not-allowed; }
.login-card .primary { width: 100%; min-height: 50px; margin-top: 7px; border-radius: 14px; }
.message { min-height: 22px; margin: 14px 0 0; color: var(--red); font-size: 13px; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 236px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 18px; color: white; background: var(--navy); }
.sidebar .brand { padding: 0 5px 28px; }
.nav-label { color: #8294b1; font-size: 11px; letter-spacing: .12em; margin: 14px 8px 10px; }
.nav-item { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; border-radius: 10px; padding: 12px 13px; margin-bottom: 6px; color: #d6dfed; background: transparent; text-decoration: none; }
.nav-item.active { color: var(--navy); background: var(--yellow); font-weight: 800; }
.sidebar-footer { position: absolute; left: 18px; right: 18px; bottom: 22px; }
.sidebar-footer button { width: 100%; border: 1px solid #ffffff28; border-radius: 10px; padding: 10px; color: white; background: #ffffff0d; }
.main { min-width: 0; }
.topbar { height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--line); background: white; }
.topbar small { color: var(--muted); }
.content { padding: 32px 34px 60px; }
.page-title { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 24px; }
.page-title h1 { margin: 6px 0 4px; font-size: 30px; }
.page-title p { margin: 0; color: var(--muted); }
.page-actions, .period-switch { display: flex; align-items: center; gap: 8px; }
.period-switch { padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.period-switch button { border: 0; border-radius: 8px; padding: 8px 12px; color: var(--muted); background: transparent; font-weight: 800; }
.period-switch button.active { color: var(--navy); background: var(--yellow); }
.card { background: white; border: 1px solid #e0e7f0; border-radius: 16px; box-shadow: 0 8px 26px #1939670a; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.metric { padding: 18px 20px; }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin-top: 7px; font-size: 28px; }
.table-card { overflow: hidden; }
.table-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.table-head h2 { margin: 0; font-size: 18px; }
.outline { border: 1px solid #bfcce0; border-radius: 9px; padding: 9px 12px; color: var(--navy-2); background: white; font-weight: 700; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 20px; text-align: left; border-bottom: 1px solid #edf1f6; font-size: 13px; }
th { color: var(--muted); font-size: 11px; letter-spacing: .04em; background: #f8fafd; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.active { color: var(--green); }
.status.paused { color: var(--red); }
.empty { padding: 44px; text-align: center; color: var(--muted); }
.subtle { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.notice { margin: 0 0 18px; padding: 13px 16px; border: 1px solid #cbd8ea; border-radius: 11px; color: #244f89; background: #eef5ff; font-size: 13px; }
.notice.success { border-color: #a9dbc0; color: #0d6b3b; background: #edf9f2; }
.notice.error { border-color: #efc2bd; color: var(--red); background: #fff3f1; }
.dashboard-filters { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 14px; padding: 18px; margin-bottom: 18px; }
.dashboard-filters label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.dashboard-filters select { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; color: var(--ink); background: white; }
.campaign-card { padding: 20px; margin-bottom: 18px; }
.campaign-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.campaign-summary h2 { margin: 0 0 6px; font-size: 21px; }
.campaign-summary p { margin: 0; color: var(--muted); font-size: 13px; }
.campaign-badges { padding: 10px 13px; border-radius: 9px; color: #244f89; background: #eef5ff; font-size: 13px; font-weight: 700; }
.ad-metrics-card { margin-bottom: 18px; overflow: hidden; }
.overview-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 14px; margin-bottom: 18px; }
.overview-card { overflow: hidden; }
.sales-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px 20px; }
.sales-metric-grid .empty { grid-column: 1 / -1; }
.ad-metrics-card > .notice { margin: 14px 20px 0; }
.ad-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 18px 20px; }
.ad-metric-grid .empty { grid-column: 1 / -1; }
.ad-metric { min-width: 0; padding: 14px 15px; border: 1px solid #e5ebf3; border-radius: 11px; background: #f7f9fc; }
.ad-metric span { display: block; color: var(--muted); font-size: 11px; }
.ad-metric strong { display: block; margin-top: 6px; font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analysis-toolbar { display: grid; grid-template-columns: auto 1fr minmax(240px, 340px); align-items: center; gap: 12px; padding: 0 20px 16px; }
.analysis-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 18px 20px; }
.analysis-overview > div { padding: 14px 15px; border: 1px solid #e5ebf3; border-radius: 11px; background: #f7f9fc; }
.analysis-overview span { display: block; color: var(--muted); font-size: 11px; }
.analysis-overview strong { display: block; margin-top: 6px; font-size: 16px; }
.analysis-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.analysis-filter { border: 1px solid #cbd6e5; border-radius: 999px; padding: 8px 13px; color: var(--navy); background: white; font-weight: 800; }
.analysis-filter.active { border-color: var(--yellow); background: var(--yellow); }
.analysis-search { width: min(320px, 100%); }
.analysis-search input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; outline: none; background: white; }
.analysis-status select { min-width: 120px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; color: var(--ink); background: white; }
.analysis-search input:focus { border-color: #2e64b4; box-shadow: 0 0 0 3px #2e64b421; }
.sort-button { border: 0; padding: 0; color: inherit; background: transparent; font: inherit; font-weight: 800; white-space: nowrap; }
.analysis-badge { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-weight: 800; }
.analysis-badge.continue { color: #08733f; background: #e5f7ed; }
.analysis-badge.observe { color: #8a5a00; background: #fff4cf; }
.analysis-badge.not_recommended { color: #a3261c; background: #fde9e7; }
.analysis-reason { max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.metrics-table-wrap { max-height: 520px; overflow: auto; border-top: 1px solid var(--line); }
.metrics-table-wrap table { min-width: 1780px; }
.metrics-table-wrap th { position: sticky; z-index: 1; top: 0; white-space: nowrap; }
.metrics-table-wrap td { white-space: nowrap; }
.metrics-table-wrap td:nth-child(3) { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.amount { font-variant-numeric: tabular-nums; }
.product-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line); }
.product-actions > div { display: flex; flex-wrap: wrap; gap: 8px; }
.select-cell { width: 42px; text-align: center; }
.select-cell input { width: 17px; height: 17px; accent-color: var(--yellow); }
.row-action { border: 1px solid #cbd6e5; border-radius: 8px; padding: 6px 10px; color: var(--navy); background: white; font-weight: 800; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.authorized-stores { min-width: 230px; max-width: 520px; }
.authorized-stores summary { cursor: pointer; color: var(--navy); font-weight: 800; }
.authorized-store-list { display: grid; gap: 8px; margin-top: 10px; }
.authorized-store-item { display: grid; gap: 3px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; }
.authorized-store-item span { color: var(--muted); font-size: 12px; line-height: 1.5; }

dialog { width: min(470px, calc(100vw - 32px)); border: 0; border-radius: 16px; padding: 0; box-shadow: 0 30px 90px #11233c55; }
dialog::backdrop { background: #10264b90; backdrop-filter: blur(3px); }
.dialog-body { padding: 24px; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 20px; }
.dialog-head h2 { margin: 0 0 5px; }
.dialog-head p { margin: 0; color: var(--muted); font-size: 13px; }
.icon-button { border: 0; border-radius: 8px; width: 34px; height: 34px; background: #f1f4f8; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 23px; }
.wide-dialog { width: min(1120px, calc(100vw - 32px)); }
.candidate-dialog-body { padding: 22px; }
.candidate-tools { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.candidate-tools input, .candidate-pagination select { border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; background: white; }
.candidate-status { min-height: 20px; margin: 12px 0; color: var(--muted); font-size: 13px; }
.candidate-table-wrap { max-height: 540px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.candidate-table-wrap table { min-width: 1050px; }
.candidate-table-wrap th { position: sticky; z-index: 1; top: 0; white-space: nowrap; }
.candidate-table-wrap td { white-space: nowrap; }
.candidate-table-wrap td:nth-child(3) { max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.candidate-footer, .candidate-pagination, .candidate-submit-actions { display: flex; align-items: center; gap: 9px; }
.candidate-footer { justify-content: space-between; margin-top: 14px; }
.confirm-list { max-height: 240px; overflow: auto; padding: 12px; border-radius: 10px; background: #f6f8fb; white-space: pre-wrap; }
.candidate-pagination, .candidate-submit-actions { flex-wrap: wrap; }

.seller-page { min-height: 100vh; background: #eef3f8; }
.erp-workspace { position: relative; overflow: hidden; background: #eef3f8; }
.erp-topbar {
  position: relative; z-index: 4; display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; padding: 14px 34px; border-bottom: 1px solid #ffffffb8;
  background: #ffffffd1; box-shadow: 0 8px 30px #2337560a; backdrop-filter: blur(26px) saturate(170%);
}
.erp-topbar > div, .erp-account { display: flex; align-items: center; gap: 10px; }
.erp-topbar > div:first-child { align-items: baseline; }
.erp-topbar strong { font-size: 15px; letter-spacing: -.01em; }
.erp-topbar > div:first-child span, .erp-account > span:first-child { color: #6b7280; font-size: 11px; }
.erp-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: white; background: #171a21; font-size: 12px; font-weight: 800; }
.erp-welcome-content { position: relative; isolation: isolate; min-height: calc(100vh - 72px); padding: 0 clamp(24px, 5vw, 72px) 32px; background: radial-gradient(circle at 85% 5%, #d7e8f8 0, transparent 30%), linear-gradient(#f6f9fc 0 760px, #eef3f8 980px); }
.erp-background-video, .erp-video-overlay { position: absolute; z-index: -2; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.erp-background-video { object-fit: cover; object-position: center; opacity: .56; }
.erp-video-overlay { z-index: -1; background: linear-gradient(180deg, #f6f9fce3 0%, #f4f8fbc9 48%, #eef3f8 100%), radial-gradient(circle at 50% 18%, #ffffff2e, transparent 48%); }
.erp-hero { display: grid; grid-template-columns: minmax(320px, .85fr) minmax(460px, 1.15fr); align-items: center; gap: clamp(32px, 4vw, 72px); padding: clamp(32px, 4vh, 48px) 0 26px; }
.erp-intro { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; }
.erp-health { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 16px; padding: 8px 13px; border: 1px solid #ffffffc7; border-radius: 999px; color: #4f5a69; background: #ffffff9c; box-shadow: 0 8px 24px #2746690d; font-size: 12px; font-weight: 750; backdrop-filter: blur(16px); }
.erp-health span, .erp-connection-dot { width: 7px; height: 7px; border-radius: 50%; background: #2eb36a; box-shadow: 0 0 0 5px #2eb36a1f; }
.erp-intro h1 { max-width: 700px; margin: 0 0 16px; font-size: clamp(44px, 4.8vw, 72px); font-weight: 730; line-height: .94; letter-spacing: -.06em; font-optical-sizing: auto; }
.erp-intro h1 em { font-family: Georgia, "Songti SC", serif; font-weight: 500; }
.erp-lead { max-width: 660px; margin: 0; color: #596575; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.75; }
.erp-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 12px; margin-top: 20px; }
.erp-primary, .erp-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px; border-radius: 999px; font-size: 13px; font-weight: 800; text-decoration: none; touch-action: manipulation; }
.erp-primary { border: 0; color: var(--navy); background: var(--yellow); box-shadow: 0 13px 30px #a88f0030; }
.erp-secondary { color: var(--navy); border: 1px solid #ffffffd4; background: #ffffffb8; box-shadow: inset 0 1px 0 white, 0 9px 26px #34435c12; backdrop-filter: blur(16px); }
.erp-primary:active, .erp-secondary:active, .erp-module-card:active { transform: scale(.97); }
.erp-primary:focus-visible, .erp-secondary:focus-visible, .erp-module-card:focus-visible { outline: 3px solid #1967ff45; outline-offset: 3px; }
.erp-status-card { width: 100%; margin-top: 0; padding: 12px; border: 1px solid #ffffffd9; border-radius: 27px; background: #ffffff70; box-shadow: inset 0 1px 0 white, 0 30px 80px #2234541c; backdrop-filter: blur(32px) saturate(155%); transform-style: preserve-3d; }
.erp-preview-bar, .erp-preview-bar > div { display: flex; align-items: center; }
.erp-preview-bar { justify-content: space-between; gap: 14px; min-height: 42px; padding: 0 8px 10px; color: #293443; font-size: 11px; }
.erp-preview-bar > div { gap: 8px; }
.erp-preview-bar small { color: #7a8492; }
.erp-preview-logo { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: var(--navy); background: var(--yellow); font-weight: 900; }
.erp-preview-account { max-width: 180px; overflow: hidden; color: #697484; text-overflow: ellipsis; white-space: nowrap; }
.erp-preview-layout { min-height: 210px; overflow: hidden; border: 1px solid #e4eaf2; border-radius: 18px; background: #fbfcfe; }
.erp-preview-main { min-width: 0; padding: 21px; background: linear-gradient(145deg, #fbfcfe, #f2f6fa); }
.erp-preview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.erp-preview-heading p { margin: 0 0 4px; color: #7c8795; font-size: 10px; }
.erp-preview-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.04em; }
.erp-preview-heading > span { padding: 6px 9px; border-radius: 999px; color: #1d7147; background: #e5f7ed; font-size: 9px; font-weight: 800; }
.erp-preview-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 20px 0 12px; }
.erp-preview-metrics > div { min-width: 0; padding: 15px; border: 1px solid #e5eaf1; border-radius: 13px; background: white; box-shadow: 0 8px 22px #263c5708; }
.erp-status-card dt { color: #748090; font-size: 10px; }
.erp-status-card dd { margin: 8px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.04em; }
.erp-status-card .erp-connection { display: flex; align-items: center; gap: 8px; color: #238a55; font-size: 11px; letter-spacing: 0; }
.erp-connection.unavailable { color: #8a5a00; }
.erp-connection.unavailable .erp-connection-dot { background: #d39416; box-shadow: 0 0 0 5px #d394161f; }
.erp-modules { position: relative; z-index: 1; scroll-margin-top: 24px; margin-top: 0; }
.erp-section-heading { margin-bottom: 14px; }
.erp-section-heading p { margin: 0 0 6px; color: #737986; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.erp-section-heading h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.035em; }
.erp-module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.erp-module-card { position: relative; min-height: 146px; padding: 20px; border: 1px solid #ffffffd1; border-radius: 25px; color: #171a21; background: #ffffffb8; box-shadow: inset 0 1px 0 white, 0 16px 44px #1f2c490f; backdrop-filter: blur(24px) saturate(155%); text-decoration: none; transition: box-shadow .25s ease; }
a.erp-module-card:hover { box-shadow: inset 0 1px 0 white, 0 25px 58px #1f2c4924; }
.erp-module-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 20px; border-radius: 12px; background: white; box-shadow: 0 8px 20px #23314b12; font-size: 17px; }
.erp-module-arrow { position: absolute; top: 21px; right: 21px; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #ffffffd9; font-size: 12px; }
.erp-module-card h3 { margin: 0 0 7px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.erp-module-card p { margin: 0; color: #535a67; font-size: 14px; line-height: 1.6; }
.erp-module-future { cursor: default; }
.erp-module-state { position: absolute; right: 20px; bottom: 20px; color: #646b77; font-size: 11px; font-weight: 800; letter-spacing: .04em; }

@media (max-width: 980px) {
  .erp-hero { grid-template-columns: 1fr; padding-top: 56px; }
  .erp-intro { align-items: center; text-align: center; }
  .erp-actions { justify-content: center; }
  .erp-status-card { max-width: 820px; }
  .erp-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .erp-module-card { min-height: 150px; }
}

@media (max-width: 620px) {
  .erp-module-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .login-background-video, .erp-background-video { display: none; }
  .erp-intro, .erp-status-card, .erp-module-card { will-change: auto; }
  .erp-primary:active, .erp-secondary:active, .erp-module-card:active { transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .erp-topbar, .erp-status-card, .erp-module-card, .erp-secondary, .entry-badge { background: #fff; backdrop-filter: none; }
}

@media (prefers-contrast: more) {
  .erp-topbar, .erp-status-card, .erp-module-card, .erp-secondary, .login-card { border: 1px solid #596273; background: #fff; }
}

@media (max-width: 820px) {
  .login-panel { justify-content: center; padding: 36px 24px; }
  .login-card { margin-left: 0; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; z-index: 10; display: flex; align-items: center; gap: 8px; width: 100%; height: auto; padding: 12px 16px; overflow-x: auto; }
  .sidebar .brand { flex: 0 0 auto; padding: 0 14px 0 0; }
  .sidebar .brand img { width: 38px; height: 38px; border-radius: 10px; }
  .sidebar .brand strong { font-size: 17px; white-space: nowrap; }
  .sidebar .brand span, .nav-label { display: none; }
  .nav-item { flex: 0 0 auto; width: auto; margin: 0; padding: 10px 12px; white-space: nowrap; }
  .sidebar-footer { position: static; flex: 0 0 auto; margin-left: auto; }
  .sidebar-footer button { white-space: nowrap; }
  .topbar { height: auto; min-height: 68px; padding: 14px 20px; }
  .erp-topbar { min-height: 64px; padding: 12px 20px; }
  .erp-welcome-content { min-height: calc(100vh - 64px); padding: 0 20px 44px; }
  .erp-hero { padding: 44px 0; }
  .erp-intro h1 { font-size: clamp(42px, 12vw, 60px); }
  .erp-status-card { border-radius: 24px; }
  .erp-module-card { border-radius: 22px; }
  .content { padding: 22px 20px 44px; }
  .page-title { align-items: stretch; flex-direction: column; }
  .page-actions { align-items: stretch; flex-direction: column; }
  .page-title .primary { width: 100%; }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-filters { grid-template-columns: 1fr; }
  .campaign-summary { align-items: flex-start; flex-direction: column; }
  .analysis-toolbar { align-items: stretch; flex-direction: column; }
  .product-actions, .candidate-footer { align-items: stretch; flex-direction: column; }
  .candidate-tools { grid-template-columns: 1fr auto auto; }
  .analysis-search { width: 100%; }
  .ad-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .metric { padding: 15px; }
  .metric strong { font-size: 24px; }
  .table-card { overflow-x: auto; }
}

@media (max-width: 520px) {
  .login-panel { padding: 24px 16px; }
  .login-card { padding: 28px 22px; border-radius: 24px; }
  .erp-preview-metrics { grid-template-columns: 1fr; }
  .erp-preview-bar small, .erp-preview-account { display: none; }
  .erp-preview-main { padding: 17px; }
  .topbar { align-items: flex-start; gap: 10px; }
  .metrics { grid-template-columns: 1fr; }
  .ad-metric-grid { grid-template-columns: 1fr; }
  .candidate-tools { grid-template-columns: 1fr 1fr; }
  .candidate-tools input { grid-column: 1 / -1; }
}
