/* ============================================================
   TalkOK · customer portal
   Layers on top of styles.css (design tokens, buttons, focus).
   UK English. en-GB. Dates DD/MM/YYYY. Currency GBP.
   ============================================================ */

.portal-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
}

/* ============ Shared bits ============ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; white-space: nowrap;
  padding: 4px 10px; border-radius: var(--r-full);
  border: 1px solid var(--border);
  color: var(--muted); background: var(--surface-2);
}
.badge-accent {
  color: #ffb3ad; background: rgba(232, 72, 63, .13);
  border-color: rgba(232, 72, 63, .35);
}
.badge-success {
  color: var(--success); background: rgba(111, 207, 151, .1);
  border-color: rgba(111, 207, 151, .3);
}
.badge-warn {
  color: #f5c451; background: rgba(245, 196, 81, .1);
  border-color: rgba(245, 196, 81, .32);
}
.badge-dev {
  color: #0D0F14; background: #f5c451; border-color: #f5c451;
  letter-spacing: .1em;
}

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface-2); color: var(--muted);
  padding: 14px 18px; font-size: .92rem; line-height: 1.5;
}
.notice strong { color: var(--text); }
.notice-warn { border-color: rgba(245, 196, 81, .35); background: rgba(245, 196, 81, .07); }
.notice-error { border-color: rgba(232, 72, 63, .4); background: rgba(232, 72, 63, .08); color: #f2b8b5; }
.notice-success { border-color: rgba(111, 207, 151, .35); background: rgba(111, 207, 151, .07); color: var(--success); }

.btn-danger {
  color: #ffb3ad;
  box-shadow: inset 0 0 0 1.5px rgba(232, 72, 63, .45);
  background: rgba(232, 72, 63, .07);
}
.btn-danger:hover {
  transform: translateY(-1px);
  background: rgba(232, 72, 63, .14);
  box-shadow: inset 0 0 0 1.5px rgba(232, 72, 63, .7);
}
.btn-xs { padding: 7px 14px; font-size: .82rem; }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .55; cursor: not-allowed; transform: none !important;
}

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .86em; }

/* ============ Forms ============ */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { font-size: .84rem; font-weight: 600; color: var(--muted); }
.field .hint { font-size: .78rem; color: var(--faint); }
.field input,
.field select,
.field textarea,
.input {
  width: 100%;
  font: inherit; color: var(--text);
  background: var(--ink-deep);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
.input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 72, 63, .18);
}
.field input::placeholder, .input::placeholder { color: var(--faint); }
.field select { appearance: auto; }
.field-check {
  flex-direction: row; align-items: center; gap: 10px;
}
.field-check input { width: auto; accent-color: var(--accent); }
.field-check label { color: var(--text); }
.form-error {
  color: #f2b8b5; font-size: .88rem; line-height: 1.45;
  border: 1px solid rgba(232, 72, 63, .4);
  background: rgba(232, 72, 63, .08);
  border-radius: var(--r-sm); padding: 10px 14px;
  margin-bottom: 16px;
}
.form-success {
  color: var(--success); font-size: .88rem;
  border: 1px solid rgba(111, 207, 151, .35);
  background: rgba(111, 207, 151, .07);
  border-radius: var(--r-sm); padding: 10px 14px;
  margin-bottom: 16px;
}
[hidden] { display: none !important; }

/* ============ Auth (login) ============ */
.auth-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 48px 20px;
  position: relative; overflow: clip;
}
.auth-glow {
  position: absolute; top: -30%; left: 50%; transform: translateX(-50%);
  width: 70vw; height: 70vw; max-width: 780px; max-height: 780px;
  background: radial-gradient(circle at center, rgba(232, 72, 63, .13), transparent 65%);
  filter: blur(12px); pointer-events: none;
}
.auth-card {
  position: relative;
  width: min(430px, 100%);
  background: linear-gradient(180deg, var(--surface), rgba(22, 26, 34, .6));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 40px 38px 34px;
  box-shadow: var(--shadow-pop);
}
.auth-brand {
  display: inline-flex; align-items: center; gap: 11px;
  margin-bottom: 28px;
}
.auth-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
.auth-brand .brand-word { font-size: 1.35rem; }
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--ink-deep);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 4px; margin-bottom: 26px;
}
.auth-tab {
  padding: 10px 8px; border-radius: var(--r-full);
  font-size: .92rem; font-weight: 600; color: var(--muted);
  transition: background .18s ease, color .18s ease;
}
.auth-tab[aria-selected="true"] {
  background: var(--surface-2); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}
