/* SindConnect — design system próprio (sem framework externo, respeita CSP). */

:root {
  --color-bg: #f5f8fc;
  --color-surface: #ffffff;
  --color-surface-raised: #ffffff;
  --color-border: #e1e8f2;
  --color-border-strong: #c3d0e3;
  --color-text: #101828;
  --color-text-muted: #56637a;
  --color-text-faint: #8b98ad;

  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-soft: #e9f0ff;
  --color-accent-contrast: #ffffff;

  --color-accent-2: #0ea5e9;
  --color-accent-2-soft: #e3f6fd;

  --color-danger: #d92d20;
  --color-danger-soft: #fdeceb;
  --color-warning: #b25e00;
  --color-warning-soft: #fdf1de;
  --color-success: #1a7f4b;
  --color-success-soft: #e5f6ed;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 25, 0.06);
  --shadow-md: 0 6px 20px -8px rgba(20, 30, 25, 0.18);

  --sidebar-width: 248px;
  --topbar-height: 60px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #0b1220;
    --color-surface: #121b2e;
    --color-surface-raised: #162136;
    --color-border: #253352;
    --color-border-strong: #34456c;
    --color-text: #edf1fb;
    --color-text-muted: #a7b3cc;
    --color-text-faint: #71809e;

    --color-accent: #5b9dff;
    --color-accent-hover: #7db1ff;
    --color-accent-soft: #17264a;
    --color-accent-contrast: #0a1730;

    --color-accent-2: #38bdf8;
    --color-accent-2-soft: #12283a;

    --color-danger: #ff6b60;
    --color-danger-soft: #3a1917;
    --color-warning: #e0ab4c;
    --color-warning-soft: #362a10;
    --color-success: #6ad684;
    --color-success-soft: #17321d;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  --color-bg: #0b1220;
  --color-surface: #121b2e;
  --color-surface-raised: #162136;
  --color-border: #253352;
  --color-border-strong: #34456c;
  --color-text: #edf1fb;
  --color-text-muted: #a7b3cc;
  --color-text-faint: #71809e;

  --color-accent: #5b9dff;
  --color-accent-hover: #7db1ff;
  --color-accent-soft: #17264a;
  --color-accent-contrast: #0a1730;

  --color-accent-2: #38bdf8;
  --color-accent-2-soft: #12283a;

  --color-danger: #ff6b60;
  --color-danger-soft: #3a1917;
  --color-warning: #e0ab4c;
  --color-warning-soft: #362a10;
  --color-success: #6ad684;
  --color-success-soft: #17321d;
}

* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* --- Layout autenticado: topbar + sidebar --- */
.app-shell { min-height: 100vh; display: flex; }

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 20px 14px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  transition: transform 0.2s ease;
  z-index: 40;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 20px;
  font-weight: 700; font-size: 1.05rem;
}
.sidebar-brand img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.sidebar-brand .brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--color-accent); color: var(--color-accent-contrast);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--color-text-muted); font-weight: 500; font-size: .92rem;
}
.sidebar-nav a:hover { background: var(--color-accent-soft); color: var(--color-text); text-decoration: none; }
.sidebar-nav a.active { background: var(--color-accent-soft); color: var(--color-accent); }
.sidebar-nav a.active .nav-icon { color: var(--color-accent); }
.nav-icon { width: 19px; height: 19px; flex-shrink: 0; color: var(--color-text-faint); }
.sidebar-nav a:hover .nav-icon { color: var(--color-accent); }

/* --- Link "voltar" no topo das páginas internas --- */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .85rem; font-weight: 600; color: var(--color-text-muted);
  margin-bottom: 14px;
}
.back-link:hover { color: var(--color-accent); text-decoration: none; }
.back-link svg { width: 16px; height: 16px; }
.sidebar-section-title {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--color-text-faint); margin: 18px 12px 6px; font-weight: 700;
}

