:root {
  color-scheme: light;
  --navy-950: #071426;
  --navy-900: #0b1f3a;
  --navy-800: #123562;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --sky-400: #38bdf8;
  --bg: #eef4fb;
  --surface: #ffffff;
  --surface-soft: #f6f9fd;
  --text: #132238;
  --muted: #65758c;
  --border: #dbe5f1;
  --good: #16865b;
  --warn: #b86b05;
  --bad: #c54242;
  --focus: #2563eb;
  --shadow: 0 16px 42px rgba(15, 40, 75, .10);
  --radius: 15px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(37,99,235,.28); outline-offset: 2px; }
a { color: var(--blue-600); }
h1, h2, h3, p { margin-top: 0; }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.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; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1.05fr) minmax(400px, .95fr); background: var(--surface); }
.auth-visual { color: white; background: radial-gradient(circle at 82% 16%, rgba(56,189,248,.3), transparent 28%), linear-gradient(145deg, var(--navy-950), #17519e); padding: clamp(30px, 6vw, 74px); display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 650; letter-spacing: -.01em; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue-500), var(--sky-400)); box-shadow: 0 8px 22px rgba(37,99,235,.25); color: white; }
.brand small { display: block; color: #9fb4d1; font-size: 11px; font-weight: 500; margin-top: 2px; }
.auth-copy { max-width: 560px; }
.auth-copy h1 { font-size: clamp(34px, 4.8vw, 62px); line-height: 1.06; letter-spacing: -.045em; font-weight: 650; margin-bottom: 18px; }
.auth-copy p { color: #c9dbf3; font-size: 16px; line-height: 1.65; max-width: 520px; }
.auth-benefits { display: grid; gap: 12px; color: #dfeafe; }
.auth-benefit { display: flex; align-items: center; gap: 11px; }
.auth-form-wrap { display: grid; place-items: center; padding: 36px; }
.auth-card { width: min(100%, 410px); }
.auth-card h2 { font-size: 30px; letter-spacing: -.03em; margin-bottom: 8px; }
.muted { color: var(--muted); }
.form-grid { display: grid; gap: 17px; margin-top: 26px; }
.field label { display: block; font-weight: 600; font-size: 12px; margin-bottom: 7px; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); color: var(--text); padding: 11px 12px; }
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue-500); background: var(--surface); }
.help { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.form-error { padding: 11px 12px; color: #8c2424; background: #fff0f0; border: 1px solid #f4caca; border-radius: 10px; }
.btn { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); padding: 10px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; text-decoration: none; min-height: 40px; }
.btn:hover { background: var(--surface-soft); }
.btn-primary { color: white; border-color: transparent; background: linear-gradient(135deg, var(--blue-600), #174db6); box-shadow: 0 8px 18px rgba(37,99,235,.18); }
.btn-primary:hover { background: linear-gradient(135deg, #1f58d7, #123f97); }
.btn-danger { color: #a22929; border-color: #f0caca; background: #fff8f8; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--blue-600); box-shadow: none; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.sidebar { background: linear-gradient(180deg, var(--navy-900), #102e57); color: white; padding: 22px 15px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { padding: 0 8px; margin-bottom: 28px; }
.sidebar-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; border: 0; border-radius: 10px; background: transparent; color: #c6d6eb; padding: 11px 12px; display: flex; align-items: center; gap: 11px; text-align: left; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.11); }
.sidebar-user { margin-top: auto; border-top: 1px solid rgba(255,255,255,.13); padding: 16px 8px 0; display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 35px; height: 35px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.13); font-weight: 650; font-size: 12px; flex: 0 0 auto; }
.sidebar-user strong, .sidebar-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.sidebar-user strong { font-size: 12px; }
.sidebar-user span { font-size: 11px; color: #9fb4d1; margin-top: 3px; }
.app-main { min-width: 0; }
.topbar { min-height: 68px; padding: 13px 26px; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 20px; position: sticky; top: 0; z-index: 10; }
.topbar-title { font-size: 16px; font-weight: 650; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.mode-pill { display: inline-flex; gap: 7px; align-items: center; padding: 7px 10px; border-radius: 999px; background: #edf4ff; color: #1c56c6; font-size: 11px; font-weight: 650; }
.mode-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.page { padding: 26px; max-width: 1440px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page-head h1 { font-size: 26px; letter-spacing: -.03em; margin-bottom: 6px; }
.page-head p { color: var(--muted); margin-bottom: 0; }
.actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metrics-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 7px 25px rgba(15,40,75,.035); }
.metric { padding: 17px; }
.metric-top { color: var(--muted); font-size: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.metric-icon { width: 35px; height: 35px; border-radius: 10px; display: grid; place-items: center; color: var(--blue-600); background: #edf4ff; }
.metric strong { display: block; font-size: 27px; margin-top: 10px; letter-spacing: -.025em; }
.metric small { display: block; color: var(--muted); margin-top: 4px; }
.grid-two { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .8fr); gap: 14px; margin-top: 14px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(320px, .85fr) minmax(420px, 1.15fr); gap: 14px; margin-top: 14px; }
.panel { padding: 18px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.panel-head h2 { font-size: 16px; margin: 0; }
.panel-head p { margin: 4px 0 0; font-size: 12px; }
.period-switch { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-soft); }
.period-switch button { border: 0; border-radius: 8px; padding: 7px 10px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 650; }
.period-switch button.active { color: var(--blue-600); background: var(--surface); box-shadow: 0 2px 8px rgba(15,40,75,.08); }
.status-list { display: grid; }
.status-row { display: grid; grid-template-columns: 18px minmax(120px, 1fr) 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.status-row:first-child { border-top: 0; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; }
.healthy { background: var(--good); box-shadow: 0 0 0 4px rgba(22,134,91,.12); }
.warning { background: var(--warn); box-shadow: 0 0 0 4px rgba(184,107,5,.12); }
.failed { background: var(--bad); box-shadow: 0 0 0 4px rgba(197,66,66,.12); }
.unknown { background: #8996a8; box-shadow: 0 0 0 4px rgba(137,150,168,.13); }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 8px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.badge-good { color: #0b6d49; background: rgba(22,134,91,.12); }
.badge-warn { color: #945500; background: rgba(184,107,5,.12); }
.badge-bad { color: #a22929; background: rgba(197,66,66,.11); }
.badge-blue { color: #1c56c6; background: rgba(37,99,235,.10); }
.badge-gray { color: #526176; background: #edf1f6; }
.timeline { display: grid; gap: 15px; }
.timeline-item { display: grid; grid-template-columns: 11px minmax(0,1fr); gap: 11px; }
.timeline-item strong { display: block; font-size: 13px; }
.timeline-item span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 15px; }
.search { min-width: min(100%, 320px); display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .045em; padding: 11px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px 11px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: var(--surface-soft); }
.table strong { font-weight: 650; }
.compact-table td, .compact-table th { padding-top: 9px; padding-bottom: 9px; }
.campaign-table { min-width: 1120px; }
.campaign-panel-head { align-items: flex-start; }
.lead-total-card { max-width: 330px; margin-bottom: 18px; }
.page-head .lead-greeting { font-size: 20px; font-weight: 600; color: var(--text); margin-top: 8px; overflow-wrap: anywhere; }
.lead-summary-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 18px; margin-bottom: 18px; }
.lead-summary-grid.lead-summary-admin { grid-template-columns: minmax(0, 330px); }
.lead-summary-grid .lead-total-card { max-width: none; margin-bottom: 0; }
.lead-client-card h2 { font-size: 23px; margin: 14px 0 0; overflow-wrap: anywhere; }
.lead-search-panel { margin-bottom: 18px; }
.lead-search-panel h2 { font-size: 16px; margin: 0 0 16px; }
.lead-search-fields { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.lead-search-fields .field { flex: 1 1 155px; margin: 0; min-width: 0; }
.lead-search-fields .lead-query-field { flex: 3 1 280px; }
.leads-table { min-width: 1350px; }
.leads-table th, .leads-table td { display: table-cell !important; }
.user-search-panel { margin-bottom: 18px; }
.user-search-panel h2 { font-size: 16px; margin-bottom: 16px; }
.user-search-fields { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.user-search-fields .field { flex: 1 1 150px; margin: 0; min-width: 0; }
.user-search-fields .user-query-field { flex: 2 1 300px; }
.users-table { min-width: 1150px; }
.users-table th, .users-table td { display: table-cell !important; }
.user-row-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 270px; }
.user-row-actions .btn { padding: 8px 10px; min-height: 40px; }
.user-row-actions .btn:disabled { opacity: .45; cursor: not-allowed; }
.lead-message-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.lead-attachments-download { width: 44px; min-height: 44px; padding: 10px; }
.lead-attachments-download:disabled { cursor: not-allowed; opacity: .45; }
.message-metadata { display: grid; gap: 12px; margin-bottom: 16px; }
.message-metadata > div { display: grid; gap: 4px; overflow-wrap: anywhere; }
.message-metadata span { color: var(--muted); font-size: 12px; }
.lead-message-frame { width: 100%; height: 440px; border: 1px solid var(--border); border-radius: 10px; background: white; }
.message-section { margin-top: 22px; }
.attachment-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.attachment-row strong { overflow-wrap: anywhere; }
.client-mailbox-button { margin-top: 14px; }
.campaign-list-filters { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.campaign-list-filter { display: flex; flex-direction: column; gap: 6px; flex: 0 1 235px; min-width: 0; font-size: 12px; }
.campaign-list-filter .select { min-height: 43px; background: var(--surface); }
.campaign-list-filter .select[data-active="true"] { border-color: var(--blue-500); color: var(--blue-600); background: var(--surface-soft); }
.is-refreshing { opacity: .58; pointer-events: none; transition: opacity .15s ease; }
.campaign-filters { white-space: nowrap; }
.campaign-metric strong, .campaign-metric span { display: block; }
.metric-detail { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; max-width: 180px; white-space: normal; }
.performance-value { min-width: 88px; }
.performance-value strong, .performance-value span { display: block; }
.performance-value span { color: var(--muted); font-size: 11px; margin-top: 3px; white-space: nowrap; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 15px; color: var(--muted); font-size: 12px; }
.lead-count { display: inline-grid; place-items: center; min-width: 34px; padding: 5px 9px; border-radius: 999px; color: #1c56c6; background: rgba(37,99,235,.10); font-weight: 700; }
.matrix-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.matrix-head h2 { font-size: 16px; margin: 0; }
.matrix-head p { margin: 4px 0 0; font-size: 12px; }
.date-navigator { display: flex; align-items: center; gap: 9px; }
.matrix-arrow { width: 40px; padding: 0; flex: 0 0 40px; }
.matrix-arrow-left .icon { transform: rotate(180deg); }
.matrix-date { min-width: 220px; text-align: center; display: grid; justify-items: center; gap: 1px; }
.matrix-date strong { text-transform: capitalize; }
.matrix-date .btn { min-height: 30px; padding: 4px 9px; font-size: 11px; }
.matrix-table { min-width: 720px; }
.matrix-table th:first-child, .matrix-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 190px; }
.matrix-table thead th:first-child { z-index: 2; }
.matrix-table tbody tr:hover th:first-child { background: var(--surface-soft); }
.usage-cell { min-width: 132px; padding: 9px 10px; border: 1px solid #c8daf7; border-radius: 10px; background: linear-gradient(135deg, #edf4ff, #f5fbff); color: #174b9b; }
.usage-cell strong, .usage-cell span { display: block; }
.usage-cell span { margin-top: 3px; color: #58708f; font-size: 11px; }
.usage-empty { color: #a6b1bf; }
.compact-select { min-width: 150px; padding: 8px 9px; }
.cell-main span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.row-action { border: 0; background: transparent; color: var(--blue-600); padding: 8px; border-radius: 8px; display: grid; place-items: center; }
.row-action:hover { background: #edf4ff; }
.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.entity-card { padding: 17px; }
.entity-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.entity-card h3 { font-size: 15px; margin-bottom: 5px; }
.entity-card p { color: var(--muted); font-size: 12px; margin-bottom: 0; }
.entity-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.entity-stat span, .entity-stat strong { display: block; }
.entity-stat span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.entity-stat strong { font-size: 15px; margin-top: 4px; }
.inline-field { display: grid; gap: 7px; margin-top: 15px; }
.inline-field > span { color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.empty { text-align: center; padding: 55px 20px; color: var(--muted); }
.empty .icon { width: 34px; height: 34px; margin-bottom: 10px; color: #8ba0bb; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; gap: 10px; width: min(380px, calc(100% - 40px)); }
.toast { padding: 13px 15px; border-radius: 12px; color: white; background: var(--navy-900); box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
.toast.error { background: #9f2f2f; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(5,18,35,.54); display: grid; place-items: center; padding: 18px; backdrop-filter: blur(3px); }
.modal { width: min(100%, 680px); max-height: calc(100vh - 36px); overflow: auto; background: var(--surface); border-radius: 18px; box-shadow: 0 24px 80px rgba(5,18,35,.30); }
.modal-large { width: min(100%, 900px); }
.modal-preview { width: min(100%, 1120px); }
.campaign-preview-button { padding: 8px; width: 38px; min-height: 38px; color: var(--blue-600); }
.preview-name { font-size: 18px; line-height: 1.45; margin: 0 0 16px; }
.preview-source { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 13px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.preview-source strong { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.preview-source span { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.preview-status { margin: 12px 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.preview-status:empty { display: none; }
.preview-status-warning { background: #fff8ec; border: 1px solid #f2dfbc; padding: 10px 12px; border-radius: 9px; color: #815617; }
.preview-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 24px; padding: 18px 0; margin: 0; }
.preview-field { min-width: 0; }
.preview-field-wide { grid-column: 1 / -1; }
.preview-field dt { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 5px; }
.preview-field dd { margin: 0; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.preview-list { display: inline-block; background: #edf4ff; color: #164d9f; border: 1px solid #d4e4ff; padding: 4px 9px; border-radius: 7px; margin: 0 6px 6px 0; font-size: 12px; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--border); padding-top: 16px; }
.preview-toolbar h3 { margin: 0; font-size: 15px; }
.preview-device-switch button { display: inline-flex; align-items: center; gap: 7px; }
.preview-note { color: var(--muted); line-height: 1.5; font-size: 12px; margin: 12px 0; }
.preview-stage { border: 1px solid var(--border); border-radius: 12px; background: #eaf0f7; padding: 16px; overflow: auto; }
.preview-email { display: block; width: 100%; height: 540px; border: 0; border-radius: 5px; background: #fff; margin: 0 auto; }
.preview-stage[data-device="mobile"] .preview-email { width: 375px; max-width: 100%; }
.preview-loading, .preview-unavailable { padding: 30px 12px; color: var(--muted); text-align: center; line-height: 1.6; }
@media (max-width: 540px) {
  .preview-fields { grid-template-columns: 1fr; }
  .preview-stage { padding: 6px; }
  .preview-source .btn { width: 100%; }
  .preview-toolbar { align-items: stretch; flex-direction: column; }
}
.modal-head { padding: 19px 21px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 15px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-head h2 { font-size: 19px; margin: 0; }
.modal-close { border: 0; background: var(--surface-soft); color: var(--muted); width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.modal-body { padding: 21px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 22px; }
.detail-list { display: grid; gap: 12px; }
.detail-item span, .detail-item strong { display: block; }
.detail-item span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.detail-item strong { margin-top: 4px; }
.history { display: grid; gap: 13px; margin-top: 14px; }
.history-entry { padding-left: 13px; border-left: 2px solid #bcd0ee; }
.history-entry strong { display: block; font-size: 13px; }
.history-entry span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.history-entry p { font-size: 13px; line-height: 1.5; margin: 7px 0 0; white-space: pre-wrap; }
.segmented { display: flex; padding: 4px; border-radius: 11px; background: var(--surface-soft); margin: 17px 0; }
.segmented button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 9px; border-radius: 8px; }
.segmented button.active { color: var(--text); background: var(--surface); box-shadow: 0 2px 8px rgba(15,40,75,.08); }
.checks { display: grid; gap: 12px; margin-top: 18px; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); }
.check input { margin-top: 3px; }
.check strong { display: block; font-size: 13px; }
.check span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.4; }
.callout { padding: 13px 14px; border-radius: 11px; background: #edf4ff; color: #164d9f; line-height: 1.5; }
.skeleton { min-height: 100px; border-radius: var(--radius); background: linear-gradient(90deg, #eaf0f7 20%, #f6f9fc 40%, #eaf0f7 60%); background-size: 200% 100%; animation: loading 1.3s infinite; }
@keyframes loading { to { background-position: -200% 0; } }
.btn.is-syncing .icon { animation: sync-spin .8s linear infinite; }
@keyframes sync-spin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
  .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .app-shell { grid-template-columns: 68px minmax(0,1fr); }
  .sidebar { padding: 17px 9px; }
  .sidebar .brand { padding: 0; justify-content: center; }
  .sidebar .brand > div:last-child, .nav-item span, .sidebar-user > div:last-child { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .sidebar-user { justify-content: center; padding-left: 0; padding-right: 0; }
  .topbar { padding: 12px 17px; }
  .page { padding: 18px; }
  .grid-two, .detail-grid { grid-template-columns: 1fr; }
  .status-row { grid-template-columns: 18px 1fr auto; }
  .status-row > :nth-child(3) { display: none; }
  .campaign-panel-head, .matrix-head { align-items: stretch; flex-direction: column; }
  .campaign-panel-head .actions { justify-content: space-between; }
  .date-navigator { justify-content: center; }
}
@media (max-width: 540px) {
  .app-shell { grid-template-columns: 1fr; padding-bottom: 68px; }
  .sidebar { position: fixed; z-index: 30; inset: auto 0 0 0; width: 100%; height: 64px; padding: 7px 10px; display: block; background: var(--navy-900); }
  .sidebar .brand, .sidebar-user { display: none; }
  .sidebar-nav { height: 100%; display: flex; align-items: center; justify-content: space-around; gap: 2px; }
  .nav-item { width: auto; min-width: 48px; }
  .metrics, .cards-grid { grid-template-columns: 1fr; }
  .lead-summary-grid, .lead-summary-grid.lead-summary-admin { grid-template-columns: minmax(0, 1fr); }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  .topbar-title { font-size: 14px; }
  .mode-pill { display: none; }
  .table th:nth-child(3), .table td:nth-child(3) { display: none; }
  .matrix-table th, .matrix-table td { display: table-cell !important; }
  .campaign-filters { width: 100%; overflow-x: auto; }
  .campaign-filters button { flex: 1; }
  .campaign-panel-head .actions { width: 100%; }
  .campaign-list-filter { flex: 1 1 100%; }
  .campaign-list-filter .select { font-size: 16px; min-height: 44px; }
  .lead-search-fields .field, .lead-search-fields .lead-query-field { flex: 1 1 100%; }
  .lead-search-fields .input, .lead-search-fields .select { font-size: 16px; min-height: 44px; }
  .user-search-fields .field { flex: 1 1 100%; }
  .user-search-fields .input, .user-search-fields .select { font-size: 16px; min-height: 44px; }
  .matrix-date { min-width: 0; flex: 1; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; }
}
