/* ══════════════════════════════════════════════════════════════
   CLAUDE PROXY — DESIGN SYSTEM
   Paleta Claude/Anthropic — laranja sunset + carvão
   Suporta dark mode (default) e light mode via [data-theme="light"]
   ══════════════════════════════════════════════════════════════ */

:root,
[data-theme="dark"] {
  --bg:           #1A1A1A;
  --surface:      #262626;
  --surface-2:    #2F2F2F;
  --surface-3:    #353535;
  --border:       #3A3A3A;
  --border-soft:  #2A2A2A;
  --text:         #F5F5F0;
  --text-muted:   #A8A29E;
  --text-faint:   #6B6660;

  --primary:        #D97757;
  --primary-hover:  #E8896A;
  --primary-active: #C66547;
  --primary-soft:   rgba(217, 119, 87, 0.13);
  --primary-ring:   rgba(217, 119, 87, 0.35);

  --success:      #689D6A;
  --success-soft: rgba(104, 157, 106, 0.13);
  --warning:      #D79921;
  --warning-soft: rgba(215, 153, 33, 0.13);
  --danger:       #CC6666;
  --danger-soft:  rgba(204, 102, 102, 0.13);
  --info:         #7DAEA3;
  --info-soft:    rgba(125, 174, 163, 0.13);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow:    0 2px 8px rgba(0,0,0,0.25);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.35);

  --radius:    8px;
  --radius-sm: 6px;
  --radius-lg: 12px;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg:           #FAFAF5;
  --surface:      #FFFFFF;
  --surface-2:    #F2F0EA;
  --surface-3:    #E9E6DD;
  --border:       #E5E2D9;
  --border-soft:  #EFEDE6;
  --text:         #2C2826;
  --text-muted:   #6B6660;
  --text-faint:   #9C9690;

  --primary:        #C25A3D;
  --primary-hover:  #B04D33;
  --primary-active: #9A3F2A;
  --primary-soft:   rgba(194, 90, 61, 0.10);
  --primary-ring:   rgba(194, 90, 61, 0.30);

  --success:      #4F7A52;
  --success-soft: rgba(79, 122, 82, 0.10);
  --warning:      #B08016;
  --warning-soft: rgba(176, 128, 22, 0.10);
  --danger:       #A84747;
  --danger-soft:  rgba(168, 71, 71, 0.10);
  --info:         #5A8B81;
  --info-soft:    rgba(90, 139, 129, 0.10);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow:    0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);

  color-scheme: light;
}

/* ─── RESET ─── */
* { box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

code, pre, .mono, .api-key-field {
  font-family: 'JetBrains Mono', 'Menlo', 'Consolas', monospace !important;
  font-size: 0.875em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: var(--primary-hover); }

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 0;
}
h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }

::selection { background: var(--primary-soft); color: var(--text); }