.content-area { flex: 1; margin-left: var(--sidebar-width); min-width: 0; }
.topbar {
  height: var(--topbar-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; border-bottom: 1px solid var(--color-border);
  background: var(--color-surface); position: sticky; top: 0; z-index: 30;
}
.topbar-menu-btn { display: none; }
.topbar-user { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.topbar-user .role-badge { font-size: .72rem; }

.page { padding: 28px; max-width: 1100px; }
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.page-header p { color: var(--color-text-muted); margin: 4px 0 0; }
/* Grupo de botões de ação do page-header (Exportar/Importar/Ação em
   massa/Adicionar) -- crud/list.html é a única tela com vários botões
   aqui ao mesmo tempo; sem wrap, esse grupo sozinho estourava a largura
   da tela em celulares (a linha do título já quebra via flex-wrap do
   .page-header, mas isso não afeta o overflow DENTRO do próprio grupo
   de botões). */
.page-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 480px) {
  .page-header { flex-direction: column; align-items: stretch; }
  .page-header-actions { flex-direction: column; align-items: stretch; }
  .page-header-actions .btn { text-align: center; }
}

/* --- Breadcrumbs (trilha de navegação acima do título da página) --- */
.breadcrumbs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: .82rem; color: var(--color-text-faint); margin-bottom: 10px;
}
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-accent); }
.breadcrumbs .crumb-current { color: var(--color-text); font-weight: 600; }
.breadcrumbs .crumb-sep { color: var(--color-text-faint); }

/* --- Seções de formulário: agrupa campos relacionados com um título e
   um separador visual, em vez de uma lista solta de campos --- */
.form-section { margin-bottom: 24px; }
.form-section:last-child { margin-bottom: 0; }
.form-section-title {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--color-text-faint); font-weight: 700;
  margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--color-border);
}
.form-section-highlight {
  background: var(--color-accent-soft); border-radius: var(--radius-md);
  padding: 16px; margin: -16px -16px 24px;
}
.form-section-highlight .form-section-title {
  color: var(--color-accent); border-bottom-color: var(--color-border-strong);
}
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px;
}
.form-grid .field { min-width: 0; }
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* --- Auth shell (login, mfa, recuperação) --- */
/* Split screen: painel de marca (gradiente animado) + painel de formulário.
   Uma tela só permite ser mais expressiva que o resto do design system —
   é a primeira impressão de quem entra. */
.auth-shell {
  min-height: 100vh; display: flex;
}
.auth-brand-panel {
  position: relative; overflow: hidden;
  width: 42%; min-width: 320px; max-width: 520px;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px 44px;
  background: linear-gradient(120deg, #0b1220, var(--color-accent-hover), var(--color-accent), var(--color-accent-2), #0b1220);
  background-size: 320% 320%;
  animation: authGradientDrift 18s ease-in-out infinite;
}
@keyframes authGradientDrift {
  0% { background-position: 0% 30%; }
  50% { background-position: 100% 70%; }
  100% { background-position: 0% 30%; }
}
.auth-brand-panel::before {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(480px 480px at 15% 20%, rgba(255,255,255,.10), transparent 60%),
    radial-gradient(560px 560px at 85% 85%, rgba(255,255,255,.08), transparent 60%);
  animation: authFloaty 14s ease-in-out infinite alternate;
}
@keyframes authFloaty {
  0% { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-3%, 2%, 0) scale(1.06); }
}
.auth-brand-panel > * { position: relative; z-index: 1; }
.auth-brand-row { display: flex; align-items: center; gap: 14px; }
.auth-emblem {
  width: 52px; height: 52px; border-radius: 15px; flex-shrink: 0;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.auth-emblem img { width: 100%; height: 100%; object-fit: cover; }
.auth-brand-name { color: #fff; font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.auth-brand-copy h1 {
  color: #fff; font-size: 1.9rem; font-weight: 700; letter-spacing: -.015em;
  margin: 0; max-width: 320px;
}
.auth-brand-foot { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.6); font-size: .8rem; }
.auth-brand-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74,222,128,.25);
}

.auth-form-panel {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 24px; background: var(--color-bg);
}
.auth-card {
  width: 100%; max-width: 380px;
  opacity: 0; transform: translateY(14px);
  animation: authRiseIn .6s cubic-bezier(.2,.8,.2,1) .1s forwards;
}
@keyframes authRiseIn { to { opacity: 1; transform: translateY(0); } }
.auth-card h1 { font-size: 1.35rem; margin-bottom: 4px; }
.auth-card .subtitle { color: var(--color-text-muted); font-size: .9rem; margin-bottom: 22px; }
.auth-footer-links { margin-top: 18px; font-size: .87rem; display: flex; flex-direction: column; gap: 6px; }
/* Páginas de conteúdo (não formulário) dentro do shell de auth — ex: a
   vitrine de benefícios — precisam de mais largura que um card de login. */
