/* PortuZap — shared visual language. Component geometry lives in app.css. */
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6fb; --panel: #fff; --panel-2: #eef0fa; --panel-3: #fff8e7;
  --text: #1c2440; --muted: #64708a; --line: #e2e5ef;
  --brand: #4f46e5; --brand-dark: #4338ca; --accent: #8b5cf6; --accent-2: #6366f1;
  --primary: var(--brand); --danger: #be2945; --ok: #16784d; --success: var(--ok); --warning: #986000;
  --shadow: 0 8px 28px #202c5010; --card-shadow: 0 2px 8px #202c5006; --soft-shadow: var(--card-shadow);
  --focus-ring: 0 0 0 3px #6366f140; --hero-tint: #17193880;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1323; --panel: #171e32; --panel-2: #202941; --panel-3: #302b20;
  --text: #edf0fa; --muted: #a4aec6; --line: #2c3650;
  --brand: #818cf8; --brand-dark: #a5b4fc; --accent: #a78bfa; --accent-2: #818cf8;
  --primary: var(--brand); --danger: #fda4af; --ok: #6ee7b7; --success: var(--ok); --warning: #fcd34d;
  --shadow: 0 8px 28px #00000024; --card-shadow: 0 2px 8px #00000012;
}
html { background: var(--bg); scroll-padding-top: 80px; }
body { background: var(--bg); font-family: 'Segoe UI', system-ui, sans-serif; font-size: 14px; line-height: 1.55; color: var(--text); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, .row-button, .primary-button, .ghost-button, .plan-action, .marketplace-button { border-radius: 9px; min-height: 42px; font-weight: 600; box-shadow: none; transition: background .15s, border-color .15s; }
button, .primary-button, .plan-action { color: white; background: #4f46e5; border: 1px solid transparent; }
button:hover, .primary-button:hover, .plan-action:hover { background: #4338ca; transform: none; box-shadow: none; }
.row-button, .ghost-button, .icon-action-button, .theme-toggle, .text-link-button { background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.row-button:hover, .ghost-button:hover, .icon-action-button:hover, .theme-toggle:hover { background: var(--panel-2); border-color: var(--brand); }
.danger-button { color: var(--danger); background: transparent; border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); }
.danger-button:hover { background: color-mix(in srgb, var(--danger) 10%, var(--panel)); color: var(--danger); }
button:disabled { opacity: .55; cursor: not-allowed; }
input, select, textarea { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); padding: 10px 12px; max-width: 100%; }
input[type="checkbox"], input[type="radio"] { min-height: 18px; width: 18px; height: 18px; accent-color: var(--brand); padding: 0; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .85; }
label { color: var(--text); gap: 7px; font-size: 13px; }
label small { color: var(--muted); font-weight: 400; line-height: 1.6; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; box-shadow: var(--focus-ring); }
h1,h2,h3,p { overflow-wrap: anywhere; }
h1,h2,h3 { letter-spacing: -.025em; line-height: 1.25; }
h1 { font-size: clamp(24px, 2.5vw, 32px); }
h2 { font-size: 21px; }
h3 { font-size: 16px; }
a { color: var(--brand); }
.app-layout, .app-shell { display: grid; grid-template-columns: 236px minmax(0,1fr); gap: 0; }
.sidebar, .shell-sidebar { position: sticky; top: 0; height: 100dvh; padding: 28px 16px 18px; background: var(--panel); border: 0; border-right: 1px solid var(--line); border-radius: 0; display: flex; flex-direction: column; overflow-y: auto; gap: 18px; box-shadow: none; }
.brand-block { gap: 12px; padding: 0 8px 12px; }
.brand-block strong { font-size: 21px; letter-spacing: -.6px; }
.brand-block small { font-size: 11px; color: var(--muted); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; box-shadow: none; background-color: #eef0ff; }
.side-nav, .shell-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.nav-group-label { color: var(--muted); text-transform: uppercase; font-weight: 600; font-size: 10px; letter-spacing: .11em; padding: 14px 12px 5px; margin: 0; }
.nav-group-label:first-child { padding-top: 0; }
.side-nav a { display: flex; align-items: center; justify-content: flex-start; flex-shrink: 0; gap: 11px; padding: 10px 12px; min-height: 42px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 500; border: 1px solid transparent; background: transparent; text-decoration: none; }
.side-nav a::before, .side-nav a::after, .shell-sidebar::after { display: none; }
.side-nav a:hover { color: var(--text); background: var(--bg); }
.side-nav a.active { background: color-mix(in srgb, var(--brand) 10%, var(--panel)); color: var(--brand); font-weight: 650; border-color: color-mix(in srgb, var(--brand) 12%, transparent); box-shadow: none; }
.nav-icon { flex: 0 0 19px; width: 19px; height: 19px; }
.sidebar #logoutButton { position: static; flex-shrink: 0; width: 100%; margin-top: 0; }
.main-panel, .shell-main { min-width: 0; padding: 28px clamp(18px,3vw,44px) 48px; display: flex; flex-direction: column; gap: 24px; }
.page-top, .shell-topbar { position: static; margin: 0; padding: 0 0 23px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.eyebrow { color: var(--brand); letter-spacing: .12em; text-transform: uppercase; font-weight: 650; font-size: 10px; margin: 0 0 9px; }
.page-top h1 { margin: 0; }
.page-context { color: var(--muted); font-size: 13px; margin: 7px 0 0; }
.top-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.admin-user, #subscriberPlan { width: auto; font-size: 12px; border-radius: 8px; color: var(--muted); background: var(--panel); padding: 9px 12px; border: 1px solid var(--line); }
.admin-user #subscriberPlan { border: 0; padding: 0; }
.icon-action-button, .theme-toggle { width: 42px; height: 42px; border-radius: 10px; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.metric-card { position: relative; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--card-shadow); min-width: 0; min-height: 116px; }
.metric-card::before, .metric-card::after { display: none; }
.metric-card > span { color: var(--muted); font-size: 12px; }
.metric-card > strong { display: block; font-size: 30px; margin-top: 9px; color: var(--text); font-variant-numeric: tabular-nums; }
.metric-card.metric-primary { background: #4f46e5; border-color: #4f46e5; }
.metric-card.metric-primary > strong, .metric-card.metric-primary > span { color: white; }
.metric-card.metric-danger > strong { color: var(--danger); }
.metric-breakdown { border-top: 1px solid var(--line); margin-top: 12px; gap: 6px; }
.metric-breakdown small { font-size: 11px; }
.metric-breakdown { display: flex; flex-wrap: wrap; padding-top: 10px; gap: 18px; }
.metric-breakdown > span { display: flex; flex-direction: column; background: transparent; border: 0; padding: 0; flex: 1; min-width: 65px; }
.metric-breakdown small { text-transform: none; font-weight: 400; }
.crown-icon { background: var(--brand); }
.crown-icon::after { display: none; }
#userMenuButton { font-size: 0; }
#userMenuButton::before { content: ''; display: block; width: 19px; height: 19px; background: var(--brand); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' d='M20 21a8 8 0 0 0-16 0M12 13a5 5 0 1 0 0-10 5 5 0 0 0 0 10'/%3E%3C/svg%3E") center/contain no-repeat; }
.action-dialog-body > p { white-space: pre-line; }
.metric-primary .metric-breakdown { display: flex; gap: 16px; border-color: #ffffff40; padding-top: 12px; }
.metric-primary .metric-breakdown > span { border: 0; background: transparent; padding: 0; }
.metric-primary .metric-breakdown small, .metric-primary .metric-breakdown b { color: #eef2ff; }
.secondary-metrics { margin-top: 20px; }
.secondary-metrics > summary, .onboarding > summary, .infrastructure > summary { padding: 14px 0; font-weight: 600; color: var(--muted); cursor: pointer; }
.secondary-metrics .metric-card { min-height: 100px; }
.secondary-metrics .metric-card > strong { font-size: 22px; }
.content-section, .admin-view-section.content-section { background: var(--panel); border: 1px solid var(--line); padding: 24px; border-radius: 12px; box-shadow: var(--card-shadow); margin-top: 22px; }
.section-header { gap: 14px; margin-bottom: 22px; }
.section-header h2 { margin: 0 0 5px; }
.section-header p, .muted-text { color: var(--muted); font-size: 13px; }
.quick-action-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.quick-action-card, .quick-action-card.primary-action { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 18px; box-shadow: none; color: var(--text); }
.quick-action-card:hover { border-color: var(--brand); background: var(--panel-2); transform: none; box-shadow: none; }
.quick-action-card > span { color: var(--brand); font-size: 10px; letter-spacing: .06em; }
.quick-action-card strong { font-size: 16px; }
.quick-action-card small { color: var(--muted); font-size: 12px; }
.operation-alert-list { display: grid; gap: 10px; }
.operation-alert, .notice-box, .empty-state { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: none; }
.operation-alert { padding: 16px; }
.operation-alert.success { border-left: 3px solid var(--ok); }
.operation-alert.warning { border-left: 3px solid var(--warning); }
.operation-alert.danger { border-left: 3px solid var(--danger); }
.notice-box { padding: 16px; font-size: 13px; }
.notice-box p { color: var(--muted); line-height: 1.65; }
.onboarding { margin-top: 20px; }
.onboarding .checklist-section { margin-top: 0; }
.checklist { gap: 10px; }
.checklist-item { border-radius: 8px; }
.solution-grid, .channel-grid, .landing-page-grid, .plan-grid { gap: 18px; }
.solution-card, .marketplace-card, .channel-card, .group-card, .automation-card, .mirror-card, .landing-page-card, .plan-card, .message-card, .settings-field, .support-detail-panel { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; box-shadow: var(--card-shadow); }
.solution-card:hover, .plan-card:hover { transform: none; box-shadow: var(--card-shadow); }
.solution-card::before, .plan-card::before { display: none; }
.card-title-row { gap: 14px; align-items: start; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); }
.badge.ok { color: var(--ok); background: color-mix(in srgb,var(--ok) 8%,var(--panel)); border-color: color-mix(in srgb,var(--ok) 20%,var(--line)); }
.badge.error, .badge.failed { color: var(--danger); background: color-mix(in srgb,var(--danger) 8%,var(--panel)); }
.status-pending .queue-status-badge, .status-scheduled .queue-status-badge { color: var(--brand); background: var(--panel-2); }
.status-failed .queue-status-badge { color: var(--danger); background: color-mix(in srgb,var(--danger) 8%,var(--panel)); }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 18px; }
.offer-card { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; overflow: hidden; box-shadow: var(--card-shadow); }
.offer-card:hover { transform: none; border-color: var(--brand); box-shadow: none; }
.offer-media { background: #fff; height: 200px; padding: 20px; }
.offer-media img { width: 100%; height: 100%; object-fit: contain; }
.offer-card-body { padding: 18px; }
.offer-card h3 { font-size: 14px; line-height: 1.5; }
.offer-price-row strong { color: var(--text); font-size: 25px; letter-spacing: -.03em; }
.offer-price-row > span { color: var(--brand); background: var(--panel-2); border-radius: 5px; padding: 3px 6px; }
.offer-detail-list { color: var(--muted); font-size: 12px; }
.offer-actions { border-top: 1px solid var(--line); padding-top: 12px; gap: 8px; }
.queue-card, .history-card { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; box-shadow: none; }
.queue-card { padding: 16px; grid-template-columns: 88px minmax(0,1fr); }
.queue-thumb { height: 88px; min-height: 0; border-radius: 8px; background: #fff; }
.queue-thumb img { object-fit: contain; }
.queue-meta-row, .queue-schedule-text { font-size: 12px; color: var(--muted); }
.queue-error-message { color: var(--danger); background: color-mix(in srgb,var(--danger) 6%,var(--panel)); border-radius: 6px; padding: 10px; }
.action-row { gap: 8px; flex-wrap: wrap; }
.table-wrap { border: 1px solid var(--line); border-radius: 10px; box-shadow: none; overflow-x: auto; }
table { background: var(--panel); }
th { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--bg); }
td { font-size: 13px; }
th, td { padding: 14px 16px; border-color: var(--line); }
tr:hover td { background: var(--bg); }
.search-box { gap: 10px; }
.filter-disclosure { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 10px 14px; }
.filter-disclosure summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.filter-disclosure[open] summary { margin-bottom: 14px; }
.filter-disclosure .filter-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.subscriber-filter-form { display: flex; flex-wrap: wrap; align-items: start; }
.subscriber-filter-form > input { flex: 1; min-width: 200px; }
.subscriber-filter-form .filter-disclosure { flex-basis: 100%; }
.modal { padding: 28px; border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: var(--panel); box-shadow: 0 24px 80px #0005; width: min(640px,calc(100vw - 32px)); max-height: calc(100dvh - 48px); }
.wide-modal, .action-modal:has(.wide-action-body) { width: min(1020px,calc(100vw - 32px)); max-width: 1020px; }
.action-dialog-body, .wide-action-body { max-width: none; }
.modal::backdrop { background: #0b102a9c; backdrop-filter: blur(3px); }
.modal-close { position: absolute; right: 16px; top: 12px; width: 34px; height: 34px; min-height: 34px; padding: 0; border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 8px; }
.modal h2 { padding-right: 36px; }
.form-grid { gap: 18px; }
.stacked-form { gap: 20px; }
.form-message { color: var(--danger); font-size: 13px; line-height: 1.5; }
.form-message:empty { display: none; }
.success-message { color: var(--ok); }
.field-error { color: var(--danger); font-size: 12px; font-weight: 400; }
[aria-invalid="true"] { border-color: var(--danger); }
.step-navigation { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; }
.step-navigation button { display: flex; align-items: center; gap: 8px; flex: 1; min-width: max-content; background: transparent; color: var(--muted); padding: 8px 10px; border: 1px solid var(--line); font-size: 12px; }
.step-navigation button span { display: grid; place-items: center; width: 23px; height: 23px; background: var(--panel-2); border-radius: 50%; }
.step-navigation button.active { color: var(--brand); border-color: var(--brand); background: var(--panel-2); }
.step-panel { display: grid; gap: 20px; }
.wizard-footer { display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: -28px; background: var(--panel); border-top: 1px solid var(--line); padding: 18px 0 4px; z-index: 2; }
.review-panel dl { display: grid; grid-template-columns: 1fr 2fr; margin: 0; gap: 12px; padding: 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.review-panel dt { color: var(--muted); }
.review-panel dd { margin: 0; overflow-wrap: anywhere; }
.tab-navigation { display: flex; border-bottom: 1px solid var(--line); gap: 6px; margin: 18px 0; overflow-x: auto; }
.tab-navigation button { background: none; color: var(--muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; white-space: nowrap; }
.tab-navigation button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.editor-layout, .send-preview-layout, .landing-editor-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
.editor-preview, .send-preview, .landing-editor-preview { background: var(--bg); padding: 20px; border: 1px solid var(--line); border-radius: 12px; position: sticky; top: 0; }
.message-bubble { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.75; background: var(--panel); padding: 18px; border-radius: 3px 12px 12px; border: 1px solid var(--line); }
.preview-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 14px; }
.send-preview img { width: 100%; height: 180px; object-fit: contain; background: #fff; border-radius: 8px; }
.template-gallery { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.template-choice { padding: 8px; color: var(--text); background: var(--panel); border: 1px solid var(--line); text-align: left; }
.template-choice:hover, .template-choice[aria-pressed="true"] { border-color: var(--brand); background: var(--panel-2); color: var(--text); }
.template-mini { height: 90px; border-radius: 6px; background: linear-gradient(135deg,#312e81,#6366f1); display: flex; flex-direction: column; justify-content: end; padding: 12px; gap: 6px; margin-bottom: 7px; }
.template-mini::before { content: ''; width: 70%; height: 7px; background: #fff; border-radius: 2px; box-shadow: 0 -12px 0 #ffffff50; }
.template-mini::after { content: ''; width: 45%; height: 12px; background: #a78bfa; border-radius: 3px; }
.template-choice:nth-child(2) .template-mini { background: #eef2ff; }
.template-choice:nth-child(2) .template-mini::before { background: #4f46e5; box-shadow: 0 -12px 0 #6366f130; }
.template-choice:nth-child(3) .template-mini { background: #171e32; }
.landing-live-card { text-align: center; border-radius: 14px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.landing-live-card img { width: 100%; height: 150px; object-fit: cover; }
.landing-live-card > div { padding: 20px; }
.landing-live-card h3 { font-size: 21px; }
.landing-live-card .preview-cta { display: block; margin-top: 18px; padding: 12px; color: white; background: #4f46e5; border-radius: 8px; font-weight: 600; }
.plan-current-summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.usage-meter { min-width: 180px; font-size: 12px; color: var(--muted); }
.usage-meter progress { accent-color: var(--brand); width: 100%; height: 8px; display: block; margin-top: 8px; }
.mobile-bar, .navigation-backdrop { display: none; }
.skip-link { position: fixed; left: 10px; top: -80px; padding: 12px 18px; background: var(--panel); z-index: 200; border-radius: 8px; }
.skip-link:focus { top: 10px; }
.auth-shell { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-panel { background: var(--panel); padding: 50px clamp(24px,7vw,100px); }
.form-card { border: 0; background: transparent; box-shadow: none; max-width: 420px; padding: 24px 0; width: 100%; }
.auth-tabs { border: 1px solid var(--line); background: var(--bg); border-radius: 9px; padding: 4px; }
.auth-tabs button { color: var(--muted); background: transparent; }
.auth-tabs button.active { color: var(--brand); background: var(--panel); box-shadow: var(--card-shadow); }
.auth-aside { position: relative; padding: clamp(32px,6vw,88px); display: flex; align-items: center; background: #24215c; color: white; overflow: hidden; }
.auth-aside::before { content: ''; position: absolute; width: 480px; height: 480px; right: -240px; top: -160px; border: 70px solid #8b5cf625; border-radius: 50%; }
.auth-aside > div { position: relative; }
.auth-aside h2 { font-size: clamp(32px,3.4vw,48px); max-width: 480px; line-height: 1.12; letter-spacing: -.045em; }
.auth-aside p { color: #c7c8ed; max-width: 420px; font-size: 15px; }
.auth-aside .eyebrow { color: #c4b5fd; }
.auth-flow { display: grid; gap: 12px; margin-top: 40px; }
.auth-flow span { border: 1px solid #ffffff25; padding: 14px 18px; border-radius: 10px; color: #e0e7ff; font-size: 13px; }
.auth-flow b { display: inline-block; margin-right: 12px; color: #c4b5fd; }
.auth-page .floating-theme { top: 18px; right: 18px; z-index: 2; }
@media(min-width:901px) { .sidebar { width: auto; } .side-nav { max-height: none; } }
@media(max-width:1180px) { .quick-action-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:900px) {
  .app-layout, .app-shell { grid-template-columns: minmax(0,1fr); }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; background: var(--panel); border-bottom: 1px solid var(--line); padding: 10px 16px; position: sticky; top: 0; z-index: 70; }
  .mobile-brand { text-decoration: none; color: var(--text); font-weight: 750; font-size: 20px; letter-spacing: -.5px; }
  .mobile-brand span { color: var(--brand); }
  .sidebar, .shell-sidebar { position: fixed; top: 63px; left: 0; bottom: 0; height: calc(100dvh - 63px); width: min(300px,85vw); max-width: none; transform: translateX(-110%); z-index: 65; border-radius: 0; display: flex; overflow-y: auto; padding: 22px 16px; background: var(--panel); }
  .navigation-open .sidebar { transform: translateX(0); }
  .navigation-open { overflow: hidden; }
  .navigation-backdrop:not([hidden]) { display: block; position: fixed; inset: 63px 0 0; background: #070d2599; border: 0; border-radius: 0; z-index: 60; }
  .side-nav, .shell-nav { display: flex; flex-direction: column; overflow-y: auto; flex-wrap: nowrap; max-height: none; padding: 0; }
  .side-nav a { width: 100%; min-width: 0; justify-content: flex-start; font-size: 14px; min-height: 44px; }
  .nav-group-label { display: block; }
  .main-panel, .shell-main { padding: 20px 16px 36px; }
  .page-top { padding: 0 0 18px; align-items: start; }
  .top-actions { width: auto; justify-content: flex-end; }
  .admin-user { display: none; }
  .page-context { max-width: 400px; }
  .section-header { flex-direction: column; align-items: stretch; }
  .editor-layout, .send-preview-layout, .landing-editor-layout { grid-template-columns: 1fr; }
  .editor-preview, .send-preview, .landing-editor-preview { position: static; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-panel { padding: 40px 24px; min-height: 100dvh; }
  .auth-aside { display: none; }
  .modal { padding: 22px; max-height: calc(100dvh - 24px); }
  .wizard-footer { bottom: -22px; }
}
@media(max-width:600px) {
  .page-top { flex-wrap: wrap; }
  .page-title-block { flex: 1; min-width: 180px; }
  .page-context { display: none; }
  .top-actions { gap: 6px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .metric-card { padding: 15px; min-height: 105px; }
  .metric-card > strong { font-size: 27px; }
  .content-section { padding: 18px; }
  .quick-action-grid { grid-template-columns: 1fr; gap: 10px; }
  .quick-action-card { padding: 14px 16px; }
  .offer-grid, .solution-grid, .plan-grid, .form-grid, .form-grid.four-cols, .settings-grid { grid-template-columns: minmax(0,1fr); }
  .queue-card { grid-template-columns: 60px minmax(0,1fr); padding: 12px; gap: 10px; }
  .queue-thumb { height: 60px; min-height: 0; }
  .queue-card .action-row { margin-left: -70px; padding-top: 10px; }
  .queue-card h3 { font-size: 14px; }
  .queue-card .card-title-row { flex-direction: column; gap: 8px; }
  .filter-disclosure .filter-grid { grid-template-columns: 1fr; }
  .plan-current-summary { align-items: stretch; flex-direction: column; }
  .review-panel dl { grid-template-columns: 1fr; gap: 6px; }
  .review-panel dd { margin-bottom: 12px; }
  .template-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .action-row button { min-height: 44px; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