/* ─── LAYOUT SHELL (sidebar + main) ─── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: width 0.2s ease;
  z-index: 100;
}

body.sidebar-collapsed .app-sidebar { width: 64px; }
body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .sidebar-section-title,
body.sidebar-collapsed .sidebar-footer-email { display: none; }
body.sidebar-collapsed .sidebar-brand-text { display: none; }

.app-main {
  flex: 1;
  min-width: 0;
  padding: 32px 40px;
  max-width: 100%;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVIDADE — Tablet (≤ 992px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
  .app-main { padding: 24px 24px; }
  .stat-card .stat-value { font-size: 1.5rem; }
  .price-display { font-size: 2rem; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVIDADE — Mobile (≤ 768px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  html, body { font-size: 14px; }

  /* Sidebar vira drawer offcanvas */
  .app-sidebar {
    position: fixed;
    left: 0; top: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
    width: 260px;
    z-index: 110;
  }
  body.sidebar-open .app-sidebar { transform: translateX(0); }
  body.sidebar-open::before {
    content: "";
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
  }

  /* Em mobile, sidebar-collapsed não tem sentido — sempre largo no drawer */
  body.sidebar-collapsed .app-sidebar { width: 260px; }
  body.sidebar-collapsed .sidebar-label,
  body.sidebar-collapsed .sidebar-section-title,
  body.sidebar-collapsed .sidebar-footer-email,
  body.sidebar-collapsed .sidebar-brand-text { display: revert; }

  .app-main {
    padding: 64px 16px 24px;  /* topo maior pra não ficar atrás do hamburguer */
    width: 100%;
  }
  .mobile-menu-btn { display: inline-flex !important; }

  /* Page header empilha em vez de quebrar */
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }
  .page-header > * { width: 100%; }
  .page-header .btn,
  .page-header form {
    width: auto;
    align-self: flex-start;
  }
  .page-title { font-size: 1.25rem; }
  .page-subtitle { font-size: 0.85rem; }

  /* Stats — empilha vertical (Bootstrap já faz, mas garantimos) */
  .stat-card .card-body { padding: 16px; }
  .stat-card .stat-value { font-size: 1.5rem; }

  /* Tabelas — scroll horizontal suave */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
  }
  .table {
    font-size: 0.8rem;
    white-space: nowrap;
  }
  .table > :not(caption) > * > * {
    padding: 8px 10px;
  }

  /* Card padding menor */
  .card-body { padding: 14px; }
  .card-header { padding: 12px 14px; font-size: 0.9rem; }

  /* Code blocks — não estourar largura, font menor */
  .code-block pre {
    padding: 14px 14px 14px 12px;
    font-size: 0.72rem;
  }
  .code-block pre code { white-space: pre; word-break: keep-all; }
  .code-block .copy-code { font-size: 0.7rem; padding: 3px 8px; }

  /* Abas Bootstrap — habilita scroll horizontal */
  .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--border);
  }
  .nav-tabs .nav-link {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  /* Input-group de API key — quebra abaixo do botão */
  .input-group .form-control.api-key-field {
    min-width: 0;
    font-size: 0.72rem;
  }

  /* QR Code — diminui levemente */
  #payArea img {
    max-width: 200px !important;
  }
  #brcode {
    font-size: 0.7rem !important;
  }

  /* Plan cards do comprar/criar usuário — empilhamento */
  .plan-card { padding: 12px; }

  /* Containers com max-width inline — força full em mobile */
  .card[style*="max-width"] { max-width: 100% !important; }
  div[style*="max-width: 560px"],
  div[style*="max-width: 640px"],
  div[style*="max-width: 720px"],
  div[style*="max-width: 800px"] { max-width: 100% !important; }

  /* Form elements maiores (toque) */
  .form-control, .form-select, .btn {
    min-height: 38px;
    font-size: 0.92rem;
  }

  /* Modais ocupam mais tela */
  .modal-dialog { margin: 12px; }

  /* Centered shell (login, erro) */
  .centered-shell { padding: 16px; min-height: 100vh; align-items: flex-start; padding-top: 8vh; }

  /* Alertas */
  .alert { padding: 12px; font-size: 0.85rem; }

  /* Logos e brand */
  .sidebar-brand-mark { width: 26px; height: 26px; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVIDADE — Mobile pequeno (≤ 480px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .app-main { padding: 12px 12px; }
  .page-title { font-size: 1.1rem; }
  .stat-card .stat-value { font-size: 1.35rem; }
  .price-display { font-size: 1.75rem; }
  .card-body { padding: 12px; }

  /* Botões empilham */
  .d-flex.gap-2:not(.flex-nowrap) > .btn { flex: 1 1 auto; }

  /* QR Code menor */
  #payArea img { max-width: 180px !important; }

  /* Tabela ainda menor */
  .table { font-size: 0.75rem; }
  .table > :not(caption) > * > * { padding: 6px 8px; }

  /* Code blocks bem menores */
  .code-block pre { font-size: 0.68rem; }
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  position: fixed;
  top: 12px; left: 12px;
  z-index: 105;
  box-shadow: var(--shadow);
}
.mobile-menu-btn:hover { background: var(--surface-2); }
body.sidebar-open .mobile-menu-btn { left: 268px; }

/* ─── SIDEBAR ─── */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}
.sidebar-brand:hover { color: var(--text); }
.sidebar-brand-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--primary), var(--primary-active));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.sidebar-section-title {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--text-faint);
  padding: 14px 12px 6px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 1px 0;
  position: relative;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.sidebar-item:hover {
  background: var(--surface-2);
  color: var(--text);
}
.sidebar-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.sidebar-item.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 8px; bottom: 8px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.sidebar-item i,
.sidebar-item svg {
  width: 16px;
  font-size: 0.95rem;
  flex-shrink: 0;
  text-align: center;
}

