/* ================================================
   DESTINO: public/assets/css/style.css
   (substitui o arquivo existente no mesmo caminho)
   ================================================ */
/* ================================================
   SaaS Platform v2.0 — Modern Dark UI
   ================================================ */

:root {
  /* Core palette */
  --primary:        #6366f1;
  --primary-dark:   #4f46e5;
  --primary-light:  #818cf8;
  --accent:         #06b6d4;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --info:           #3b82f6;

  /* Dark theme surfaces */
  --bg-base:        #0f0f13;
  --bg-surface:     #16161d;
  --bg-card:        #1c1c26;
  --bg-elevated:    #22222f;
  --bg-hover:       #2a2a3a;

  /* Borders */
  --border:         rgba(255,255,255,.07);
  --border-light:   rgba(255,255,255,.12);

  /* Text */
  --text-primary:   #f1f1f5;
  --text-secondary: #9898b0;
  --text-muted:     #5f5f78;

  /* Sidebar */
  --sidebar-w:      260px;
  --sidebar-w-sm:   68px;

  /* Effects */
  --radius:         10px;
  --radius-lg:      16px;
  --shadow:         0 4px 24px rgba(0,0,0,.4);
  --shadow-sm:      0 2px 10px rgba(0,0,0,.25);
  --glow:           0 0 20px rgba(99,102,241,.3);
  --transition:     .22s cubic-bezier(.4,0,.2,1);
}

/* Light theme overrides */
[data-theme="light"] {
  --bg-base:        #f0f2f8;
  --bg-surface:     #ffffff;
  --bg-card:        #ffffff;
  --bg-elevated:    #f7f8fc;
  --bg-hover:       #eef0f8;
  --border:         rgba(0,0,0,.07);
  --border-light:   rgba(0,0,0,.12);
  --text-primary:   #0f0f1a;
  --text-secondary: #5a5a72;
  --text-muted:     #9898b0;
}

/* ── Reset & Base ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: .9375rem;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Public/members pages use <main> + <footer> as direct children of body;
   main grows to push the footer to the bottom of the viewport. */
body > main { flex: 1 0 auto; }
body > footer { flex-shrink: 0; }

a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--primary); }

img { max-width: 100%; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 99px; }

/* ── Layout Wrapper ─────────────────────────── */
#wrapper { display: flex; min-height: 100vh; }
#page-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ── Sidebar ────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: width var(--transition), transform var(--transition);
  overflow: hidden;
}

#sidebar.collapsed { width: var(--sidebar-w-sm); }

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  min-height: 68px;
}
.sidebar-brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: var(--glow);
}
.sidebar-brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
}
#sidebar.collapsed .sidebar-brand-text { display: none; }
#sidebar.collapsed .sidebar-brand img { max-width: 32px; height: 32px; }

/* Nav */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.sidebar-section-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 10px 6px;
  white-space: nowrap;
  overflow: hidden;
}
#sidebar.collapsed .sidebar-section-label { opacity: 0; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}
.sidebar-link i { font-size: 1.05rem; flex-shrink: 0; width: 20px; text-align: center; }
.sidebar-link-text { overflow: hidden; }

.sidebar-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--border);
}
.sidebar-link.active {
  color: var(--primary-light);
  background: rgba(99,102,241,.12);
  border-color: rgba(99,102,241,.25);
}
.sidebar-link.active i { color: var(--primary); }

#sidebar.collapsed .sidebar-link { justify-content: center; padding: 9px 0; }
#sidebar.collapsed .sidebar-link-text { display: none; }

/* Sidebar footer */
.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
}

/* Sidebar offset for main content */
#page-content { margin-left: var(--sidebar-w); min-height: 100vh; transition: margin var(--transition); }
#sidebar.collapsed ~ #page-content { margin-left: var(--sidebar-w-sm); }

/* ── Topbar ─────────────────────────────────── */
.topbar {
  height: 64px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1.1rem;
}
.topbar-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }

.topbar-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: .95rem;
}

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.topbar-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1rem;
  position: relative;
}
.topbar-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }

.topbar-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: #fff;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}
.topbar-avatar:hover { border-color: var(--primary); }

/* Dropdown */
.dropdown-menu-dark {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  min-width: 180px;
}
.dropdown-item-dark {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: .875rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.dropdown-item-dark:hover { background: var(--bg-hover); color: var(--text-primary); }
.dropdown-item-dark.danger { color: var(--danger); }
.dropdown-item-dark.danger:hover { background: rgba(239,68,68,.1); }
button.dropdown-item-dark {
  width: 100%;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  align-items: flex-start;
}
.dropdown-item-dark .item-icon { font-size: .95rem; margin-top: 1px; flex-shrink: 0; }
.dropdown-item-dark .item-title { display: block; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.dropdown-item-dark .item-desc { display: block; font-size: .72rem; color: var(--text-muted); font-weight: 400; line-height: 1.3; margin-top: 1px; }
.dropdown-item-dark.danger .item-title { color: var(--danger); }

/* ── Main content ───────────────────────────── */
.main-content { flex: 1; padding: 28px; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}
.page-subtitle {
  font-size: .875rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ── Cards ──────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover { border-color: var(--border-light); }
.card-body { padding: 20px; }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: var(--text-primary);
  font-size: .9rem;
}
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

/* Stat cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
}
.stat-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-icon.primary   { background: rgba(99,102,241,.15); color: var(--primary-light); }
.stat-icon.success   { background: rgba(16,185,129,.15); color: var(--success); }
.stat-icon.warning   { background: rgba(245,158,11,.15); color: var(--warning); }
.stat-icon.danger    { background: rgba(239,68,68,.15);  color: var(--danger); }
.stat-icon.info      { background: rgba(59,130,246,.15); color: var(--info); }
.stat-icon.accent    { background: rgba(6,182,212,.15);  color: var(--accent); }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--text-secondary); margin-top: 4px; }

/* ── Tables ─────────────────────────────────── */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  text-align: left;
  vertical-align: middle;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: .875rem;
  vertical-align: middle;
  text-align: left;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table td strong, .data-table td .fw-bold { color: var(--text-primary); }
.data-table td:last-child, .data-table th:last-child { white-space: nowrap; width: 1%; }

/* Linha de botões de ação na última coluna da tabela */
.action-btns {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}
.action-btns form { margin: 0; }

/* Botões de ação com apenas ícone — compactos e quadrados */
.data-table td .btn.btn-sm,
.data-table td a.btn.btn-sm {
  padding: 5px 9px;
  min-width: 30px;
  justify-content: center;
}

/* ── Badges ─────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.badge-success { background: rgba(16,185,129,.15);  color: #34d399; border: 1px solid rgba(16,185,129,.25); }
.badge-danger  { background: rgba(239,68,68,.15);   color: #f87171; border: 1px solid rgba(239,68,68,.25); }
.badge-warning { background: rgba(245,158,11,.15);  color: #fbbf24; border: 1px solid rgba(245,158,11,.25); }
.badge-info    { background: rgba(59,130,246,.15);  color: #60a5fa; border: 1px solid rgba(59,130,246,.25); }
.badge-primary { background: rgba(99,102,241,.15);  color: #a5b4fc; border: 1px solid rgba(99,102,241,.25); }
.badge-secondary{ background: rgba(148,163,184,.1); color: #94a3b8; border: 1px solid rgba(148,163,184,.2); }

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}
.btn-sm { padding: 5px 12px; font-size: .8rem; border-radius: 7px; }
.btn-lg { padding: 11px 26px; font-size: 1rem; border-radius: 10px; }
.btn-block { width: 100%; justify-content: center; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 0 0 0 rgba(99,102,241,0);
}
.btn-primary:hover { box-shadow: var(--glow); transform: translateY(-1px); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; transform: translateY(-1px); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }

.btn-warning { background: var(--warning); color: #000; }
.btn-warning:hover { background: #d97706; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-light);
}
.btn-outline:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ── Forms ──────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .825rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
  letter-spacing: .01em;
}
.form-control, .form-select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 9px 14px;
  font-size: .875rem;
  transition: all var(--transition);
  outline: none;
  appearance: none;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
  background: var(--bg-card);
}
.form-control-sm, .form-select-sm { padding: 6px 11px; font-size: .825rem; border-radius: 7px; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ── Input de arquivo (combina com o tema dark) ── */
input[type="file"].form-control {
  display: flex;
  align-items: center;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: .82rem;
}
input[type="file"].form-control::file-selector-button,
input[type="file"].form-control::-webkit-file-upload-button {
  display: inline-flex;
  align-items: center;
  height: 100%;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: none;
  border-right: 1px solid var(--border-light);
  padding: 9px 16px;
  margin-right: 14px;
  font-size: .82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition);
}
input[type="file"].form-control:hover::file-selector-button,
input[type="file"].form-control:hover::-webkit-file-upload-button {
  background: var(--bg-hover);
}

.input-group { display: flex; }
.input-group .form-control { border-radius: 8px 0 0 8px; flex: 1; }
.input-group .btn { border-radius: 0 8px 8px 0; }
.input-group-text {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 0 12px;
  color: var(--text-muted);
  display: flex; align-items: center;
}

.form-check { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.form-check-input {
  width: 17px; height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
  border-radius: 4px;
}
.form-check-label { font-size: .875rem; color: var(--text-secondary); cursor: pointer; }

.form-text { font-size: .775rem; color: var(--text-muted); margin-top: 5px; }

/* Switch */
.form-switch { display: flex; align-items: center; gap: 10px; }
.switch {
  position: relative;
  width: 42px; height: 24px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-hover);
  border-radius: 99px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-light);
}
.switch-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}
.switch input:checked + .switch-slider { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); background: #fff; }