.auth-plan-note {
  margin-bottom: 20px; font-size: .86rem;
}
.auth-foot {
  margin-top: 22px; text-align: center;
  font-size: .84rem; color: var(--faint);
}
.auth-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.auth-foot a:hover { color: var(--text); }
.auth-loading { text-align: center; color: var(--faint); padding: 20px 0; }

/* ============ Portal shell ============ */
.portal-shell {
  flex: 1;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
}
.portal-side {
  border-right: 1px solid var(--border);
  padding: 26px 18px 26px 24px;
  display: flex; flex-direction: column; gap: 26px;
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow-y: auto;
}
.portal-side .auth-brand { margin-bottom: 0; }
/* Filter chips (admin AppSumo list) */
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.chip {
  font-size: .8rem; font-weight: 500; color: var(--muted);
  padding: 6px 13px; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--surface-2);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] {
  color: var(--text); border-color: rgba(232, 72, 63, .45); background: rgba(232, 72, 63, .12);
}

/* Account type cell: one line per funding source, primary first. */
.account-type { display: flex; flex-direction: column; gap: 4px; }
.account-type-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Expanded licence row */
.lic-detail > td { background: rgba(255, 255, 255, .02); }

.portal-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
/* Grouped navigation (account page): the stack takes the growth the single nav used to. */
.portal-nav-stack { display: flex; flex-direction: column; gap: 22px; flex: 1; }
.portal-nav-stack .portal-nav { flex: none; }
.portal-nav-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
  padding: 0 14px; margin-bottom: 8px;
}
/* Administration sits apart from the account sections, not among them. */
#adminNavGroup { border-top: 1px solid var(--border); padding-top: 20px; }
#adminNavGroup .portal-nav-label { color: #ffb3ad; }
.portal-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; border-radius: var(--r-sm);
  font-size: .93rem; font-weight: 500; color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.portal-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.portal-nav a[aria-current="true"] {
  color: var(--text);
  background: rgba(232, 72, 63, .1);
  box-shadow: inset 2px 0 0 var(--accent);
}
.portal-nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.portal-side-foot {
  display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--border); padding-top: 18px;
}
.portal-side-foot a, .portal-side-foot button {
  font-size: .86rem; color: var(--faint); text-align: left;
  padding: 6px 14px; border-radius: var(--r-sm);
  transition: color .15s ease;
}
.portal-side-foot a:hover, .portal-side-foot button:hover { color: var(--text); }
.portal-user {
  font-size: .82rem; color: var(--faint);
  padding: 0 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.portal-main {
  padding: 40px 40px 80px;
  min-width: 0;
}
.pane-head { margin-bottom: 28px; }
.pane-head h1 {
  font-size: clamp(1.5rem, 3vw, 2.05rem);
}
.pane-head p { color: var(--muted); margin-top: 8px; font-size: .96rem; }
.pane-loading, .pane-empty {
  color: var(--faint); padding: 34px 0; font-size: .94rem;
}

/* ============ Cards & grids ============ */
.card {
  background: linear-gradient(180deg, var(--surface), rgba(22, 26, 34, .55));
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
}
.card + .card, .stack > * + * { margin-top: 18px; }
.card h2 {
  font-size: 1.06rem; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.card-sub { color: var(--muted); font-size: .9rem; margin: -8px 0 16px; }

.hero-plan {
  border-color: rgba(232, 72, 63, .4);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(232, 72, 63, .12), transparent 55%),
    linear-gradient(180deg, var(--surface), rgba(22, 26, 34, .55));
}
.hero-plan-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.hero-plan-desc { color: var(--muted); font-size: .95rem; }
.hero-plan-meta {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px;
}

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-top: 18px;
}
.stat-card { padding: 20px 22px; }
.stat-card .stat-label {
  font-size: .76rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 8px;
}
.stat-card .stat-value {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.65rem; letter-spacing: -0.02em; line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.stat-card .stat-note { font-size: .8rem; color: var(--faint); margin-top: 6px; }

.meter {
  margin-top: 10px; height: 6px; border-radius: 6px;
  background: var(--surface-2); overflow: hidden;
}
.meter i {
  display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), #f06a4f);
  transition: width .5s ease;
}