.sidebar-footer {
  border-top: 1px solid var(--border-soft);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-footer-email {
  font-size: 0.78rem;
  color: var(--text-faint);
  padding: 4px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s;
}
.sidebar-toggle-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* ─── PAGE HEADER ─── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}
.page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ─── CARDS ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-soft);
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-body { padding: 18px; }
.card-header i { color: var(--text-muted); font-size: 0.9rem; }

.stat-card { transition: transform 0.15s, box-shadow 0.15s; }
.stat-card:hover { box-shadow: var(--shadow); }
.stat-card .card-body { padding: 20px; }
.stat-card .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 500;
}
.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 6px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.stat-card .text-muted { color: var(--text-muted) !important; font-size: 0.82rem; }

/* ─── BUTTONS ─── */
.btn {
  font-weight: 500;
  font-size: 0.875rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-shadow: none !important;
}
.btn-sm { padding: 5px 10px; font-size: 0.8rem; }
.btn-lg { padding: 11px 18px; font-size: 1rem; }

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-primary:active { background: var(--primary-active); border-color: var(--primary-active); }
.btn-primary:focus { box-shadow: 0 0 0 3px var(--primary-ring); }

.btn-secondary {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover { background: var(--surface-3); color: var(--text); border-color: var(--border); }

.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.btn-success:hover { background: var(--success); filter: brightness(1.1); color: #fff; }

.btn-warning {
  background: var(--warning);
  border-color: var(--warning);
  color: #1A1A1A;
}
.btn-warning:hover { filter: brightness(1.1); color: #1A1A1A; }

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.btn-danger:hover { filter: brightness(1.1); color: #fff; }

.btn-info {
  background: var(--info);
  border-color: var(--info);
  color: #fff;
}

.btn-outline-primary {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline-primary:hover { background: var(--primary-soft); color: var(--primary); }

/* ─── FORM CONTROLS ─── */
.form-control, .form-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px 12px;
  font-size: 0.9rem;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.form-control:focus, .form-select:focus {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
  color: var(--text);
  outline: none;
}
.form-control::placeholder { color: var(--text-faint); }
.form-label {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
}
.form-text, small.text-muted {
  color: var(--text-muted) !important;
  font-size: 0.8rem;
}

.input-group .form-control { border-right: 0; }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group .form-control:focus { z-index: 3; }

/* ─── TABLES ─── */
.table {
  color: var(--text);
  border-color: var(--border-soft);
  margin-bottom: 0;
  font-size: 0.875rem;
}
.table > :not(caption) > * > * {
  background: transparent;
  color: var(--text);
  border-bottom-color: var(--border-soft);
  padding: 12px 14px;
}
.table thead th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
.table-hover tbody tr:hover > * {
  background: var(--surface-2);
  color: var(--text);
}

/* ─── BADGES ─── */
.badge {
  font-weight: 500;
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 999px;
  text-shadow: none;
  letter-spacing: 0.01em;
}
.badge.bg-success { background: var(--success-soft) !important; color: var(--success) !important; }
.badge.bg-danger  { background: var(--danger-soft) !important; color: var(--danger) !important; }
.badge.bg-warning { background: var(--warning-soft) !important; color: var(--warning) !important; }
.badge.bg-info    { background: var(--info-soft) !important; color: var(--info) !important; }
.badge.bg-secondary { background: var(--surface-2) !important; color: var(--text-muted) !important; border: 1px solid var(--border-soft); }
.badge.text-dark { color: var(--text) !important; }

/* ─── ALERTS ─── */
.alert {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left-width: 3px;
  padding: 12px 16px;
  font-size: 0.88rem;
}
.alert-info {
  background: var(--info-soft);
  border-color: var(--info);
  color: var(--text);
}
.alert-success {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--text);
}
.alert-warning {
  background: var(--warning-soft);
  border-color: var(--warning);
  color: var(--text);
}
.alert-danger {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--text);
}

/* ─── PROGRESS ─── */
.progress {
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  border: none;
}
.progress-bar {
  background: var(--primary);
  color: transparent;
  transition: width 0.4s ease;
}

/* ─── NAV TABS ─── */
.nav-tabs {
  border-bottom: 1px solid var(--border);
  gap: 4px;
}
.nav-tabs .nav-link {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 10px 14px;
  border-radius: 0;
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s;
}
.nav-tabs .nav-link:hover {
  color: var(--text);
  border-color: transparent;
  background: transparent;
}
.nav-tabs .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
  text-shadow: none;
}

/* ─── DROPDOWNS ─── */
.dropdown-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
}
.dropdown-item {
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  padding: 7px 10px;
}
.dropdown-item:hover, .dropdown-item:focus {
  background: var(--surface-2);
  color: var(--text);
}

/* ─── MODALS ─── */
.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}
.modal-header {
  border-bottom: 1px solid var(--border-soft);
  padding: 16px 20px;
}
.modal-body { padding: 20px; }
.modal-footer {
  border-top: 1px solid var(--border-soft);
  padding: 14px 20px;
}