/* ── Alerts ─────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .875rem;
  margin-bottom: 16px;
}
.alert-success { background: rgba(16,185,129,.1);  border-color: rgba(16,185,129,.25); color: #34d399; }
.alert-danger   { background: rgba(239,68,68,.1);  border-color: rgba(239,68,68,.25);  color: #f87171; }
.alert-warning  { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.25); color: #fbbf24; }
.alert-info     { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.25); color: #60a5fa; }
.alert-close {
  margin-left: auto;
  background: none; border: none;
  color: inherit; opacity: .6;
  cursor: pointer; font-size: 1rem;
  line-height: 1; padding: 0;
}
.alert-close:hover { opacity: 1; }

/* ── Public Navbar ──────────────────────────── */
.pub-nav {
  background: rgba(15,15,19,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 300;
  height: 64px;
  display: flex; align-items: center;
}
.pub-nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center;
  width: 100%;
  gap: 32px;
}
.pub-nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}
.pub-nav-brand-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
}
.pub-nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none; flex: 1;
}
.pub-nav-links a {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  text-decoration: none;
}
.pub-nav-links a:hover { color: var(--text-primary); background: var(--bg-hover); }

.pub-nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

@media (max-width: 420px) {
  .pub-cta-extra { display: none; }
  .pub-nav-actions .btn { padding: 7px 10px; font-size: .8rem; }
}

.pub-nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border);
  color: var(--text-secondary); border-radius: 7px;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem;
}

