/* Redactor Dashboard — Editorial Moderno (Stripe + Vercel inspired).
   Light theme is the DEFAULT (:root). Dark under html[data-theme="dark"].
   Fonts: Space Grotesk (display) + Inter (body) via Google Fonts link in templates. */
:root {
  --bg: #faf9f8;
  --bg2: #f4f2f0;
  --panel: #ffffff;
  --panel2: #f7f5f3;
  --line: #e8e4df;
  --fg: #1a1712;
  --mut: #6b6f80;
  --mut2: #9c968c;
  --acc: #635bff;
  --acc2: #8b5cf6;
  --acc-soft: rgba(99, 91, 255, .10);
  --ok: #0d9e68;
  --warn: #b98200;
  --bad: #e0414f;
  --grad: linear-gradient(120deg, #635bff, #8b5cf6);
  /* Material elevation (umbra + penumbra) */
  --e1: 0 1px 2px rgba(16, 24, 40, .05), 0 2px 6px rgba(16, 24, 40, .05);
  --e2: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .08);
  --e3: 0 2px 6px rgba(16, 24, 40, .08), 0 18px 44px rgba(16, 24, 40, .14);
  --acc-sh: 0 1px 2px rgba(69, 60, 220, .30), 0 8px 20px rgba(99, 91, 255, .30);
  --acc-sh-lg: 0 2px 6px rgba(69, 60, 220, .35), 0 14px 30px rgba(99, 91, 255, .38);
  --radius: 14px;
  --sidebar-w: 244px;
}
html[data-theme="dark"] {
  --bg: #12100e;
  --bg2: #171512;
  --panel: #1d1a16;
  --panel2: #242019;
  --line: rgba(255, 255, 255, .07);
  --fg: #f3efe9;
  --mut: #a89f93;
  --mut2: #6e675d;
  --acc: #8b8aff;
  --acc2: #a78bfa;
  --acc-soft: rgba(139, 92, 246, .16);
  --ok: #3ecf8e;
  --warn: #ffb020;
  --bad: #ff5c6c;
  --e1: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .22);
  --e2: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 12px rgba(0, 0, 0, .24), 0 8px 24px rgba(0, 0, 0, .18);
  --e3: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 28px rgba(0, 0, 0, .3), 0 20px 50px rgba(0, 0, 0, .24);
  --acc-sh: 0 2px 4px rgba(0, 0, 0, .4), 0 8px 22px rgba(124, 58, 237, .42);
  --acc-sh-lg: 0 3px 6px rgba(0, 0, 0, .4), 0 14px 32px rgba(124, 58, 237, .5);
}
.theme-toggle {
  background: var(--panel); border: 1px solid var(--line); color: var(--mut);
  border-radius: 10px; padding: 4px 10px; cursor: pointer; font-size: 13px;
  font-family: inherit; transition: all .18s ease;
}
.theme-toggle:hover { color: var(--acc); border-color: var(--acc); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 14.5px/1.55 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--fg);
  background-image:
    radial-gradient(1200px 500px at 85% -10%, rgba(99, 91, 255, .07), transparent 60%),
    radial-gradient(900px 420px at 8% 0, rgba(139, 92, 246, .05), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand, .stat .v, .nc-title, .login-card .logo {
  font-family: "Space Grotesk", "Inter", ui-sans-serif, sans-serif;
}
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Subtle scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--mut2); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(700px 420px at 50% 6%, rgba(99, 91, 255, .16), transparent 65%),
    radial-gradient(520px 380px at 78% 88%, rgba(139, 92, 246, .10), transparent 60%),
    var(--bg);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 392px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; padding: 38px 34px; box-shadow: var(--e3);
}
.login-card .logo {
  font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 4px;
}
.login-card .logo span {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.login-card .sub { color: var(--mut); font-size: 13px; margin-bottom: 24px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 0; position: sticky; top: 0; height: 100vh;
  box-shadow: var(--e1); z-index: 5;
}
.sidebar .brand {
  padding: 20px 20px 16px; font-size: 19px; font-weight: 700; letter-spacing: -.02em;
  border-bottom: 1px solid var(--line);
}
.sidebar .brand span {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.sidebar nav { flex: 1; overflow-y: auto; padding: 12px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px; margin: 2px 0;
  border-radius: 11px; color: var(--mut); font-weight: 500; font-size: 14px;
  transition: all .18s ease;
}
.nav-item:hover { background: var(--panel2); color: var(--fg); text-decoration: none; }
.nav-item.active { background: var(--acc-soft); color: var(--acc); font-weight: 600; }
.nav-item .ic { width: 18px; text-align: center; opacity: .9; }
.nav-item[hidden] { display: none; }
.sidebar .foot { border-top: 1px solid var(--line); padding: 14px 14px; font-size: 12px; color: var(--mut); }
.sidebar .foot .who {
  margin-bottom: 10px; background: var(--panel2); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; box-shadow: var(--e1); line-height: 1.5;
}
.sidebar .foot .who b { color: var(--fg); display: block; font-family: "Space Grotesk", sans-serif; }
.sidebar .foot .who .role { color: var(--acc); font-weight: 600; }
.sidebar .foot .foot-actions { display: flex; gap: 8px; }
.sidebar .foot .foot-actions .theme-toggle { flex: 1; padding: 7px 8px; text-align: center; font-size: 12.5px; }

/* Ajustes: tarjetas de secciones */
.setting-card {
  display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; color: var(--fg); max-width: 340px; box-shadow: var(--e1);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.setting-card:hover {
  border-color: color-mix(in srgb, var(--acc) 45%, var(--line)); text-decoration: none;
  transform: translateY(-2px); box-shadow: var(--e2);
}
.setting-card .ic-big { font-size: 22px; margin-bottom: 8px; color: var(--acc); }
.setting-card .t { font-weight: 700; margin-bottom: 4px; font-family: "Space Grotesk", sans-serif; }
.setting-card .d { font-size: 12.5px; color: var(--mut); }

.main { padding: 30px 36px 64px; min-width: 0; }
.main > h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 5px; }
.main > .crumb { color: var(--mut); font-size: 13px; margin-bottom: 26px; }

/* ---------- Components ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 20px; box-shadow: var(--e1);
}
.panel > h2 {
  font-size: 17px; letter-spacing: -.01em; color: var(--fg);
  margin: 0 0 16px; font-weight: 600; text-transform: none;
}
.grid { display: grid; gap: 18px; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-bottom: 20px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 22px; box-shadow: var(--e2); position: relative; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.stat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad); opacity: .85;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--e3); }
.stat .k {
  font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--mut2);
  font-weight: 600; margin-bottom: 8px;
}
.stat .v {
  font-size: 32px; font-weight: 700; letter-spacing: -.03em; line-height: 1;
  color: var(--fg);
}
.stat .v.acc {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.stat .v.ok { color: var(--ok); -webkit-text-fill-color: var(--ok); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; color: var(--mut2); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .09em; font-weight: 600; padding: 8px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .15s ease; }
.tbl tbody tr:hover { background: var(--panel2); }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl .dim { color: var(--mut); font-size: 12px; }
.tbl .title-cell { max-width: 480px; }
.tbl .title-cell .t { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .title-cell .s { color: var(--mut); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 11px; font-weight: 700;
  white-space: nowrap; letter-spacing: .02em;
}
.badge.on, .badge.ok { background: rgba(13, 158, 104, .12); color: var(--ok); }
.badge.off, .badge.bad { background: rgba(224, 65, 79, .12); color: var(--bad); }
.badge.warn { background: rgba(255, 176, 32, .15); color: var(--warn); }
.badge.info { background: rgba(99, 91, 255, .12); color: var(--acc); }
.badge.neu { background: var(--panel2); color: var(--mut); border: 1px solid var(--line); }
html[data-theme="dark"] .badge.on, html[data-theme="dark"] .badge.ok { box-shadow: 0 0 12px rgba(62, 207, 142, .18); }
html[data-theme="dark"] .badge.warn { box-shadow: 0 0 12px rgba(255, 176, 32, .15); }
html[data-theme="dark"] .badge.info { box-shadow: 0 0 12px rgba(139, 92, 246, .22); }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--grad); color: #fff; border: 0; border-radius: 11px;
  padding: 9px 18px; font: inherit; font-weight: 600; font-size: 13px;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  box-shadow: var(--acc-sh); transition: all .2s ease; letter-spacing: .01em;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: var(--acc-sh-lg); text-decoration: none; color: #fff; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.sm { padding: 6px 13px; font-size: 12px; border-radius: 9px; }
.btn.ghost {
  background: transparent; border: 1px solid var(--line); color: var(--fg);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--acc); color: var(--acc); filter: none; box-shadow: none; }
.btn.danger { background: #b03040; box-shadow: 0 1px 2px rgba(176, 48, 64, .3), 0 6px 16px rgba(176, 48, 64, .25); }
.btn.danger:hover { background: #c54051; }
.btn.ok-btn { background: #1f8a5a; box-shadow: 0 1px 2px rgba(31, 138, 90, .3), 0 6px 16px rgba(31, 138, 90, .25); }
.btn[hidden] { display: none; }
.btn .spin {
  width: 12px; height: 12px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  border-radius: 50%; animation: rot .7s linear infinite; display: inline-block;
}
@keyframes rot { to { transform: rotate(360deg); } }

label.f {
  display: block; font-size: 12px; color: var(--mut); margin: 12px 0 5px; font-weight: 600;
  letter-spacing: .02em;
}
input[type=text], input[type=url], input[type=password], input[type=email],
input[type=number], input[type=time], select, textarea {
  width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  color: var(--fg); padding: 9px 12px; font: inherit; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
html[data-theme="dark"] input[type=text], html[data-theme="dark"] input[type=url],
html[data-theme="dark"] input[type=password], html[data-theme="dark"] input[type=email],
html[data-theme="dark"] input[type=number], html[data-theme="dark"] input[type=time],
html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: var(--bg2); }
input:focus, select:focus, textarea:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, .18);
}
.form-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.chk { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; cursor: pointer; }
.chk input { accent-color: var(--acc); width: 15px; height: 15px; cursor: pointer; }

/* Formulario Sitios WP: fila 2×2 estable a cualquier resolución —
   labels con altura fija para que los inputs arranquen a la misma altura. */
.form-sitios { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(220px, 1fr)); max-width: 900px; }
.form-sitios > div { display: flex; flex-direction: column; }
.form-sitios label.f { min-height: 32px; display: block; margin-top: 0; }
@media (max-width: 620px) {
  .form-sitios { grid-template-columns: 1fr; }
  .form-sitios label.f { min-height: 0; }
}
.chk .c { color: var(--mut); font-size: 11.5px; font-family: ui-monospace, monospace; }

.perm-group { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--panel2); }
.perm-group h3 { margin: 0 0 8px; font-size: 12px; color: var(--acc); text-transform: uppercase; letter-spacing: .08em; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 18px; }

