/* ============================================================
   ACESSAR-PERFIS :: console futurista (dark-first)
   Layout: sidebar fixa + area de conteudo em grid de cards
   ============================================================ */
:root {
  /* Paleta - dark-first (valores base = dark) */
  /* Cinza neutro bem escuro (sem tom azul) */
  --bg:        #0f1012;
  --bg-grid:   rgba(255, 255, 255, 0.022);
  --panel:     #17181b;
  --panel-2:   #1d1e22;
  --sidebar:   #131416;
  --input:     #121315;
  --stroke:    rgba(255, 255, 255, 0.07);
  --stroke-2:  rgba(255, 255, 255, 0.13);
  --fg:        #ececee;
  --muted:     #9b9da4;
  --faint:     #6c6f77;
  --accent:    #35e6ff;
  --accent-2:  #b06cff;
  --accent-dim:rgba(53, 230, 255, 0.10);
  --hover:     rgba(255, 255, 255, 0.05);
  --ok:        #34f5c5;
  --warn:      #ffcf5c;
  --danger:    #ff6b8b;
  --glow:      0 1px 0 rgba(255,255,255,0.03) inset, 0 18px 40px -22px rgba(0,0,0,0.9);
  --radius:    16px;
  --radius-sm: 10px;
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg:        #eef1f8;
  --bg-grid:   rgba(40, 90, 160, 0.05);
  --panel:     rgba(255, 255, 255, 0.85);
  --panel-2:   #ffffff;
  --sidebar:   #ffffff;
  --input:     #ffffff;
  --hover:     rgba(30, 50, 100, 0.06);
  --stroke:    rgba(30, 50, 100, 0.12);
  --stroke-2:  rgba(30, 50, 100, 0.22);
  --fg:        #141a2c;
  --muted:     #56607e;
  --faint:     #8691ad;
  --accent:    #0a84c7;
  --accent-2:  #7a3fd6;
  --accent-dim:rgba(10, 132, 199, 0.12);
  --ok:        #0a9d78;
  --warn:      #b5790a;
  --danger:    #cf2f55;
  --glow:      0 10px 30px -16px rgba(30,50,100,0.4);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--fg);
  background:
    radial-gradient(1000px 520px at 85% -12%, rgba(176,108,255,0.045), transparent 60%),
    radial-gradient(800px 460px at 10% -5%, rgba(53,230,255,0.04), transparent 55%),
    linear-gradient(var(--bg-grid) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px) 0 0 / 34px 34px,
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100%; }

.sidebar {
  position: sticky; top: 0; align-self: start;
  height: 100vh;
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px 16px;
  background: var(--sidebar);
  border-right: 1px solid var(--stroke);
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; position: relative;
  display: grid; place-items: center; overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 11px; display: block; }
.brand-mark span { width: 14px; height: 14px; border-radius: 4px; background: var(--bg); }
.brand-text strong { font-family: var(--font-display); font-weight: 700; letter-spacing: .5px; display: block; font-size: 15px; }
.brand-text strong em { color: var(--accent); font-style: normal; }
.brand-text small { color: var(--muted); font-size: 11px; letter-spacing: .4px; }

.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border-radius: 11px; color: var(--muted);
  font-weight: 500; font-size: 14px; border: 1px solid transparent;
  transition: all .16s ease;
}
.nav-link:hover { color: var(--fg); background: var(--hover); }
.nav-link.is-active {
  color: var(--fg); background: linear-gradient(90deg, var(--accent-dim), transparent);
  border-color: var(--stroke-2);
}
.nav-link.is-active .nav-ico { color: var(--accent); }
.nav-ico { width: 20px; height: 20px; display: inline-grid; place-items: center; color: inherit; }
.nav-ico svg { width: 20px; height: 20px; }