/* ── Hero ───────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0f0f13 0%, #16103a 50%, #0f1e2e 100%);
  position: relative; overflow: hidden;
  padding: 100px 24px;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(99,102,241,.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.25);
  border-radius: 99px;
  padding: 5px 14px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px; margin: 0 auto 36px;
}

/* Plan cards public */
.plan-card-public {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.plan-card-public:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--glow); }
.plan-card-public.featured { border-color: var(--primary); box-shadow: var(--glow); }
.plan-card-header {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.plan-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.plan-name { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.plan-price {
  font-size: 2.4rem; font-weight: 800; color: var(--text-primary);
  margin: 12px 0 4px; line-height: 1;
}
.plan-price span { font-size: .9rem; font-weight: 500; color: var(--text-muted); }
.plan-period { font-size: .8rem; color: var(--text-muted); }
.plan-card-body { padding: 20px 24px; flex: 1; }
.plan-card-footer { padding: 20px 24px; border-top: 1px solid var(--border); }

/* Plan cards — horizontal row layout */
.plan-row-list { display: flex; flex-direction: column; gap: 16px; }
.plan-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}
.plan-row:hover { border-color: var(--primary); box-shadow: var(--glow); }
.plan-row.featured { border-color: var(--primary); box-shadow: var(--glow); }
.plan-row.is-current { border-color: var(--success); }
.plan-row-color { width: 6px; flex-shrink: 0; }
.plan-row-id {
  flex: 0 0 200px;
  padding: 22px 24px;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  border-right: 1px solid var(--border);
}
.plan-row-name { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.plan-row-period { font-size: .76rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.plan-row-price {
  flex: 0 0 170px;
  padding: 22px 20px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  border-right: 1px solid var(--border);
}
.plan-row-price .value { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.plan-row-price .value small { font-size: .7rem; font-weight: 500; color: var(--text-muted); display: block; margin-top: 2px; }
.plan-row-desc {
  flex: 1;
  padding: 22px 24px;
  display: flex; flex-direction: column; justify-content: center;
  min-width: 0;
  color: var(--text-secondary);
  font-size: .85rem;
}
.plan-row-desc p { margin: 0; }
.plan-row-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--success); color: #fff;
  font-size: .68rem; font-weight: 700;
  padding: 3px 10px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: .03em;
}
.plan-row-action {
  flex: 0 0 220px;
  padding: 18px 22px;
  display: flex; align-items: center; justify-content: center;
  border-left: 1px solid var(--border);
}
.plan-row-action .btn { width: 100%; }

@media (max-width: 900px) {
  .plan-row { flex-wrap: wrap; }
  .plan-row-id, .plan-row-price, .plan-row-desc, .plan-row-action {
    flex: 1 1 100%;
    border-right: none;
    border-left: none;
    border-bottom: 1px solid var(--border);
  }
  .plan-row-action { border-bottom: none; }
  .plan-row-price { align-items: flex-start; }
}

/* Payment modal — Mercado Pago Brick, tudo dentro da plataforma */
.payment-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(8,8,14,.72);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  display: none;
  align-items: center; justify-content: center;
  z-index: 2000;
  padding: 20px;
  opacity: 0;
  transition: opacity .25s ease;
}
.payment-modal-overlay.show { display: flex; opacity: 1; }

.payment-modal {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-light);
  border-radius: 22px;
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03) inset;
  transform: translateY(24px) scale(.97);
  opacity: 0;
  transition: transform .32s cubic-bezier(.16,1,.3,1), opacity .28s ease;
}
.payment-modal-overlay.show .payment-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.payment-modal-handle {
  display: none;
  width: 40px; height: 4px;
  border-radius: 99px;
  background: var(--border-light);
  margin: 10px auto 0;
  flex-shrink: 0;
}

.payment-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  flex-shrink: 0;
}
.payment-modal-header strong {
  display: flex; align-items: center; gap: 10px;
  font-size: .95rem; font-weight: 600;
  color: var(--text-primary);
  min-width: 0;
}
.payment-modal-header strong span.payment-modal-title-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.payment-modal-header strong i {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  font-size: 1rem; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(99,102,241,.35);
}
.payment-modal-close {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer; line-height: 1;
  transition: var(--transition);
  flex-shrink: 0;
}
.payment-modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border-color: var(--border-light);
  transform: rotate(90deg);
}

.payment-modal-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}
.payment-modal-body::-webkit-scrollbar { width: 6px; }
.payment-modal-body::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 99px; }

/* Loading state shown while the Brick boots up */
.payment-brick-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  padding: 56px 10px;
  color: var(--text-muted);
  font-size: .85rem;
}
.payment-brick-loading .payment-spinner {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 3px solid var(--border-light);
  border-top-color: var(--primary);
  animation: paymentSpin .8s linear infinite;
}
@keyframes paymentSpin { to { transform: rotate(360deg); } }