/* ─── CODE BLOCKS (DOCUMENTAÇÃO) ─── */
.code-block {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.code-block pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  background: transparent;
  border: none;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text);
}
.code-block pre code {
  color: var(--text);
  background: transparent;
  border: none;
  padding: 0;
  white-space: pre;
  text-shadow: none;
}
.code-block .copy-code {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-size: 0.75rem;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s;
}
.code-block .copy-code:hover {
  background: var(--surface-3);
  color: var(--text);
}

code:not(pre code) {
  background: var(--surface-2);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ─── API KEY FIELDS ─── */
.api-key-field {
  font-family: 'JetBrains Mono', monospace !important;
  letter-spacing: 0.02em;
  font-size: 0.82rem;
}

/* ─── PLAN CARDS (RADIO) ─── */
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.plan-card:hover {
  border-color: var(--primary);
}
.plan-card:has(.plan-radio:checked),
.plan-card.checked {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 1px var(--primary) inset;
}

/* ─── UTILITY ─── */
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-primary { color: var(--primary) !important; }

.bg-surface { background: var(--surface) !important; }
.bg-surface-2 { background: var(--surface-2) !important; }

.border-soft { border-color: var(--border-soft) !important; }
.border-default { border-color: var(--border) !important; }

hr {
  border-color: var(--border-soft);
  opacity: 1;
  margin: 16px 0;
}

/* ─── PRICE DISPLAY ─── */
.price-display {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ─── EMPTY/CENTERED STATES ─── */
.centered-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.centered-card {
  width: 100%;
  max-width: 440px;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.card, .alert { animation: fadeIn 0.25s ease-out; }

/* ─── PROMO MODAL — tamanhos responsivos ─── */
#promoModal { max-width: 560px; }
@media (max-width: 768px) {
  #promoModal { max-width: 92vw; }
}
@media (min-width: 1400px) {
  #promoModal { max-width: 640px; }
}

/* ─── SPINNER ─── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.fa-spin, .spinner { animation: spin 1s linear infinite; }

/* ─── TABLE RESPONSIVE WRAPPER ─── */
.table-responsive { border-radius: var(--radius); overflow: hidden; }

/* ─── SCROLLBAR (webkit) ─── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--surface-3); }

/* ══════════════════════════════════════════════════════════════
   SPLASH / LOADING PAGE — Landing responsiva
   ══════════════════════════════════════════════════════════════ */

.splash-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
  position: relative;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── Grid Background ─── */
.splash-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.splash-grid-inner {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: splashGridMove 20s linear infinite;
  transform-origin: center;
}

@keyframes splashGridMove {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-60px, -60px) rotate(0.5deg); }
}

/* ─── Orbes de luz ─── */
.splash-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
  animation: splashOrbFloat 8s ease-in-out infinite alternate;
}

.splash-orb-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -10%;
  right: -5%;
  opacity: 0.12;
  animation-duration: 10s;
}