/* toasts / messages */
#msg { position: fixed; right: 22px; bottom: 22px; z-index: 99; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--ok);
  border-radius: 12px; padding: 12px 17px; font-size: 13px; max-width: 380px;
  box-shadow: var(--e3); animation: slidein .18s ease-out;
}
.toast.err { border-left-color: var(--bad); }
.toast.info { border-left-color: var(--acc); }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } }

.empty { color: var(--mut); text-align: center; padding: 28px 10px; font-size: 13.5px; }
.loading { color: var(--mut); padding: 22px 10px; text-align: center; }
.loading::after { content: "…"; animation: dots 1.2s steps(3) infinite; }
@keyframes dots { 0% { content: ""; } 33% { content: "."; } 66% { content: ".."; } 100% { content: "..."; } }
.errbox { color: var(--bad); text-align: center; padding: 20px 10px; font-size: 13px; }

.details-row td { background: var(--panel2); padding: 14px 18px; }
.details-row pre {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; font-size: 12px; overflow-x: auto; max-height: 300px; color: var(--mut);
}
.pager { display: flex; align-items: center; gap: 10px; margin-top: 14px; justify-content: flex-end; color: var(--mut); font-size: 13px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* ---------- BuzzSumo-style noticias card grid ---------- */
.nc-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
@media (min-width: 1500px) { .nc-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1100px) and (min-width: 701px) {
  .nc-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 700px) { .nc-grid { grid-template-columns: 1fr; gap: 14px; } }

.nc-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--e2);
  transition: transform .22s cubic-bezier(.2, .7, .3, 1), box-shadow .22s ease, border-color .22s ease;
}
.nc-card:hover {
  transform: translateY(-4px); border-color: color-mix(in srgb, var(--acc) 40%, var(--line));
  box-shadow: var(--e3), 0 0 0 1px rgba(139, 92, 246, .16);
}