#paymentResultBox { animation: paymentResultIn .35s ease; }
@keyframes paymentResultIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .payment-modal-overlay, .payment-modal, #paymentResultBox { transition: none; animation: none; }
}

/* Mobile: modal becomes a responsive bottom sheet */
@media (max-width: 560px) {
  .payment-modal-overlay { padding: 0; align-items: flex-end; }
  .payment-modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%) scale(1);
  }
  .payment-modal-overlay.show .payment-modal { transform: translateY(0) scale(1); }
  .payment-modal-handle { display: block; }
  .payment-modal-header { padding: 14px 18px; }
  .payment-modal-body { padding: 18px; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}

/* ── Generic centered modal — used by any button that opens a modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(8,8,14,.72);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  display: none;
  align-items: center; justify-content: center;
  z-index: 2000;
  padding: 20px;
  opacity: 0;
  transition: opacity .25s ease;
}
.modal-overlay.show { display: flex; opacity: 1; }

.modal-box {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03) inset;
  transform: translateY(24px) scale(.97);
  opacity: 0;
  transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .25s ease;
}
.modal-overlay.show .modal-box { transform: translateY(0) scale(1); opacity: 1; }

.modal-handle {
  display: none;
  width: 40px; height: 4px;
  border-radius: 99px;
  background: var(--border-light);
  margin: 10px auto 0;
  flex-shrink: 0;
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  flex-shrink: 0;
}
.modal-header strong {
  display: flex; align-items: center; gap: 8px;
  font-size: .9rem; font-weight: 600;
  color: var(--text-primary);
}
.modal-close {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer; line-height: 1;
  transition: var(--transition);
  flex-shrink: 0;
}
.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border-color: var(--border-light);
  transform: rotate(90deg);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal-box { transition: none; }
}

@media (max-width: 560px) {
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%) scale(1);
  }
  .modal-overlay.show .modal-box { transform: translateY(0) scale(1); }
  .modal-handle { display: block; }
  .modal-header { padding: 14px 18px; }
  .modal-body { padding: 18px; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}

/* Auth pages */
.auth-wrap {
  min-height: 100vh;
  background: var(--bg-base);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
}
.auth-logo {
  text-align: center; margin-bottom: 28px;
}
.auth-logo-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 12px;
  box-shadow: var(--glow);
}
.auth-title { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); text-align: center; }
.auth-subtitle { font-size: .875rem; color: var(--text-secondary); text-align: center; margin-top: 4px; }

/* Code input */
.code-input {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 1rem;
  text-align: center;
  background: var(--bg-elevated);
  border: 2px solid var(--border-light);
  border-radius: 12px;
  color: var(--text-primary);
  padding: 16px 20px;
}
.code-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }

/* Product cards */
.product-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.product-row .product-card {
  flex: 1 1 280px;
  max-width: 320px;
  margin: 0;
}
@media (max-width: 560px) {
  .product-row .product-card { flex-basis: 100%; max-width: 400px; }
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex; flex-direction: column;
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
}
.product-card:hover { border-color: var(--border-light); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.product-img {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
}
.product-body { padding: 16px; flex: 1; }
.product-footer { padding: 12px 16px; border-top: 1px solid var(--border); }

.profile-layout {
  display: grid;
  grid-template-columns: 280px minmax(0,1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 768px) {
  .profile-layout { grid-template-columns: 1fr; }
}

/* Avatar */
.avatar {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  flex-shrink: 0;
}
.avatar-lg { width: 56px; height: 56px; font-size: 1.2rem; border-radius: 14px; }

/* Notification dot */
.notif-dot {
  position: absolute; top: 3px; right: 3px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
}

/* Divider */
.divider {
  border: none; border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 12px; display: block; opacity: .4; }
.empty-state h5 { color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: .875rem; }

/* Pagination */
.pagination { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.page-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
  font-size: .82rem; font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.page-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Section title */
.section-title {
  font-size: 1.5rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.section-subtitle {
  font-size: .9rem; color: var(--text-secondary);
  margin-bottom: 40px;
}

/* Grid utilities */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Gap utilities */
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

/* Flex utilities */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

/* Text utilities */
.text-primary-color { color: var(--primary-light); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted   { color: var(--text-muted); }
.text-secondary-color { color: var(--text-secondary); }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.small { font-size: .8rem; }
.text-center { text-align: center; }

/* Spacing */
.mt-1{margin-top:4px}.mt-2{margin-top:8px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}
.mb-1{margin-bottom:4px}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-4{margin-bottom:16px}
.p-3{padding:12px}.p-4{padding:16px}.p-5{padding:20px}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  #sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-w) !important;
  }
  #sidebar.mobile-open { transform: translateX(0); }
  #page-content { margin-left: 0 !important; }
  .main-content { padding: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .pub-nav-links { display: none; }
  .pub-nav-toggle { display: flex; }
  .pub-nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    z-index: 299;
  }
  .topbar { padding: 0 16px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .auth-card { padding: 24px; }
}

#sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 199;
  backdrop-filter: blur(2px);
}
#sidebar-overlay.active { display: block; }

/* Animations */
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
.fade-in { animation: fadeIn .3s ease forwards; }

/* Scrollbar in sidebar */
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--bg-hover); }

/* ================================================
   Compatibility layer — Bootstrap-like utility
   classes used across views, re-skinned to match
   the dark design system above.
   ================================================ */

/* ── Containers & Grid (12 cols) ───────────────── */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}
.row > [class*="col-"] { padding: 0 10px; width: 100%; }

/* gutters */
.row.g-2 { margin: 0 -4px; } .row.g-2 > [class*="col-"] { padding: 0 4px; margin-bottom: 8px; }
.row.g-3 { margin: 0 -8px; } .row.g-3 > [class*="col-"] { padding: 0 8px; margin-bottom: 16px; }
.row.g-4 { margin: 0 -10px; } .row.g-4 > [class*="col-"] { padding: 0 10px; margin-bottom: 20px; }

.col-12 { width: 100%; }

@media (min-width: 576px) {
  .col-sm-6 { width: 50%; }
}
@media (min-width: 768px) {
  .col-md-2 { width: 16.6667%; }
  .col-md-3 { width: 25%; }
  .col-md-4 { width: 33.3333%; }
  .col-md-6 { width: 50%; }
  .col-md-7 { width: 58.3333%; }
  .col-md-8 { width: 66.6667%; }
}
@media (min-width: 992px) {
  .col-lg-4 { width: 33.3333%; }
  .col-lg-5 { width: 41.6667%; }
  .col-lg-6 { width: 50%; }
  .col-lg-7 { width: 58.3333%; }
  .col-lg-8 { width: 66.6667%; }
  .col-lg-9 { width: 75%; }
}
/* Below their breakpoint, all col-* default to full width via [class*="col-"] rule above */

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }

/* ── Bootstrap-style cards (used alongside .card) ─ */
.card.border-0 { border: none; }
.card.shadow, .card.shadow-sm { box-shadow: var(--shadow-sm); }
.card.h-100 { height: 100%; }
.card.border-2 { border-width: 2px; }
.card.border-danger { border-color: var(--danger); }
.card-body.text-center { text-align: center; }
.card-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.card-header.bg-transparent { background: transparent; }
.card-header.text-white { color: #fff; }
.card-footer.bg-transparent { background: transparent; }
.card-img-top {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: var(--bg-elevated);
  display: block;
}

/* ── Tables (bootstrap-style, inside .card) ──────── */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .875rem;
  color: var(--text-secondary);
  vertical-align: middle;
}
.table th {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.table thead.table-light th {
  background: var(--bg-elevated);
}
.table.table-hover tbody tr { transition: background var(--transition); }
.table.table-hover tbody tr:hover { background: var(--bg-hover); }
.table td strong, .table td .fw-bold { color: var(--text-primary); }
.table-responsive { overflow-x: auto; width: 100%; }

/* ── Buttons (bootstrap outline variants) ────────── */
.btn-outline-secondary { background: transparent; color: var(--text-secondary); border-color: var(--border-light); }
.btn-outline-secondary:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-outline-primary { background: transparent; color: var(--primary-light); border-color: rgba(99,102,241,.35); }
.btn-outline-primary:hover { background: rgba(99,102,241,.12); color: var(--primary-light); }
.btn-outline-success { background: transparent; color: var(--success); border-color: rgba(16,185,129,.35); }
.btn-outline-success:hover { background: rgba(16,185,129,.12); }
.btn-outline-danger { background: transparent; color: var(--danger); border-color: rgba(239,68,68,.35); }
.btn-outline-danger:hover { background: rgba(239,68,68,.12); }
.btn-outline-warning { background: transparent; color: var(--warning); border-color: rgba(245,158,11,.35); }
.btn-outline-warning:hover { background: rgba(245,158,11,.12); }
.btn-outline-info { background: transparent; color: var(--info); border-color: rgba(59,130,246,.35); }
.btn-outline-info:hover { background: rgba(59,130,246,.12); }
.btn-xs { padding: 2px 8px; font-size: .72rem; border-radius: 5px; }
.btn.d-inline { display: inline-flex; }
.w-100 { width: 100%; }

/* ── Badges (bootstrap bg-* variant) ─────────────── */
.badge.bg-success { background: rgba(16,185,129,.15);  color: #34d399; border: 1px solid rgba(16,185,129,.25); }
.badge.bg-danger  { background: rgba(239,68,68,.15);   color: #f87171; border: 1px solid rgba(239,68,68,.25); }
.badge.bg-warning { background: rgba(245,158,11,.15);  color: #fbbf24; border: 1px solid rgba(245,158,11,.25); }
.badge.bg-info    { background: rgba(59,130,246,.15);  color: #60a5fa; border: 1px solid rgba(59,130,246,.25); }
.badge.bg-primary { background: rgba(99,102,241,.15);  color: #a5b4fc; border: 1px solid rgba(99,102,241,.25); }
.badge.bg-secondary{ background: rgba(148,163,184,.1); color: #94a3b8; border: 1px solid rgba(148,163,184,.2); }
.badge.bg-dark     { background: rgba(255,255,255,.08); color: var(--text-secondary); border: 1px solid var(--border-light); }
.badge.bg-light    { background: rgba(255,255,255,.9);  color: #111; border: 1px solid rgba(0,0,0,.1); }
.badge.rounded-pill { border-radius: 99px; padding: 3px 9px; }
.badge.text-dark { color: #111; }
.badge.fs-6 { font-size: .8rem; padding: 5px 11px; }

/* ── Alerts (bootstrap dismissible variant) ──────── */
.alert.alert-dismissible { position: relative; padding-right: 44px; }
.btn-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 22px; height: 22px;
  background: none;
  border: none;
  color: inherit;
  opacity: .6;
  cursor: pointer;
  font-size: 0;
  border-radius: 6px;
}
.btn-close::before {
  content: '\00d7';
  font-size: 1.1rem;
  line-height: 1;
}
.btn-close:hover { opacity: 1; background: rgba(255,255,255,.08); }

/* ── Text / display utilities ────────────────────── */
.text-white { color: #fff; }
.text-dark { color: #11111a; }
.text-primary { color: var(--primary-light); }
.text-capitalize { text-transform: capitalize; }
.text-uppercase { text-transform: uppercase; }
.text-nowrap { white-space: nowrap; }
.font-monospace { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; }
.fs-5 { font-size: 1.05rem; }
.fs-6 { font-size: .9rem; }
.lead { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.7; }
.display-1 { font-size: clamp(3.5rem, 10vw, 6rem); font-weight: 800; line-height: 1; }
.display-5 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 800; line-height: 1.1; }
.display-6 { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 800; line-height: 1.1; }
.fw-normal { font-weight: 400; }
.bg-primary { background: var(--primary) !important; }
.bg-secondary { background: var(--bg-hover) !important; }
.bg-danger { background: var(--danger) !important; }
.bg-warning { background: var(--warning) !important; }
.bg-light { background: var(--bg-elevated) !important; }
.bg-transparent { background: transparent !important; }
.bg-primary.bg-opacity-10 { background: rgba(99,102,241,.1) !important; }
.bg-opacity-10 { opacity: 1; }
.border { border: 1px solid var(--border); }
.border-0 { border: none; }
.border-primary { border-color: var(--primary) !important; }
.border-danger { border-color: var(--danger) !important; }
.border-bottom { border-bottom: 1px solid var(--border); }
.rounded { border-radius: var(--radius); }
.rounded-circle { border-radius: 50%; }
.img-fluid { max-width: 100%; height: auto; }
.float-end { float: right; }
.d-inline { display: inline; }
.d-block { display: block; }
.d-none { display: none; }
.h-100 { height: 100%; }
.min-vh-100 { min-height: 100vh; }
.cursor-pointer { cursor: pointer; }

/* Spacing (bootstrap-style, extending the small set above) */
.me-1{margin-right:4px}.me-2{margin-right:8px}
.ms-1{margin-right:0;margin-left:4px}
.mb-0{margin-bottom:0}.mb-5{margin-bottom:24px}
.mt-5{margin-top:24px}
.my-3{margin-top:12px;margin-bottom:12px}.my-4{margin-top:16px;margin-bottom:16px}
.mx-auto{margin-left:auto;margin-right:auto}
.pb-4{padding-bottom:16px}
.px-1{padding-left:4px;padding-right:4px}.px-5{padding-left:24px;padding-right:24px}
.py-0{padding-top:0;padding-bottom:0}.py-2{padding-top:8px;padding-bottom:8px}
.py-3{padding-top:12px;padding-bottom:12px}.py-4{padding-top:16px;padding-bottom:16px}.py-5{padding-top:40px;padding-bottom:40px}
.gap-1{gap:4px}

/* Plan select card (members/renew.php) */
.plan-card { display: block; border-radius: var(--radius-lg); }
.plan-card .card { transition: all var(--transition); cursor: pointer; }
.plan-radio:checked + .card { border-color: var(--primary) !important; box-shadow: var(--glow); }

/* Form check used as a selectable tile (admin/products/form.php) */
.form-check.border { border: 1px solid var(--border-light) !important; border-radius: var(--radius); }
.form-check.border.border-primary { border-color: var(--primary) !important; }

/* Install step rows */
.install-step {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.install-step:last-child { border-bottom: none; }
.install-step.fail { color: var(--danger); }

/* ── Responsive adjustments for the compatibility layer ── */
@media (max-width: 767px) {
  .row > [class*="col-"] { width: 100% !important; }
  .container { padding: 0 16px; }
  .d-flex.justify-content-between.align-items-center.flex-wrap { flex-direction: column; align-items: flex-start !important; gap: 10px; }
}

.align-middle { vertical-align: middle; }
.form-control-color {
  width: 100%;
  height: 38px;
  padding: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
}

/* ── Form tabs (horizontal tabs across the top, e.g. admin/products/form.php) ── */
.form-tabs-wrap {
  display: flex;
  flex-direction: column;
  max-width: 1000px;
}
.form-tabs-nav {
  display: flex;
  flex-direction: row;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}
.form-tab-btn {
  display: flex; align-items: center; gap: 8px;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 12px 18px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.form-tab-btn i { font-size: 1rem; flex-shrink: 0; }
.form-tab-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.form-tab-btn.active { color: var(--primary-light); border-bottom-color: var(--primary); background: transparent; }
.form-tab-btn .tab-badge {
  font-size: .7rem;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 1px 7px;
}
.form-tab-btn.active .tab-badge { background: var(--primary); color: #fff; }
.form-tabs-content { width: 100%; min-width: 0; }
.form-tab-panel { display: none; }
.form-tab-panel.active { display: block; }
.form-tab-panel .card { width: 100%; box-sizing: border-box; }

@media (max-width: 768px) {
  .form-tab-btn { padding: 10px 14px; font-size: .8rem; }
}