.splash-orb-2 {
  width: 350px;
  height: 350px;
  background: var(--info);
  bottom: -8%;
  left: -5%;
  opacity: 0.08;
  animation-duration: 12s;
  animation-delay: -3s;
}

.splash-orb-3 {
  width: 250px;
  height: 250px;
  background: var(--primary);
  bottom: 20%;
  right: 15%;
  opacity: 0.06;
  animation-duration: 14s;
  animation-delay: -6s;
}

@keyframes splashOrbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.1); }
}

/* ─── Container ─── */
.splash-container {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 520px;
  padding: 24px;
  text-align: center;
}

.splash-content {
  animation: splashFadeUp 0.8s ease-out;
}

@keyframes splashFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Logo animado ─── */
.splash-logo-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.splash-logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-active));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.8rem;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 40px var(--primary-ring);
  animation: splashLogoPulse 3s ease-in-out infinite;
}

@keyframes splashLogoPulse {
  0%, 100% { box-shadow: 0 0 40px var(--primary-ring); }
  50% { box-shadow: 0 0 80px var(--primary-ring), 0 0 120px var(--primary-soft); }
}

.splash-logo-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  animation: splashRingSpin 6s linear infinite;
  z-index: 1;
}

.splash-logo-ring-2 {
  inset: -24px;
  border-color: var(--primary-soft);
  border-style: dashed;
  animation-direction: reverse;
  animation-duration: 8s;
}

@keyframes splashRingSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ─── Título ─── */
.splash-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
  letter-spacing: -0.03em;
}

/* ─── Typewriter subtitle ─── */
.splash-subtitle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin-bottom: 24px;
  gap: 2px;
}

.splash-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.splash-cursor {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 300;
  animation: splashBlink 0.8s step-end infinite;
}

@keyframes splashBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ─── Tags em loop ─── */
.splash-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-bottom: 36px;
}

.splash-tag {
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 500;
  position: absolute;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
  white-space: nowrap;
}

.splash-tag.active {
  opacity: 1;
  transform: scale(1);
  position: static;
  pointer-events: auto;
}

/* ─── Botões ─── */
.splash-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.splash-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  min-width: 180px;
  justify-content: center;
}

.splash-btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px var(--primary-ring);
}

.splash-btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--primary-ring);
}

.splash-btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.splash-btn-secondary:hover {
  background: var(--surface-2);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ─── Footer ─── */
.splash-footer {
  font-size: 0.82rem;
}

.splash-footer-text {
  color: var(--text-faint);
}

.splash-footer-text i {
  color: var(--success);
  margin-right: 4px;
}

/* ─── Terminais transparentes verticais ─── */
.splash-coderain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
}

/* ─── Particles canvas ─── */
.splash-particles {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

@media (max-width: 768px) {
  .splash-coderain { opacity: 0.25; }
}

/* ══════════════════════════════════════════════════════════════
   SPLASH — Responsivo
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .splash-title {
    font-size: 1.6rem;
  }

  .splash-logo-mark {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    border-radius: 15px;
  }

  .splash-logo-ring {
    inset: -10px;
  }

  .splash-logo-ring-2 {
    inset: -20px;
  }

  .splash-subtitle {
    font-size: 0.9rem;
  }

  .splash-actions {
    flex-direction: column;
    align-items: center;
  }

  .splash-btn {
    width: 100%;
    max-width: 280px;
    padding: 13px 24px;
    font-size: 0.9rem;
  }

  .splash-tag {
    font-size: 0.78rem;
    padding: 5px 12px;
    white-space: normal;
  }

  .splash-orb-1 {
    width: 200px;
    height: 200px;
  }

  .splash-orb-2 {
    width: 180px;
    height: 180px;
  }

  .splash-orb-3 {
    display: none;
  }

  .splash-container {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .splash-title {
    font-size: 1.35rem;
  }

  .splash-logo-mark {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
    border-radius: 13px;
  }

  .splash-subtitle-wrap {
    min-height: 28px;
  }

  .splash-subtitle {
    font-size: 0.82rem;
  }

  .splash-btn {
    padding: 11px 20px;
    max-width: 240px;
    font-size: 0.85rem;
  }

  .splash-footer-text {
    font-size: 0.75rem;
  }
}