.nc-thumb {
  position: relative; aspect-ratio: 16/9; display: block; overflow: hidden;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 255, 255, .28) 0%, transparent 55%),
    linear-gradient(135deg, #a5b0ff 0%, #8b90f5 45%, #8b5cf6 100%);
}
html[data-theme="dark"] .nc-thumb {
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 255, 255, .10) 0%, transparent 55%),
    linear-gradient(135deg, #4338a8 0%, #2a2466 45%, #1b1738 100%);
}
.nc-thumb .nc-letter {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 64px; font-weight: 800; color: rgba(255, 255, 255, .55);
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase; letter-spacing: .02em; user-select: none;
}
html[data-theme="dark"] .nc-thumb .nc-letter { color: rgba(255, 255, 255, .28); }
.nc-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; transition: transform .4s ease;
}
.nc-card:hover .nc-thumb img { transform: scale(1.04); }
.nc-thumb .nc-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
  color: #fff; font-size: 11.5px; display: flex; align-items: center; gap: 6px;
  pointer-events: none;
}
.nc-thumb .nc-overlay .nc-domain { opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nc-body { padding: 15px 17px 13px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.nc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--mut); }
.nc-meta .nc-src { font-weight: 700; color: var(--acc); }
.nc-badges { display: flex; gap: 5px; margin-left: auto; }
.nc-title {
  margin: 0; font-size: 15.5px; line-height: 1.38; font-weight: 600; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  text-decoration: none; color: var(--fg);
}
a.nc-title:hover { color: var(--acc); }
.nc-extracto {
  margin: 0; font-size: 12.5px; color: var(--mut); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nc-foot {
  margin-top: auto; display: flex; gap: 8px; padding-top: 10px;
  border-top: 1px solid var(--line); flex-wrap: wrap; align-items: center;
}
.nc-foot .btn { flex: 0 0 auto; }
@media (max-width: 700px) { .nc-foot .btn { flex: 1 1 30%; justify-content: center; } }
.nc-foot .nc-open { margin-left: auto; }

.nc-filterbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.nc-filterbar > div { min-width: 220px; }
.nc-filterbar .nc-search { flex: 1 1 220px; }
@media (max-width: 700px) { .nc-filterbar > div { min-width: 0; flex: 1 1 100%; } }

/* ---------- Responsive / mobile (≤900px) ---------- */
/* Hamburger + off-canvas drawer */
.btn-hamb {
  display: none; position: fixed; top: 10px; left: 10px; z-index: 120;
  width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--panel); color: var(--fg); font-size: 20px; line-height: 1;
  cursor: pointer; align-items: center; justify-content: center;
  box-shadow: var(--e2);
}
.drawer-backdrop {
  display: none; position: fixed; inset: 0; z-index: 110;
  background: rgba(15, 12, 30, .45);
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .btn-hamb { display: flex; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 130;
    width: min(300px, 84vw); height: 100dvh;
    transform: translateX(-104%); transition: transform .22s ease;
    box-shadow: var(--e3);
    border-right: 1px solid var(--line);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar nav { display: block; } /* drawer keeps vertical nav (override old 820px flex) */
  .drawer-backdrop.show { display: block; }
  .main { padding: 18px 14px 60px; padding-top: 62px; }
  .grid.cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  /* Tables: horizontal scroll inside their container, never page-wide scroll */
  div:has(> table.tbl), td:has(> table.tbl), .panel .details-row td:has(> pre) {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  table.tbl { min-width: 620px; }
  table.tbl.compact-ok { min-width: 0; }
  .tbl td, .tbl th { padding: 9px 8px; }
  /* Touch targets */
  .nav-item { padding: 12px; font-size: 14.5px; }
  .btn { min-height: 44px; padding: 10px 18px; }
  .btn.sm { min-height: 38px; padding: 8px 14px; font-size: 12.5px; }
  input[type=text], input[type=url], input[type=password], input[type=email],
  input[type=number], input[type=time], select, textarea { padding: 11px; font-size: 16px; } /* 16px evita zoom iOS */
  .chk { padding: 8px 0; font-size: 14px; }
  .chk input { width: 20px; height: 20px; }
  #msg { right: 10px; left: 10px; bottom: 12px; }
  .toast { max-width: none; }
  .pager { justify-content: center; flex-wrap: wrap; }
  .two-col { grid-template-columns: 1fr; }
  .setting-card { max-width: none; }
}

@media (max-width: 620px) {
  .grid.cards { grid-template-columns: 1fr 1fr; }
  .stat .v { font-size: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .perm-grid { grid-template-columns: 1fr; }
  /* Login */
  .login-wrap { padding: 14px; align-items: flex-start; padding-top: 12vh; }
  .login-card { padding: 26px 20px; }
  .login-card .btn { min-height: 46px; }
}

@media (max-width: 380px) {
  .grid.cards { grid-template-columns: 1fr; }
}
