:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-muted: #f8fafb;
  --ink: #182434;
  --muted: #76818b;
  --border: #e2e8ec;
  --mint: #56b98d;
  --mint-deep: #269d70;
  --mint-soft: #e9f7f1;
  --coral: #ff6f61;
  --coral-soft: #fff0ed;
  --amber: #f3ad32;
  --amber-soft: #fff5df;
  --blue: #4c92e8;
  --blue-soft: #edf5ff;
  --red: #c93e32;
  --shadow: 0 10px 30px rgba(29, 48, 63, .055);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body { min-height: 100%; margin: 0; color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.5; letter-spacing: 0; }
button, input, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; touch-action: manipulation; }
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { cursor: not-allowed; opacity: .52; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(86, 185, 141, .22); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 26px; line-height: 1.25; }
h2 { font-size: 22px; line-height: 1.35; }
h3 { font-size: 16px; line-height: 1.4; }
svg { display: block; }
.hidden { display: none !important; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; color: #fff; background: #174b3b; border-radius: 6px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.brand-cluster { display: flex; align-items: center; gap: 13px; white-space: nowrap; }
.brand-cluster > strong { font-size: 22px; font-weight: 800; }
.brand-logo { position: relative; display: block; width: 39px; height: 39px; flex: 0 0 39px; }
.brand-logo span { position: absolute; width: 11px; height: 11px; border-radius: 4px; background: var(--mint); }
.brand-logo span:nth-child(1) { top: 0; left: 14px; }
.brand-logo span:nth-child(2) { top: 7px; left: 2px; transform: rotate(45deg); }
.brand-logo span:nth-child(3) { top: 7px; right: 2px; transform: rotate(45deg); }
.brand-logo span:nth-child(4) { top: 14px; left: 14px; background: var(--mint-deep); }
.brand-logo span:nth-child(5) { bottom: 7px; left: 2px; transform: rotate(45deg); }
.brand-logo span:nth-child(6) { right: 2px; bottom: 7px; transform: rotate(45deg); }
.brand-logo span:nth-child(7) { bottom: 0; left: 14px; }
.brand-logo.small { width: 33px; height: 33px; flex-basis: 33px; transform: scale(.84); transform-origin: left center; }

.eyebrow { margin-bottom: 6px; color: #86919a; font-size: 11px; line-height: 1.2; font-weight: 800; }
.mint { color: #22966a; background: var(--mint-soft); }
.coral { color: #e85d50; background: var(--coral-soft); }
.amber { color: #c9830a; background: var(--amber-soft); }
.blue { color: #347fd3; background: var(--blue-soft); }

.login-view { min-height: 100vh; background: var(--bg); }
.login-brandbar { display: flex; align-items: center; min-height: 76px; padding: 0 clamp(22px, 5vw, 72px); border-bottom: 1px solid var(--border); background: #fff; box-shadow: 0 4px 16px rgba(29, 48, 63, .035); }
.login-stage { display: grid; min-height: calc(100vh - 76px); place-items: center; padding: 38px 24px; }
.login-workspace { display: grid; width: min(560px, 100%); grid-template-columns: 1fr; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.login-form-side { padding: clamp(36px, 5vw, 68px); }
.login-form-side h1 { margin-bottom: 28px; font-size: 32px; }
.stack-form { display: grid; gap: 10px; }
label { color: #4c5964; font-size: 13px; font-weight: 700; }
input, select { width: 100%; min-height: 44px; padding: 9px 12px; color: var(--ink); border: 1px solid #cfd8de; border-radius: 6px; background: #fff; }
input::placeholder { color: #a3adb4; }
.input-shell { position: relative; }
.input-shell > svg { position: absolute; top: 14px; left: 14px; width: 18px; height: 18px; color: #64727d; pointer-events: none; }
.input-shell input { min-height: 50px; padding-left: 44px; padding-right: 48px; }
.field-icon-button { position: absolute; top: 6px; right: 6px; display: grid; width: 38px; height: 38px; place-items: center; color: #6f7b84; border: 0; background: transparent; }
.field-icon-button svg { width: 18px; height: 18px; }
.form-error { min-height: 22px; margin-top: 10px; color: var(--red); font-size: 13px; }
.assurance-heading { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 27px; }
.assurance-heading h2 { font-size: 20px; }
.assurance-heading p:last-child { margin-top: 5px; color: var(--muted); }
.assurance-mark { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; color: #fff; border-radius: 50%; background: var(--mint); }
.assurance-mark svg { width: 24px; height: 24px; }
.assurance-list { display: grid; gap: 10px; }
.assurance-list article { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 76px; padding: 12px 15px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.status-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; }
.status-icon svg { width: 21px; height: 21px; }
.assurance-list strong, .assurance-list span { display: block; }
.assurance-list article div span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.assurance-list b { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.assurance-list b svg { width: 15px; height: 15px; }
.state-good { color: var(--mint-deep); }
.state-coral { color: var(--coral); }
.admin-assurance { margin-bottom: 16px; padding: 20px; }
.admin-assurance .assurance-heading { align-items: center; margin-bottom: 18px; }
.admin-assurance .assurance-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-assurance .assurance-list article { grid-template-columns: 42px minmax(0, 1fr); }
.admin-assurance .assurance-list b { grid-column: 2; }

.primary-button, .secondary-button, .text-button, .text-link, .row-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 6px; font-weight: 750; transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease; }
.primary-button svg, .secondary-button svg, .text-link svg, .row-action svg { width: 17px; height: 17px; }
.primary-button { min-height: 44px; padding: 0 18px; color: #fff; border: 1px solid var(--mint-deep); background: var(--mint-deep); }
.primary-button:hover { border-color: #16895e; background: #16895e; }
.login-submit { width: 100%; min-height: 50px; margin-top: 10px; font-size: 15px; }
.secondary-button { min-height: 38px; padding: 0 13px; color: #21875f; border: 1px solid #a9d9c5; background: #fff; }
.secondary-button:hover { border-color: var(--mint); background: var(--mint-soft); }
.text-button, .text-link { padding: 5px 0; color: var(--mint-deep); border: 0; background: transparent; }
.text-link:hover { color: #137a53; }

.app-shell { min-height: 100vh; }
.app-header { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto minmax(320px, 1fr) auto; align-items: stretch; min-height: 70px; border-bottom: 1px solid var(--border); background: #fff; box-shadow: 0 4px 18px rgba(29, 48, 63, .035); }
.app-brand { min-width: 250px; padding: 0 28px; border-right: 1px solid #edf0f2; }
.app-brand > div strong, .app-brand > div span { display: block; }
.app-brand > div strong { font-size: 20px; }
.app-brand > div span { margin-top: 1px; color: var(--muted); font-size: 11px; }
.top-nav { display: flex; align-items: stretch; min-width: 0; }
.nav-item { position: relative; display: inline-flex; min-width: 112px; min-height: 69px; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; color: #4e5a66; border: 0; border-right: 1px solid #f0f2f3; background: #fff; font-weight: 700; }
.nav-item::after { position: absolute; right: 16px; bottom: 0; left: 16px; height: 3px; border-radius: 3px 3px 0 0; background: transparent; content: ""; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item:hover { color: var(--mint-deep); background: #fbfdfc; }
.nav-item.active { color: var(--mint-deep); background: #f4fbf8; }
.nav-item.active::after { background: var(--mint); }
.header-actions { display: flex; align-items: center; gap: 10px; padding: 0 24px; }
.header-icon-button { position: relative; display: grid; width: 38px; height: 38px; place-items: center; color: #4e5963; border: 1px solid transparent; border-radius: 6px; background: #fff; }
.header-icon-button:hover { border-color: var(--border); background: #f8fafb; }
.header-icon-button svg { width: 18px; height: 18px; }
.notification-dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: var(--coral); }
.header-avatar { display: grid; width: 38px; height: 38px; place-items: center; color: #fff; border-radius: 50%; background: var(--mint); }
.header-avatar svg { width: 20px; height: 20px; }
.header-user { min-width: 92px; }
.header-user strong, .header-user span { display: block; }
.header-user strong { max-width: 120px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.header-user span { margin-top: 2px; color: var(--muted); font-size: 10px; }

.main-content { min-width: 0; }
.topbar { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 20px; padding: 13px clamp(20px, 4vw, 54px); border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .94); }
.topbar h1 { font-size: 20px; }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.sync-label { color: var(--muted); font-size: 12px; }
.sync-label strong { color: var(--ink); font-weight: 750; }
.content-wrap { width: min(1600px, 100%); margin: 0 auto; padding: 28px clamp(20px, 4vw, 54px) 52px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; max-width: min(390px, calc(100% - 40px)); color: var(--red); border: 1px solid #efbbb4; border-radius: 6px; background: #fff2f0; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast:not(:empty) { padding: 11px 15px; opacity: 1; transform: translateY(0); }
.toast.success:not(:empty) { color: #187d56; border-color: #b5dfcd; background: #edfaf4; }

.page-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-intro h2 { font-size: 26px; }
.page-intro p:not(.eyebrow) { margin-top: 6px; color: var(--muted); }
.channel-state { display: inline-flex; min-height: 34px; align-items: center; gap: 8px; padding: 0 12px; color: #23885f; border: 1px solid #b6dfce; border-radius: 999px; background: #effaf5; font-size: 12px; font-weight: 750; white-space: nowrap; }
.channel-state svg { width: 16px; height: 16px; }

.metric-grid { display: grid; gap: 16px; margin-bottom: 20px; }
.admin-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.promoter-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card { display: grid; min-height: 120px; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 18px; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: 0 4px 15px rgba(29, 48, 63, .035); }
.metric-icon { display: grid; width: 56px; height: 56px; flex: 0 0 56px; place-items: center; border-radius: 50%; }
.metric-icon svg { width: 26px; height: 26px; }
.metric-label, .metric-note { display: block; }
.metric-label { color: #68747e; font-weight: 700; }
.metric-card strong { display: block; margin: 7px 0 4px; font-size: 29px; line-height: 1; font-variant-numeric: tabular-nums; }
.metric-note { color: #909aa2; font-size: 11px; }

.surface-panel { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: 0 4px 16px rgba(29, 48, 63, .035); }
.panel-heading { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; border-bottom: 1px solid #ebeff1; }
.panel-heading h2 { font-size: 18px; }
.panel-tag { display: inline-flex; min-height: 27px; align-items: center; padding: 0 9px; border-radius: 5px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.mint-tag { color: #23885f; background: var(--mint-soft); }
.blue-tag { color: #3479c1; background: var(--blue-soft); }
.coral-tag { color: #ca5247; background: var(--coral-soft); }
.overview-grid { display: grid; grid-template-columns: minmax(440px, .92fr) minmax(560px, 1.08fr); gap: 16px; }
.overview-grid > *, .events-grid > * { min-width: 0; }
.trend-panel, .recent-panel { min-height: 405px; }
.trend-chart { display: grid; height: 262px; grid-template-columns: repeat(7, minmax(28px, 1fr)); align-items: end; gap: 14px; padding: 28px 28px 10px; border-bottom: 1px solid #eef1f2; }
.trend-day { display: grid; height: 100%; grid-template-rows: minmax(0, 1fr) auto; align-items: end; gap: 10px; text-align: center; }
.trend-bar-wrap { display: flex; height: 100%; align-items: end; justify-content: center; }
.trend-bar { position: relative; width: min(34px, 62%); min-height: 4px; border-radius: 4px 4px 1px 1px; background: var(--mint); }
.trend-day:nth-child(3n + 2) .trend-bar { background: var(--amber); }
.trend-day:nth-child(3n) .trend-bar { background: var(--blue); }
.trend-bar b { position: absolute; top: -22px; left: 50%; color: #50606b; font-size: 11px; transform: translateX(-50%); }
.trend-day span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.chart-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; padding: 15px 20px; color: var(--muted); font-size: 11px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { width: 9px; height: 9px; border-radius: 2px; }
.mint-dot { background: var(--mint); }
.coral-dot { background: var(--coral); }
.blue-dot { background: var(--blue); }

.table-frame { overflow: auto; scrollbar-color: #b8c7c9 #f4f7f7; scrollbar-width: thin; }
.table-frame:not(.borderless) { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table { width: 100%; min-width: 650px; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid #edf0f2; text-align: left; vertical-align: middle; white-space: nowrap; }
th { color: #6d7881; background: #fafbfc; font-size: 11px; font-weight: 800; }
td { color: #36434e; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfdfc; }
.empty-cell { height: 230px; color: #96a0a7; text-align: center; }
.invite-name { display: block; color: #263440; }
.invite-type { display: block; margin-top: 3px; color: #929ba2; font-size: 10px; }
.reward-amount { color: var(--coral); font-weight: 800; font-variant-numeric: tabular-nums; }

.promoter-workspace { display: grid; grid-template-columns: 320px minmax(0, 1fr); align-items: start; gap: 16px; }
.form-panel { display: grid; gap: 9px; padding: 20px; }
.form-panel-title { display: flex; align-items: center; gap: 11px; margin-bottom: 8px; padding-bottom: 16px; border-bottom: 1px solid #edf0f2; }
.form-panel-title strong, .form-panel-title span { display: block; }
.form-panel-title span:not(.panel-number) { margin-top: 2px; color: var(--muted); font-size: 11px; }
.panel-number { display: grid; width: 30px; height: 30px; place-items: center; color: var(--mint-deep); border-radius: 6px; background: var(--mint-soft); font-size: 11px; font-weight: 800; }
.form-panel .primary-button { margin-top: 10px; }
.account-table-panel { min-width: 0; }
.account-table { min-width: 760px; }
.account-cell { display: flex; align-items: center; gap: 11px; }
.table-avatar { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; color: #fff; border-radius: 50%; font-weight: 800; }
.avatar-hue-0 { background: var(--mint); }
.avatar-hue-1 { background: var(--amber); }
.avatar-hue-2 { background: var(--blue); }
.avatar-hue-3 { background: #46bdb4; }
.avatar-hue-4 { background: #e56fa5; }
.account-meta strong, .account-meta span { display: block; }
.account-code { margin-top: 2px; color: #8b969d; font-size: 10px; }
.status-tag { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; margin-top: 5px; padding: 0 7px; border-radius: 999px; font-size: 10px; font-weight: 750; }
.status-tag.active { color: #248c63; background: var(--mint-soft); }
.status-tag.disabled { color: #707b83; background: #edf0f2; }
.table-number, .table-subvalue { display: block; }
.table-number { font-size: 14px; }
.table-subvalue { margin-top: 4px; color: var(--coral); font-size: 11px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.row-action { min-height: 34px; padding: 0 10px; color: #25865f; border: 1px solid #b2dfcc; background: #f8fdfb; font-size: 11px; }
.row-action.credentials { color: #397bc8; border-color: #bdd5f4; background: #f7faff; }
.row-action:hover { background: var(--mint-soft); }

.filter-panel { display: flex; align-items: end; gap: 12px; margin-bottom: 16px; padding: 17px 20px; }
.filter-field { min-width: 190px; }
.filter-field.date-field { min-width: 160px; }
.filter-field label { display: block; margin-bottom: 6px; }
.filter-separator { align-self: center; margin-top: 20px; color: var(--muted); }
.compact-button { min-height: 44px; margin: 0; }
.event-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: 0 4px 15px rgba(29, 48, 63, .03); }
.event-summary-grid article { display: grid; min-height: 112px; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 14px; padding: 18px 20px; }
.event-summary-grid article + article { border-left: 1px solid var(--border); }
.event-summary-grid .metric-icon { width: 48px; height: 48px; }
.event-summary-grid .metric-icon svg { width: 22px; height: 22px; }
.event-summary-grid span, .event-summary-grid small { display: block; color: var(--muted); }
.event-summary-grid strong { display: block; margin: 5px 0 4px; font-size: 24px; line-height: 1; }
.event-summary-grid small { font-size: 10px; }
.events-grid { display: grid; grid-template-columns: minmax(420px, .86fr) minmax(620px, 1.14fr); gap: 16px; }
.compact-trend, .event-table-panel { min-height: 400px; }
.line-trend { position: relative; display: grid; height: 306px; grid-template-columns: repeat(15, 1fr); align-items: end; gap: 6px; padding: 34px 24px 38px; }
.line-trend::before, .line-trend::after { position: absolute; right: 24px; left: 24px; height: 1px; background: #edf0f2; content: ""; }
.line-trend::before { top: 34%; }
.line-trend::after { top: 66%; }
.line-point { position: relative; z-index: 1; min-height: 4px; border-radius: 4px 4px 1px 1px; background: var(--coral); }
.line-point:nth-child(3n + 1) { background: var(--mint); }
.line-point span { position: absolute; right: 50%; bottom: -24px; color: #929ba2; font-size: 9px; transform: translateX(50%); white-space: nowrap; }
.record-count { color: var(--muted); font-size: 11px; }
.record-count b { color: var(--ink); }
.event-status { display: inline-flex; min-height: 25px; align-items: center; padding: 0 8px; border-radius: 5px; color: #a86b09; background: var(--amber-soft); font-size: 10px; font-weight: 750; }
.event-status.settled { color: #25865f; background: var(--mint-soft); }

.promoter-identity { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; padding: 6px 0 2px; }
.promoter-avatar { display: grid; width: 58px; height: 58px; place-items: center; color: #fff; border-radius: 50%; background: var(--mint); }
.promoter-avatar svg { width: 29px; height: 29px; }
.promoter-identity h2 { font-size: 25px; }
.promoter-identity p { margin-top: 3px; color: var(--muted); }
.promoter-identity .channel-state { margin-left: auto; }

.dialog-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(18, 31, 37, .45); }
.qr-dialog { position: relative; width: min(450px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: 0 22px 60px rgba(12, 25, 31, .2); }
.qr-dialog h2 { font-size: 22px; }
.dialog-close { position: absolute; top: 10px; right: 10px; display: grid; width: 38px; height: 38px; place-items: center; color: #69757f; border: 0; border-radius: 6px; background: transparent; }
.dialog-close:hover { background: #f3f5f6; }
.dialog-close svg { width: 20px; height: 20px; }
.dialog-icon { display: grid; width: 46px; height: 46px; margin-bottom: 16px; place-items: center; border-radius: 50%; }
.dialog-icon svg { width: 22px; height: 22px; }
.dialog-copy { margin-top: 6px; color: var(--muted); font-size: 12px; }
.qr-stage { display: grid; min-height: 270px; margin: 20px 0 14px; place-items: center; border: 1px solid var(--border); border-radius: 6px; background: #fafcfc; }
.qr-stage img { width: 232px; height: 232px; image-rendering: pixelated; }
.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) 44px; overflow: hidden; border: 1px solid #cfd8de; border-radius: 6px; background: #fff; }
.copy-field input { min-width: 0; border: 0; border-radius: 0; text-overflow: ellipsis; }
.copy-field button { display: grid; place-items: center; color: var(--mint-deep); border: 0; border-left: 1px solid #d9e0e4; background: var(--mint-soft); }
.copy-field button svg { width: 18px; height: 18px; }
.credentials-dialog { display: grid; gap: 9px; }
.credentials-dialog .primary-button { margin-top: 10px; }

@media (max-width: 1180px) {
  .app-header { grid-template-columns: auto minmax(300px, 1fr) auto; }
  .app-brand { min-width: 205px; padding: 0 20px; }
  .header-user { display: none; }
  .overview-grid, .events-grid { grid-template-columns: 1fr; }
  .admin-assurance .assurance-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trend-panel, .recent-panel, .compact-trend, .event-table-panel { min-height: auto; }
  .account-workspace { grid-template-columns: 280px minmax(0, 1fr); }
}

@media (max-width: 920px) {
  .app-header { grid-template-columns: auto 1fr auto; }
  .app-brand { min-width: 185px; }
  .nav-item { min-width: 96px; padding: 0 12px; }
  .admin-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-metric-grid .metric-card:last-child { grid-column: 1 / -1; }
  .event-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-summary-grid article:nth-child(3) { border-left: 0; border-top: 1px solid var(--border); }
  .event-summary-grid article:nth-child(4) { border-top: 1px solid var(--border); }
  .promoter-workspace { grid-template-columns: 1fr; }
  .form-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-panel-title, .form-panel .primary-button { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  h1 { font-size: 23px; }
  h2 { font-size: 20px; }
  .login-brandbar { min-height: 66px; padding: 0 16px; }
  .brand-cluster > strong { font-size: 19px; }
  .login-stage { min-height: calc(100vh - 66px); padding: 18px 14px; }
  .login-form-side { padding: 26px 22px; }
  .login-form-side h1 { font-size: 27px; }
  .admin-assurance { padding: 18px; }
  .admin-assurance .assurance-list { grid-template-columns: 1fr; }

  .app-header { position: static; grid-template-columns: 1fr auto; min-height: auto; }
  .app-brand { min-width: 0; min-height: 62px; padding: 0 14px; border-right: 0; }
  .app-brand > div span { display: none; }
  .top-nav { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; border-top: 1px solid var(--border); scrollbar-width: none; }
  .top-nav::-webkit-scrollbar { display: none; }
  .nav-item { flex: 1 0 104px; min-height: 52px; }
  .header-actions { grid-column: 2; grid-row: 1; padding: 0 10px; }
  .header-actions > .header-icon-button:first-child { display: none; }
  .topbar { min-height: 64px; padding: 11px 14px; }
  .topbar .eyebrow, .sync-label { display: none; }
  .topbar h1 { font-size: 18px; }
  .content-wrap { padding: 20px 14px 36px; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .page-intro h2 { font-size: 23px; }
  .admin-metric-grid, .promoter-metric-grid { grid-template-columns: 1fr; }
  .admin-metric-grid .metric-card:last-child { grid-column: auto; }
  .metric-card { min-height: 104px; padding: 17px; }
  .overview-grid, .events-grid { grid-template-columns: 1fr; }
  .panel-heading { min-height: 62px; padding: 13px 15px; }
  .trend-chart { gap: 7px; height: 230px; padding: 24px 13px 10px; }
  .filter-panel { display: grid; grid-template-columns: 1fr 1fr; align-items: end; }
  .filter-field { min-width: 0; }
  .filter-separator { display: none; }
  .event-summary-grid { grid-template-columns: 1fr; }
  .event-summary-grid article + article { border-top: 1px solid var(--border); border-left: 0; }
  .event-summary-grid article { min-height: 96px; }
  .form-panel { grid-template-columns: 1fr; }
  .form-panel-title, .form-panel .primary-button { grid-column: auto; }
  .promoter-identity { flex-wrap: wrap; }
  .promoter-identity .channel-state { margin-left: 0; }
  .toast { right: 14px; bottom: 14px; }
}

@media (max-width: 460px) {
  .app-brand > div strong { font-size: 17px; }
  .header-avatar { width: 34px; height: 34px; }
  .header-actions { gap: 3px; padding: 0 5px; }
  .topbar .secondary-button { width: 40px; padding: 0; font-size: 0; }
  .topbar .secondary-button svg { width: 18px; height: 18px; }
  .filter-panel { grid-template-columns: 1fr; }
  .compact-button { width: 100%; }
  .metric-card strong { font-size: 26px; }
  .assurance-heading { display: block; }
  .assurance-mark { margin-bottom: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