/* Botão de download do agente (.exe) — logo abaixo do menu */
.nav-download {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin: 10px 2px 0; padding: 11px 13px; border-radius: 11px;
  color: #fff; font-weight: 600; font-size: 14px; line-height: 1;
  background: linear-gradient(135deg, #2f81f7, #1f6feb);
  border: 1px solid #388bfd; box-shadow: 0 2px 10px rgba(47,129,247,.3);
  transition: filter .16s ease, transform .16s ease, box-shadow .16s ease;
}
.nav-download:hover { filter: brightness(1.08); box-shadow: 0 4px 16px rgba(47,129,247,.42); transform: translateY(-1px); }
.nav-download:active { transform: translateY(0); }
.nav-download svg { flex: none; }
.nav-download small { font-weight: 500; opacity: .85; font-size: 12px; }

/* Submenu (ex.: Verificação SMS → SMS24h / Número Virtual APP) */
.nav-sub {
  display: flex; flex-direction: column; gap: 2px;
  margin: 2px 0 6px 23px; padding-left: 12px; border-left: 1px solid var(--stroke-2);
}
.nav-sublink {
  position: relative; display: block;
  padding: 8px 12px; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 500;
  transition: color .16s ease, background .16s ease;
}
.nav-sublink::before {
  content: ""; position: absolute; left: -13px; top: 50%; width: 9px; height: 1px; background: var(--stroke-2);
}
.nav-sublink:hover { color: var(--fg); background: var(--hover); }
.nav-sublink.is-active { color: var(--fg); background: var(--hover); }
.nav-sublink.is-active::before { background: var(--accent); height: 2px; box-shadow: 0 0 8px var(--accent); }

/* Abas de página (segmented control) */
.sub-tabs {
  display: inline-flex; gap: 4px; padding: 4px; align-self: flex-start;
  background: var(--panel); border: 1px solid var(--stroke); border-radius: 12px;
}
.sub-tab {
  padding: 8px 16px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13px;
  transition: color .16s ease, background .16s ease;
}
.sub-tab:hover { color: var(--fg); background: var(--hover); }
.sub-tab.is-active { color: var(--fg); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--stroke-2), 0 -2px 0 var(--accent) inset; }

/* Verificação SMS */
.sms-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sms-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted);
  background: var(--input); border: 1px solid var(--stroke);
}
.sms-chip strong { color: var(--fg); font-weight: 500; }
.sms-code {
  margin: 18px 0; padding: 20px 12px; text-align: center;
  background: var(--input); border: 1px dashed var(--stroke-2); border-radius: 14px;
}
.sms-code .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.sms-code .v { font-family: var(--font-display); font-weight: 700; font-size: 40px; letter-spacing: 6px; margin-top: 6px; color: var(--accent); font-variant-numeric: tabular-nums; }
.panel-title { font-family: var(--font-display); margin: 0 0 16px; font-size: 16px; }

/* Gerar E-mails */
.search-input {
  width: 240px; max-width: 100%; font-family: var(--font-body); font-size: 13px; color: var(--fg);
  background: var(--input); border: 1px solid var(--stroke-2); border-radius: 9px; padding: 0 11px; outline: none;
  height: 40px; box-sizing: border-box;
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.email-row.is-open { background: var(--hover); box-shadow: inset 2px 0 0 var(--accent); }
.email-addr { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.emails-layout { grid-template-columns: 1.25fr 1fr; }
.inbox-panel { position: sticky; top: 90px; }
.msg-list { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; max-height: 420px; overflow-y: auto; }
.msg { border: 1px solid var(--stroke); border-radius: 12px; background: var(--input); }
.msg summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 11px 13px;
}
.msg summary::-webkit-details-marker { display: none; }
.msg summary:hover { background: var(--hover); border-radius: 12px; }
.msg-main { min-width: 0; flex: 1; }
.msg-subject { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-code {
  flex: none; padding: 4px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; letter-spacing: 1.5px;
  color: var(--accent); background: var(--accent-dim);
}
.msg-body {
  padding: 12px 13px 14px; border-top: 1px solid var(--stroke); font-size: 13px; color: var(--muted);
  white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow-y: auto; line-height: 1.55;
}
@media (max-width: 920px) { .inbox-panel { position: static; } }

/* Avisos */
.notice { padding: 12px 16px; border-radius: 12px; font-size: 13.5px; color: var(--muted); background: var(--panel); border: 1px solid var(--stroke-2); }
.notice a { color: var(--accent); }
.notice-warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, transparent); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }

/* Perfis + agentes */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-check { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.bulk-bar {
  position: sticky; top: 76px; z-index: 15;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--panel-2); border: 1px solid var(--stroke-2); border-radius: 12px; box-shadow: var(--glow);
}
.bulk-bar strong { font-size: 13px; margin-right: 6px; }
.agent-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; background: var(--faint); }
.agent-dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.check-row { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.modal-dialog {
  width: min(560px, calc(100vw - 32px)); padding: 0; border: 0; background: transparent; color: var(--fg);
}
.modal-dialog::backdrop { background: rgba(0, 0, 0, .62); backdrop-filter: blur(3px); }
.modal-dialog .panel { background: var(--panel-2); border-color: var(--stroke-2); }
.job-toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: 12px; font-size: 13.5px;
  background: var(--panel-2); border: 1px solid var(--stroke-2); box-shadow: 0 18px 40px -16px rgba(0,0,0,.9);
}
.job-toast.ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok); }
.job-toast.bad { border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.job-logs { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; max-height: 260px; overflow-y: auto; }
.job-log { font-size: 12.5px; line-height: 1.5; word-break: break-word; }
.job-log.warn strong { color: var(--warn); }
.job-log.error strong { color: var(--danger); }
.log-row td { background: var(--input); }
.ui-modal-msg { color: var(--muted); font-size: 14px; line-height: 1.55; white-space: pre-line; }
.ui-modal .panel-title { margin-bottom: 10px; }
.ui-modal.ui-error .panel-title { color: var(--danger); }
.run-dialog { width: min(900px, calc(100vw - 32px)); }
.run-shot { display: block; width: 100%; border-radius: 10px; border: 1px solid var(--stroke-2); margin-top: 4px; }
.run-steps { margin: 0 0 12px; padding-left: 20px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.run-steps li.ok strong { color: var(--ok); }
.run-steps li.bad strong { color: var(--danger); }
.token-box {
  font-family: var(--font-mono); font-size: 13px; word-break: break-all; padding: 12px 14px; border-radius: 10px;
  background: var(--input); border: 1px dashed var(--accent); color: var(--fg);
}

.sidebar-foot { margin-top: auto; padding: 8px; }
.env-pill {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono);
  font-size: 11px; color: var(--muted); padding: 6px 10px; border: 1px solid var(--stroke);
  border-radius: 8px; letter-spacing: 1px;
}
.env-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 28px; border-bottom: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}
.topbar-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; color: var(--bg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.user-meta strong { display: block; font-size: 13px; }
.user-meta small { color: var(--muted); font-size: 11px; }

.content { padding: 28px; display: flex; flex-direction: column; gap: 22px; width: 100%; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--font-display); font-size: 26px; margin: 0; text-wrap: balance; letter-spacing: -.3px; }
.page-head p { color: var(--muted); margin: 6px 0 0; font-size: 14px; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }

/* ---------- Cards / panels ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--radius);
  box-shadow: var(--glow); backdrop-filter: blur(8px);
}
.panel-pad { padding: 20px 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--stroke); }
.panel-head h2 { font-family: var(--font-display); font-size: 16px; margin: 0; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat {
  position: relative; overflow: hidden;
  padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--stroke);
  background: var(--panel); box-shadow: var(--glow);
}
.stat::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(var(--accent), var(--accent-2));
}
.stat .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.stat .v { font-family: var(--font-display); font-size: 32px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; color: var(--faint); margin-top: 4px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th {
  text-align: left; font-family: var(--font-mono); font-weight: 500; font-size: 11px;
  letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
  padding: 12px 16px; border-bottom: 1px solid var(--stroke); white-space: nowrap;
}
table.grid td { padding: 13px 16px; border-bottom: 1px solid var(--stroke); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: none; }
table.grid tbody tr { transition: background .14s; }
table.grid tbody tr:hover { background: var(--hover); }
.cell-strong { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: 12px; }
.mono { font-family: var(--font-mono); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok     { color: var(--ok);     background: color-mix(in srgb, var(--ok) 14%, transparent); }
.badge.warn   { color: var(--warn);   background: color-mix(in srgb, var(--warn) 16%, transparent); }
.badge.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 16%, transparent); }
.badge.muted  { color: var(--muted);  background: color-mix(in srgb, var(--muted) 16%, transparent); }

/* ---------- Buttons ----------
   Padrão único de tamanho: .btn = 40px de altura, .btn-sm = 32px.
   Altura fixa (não depende de padding/fonte), texto numa linha só e centralizado. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  box-sizing: border-box; height: 40px; padding: 0 18px; line-height: 1; white-space: nowrap;
  font-family: var(--font-body); font-weight: 600; font-size: 14px; text-decoration: none;
  border-radius: 11px; border: 1px solid var(--stroke-2);
  background: transparent; color: var(--fg); transition: all .16s ease;
  vertical-align: middle; flex-shrink: 0;
}
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }
/* formulário com um botão dentro (ex.: excluir, novo perfil) não muda o alinhamento da linha */
.actions > form, .page-head form, .bulk-bar form, .toolbar form { display: inline-flex; margin: 0; }
.page-head > .actions, .page-head > .btn { align-self: flex-end; }
.btn:hover { border-color: var(--accent); }
.btn-primary {
  border-color: transparent; color: var(--bg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px -10px var(--accent);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { color: var(--muted); border-color: var(--stroke); }
.btn-ghost:hover { color: var(--fg); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); border-color: var(--danger); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
/* botão só com ícone (quadrado) */
.btn-icon { padding: 0; width: 40px; gap: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-icon svg { width: 16px; height: 16px; display: block; }
.run-slot { display: inline-flex; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 14px; color: var(--fg);
  background: var(--input); border: 1px solid var(--stroke-2); border-radius: 10px;
  padding: 11px 13px; outline: none; transition: border .15s, box-shadow .15s; width: 100%;
}
.field input:not([type=checkbox]):not([type=radio]), .field select { height: 40px; padding-top: 0; padding-bottom: 0; }
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.hint { font-size: 12px; color: var(--faint); line-height: 1.5; }
.field input[readonly] { color: var(--muted); cursor: default; }
.field select option { background: var(--panel-2); color: var(--fg); }
.form-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ---------- Checkboxes (perms) ---------- */
.perm-group { border: 1px solid var(--stroke); border-radius: var(--radius-sm); padding: 14px 16px; }
.perm-group h4 { margin: 0 0 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); }
.perm-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; padding: 6px; border-radius: 8px; }
.check:hover { background: var(--hover); }
.check input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }

/* ---------- Alerts ---------- */
.alert { padding: 13px 16px; border-radius: 12px; font-size: 14px; border: 1px solid var(--stroke-2); }
.alert-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.alert-danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; opacity: .5; margin-bottom: 12px; }

/* ---------- Login ---------- */
.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.auth-card {
  width: 100%; max-width: 410px; padding: 34px 32px;
  background: var(--panel); border: 1px solid var(--stroke-2); border-radius: 22px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), var(--glow); backdrop-filter: blur(14px);
}
.auth-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; }
.auth-brand .brand-mark { width: 44px; height: 44px; }
.auth-card h1 { font-family: var(--font-display); font-size: 22px; margin: 0 0 4px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.auth .field { margin-bottom: 15px; }
.auth .btn-primary { width: 100%; height: 46px; margin-top: 6px; }
.auth-foot { margin-top: 22px; text-align: center; color: var(--faint); font-size: 12px; font-family: var(--font-mono); letter-spacing: .5px; }

/* ---------- Layout helpers ---------- */
.cols-2 { display: grid; grid-template-columns: 1.3fr .9fr; gap: 22px; align-items: start; }
@media (max-width: 920px) { .cols-2 { grid-template-columns: 1fr; } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
    border-right: none; border-bottom: 1px solid var(--stroke);
  }
  .nav { flex-direction: row; flex-wrap: wrap; margin-top: 0; }
  .nav-sub { display: none; }
  .nav-link span:last-child { display: none; }
  .sidebar-foot { margin-left: auto; }
  .content { padding: 18px; }
  .topbar { padding: 14px 18px; }
}