.auth-card.wide { max-width: 920px; }

@media (max-width: 780px) {
  .auth-shell { flex-direction: column; }
  .auth-brand-panel {
    width: 100%; max-width: none; min-width: 0; padding: 28px 24px;
    flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px;
  }
  .auth-brand-copy, .auth-brand-foot { display: none; }
  .auth-form-panel { padding: 32px 20px; }
}

/* --- Página pública de verificação de carteirinha (link do QR code) ---
   Deliberadamente fora do shell de auth (split-screen de login): é uma
   página de destino tipo "folder" institucional, não um formulário —
   banner grande com o tema do sindicato + cards de conteúdo abaixo, mais
   parecido com uma landing page do que com uma tela de login.
   --tenant-cor-primaria/--tenant-cor-destaque só existem quando o
   sindicato configurou um tema próprio (Sindicato.tema_cor_*); sem isso,
   o gradiente cai no --color-accent padrão do SindConnect. */
.public-page { min-height: 100vh; background: var(--color-bg); }
.public-hero {
  padding: 44px 24px 64px; text-align: center; color: #fff;
  background: linear-gradient(
    135deg,
    var(--tenant-cor-primaria, var(--color-accent)),
    var(--tenant-cor-destaque, var(--color-accent-2))
  );
}
.public-hero-logo {
  width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 16px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.public-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.public-hero h1 { font-size: 1.7rem; font-weight: 700; margin: 0 0 4px; }
.public-hero p { opacity: .92; margin: 0; }
.public-back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.85);
  margin-bottom: 18px;
}
.public-back-link:hover { color: #fff; text-decoration: none; }
.public-back-link svg { width: 16px; height: 16px; }
.public-body { max-width: 960px; margin: -36px auto 48px; padding: 0 20px; position: relative; z-index: 1; }
.public-card {
  background: var(--color-surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 26px; margin-bottom: 28px;
}
.public-associado-header {
  display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; justify-content: space-between;
}

/* --- Grade de benefícios (convênios/parcerias) --- reaproveitada tanto na
   vitrine de "Meu perfil" quanto embutida na página pública do QR code. */
.beneficio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.beneficio-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 18px; display: flex; flex-direction: column;
}
.beneficio-card img {
  width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 14px;
}
.beneficio-card p { color: var(--color-text-muted); font-size: .9rem; flex: 1; margin-bottom: 14px; }

@media (max-width: 600px) {
  .public-hero { padding: 32px 20px 52px; }
  .public-body { margin-top: -28px; padding: 0 14px; }
  .public-card { padding: 20px; }
}

/* --- Forms --- */
form .field { margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="date"], input[type="search"], textarea, select {
  width: 100%; padding: 10px 12px; font-size: .95rem; font-family: inherit;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  background: var(--color-surface); color: var(--color-text);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
input[type="file"] { font-size: .88rem; }
.help-text { font-size: .8rem; color: var(--color-text-faint); margin-top: 4px; }
.field-errors { color: var(--color-danger); font-size: .83rem; margin-top: 4px; }
.non-field-errors {
  background: var(--color-danger-soft); color: var(--color-danger);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 16px; font-size: .88rem;
}
.checkbox-field { display: flex; align-items: center; gap: 8px; }
.checkbox-field input { width: auto; }

/* Ícones nos campos das telas de autenticação (login, MFA, recuperação) —
   por seletor de atributo (type/inputmode), então cobre todos os
   formulários que usam base_auth.html sem precisar tocar em cada template. */
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[inputmode="numeric"] {
  padding-left: 42px;
  background-repeat: no-repeat;
  background-position: 14px center;
  background-size: 18px 18px;
}
.auth-card input[type="email"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa7bd' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
}
.auth-card input[type="password"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa7bd' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='9' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
}
.auth-card input[inputmode="numeric"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa7bd' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v6c0 4.5-3 7.5-7 9-4-1.5-7-4.5-7-9V6l7-3Z'/%3E%3C/svg%3E");
}

/* --- Botões --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm); font-size: .92rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--color-accent); color: var(--color-accent-contrast); }
.btn-primary:hover { background: var(--color-accent-hover); text-decoration: none; }
.btn-block { width: 100%; }
.btn-secondary { background: transparent; border-color: var(--color-border-strong); color: var(--color-text); }
.btn-secondary:hover { background: var(--color-accent-soft); text-decoration: none; border-color: var(--color-accent); }
.btn-danger { background: var(--color-danger-soft); color: var(--color-danger); }
.btn-danger:hover { background: var(--color-danger); color: #fff; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: .82rem; }

/* --- Cards / superfícies --- */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm);
}

