:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-blue: #edf3ff;
  --ink: #202538;
  --ink-strong: #111628;
  --muted: #747b8e;
  --muted-light: #9ca3b5;
  --border: #e4e9f1;
  --border-strong: #d7deea;
  --primary: #5b82e5;
  --primary-dark: #132461;
  --primary-soft: #eaf0ff;
  --violet: #8768df;
  --green: #2fa66f;
  --red: #d85b66;
  --amber: #e5a64c;
  --shadow: 0 1px 2px rgba(20, 31, 63, .04), 0 10px 30px rgba(20, 31, 63, .045);
  --radius: 16px;
  --font: Manrope, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.eyebrow { margin: 0 0 8px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .11em; }
.eyebrow--light { color: #bfcdf8; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, #7598ed, #4c70d6); box-shadow: 0 8px 18px rgba(63, 96, 188, .28); font-weight: 800; text-decoration: none; }
.brand-mark--large { width: 52px; height: 52px; border-radius: 16px; font-size: 20px; }

/* Login */
.login-page { overflow: hidden; background: #fff; }
.login-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, 45%) 1fr; }
.login-brand { position: relative; display: flex; overflow: hidden; flex-direction: column; justify-content: center; padding: 8vw; color: #fff; background: radial-gradient(circle at 80% 12%, rgba(111, 149, 246, .3), transparent 26%), linear-gradient(145deg, #0c194a 0%, #152967 55%, #243d87 100%); }
.login-brand::before, .login-brand::after { position: absolute; content: ""; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.login-brand::before { width: 520px; height: 520px; right: -300px; top: -160px; }
.login-brand::after { width: 720px; height: 720px; left: -520px; bottom: -520px; }
.login-brand .eyebrow { margin-top: 56px; }
.login-brand h1 { position: relative; z-index: 1; margin: 0; max-width: 520px; font-size: clamp(46px, 5vw, 78px); line-height: .99; letter-spacing: -.055em; }
.login-brand__lead { position: relative; z-index: 1; max-width: 450px; margin: 28px 0 0; color: #cdd6ef; font-size: 17px; line-height: 1.6; }
.login-brand__visual { position: relative; width: min(440px, 100%); height: 160px; margin-top: 64px; border-bottom: 1px solid rgba(255,255,255,.15); }
.visual-line { position: absolute; right: 0; left: 0; height: 1px; background: rgba(255,255,255,.08); }
.visual-line--one { top: 25%; }.visual-line--two { top: 50%; }.visual-line--three { top: 75%; }
.visual-dot { position: absolute; width: 11px; height: 11px; border: 3px solid #9cb8ff; border-radius: 50%; background: #142966; box-shadow: 0 0 0 6px rgba(132,164,247,.1); }
.visual-dot::after { position: absolute; content: ""; height: 2px; transform-origin: left; background: linear-gradient(90deg, #87a8ff, rgba(135,168,255,.18)); }
.visual-dot--one { left: 8%; top: 68%; }.visual-dot--one::after { width: 150px; transform: rotate(-20deg); }
.visual-dot--two { left: 42%; top: 29%; }.visual-dot--two::after { width: 138px; transform: rotate(16deg); }
.visual-dot--three { right: 10%; top: 61%; }
.login-panel { display: grid; place-items: center; padding: 48px; background: #fff; }
.login-form-wrap { width: min(420px, 100%); }
.mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 48px; color: var(--primary-dark); }
.login-form-wrap h2 { margin: 0; color: var(--ink-strong); font-size: 34px; line-height: 1.2; letter-spacing: -.035em; }
.login-copy { margin: 12px 0 34px; color: var(--muted); font-size: 15px; }
.login-form { display: grid; }
.login-form label { margin: 0 0 8px; color: #4a5164; font-size: 13px; font-weight: 700; }
.login-form input { width: 100%; height: 52px; margin-bottom: 20px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: 12px; outline: 0; color: var(--ink-strong); background: #fff; transition: border-color .2s, box-shadow .2s; }
.login-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(91,130,229,.12); }
.login-form input::placeholder { color: #b1b7c5; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 700; text-decoration: none; transition: transform .15s, background-color .15s, border-color .15s, box-shadow .15s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button svg { width: 18px; height: 18px; }
.button--primary { color: #fff; background: var(--primary); box-shadow: 0 7px 16px rgba(62, 103, 208, .18); }
.button--primary:hover { background: #4e76d9; }
.button--secondary { color: #3e485d; border-color: var(--border-strong); background: #fff; }
.button--secondary:hover { border-color: #bfc8d8; background: var(--surface-soft); }
.button--login { height: 52px; margin-top: 7px; justify-content: space-between; padding: 0 20px; }
.button--login span { font-size: 20px; }
.form-alert { margin: -14px 0 22px; padding: 12px 14px; border: 1px solid #f2cbd0; border-radius: 10px; color: #a83d48; background: #fff3f4; font-size: 13px; }
.login-footnote { margin: 30px 0 0; color: #9299aa; font-size: 12px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(47,166,111,.12); }
.login-form-wrap--shake { animation: shake .3s ease-out; }
@keyframes shake { 25% { transform: translateX(-7px); } 55% { transform: translateX(6px); } 80% { transform: translateX(-3px); } }

/* Shell */
.app-shell { display: flex; min-height: 100vh; }
.nav-rail { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; display: flex; width: 66px; align-items: center; flex-direction: column; padding: 18px 0; background: #111d4e; box-shadow: 4px 0 18px rgba(14,25,67,.09); }
.nav-rail nav { margin-top: 42px; }
.nav-button { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; color: #9faedb; text-decoration: none; }
.nav-button svg { width: 20px; height: 20px; }
.nav-button--active { color: #fff; background: rgba(115,151,242,.22); box-shadow: inset 3px 0 #7da0f4; }
.nav-rail__bottom { margin-top: auto; }
.nav-avatar { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; color: #dbe3ff; background: rgba(255,255,255,.08); font-size: 12px; font-weight: 800; }
.workspace { min-width: 0; flex: 1; margin-left: 66px; }
.topbar { position: sticky; z-index: 15; top: 0; display: flex; height: 58px; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #969dac; font-size: 13px; }
.breadcrumbs b { color: #c3c8d2; font-weight: 400; }.breadcrumbs strong { color: #4e566b; }
.topbar__actions { display: flex; align-items: center; gap: 16px; }
.topbar form { margin: 0; }
.freshness { display: inline-flex; align-items: center; gap: 7px; color: #7d8496; font-size: 12px; }
.freshness i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.freshness.is-fresh i { background: var(--green); box-shadow: 0 0 0 3px rgba(47,166,111,.1); }
.icon-button { display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 9px; color: #6e768a; background: #fff; cursor: pointer; }
.icon-button:hover { color: var(--primary-dark); border-color: #cbd3e1; background: var(--surface-soft); }
.icon-button svg { width: 18px; height: 18px; }
.dashboard-main { width: min(1540px, 100%); margin: 0 auto; padding: 31px 28px 24px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { margin: 0; color: var(--ink-strong); font-size: 30px; line-height: 1.15; letter-spacing: -.035em; }
.page-heading p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* Filters */
.filters-panel { position: relative; z-index: 8; display: flex; min-height: 74px; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.preset-control { display: flex; gap: 2px; padding: 4px; border-radius: 10px; background: var(--surface-soft); }
.preset-control button { height: 34px; padding: 0 12px; border: 0; border-radius: 7px; color: #747c8f; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.preset-control button.is-active { color: var(--primary-dark); background: #fff; box-shadow: 0 1px 4px rgba(25,35,65,.11); }
.date-field { position: relative; min-width: 145px; }
.date-field label { position: absolute; z-index: 1; top: 7px; left: 12px; color: #9aa1b2; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.date-field input { width: 100%; height: 44px; padding: 16px 10px 3px; border: 1px solid var(--border); border-radius: 9px; outline: none; color: #3b4358; background: #fff; font-size: 12px; font-weight: 650; }
.date-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91,130,229,.1); }
.date-arrow { color: #b0b6c4; }
.group-filter { position: relative; min-width: 230px; margin-left: auto; }
.select-button { display: flex; width: 100%; height: 44px; align-items: center; justify-content: space-between; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; text-align: left; background: #fff; cursor: pointer; }
.select-button span { display: grid; gap: 1px; min-width: 0; }.select-button small { color: #9aa1b2; font-size: 9px; font-weight: 800; text-transform: uppercase; }.select-button strong { overflow: hidden; color: #3b4358; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }.select-button svg { width: 17px; height: 17px; color: #8c94a5; }
.group-menu { position: absolute; z-index: 30; right: 0; top: calc(100% + 7px); width: 330px; overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: 0 18px 45px rgba(21,32,70,.15); }
.group-menu__search { position: relative; padding: 12px 12px 7px; }
.group-menu__search svg, .table-search svg { position: absolute; width: 17px; height: 17px; color: #9da4b3; }
.group-menu__search svg { top: 24px; left: 24px; }
.group-menu__search input { width: 100%; height: 40px; padding: 0 12px 0 37px; border: 1px solid var(--border); border-radius: 9px; outline: none; background: var(--surface-soft); }
.group-menu__top { display: flex; justify-content: space-between; padding: 6px 15px 9px; border-bottom: 1px solid var(--border); }
.group-menu__top button { padding: 0; border: 0; color: var(--primary); background: none; cursor: pointer; font-size: 11px; font-weight: 700; }
.group-options { max-height: 300px; overflow: auto; padding: 7px; }
.group-option { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px; cursor: pointer; }
.group-option:hover { background: var(--surface-soft); }
.group-option input { appearance: none; width: 17px; height: 17px; margin: 0; border: 1px solid #cbd3e1; border-radius: 5px; background: #fff; }
.group-option input:checked { border-color: var(--primary); background: var(--primary) center/11px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10 3 3 7-7' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.group-option span { overflow: hidden; flex: 1; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.group-option em { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.filter-apply { height: 44px; min-width: 112px; }

.dashboard-state { display: none; margin-top: 16px; padding: 13px 16px; border: 1px solid #f0c9cd; border-radius: 11px; color: #a1404a; background: #fff4f5; }
.dashboard-state.is-visible { display: block; }
.dashboard-state.is-loading { display: block; overflow: hidden; height: 3px; margin: 12px 0 -15px; padding: 0; border: 0; border-radius: 3px; background: #e6ebf4; }
.dashboard-state.is-loading::after { display: block; width: 35%; height: 100%; content: ""; background: var(--primary); animation: loading 1.2s infinite ease-in-out; }
@keyframes loading { from { transform: translateX(-100%); } to { transform: translateX(390%); } }

/* KPIs */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.kpi-card { min-height: 145px; padding: 19px 20px 17px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.kpi-card--accent { color: #fff; border-color: transparent; background: linear-gradient(135deg, #152760, #29488f); box-shadow: 0 10px 28px rgba(22,39,95,.18); }
.kpi-card__top { display: flex; align-items: center; justify-content: space-between; color: #737b8e; font-size: 12px; font-weight: 700; }
.kpi-card--accent .kpi-card__top { color: #c8d3f3; }
.metric-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: #fff; background: rgba(255,255,255,.12); }
.metric-icon svg { width: 17px; height: 17px; }
.metric-icon--blue { color: var(--primary); background: var(--primary-soft); }.metric-icon--violet { color: var(--violet); background: #f1edff; }.metric-icon--green { color: var(--green); background: #e9f7f0; }
.kpi-card > strong { display: block; margin-top: 15px; color: var(--ink-strong); font-size: 30px; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.kpi-card--accent > strong { color: #fff; }
.kpi-card > p { margin: 10px 0 0; color: #9299aa; font-size: 11px; }
.kpi-card--accent > p { color: #aebce2; }
.trend-up { color: #68d39e !important; }.trend-down { color: #ff9aa4 !important; }

/* Analytics */
.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, .8fr); gap: 14px; margin-top: 14px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 19px 20px 0; }
.panel-heading h2 { margin: 0; color: var(--ink-strong); font-size: 15px; letter-spacing: -.015em; }
.panel-heading p { margin: 5px 0 0; color: #949bab; font-size: 11px; }
.panel--chart { position: relative; min-height: 390px; }
.chart-wrap { height: 300px; padding: 12px 18px 18px; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: #edf0f5; stroke-width: 1; }.chart-axis-label { fill: #9aa1b1; stroke: none; font-family: var(--font); font-size: 10px; }.chart-area { fill: url(#areaGradient); stroke: none; }.chart-line { fill: none; stroke: var(--primary); stroke-width: 2.3; vector-effect: non-scaling-stroke; }.chart-hit { fill: transparent; stroke: none; cursor: crosshair; }.chart-point { fill: #fff; stroke: var(--primary); stroke-width: 2; opacity: 0; }.chart-point.is-active { opacity: 1; }.chart-crosshair { stroke: #b8c2d4; stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }.chart-crosshair.is-active { opacity: 1; }
.chart-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; color: #7d8495; font-size: 10px; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }.legend-item i { width: 7px; height: 7px; border-radius: 50%; }
.color-0 { background: #5b82e5; }.color-1 { background: #8768df; }.color-2 { background: #49ad98; }.color-3 { background: #e5a64c; }.color-4 { background: #ef7985; }.color-5 { background: #66a7d8; }.color-6 { background: #9eabc3; }
.chart-tooltip { position: absolute; z-index: 4; min-width: 165px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 10px; pointer-events: none; background: rgba(255,255,255,.98); box-shadow: 0 10px 28px rgba(22,34,70,.15); font-size: 11px; }
.chart-tooltip strong { display: block; margin-bottom: 7px; color: var(--ink-strong); font-size: 12px; }.tooltip-row { display: flex; justify-content: space-between; gap: 20px; margin-top: 4px; color: #727a8d; }.tooltip-row b { color: #30374a; font-variant-numeric: tabular-nums; }
.panel--ranking { min-height: 390px; }
.donut-layout { display: grid; grid-template-columns: 160px minmax(0,1fr); align-items: center; gap: 12px; padding: 30px 20px 20px; }
.donut { position: relative; display: grid; width: 154px; height: 154px; place-items: center; border-radius: 50%; }
.donut > svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-base, .donut-segment { fill: none; stroke-width: 18; }
.donut-base { stroke: #e9edf3; }.stroke-0 { stroke: #5b82e5; }.stroke-1 { stroke: #8768df; }.stroke-2 { stroke: #49ad98; }.stroke-3 { stroke: #e5a64c; }.stroke-4 { stroke: #ef7985; }.stroke-5 { stroke: #66a7d8; }.stroke-6 { stroke: #9eabc3; }
.donut::after { position: absolute; width: 103px; height: 103px; border-radius: 50%; content: ""; background: #fff; }
.donut > div { position: relative; z-index: 1; display: grid; text-align: center; }
.donut strong { color: var(--ink-strong); font-size: 22px; letter-spacing: -.04em; }.donut span { margin-top: 3px; color: #969dad; font-size: 9px; }
.ranking-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ranking-item { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 8px; }
.ranking-item > i { width: 7px; height: 7px; border-radius: 50%; }.ranking-item > div { min-width: 0; }.ranking-item strong { display: block; overflow: hidden; color: #41495c; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.ranking-item span { display: block; margin-top: 2px; color: #9ca3b2; font-size: 9px; }.ranking-item > b { color: #30374a; font-size: 11px; font-variant-numeric: tabular-nums; }

/* Heatmap */
.heatmap-panel { margin-top: 14px; padding-bottom: 18px; }
.heatmap-scale { display: flex; align-items: center; gap: 4px; color: #9aa1b1; font-size: 9px; }
.heatmap-scale i { width: 10px; height: 10px; border-radius: 3px; background: #edf1f6; }.heatmap-scale i:nth-of-type(2) { background: #dbe5fb; }.heatmap-scale i:nth-of-type(3) { background: #adc2f4; }.heatmap-scale i:nth-of-type(4) { background: #7c9eea; }.heatmap-scale i:nth-of-type(5) { background: #4f76d6; }
.heatmap-scroll { overflow-x: auto; padding: 20px 20px 0; }
.heatmap { display: grid; min-width: 680px; grid-auto-flow: column; grid-template-rows: 15px repeat(7, 13px); grid-auto-columns: 13px; gap: 4px; align-items: center; }
.heatmap-month { color: #979eae; font-size: 8px; white-space: nowrap; transform: translateY(-2px); }.heat-cell { width: 13px; height: 13px; border-radius: 3px; background: #edf1f6; outline: 1px solid rgba(39,57,100,.02); }.heat-cell[data-level="1"] { background: #dbe5fb; }.heat-cell[data-level="2"] { background: #adc2f4; }.heat-cell[data-level="3"] { background: #7c9eea; }.heat-cell[data-level="4"] { background: #4f76d6; }.heat-cell:hover { outline: 2px solid #324d98; outline-offset: 1px; }

/* Tables */
.table-panel { margin-top: 14px; overflow: hidden; }
.table-heading { align-items: center; padding-bottom: 15px; }
.table-search { position: relative; display: flex; align-items: center; }
.table-search svg { left: 11px; }
.table-search input { width: 220px; height: 36px; padding: 0 12px 0 35px; border: 1px solid var(--border); border-radius: 9px; outline: 0; background: var(--surface-soft); font-size: 11px; }
.table-search input:focus { border-color: var(--primary); background: #fff; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; min-width: 1020px; }
th { height: 40px; padding: 0 15px; color: #8d95a6; background: #fafbfc; text-align: left; font-size: 9px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
td { height: 58px; padding: 9px 15px; border-top: 1px solid #edf0f4; color: #4d5568; font-size: 11px; vertical-align: middle; }
tbody tr { transition: background .12s; } tbody tr:hover { background: #fafbfe; }
th.numeric, td.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.group-name-cell { display: flex; min-width: 210px; align-items: center; gap: 10px; }
.group-initial { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: #3d5eaf; background: #eaf0ff; font-size: 11px; font-weight: 800; }
.group-name-cell strong, .campaign-cell strong { display: block; max-width: 230px; overflow: hidden; color: #30374a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.group-name-cell span, .campaign-cell span { display: block; margin-top: 3px; color: #a0a6b4; font-size: 9px; }
.number-strong { color: #30374a; font-weight: 750; }.number-error { color: #c94d59; }
.rate-cell { display: flex; min-width: 130px; align-items: center; gap: 8px; }.rate-track { width: 70px; height: 5px; overflow: hidden; appearance: none; border: 0; border-radius: 5px; background: #edf0f4; }.rate-track::-webkit-progress-bar { border-radius: 5px; background: #edf0f4; }.rate-track::-webkit-progress-value { border-radius: 5px; background: var(--green); }.rate-track::-moz-progress-bar { border-radius: 5px; background: var(--green); }.rate-cell span { color: #4b5366; font-variant-numeric: tabular-nums; }
.brief-button, .message-button { max-width: 190px; padding: 0; overflow: hidden; border: 0; color: var(--primary); background: none; cursor: pointer; font-size: 10px; font-weight: 700; text-align: left; text-overflow: ellipsis; white-space: nowrap; }.brief-button:hover, .message-button:hover { text-decoration: underline; }
.muted-dash { color: #b4bac6; }
.status-pill { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; color: #657087; background: #eef1f5; font-size: 9px; font-weight: 750; white-space: nowrap; }.status-pill--completed { color: #27855d; background: #e7f6ef; }.status-pill--running, .status-pill--processing { color: #3564bd; background: #eaf0ff; }.status-pill--failed { color: #b94854; background: #fff0f1; }
.empty-state { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 7px; color: #9aa1af; }.empty-state strong { color: #596174; }.empty-icon { font-size: 28px; color: #bdc5d3; }
.campaigns-panel { margin-bottom: 14px; }.campaigns-panel .panel-heading { padding-bottom: 16px; }
.dashboard-footer { display: flex; justify-content: space-between; padding: 13px 3px 0; color: #a1a8b6; font-size: 10px; }

/* Dialog */
.detail-dialog { width: min(620px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 40px)); padding: 0; overflow: hidden; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 26px 70px rgba(14,25,62,.25); }
.detail-dialog::backdrop { background: rgba(16,25,53,.42); backdrop-filter: blur(2px); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 23px 24px 17px; border-bottom: 1px solid var(--border); }.dialog-header h2 { margin: 0; color: var(--ink-strong); font-size: 20px; }.dialog-header .icon-button { border: 0; font-size: 25px; }
.dialog-meta { display: flex; flex-wrap: wrap; gap: 9px; padding: 13px 24px; color: #7c8496; background: var(--surface-soft); font-size: 10px; }.dialog-meta span { padding-right: 9px; border-right: 1px solid #dce1e9; }.dialog-meta span:last-child { border: 0; }
.dialog-content { max-height: 520px; overflow: auto; padding: 23px 24px 30px; color: #3e4659; font-size: 13px; line-height: 1.7; white-space: pre-wrap; }

/* Responsive */
@media (max-width: 1180px) {
  .filters-panel { flex-wrap: wrap; }.group-filter { margin-left: 0; flex: 1; }.kpi-grid { grid-template-columns: repeat(2, 1fr); }.analytics-grid { grid-template-columns: 1fr; }.panel--ranking { min-height: auto; }.donut-layout { grid-template-columns: 180px 1fr; }
}
@media (max-width: 760px) {
  .login-page { overflow: auto; }.login-shell { display: block; }.login-brand { display: none; }.login-panel { min-height: 100vh; padding: 30px 22px; }.mobile-brand { display: flex; }.login-form-wrap h2 { font-size: 29px; }
  .nav-rail { display: none; }.workspace { margin-left: 0; }.topbar { padding: 0 16px; }.breadcrumbs span, .breadcrumbs b { display: none; }.freshness { display: none; }.dashboard-main { padding: 24px 14px 18px; }.page-heading { align-items: flex-start; }.page-heading h1 { font-size: 25px; }.page-heading .button { width: 42px; min-width: 42px; padding: 0; font-size: 0; }
  .filters-panel { gap: 8px; }.preset-control { width: 100%; }.preset-control button { flex: 1; }.date-field { flex: 1; min-width: 125px; }.date-arrow { display: none; }.group-filter { width: 100%; flex-basis: 100%; }.group-menu { right: auto; left: 0; width: min(330px, calc(100vw - 58px)); }.filter-apply { flex: 1; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }.kpi-card { min-height: 127px; padding: 15px; }.kpi-card > strong { font-size: 25px; }.kpi-card__top > span { max-width: 100px; }.metric-icon { width: 28px; height: 28px; }
  .analytics-grid { gap: 9px; margin-top: 9px; }.panel--chart { min-height: 340px; }.chart-wrap { height: 260px; padding-left: 8px; padding-right: 8px; }.chart-legend { display: none; }.donut-layout { grid-template-columns: 135px 1fr; padding: 22px 14px 18px; }.donut { width: 128px; height: 128px; }.donut::after { width: 86px; height: 86px; }.ranking-list { gap: 9px; }.heatmap-panel, .table-panel { margin-top: 9px; }.panel-heading { padding: 16px 15px 0; }.heatmap-scale { display: none; }.heatmap-scroll { padding: 17px 15px 0; }.table-heading { align-items: flex-start; flex-direction: column; }.table-search, .table-search input { width: 100%; }.dashboard-footer { flex-direction: column; gap: 4px; }.detail-dialog { border-radius: 14px; }
}
@media (max-width: 430px) {
  .kpi-grid { grid-template-columns: 1fr; }.kpi-card { min-height: 118px; }.donut-layout { grid-template-columns: 1fr; justify-items: center; }.ranking-list { width: 100%; }.date-field { width: 100%; flex-basis: calc(50% - 4px); }.page-heading p:not(.eyebrow) { max-width: 260px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* Очередь лидов. Список слева, карточка справа: разбор идёт подряд, и
   возвращаться к списку после каждого лида — лишнее движение. */
.actor-field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: #5b6478; }
.actor-field input { width: 120px; padding: 4px 8px; border: 1px solid #d7dced; border-radius: 8px; font: inherit; }
.queue-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.queue-filters > input[type="search"] { padding: 9px 12px; border: 1px solid #d7dced; border-radius: 10px; font: inherit; max-width: 420px; }
.queue-facets { display: flex; flex-wrap: wrap; gap: 12px; }
.queue-facet-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.queue-facet-group__label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #7a8296; }
.queue-facet { padding: 4px 10px; border: 1px solid #d7dced; border-radius: 999px; background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.queue-facet--active { background: #132461; border-color: #132461; color: #fff; }
.queue-layout { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 18px; align-items: start; }
.queue-summary { font-size: 12px; color: #7a8296; margin: 0 0 8px; }
.queue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 70vh; overflow-y: auto; }
.queue-item { padding: 10px 12px; border: 1px solid #e3e7f2; border-radius: 12px; background: #fff; cursor: pointer; }
.queue-item:focus-visible { outline: 2px solid #132461; outline-offset: 2px; }
.queue-item--active { border-color: #132461; box-shadow: 0 0 0 1px #132461 inset; }
.queue-item__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.queue-item__meta { margin: 4px 0 0; font-size: 11px; color: #7a8296; }
.queue-item__reason { margin: 4px 0 0; font-size: 12px; color: #3d465c; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chip { padding: 2px 8px; border-radius: 999px; background: #eef1f8; font-size: 11px; color: #5b6478; }
.chip--hot { background: #fde8e6; color: #a3271b; }
.chip--warm { background: #fdf3e0; color: #8a5a12; }
.chip--stale { background: #fdf3e0; color: #8a5a12; }
.chip--repeat { background: #e8f0fd; color: #1b4ba3; }
.queue-detail { padding: 16px; border: 1px solid #e3e7f2; border-radius: 14px; background: #fff; position: sticky; top: 12px; }
.queue-detail__empty { color: #7a8296; margin: 0; }
.queue-detail__link { font-size: 12px; }
.queue-field { margin-top: 12px; }
.queue-field span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #7a8296; }
.queue-field p { margin: 2px 0 0; white-space: pre-wrap; }
.queue-offer, .queue-outcomes { margin-top: 16px; padding-top: 12px; border-top: 1px solid #eef1f8; display: flex; flex-direction: column; gap: 8px; }
.queue-offer > span, .queue-outcomes > span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #7a8296; }
.queue-offer textarea, .queue-offer input, .queue-offer select, .queue-outcomes input { padding: 8px 10px; border: 1px solid #d7dced; border-radius: 10px; font: inherit; width: 100%; box-sizing: border-box; }
.queue-outcome-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.queue-outcome { padding: 6px 12px; border: 1px solid #d7dced; border-radius: 999px; background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.queue-outcome--active { background: #132461; border-color: #132461; color: #fff; }
.queue-hint { font-size: 11px; color: #7a8296; margin: 4px 0 0; }
.queue-hint--stale { color: #8a5a12; }
.queue-contact-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.queue-contact-row__link { color: #132461; font-weight: 600; }
.queue-copy-button { padding: 3px 9px; border: 1px solid #d7dced; border-radius: 999px; background: #fff; font-size: 11px; color: #5b6478; cursor: pointer; }
.queue-copy-button:hover { background: #f4f6fb; }
.queue-funnel-section { margin-top: 28px; }
.queue-funnel { width: 100%; border-collapse: collapse; font-size: 13px; }
.queue-funnel th, .queue-funnel td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #eef1f8; white-space: nowrap; }
.queue-funnel th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #7a8296; }
.table-scroll { overflow-x: auto; }
.freshness--error { color: #a3271b; }
@media (max-width: 900px) {
  .queue-layout { grid-template-columns: 1fr; }
  .queue-detail { position: static; }
  .queue-list { max-height: none; }
}

/* Рассылки. Сверху — то, что сломано прямо сейчас (выключено, ящик в ошибках,
   ответы не читаются), ниже — лента писем в той же раскладке «список +
   карточка», что и очередь лидов: разбор идёт подряд, без возврата к списку. */

/* Шесть карточек воронки вместо четырёх. Свои медиа-правила ниже, потому что
   общие для .kpi-grid стоят раньше и этот модификатор их перебил бы. */
.kpi-grid--six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi-card > strong.mail-kpi--bad { color: #c94d59; }
.metric-icon--red { color: var(--red); background: #fff0f1; }
.metric-icon--amber { color: #b7791f; background: #fdf3e0; }
.metric-icon--grey { color: #7a8296; background: #eef1f5; }

/* Тон стадии письма приходит с сервера (stageTone) — цвет не угадываем по коду стадии. */
.chip--tone-ok, .chip--tone-hot, .chip--tone-wait, .chip--tone-warn, .chip--tone-bad, .chip--tone-muted { white-space: nowrap; }
.chip--tone-ok { background: #e7f6ef; color: #27855d; }
.chip--tone-hot { background: var(--green); color: #fff; font-weight: 700; }
.chip--tone-wait { background: #eaf0ff; color: #3564bd; }
.chip--tone-warn { background: #fdf3e0; color: #8a5a12; }
.chip--tone-bad { background: #fff0f1; color: #b94854; }
.chip--tone-muted { background: #eef1f5; color: #7a8296; }

.mail-text--bad { color: #b94854; }
.mail-text--muted { color: var(--muted-light); }
.mail-hint { display: block; flex-basis: 100%; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.mail-empty { margin: 0; padding: 18px 20px; color: var(--muted); font-size: 13px; list-style: none; }

/* Строка настроек и предупреждения */
.mail-status { display: grid; gap: 10px; }
.mail-settings { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0; }
.mail-setting { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; color: #4d5568; background: var(--surface); font-size: 12px; }
.mail-setting--on::before, .mail-setting--off::before { width: 7px; height: 7px; border-radius: 50%; content: ""; }
.mail-setting--on { color: #27855d; }
.mail-setting--on::before { background: var(--green); box-shadow: 0 0 0 3px rgba(47,166,111,.12); }
.mail-setting--off { border-color: #f0c9cd; color: #a1404a; background: #fff4f5; font-weight: 700; }
.mail-setting--off::before { background: var(--red); }
.mail-banners { display: grid; gap: 8px; }
.mail-banners:empty { display: none; }
.mail-banner { margin: 0; padding: 11px 14px; border: 1px solid var(--border); border-radius: 11px; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.mail-banner--warn { border-color: #f1dcb4; color: #7a5010; background: #fdf6e7; }
.mail-banner--bad { border-color: #f0c9cd; color: #a1404a; background: #fff4f5; }

/* Ящики и дни */
.mail-panels { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.mail-accounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 16px 20px 20px; }
.mail-account { display: grid; min-width: 0; align-content: start; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.mail-account__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mail-account__names { display: grid; min-width: 0; gap: 2px; }
.mail-account__names strong { color: var(--ink-strong); font-size: 13px; overflow-wrap: anywhere; }
.mail-account__names span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.mail-account__meters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mail-meter { display: grid; min-width: 0; gap: 5px; }
.mail-meter__head { display: flex; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 11px; }
.mail-meter__head b { color: #30374a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mail-meter__bar { width: 100%; height: 5px; overflow: hidden; -webkit-appearance: none; appearance: none; border: 0; border-radius: 5px; background: #e3e8f0; }
.mail-meter__bar::-webkit-progress-bar { border-radius: 5px; background: #e3e8f0; }
.mail-meter__bar::-webkit-progress-value { border-radius: 5px; background: var(--primary); }
.mail-meter__bar::-moz-progress-bar { border-radius: 5px; background: var(--primary); }
.mail-meter__bar--full::-webkit-progress-value { background: var(--amber); }
.mail-meter__bar--full::-moz-progress-bar { background: var(--amber); }
.mail-account__facts { display: grid; gap: 8px; margin: 0; }
.mail-fact { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 8px; font-size: 12px; }
.mail-fact dt { color: var(--muted); font-size: 11px; }
.mail-fact dd { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; color: #30374a; overflow-wrap: anywhere; }

.mail-days-panel .panel-heading { padding-bottom: 12px; }
.mail-days { max-height: 420px; margin: 0; padding: 4px 0 12px; overflow-y: auto; list-style: none; }
/* Колонки в px, а не em: у строки-шапки шрифт мельче, и em-колонки разъезжались с цифрами. */
.mail-day { display: grid; grid-template-columns: 68px minmax(48px, 1fr) repeat(4, 38px); align-items: center; gap: 8px; padding: 4px 20px; color: #4d5568; font-size: 12px; font-variant-numeric: tabular-nums; }
.mail-day--head { padding-top: 8px; padding-bottom: 8px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: #8d95a6; background: #fafbfc; font-size: 9px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.mail-day--empty { color: #b4bac6; }
.mail-day--today .mail-day__date { color: var(--ink-strong); font-weight: 800; }
.mail-day__date { white-space: nowrap; }
.mail-day__num { text-align: right; }
.mail-day__num--hot { color: #27855d; font-weight: 800; }
.mail-day__legend { display: flex; align-items: center; gap: 5px; overflow: hidden; white-space: nowrap; font-weight: 700; letter-spacing: 0; text-transform: none; }
.mail-legend { width: 10px; height: 6px; border-radius: 3px; }
.mail-legend--needs { background: #c5d4f6; }
.mail-legend--sent { margin-left: 6px; background: var(--primary); }
.mail-day__bars { display: grid; min-width: 0; }
/* Две полосы в одной ячейке: светлая — найдено, тёмная поверх — ушло. Шкала общая на 30 дней. */
.mail-bar { width: 100%; height: 8px; grid-area: 1 / 1; -webkit-appearance: none; appearance: none; border: 0; border-radius: 4px; background: transparent; }
.mail-bar::-webkit-progress-bar { border-radius: 4px; background: transparent; }
.mail-bar--needs { background: #edf0f4; }
.mail-bar--needs::-webkit-progress-bar { background: #edf0f4; }
.mail-bar--needs::-webkit-progress-value { border-radius: 4px; background: #c5d4f6; }
.mail-bar--needs::-moz-progress-bar { border-radius: 4px; background: #c5d4f6; }
.mail-bar--sent::-webkit-progress-value { border-radius: 4px; background: var(--primary); }
.mail-bar--sent::-moz-progress-bar { border-radius: 4px; background: var(--primary); }

/* Фильтры и лента */
.mail-filters { margin-top: 22px; }
.mail-facet-reset { border-style: dashed; color: var(--primary-dark); }
.mail-more { width: 100%; margin-top: 10px; }
.mail-more[hidden] { display: none; }
.mail-item__head strong { min-width: 0; overflow-wrap: anywhere; }
.mail-item__head .chip { flex: 0 0 auto; }
.mail-item__to { color: #30374a; font-weight: 600; overflow-wrap: anywhere; }
/* Время уходит на свою строку, когда направление с ящиком не влезают: иначе
   длинное название сжималось в узкую колонку рядом с датой. */
.mail-item__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 8px; margin: 3px 0 0; color: #7a8296; font-size: 11px; }
.mail-item__meta span { min-width: 0; overflow-wrap: anywhere; }
.mail-item__time { flex: 0 0 auto; margin-left: auto; white-space: nowrap; }
.mail-item .queue-item__reason { -webkit-line-clamp: 1; line-clamp: 1; }

/* Карточка письма. На широком экране прокручивается сама, чтобы длинное письмо
   не уводило список из вида; отступ сверху — под липкую шапку. */
.mail-detail { top: 70px; max-height: calc(100vh - 82px); overflow-y: auto; scroll-margin-top: 70px; }
.mail-detail h2 { margin: 0; color: var(--ink-strong); font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.mail-detail__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mail-detail .queue-field p { overflow-wrap: anywhere; }
.mail-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; }
.mail-times div { min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--surface-soft); }
.mail-times dt { color: #7a8296; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.mail-times dd { margin: 2px 0 0; color: #30374a; font-size: 12px; font-variant-numeric: tabular-nums; }
.mail-error { margin-top: 12px; padding: 10px 12px; border: 1px solid #f0c9cd; border-left: 3px solid var(--red); border-radius: 10px; background: #fff4f5; }
.mail-error span { display: block; color: #b94854; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.mail-error p { margin: 3px 0 0; color: #8f2f3a; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-section { margin-top: 16px; padding-top: 12px; border-top: 1px solid #eef1f8; }
.mail-section__title { margin: 0 0 6px; color: #7a8296; font-size: 11px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; }
.mail-section > p { margin: 4px 0 0; overflow-wrap: anywhere; }
.mail-section details { margin-top: 8px; }
.mail-section summary { color: var(--primary-dark); cursor: pointer; font-size: 12px; font-weight: 600; }
.mail-source-text { margin: 6px 0 0; color: #3d465c; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.mail-link { color: var(--primary-dark); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.mail-section > .mail-proof__kind { color: #30374a; font-weight: 700; }
.mail-quote { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid #c5d4f6; border-radius: 0 8px 8px 0; color: #33405e; background: var(--surface-blue); font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-letter { max-height: 360px; margin: 0; padding: 12px 14px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; color: #30374a; background: var(--surface-soft); font-family: var(--font); font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mail-attachments li { padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 12px; overflow-wrap: anywhere; }
.mail-timeline { margin: 0; padding: 0; list-style: none; }
.mail-timeline li { position: relative; display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; padding: 5px 0 5px 16px; font-size: 12px; }
.mail-timeline li::before { position: absolute; top: 10px; left: 2px; width: 7px; height: 7px; border-radius: 50%; content: ""; background: var(--primary); }
.mail-timeline li:not(:last-child)::after { position: absolute; top: 19px; bottom: -5px; left: 5px; width: 1px; content: ""; background: var(--border-strong); }
.mail-timeline time { color: var(--muted); font-variant-numeric: tabular-nums; }
.mail-inbound { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mail-inbound li { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.mail-inbound__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.mail-inbound__head time { color: var(--muted); font-size: 11px; }
.mail-inbound__from { margin: 6px 0 0; color: #4d5568; font-size: 12px; overflow-wrap: anywhere; }
.mail-inbound__subject { margin: 2px 0 0; color: #30374a; font-weight: 700; overflow-wrap: anywhere; }
.mail-inbound__snippet { margin: 4px 0 0; color: #3d465c; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-message-id { margin: 16px 0 0; color: var(--muted-light); font-size: 11px; overflow-wrap: anywhere; }

@media (max-width: 1380px) {
  .kpi-grid--six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .mail-panels { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .mail-detail { max-height: none; overflow: visible; }
}
@media (max-width: 760px) {
  .kpi-grid--six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mail-panels { gap: 9px; margin-top: 9px; }
  .mail-accounts { grid-template-columns: 1fr; padding: 14px 15px 16px; }
  .mail-day { grid-template-columns: 60px minmax(24px, 1fr) repeat(4, 34px); gap: 5px; padding-right: 15px; padding-left: 15px; }
  /* visibility, а не display: легенда занимает ячейку сетки, без неё подписи колонок съезжают влево. */
  .mail-day__legend { visibility: hidden; }
  .mail-filters > input[type="search"] { max-width: none; }
}
@media (max-width: 430px) {
  .mail-times { grid-template-columns: 1fr; }
  .mail-account__meters { grid-template-columns: 1fr; }
  .mail-timeline li { grid-template-columns: 1fr; gap: 0; }
}