.tick-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px 18px;
}
.tick-item {
  display: flex; align-items: center; gap: 9px;
  font-size: .89rem; color: var(--muted); padding: 5px 0;
}
.tick-item.on { color: var(--text); }
.tick-item .dot {
  width: 15px; height: 15px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--border);
}
.tick-item.on .dot {
  border-color: transparent;
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3.5 8.5l3 3 6-7" fill="none" stroke="%23E8483F" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/></svg>')
    center / contain no-repeat,
    rgba(232, 72, 63, .12);
}

/* ============ Tables ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
.table th {
  text-align: left; font-size: .74rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--ink-deep);
  white-space: nowrap;
}
.table td {
  padding: 13px 16px; border-bottom: 1px solid rgba(38, 43, 54, .55);
  color: var(--muted); vertical-align: middle;
}
.table tr:last-child td { border-bottom: 0; }
.table td:first-child, .table th:first-child { padding-left: 20px; }
.table .t-strong { color: var(--text); font-weight: 600; }
.table .t-num { font-variant-numeric: tabular-nums; text-align: right; }
.table th.t-num { text-align: right; }
.row-link { cursor: pointer; transition: background .12s ease; }
.row-link:hover, .row-link:focus-visible { background: rgba(255, 255, 255, .03); }

.pager {
  display: flex; align-items: center; gap: 14px; justify-content: flex-end;
  margin-top: 14px; font-size: .86rem; color: var(--faint);
}

.usage-bar {
  display: inline-block; vertical-align: middle;
  width: 90px; height: 6px; border-radius: 6px;
  background: var(--surface-2); overflow: hidden; margin-right: 10px;
}
.usage-bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }

/* ============ Plan cards (subscription) ============ */
.plan-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.plan-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--ink-deep); padding: 22px;
}
.plan-card.current { border-color: rgba(111, 207, 151, .45); }
.plan-card.featured { border-color: rgba(232, 72, 63, .5); }
.plan-card h3 { font-size: 1.15rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.plan-card .plan-desc { color: var(--faint); font-size: .84rem; margin: 4px 0 14px; }
.plan-card .plan-amount {
  font-family: var(--font-display); font-weight: 700; font-size: 1.7rem;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.plan-card .plan-amount small { font-size: .78rem; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.plan-card .plan-billed { font-size: .78rem; color: var(--faint); margin-bottom: 14px; min-height: 1.2em; }
.plan-card ul { flex: 1; margin-bottom: 16px; }
.plan-card li {
  font-size: .85rem; color: var(--muted);
  padding: 5px 0 5px 22px; position: relative;
}
.plan-card li::before {
  content: ""; position: absolute; left: 0; top: 10px;
  width: 13px; height: 13px; border-radius: 50%;
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3.5 8.5l3 3 6-7" fill="none" stroke="%23E8483F" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/></svg>')
    center / contain no-repeat,
    rgba(232, 72, 63, .12);
}
.interval-toggle {
  display: inline-flex; gap: 4px;
  background: var(--ink-deep); border: 1px solid var(--border);
  border-radius: var(--r-full); padding: 4px; margin-bottom: 18px;
}
.interval-toggle button {
  padding: 8px 18px; border-radius: var(--r-full);
  font-size: .86rem; font-weight: 600; color: var(--muted);
}
.interval-toggle button[aria-pressed="true"] {
  background: var(--surface-2); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

/* ============ Devices ============ */
.device-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 0; border-bottom: 1px solid rgba(38, 43, 54, .55);
}
.device-row:last-child { border-bottom: 0; }
.device-info { flex: 1; min-width: 200px; }
.device-name { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.device-meta { font-size: .8rem; color: var(--faint); margin-top: 3px; }
.device-actions { display: flex; gap: 8px; }
.rename-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rename-form input { max-width: 220px; padding: 8px 12px; }

/* ============ Simulator / log ============ */
.sim-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.sim-log {
  background: var(--ink-deep); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 12px 14px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .78rem; color: var(--muted); line-height: 1.6;
  max-height: 220px; overflow-y: auto; white-space: pre-wrap; word-break: break-word;
}
.sim-log .ok { color: var(--success); }
.sim-log .err { color: #f2b8b5; }

/* ============ Detail lists ============ */
.kv {
  display: grid; grid-template-columns: 170px 1fr; gap: 8px 18px;
  font-size: .9rem;
}
.kv dt { color: var(--faint); }
.kv dd { color: var(--text); min-width: 0; overflow-wrap: anywhere; }

.event-list { display: flex; flex-direction: column; gap: 6px; }
.event-list li {
  display: flex; gap: 12px; align-items: baseline;
  font-size: .84rem; color: var(--muted);
  padding: 6px 0; border-bottom: 1px dashed rgba(38, 43, 54, .6);
}
.event-list li:last-child { border-bottom: 0; }
.event-when { color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============ Admin specifics ============ */
.toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 18px;
}
.toolbar .input { max-width: 340px; }
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--muted); font-size: .88rem; font-weight: 600;
  margin-bottom: 18px;
}
.back-link:hover { color: var(--text); }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px; align-items: start;
}
.detail-grid .card { margin-top: 0; }
.plan-editor { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 18px; }
.plan-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.ent-row {
  display: grid; grid-template-columns: 1fr auto 130px; gap: 12px;
  align-items: center; padding: 8px 0;
  border-bottom: 1px dashed rgba(38, 43, 54, .6);
  font-size: .88rem;
}
.ent-row:last-child { border-bottom: 0; }
.ent-row label { color: var(--muted); }
.ent-row input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.ent-row input[type="number"] { padding: 7px 10px; }
.price-row {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 8px 0; font-size: .88rem;
}
.price-row .price-label { min-width: 80px; color: var(--muted); }
.price-row input[type="number"] { max-width: 130px; padding: 8px 10px; }

.access-denied {
  max-width: 460px; margin: 12vh auto; text-align: center;
  padding: 44px 36px;
}
.access-denied h1 { font-size: 1.4rem; margin-bottom: 10px; }
.access-denied p { color: var(--muted); font-size: .94rem; margin-bottom: 22px; }

/* ============ Dialog ============ */
.dlg-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(9, 11, 15, .72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: dlg-fade .18s ease;
}
@keyframes dlg-fade { from { opacity: 0; } }
.dlg {
  width: min(480px, 100%);
  background: linear-gradient(180deg, var(--surface), rgba(22, 26, 34, .92));
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px;
  box-shadow: var(--shadow-pop);
  animation: dlg-pop .22s cubic-bezier(.22, .8, .32, 1);
  max-height: min(86vh, 720px); overflow-y: auto;
}
@keyframes dlg-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.dlg h2 { font-size: 1.12rem; margin-bottom: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dlg .dlg-body { color: var(--muted); font-size: .93rem; line-height: 1.55; margin-bottom: 20px; }
.dlg .dlg-body p + p { margin-top: 8px; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ============ Toast ============ */
.toast-region {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 400; display: flex; flex-direction: column; gap: 8px;
  width: min(440px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 12px 16px;
  font-size: .88rem; color: var(--text);
  box-shadow: var(--shadow-card);
  animation: toast-in .25s cubic-bezier(.22, .8, .32, 1);
}
.toast-error { border-color: rgba(232, 72, 63, .5); color: #f2b8b5; }
.toast-success { border-color: rgba(111, 207, 151, .4); color: var(--success); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .portal-main { padding: 32px 26px 70px; }
}

@media (max-width: 900px) {
  .portal-shell { grid-template-columns: 1fr; }
  .portal-side {
    position: sticky; top: 0; z-index: 50;
    height: auto; overflow: visible;
    flex-direction: row; align-items: center; gap: 14px;
    padding: 10px 16px;
    border-right: 0; border-bottom: 1px solid var(--border);
    background: rgba(13, 15, 20, .92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .portal-side .auth-brand .brand-word { display: none; }
  .portal-nav {
    flex-direction: row; flex: 1; gap: 2px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .portal-nav::-webkit-scrollbar { display: none; }
  .portal-nav a { padding: 9px 12px; white-space: nowrap; font-size: .86rem; }
  .portal-nav a svg { display: none; }
  .portal-nav a[aria-current="true"] { box-shadow: inset 0 -2px 0 var(--accent); }
  .portal-side-foot { border-top: 0; padding-top: 0; flex-direction: row; align-items: center; }
  .portal-user { display: none; }
  .portal-main { padding: 26px 18px 60px; }
  .kv { grid-template-columns: 130px 1fr; }
  .plan-editor-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .auth-card { padding: 30px 22px 26px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .dlg { padding: 22px 18px; }
  .ent-row { grid-template-columns: 1fr auto 90px; gap: 8px; }
  .dlg-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .dlg, .dlg-overlay, .toast { animation: none; }
  .meter i { transition: none; }
}