/* --- Mensagens / alertas --- */
.messages { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: .88rem; border: 1px solid transparent; }
.alert-success { background: var(--color-success-soft); color: var(--color-success); }
.alert-error { background: var(--color-danger-soft); color: var(--color-danger); }
.alert-info, .alert-warning { background: var(--color-warning-soft); color: var(--color-warning); }

/* --- Badges --- */
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .01em;
}
.badge-neutral { background: var(--color-border); color: var(--color-text-muted); }
.badge-success { background: var(--color-success-soft); color: var(--color-success); }
.badge-danger { background: var(--color-danger-soft); color: var(--color-danger); }
.badge-accent { background: var(--color-accent-soft); color: var(--color-accent); }

/* --- Tabelas --- */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 480px; }
thead th {
  text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--color-text-faint); padding: 12px 16px; background: var(--color-surface-raised);
  border-bottom: 1px solid var(--color-border);
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--color-accent-soft); }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }
/* Fixa a coluna de ações à direita durante o scroll horizontal da tabela
   em telas estreitas — sem isso, o botão "Opções" (edição, carteirinha,
   remover) fica fora da área visível sem nenhuma pista de que dá pra
   rolar até ele. */
.table-actions-col {
  position: sticky;
  right: 0;
  background: var(--color-surface);
  box-shadow: -6px 0 8px -6px rgba(20, 30, 25, 0.15);
}
thead .table-actions-col { background: var(--color-surface-raised); }
tbody tr:hover .table-actions-col { background: var(--color-accent-soft); }

/* --- Dropdown de ações ("...") nas listagens --- */
.dropdown { position: relative; display: inline-block; }
.dropdown-toggle { display: inline-flex; align-items: center; gap: 4px; }
.dropdown-menu {
  display: none;
  flex-direction: column;
  gap: 1px;
  position: fixed;
  min-width: 210px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 50;
}
.dropdown-menu.open { display: flex; }
.dropdown-menu a,
.dropdown-menu form,
.dropdown-menu button {
  display: block;
  width: 100%;
  margin: 0;
}
.dropdown-menu a,
.dropdown-menu button {
  text-align: left;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-family: inherit;
  color: var(--color-text);
  background: none;
  border: none;
  cursor: pointer;
}
.dropdown-menu a:hover,
.dropdown-menu button:hover {
  background: var(--color-accent-soft);
  text-decoration: none;
}
.dropdown-menu .dropdown-item-danger { color: var(--color-danger); }
.dropdown-menu .dropdown-item-danger:hover { background: var(--color-danger-soft); }

/* --- Modal --- */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 14, 20, .5);
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 420px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  padding: 24px;
  position: relative;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: var(--color-bg); color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.modal-close:hover { background: var(--color-border); }

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--color-text-muted);
}
.empty-state h3 { color: var(--color-text); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

/* --- QR / MFA --- */
.qr-box { display: flex; justify-content: center; padding: 18px; background: #fff; border-radius: var(--radius-md); margin-bottom: 18px; }
.qr-box img { width: 200px; height: 200px; }
.backup-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-family: ui-monospace, monospace; font-size: .95rem; margin: 18px 0; }
.backup-codes code { background: var(--color-accent-soft); padding: 8px 10px; border-radius: var(--radius-sm); text-align: center; }

/* --- Responsivo --- */
@media (max-width: 880px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-md); }
  .content-area { margin-left: 0; }
  .topbar-menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--color-border-strong);
    background: transparent; cursor: pointer; color: var(--color-text);
  }
  .page { padding: 18px; }
  .backup-codes { grid-template-columns: 1fr; }
  .sidebar-backdrop.open { display: block; }
}
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(10, 14, 11, .45); z-index: 35;
}
