/* NubeMail · identidad visual
   Azul Nube #2B6CF0 · Cielo #8EC5FF · Tinta #13203A · Niebla #F3F6FB · Sello #F2B53A
   Títulos: Plus Jakarta Sans · Texto: Instrument Sans · Direcciones y códigos: JetBrains Mono */
:root {
  --bg: #F3F6FB;
  --surface: #FFFFFF;
  --surface-2: #EAF0F8;
  --ink: #13203A;
  --muted: #56627C;
  --line: #DCE3EE;
  --accent: #2B6CF0;
  --accent-ink: #FFFFFF;
  --accent-soft: #E2ECFF;
  --sky: #8EC5FF;
  --ok: #15805A; --ok-soft: #DBF3E8;
  --warn: #A35F00; --warn-soft: #FCEFD3;
  --bad: #C0342C; --bad-soft: #FBE2E0;
  --stamp: #F2B53A; --stamp-ink: #2A1E04;
  --shadow: 0 1px 2px rgba(19,32,58,.05), 0 6px 18px rgba(19,32,58,.05);
  --f-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1220; --surface: #121B2D; --surface-2: #1A2540; --ink: #E6ECF7; --muted: #93A1BD; --line: #24304A;
    --accent: #78A9FF; --accent-ink: #0B1220; --accent-soft: #1C2B4F; --sky: #8EC5FF;
    --ok: #4CC28A; --ok-soft: #14302A; --warn: #E6A84B; --warn-soft: #382A13; --bad: #F2736B; --bad-soft: #3B1D1D;
    --shadow: 0 1px 2px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.mono { font-family: var(--f-mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ---------- Marca ---------- */
.wordmark { font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.wordmark b { color: var(--accent); font-weight: 800; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; text-decoration: none; }
.brand img { width: 32px; height: 32px; flex: none; }
.brand .wordmark { font-size: 20px; }

/* ---------- Estructura ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0,1fr); min-height: 100%; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.nav a:hover { background: var(--surface-2); }
.nav a.on { background: var(--accent-soft); color: var(--accent); }
.nav a.on svg { color: var(--accent); }
.nav .count { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.nav a.on .count { color: var(--accent); }
.nav .count.hot { background: var(--stamp); color: var(--stamp-ink); padding: 1px 7px; border-radius: 99px; font-weight: 600; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 8px 0; display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.live { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); flex: none; }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 14px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 9px; padding: 8px 12px; color: var(--muted); }
.search input { border: 0; background: none; outline: none; width: 100%; color: var(--ink); }
.tag-mode { font-size: 12px; color: var(--warn); background: var(--warn-soft); padding: 3px 10px; border-radius: 99px; font-weight: 500; white-space: nowrap; }
.me { margin-left: auto; position: relative; }
.me-btn { display: flex; align-items: center; gap: 10px; border: 0; background: none; cursor: pointer; padding: 4px 6px; border-radius: 10px; }
.me-btn:hover { background: var(--surface-2); }
.me-btn .who-t { text-align: right; line-height: 1.25; }
.me-btn small { display: block; color: var(--muted); font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; flex: none; font-size: 13px; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 210px; padding: 6px; z-index: 10; display: grid; }
.menu button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.menu button:hover { background: var(--surface-2); }
.view { padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head h1 { font-family: var(--f-display); font-weight: 800; font-size: 28px; letter-spacing: -.025em; margin: 0; line-height: 1.15; text-wrap: balance; }
.head p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------- Componentes ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 500; white-space: nowrap; text-decoration: none; color: var(--ink); }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: var(--ok-soft); }
.pill.warn { color: var(--warn); background: var(--warn-soft); }
.pill.bad { color: var(--bad); background: var(--bad-soft); }
.pill.off { color: var(--muted); background: var(--surface-2); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-h h2 { font-size: 14px; font-weight: 600; margin: 0; }
.panel-h .sub { color: var(--muted); font-size: 12.5px; }
.panel-b { padding: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.input, .select { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 8px 11px; width: 100%; min-width: 0; }
.input:focus, .select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea.input { resize: vertical; min-height: 150px; line-height: 1.5; }
.hint { font-size: 12px; color: var(--muted); }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 30px 18px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.kpi { padding: 16px 18px; display: grid; gap: 6px; }
.kpi .lab { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi .lab svg { width: 16px; height: 16px; }
.kpi .val { font-family: var(--f-display); font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .foot { font-size: 12.5px; display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.kpi.alert { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.grid-2 { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 16px; align-items: start; }
.chart svg { display: block; width: 100%; height: auto; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--f-body); }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 10px; font-size: 13px; }
.bar-row .track { grid-column: 1 / -1; height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar-row .fill { height: 100%; background: var(--accent); border-radius: 99px; }
.list { display: flex; flex-direction: column; }
.li { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; gap: 2px 12px; align-items: baseline; padding: 11px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.li:last-child { border-bottom: 0; }
.li:hover { background: var(--surface-2); }
.li .u, .mi .u { width: 8px; height: 8px; border-radius: 50%; background: var(--stamp); align-self: center; }
.li .u.read, .mi .u.read { background: transparent; }
.li .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .s { grid-column: 2 / 4; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .w { color: var(--muted); font-size: 12px; white-space: nowrap; }
.stat-list { display: grid; gap: 12px; font-size: 13px; margin: 0; }
.stat-list div { display: flex; justify-content: space-between; gap: 10px; }
.stat-list dt { color: var(--muted); }
.stat-list dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }

.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td.r, th.r { text-align: right; }
td.wrap { white-space: normal; min-width: 200px; }
.tbl-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; gap: 10px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); align-items: center; }
.toolbar .input { max-width: 280px; }
.toolbar .select { width: auto; }
.icon-btn { border: 0; background: none; padding: 5px; border-radius: 6px; cursor: pointer; color: var(--muted); display: inline-grid; place-items: center; text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
.unread-n { background: var(--stamp); color: var(--stamp-ink); font-weight: 600; font-size: 12px; padding: 1px 7px; border-radius: 99px; }
.sub-line { color: var(--muted); font-size: 12px; }

.sw { position: relative; width: 34px; height: 20px; display: inline-block; flex: none; vertical-align: middle; }
.sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.sw span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; cursor: pointer; transition: background .15s; }
.sw span::after { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.sw input:checked + span { background: var(--ok); }
.sw input:checked + span::after { transform: translateX(14px); }
.sw input:disabled + span { opacity: .5; cursor: not-allowed; }
.sw input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.dns { display: grid; gap: 8px; background: var(--surface-2); border-radius: 9px; padding: 12px 14px; font-size: 13px; margin: 0; }
.dns div { display: grid; grid-template-columns: 104px minmax(0,1fr) auto; gap: 10px; align-items: center; }
.dns dt { color: var(--muted); font-size: 12px; }
.dns dd { margin: 0; font-family: var(--f-mono); font-size: 12.5px; overflow-wrap: anywhere; }
.steps { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.steps b { color: var(--ink); font-weight: 600; }

.bulk { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: 16px; align-items: start; }
.form { display: grid; gap: 16px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; cursor: pointer; font-family: var(--f-mono); font-size: 12.5px; }
.chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 9px; padding: 3px; gap: 3px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.preview { font-family: var(--f-mono); font-size: 12.5px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 18px; }
.preview div { padding: 6px 0; border-bottom: 1px dashed var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview div b { color: var(--muted); font-weight: 400; }
.summary { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: var(--muted); }
.summary strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.mail { display: grid; grid-template-columns: minmax(0, 370px) minmax(0,1fr); min-height: 600px; overflow: hidden; }
.mail-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.mail-list .toolbar { padding: 12px 14px; }
.mail-list .toolbar .input { max-width: none; flex: 1; }
.mail-items { overflow-y: auto; max-height: 70vh; }
.mi { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; gap: 2px 10px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; background: none; border-left: 3px solid transparent; width: 100%; text-align: left; }
.mi:hover { background: var(--surface-2); }
.mi.on { background: var(--accent-soft); border-left-color: var(--accent); }
.mi .u { margin-top: 6px; align-self: start; }
.mi .f { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi.isread .f { font-weight: 500; }
.mi .w { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mi .s { grid-column: 2 / 4; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi .to { grid-column: 2 / 4; font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader { padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.reader h2 { font-family: var(--f-display); font-size: 21px; font-weight: 800; margin: 0; letter-spacing: -.015em; text-wrap: balance; overflow-wrap: anywhere; }
.meta { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 4px 14px; font-size: 13px; margin: 0; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; overflow-wrap: anywhere; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border: 1px dashed var(--accent); background: var(--accent-soft); border-radius: var(--r); padding: 12px 16px; }
.code-box > div { min-width: 0; }
.code-box .k { font-size: 12px; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.code-box .c { font-family: var(--f-mono); font-size: 26px; font-weight: 500; letter-spacing: .18em; }
.code-box .l { font-family: var(--f-mono); font-size: 12.5px; overflow-wrap: anywhere; }
.frame-wrap { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.frame-wrap iframe { display: block; width: 100%; height: 520px; border: 0; resize: vertical; background: #fff; }
.frame-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); padding: 8px 12px; background: var(--surface-2); flex-wrap: wrap; }
.atts { display: flex; flex-wrap: wrap; gap: 8px; }
.att { font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; }
.reader-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.body-card { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: var(--bg); white-space: pre-wrap; line-height: 1.6; overflow-wrap: anywhere; }

.who { display: flex; align-items: center; gap: 10px; }
.ava { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 12px; background: var(--surface-2); color: var(--ink); flex: none; }
.who small { display: block; color: var(--muted); font-size: 12px; }
.role { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 6px; background: var(--surface-2); }
.role.admin { background: var(--ink); color: var(--bg); }
.role.op { background: var(--accent-soft); color: var(--accent); }
.quota { display: grid; gap: 4px; min-width: 130px; font-size: 12px; color: var(--muted); }
.quota .track { height: 5px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.quota .fill { height: 100%; background: var(--accent); }
.quota .fill.hi { background: var(--warn); }
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; white-space: normal; min-width: 220px; }
.yes { color: var(--ok); font-weight: 700; }
.no { color: var(--muted); opacity: .5; }
.part { color: var(--warn); font-size: 12px; font-weight: 600; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 12px 18px; border-top: 1px solid var(--line); }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 14px; }

/* ---------- Ventanas y avisos ---------- */
.scrim { position: fixed; inset: 0; background: rgba(8,14,28,.5); display: grid; place-items: center; padding: 16px; z-index: 20; }
.modal { width: min(500px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.modal.wide { width: min(620px, 100%); }
.copy-line { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border-radius: 9px; padding: 8px 10px; }
.copy-line code { font-family: var(--f-mono); font-size: 12.5px; overflow-wrap: anywhere; flex: 1; min-width: 0; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 9px; font-weight: 500; z-index: 30; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.err { background: var(--bad); color: #fff; }

/* ---------- Acceso ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(1200px 500px at 15% -10%, color-mix(in srgb, var(--sky) 35%, transparent), transparent 60%),
  radial-gradient(900px 400px at 110% 110%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%), var(--bg); }
.auth-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 30px; display: grid; gap: 18px; }
.auth-card .brand { justify-content: center; padding: 0; }
.auth-card .brand img { width: 44px; height: 44px; }
.auth-card .brand .wordmark { font-size: 26px; }
.auth-card h1 { font-family: var(--f-display); font-size: 19px; margin: 0; text-align: center; font-weight: 700; }
.auth-card p { margin: 0; text-align: center; color: var(--muted); }
.auth-foot { text-align: center; font-size: 12px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-2, .bulk { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0,1fr); }
  .side { position: static; height: auto; gap: 10px; padding: 12px 16px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-foot, .nav-label { display: none; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .nav a { white-space: nowrap; }
  .top { position: static; padding: 10px 16px; }
  .me-btn .who-t { display: none; }
  .view { padding: 20px 16px 28px; }
  .mail { grid-template-columns: minmax(0,1fr); }
  .mail-list { border-right: 0; border-bottom: 1px solid var(--line); }
  .mail-items { max-height: 320px; }
  .reader { padding: 18px; }
}
@media (max-width: 520px) {
  .kpis, .row-2, .preview, .perm-grid { grid-template-columns: minmax(0,1fr); }
  .search { display: none; }
  .head h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
