/* ============================================================
   Precifika – Global Styles
   Modern SaaS UI | Blue palette | Inter font
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;

  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;

  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;

  --orange-400: #fb923c;
  --orange-500: #f97316;

  --red-500: #ef4444;
  --red-600: #dc2626;

  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --sidebar-w: 240px;
  --sidebar-collapsed: 68px;
  --topbar-h: 64px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--gray-50); color: var(--gray-800); line-height: 1.5; font-size: 14px; }
a { text-decoration: none; color: var(--blue-600); }
a:hover { color: var(--blue-700); }
ul { list-style: none; }
input, textarea, select, button { font-family: inherit; font-size: 14px; }
button { cursor: pointer; border: none; background: none; }
.hidden { display: none !important; }

/* ============================================================
   AUTH SCREEN
   ============================================================ */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-600) 60%, var(--teal-500) 100%);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.auth-bg { position: absolute; inset: 0; pointer-events: none; }
.auth-bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  background: white;
}
.auth-bg-shape-1 { width: 500px; height: 500px; top: -150px; right: -100px; }
.auth-bg-shape-2 { width: 300px; height: 300px; bottom: -80px; left: -60px; }
.auth-bg-shape-3 { width: 200px; height: 200px; top: 40%; left: 20%; opacity: 0.07; }

.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: 560px;
  position: relative;
  z-index: 1;
}

.auth-brand { text-align: center; color: white; }
.auth-brand-logo {
  display: block;
  width: 300px;
  max-width: 92%;
  margin: 0 auto 16px;
  background: white;
  border-radius: 16px;
  padding: 16px 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
}
.auth-brand-tagline { font-size: 15px; opacity: 0.90; font-weight: 400; margin-top: 2px; }

.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.auth-title { font-size: 22px; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.auth-subtitle { font-size: 14px; color: var(--gray-500); margin-bottom: 24px; }
.auth-switch { text-align: center; margin-top: 20px; color: var(--gray-500); font-size: 13px; }
.auth-switch a { font-weight: 600; }

.auth-demo-hint {
  margin-top: 16px;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  color: var(--blue-700);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  text-align: center;
}

.input-password-wrap { position: relative; }
.input-password-wrap .form-input { padding-right: 40px; }
.btn-toggle-pw {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 14px;
  background: none; border: none;
}
.btn-toggle-pw:hover { color: var(--gray-600); }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--gray-900);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: width 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}

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

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  height: var(--topbar-h);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  white-space: nowrap;
  min-width: 0;
}
/* collapsed: show only square icon crop; expanded: show full logo */
.sidebar-brand-logo {
  width: 32px;
  height: 32px;
  object-fit: cover;
  object-position: left center;
  flex-shrink: 0;
  border-radius: 6px;
  background: white;
  padding: 3px;
  display: none;
}
.sidebar-brand-logo-full {
  height: 34px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
  background: white;
  border-radius: 8px;
  padding: 4px 10px;
  transition: opacity 0.2s, width 0.2s;
}

.sidebar-toggle {
  color: var(--gray-400);
  font-size: 16px;
  padding: 4px;
  flex-shrink: 0;
}
.sidebar-toggle:hover { color: white; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
}

.sidebar-user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500), var(--teal-500));
  color: white;
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-info { overflow: hidden; white-space: nowrap; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: white; }
.sidebar-user-company { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.sidebar-user-plan-badge { margin-top: 4px; }

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--gray-400);
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s;
  margin-bottom: 2px;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: white; }
.nav-item.active { background: var(--blue-600); color: white; }
.nav-icon { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; }
.nav-label { font-size: 13.5px; }

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.nav-logout { color: var(--gray-400); }
.nav-logout:hover { background: rgba(239,68,68,0.15); color: #f87171; }

/* Sidebar upgrade banner */
.sidebar-upgrade-banner {
  margin: 10px 8px;
  background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(14,165,233,0.15));
  border: 1px solid rgba(96,165,250,0.3);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-upgrade-icon { font-size: 20px; flex-shrink: 0; }
.sidebar-upgrade-text { flex: 1; min-width: 0; }
.sidebar-upgrade-title { font-size: 12px; font-weight: 700; color: white; }
.sidebar-upgrade-sub { font-size: 10.5px; color: rgba(255,255,255,0.6); margin-top: 1px; }
.sidebar-upgrade-btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--blue-600);
  color: white;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.sidebar-upgrade-btn:hover { background: var(--blue-700); }
.sidebar.collapsed .sidebar-upgrade-banner { display: none !important; }

.sidebar.collapsed .sidebar-brand-logo-full { opacity: 0; width: 0; overflow: hidden; padding: 0; }
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .nav-label { opacity: 0; width: 0; overflow: hidden; }
/* In collapsed mode show the small square crop */
.sidebar.collapsed .sidebar-brand-logo { display: block; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s;
}
.main-content.collapsed { margin-left: var(--sidebar-collapsed); }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  height: var(--topbar-h);
  background: white;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow);
}

.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-menu-btn { font-size: 16px; color: var(--gray-500); padding: 6px; }
.topbar-menu-btn:hover { color: var(--gray-700); }
.topbar-breadcrumb { font-size: 16px; font-weight: 600; color: var(--gray-800); }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.topbar-user-menu { position: relative; }
.topbar-user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500), var(--teal-500));
  color: white;
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.user-dropdown {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  overflow: hidden;
  z-index: 200;
}
.user-dropdown-header {
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--gray-100);
}
.user-dropdown-name { font-size: 13px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.user-dropdown-divider { height: 1px; background: var(--gray-100); }
.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--gray-700);
  font-size: 13px;
  transition: background 0.15s;
}
.user-dropdown a:hover { background: var(--gray-50); color: var(--gray-900); }

/* Topbar usage indicator */
.topbar-usage {
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar-usage-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--gray-100);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.topbar-usage-item:hover { background: var(--blue-50); color: var(--blue-600); }
.topbar-usage-item i { font-size: 11px; }

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content { flex: 1; padding: 28px 28px 48px; }
.page { display: none; animation: fadeIn 0.2s ease; }
.page.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header-left { display: flex; align-items: center; gap: 16px; }
.page-title { font-size: 24px; font-weight: 700; color: var(--gray-900); letter-spacing: -0.3px; }
.page-subtitle { font-size: 14px; color: var(--gray-500); margin-top: 2px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  transition: all 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--blue-600); color: white; border-color: var(--blue-600); }
.btn-primary:hover { background: var(--blue-700); border-color: var(--blue-700); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); border-color: var(--gray-200); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-ghost { background: transparent; color: var(--gray-600); border-color: var(--gray-200); }
.btn-ghost:hover { background: var(--gray-50); color: var(--gray-800); }
.btn-outline-primary { background: #fff; color: var(--blue-600); border-color: var(--blue-200); }
.btn-outline-primary:hover { background: var(--blue-50); border-color: var(--blue-400); }
.btn-success { background: var(--green-600); color: white; border-color: var(--green-600); }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--red-600); color: white; border-color: var(--red-600); }
.btn-danger:hover { background: #b91c1c; }
.btn-full { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 6px; }
.btn-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-icon { padding: 7px 10px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--gray-700); display: flex; align-items: center; gap: 6px; }
.form-input, .form-select, .form-textarea {
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  color: var(--gray-800);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 32px; }
.form-error { color: var(--red-600); font-size: 12.5px; padding: 8px 12px; background: #fef2f2; border-radius: 6px; border: 1px solid #fecaca; margin-bottom: 12px; }
.input-with-btn { display: flex; gap: 8px; }
.input-with-btn .form-select { flex: 1; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  margin-bottom: 20px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
}
.card-title { font-size: 15px; font-weight: 600; color: var(--gray-800); display: flex; align-items: center; gap: 8px; }
.card-link { font-size: 13px; color: var(--blue-600); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.card-body { padding: 20px; }
.card-body.no-padding { padding: 0; }

/* ============================================================
   STAT CARDS
   ============================================================ */
/* ============================================================
   DASHBOARD — redesigned
   ============================================================ */

/* ============================================================
   DASHBOARD
   ============================================================ */

/* ── Hero Header ── */
.db-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 28px 32px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #0d9488 100%);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(37,99,235,.25);
}
.db-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.db-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: 30%;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}
.db-hero-left { flex: 1; min-width: 0; position: relative; z-index: 1; }
.db-hero-greeting {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  margin-bottom: 6px;
  letter-spacing: .3px;
}
.db-hero-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin: 0 0 8px;
  letter-spacing: -.3px;
}
.db-hero-sub {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  font-weight: 400;
  margin: 0;
  line-height: 1.5;
}
.db-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  align-self: center;
}

/* Override button styles inside hero */
.db-hero .db-sec-btn {
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid rgba(255,255,255,.35);
  color: #fff;
  background: rgba(255,255,255,.12);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background .15s, border-color .15s;
  backdrop-filter: blur(4px);
}
.db-hero .db-sec-btn:hover { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.6); }
.db-new-btn {
  flex-shrink: 0;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  background: #fff;
  color: var(--blue-700);
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
  transition: box-shadow .2s, transform .15s, background .15s;
  display: flex;
  align-items: center;
  gap: 7px;
}
.db-new-btn:hover { box-shadow: 0 6px 20px rgba(0,0,0,.2); transform: translateY(-1px); background: #f0f7ff; }

/* ── KPI cards ── */
.db-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.db-kpi {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 18px;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  transition: transform .2s, box-shadow .2s;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.db-kpi::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 0 0 18px 18px;
}
.db-kpi--blue::after   { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.db-kpi--teal::after   { background: linear-gradient(90deg, #0d9488, #2dd4bf); }
.db-kpi--green::after  { background: linear-gradient(90deg, #16a34a, #4ade80); }
.db-kpi--orange::after { background: linear-gradient(90deg, #d97706, #fb923c); }

.db-kpi[onclick] { cursor: pointer; }
.db-kpi[onclick]:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.10); }

/* Top row: icon + tag */
.db-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.db-kpi-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.db-kpi--blue   .db-kpi-icon { background: #eff6ff; color: var(--blue-600); }
.db-kpi--teal   .db-kpi-icon { background: #f0fdfa; color: var(--teal-600); }
.db-kpi--green  .db-kpi-icon { background: #f0fdf4; color: var(--green-600); }
.db-kpi--orange .db-kpi-icon { background: #fff7ed; color: var(--orange-500); }

/* Small tag/chip top-right */
.db-kpi-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: .2px;
  white-space: nowrap;
}
.db-kpi-tag--blue   { background: #eff6ff; color: var(--blue-600); }
.db-kpi-tag--teal   { background: #f0fdfa; color: var(--teal-600); }
.db-kpi-tag--green  { background: #f0fdf4; color: var(--green-600); }
.db-kpi-tag--orange { background: #fff7ed; color: var(--orange-500); }

.db-kpi-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--gray-900);
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 4px;
}
.db-kpi-value--sm { font-size: 22px; letter-spacing: -.8px; }
.db-kpi-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 2px;
}
.db-kpi-sub {
  font-size: 11.5px;
  color: var(--gray-400);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Approval rate mini progress bar */
.db-kpi-progress {
  position: absolute;
  bottom: 3px; left: 0; right: 0;
  height: 3px;
  background: var(--gray-100);
  border-radius: 0 0 18px 18px;
}
.db-kpi-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #d97706, #fb923c);
  border-radius: 0 2px 2px 0;
  transition: width .9s cubic-bezier(.4,0,.2,1);
  width: 0;
}

/* ── Body grid ── */
.db-body {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}

/* ── Panel (card) ── */
.db-panel {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
  overflow: hidden;
}
.db-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--gray-100);
  gap: 10px;
}
.db-panel-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.db-panel-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.db-panel-icon--blue   { background: var(--blue-50);  color: var(--blue-600); }
.db-panel-icon--purple { background: #f5f3ff;          color: #7c3aed; }
.db-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0;
}
.db-panel-badge {
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.db-panel-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue-600);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .15s, gap .15s;
}
.db-panel-link:hover { color: var(--blue-800); gap: 8px; }

/* ── List column headers ── */
.db-list-head {
  display: grid;
  grid-template-columns: 1fr 120px 110px 72px 40px;
  gap: 8px;
  padding: 8px 20px;
  background: var(--gray-50);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .6px;
  border-bottom: 1px solid var(--gray-100);
}

/* ── List container ── */
.db-list { padding: 4px 0; min-height: 60px; }

/* ── Single row ── */
.db-row {
  display: grid;
  grid-template-columns: 1fr 120px 110px 72px 40px;
  gap: 8px;
  align-items: center;
  padding: 11px 20px;
  border-bottom: 1px solid var(--gray-50);
  cursor: pointer;
  transition: background .13s;
}
.db-row:last-child { border-bottom: none; }
.db-row:hover { background: #f8faff; }
.db-row:hover .db-row-edit { opacity: 1; transform: scale(1); }

/* Avatar + info */
.db-row-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.db-row-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: .3px;
}
.db-av--blue   { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.db-av--teal   { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.db-av--purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.db-av--orange { background: linear-gradient(135deg, #d97706, #fb923c); }
.db-av--green  { background: linear-gradient(135deg, #16a34a, #4ade80); }
.db-av--pink   { background: linear-gradient(135deg, #db2777, #f472b6); }

.db-row-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.db-row-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-row-client {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-row-client i { font-size: 10px; }

.db-row-value {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gray-800);
  text-align: right;
  white-space: nowrap;
}
.db-row-value--approved { color: var(--green-600); }
.db-row-status { display: flex; justify-content: flex-start; }

/* Date: stacked day / month-year */
.db-row-date {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
.db-row-date-day {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
  line-height: 1;
}
.db-row-date-month {
  font-size: 10.5px;
  color: var(--gray-400);
  line-height: 1;
}

.db-row-action { display: flex; justify-content: center; }
.db-row-edit {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(.88);
  transition: opacity .15s, background .15s, color .15s, transform .15s;
}
.db-row-edit:hover { background: var(--blue-50); color: var(--blue-600); }

/* ── Status badges (dashboard) ── */
.db-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}
.db-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
  opacity: .7;
}
.db-badge--rascunho { background: var(--gray-100); color: var(--gray-500); }
.db-badge--enviado  { background: #eff6ff;          color: var(--blue-600); }
.db-badge--aprovado { background: #f0fdf4;          color: var(--green-600); }

/* ── Empty state — full (no estimates) ── */
.db-empty--full {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 48px 40px;
  flex-wrap: wrap;
  justify-content: center;
}
.db-empty-illustration {
  position: relative;
  width: 100px; height: 100px;
  flex-shrink: 0;
}
.db-empty-circle {
  position: absolute;
  border-radius: 50%;
}
.db-empty-circle--1 {
  width: 100px; height: 100px;
  top: 0; left: 0;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}
.db-empty-circle--2 {
  width: 64px; height: 64px;
  top: 18px; left: 18px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  opacity: .12;
}
.db-empty-icon-wrap {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  color: var(--blue-600);
}
.db-empty-content {
  flex: 1;
  min-width: 260px;
  max-width: 480px;
}
.db-empty-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 8px;
  letter-spacing: -.2px;
}
.db-empty-desc {
  font-size: 13.5px;
  color: var(--gray-500);
  line-height: 1.6;
  margin: 0 0 20px;
  max-width: 380px;
}
.db-empty-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.db-empty-btn-main {
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(37,99,235,.3);
  transition: transform .15s, box-shadow .15s;
}
.db-empty-btn-main:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,.4); }
.db-empty-btn-sec {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
  border: 1.5px solid var(--blue-200);
  color: var(--blue-600);
  background: #fff;
  transition: background .15s, border-color .15s;
}
.db-empty-btn-sec:hover { background: var(--blue-50); border-color: var(--blue-400); }
.db-empty-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.db-empty-tip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray-400);
}
.db-empty-tip i { color: var(--green-500); font-size: 10px; }

/* ── Empty state (simple, sidebar panel) ── */
.db-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  text-align: center;
}
.db-empty-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--gray-100);
  color: var(--gray-400);
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
}
.db-empty-text { font-size: 13.5px; color: var(--gray-600); font-weight: 700; }
.db-empty-hint { font-size: 12px; color: var(--gray-400); font-weight: 400; max-width: 280px; text-align: center; line-height: 1.5; }

/* ── Chart area ── */
.db-chart-wrap {
  position: relative;
  height: 190px;
  padding: 16px 24px 8px;
}
.db-chart-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -52%);
  text-align: center;
  pointer-events: none;
}
.db-chart-center-val {
  font-size: 26px;
  font-weight: 900;
  color: var(--gray-900);
  letter-spacing: -1px;
  line-height: 1;
}
.db-chart-center-lbl {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── Legend pills ── */
.db-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 20px 16px;
  justify-content: center;
}
.db-legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.db-legend-pill--gray  { background: var(--gray-100);  color: var(--gray-600);  border-color: var(--gray-200); }
.db-legend-pill--blue  { background: #eff6ff;           color: var(--blue-700);  border-color: #bfdbfe; }
.db-legend-pill--green { background: #f0fdf4;           color: var(--green-700); border-color: #bbf7d0; }
.db-legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
  opacity: .7;
}
.db-legend-pct { opacity: .6; font-weight: 500; }

/* ── Side panel divider ── */
.db-side-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 0 20px;
}

/* ── Quick actions ── */
.db-actions {
  padding: 16px 20px 20px;
}
.db-actions-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 12px;
}
.db-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.db-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background .16s, border-color .16s, transform .14s, box-shadow .16s;
  text-align: center;
}
.db-action-btn:hover {
  background: #fff;
  border-color: var(--gray-200);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.db-action-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.db-action-icon--blue   { background: var(--blue-50);  color: var(--blue-600); }
.db-action-icon--teal   { background: #f0fdfa;          color: var(--teal-600); }
.db-action-icon--amber  { background: #fffbeb;          color: #d97706; }
.db-action-icon--purple { background: #f5f3ff;          color: #7c3aed; }
.db-action-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray-700);
  line-height: 1.3;
}

/* ────────────────────────────────────────────────────────────────
   DASHBOARD ENHANCEMENTS
   ──────────────────────────────────────────────────────────────── */

/* ── Hero decorative blobs ── */
.db-hero-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.db-hero-blob--1 {
  width: 260px; height: 260px;
  top: -80px; right: -60px;
  background: rgba(255,255,255,.06);
}
.db-hero-blob--2 {
  width: 180px; height: 180px;
  bottom: -60px; left: 25%;
  background: rgba(255,255,255,.04);
}
.db-hero-blob--3 {
  width: 100px; height: 100px;
  top: 20px; left: -20px;
  background: rgba(255,255,255,.03);
}

/* ── Hero micro-stats ── */
.db-hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  padding: 12px 20px;
  backdrop-filter: blur(8px);
  flex-shrink: 0;
  align-self: center;
  position: relative;
  z-index: 1;
}
.db-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0 20px;
}
.db-hero-stat:first-child { padding-left: 0; }
.db-hero-stat:last-child  { padding-right: 0; }
.db-hero-stat-val {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.5px;
  line-height: 1;
}
.db-hero-stat-lbl {
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.db-hero-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.2);
  flex-shrink: 0;
}

/* ── Insight bar ── */
.db-insight-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 20px;
  animation: insight-slide-in .4s ease;
}
@keyframes insight-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.db-insight-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: #dbeafe;
  color: var(--blue-600);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.db-insight-text {
  flex: 1;
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
  margin: 0;
}
.db-insight-text strong { color: var(--gray-900); }
.db-insight-close {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--gray-400);
  font-size: 11px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .13s, color .13s;
}
.db-insight-close:hover { background: var(--gray-100); color: var(--gray-600); }

/* ── KPI card structural layout ── */
.db-kpi {
  flex-direction: column;
  padding: 20px 20px 14px;
}
/* Override the duplicate inline layout from responsive block */
.db-kpi-body { flex: 1; min-width: 0; }

/* ── KPI spark area (bottom of card) ── */
.db-kpi-spark {
  margin-top: 12px;
  width: 100%;
}
.db-kpi-spark--gauge {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}
.db-gauge-svg {
  width: 72px;
  overflow: visible;
}
.db-gauge-bg   { transition: none; }
.db-gauge-fill { transition: stroke-dashoffset 1s cubic-bezier(.4,0,.2,1), stroke .3s; }

/* ── Client engagement bar ── */
.db-kpi-client-bar {
  height: 5px;
  background: var(--gray-100);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 5px;
}
.db-kpi-client-fill {
  height: 100%;
  background: linear-gradient(90deg, #0d9488, #2dd4bf);
  border-radius: 4px;
  transition: width .9s cubic-bezier(.4,0,.2,1);
  width: 0;
}
.db-kpi-client-label {
  font-size: 11px;
  color: var(--teal-600);
  font-weight: 600;
}

/* ── Revenue split bar ── */
.db-kpi-revenue-split {
  display: flex;
  height: 5px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--gray-100);
  margin-bottom: 5px;
}
.db-kpi-rev-approved {
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #4ade80);
  transition: width .9s cubic-bezier(.4,0,.2,1);
}
.db-kpi-rev-pending {
  height: 100%;
  background: linear-gradient(90deg, #d97706, #fb923c);
  transition: width .9s cubic-bezier(.4,0,.2,1) .1s;
}
.db-kpi-rev-legend {
  font-size: 10.5px;
  color: var(--gray-400);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 3px;
}
.db-rev-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.db-rev-dot--approved { background: #16a34a; }
.db-rev-dot--pending  { background: #d97706; }

/* ── Sidebar column (stacked panels) ── */
.db-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Panel amber icon ── */
.db-panel-icon--amber { background: #fffbeb; color: #d97706; }

/* ── Quick actions as standalone panel ── */
.db-panel--actions .db-actions-grid--2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 18px 18px;
}

/* ── KPI top (new card layout: column) ── */
.db-kpi .db-kpi-top {
  margin-bottom: 10px;
}

/* ── Responsive: hide hero stats on smaller viewports ── */
@media (max-width: 1100px) {
  .db-hero-stats { display: none; }
}
@media (max-width: 900px) {
  .db-insight-bar { flex-wrap: wrap; }
  .db-hero { flex-direction: column; gap: 16px; }
  .db-hero-actions { width: 100%; justify-content: flex-start; }
}

/* ── DB body: sidebar as column ── */
.db-body {
  grid-template-columns: 1fr 360px;
}
@media (max-width: 1024px) {
  .db-body { grid-template-columns: 1fr; }
  .db-sidebar-col { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .db-sidebar-col { grid-template-columns: 1fr; }
  .db-kpis { grid-template-columns: 1fr 1fr; }
  .db-hero-stats { display: none; }
  .db-panel--actions .db-actions-grid--2x2 { grid-template-columns: 1fr 1fr; }
}

/* ── Panel badge ── */
.db-panel-badge {
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ────────────────────────────────────────────────────────────────
   END DASHBOARD ENHANCEMENTS
   ──────────────────────────────────────────────────────────────── */

/* legacy db-header fallback */
.db-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.db-header-left { flex: 1; min-width: 0; }
.db-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.db-greeting {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 4px;
  letter-spacing: .1px;
}
.db-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
  margin: 0;
}
.db-sec-btn {
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--blue-200);
  color: var(--blue-600);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background .15s, border-color .15s, transform .12s;
}
.db-sec-btn:hover { background: var(--blue-50); border-color: var(--blue-400); transform: translateY(-1px); }
.db-new-btn {
  flex-shrink: 0;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(37,99,235,.3);
  transition: box-shadow .2s, transform .15s;
}
.db-new-btn:hover { box-shadow: 0 6px 20px rgba(37,99,235,.4); transform: translateY(-1px); }

/* ── (duplicate block removed – definitions above are canonical) ── */

/* ════════════════════════════════════════════════════════════
   PDF PREVIEW MODAL
   ════════════════════════════════════════════════════════════ */

/* ── Overlay fullscreen ── */
.pdf-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  animation: pdf-overlay-in .22s cubic-bezier(.4,0,.2,1);
}
.pdf-preview-overlay.hidden { display: none; }
@keyframes pdf-overlay-in {
  from { opacity: 0; transform: scale(.98); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Toolbar ── */
.pdf-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.pdf-preview-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}
.pdf-preview-logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37,99,235,.4);
}
.pdf-preview-info { min-width: 0; }
.pdf-preview-title {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  max-width: 360px;
}
.pdf-preview-subtitle {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
  margin-top: 2px;
}
.pdf-preview-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Toolbar buttons */
.pdf-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: background .15s, box-shadow .15s, transform .12s;
}
.pdf-preview-btn:active { transform: scale(.97); }
.pdf-preview-btn--primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,.4);
}
.pdf-preview-btn--primary:hover { background: linear-gradient(135deg, #1d4ed8, #1e40af); box-shadow: 0 4px 14px rgba(37,99,235,.5); }
.pdf-preview-btn--secondary {
  background: rgba(255,255,255,.08);
  color: #cbd5e1;
  border: 1px solid rgba(255,255,255,.12);
}
.pdf-preview-btn--secondary:hover { background: rgba(255,255,255,.14); color: #f1f5f9; }
.pdf-preview-btn--ghost {
  background: transparent;
  color: #94a3b8;
  padding: 8px 10px;
}
.pdf-preview-btn--ghost:hover { background: rgba(255,255,255,.08); color: #e2e8f0; }
.pdf-preview-close {
  width: 36px; height: 36px;
  border-radius: 8px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

/* ── Body (iframe area) ── */
.pdf-preview-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 20px;
  background: #1e293b;
  background-image: radial-gradient(circle at 50% 50%, rgba(37,99,235,.04) 0%, transparent 70%);
}

/* ── iframe ── */
.pdf-preview-iframe {
  width: 100%;
  height: 100%;
  max-width: 900px;
  border: none;
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06),
    0 20px 60px rgba(0,0,0,.5),
    0 4px 16px rgba(0,0,0,.3);
  background: #fff;
  display: block;
}
.pdf-preview-iframe.hidden { display: none; }

/* ── Loading state ── */
.pdf-preview-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: absolute;
  inset: 0;
}
.pdf-preview-loading.hidden { display: none; }

/* Spinner com 3 anéis */
.pdf-preview-spinner {
  position: relative;
  width: 64px; height: 64px;
}
.pdf-spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  animation: pdf-spin 1.2s linear infinite;
}
.pdf-spinner-ring {
  border-top-color: #2563eb;
  animation-duration: 1s;
}
.pdf-spinner-ring--2 {
  inset: 8px;
  border-top-color: #4f46e5;
  animation-duration: 1.4s;
  animation-direction: reverse;
}
.pdf-spinner-ring--3 {
  inset: 16px;
  border-top-color: #0d9488;
  animation-duration: 1.8s;
}
@keyframes pdf-spin {
  to { transform: rotate(360deg); }
}
.pdf-preview-loading-text {
  font-size: 15px;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0;
}
.pdf-preview-loading-sub {
  font-size: 12.5px;
  color: #64748b;
  margin: -12px 0 0;
}

/* ── Fallback state ── */
.pdf-preview-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  max-width: 400px;
  padding: 40px;
}
.pdf-preview-fallback.hidden { display: none; }
.pdf-fallback-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: rgba(245,158,11,.12);
  color: #f59e0b;
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
}
.pdf-fallback-title {
  font-size: 17px;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0;
}
.pdf-fallback-desc {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0;
}
.pdf-fallback-btn {
  margin-top: 4px;
  font-size: 14px;
  padding: 11px 24px;
}

/* ── Status bar ── */
.pdf-preview-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  height: 36px;
  background: #0f172a;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
  gap: 16px;
}
.pdf-statusbar-info {
  font-size: 11px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pdf-statusbar-info i { color: #10b981; font-size: 10px; }
.pdf-statusbar-hint {
  font-size: 11px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  font-size: 10px;
  font-family: inherit;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .pdf-preview-subtitle  { display: none; }
  .pdf-preview-btn span  { display: none; }
  .pdf-preview-btn       { padding: 8px 12px; }
  .pdf-preview-btn--primary { padding: 8px 14px; }
  .pdf-preview-btn--primary span { display: inline; } /* mantém texto no botão principal */
  .pdf-preview-body      { padding: 10px; }
  .pdf-statusbar-hint    { display: none; }
  .pdf-statusbar-info    { font-size: 10px; }
}

/* ════════════════════════════════════════════════════════════
   END PDF PREVIEW MODAL
   ════════════════════════════════════════════════════════════ */

/* ============================================================
   STATUS BADGES (legacy — kept for other pages)
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-rascunho { background: var(--gray-100); color: var(--gray-600); }
.badge-enviado { background: #eff6ff; color: var(--blue-600); }
.badge-aprovado { background: #f0fdf4; color: var(--green-600); }

/* ============================================================
   TABLE
   ============================================================ */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: 8px 14px;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}
.search-box i { color: var(--gray-400); }
.search-box input { border: none; outline: none; width: 100%; background: none; color: var(--gray-700); }
.filter-group { display: flex; align-items: center; gap: 8px; }

.table-wrap {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: var(--gray-50);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: var(--gray-50); }
.table-actions { display: flex; align-items: center; gap: 6px; }

.table-empty, .empty-state-small {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
}
.empty-state-small i { font-size: 28px; margin-bottom: 10px; display: block; }
.empty-state-small p { font-size: 13px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  color: var(--gray-400);
  text-align: center;
  gap: 12px;
}
.empty-state-icon { font-size: 40px; }
.empty-state p { font-size: 14px; }

/* ============================================================
   CLIENTS MODULE – Full Redesign
   ============================================================ */

/* Stats bar */
.client-stats-bar {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 16px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  gap: 0;
}
.client-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 4px;
}
.client-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--blue-600);
  letter-spacing: -0.5px;
}
.client-stat-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  white-space: nowrap;
}
.client-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--gray-200);
  margin: 0 20px;
}

/* Toolbar */
.clients-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.search-box-lg {
  flex: 1;
  min-width: 260px;
  max-width: 480px;
  position: relative;
}
.search-box-lg input { width: 100%; }
.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
}
.search-clear:hover { color: var(--gray-600); }
.form-select-sm { padding: 8px 32px 8px 12px; font-size: 13px; }

/* View toggle */
.clients-view-toggle {
  display: flex;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
}
.view-btn {
  padding: 7px 12px;
  font-size: 14px;
  color: var(--gray-400);
  background: white;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.view-btn:hover { color: var(--gray-700); background: var(--gray-50); }
.view-btn.active { color: var(--blue-600); background: var(--blue-50); }

/* Results info */
.clients-results-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 14px;
}
.btn-link {
  background: none;
  border: none;
  color: var(--blue-600);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 0;
}
.btn-link:hover { text-decoration: underline; }

/* Grid */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

/* Client card */
.client-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}
.client-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-200);
}
.client-card-top {
  padding: 20px 20px 14px;
}
.client-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.client-avatar {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue-500), var(--teal-500));
  color: white;
  font-weight: 700;
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.client-card-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}
.client-card:hover .client-card-actions { opacity: 1; }
.client-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.client-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.client-info-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.client-info-item i {
  width: 14px;
  color: var(--gray-400);
  flex-shrink: 0;
  font-size: 11.5px;
}
.client-info-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 20px;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
}
.client-card-est-count {
  font-size: 12px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
}
.client-card-est-count i { color: var(--blue-400); }
.client-card-date {
  font-size: 11.5px;
  color: var(--gray-400);
}

/* List view row */
.client-list-avatar {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-500), var(--teal-500));
  color: white;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 10px;
  flex-shrink: 0;
}
.client-list-name-cell { display: flex; align-items: center; }

/* ============================================================
   CLIENT DETAIL PAGE
   ============================================================ */
.client-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.client-detail-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.client-detail-hero {
  display: flex;
  align-items: center;
  gap: 16px;
}
.client-detail-avatar {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--blue-500), var(--teal-500));
  color: white;
  font-weight: 800;
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
  flex-shrink: 0;
}
.client-detail-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 5px;
  letter-spacing: -0.3px;
}
.client-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.client-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-500);
}
.client-detail-meta-item i { color: var(--gray-400); font-size: 12px; }
.client-detail-meta-item a { color: var(--blue-600); }
.client-detail-meta-item a:hover { text-decoration: underline; }

/* Detail layout */
.client-detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}
.client-detail-sidebar, .client-detail-main { display: flex; flex-direction: column; gap: 20px; }

/* Contact list inside card */
.detail-contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.detail-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.detail-contact-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.detail-contact-icon--phone  { background: #eff6ff; color: var(--blue-600); }
.detail-contact-icon--email  { background: #f0fdf4; color: var(--green-600); }
.detail-contact-icon--addr   { background: #fff7ed; color: var(--orange-500); }
.detail-contact-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.detail-contact-label { font-size: 11px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.5px; }
.detail-contact-value { font-size: 13.5px; color: var(--gray-800); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-contact-value a { color: var(--blue-600); }
.detail-contact-value a:hover { text-decoration: underline; }
.detail-empty-contact { font-size: 13px; color: var(--gray-400); font-style: italic; }
.detail-created-at {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
  font-size: 12px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Finance grid */
.client-finance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.client-finance-item {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}
.client-finance-item:nth-child(2n) { border-right: none; }
.client-finance-item:nth-child(n+3) { border-bottom: none; }
.client-finance-value { font-size: 20px; font-weight: 800; color: var(--gray-900); letter-spacing: -0.5px; }
.client-finance-value--green { color: var(--green-600); }
.client-finance-value--blue  { color: var(--blue-600); }
.client-finance-value--orange{ color: var(--orange-500); }
.client-finance-label { font-size: 11.5px; color: var(--gray-500); }

/* Notes */
.detail-notes-text {
  font-size: 13.5px;
  color: var(--gray-600);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* History filter bar */
.history-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap;
}
.history-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  background: white;
  border: 1.5px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.15s;
}
.history-filter-pill:hover { border-color: var(--blue-300); color: var(--blue-600); background: var(--blue-50); }
.history-filter-pill.active { background: var(--blue-600); color: white; border-color: var(--blue-600); }
.pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.25);
  padding: 0 5px;
}
.history-filter-pill:not(.active) .pill-count {
  background: var(--gray-100);
  color: var(--gray-600);
}

/* History list items */
.client-history-list { display: flex; flex-direction: column; }
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s;
  cursor: pointer;
  gap: 12px;
}
.history-item:last-child { border-bottom: none; }
.history-item:hover { background: var(--gray-50); }
.history-item-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.history-item-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.history-icon-rascunho { background: var(--gray-100); color: var(--gray-500); }
.history-icon-enviado  { background: var(--blue-50); color: var(--blue-600); }
.history-icon-aprovado { background: #f0fdf4; color: var(--green-600); }
.history-item-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.history-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-item-date { font-size: 12px; color: var(--gray-400); }
.history-item-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.history-item-value { font-size: 15px; font-weight: 700; color: var(--gray-900); }
.history-item-actions { display: flex; gap: 6px; opacity: 0; transition: opacity 0.2s; }
.history-item:hover .history-item-actions { opacity: 1; }
.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--gray-400);
  text-align: center;
  gap: 12px;
}
.history-empty-icon { font-size: 36px; }
.history-empty p { font-size: 14px; }

/* Danger hover button */
.btn-danger-hover:hover { background: #fef2f2; color: var(--red-600); border-color: #fecaca; }

/* ============================================================
   CLIENT MODAL – Enhanced
   ============================================================ */
.modal-client { max-width: 560px; }
.modal-header-content { display: flex; align-items: center; gap: 14px; }
.modal-header-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--blue-50);
  color: var(--blue-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.modal-header-icon--edit { background: #faf5ff; color: #7c3aed; }
.modal-header-subtitle { font-size: 12.5px; color: var(--gray-400); margin-top: 2px; }

.client-modal-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--gray-50);
  border-radius: 10px;
  border: 1px dashed var(--gray-200);
  margin-bottom: 20px;
}
.client-modal-avatar {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue-500), var(--teal-500));
  color: white;
  font-weight: 800;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  letter-spacing: 1px;
}
.client-modal-avatar-hint { font-size: 12px; color: var(--gray-500); }

.modal-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.modal-section-title i { color: var(--gray-300); }

.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-300);
  font-size: 13px;
  pointer-events: none;
}
.form-input.has-icon { padding-left: 36px; }

.form-hint { font-size: 11.5px; color: var(--gray-400); margin-top: 4px; }

/* ============================================================
   ESTIMATE BUILDER – New Layout
   ============================================================ */

/* ── Top bar ── */
.eb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.eb-topbar-left { display: flex; align-items: center; gap: 14px; }
.eb-back-btn { color: var(--gray-500); }
.eb-title  { font-size: 22px; font-weight: 800; color: var(--gray-900); line-height: 1.2; }
.eb-subtitle { font-size: 13px; color: var(--gray-500); margin-top: 2px; }
.eb-save-btn { gap: 7px; }

/* ── Two-column layout ── */
.eb-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}
.eb-aside { display: flex; flex-direction: column; gap: 16px; }
.eb-main  { display: flex; flex-direction: column; gap: 16px; }

/* Info card */
.eb-info-card,
.eb-actions-card,
.eb-ai-card,
.eb-items-card { margin: 0; }

.eb-info-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gray-800);
}
.eb-info-header-icon { font-size: 14px; color: var(--blue-600); }
.eb-info-body { padding: 20px; }
.eb-info-body .form-group { margin-bottom: 14px; }
.eb-info-body .form-group:last-child { margin-bottom: 0; }

.eb-client-row { display: flex; gap: 6px; align-items: center; }
.eb-client-select { flex: 1; }
.eb-add-client-btn { flex-shrink: 0; }

.eb-actions-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.eb-action-btn { justify-content: center; width: 100%; }

/* ── Items card ── */
.eb-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap;
  gap: 10px;
}
.eb-items-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gray-800);
}
.eb-items-header-left > i { color: var(--blue-600); font-size: 14px; }
.eb-items-count {
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 10px;
}
.eb-items-header-right { display: flex; align-items: center; gap: 8px; }

/* ── Table ── */
.eb-table-wrap { overflow-x: auto; position: relative; }
.eb-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 580px;
}
.eb-table-hidden { display: none; }

.eb-table thead tr {
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
}
.eb-table th {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  white-space: nowrap;
}
/* Column widths */
.eb-col-drag  { width: 30px;  text-align: center; }
.eb-col-name  { min-width: 200px; }
.eb-col-unit  { width: 90px; }
.eb-col-qty   { width: 110px; }
.eb-col-price { width: 140px; }
.eb-col-sub   { width: 120px; text-align: right; }
.eb-col-del   { width: 44px;  text-align: center; }

.eb-item-row {
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.1s;
}
.eb-item-row:last-child { border-bottom: none; }
.eb-item-row:hover { background: #f8faff; }
.eb-item-row:hover .eb-drag-handle { opacity: 1; }
.eb-item-row:hover .eb-del-btn { opacity: 1; }

.eb-table td { padding: 8px 12px; vertical-align: middle; }

/* Drag handle */
.eb-drag-handle {
  color: var(--gray-300);
  font-size: 12px;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Inline inputs */
.eb-field-wrap { position: relative; }
.eb-input {
  width: 100%;
  height: 36px;
  border: 1.5px solid transparent;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--gray-800);
  background: transparent;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
}
.eb-input:hover { border-color: var(--gray-300); background: white; }
.eb-input:focus { border-color: var(--blue-400); background: white; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.eb-input-name { font-weight: 500; }
.eb-input-unit { font-size: 12.5px; color: var(--gray-600); }
.eb-input-number { text-align: right; }
.eb-input::placeholder { color: var(--gray-300); font-weight: 400; }

/* Price prefix */
.eb-price-wrap { display: flex; align-items: center; gap: 4px; }
.eb-price-prefix { font-size: 12px; color: var(--gray-400); flex-shrink: 0; }

/* Subtotal display */
.eb-subtotal {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-700);
  white-space: nowrap;
  display: block;
  text-align: right;
  padding-right: 4px;
}

/* Delete button */
.eb-del-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: var(--gray-400);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
  margin: 0 auto;
}
.eb-del-btn:hover { color: var(--red-500); background: #fef2f2; opacity: 1; }

/* Empty state */
.eb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 52px 24px 44px;
  text-align: center;
  gap: 10px;
}
.eb-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blue-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--blue-400);
  margin-bottom: 4px;
}
.eb-empty-title { font-size: 16px; font-weight: 700; color: var(--gray-700); }
.eb-empty-sub { font-size: 13px; color: var(--gray-400); line-height: 1.6; max-width: 340px; }

/* ── Total footer ── */
.eb-total-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
  border-radius: 0 0 var(--radius) var(--radius);
  flex-wrap: wrap;
  gap: 8px;
}
.eb-total-items { font-size: 12.5px; color: rgba(255,255,255,0.65); }
.eb-total-right { display: flex; align-items: center; gap: 14px; }
.eb-total-label { font-size: 13.5px; color: rgba(255,255,255,0.85); font-weight: 500; }
.eb-total-value { font-size: 26px; font-weight: 900; color: white; letter-spacing: -0.5px; }

/* ── Library Picker Modal ── */
.lp-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: 0 14px;
}
.lp-search-bar > i { color: var(--gray-400); font-size: 13px; flex-shrink: 0; }
.lp-search-bar .form-input {
  border: none;
  background: transparent;
  box-shadow: none;
  flex: 1;
  padding-left: 6px;
}
.lp-search-bar .form-input:focus { border: none; box-shadow: none; }
.lp-cat-sel {
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
  padding: 10px 8px;
  outline: none;
}

.lp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding: 2px 4px 4px;
}
.lp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s;
  background: white;
  position: relative;
}
.lp-item:hover { border-color: var(--blue-300); background: var(--blue-50); }
.lp-item-sel  { border-color: var(--blue-500); background: var(--blue-50); box-shadow: 0 0 0 2px rgba(59,130,246,0.2); }
.lp-item-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.lp-item-sel .lp-item-check { background: var(--blue-600); border-color: var(--blue-600); }
.lp-check-icon { font-size: 10px; color: transparent; }
.lp-item-sel .lp-check-icon { color: white; }
.lp-item-body { flex: 1; min-width: 0; }
.lp-item-name { font-size: 13px; font-weight: 600; color: var(--gray-800); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-item-meta { display: flex; align-items: center; gap: 8px; }
.lp-cat-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--blue-700);
  background: var(--blue-100);
  padding: 1px 7px;
  border-radius: 8px;
}
.lp-unit { font-size: 11px; color: var(--gray-400); }
.lp-item-price { font-size: 13px; font-weight: 700; color: var(--blue-600); white-space: nowrap; flex-shrink: 0; }
.lp-empty {
  grid-column: 1/-1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  gap: 10px;
  color: var(--gray-400);
}
.lp-empty i { font-size: 28px; }
.lp-empty p { font-size: 13px; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 24px;
  backdrop-filter: blur(2px);
  animation: overlayIn 0.15s ease;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}
.modal-lg { max-width: 680px; }
.modal-sm { max-width: 380px; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(-8px); } to { opacity: 1; transform: none; } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-100);
}
.modal-header h3 { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.modal-close { color: var(--gray-400); font-size: 16px; padding: 4px; }
.modal-close:hover { color: var(--gray-600); }
.modal-body { padding: 24px; }
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
}
.modal-info-text { font-size: 13.5px; color: var(--gray-600); margin-bottom: 14px; }

/* Item Modal Tabs */
.item-modal-tabs { display: flex; gap: 6px; margin-bottom: 20px; }
.item-tab {
  flex: 1;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  border: 1.5px solid var(--gray-200);
  background: white;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: all 0.15s;
}
.item-tab.active { background: var(--blue-600); color: white; border-color: var(--blue-600); }
.item-tab:hover:not(.active) { border-color: var(--gray-300); color: var(--gray-700); }

.item-subtotal-preview {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--blue-700);
  font-size: 14px;
  text-align: right;
}

/* Library grid */
.library-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}
.library-item {
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s;
  background: white;
}
.library-item:hover { border-color: var(--blue-400); background: var(--blue-50); }
.library-item.selected { border-color: var(--blue-500); background: var(--blue-50); }
.library-item-name { font-size: 13px; font-weight: 600; color: var(--gray-800); margin-bottom: 4px; }
.library-item-meta { font-size: 11.5px; color: var(--gray-500); display: flex; gap: 8px; }
.library-item-price { font-size: 13px; font-weight: 700; color: var(--blue-600); margin-top: 4px; }

/* Share link */
.share-link-box { display: flex; gap: 8px; }
.share-link-box .form-input { flex: 1; font-size: 12px; }
.copy-success { margin-top: 10px; color: var(--green-600); font-size: 13px; display: flex; align-items: center; gap: 6px; }

/* ============================================================
   CLIENTS MODULE – LIST VIEW (cl-*)
   ============================================================ */

/* Stats strip */
.cl-stats-strip {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px 24px;
  gap: 0;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.cl-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.cl-stat-sep {
  width: 1px;
  height: 36px;
  background: var(--gray-200);
  margin: 0 20px;
  flex-shrink: 0;
}
.cl-stat-icon {
  font-size: 22px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}
.cl-stat-icon--blue  { background: var(--blue-50);   color: var(--blue-600); }
.cl-stat-icon--green { background: #dcfce7;           color: var(--green-600); }
.cl-stat-icon--orange{ background: #fff7ed;           color: var(--orange-500); }
.cl-stat-value { font-size: 22px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.cl-stat-label { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* Toolbar */
.cl-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.cl-search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.cl-search-box > i {
  position: absolute;
  left: 12px;
  color: var(--gray-400);
  font-size: 13px;
  pointer-events: none;
}
.cl-search-box input {
  width: 100%;
  height: 40px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: 0 36px 0 36px;
  font-size: 13.5px;
  background: white;
  color: var(--gray-800);
  transition: border-color 0.15s;
  outline: none;
}
.cl-search-box input:focus { border-color: var(--blue-400); }
.cl-search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.cl-search-clear:hover { color: var(--gray-600); background: var(--gray-100); }
.cl-sort-select {
  height: 40px;
  min-width: 150px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  background: white;
  color: var(--gray-700);
  cursor: pointer;
  outline: none;
}
.cl-sort-select:focus { border-color: var(--blue-400); }

/* Result bar */
.cl-result-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.btn-link {
  background: none;
  border: none;
  color: var(--blue-600);
  font-size: 12.5px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.btn-link:hover { color: var(--blue-700); }

/* Table */
.cl-table-wrap {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cl-table {
  width: 100%;
  border-collapse: collapse;
}
.cl-table thead tr {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.cl-table th {
  padding: 11px 16px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  white-space: nowrap;
}
.cl-th-avatar { width: 48px; }
.cl-th-actions { width: 120px; text-align: right; }
.cl-table tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.12s;
}
.cl-table tbody tr:last-child { border-bottom: none; }
.cl-table tbody tr:hover { background: var(--gray-50); }
.cl-table td {
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--gray-700);
  vertical-align: middle;
}

/* Avatar cell */
.cl-avatar-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}
.cl-row-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.cl-row-name { font-weight: 600; color: var(--gray-900); }
.cl-row-email a { color: var(--blue-600); font-size: 13px; }
.cl-row-email a:hover { text-decoration: underline; }
.cl-row-null { color: var(--gray-300); font-style: italic; }

/* Actions cell */
.cl-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
.cl-table tbody tr:hover .cl-row-actions { opacity: 1; }

/* Empty state */
.cl-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px;
  gap: 12px;
  text-align: center;
}
.cl-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blue-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--blue-400);
  margin-bottom: 4px;
}
.cl-empty-title { font-size: 17px; font-weight: 700; color: var(--gray-800); }
.cl-empty-sub { font-size: 13.5px; color: var(--gray-500); }

/* ============================================================
   CLIENT DETAIL PAGE (cd-*)
   ============================================================ */

/* Topbar */
.cd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.cd-back-btn { gap: 8px; font-weight: 600; }
.cd-actions { display: flex; align-items: center; gap: 8px; }
.cd-delete-btn { color: var(--red-500) !important; }
.cd-delete-btn:hover { background: #fef2f2 !important; }

/* Hero card */
.cd-hero-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.cd-hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.cd-hero-body { flex: 1; min-width: 0; }
.cd-hero-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
  line-height: 1.2;
}
.cd-hero-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.cd-hero-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-600);
  background: var(--gray-100);
  border-radius: 20px;
  padding: 4px 12px;
}
.cd-hero-tag i { font-size: 11px; color: var(--gray-400); }
.cd-hero-tag a { color: var(--blue-600); }
.cd-hero-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.cd-hero-stat {
  text-align: center;
  min-width: 70px;
}
.cd-hero-stat-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--blue-600);
  line-height: 1;
}
.cd-hero-stat-lbl {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 3px;
}

/* Two-col layout */
.cd-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
}
.cd-left { display: flex; flex-direction: column; gap: 16px; }
.cd-right { display: flex; flex-direction: column; gap: 16px; }
.cd-card { margin-bottom: 0; }

/* Contact body */
.cd-contact-body { padding: 4px 0; }
.detail-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.detail-contact-item:last-child { border-bottom: none; }
.detail-contact-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.detail-contact-icon--phone { background: #dcfce7; color: var(--green-600); }
.detail-contact-icon--email { background: var(--blue-50); color: var(--blue-600); }
.detail-contact-icon--addr  { background: #fff7ed; color: var(--orange-500); }
.detail-contact-label { font-size: 11px; color: var(--gray-400); margin-bottom: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.detail-contact-value { font-size: 13.5px; color: var(--gray-800); font-weight: 500; }
.detail-contact-value a { color: var(--blue-600); }
.detail-empty-contact { font-size: 13px; color: var(--gray-400); line-height: 1.6; }

/* Notes */
.cd-notes-text { font-size: 13.5px; color: var(--gray-700); line-height: 1.7; white-space: pre-wrap; }

/* Filter pills */
.cd-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap;
}
.cd-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-500);
  border: 1.5px solid var(--gray-200);
  background: white;
  cursor: pointer;
  transition: all 0.15s;
}
.cd-pill:hover { border-color: var(--blue-300); color: var(--blue-600); }
.cd-pill.active { background: var(--blue-600); color: white; border-color: var(--blue-600); }
.cd-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  border-radius: 10px;
  background: rgba(255,255,255,0.25);
  font-size: 11px;
  padding: 0 5px;
}
.cd-pill:not(.active) .cd-pill-count { background: var(--gray-100); color: var(--gray-600); }

/* History list */
.no-padding { padding: 0 !important; }
.history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background 0.12s;
}
.history-item:last-child { border-bottom: none; }
.history-item:hover { background: var(--gray-50); }
.history-item-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.history-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.history-icon-rascunho { background: var(--gray-100); color: var(--gray-500); }
.history-icon-enviado  { background: var(--blue-50);  color: var(--blue-600); }
.history-icon-aprovado { background: #dcfce7;          color: var(--green-600); }
.history-item-info { flex: 1; min-width: 0; }
.history-item-name { font-size: 13.5px; font-weight: 600; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item-date { font-size: 11.5px; color: var(--gray-400); margin-top: 2px; }
.history-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.history-item-value { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.history-item-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.history-item:hover .history-item-actions { opacity: 1; }

/* History empty state */
.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  gap: 10px;
  text-align: center;
}
.history-empty-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--gray-400);
  margin-bottom: 4px;
}
.history-empty p { font-size: 13px; color: var(--gray-500); }

/* Client modal - avatar row */
.client-modal-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0 20px;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 20px;
}
.client-modal-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500), var(--teal-600));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}
.client-modal-avatar-hint { font-size: 12px; color: var(--gray-400); line-height: 1.5; }

/* Modal section title */
.modal-section-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.modal-section-title:first-child { margin-top: 0; }

/* Modal client size */
.modal-client { max-width: 560px; }

/* ============================================================
   PLANS & MONETIZATION
   ============================================================ */

/* ════════════════════════════════════════════════════
   PLANS PAGE  —  complete redesign
   ════════════════════════════════════════════════════ */

/* ── Status card ── */
.plan-status-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 60%, #4f46e5 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  margin-bottom: 28px;
  box-shadow: 0 8px 24px rgba(37,99,235,.3);
  flex-wrap: wrap;
}
.plan-status-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 180px;
}
.plan-status-icon {
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}
.plan-status-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  opacity: .75;
  margin-bottom: 2px;
}
.plan-status-name {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}
.plan-status-since {
  font-size: 11.5px;
  opacity: .65;
  margin-top: 3px;
}
.plan-status-meters {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.plan-meter {
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.plan-meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  opacity: .85;
}
.plan-meter-count { font-weight: 700; }
.plan-meter-count.meter-warn { color: #fbbf24; }
.plan-meter-count.meter-full { color: #f87171; }
.plan-meter-track {
  height: 6px;
  background: rgba(255,255,255,.2);
  border-radius: 3px;
  overflow: hidden;
}
.plan-meter-fill {
  height: 100%;
  background: #86efac;
  border-radius: 3px;
  transition: width .5s ease;
}
.plan-meter-fill.meter-warn { background: #fbbf24; }
.plan-meter-fill.meter-full { background: #f87171; }
.plan-unlimited-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 700;
}
.plan-status-manage-btn {
  color: rgba(255,255,255,.85) !important;
  border-color: rgba(255,255,255,.3) !important;
  background: rgba(255,255,255,.1) !important;
  white-space: nowrap;
  flex-shrink: 0;
}
.plan-status-manage-btn:hover {
  color: #fff !important;
  background: rgba(255,255,255,.2) !important;
}

/* ── Billing toggle ── */
.billing-toggle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
.billing-label { font-size: 14px; font-weight: 600; color: var(--gray-600); }
.billing-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}
.billing-switch input { opacity: 0; width: 0; height: 0; }
.billing-track {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: 13px;
  cursor: pointer;
  transition: background .2s;
}
.billing-track::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 3px; left: 3px;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.billing-switch input:checked + .billing-track { background: var(--blue-600); }
.billing-switch input:checked + .billing-track::before { transform: translateX(20px); }
.billing-discount {
  background: linear-gradient(135deg, #059669, #0d9488);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 11px;
  border-radius: 12px;
  letter-spacing: .3px;
}

/* ── Plans grid ── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
  align-items: start;
}

/* ── Plan card ── */
.plan-card {
  background: #fff;
  border: 2px solid var(--gray-200);
  border-radius: 16px;
  position: relative;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  overflow: hidden;
}
.plan-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
  transform: translateY(-3px);
}
.plan-card-inner { padding: 28px 24px; display: flex; flex-direction: column; gap: 0; }
.plan-card-pro { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.plan-card-pro:hover { box-shadow: 0 12px 32px rgba(37,99,235,.2), 0 0 0 3px rgba(59,130,246,.2); }
.plan-card-empresa-style { border-color: #a78bfa; }
.plan-card-empresa-style:hover { box-shadow: 0 12px 32px rgba(124,58,237,.15); }
.plan-card-active { border-color: #10b981 !important; box-shadow: 0 0 0 3px rgba(16,185,129,.15) !important; }
.plan-card-featured { transform: translateY(-6px); }
.plan-card-featured:hover { transform: translateY(-9px); }

/* Popular ribbon */
.plan-popular-ribbon {
  background: linear-gradient(90deg, var(--blue-600), #4f46e5);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  padding: 6px 0;
  letter-spacing: .4px;
}

/* Card top row */
.plan-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}
.plan-emoji { font-size: 32px; line-height: 1; flex-shrink: 0; }
.plan-card-title-wrap { flex: 1; }
.plan-card-name { font-size: 18px; font-weight: 900; color: var(--gray-900); margin: 0; }
.plan-card-tagline { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* Current plan badge */
.plan-current-badge {
  display: none;
  align-items: center;
  gap: 4px;
  background: #d1fae5;
  color: #065f46;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.plan-current-badge i { font-size: 10px; }

/* Price block */
.plan-price-block {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-100);
}
.plan-price-main {
  display: flex;
  align-items: flex-start;
  gap: 3px;
}
.plan-currency-sym {
  font-size: 17px;
  font-weight: 800;
  color: var(--gray-600);
  margin-top: 7px;
}
.plan-price-num {
  font-size: 48px;
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1;
}
.plan-price-sub {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 4px;
}
.plan-annual-note {
  font-size: 11.5px;
  color: var(--green-600);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.plan-annual-note i { font-size: 10px; }

/* Feature list */
.plan-feat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 24px;
  flex: 1;
}
.plan-feat-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.4;
}
.plan-feat-list li i {
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 2px;
  width: 14px;
  text-align: center;
}
.feat-yes i { color: #10b981; }
.feat-no { color: var(--gray-400); }
.feat-no i { color: var(--gray-300); }
.feat-highlight { color: var(--blue-700) !important; font-weight: 600; }
.feat-highlight i { color: var(--blue-500) !important; }
.feat-inherit i { color: #a78bfa !important; }

/* CTA buttons */
.plan-cta-btn {
  width: 100%;
  padding: 13px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  border: 2px solid var(--gray-200);
  background: var(--gray-50);
  color: var(--gray-500);
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.plan-cta-free   { cursor: not-allowed; opacity: .7; }
.plan-cta-current{ cursor: not-allowed; opacity: .7; background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
.plan-cta-pro    { background: var(--blue-600); color: #fff; border-color: var(--blue-600); box-shadow: 0 4px 14px rgba(37,99,235,.4); }
.plan-cta-pro:hover:not(:disabled) { background: var(--blue-700); box-shadow: 0 6px 20px rgba(37,99,235,.5); transform: translateY(-1px); }
.plan-cta-empresa{ background: #7c3aed; color: #fff; border-color: #7c3aed; box-shadow: 0 4px 14px rgba(124,58,237,.4); }
.plan-cta-empresa:hover:not(:disabled) { background: #6d28d9; box-shadow: 0 6px 20px rgba(124,58,237,.5); transform: translateY(-1px); }
.plan-cta-downgrade{ border-color: var(--gray-300); color: var(--gray-500); font-size: 12px; }
.plan-cta-downgrade:hover { background: var(--gray-100); }

/* ══════════════════════════════════════════════════════════════
   PLANOS — OFERTA ANUAL PROMOCIONAL
   ══════════════════════════════════════════════════════════════ */

/* ── Promo annual banner (replaces toggle row) ── */
.promo-annual-banner {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 32px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 45%, #065f46 100%);
  box-shadow: 0 12px 40px rgba(15,23,42,.35), 0 0 0 1px rgba(255,255,255,.06);
}
.promo-annual-banner-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(16,185,129,.18) 0%, transparent 55%),
    radial-gradient(circle at 10% 80%, rgba(37,99,235,.22) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.promo-annual-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 28px 32px;
  flex-wrap: wrap;
}
.promo-annual-left { flex: 1; min-width: 280px; }
.promo-annual-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  flex-shrink: 0;
}

/* Limited time badge */
.promo-annual-badge-limited {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239,68,68,.2);
  border: 1px solid rgba(239,68,68,.4);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: 12px;
  width: fit-content;
  animation: promo-pulse 2.5s ease-in-out infinite;
}
.promo-annual-badge-limited i { color: #f87171; }
@keyframes promo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.25); }
  50%       { box-shadow: 0 0 0 6px rgba(239,68,68,.0); }
}

/* Headline */
.promo-annual-headline {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -.3px;
}
.promo-highlight {
  background: linear-gradient(90deg, #34d399, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subline */
.promo-annual-sub {
  font-size: 13.5px;
  color: rgba(255,255,255,.65);
  margin: 0 0 16px;
  line-height: 1.55;
  max-width: 520px;
}

/* Savings pills row */
.promo-annual-savings-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.promo-saving-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16,185,129,.15);
  border: 1px solid rgba(16,185,129,.3);
  color: #6ee7b7;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
}
.promo-saving-pill i { color: #34d399; font-size: 11px; }
.promo-saving-pill strong { color: #a7f3d0; }

/* Right: switch + billing info */
.promo-annual-switch-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 12px 20px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.promo-annual-switch-label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
}
/* Custom big switch */
.promo-annual-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}
.promo-annual-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.promo-annual-track {
  display: block;
  width: 52px;
  height: 28px;
  background: rgba(255,255,255,.2);
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  transition: background .25s;
  border: 1px solid rgba(255,255,255,.2);
}
.promo-annual-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform .25s cubic-bezier(.4,0,.2,1), background .25s;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.promo-annual-switch input:checked ~ .promo-annual-track {
  background: linear-gradient(90deg, #059669, #10b981);
  border-color: transparent;
}
.promo-annual-switch input:checked ~ .promo-annual-track .promo-annual-thumb {
  transform: translateX(24px);
  background: #fff;
}
.promo-annual-chip {
  font-size: 11px;
  font-weight: 800;
  color: #6ee7b7;
  background: rgba(16,185,129,.2);
  border: 1px solid rgba(16,185,129,.35);
  padding: 3px 10px;
  border-radius: 20px;
  opacity: 0;
  transform: scale(.8);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.promo-annual-chip.visible {
  opacity: 1;
  transform: scale(1);
}

/* Billing cycle labels */
.promo-annual-billing-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.promo-billing-cycle {
  display: flex;
  align-items: center;
  gap: 8px;
}
.promo-cycle-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background .25s;
}
.promo-cycle-dot--active   { background: #34d399; box-shadow: 0 0 6px rgba(52,211,153,.6); }
.promo-cycle-dot--inactive { background: rgba(255,255,255,.25); }
.promo-cycle-lbl {
  font-size: 12px;
  font-weight: 600;
  transition: color .25s;
}
.promo-cycle-lbl--active   { color: #a7f3d0; }
.promo-cycle-lbl--inactive { color: rgba(255,255,255,.4); }

/* ── Plan price: original crossed ── */
.plan-price-original {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 2px;
}
.plan-currency-sym-sm {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-400);
}
.plan-price-crossed {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-400);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.plan-price-crossed-sub {
  font-size: 12px;
  color: var(--gray-400);
}

/* ── Plan promo first3 strip ── */
.plan-promo-first3 {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #6ee7b7;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  animation: promo-first3-in .35s ease;
}
@keyframes promo-first3-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.plan-promo-first3--purple {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-color: #c4b5fd;
}
.plan-promo-first3-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: #d1fae5;
  color: #059669;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.plan-promo-first3--purple .plan-promo-first3-icon {
  background: #ede9fe;
  color: #7c3aed;
}
.plan-promo-first3-text {
  font-size: 12.5px;
  color: #065f46;
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.plan-promo-first3--purple .plan-promo-first3-text { color: #4c1d95; }
.plan-promo-first3-chip {
  display: inline-flex;
  background: #059669;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: .3px;
}
.plan-promo-first3-chip--purple {
  background: #7c3aed;
}

/* ── Plan savings strip ── */
.plan-savings-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #6ee7b7;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  color: #065f46;
  margin-top: 8px;
  font-weight: 600;
  animation: promo-first3-in .35s ease;
}
.plan-savings-strip--purple {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-color: #c4b5fd;
  color: #4c1d95;
}
.plan-savings-strip i { color: #059669; font-size: 13px; }
.plan-savings-strip--purple i { color: #7c3aed; }
.plan-savings-strip strong { color: #065f46; }
.plan-savings-strip--purple strong { color: #4c1d95; }

/* ── Guarantee note ── */
.plan-guarantee-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--green-600);
  font-weight: 600;
  margin: 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  animation: promo-first3-in .35s ease;
}
.plan-guarantee-note i { font-size: 11px; }
.plan-guarantee-note--purple { color: #7c3aed; }

/* ── Promo seal (floating badge top-right of Pro card) ── */
.plan-promo-seal {
  position: absolute;
  top: -2px;
  right: 16px;
  z-index: 10;
  animation: seal-drop .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes seal-drop {
  from { opacity: 0; transform: translateY(-20px) rotate(-10deg) scale(.7); }
  to   { opacity: 1; transform: translateY(0)     rotate(0deg)   scale(1); }
}
.plan-promo-seal-inner {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow: 0 4px 16px rgba(239,68,68,.5), 0 0 0 3px rgba(239,68,68,.15);
  line-height: 1;
}
.plan-promo-seal-pct {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -1px;
}
.plan-promo-seal-off {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  opacity: .9;
}
.plan-promo-seal-sub {
  font-size: 8.5px;
  font-weight: 600;
  opacity: .8;
  letter-spacing: .2px;
}

/* ── Plan card featured (annual mode emphasizes more) ── */
.plan-card-annual-hero {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,.2), 0 16px 40px rgba(16,185,129,.15) !important;
  transform: translateY(-8px) !important;
}
.plan-card-annual-hero:hover {
  transform: translateY(-11px) !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,.3), 0 20px 48px rgba(16,185,129,.2) !important;
}

/* ── Popular ribbon variants ── */
.plan-popular-ribbon--best {
  background: linear-gradient(90deg, #059669, #10b981) !important;
}

/* ── Responsive adjustments ── */
@media (max-width: 900px) {
  .promo-annual-content { flex-direction: column; align-items: flex-start; gap: 20px; padding: 22px 20px; }
  .promo-annual-right { align-items: flex-start; width: 100%; }
  .promo-annual-switch-wrap { width: 100%; justify-content: space-between; box-sizing: border-box; }
  .promo-annual-headline { font-size: 20px; }
}
@media (max-width: 600px) {
  .plan-promo-seal { right: 10px; }
  .promo-annual-savings-row { flex-direction: column; }
}

/* ── Utility: hidden ── */
.plan-promo-first3.hidden,
.plan-price-original.hidden,
.plan-savings-strip.hidden,
.plan-guarantee-note.hidden,
.plan-promo-seal.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════════
   END OFERTA ANUAL
   ══════════════════════════════════════════════════════════════ */

/* ── Plan badge (sidebar / dropdown) ── */
.plan-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
  letter-spacing: .2px;
}
.plan-badge-free    { background: var(--gray-200); color: var(--gray-600); }
.plan-badge-pro     { background: #dbeafe; color: #1d4ed8; }
.plan-badge-empresa { background: #ede9fe; color: #7c3aed; }

/* ── Topbar usage indicator ── */
.topbar-usage-item { color: var(--gray-500); }
.topbar-usage-item.usage-warn   { color: #d97706 !important; }
.topbar-usage-item.usage-danger { color: var(--red-500) !important; }

/* ── Feature comparison table ── */
.feat-compare-wrap { margin-bottom: 40px; }
.feat-compare-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 18px;
}
.feat-compare-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--gray-200); }
.feat-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.feat-compare-table thead tr {
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
}
.feat-compare-table th {
  padding: 14px 18px;
  font-weight: 800;
  font-size: 13px;
  color: var(--gray-700);
  white-space: nowrap;
}
.feat-compare-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}
.fct-feature { font-weight: 600; }
.fct-pro { background: #eff6ff; }
.fct-pro-col { background: #eff6ff !important; }
.fct-icon { color: var(--blue-500); font-size: 12px; margin-right: 5px; }
.fct-yes { color: #10b981; font-size: 15px; }
.fct-no  { color: var(--gray-300); font-size: 15px; }
.fct-unlimited { color: var(--blue-700); font-weight: 700; }
.fct-limit  { font-weight: 700; color: var(--gray-700); }
.fct-text   { font-size: 12.5px; }
.fct-priority { color: #7c3aed; font-weight: 700; }
.fct-section-header td {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--gray-400);
  background: var(--gray-50) !important;
  padding: 10px 18px;
  border-bottom: 1px solid var(--gray-200);
}
.feat-compare-table tr:last-child td { border-bottom: none; }

/* ── FAQ ── */
.plans-faq { margin-bottom: 40px; }
.plans-faq-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 18px;
}
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 18px 20px;
}
.faq-q {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.faq-q i { color: var(--blue-500); flex-shrink: 0; margin-top: 1px; }
.faq-a { font-size: 13px; color: var(--gray-500); line-height: 1.6; }

/* ── Upgrade Modal ── */
.modal-upgrade { max-width: 580px; overflow: hidden; padding: 0; }

.upg-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 60%, #4f46e5 100%);
  color: #fff;
  padding: 30px 32px 24px;
  text-align: center;
}
.upg-badge-wrap { margin-bottom: 10px; }
.upg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,.15);
  border-radius: 16px;
  font-size: 26px;
}
.upg-title { font-size: 20px; font-weight: 900; color: #fff; margin-bottom: 6px; }
.upg-desc  { font-size: 13.5px; color: rgba(255,255,255,.8); line-height: 1.55; max-width: 360px; margin: 0 auto; }

.upg-meter {
  padding: 16px 28px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
}
.upg-meter-header {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 8px;
}
.upg-meter-label { font-weight: 600; color: var(--gray-600); }
.upg-meter-count { font-weight: 800; color: var(--red-500); }
.upg-meter-track { height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.upg-meter-fill  { height: 100%; background: var(--red-500); border-radius: 4px; transition: width .4s; }

.upg-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px 24px; }
.upg-plan-card {
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.upg-plan-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.1); }
.upg-plan-pro     { border-color: #93c5fd; background: #eff6ff; }
.upg-plan-empresa { border-color: #c4b5fd; background: #f5f3ff; }
.upg-plan-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.upg-plan-emoji { font-size: 22px; }
.upg-plan-info  { flex: 1; }
.upg-plan-name  { font-size: 14px; font-weight: 800; color: var(--gray-900); }
.upg-plan-price { font-size: 13px; font-weight: 700; color: var(--blue-700); }
.upg-plan-per   { font-size: 11px; font-weight: 400; color: var(--gray-500); }
.upg-plan-popular {
  background: var(--blue-600); color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 2px 8px; border-radius: 10px;
}
.upg-feat-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.upg-feat-list li { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--gray-700); }
.upg-feat-list li i { color: #10b981; font-size: 11px; }
.upg-feat-list li .fa-magic { color: var(--blue-500) !important; }
.upg-feat-list li .fa-chart-bar { color: #7c3aed !important; }
.upg-plan-cta {
  background: var(--blue-600);
  color: #fff;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.upg-plan-cta-emp { background: #7c3aed; }
.upg-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.upg-compare-link {
  font-size: 13px;
  color: var(--blue-600);
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  text-decoration: none;
}
.upg-compare-link:hover { color: var(--blue-800); }

/* Unlock strip — feature highlight */
.upg-unlock-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #ecfdf5, #d1fae5);
  border-top: 1px solid #a7f3d0;
  border-bottom: 1px solid #a7f3d0;
  padding: 10px 28px;
  font-size: 12.5px;
  font-weight: 700;
  color: #065f46;
}
.upg-unlock-strip i { color: #10b981; font-size: 13px; }

/* Savings note */
.upg-savings-note {
  text-align: center;
  font-size: 12px;
  color: var(--gray-500);
  padding: 0 24px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.upg-savings-note i { color: #f59e0b; }
.upg-savings-note strong { color: #b45309; }

/* Icon colors in feat list */
.upg-feat-list li .fa-file-pdf  { color: #ef4444 !important; }
.upg-feat-list li .fa-envelope  { color: var(--blue-500) !important; }
.upg-feat-list li .fa-link      { color: #8b5cf6 !important; }
.upg-feat-list li .fa-users     { color: var(--blue-500) !important; }
.upg-feat-list li .fa-headset   { color: #10b981 !important; }

/* ── Payment Modal ── */
.modal-payment { max-width: 480px; }
.payment-plan-summary {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 4px;
}
.pay-summary-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.pay-summary-emoji { font-size: 28px; }
.pay-summary-info  { flex: 1; }
.pay-summary-name  { font-size: 15px; font-weight: 800; color: var(--gray-900); }
.pay-summary-price { font-size: 13px; color: var(--blue-600); font-weight: 700; margin-top: 2px; }
.pay-summary-feats {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.pay-summary-feats span {
  background: #dbeafe;
  color: var(--blue-700);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}
.pay-summary-pro   .pay-summary-feats span { background: #dbeafe; color: #1d4ed8; }
.pay-summary-empresa .pay-summary-feats span { background: #ede9fe; color: #7c3aed; }

/* Promo tag inside payment summary */
.pay-summary-promo {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #6ee7b7;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #065f46;
  margin-top: 10px;
}
.pay-summary-promo i { color: #059669; }

.payment-demo-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: #92400e;
  margin-bottom: 16px;
}
.payment-demo-notice i { flex-shrink: 0; margin-top: 1px; color: #d97706; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .input-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 13px;
  pointer-events: none;
}
.form-input.has-icon { padding-left: 36px; }
.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 1.5px solid var(--gray-300);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-layout { max-width: 720px; }
.settings-card { width: 100%; }
.logo-upload-area { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--gray-100); }
.logo-preview-wrap { width: 80px; height: 80px; border-radius: 12px; overflow: hidden; border: 2px solid var(--gray-200); background: var(--gray-50); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-preview { width: 100%; height: 100%; object-fit: contain; }
.logo-placeholder { font-size: 32px; color: var(--gray-300); }
.logo-upload-info { display: flex; flex-direction: column; gap: 4px; }
.logo-label { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.logo-hint { font-size: 12px; color: var(--gray-400); }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--gray-900);
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: toastIn 0.25s ease;
  max-width: 360px;
}
.toast.toast-success { background: #166534; }
.toast.toast-error { background: #991b1b; }
.toast-content { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ════════════════════════════════════════════════════
   AI DESCRIPTION CARD  (eb-ai-*)
   ════════════════════════════════════════════════════ */

.eb-ai-card { margin: 0; overflow: hidden; }

/* ── Header ── */
.eb-ai-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: none !important;
  color: #fff !important;
  justify-content: space-between;
  padding: 13px 18px;
}
.eb-ai-header-left {
  display: flex;
  align-items: center;
  gap: 9px;
}
.eb-ai-icon-wrap {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.18);
  border-radius: 8px;
  font-size: 13px;
  flex-shrink: 0;
}

/* ── Plan badge ── */
.eb-ai-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .6px;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  white-space: nowrap;
}
.eb-ai-badge--active {
  background: rgba(255,255,255,.22);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
}
.eb-ai-badge--locked {
  background: #fde68a;
  color: #78350f;
  border: 1px solid #fbbf24;
}

/* ── Body ── */
.eb-ai-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Hint block (before generation) ── */
.eb-ai-hint-block {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  padding: 12px 14px;
}
.eb-ai-hint-icon {
  width: 32px;
  height: 32px;
  background: #dbeafe;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-600);
  font-size: 14px;
  flex-shrink: 0;
}
.eb-ai-hint-block p {
  font-size: 12.5px;
  color: var(--gray-600);
  line-height: 1.55;
  margin: 0;
}

/* ── Output wrapper ── */
.eb-ai-output-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: aiReveal .3s ease;
}
@keyframes aiReveal {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ── Label row (title + char count) ── */
.eb-ai-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.eb-ai-label-text {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gray-600);
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.eb-ai-label-text i { color: var(--blue-500); }
.eb-ai-char-count {
  font-size: 10.5px;
  color: var(--gray-400);
  font-variant-numeric: tabular-nums;
}

/* ── Editable textarea ── */
.eb-ai-textarea {
  font-size: 12.5px !important;
  line-height: 1.7  !important;
  color: var(--gray-700) !important;
  background: #f8faff  !important;
  border: 1.5px solid #bfdbfe !important;
  border-radius: 8px   !important;
  resize: vertical;
  min-height: 160px;
  transition: border-color .2s, box-shadow .2s !important;
}
.eb-ai-textarea:focus {
  border-color: var(--blue-500) !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15) !important;
  background: #fff !important;
}
/* Cursor blink during typewriter */
.eb-ai-typing { border-color: var(--blue-500) !important; }

/* ── Output action buttons ── */
.eb-ai-output-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.eb-ai-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  background: transparent;
  line-height: 1;
}
.eb-ai-copy-btn {
  color: var(--blue-600);
  border-color: #bfdbfe;
  background: #eff6ff;
}
.eb-ai-copy-btn:hover  { background: #dbeafe; border-color: var(--blue-400); }
.eb-ai-regen-btn {
  color: var(--gray-600);
  border-color: var(--gray-200);
  background: var(--gray-50);
}
.eb-ai-regen-btn:hover { background: var(--gray-100); border-color: var(--gray-300); }
.eb-ai-clear-btn {
  color: #dc2626;
  border-color: #fecaca;
  background: #fff5f5;
}
.eb-ai-clear-btn:hover { background: #fee2e2; border-color: #fca5a5; }

/* ── Main CTA button ── */
.btn-ai {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #6d28d9 100%);
  background-size: 200% 100%;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  padding: 12px 18px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  transition: box-shadow .25s, transform .1s, background-position .3s;
  box-shadow: 0 4px 16px rgba(37,99,235,.4);
  letter-spacing: .2px;
  position: relative;
  overflow: hidden;
}
.btn-ai::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .15s;
}
.btn-ai:hover {
  box-shadow: 0 8px 24px rgba(37,99,235,.5);
  transform: translateY(-2px);
  background-position: right center;
}
.btn-ai:hover::before { background: rgba(255,255,255,.06); }
.btn-ai:active  { transform: translateY(0); box-shadow: 0 3px 10px rgba(37,99,235,.35); }
.btn-ai:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
#eb-ai-btn-icon { font-size: 14px; flex-shrink: 0; }
#eb-ai-btn-text { flex: 1; text-align: center; }
.eb-ai-btn-loader { font-size: 14px; flex-shrink: 0; }

/* ── Tip text ── */
.eb-ai-tip {
  font-size: 11px;
  color: var(--gray-400);
  text-align: center;
  line-height: 1.45;
  margin: 0;
}

/* ============================================================
   SUBSCRIPTION INFO CARD (página de planos)
   ============================================================ */

.sub-info-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.sub-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
  gap: 12px;
  flex-wrap: wrap;
}
.sub-info-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gray-800);
}
.sub-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}
.sub-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sub-info-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sub-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  gap: 12px;
}
.sub-info-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
  font-weight: 500;
  white-space: nowrap;
}
.sub-info-label i { color: var(--gray-400); font-size: 12px; width: 14px; text-align: center; }
.sub-info-val {
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 7px;
}
.sub-expiry-warn {
  background: #fef3c7;
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}
.sub-expiry-ok {
  background: #f0fdf4;
  color: var(--green-600);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
}

.sub-info-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-100);
  background: #fafafa;
}
.sub-cancel-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--red-500);
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.sub-cancel-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

/* ============================================================
   PLAN LOCK — Visual indicators for feature restrictions
   ============================================================ */

/* Badge "PRO" / "EMPRESA" exibido sobre botões bloqueados */
.feat-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .4px;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-left: auto;
  flex-shrink: 0;
  pointer-events: none;
}
.feat-lock-badge i { font-size: 8px; }

/* Estado visual "bloqueado" aplicado ao botão pai */
.feat-locked {
  position: relative;
  opacity: .72;
  cursor: pointer !important; /* still clickable — will show upgrade modal */
}
.feat-locked::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px dashed rgba(245,158,11,.5);
  pointer-events: none;
}

/* Botão com estado de alerta de limite próximo */
.btn-near-limit {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 2px rgba(245,158,11,.2) !important;
}
.btn-near-limit:hover {
  background: #fef3c7 !important;
  color: #92400e !important;
}

/* Botão IA travado (plano free) */
.btn-ai--locked {
  background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%) !important;
  box-shadow: 0 4px 12px rgba(107,114,128,.3) !important;
  opacity: .85;
}
.btn-ai--locked::before { display: none; }
.btn-ai--locked:hover {
  transform: none !important;
  background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%) !important;
}

/* Pill PRO inside AI button (free plan) */
.eb-ai-pro-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .5px;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-left: auto;
}

/* Tip link color override */
.eb-ai-tip a { color: var(--blue-600); font-weight: 600; text-decoration: underline; }
.eb-ai-tip a:hover { color: var(--blue-800); }

/* Botão de ação com badge inline (PDF, Email) */
.eb-feat-btn {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 8px;
}
.eb-feat-btn .feat-lock-badge { margin-left: auto; }

/* ── Inline usage pill mostrado na sidebar ou outros lugares ── */
.usage-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
}
.usage-pill.danger {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

/* ── Bloqueio na listagem de orçamentos (botão inline da linha) ── */
.estimate-row-locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #fde68a;
  color: #78350f;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  text-transform: uppercase;
}

/* ── Toast de upgrade ── */
.toast-upgrade {
  background: linear-gradient(135deg, #1e40af, #6d28d9) !important;
  border-left: 4px solid #f59e0b !important;
}

/* ============================================================
   PROMO UPGRADE POPUP
   ============================================================ */

/* ── Overlay ── */
.promo-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: ppOverlayIn .3s ease;
}
@keyframes ppOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Main card ── */
.promo-popup {
  position: relative;
  display: grid;
  grid-template-columns: 300px 1fr;
  max-width: 820px;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08);
  animation: ppCardIn .38s cubic-bezier(.22,.9,.36,1) both;
}
@keyframes ppCardIn {
  from { opacity: 0; transform: translateY(28px) scale(.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* ── Close button ── */
.promo-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.8);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s, color .18s, transform .15s;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.15);
}
.promo-popup-close:hover {
  background: rgba(255,255,255,.22);
  color: #fff;
  transform: rotate(90deg);
}

/* ════════════════════════════════════════════════════════
   LEFT PANEL — gradient hero
   ════════════════════════════════════════════════════════ */
.promo-popup-left {
  position: relative;
  background: linear-gradient(155deg, #0f172a 0%, #1e3a8a 40%, #2563eb 75%, #4f46e5 100%);
  padding: 40px 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}

/* decorative glowing orbs */
.pp-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(48px);
  opacity: .45;
}
.pp-orb-1 {
  width: 180px; height: 180px;
  background: #6d28d9;
  top: -40px; right: -40px;
}
.pp-orb-2 {
  width: 140px; height: 140px;
  background: #0ea5e9;
  bottom: 40px; left: -30px;
}
.pp-orb-3 {
  width: 100px; height: 100px;
  background: #f59e0b;
  bottom: -20px; right: 30px;
  opacity: .25;
}

/* badge pill */
.pp-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  width: fit-content;
  position: relative;
  z-index: 1;
}
.pp-badge i { color: #fbbf24; font-size: 10px; }

/* headline */
.pp-headline {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  line-height: 1.18;
  position: relative;
  z-index: 1;
  margin: 0;
}
.pp-headline-brand {
  background: linear-gradient(90deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* sub */
.pp-sub {
  font-size: 13.5px;
  color: rgba(255,255,255,.72);
  line-height: 1.55;
  position: relative;
  z-index: 1;
  margin: 0;
}

/* price block */
.pp-price-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.pp-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
}
.pp-price-currency {
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  margin-bottom: 4px;
}
.pp-price-value {
  font-size: 52px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -2px;
}
.pp-price-period {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255,255,255,.6);
}
.pp-price-annual {
  font-size: 12px;
  color: rgba(255,255,255,.55);
}
.pp-price-annual strong { color: #86efac; }

/* dots */
.pp-dots {
  display: flex;
  gap: 6px;
  margin-top: auto;
  position: relative;
  z-index: 1;
}
.pp-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  transition: background .2s, transform .2s;
}
.pp-dot--active {
  background: #fff;
  transform: scale(1.4);
}

/* ════════════════════════════════════════════════════════
   RIGHT PANEL — white content
   ════════════════════════════════════════════════════════ */
.promo-popup-right {
  background: #fff;
  padding: 36px 32px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  max-height: 90vh;
}

/* right header */
.pp-right-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pp-right-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37,99,235,.35);
}
.pp-right-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
}
.pp-right-sub {
  font-size: 12.5px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* benefits list */
.pp-benefits {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pp-benefit {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  transition: background .18s, border-color .18s, transform .15s;
  cursor: default;
}
.pp-benefit:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  transform: translateX(3px);
}

/* benefit icon */
.pp-benefit-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pp-benefit-icon--blue   { background: #dbeafe; color: #2563eb; }
.pp-benefit-icon--teal   { background: #ccfbf1; color: #0d9488; }
.pp-benefit-icon--purple { background: #ede9fe; color: #7c3aed; }
.pp-benefit-icon--red    { background: #fee2e2; color: #dc2626; }
.pp-benefit-icon--amber  { background: #fef3c7; color: #d97706; }

.pp-benefit-body { flex: 1; min-width: 0; }
.pp-benefit-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}
.pp-benefit-desc {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
  line-height: 1.4;
}
.pp-benefit-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* trust strip */
.pp-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  padding: 10px 14px;
}
.pp-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray-600);
}
.pp-trust-item i { color: var(--gray-400); font-size: 11px; }
.pp-trust-sep { color: var(--gray-300); font-size: 12px; }

/* CTA buttons */
.pp-ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}
.pp-btn-primary {
  width: 100%;
  padding: 15px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #4f46e5 100%);
  background-size: 200% 100%;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .1px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 4px 20px rgba(37,99,235,.45);
  transition: box-shadow .25s, transform .15s, background-position .3s;
  position: relative;
  overflow: hidden;
}
.pp-btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.12), transparent);
  pointer-events: none;
}
.pp-btn-primary:hover {
  box-shadow: 0 8px 28px rgba(37,99,235,.55);
  transform: translateY(-2px);
  background-position: right center;
}
.pp-btn-primary:active { transform: translateY(0); }
.pp-btn-primary i { font-size: 13px; }

.pp-btn-ghost {
  width: 100%;
  padding: 12px 20px;
  border-radius: 12px;
  background: transparent;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--gray-200);
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
  text-align: center;
}
.pp-btn-ghost:hover {
  background: var(--gray-50);
  color: var(--gray-700);
  border-color: var(--gray-300);
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .promo-popup {
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 18px;
  }
  .promo-popup-left {
    padding: 30px 24px 26px;
    gap: 14px;
  }
  .pp-headline { font-size: 22px; }
  .pp-price-value { font-size: 38px; }
  .pp-orb-1 { width: 120px; height: 120px; }
  .pp-orb-2 { display: none; }
  .promo-popup-right {
    padding: 24px 20px 22px;
    max-height: none;
    gap: 16px;
  }
  .pp-benefit { padding: 10px 12px; }
  .pp-btn-primary { font-size: 14px; padding: 13px 16px; }
  .promo-popup-close { top: 10px; right: 10px; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .stats-grid    { grid-template-columns: repeat(2, 1fr); }
  .db-kpis       { grid-template-columns: repeat(2, 1fr); }
  .db-body       { grid-template-columns: 1fr; }
  .eb-layout     { grid-template-columns: 1fr; }
  .cd-layout     { grid-template-columns: 1fr; }
  .plans-grid    { grid-template-columns: 1fr; }
  .faq-grid      { grid-template-columns: 1fr; }
  .plan-card-featured { transform: none; }
  .plan-card-featured:hover { transform: translateY(-3px); }
}
@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .db-kpis       { grid-template-columns: repeat(2, 1fr); }
  .db-body       { grid-template-columns: 1fr; }
  .db-list-head  { display: none; }
  .db-row        { grid-template-columns: 1fr auto 90px; grid-template-rows: auto; gap: 8px 10px; }
  .db-row-value  { text-align: right; }
  .db-row-status { display: none; }
  .db-row-date   { display: none; }
  .db-row-action { display: flex; }
  .db-row-edit   { opacity: 1; transform: scale(1); }
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 20px 16px 40px; }
  .topbar { padding: 0 16px; }
  .cl-stats-strip { flex-wrap: wrap; gap: 12px; justify-content: center; }
  .cl-stat-sep { display: none; }
  .cd-hero-card { flex-direction: column; align-items: flex-start; }
  .cd-hero-stats { width: 100%; justify-content: space-around; }
  .history-item-actions { opacity: 1; }
  .upg-plans { grid-template-columns: 1fr; }
  .plan-status-card { flex-direction: column; align-items: flex-start; gap: 18px; }
  .plan-status-meters { width: 100%; }
  .plan-meter { flex: 1; min-width: 140px; }
}
@media (max-width: 600px) {
  .stats-grid  { grid-template-columns: 1fr; }
  .db-kpis     { grid-template-columns: 1fr 1fr; gap: 10px; }
  .db-kpi      { padding: 16px 14px; }
  .db-kpi-value { font-size: 22px; }
  .db-kpi-value--sm { font-size: 16px; }
  .db-kpi-icon { width: 40px; height: 40px; font-size: 17px; }
  .db-kpi-sub  { display: none; }
  .db-header   { margin-bottom: 18px; }
  .db-header-actions { width: 100%; }
  .db-sec-btn  { display: none; }
  .db-new-btn  { flex: 1; justify-content: center; }
  .db-title    { font-size: 18px; }
  .db-row      { grid-template-columns: 1fr auto; gap: 8px; }
  .db-row-action { display: none; }
  .form-row    { grid-template-columns: 1fr; }
  .btn-group   { flex-direction: column; align-items: stretch; }
  .auth-card   { padding: 28px 24px; }
  .library-grid { grid-template-columns: 1fr; }
  .cl-toolbar  { flex-direction: column; align-items: stretch; }
  .cd-topbar   { flex-direction: column; align-items: flex-start; }
  .cd-actions  { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .plans-grid  { grid-template-columns: 1fr; }
  .faq-grid    { grid-template-columns: 1fr; }
  .eb-topbar   { flex-direction: column; align-items: flex-start; }
  .eb-topbar .btn-group { width: 100%; }
  .eb-topbar .eb-save-btn { flex: 1; justify-content: center; }
  .lp-grid     { grid-template-columns: 1fr; }
  .plan-status-card { padding: 18px; }
  .upg-plans   { grid-template-columns: 1fr; }
  .db-actions-grid { grid-template-columns: repeat(4, 1fr); }
  .db-action-btn { padding: 12px 6px; }
  .db-action-label { font-size: 10.5px; }
}

/* ============================================================
   REFERRAL CODE – AUTH FORM
   ============================================================ */
.referral-code-group {
  margin-top: 4px;
  background: #faf5ff;
  border: 1.5px dashed #c4b5fd;
  border-radius: 11px;
  padding: 14px 16px 12px;
}
.referral-code-label {
  color: #6d28d9 !important;
  font-weight: 700 !important;
  display: flex;
  align-items: center;
  gap: 6px;
}
.referral-code-optional {
  font-size: 11px;
  font-weight: 500;
  color: #a78bfa;
  margin-left: 2px;
}
.referral-code-input-wrap {
  position: relative;
  margin-top: 8px;
}
.referral-code-input {
  font-family: 'Courier New', monospace !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  border-color: #c4b5fd !important;
  background: #fff !important;
}
.referral-code-input:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124,58,237,.12) !important;
}
.referral-code-status {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
}
.referral-code-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-size: 12.5px;
  color: #15803d;
  font-weight: 600;
}

/* ============================================================
   REFERRAL PAGE
   ============================================================ */

/* ── Hero ── */
.ref-hero {
  position: relative;
  background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 45%, #7c3aed 100%);
  border-radius: 20px;
  padding: 40px 36px 36px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(109,40,217,.35);
}
.ref-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.ref-hero-blob {
  position: absolute;
  border-radius: 50%;
  opacity: .15;
  filter: blur(40px);
}
.ref-hero-blob--1 {
  width: 340px; height: 340px;
  background: #a78bfa;
  top: -100px; right: -60px;
}
.ref-hero-blob--2 {
  width: 220px; height: 220px;
  background: #c4b5fd;
  bottom: -80px; left: 30px;
}
.ref-hero-content { position: relative; z-index: 1; }
.ref-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: #e9d5ff;
  margin-bottom: 16px;
  letter-spacing: .3px;
}
.ref-hero-title {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -.3px;
}
.ref-hero-title span {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ref-hero-sub {
  font-size: 14.5px;
  color: #ddd6fe;
  line-height: 1.6;
  margin: 0 0 28px;
}

/* ── Link Card ── */
.ref-link-card {
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 14px;
  padding: 16px 20px 14px;
  backdrop-filter: blur(8px);
  max-width: 560px;
  margin-bottom: 20px;
}
.ref-link-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #c4b5fd;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ref-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ref-link-input {
  flex: 1;
  background: rgba(255,255,255,.95);
  border: none;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #4c1d95;
  font-family: 'Courier New', monospace;
  letter-spacing: .5px;
  cursor: text;
  outline: none;
  min-width: 0;
}
.ref-link-copy-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  background: #fbbf24;
  color: #78350f;
  border: none;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(251,191,36,.4);
  flex-shrink: 0;
}
.ref-link-copy-btn:hover {
  background: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(251,191,36,.5);
}
.ref-link-copy-btn.copied {
  background: #bbf7d0;
  color: #15803d;
}
.ref-link-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.ref-link-code-label {
  font-size: 12px;
  color: #c4b5fd;
  font-weight: 600;
}
.ref-link-code {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 1.5px;
  background: rgba(255,255,255,.1);
  padding: 2px 10px;
  border-radius: 6px;
}

/* ── Share Buttons ── */
.ref-share-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ref-share-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.ref-share-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.ref-share-btn--whatsapp { background: #25d366; color: #fff; box-shadow: 0 2px 10px rgba(37,211,102,.35); }
.ref-share-btn--telegram  { background: #229ed9; color: #fff; box-shadow: 0 2px 10px rgba(34,158,217,.35); }
.ref-share-btn--email     { background: rgba(255,255,255,.15); color: #e9d5ff; border: 1.5px solid rgba(255,255,255,.2); }

/* ── Rewards Grid ── */
.ref-rewards {
  margin-bottom: 24px;
}
.ref-section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 16px;
}
.ref-rewards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ref-reward-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  padding: 24px 22px 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.ref-reward-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.1); }
.ref-reward-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: 16px 16px 0 0;
}
.ref-reward-card--step1::before { background: linear-gradient(90deg,#7c3aed,#a78bfa); }
.ref-reward-card--step2::before { background: linear-gradient(90deg,#2563eb,#60a5fa); }
.ref-reward-card--step3::before { background: linear-gradient(90deg,#d97706,#fbbf24); }
.ref-reward-step {
  position: absolute;
  top: 16px; right: 16px;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ref-reward-card--step1 .ref-reward-step { background: #ede9fe; color: #6d28d9; }
.ref-reward-card--step2 .ref-reward-step { background: #dbeafe; color: #1d4ed8; }
.ref-reward-card--step3 .ref-reward-step { background: #fef3c7; color: #92400e; }
.ref-reward-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}
.ref-reward-card--step1 .ref-reward-icon { background: #ede9fe; color: #7c3aed; }
.ref-reward-card--step2 .ref-reward-icon { background: #dbeafe; color: #2563eb; }
.ref-reward-card--step3 .ref-reward-icon { background: #fef3c7; color: #d97706; }
.ref-reward-days {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 4px;
  line-height: 1;
}
.ref-reward-card--step1 .ref-reward-days { color: #6d28d9; }
.ref-reward-card--step2 .ref-reward-days { color: #2563eb; }
.ref-reward-card--step3 .ref-reward-days { color: #d97706; }
.ref-reward-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 8px;
}
.ref-reward-desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.55;
}

/* ── Body Grid ── */
.ref-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

/* ── Panels ── */
.ref-panel {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ref-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--gray-100);
}
.ref-panel-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ref-panel-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: #ede9fe;
  color: #7c3aed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.ref-panel-icon--purple { background: #ede9fe; color: #7c3aed; }
.ref-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0;
}
.ref-panel-body { padding: 16px 20px; }
.ref-refresh-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--gray-50);
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.ref-refresh-btn:hover { background: var(--gray-100); transform: rotate(45deg); }

/* ── Stats ── */
.ref-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-50);
  gap: 10px;
}
.ref-stat-row:last-child { border-bottom: none; }
.ref-stat-row--divider { border-top: 1.5px solid var(--gray-100); margin-top: 4px; padding-top: 13px; }
.ref-stat-label { font-size: 13px; color: var(--gray-600); }
.ref-stat-val { font-size: 15px; font-weight: 800; color: var(--gray-900); }
.ref-stat-val--blue   { color: #2563eb; }
.ref-stat-val--green  { color: #16a34a; }
.ref-stat-val--purple { color: #7c3aed; }

/* ── Bonus Card ── */
.ref-bonus-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #faf5ff, #ede9fe);
  border: 1.5px solid #c4b5fd;
  border-radius: 14px;
  padding: 20px;
  margin-top: 14px;
}
.ref-bonus-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(124,58,237,.35);
}
.ref-bonus-body { flex: 1; }
.ref-bonus-title {
  font-size: 11px;
  font-weight: 700;
  color: #6d28d9;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.ref-bonus-val {
  font-size: 24px;
  font-weight: 900;
  color: #4c1d95;
  line-height: 1;
  margin-bottom: 4px;
}
.ref-bonus-desc {
  font-size: 12px;
  color: #7c3aed;
  line-height: 1.4;
}

/* ── Referral List ── */
.ref-list-body { padding: 8px 0; min-height: 120px; }
.ref-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gray-50);
  transition: background .12s;
}
.ref-list-item:last-child { border-bottom: none; }
.ref-list-item:hover { background: var(--gray-50); }
.ref-list-avatar {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ref-list-info { flex: 1; min-width: 0; }
.ref-list-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ref-list-date {
  font-size: 11.5px;
  color: var(--gray-400);
  margin-top: 2px;
}
.ref-list-status { flex-shrink: 0; }
.ref-list-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.ref-list-badge--registered    { background: #f1f5f9; color: #64748b; }
.ref-list-badge--first-estimate{ background: #dbeafe; color: #1d4ed8; }
.ref-list-badge--subscribed    { background: #dcfce7; color: #15803d; }
.ref-list-bonus {
  font-size: 11px;
  font-weight: 800;
  color: #7c3aed;
  background: #ede9fe;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  margin-left: 8px;
  flex-shrink: 0;
}

/* ── Empty ── */
.ref-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
}
.ref-empty-icon {
  width: 60px; height: 60px;
  border-radius: 18px;
  background: #faf5ff;
  color: #c4b5fd;
  font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.ref-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.ref-empty-desc {
  font-size: 13px;
  color: var(--gray-400);
  line-height: 1.5;
  max-width: 280px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .ref-body { grid-template-columns: 280px 1fr; }
  .ref-rewards-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 860px) {
  .ref-hero { padding: 28px 22px 24px; }
  .ref-hero-title { font-size: 26px; }
  .ref-body { grid-template-columns: 1fr; }
  .ref-rewards-grid { grid-template-columns: 1fr; gap: 12px; }
  .ref-stats-col { order: 2; }
  .ref-list-col  { order: 1; }
}
@media (max-width: 540px) {
  .ref-hero-title { font-size: 22px; }
  .ref-link-row { flex-direction: column; }
  .ref-link-copy-btn { width: 100%; justify-content: center; }
  .ref-share-row { flex-direction: column; }
  .ref-share-btn { justify-content: center; }
}

/* ============================================================
   AUTH ADMIN BUTTON
   ============================================================ */
.auth-admin-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--gray-400);
  font-size: 12px;
  font-weight: 500;
}
.auth-admin-divider::before,
.auth-admin-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}
.btn-admin-access {
  width: 100%;
  padding: 11px 20px;
  border-radius: 10px;
  background: #1e1b4b;
  color: #c7d2fe;
  border: 1.5px solid #312e81;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  transition: background .18s, transform .12s, box-shadow .18s;
  box-shadow: 0 2px 8px rgba(30,27,75,.25);
}
.btn-admin-access:hover {
  background: #312e81;
  color: #e0e7ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(30,27,75,.35);
}
.admin-login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
}
.admin-login-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e1b4b, #4338ca);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #c7d2fe;
  box-shadow: 0 4px 16px rgba(67,56,202,.4);
}
.btn-admin-submit {
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 100%);
  color: #fff;
  border: none;
  padding: 13px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform .12s, box-shadow .18s;
  box-shadow: 0 4px 16px rgba(67,56,202,.4);
}
.btn-admin-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(67,56,202,.5);
}

/* ============================================================
   ADMIN PANEL PAGE
   ============================================================ */
.admin-panel-page {
  padding: 0;
}

/* ── Header ── */
.adm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px 28px 20px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(30,27,75,.3);
}
.adm-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.adm-header-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #c7d2fe;
  flex-shrink: 0;
}
.adm-header-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 3px;
}
.adm-header-sub {
  font-size: 13px;
  color: #a5b4fc;
  margin: 0;
}
.adm-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.adm-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  border: 1.5px solid transparent;
}
.adm-btn--primary {
  background: rgba(255,255,255,.15);
  color: #e0e7ff;
  border-color: rgba(255,255,255,.25);
}
.adm-btn--primary:hover {
  background: rgba(255,255,255,.25);
  transform: translateY(-1px);
}
.adm-btn--ghost {
  background: rgba(255,255,255,.08);
  color: #c7d2fe;
  border-color: rgba(255,255,255,.15);
}
.adm-btn--ghost:hover {
  background: rgba(255,255,255,.15);
}
.adm-btn--danger {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}
.adm-btn--danger:hover { background: #fecaca; }

/* ── Sub Navigation ── */
.adm-subnav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.adm-subnav-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.adm-subnav-btn.active {
  background: #1e1b4b;
  color: #c7d2fe;
  box-shadow: 0 2px 8px rgba(30,27,75,.25);
}
.adm-subnav-btn:not(.active):hover {
  background: var(--gray-50);
  color: var(--gray-700);
}

/* ── Tabs ── */
.adm-tab { display: none; }
.adm-tab.active { display: block; }

/* ── KPI Cards ── */
.adm-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.adm-kpi {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 14px;
  padding: 18px 18px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
  position: relative;
  overflow: hidden;
}
.adm-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
}
.adm-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.adm-kpi--blue::before   { background: linear-gradient(90deg,#2563eb,#60a5fa); }
.adm-kpi--green::before  { background: linear-gradient(90deg,#16a34a,#4ade80); }
.adm-kpi--red::before    { background: linear-gradient(90deg,#dc2626,#f87171); }
.adm-kpi--amber::before  { background: linear-gradient(90deg,#d97706,#fbbf24); }
.adm-kpi--purple::before { background: linear-gradient(90deg,#7c3aed,#a78bfa); }
.adm-kpi--teal::before   { background: linear-gradient(90deg,#0d9488,#2dd4bf); }
.adm-kpi--indigo::before { background: linear-gradient(90deg,#4338ca,#818cf8); }
.adm-kpi--orange::before { background: linear-gradient(90deg,#ea580c,#fb923c); }
.adm-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.adm-kpi--blue   .adm-kpi-icon { background: #dbeafe; color: #2563eb; }
.adm-kpi--green  .adm-kpi-icon { background: #dcfce7; color: #16a34a; }
.adm-kpi--red    .adm-kpi-icon { background: #fee2e2; color: #dc2626; }
.adm-kpi--amber  .adm-kpi-icon { background: #fef3c7; color: #d97706; }
.adm-kpi--purple .adm-kpi-icon { background: #ede9fe; color: #7c3aed; }
.adm-kpi--teal   .adm-kpi-icon { background: #ccfbf1; color: #0d9488; }
.adm-kpi--indigo .adm-kpi-icon { background: #e0e7ff; color: #4338ca; }
.adm-kpi--orange .adm-kpi-icon { background: #ffedd5; color: #ea580c; }
.adm-kpi-body { flex: 1; min-width: 0; }
.adm-kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 4px;
}
.adm-kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ── Overview Body ── */
.adm-overview-body {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}

/* ── Panels ── */
.adm-panel {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.adm-panel--table { overflow: visible; }
.adm-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--gray-100);
}
.adm-panel-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.adm-panel-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.adm-panel-icon--blue   { background: #dbeafe; color: #2563eb; }
.adm-panel-icon--purple { background: #ede9fe; color: #7c3aed; }
.adm-panel-icon--amber  { background: #fef3c7; color: #d97706; }
.adm-panel-icon--teal   { background: #ccfbf1; color: #0d9488; }
.adm-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0;
}
.adm-panel-body { padding: 16px 20px; }

/* ── Stat Rows ── */
.adm-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-50);
  gap: 10px;
}
.adm-stat-row:last-child { border-bottom: none; }
.adm-stat-row--divider { border-top: 1.5px solid var(--gray-100); margin-top: 4px; padding-top: 13px; }
.adm-stat-label { font-size: 13px; color: var(--gray-600); }
.adm-stat-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
}
.adm-stat-val--blue   { color: #2563eb; }
.adm-stat-val--green  { color: #16a34a; }
.adm-stat-val--amber  { color: #d97706; }
.adm-stat-val--red    { color: #dc2626; }

/* ── Recent User Mini-Row ── */
.adm-recent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-50);
}
.adm-recent-row:last-child { border-bottom: none; }
.adm-recent-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.adm-recent-info { flex: 1; min-width: 0; }
.adm-recent-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-recent-email {
  font-size: 11px;
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-recent-date {
  font-size: 11px;
  color: var(--gray-400);
  flex-shrink: 0;
}

/* ── Toolbar ── */
.adm-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.adm-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.adm-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 13px;
  pointer-events: none;
}
.adm-search-input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1.5px solid var(--gray-200);
  border-radius: 9px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--gray-800);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.adm-search-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.adm-filter-group {
  display: flex;
  gap: 8px;
}
.adm-select {
  padding: 9px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  color: var(--gray-700);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s;
}
.adm-select:focus { outline: none; border-color: #6366f1; }

/* ── Users Table ── */
.adm-table-wrap { overflow-x: auto; }
.adm-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}
.adm-table thead tr {
  background: var(--gray-50);
}
.adm-table th {
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-500);
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.adm-table td {
  padding: 13px 16px;
  font-size: 13px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-50);
  vertical-align: middle;
}
.adm-table tbody tr:hover { background: var(--gray-50); }
.adm-table-loading {
  text-align: center;
  padding: 40px !important;
  color: var(--gray-400);
  font-size: 14px;
}
.adm-table-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}
.adm-table-count {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 600;
}

/* ── Table User Cell ── */
.adm-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.adm-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #1e1b4b, #4338ca);
  color: #c7d2fe;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.adm-user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.adm-user-company {
  font-size: 11.5px;
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* ── Badges ── */
.adm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.adm-badge--free     { background: #f1f5f9; color: #64748b; }
.adm-badge--pro      { background: #dbeafe; color: #1d4ed8; }
.adm-badge--empresa  { background: #ede9fe; color: #6d28d9; }
.adm-badge--admin    { background: #1e1b4b; color: #c7d2fe; }
.adm-badge--active     { background: #dcfce7; color: #15803d; }
.adm-badge--blocked    { background: #fee2e2; color: #b91c1c; }
.adm-badge--pending    { background: #fef3c7; color: #92400e; }
.adm-badge--pay-ok     { background: #dcfce7; color: #15803d; }
.adm-badge--pay-pend   { background: #fef9c3; color: #854d0e; }
.adm-badge--pay-cancel { background: #f1f5f9; color: #64748b; }

/* ── Linha bloqueada ── */
.adm-row--blocked td { opacity: .6; }

/* ── Table Actions (ícone pequeno) ── */
.adm-row-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}
.adm-row-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .15s, transform .1s;
  flex-shrink: 0;
}
.adm-row-btn--view   { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.adm-row-btn--block  { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.adm-row-btn--unblock{ background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.adm-row-btn--plan   { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.adm-row-btn:hover   { transform: scale(1.1); }

/* ── Botões de ação inline (com texto) na tabela ── */
.adm-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: background .15s, transform .1s, opacity .15s;
}
.adm-action-btn:hover { transform: scale(1.03); }
.adm-action-btn--pro {
  background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe;
}
.adm-action-btn--pro:hover { background: #dbeafe; }
.adm-action-btn--bloquear {
  background: #fff7ed; color: #c2410c; border-color: #fed7aa;
}
.adm-action-btn--bloquear:hover { background: #ffedd5; }
.adm-action-btn--liberar {
  background: #f0fdf4; color: #15803d; border-color: #bbf7d0;
}
.adm-action-btn--liberar:hover { background: #dcfce7; }
.adm-action-btn--disabled {
  background: #f1f5f9 !important; color: #94a3b8 !important;
  border-color: #e2e8f0 !important; cursor: default !important;
  transform: none !important; opacity: .8;
}

/* ── Botões de ação nos cards mobile ── */
.adm-card-action {
  flex: 1;
  padding: 9px 8px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform .1s, background .15s;
}
.adm-card-action:hover { transform: scale(1.02); }
.adm-card-action--pro {
  background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe;
}
.adm-card-action--bloquear {
  background: #fff7ed; color: #c2410c; border-color: #fed7aa;
}
.adm-card-action--liberar {
  background: #f0fdf4; color: #15803d; border-color: #bbf7d0;
}
.adm-card-action--disabled {
  background: #f1f5f9 !important; color: #94a3b8 !important;
  border-color: #e2e8f0 !important; cursor: default !important;
  transform: none !important;
}

/* Card bloqueado */
.adm2-user-card--blocked { border-color: #fee2e2; background: #fffafa; }

/* ── Empty State ── */
.adm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  color: var(--gray-400);
  font-size: 14px;
  text-align: center;
}

/* ── User Detail Modal ── */
.adm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 20px;
  animation: admOverlayIn .2s ease;
}
@keyframes admOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.adm-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  animation: admModalIn .25s cubic-bezier(.22,.9,.36,1);
}
.adm-modal--wide { max-width: 680px; }
@keyframes admModalIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.adm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray-100);
  gap: 12px;
}
.adm-modal-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.adm-modal-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e1b4b, #4338ca);
  color: #c7d2fe;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.adm-modal-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 2px;
}
.adm-modal-sub {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0;
}
.adm-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gray-100);
  color: var(--gray-500);
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
}
.adm-modal-close:hover { background: var(--gray-200); }
.adm-modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.adm-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--gray-100);
}
/* override adm-btn inside modals (white bg) */
.adm-modal-footer .adm-btn--ghost {
  background: var(--gray-100);
  color: var(--gray-600);
  border-color: var(--gray-200);
}
.adm-modal-footer .adm-btn--ghost:hover { background: var(--gray-200); }
.adm-modal-footer .adm-btn--primary {
  background: #1e1b4b;
  color: #e0e7ff;
  border-color: #312e81;
}
.adm-modal-footer .adm-btn--primary:hover { background: #312e81; }

/* ── Detail Grid ── */
.admd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
.admd-info-block {}
.admd-info-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.admd-info-val {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-800);
  word-break: break-all;
}
.admd-section {}
.admd-section-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin: 0 0 12px;
}
.admd-plan-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.admd-plan-box { flex: 1; min-width: 80px; }
.admd-metrics-row {
  display: flex;
  gap: 20px;
}
.admd-metric {
  flex: 1;
  background: var(--gray-50);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  border: 1px solid var(--gray-100);
}
.admd-metric-val {
  font-size: 28px;
  font-weight: 800;
  color: #312e81;
  line-height: 1;
  margin-bottom: 6px;
}
.admd-metric-label {
  font-size: 11.5px;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.admd-obs-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  color: var(--gray-800);
  resize: vertical;
  transition: border-color .15s;
  box-sizing: border-box;
}
.admd-obs-textarea:focus { outline: none; border-color: #6366f1; }
.admd-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.admd-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .1s, box-shadow .15s;
}
.admd-action-btn:hover { transform: translateY(-1px); }
.admd-action-btn--green  { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.admd-action-btn--blue   { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.admd-action-btn--amber  { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.admd-action-btn--purple { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.admd-action-btn--red    { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }

/* ── Change Plan Modal ── */
.admd-modal-desc { font-size: 13.5px; color: var(--gray-600); margin: 0 0 16px; }
.adm-plan-options { display: flex; flex-direction: column; gap: 10px; }
.adm-plan-option { display: block; cursor: pointer; }
.adm-plan-option input[type="radio"] { display: none; }
.adm-plan-option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 11px;
  transition: border-color .15s, background .15s;
}
.adm-plan-option input:checked + .adm-plan-option-card {
  border-color: #4338ca;
  background: #ede9fe;
}
.adm-plan-option-card:hover { border-color: #818cf8; background: #f5f3ff; }
.adm-plan-option-emoji { font-size: 22px; flex-shrink: 0; }
.adm-plan-option-name { font-size: 14px; font-weight: 700; color: var(--gray-900); }
.adm-plan-option-desc { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* ── Referrals Tab ── */
.adm-referral-row {
  display: grid;
  grid-template-columns: 1fr 1fr 100px 100px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-50);
  font-size: 13px;
}
.adm-referral-row:last-child { border-bottom: none; }
.adm-referral-head {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-400);
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--gray-200);
}

/* ── Sidebar Referral Link ── */
.nav-item--referral {
  position: relative;
  background: linear-gradient(135deg, #faf5ff, #ede9fe);
  border: 1px solid #ddd6fe;
  border-radius: 9px;
  margin: 4px 0;
}
.nav-item--referral .nav-icon { color: #7c3aed !important; }
.nav-item--referral .nav-label { color: #6d28d9 !important; font-weight: 700 !important; }
.nav-item--referral:hover { background: #ede9fe; }
.nav-referral-badge {
  font-size: 9px;
  font-weight: 900;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .3px;
  margin-left: auto;
}

/* ── Sidebar Admin Link ── */
.nav-item--admin {
  background: linear-gradient(135deg, #1e1b4b11, #4338ca11);
  border: 1px solid #c7d2fe44;
  border-radius: 9px;
  margin: 4px 0;
}
.nav-item--admin .nav-icon { color: #818cf8 !important; }
.nav-item--admin .nav-label { color: #6366f1 !important; font-weight: 700 !important; }
.nav-item--admin:hover { background: #e0e7ff; }

/* ── Responsive Admin ── */
@media (max-width: 1100px) {
  .adm-kpis { grid-template-columns: repeat(4, 1fr); }
  .adm-overview-body { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .adm-kpis { grid-template-columns: repeat(2, 1fr); }
  .adm-overview-body { grid-template-columns: 1fr; }
  .adm-header { padding: 18px 18px 16px; }
  .adm-header-title { font-size: 17px; }
  .admd-grid { grid-template-columns: 1fr 1fr; }
  .admd-actions-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .adm-kpis { grid-template-columns: 1fr 1fr; }
  .admd-grid { grid-template-columns: 1fr; }
  .adm-filter-group { flex-direction: column; }
  .adm-modal { border-radius: 16px 16px 0 0; max-height: 95vh; }
  .admd-metrics-row { flex-direction: column; }
}

/* ============================================================
   INSTALL APP BUTTON (topbar)
   ============================================================ */
.install-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s, box-shadow .18s, filter .15s;
  box-shadow: 0 2px 10px rgba(37,99,235,.3);
  white-space: nowrap;
  flex-shrink: 0;
}
.install-app-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,99,235,.4);
  filter: brightness(1.07);
}
.install-app-btn i { font-size: 14px; }
/* Hide label on very small screens, keep icon */
@media (max-width: 600px) {
  .install-app-btn-label { display: none; }
  .install-app-btn { padding: 8px 11px; }
}

/* ============================================================
   INSTALL APP POPUP
   ============================================================ */
.install-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .52);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1400;
  padding: 20px;
  animation: installOverlayIn .2s ease;
}
@keyframes installOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes installOverlayOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.install-popup {
  background: #fff;
  border-radius: 22px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .28), 0 0 0 1px rgba(0,0,0,.04);
  overflow: hidden;
  animation: installPopupIn .28s cubic-bezier(.22, .9, .36, 1);
  position: relative;
}
@keyframes installPopupIn {
  from { opacity: 0; transform: translateY(22px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* ── Close Button ── */
.install-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-400);
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  z-index: 1;
}
.install-popup-close:hover {
  background: var(--gray-200);
  color: var(--gray-700);
}

/* ── Header ── */
.install-popup-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 28px 20px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border-bottom: 1px solid #e0f2fe;
}
.install-popup-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(37,99,235,.3);
  overflow: hidden;
  padding: 10px;
}
.install-popup-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(10);
}
.install-popup-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 4px;
  line-height: 1.3;
  letter-spacing: -.2px;
}
.install-popup-desc {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.5;
}

/* ── Device Tabs ── */
.install-tabs {
  display: flex;
  gap: 0;
  padding: 16px 28px 0;
  border-bottom: 2px solid var(--gray-100);
}
.install-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gray-400);
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.install-tab i { font-size: 15px; }
.install-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}
#tab-iphone.active { color: #1c1c1e; border-bottom-color: #1c1c1e; }
.install-tab:not(.active):hover { color: var(--gray-600); }

/* ── Steps ── */
.install-steps {
  padding: 20px 28px 4px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.install-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--gray-50);
}
.install-step:last-of-type { border-bottom: none; }
.install-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
}
/* iPhone tab step counter */
#steps-iphone .install-step-num {
  background: linear-gradient(135deg, #1c1c1e, #3a3a3c);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.install-step-body {
  flex: 1;
  min-width: 0;
}
.install-step-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 2px;
}
.install-step-desc {
  font-size: 12.5px;
  color: var(--gray-500);
  line-height: 1.45;
}
.install-step-desc strong { color: var(--gray-700); }
.install-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.install-step-icon--android { background: #e8f5e9; color: #2e7d32; }
.install-step-icon--iphone  { background: #f5f5f7; color: #1c1c1e; }

/* ── Tip Banner ── */
.install-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 16px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
}
.install-tip i { font-size: 16px; flex-shrink: 0; }
.install-tip--android {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}
.install-tip--iphone {
  background: #f5f5f7;
  color: #1c1c1e;
  border: 1px solid #e0e0e0;
}

/* ── Footer ── */
.install-popup-footer {
  padding: 8px 28px 24px;
}
.install-popup-ok {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: transform .12s, box-shadow .18s, filter .15s;
  box-shadow: 0 4px 18px rgba(37,99,235,.35);
  letter-spacing: .1px;
}
.install-popup-ok:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(37,99,235,.45);
  filter: brightness(1.06);
}

/* ── Mobile: sheet style ── */
@media (max-width: 480px) {
  .install-popup-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .install-popup {
    border-radius: 22px 22px 0 0;
    max-width: 100%;
  }
}

/* ============================================================
   ADMIN PANEL V2 — adm2-* styles
   ============================================================ */

/* ── Page wrapper ── */
.admin-panel-page {
  background: #f8fafc;
  min-height: 100vh;
  padding: 0 0 48px;
}

/* ── Header ── */
.adm2-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px 18px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  color: #fff;
  flex-wrap: wrap;
}
.adm2-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.adm2-header-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  backdrop-filter: blur(4px);
  flex-shrink: 0;
}
.adm2-header-title {
  font-size: 20px;
  font-weight: 900;
  margin: 0;
  letter-spacing: -.3px;
}
.adm2-header-title span { color: #a5b4fc; }
.adm2-header-sub {
  font-size: 12.5px;
  color: rgba(255,255,255,.65);
  margin: 2px 0 0;
}
.adm2-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.adm2-last-update {
  font-size: 11.5px;
  color: rgba(255,255,255,.55);
}
.adm2-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background .15s;
}
.adm2-icon-btn:hover { background: rgba(255,255,255,.25); }
.adm2-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.adm2-back-btn:hover { background: rgba(255,255,255,.28); }

/* ── Sub-Nav ── */
.adm2-nav {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 28px;
  background: #fff;
  border-bottom: 2px solid #e2e8f0;
  overflow-x: auto;
  scrollbar-width: none;
}
.adm2-nav::-webkit-scrollbar { display: none; }
.adm2-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.adm2-nav-btn.active {
  color: #4338ca;
  border-bottom-color: #4338ca;
}
.adm2-nav-btn:hover:not(.active) { color: #334155; }
.adm2-nav-count {
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  background: #e0e7ff;
  color: #4338ca;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Tabs ── */
.adm-tab { display: none; padding: 24px 28px 0; }
.adm-tab.active { display: block; }

/* ── KPI Grid ── */
.adm2-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.adm2-kpi {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  border: 1px solid #f1f5f9;
  transition: transform .15s, box-shadow .15s;
  cursor: default;
}
.adm2-kpi[onclick] { cursor: pointer; }
.adm2-kpi:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.adm2-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.adm2-kpi--blue   .adm2-kpi-icon { background: #dbeafe; color: #2563eb; }
.adm2-kpi--green  .adm2-kpi-icon { background: #dcfce7; color: #16a34a; }
.adm2-kpi--red    .adm2-kpi-icon { background: #fee2e2; color: #dc2626; }
.adm2-kpi--orange .adm2-kpi-icon { background: #ffedd5; color: #ea580c; }
.adm2-kpi--amber  .adm2-kpi-icon { background: #fef3c7; color: #d97706; }
.adm2-kpi--purple .adm2-kpi-icon { background: #ede9fe; color: #7c3aed; }
.adm2-kpi--teal   .adm2-kpi-icon { background: #ccfbf1; color: #0f766e; }
.adm2-kpi--indigo .adm2-kpi-icon { background: #e0e7ff; color: #4338ca; }
.adm2-kpi-content { flex: 1; min-width: 0; }
.adm2-kpi-val {
  font-size: 26px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
  letter-spacing: -.5px;
}
.adm2-kpi-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin: 4px 0 2px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.adm2-kpi-sub {
  font-size: 11.5px;
  color: #94a3b8;
}
.adm2-kpi-arrow { color: #cbd5e1; font-size: 12px; }

/* ── MRR Banner ── */
.adm2-mrr-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 100%);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.adm2-mrr-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.adm2-mrr-val {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -1px;
}
.adm2-mrr-sub {
  font-size: 12.5px;
  color: rgba(255,255,255,.55);
  margin-top: 6px;
}
.adm2-mrr-cycle {
  display: flex;
  align-items: center;
  gap: 16px;
}
.adm2-mrr-cycle-item {
  text-align: center;
}
.adm2-mrr-cycle-val {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: #a5b4fc;
  line-height: 1;
}
.adm2-mrr-cycle-label {
  font-size: 11px;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.adm2-mrr-cycle-div {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.2);
}

/* ── KPI card estado ativo (selecionado via filtro) ── */
.adm2-kpi--clickable {
  cursor: pointer;
}
.adm2-kpi--clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.adm2-kpi--active {
  outline: 3px solid #6366f1;
  outline-offset: 2px;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(99,102,241,.2);
}
.adm2-kpi--active .adm2-kpi-arrow { color: #6366f1; }
/* MRR banner ativo */
.adm2-mrr-banner--active {
  outline: 3px solid #a5b4fc;
  outline-offset: 2px;
}

/* ── Banner de filtro ativo ── */
.adm2-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 16px;
  margin: 0 0 14px;
  font-size: 13.5px;
  color: #1d4ed8;
  flex-wrap: wrap;
}
.adm2-filter-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.adm2-filter-banner-left i {
  font-size: 14px;
  color: #2563eb;
}
.adm2-filter-banner-left strong {
  color: #1e40af;
  font-weight: 700;
}
.adm2-filter-banner-clear {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: #2563eb;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.adm2-filter-banner-clear:hover {
  background: #dbeafe;
}

/* ── Overview Grid ── */
.adm2-overview-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

/* ── Stats Row ── */
.adm2-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.adm2-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: 1px solid #f1f5f9;
}
.adm2-stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.adm2-stat-card-icon--blue   { background: #dbeafe; color: #2563eb; }
.adm2-stat-card-icon--teal   { background: #ccfbf1; color: #0f766e; }
.adm2-stat-card-icon--green  { background: #dcfce7; color: #16a34a; }
.adm2-stat-card-icon--purple { background: #ede9fe; color: #7c3aed; }
.adm2-stat-card-icon--amber  { background: #fef3c7; color: #d97706; }
.adm2-stat-card-val {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}
.adm2-stat-card-label {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
  margin-top: 3px;
}

/* ── Panels ── */
.adm2-panel {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: 1px solid #f1f5f9;
  overflow: hidden;
}
.adm2-panel--table { overflow: visible; }
.adm2-panel--chart {}
.adm2-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #f1f5f9;
  gap: 10px;
  flex-wrap: wrap;
}
.adm2-panel-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.adm2-panel-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.adm2-panel-icon--blue   { background: #dbeafe; color: #2563eb; }
.adm2-panel-icon--purple { background: #ede9fe; color: #7c3aed; }
.adm2-panel-icon--amber  { background: #fef3c7; color: #d97706; }
.adm2-panel-icon--teal   { background: #ccfbf1; color: #0f766e; }
.adm2-panel-icon--red    { background: #fee2e2; color: #dc2626; }
.adm2-panel-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}
.adm2-panel-sub {
  font-size: 11.5px;
  color: #94a3b8;
}
.adm2-panel-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: #4338ca;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .15s;
}
.adm2-panel-link:hover { background: #ede9fe; }

/* ── Chart wrap ── */
.adm2-chart-wrap {
  padding: 16px 20px;
  position: relative;
}
.adm2-donut-wrap {
  padding: 12px 20px;
  display: flex;
  justify-content: center;
}
.adm2-legend {
  padding: 8px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.adm2-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #475569;
}
.adm2-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.adm2-legend-pct {
  margin-left: auto;
  font-weight: 700;
  color: #0f172a;
}

/* ── Recent Users List ── */
.adm2-recent-list {
  padding: 8px 0;
}
.adm-recent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 20px;
  border-bottom: 1px solid #f8fafc;
  transition: background .12s;
}
.adm-recent-row:hover { background: #fafbfd; }
.adm-recent-row:last-child { border-bottom: none; }
.adm-recent-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #4338ca, #818cf8);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.adm-recent-info { flex: 1; min-width: 0; }
.adm-recent-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-recent-email {
  font-size: 11.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-recent-date {
  font-size: 11.5px;
  color: #94a3b8;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════
   PAINEL DE FILTROS AVANÇADO (admf-*)
══════════════════════════════════════════════════════════════ */
.admf-panel {
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 14px;
  padding: 16px 18px 14px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Linha de busca ── */
.admf-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admf-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.admf-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}
.admf-search-input {
  width: 100%;
  padding: 10px 36px 10px 38px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  color: #1e293b;
  background: #f8fafc;
  box-sizing: border-box;
  transition: border-color .15s, background .15s;
}
.admf-search-input:focus {
  outline: none;
  border-color: #818cf8;
  background: #fff;
}
.admf-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  border: none;
  font-size: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.admf-search-clear:hover { background: #cbd5e1; }
.admf-clear-all {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 1.5px solid #fca5a5;
  border-radius: 9px;
  background: #fff5f5;
  color: #dc2626;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.admf-clear-all:hover { background: #fee2e2; }

/* ── Chips de filtro rápido ── */
.admf-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admf-chips-label {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.admf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.admf-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  transition: all .15s;
  white-space: nowrap;
}
.admf-chip:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #1e293b;
}
.admf-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 800;
}

/* Chip "Todos" */
.admf-chip--selected,
.admf-chip--active.admf-chip--selected {
  background: #4338ca !important;
  border-color: #4338ca !important;
  color: #fff !important;
}
.admf-chip--selected .admf-chip-count {
  background: rgba(255,255,255,.25) !important;
  color: #fff !important;
}

/* Chip PRO / pagos */
.admf-chip--paid  { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.admf-chip--paid:hover { background: #fef3c7; }
.admf-chip--paid.admf-chip--selected { background: #d97706 !important; border-color: #d97706 !important; color: #fff !important; }

.admf-chip--pro   { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.admf-chip--pro:hover { background: #dbeafe; }
.admf-chip--pro.admf-chip--selected { background: #2563eb !important; border-color: #2563eb !important; color: #fff !important; }

.admf-chip--empresa { border-color: #ddd6fe; background: #f5f3ff; color: #6d28d9; }
.admf-chip--empresa:hover { background: #ede9fe; }
.admf-chip--empresa.admf-chip--selected { background: #7c3aed !important; border-color: #7c3aed !important; color: #fff !important; }

.admf-chip--free  { border-color: #e2e8f0; background: #f8fafc; color: #475569; }
.admf-chip--free.admf-chip--selected { background: #475569 !important; border-color: #475569 !important; color: #fff !important; }

.admf-chip--active-s { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.admf-chip--active-s:hover { background: #dcfce7; }
.admf-chip--active-s.admf-chip--selected { background: #16a34a !important; border-color: #16a34a !important; color: #fff !important; }

.admf-chip--blocked { border-color: #fca5a5; background: #fff5f5; color: #dc2626; }
.admf-chip--blocked:hover { background: #fee2e2; }
.admf-chip--blocked.admf-chip--selected { background: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; }

.admf-chip--pending { border-color: #fde68a; background: #fefce8; color: #92400e; }
.admf-chip--pending:hover { background: #fef9c3; }
.admf-chip--pending.admf-chip--selected { background: #b45309 !important; border-color: #b45309 !important; color: #fff !important; }

.admf-chip--email-pend { border-color: #c7d2fe; background: #eef2ff; color: #3730a3; }
.admf-chip--email-pend:hover { background: #e0e7ff; }
.admf-chip--email-pend.admf-chip--selected { background: #4338ca !important; border-color: #4338ca !important; color: #fff !important; }

/* ── Selects avançados ── */
.admf-advanced {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admf-select {
  padding: 8px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  font-family: inherit;
  font-size: 12.5px;
  color: #334155;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color .15s;
}
.admf-select:focus { outline: none; border-color: #818cf8; background: #fff; }

/* ── Barra de resultado ── */
.admf-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  gap: 8px;
}
.admf-result-label {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 600;
}
.admf-result-count {
  font-size: 12px;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
}

/* ── Empty state dos filtros ── */
.admf-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: #94a3b8;
  text-align: center;
}
.admf-empty i { font-size: 32px; opacity: .4; }
.admf-empty p { font-size: 14px; color: #64748b; margin: 0; }
.admf-empty button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  border: 1.5px solid #e2e8f0; background: #f8fafc;
  color: #475569; font-family: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer; transition: background .15s;
}
.admf-empty button:hover { background: #f1f5f9; }

/* ════════════════════════════════════════════════════════════
   DESTAQUE PARA USUÁRIOS PAGOS (tabela + cards)
════════════════════════════════════════════════════════════ */

/* Linha de usuário pago na tabela */
.adm-row--paid {
  background: linear-gradient(90deg, #fffbeb 0%, #fff 60%);
  border-left: 3px solid #f59e0b !important;
}
.adm-row--paid td:first-child { padding-left: 13px; }

/* Estrela dourada ao lado do nome */
.adm-paid-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  background: #fef3c7;
  border-radius: 4px;
  margin-left: 5px;
  font-size: 9px;
  color: #d97706;
  vertical-align: middle;
}

/* Avatar com gradiente dourado para pagos */
.adm-user-avatar--paid {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

/* Sub-texto do email na célula de usuário */
.adm-user-email-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 1px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Célula de uso */
.adm-uso-cell {
  display: flex;
  gap: 10px;
  font-size: 11.5px;
  color: #64748b;
}
.adm-uso-cell i { color: #cbd5e1; margin-right: 2px; }

/* Célula de data */
.adm-date-cell {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

/* ── Card de usuário pago (mobile) ── */
.adm2-user-card--paid {
  border-color: #fde68a !important;
  background: linear-gradient(160deg, #fffbeb 0%, #fff 55%) !important;
  box-shadow: 0 2px 8px rgba(245,158,11,.12) !important;
}
.adm2-card-paid-banner {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: #92400e;
  background: linear-gradient(90deg, #fef3c7, #fde68a);
  border-radius: 8px;
  padding: 4px 10px;
  margin-bottom: 10px;
}
.adm2-user-card-av--paid {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

/* Linha de badges no card */
.adm2-card-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 8px 0;
}

/* ══════════════════════════════════
   NOVOS BADGES (email + ciclo)
══════════════════════════════════ */
.adm-badge--email-ok {
  background: #d1fae5;
  color: #065f46;
}
.adm-badge--email-pend {
  background: #fef3c7;
  color: #92400e;
}
.adm-badge--cycle-annual {
  background: #dbeafe;
  color: #1e40af;
}
.adm-badge--cycle-courtesy {
  background: #f0fdf4;
  color: #166534;
  border: 1px dashed #86efac;
}

/* ══════════════════════════════════
   MODAL ATIVAR PRO (com ciclo)
══════════════════════════════════ */
.adm-pro-modal-section {
  margin-bottom: 16px;
}
.adm-pro-modal-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.adm-pro-modal-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.adm-pro-plan-opt { cursor: pointer; }
.adm-pro-plan-opt input[type="radio"] { display: none; }
.adm-pro-plan-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  transition: border-color .15s, background .15s;
}
.adm-pro-plan-opt input:checked + .adm-pro-plan-card {
  border-color: #f59e0b;
  background: #fffbeb;
}
.adm-pro-plan-icon { font-size: 20px; }
.adm-pro-plan-name { font-size: 13px; font-weight: 700; color: #1e293b; }
.adm-pro-plan-desc { font-size: 11px; color: #64748b; }

/* Botões de ciclo */
.adm-pro-cycle-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.adm-pro-cycle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  flex: 1;
  justify-content: center;
}
.adm-pro-cycle-btn:hover { border-color: #94a3b8; background: #f1f5f9; }
.adm-pro-cycle-btn--selected {
  border-color: #3b82f6 !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}
.adm-pro-cycle-btn--courtesy.adm-pro-cycle-btn--selected {
  border-color: #059669 !important;
  background: #ecfdf5 !important;
  color: #065f46 !important;
}
.adm-pro-amount-hint {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  font-weight: 600;
}
.adm2-modal-save-btn--pro {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}
.adm2-modal-save-btn--pro:hover {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
}

/* ══════════════════════════════════
   SEÇÃO DE PENDENTES
══════════════════════════════════ */
.adm2-panel--pending {
  border-left: 4px solid #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #fff 40%);
}
.adm2-pending-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: #f59e0b;
  color: #fff;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 800;
  margin-left: 8px;
}
.adm2-pending-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}
.adm2-pending-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1.5px solid #fde68a;
  border-radius: 12px;
  flex-wrap: wrap;
}
.adm2-pending-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 200px;
}
.adm2-pending-item-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.adm2-pending-item-avatar--blocked {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}
.adm2-pending-item-details { flex: 1; }
.adm2-pending-item-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.adm2-pending-item-email {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 1px;
}
.adm2-pending-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.adm2-pending-item-cycle,
.adm2-pending-item-val,
.adm2-pending-item-date {
  font-size: 11px;
  color: #94a3b8;
}
.adm2-pending-item-val { font-weight: 700; color: #059669; }

.adm2-pending-item-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.adm2-pending-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
.adm2-pending-btn:hover { opacity: .85; transform: translateY(-1px); }
.adm2-pending-btn--confirm { background: #dcfce7; color: #15803d; }
.adm2-pending-btn--cancel  { background: #fee2e2; color: #dc2626; }
.adm2-pending-btn--block   { background: #fef3c7; color: #92400e; }
.adm2-pending-btn--unblock { background: #dcfce7; color: #15803d; }
.adm2-pending-btn--view    { background: #eff6ff; color: #1d4ed8; padding: 7px 10px; }
.adm2-empty-state {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  color: #64748b;
  font-size: 13px;
}
.adm2-empty-state i { color: #86efac; }

/* ══════════════════════════════════
   BANNER DE INCONSISTÊNCIAS
══════════════════════════════════ */
.adm2-inconsistency-banner {
  background: linear-gradient(135deg, #fef3c7, #fefce8);
  border: 1.5px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}
.adm2-inconsistency-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #92400e;
}
.adm2-inconsistency-header i { color: #f59e0b; font-size: 15px; }
.adm2-inconsistency-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: #f59e0b;
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
}
.adm2-inconsistency-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 18px;
  color: #92400e;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  opacity: .6;
}
.adm2-inconsistency-dismiss:hover { opacity: 1; }
.adm2-inconsistency-list {
  padding: 0 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.adm2-inconsistency-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,.7);
  border-radius: 8px;
  font-size: 12.5px;
  color: #78350f;
  flex-wrap: wrap;
}
.adm2-inconsistency-item i { color: #f59e0b; flex-shrink: 0; }
.adm2-inconsistency-item--blocked_active i { color: #ef4444; }
.adm2-inconsistency-item--unconfirmed_email i { color: #6366f1; }
.adm2-inconsistency-fix-btn {
  margin-left: auto;
  padding: 4px 10px;
  background: #fff;
  border: 1.5px solid #f59e0b;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  cursor: pointer;
  transition: background .15s;
}
.adm2-inconsistency-fix-btn:hover { background: #fef3c7; }

/* ── Toolbar legado (mantida para compatibilidade) ── */
.adm2-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.adm2-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.adm2-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}
.adm2-search-input {
  width: 100%;
  padding: 10px 36px 10px 36px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  color: #1e293b;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s;
}
.adm2-search-input:focus { outline: none; border-color: #818cf8; }
.adm2-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  border: none;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.adm2-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.adm2-select {
  padding: 9px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  color: #334155;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s;
}
.adm2-select:focus { outline: none; border-color: #818cf8; }

/* ── User Cards (mobile) ── */
.adm2-user-cards { display: none; gap: 12px; flex-direction: column; margin-bottom: 16px; }
.adm2-user-card {
  background: #fff;
  border-radius: 13px;
  padding: 16px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.adm2-user-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.adm2-user-card-av {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #4338ca, #818cf8);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.adm2-user-card-info { flex: 1; min-width: 0; }
.adm2-user-card-name { font-size: 14px; font-weight: 800; color: #1e293b; }
.adm2-user-card-company { font-size: 12px; color: #64748b; }
.adm2-user-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.adm2-user-card-email { font-size: 12px; color: #64748b; }
.adm2-user-card-stats {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 12px;
}
.adm2-user-card-stat {
  text-align: center;
}
.adm2-user-card-stat-val { font-size: 16px; font-weight: 900; color: #1e293b; }
.adm2-user-card-stat-label { font-size: 10.5px; color: #94a3b8; font-weight: 600; text-transform: uppercase; }
.adm2-user-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.adm2-user-card-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform .1s;
}
.adm2-user-card-btn:hover { transform: scale(1.03); }
.adm2-user-card-btn--view   { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.adm2-user-card-btn--block  { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.adm2-user-card-btn--unblock{ background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.adm2-user-card-btn--plan   { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }

/* ── Table ── */
.adm2-table-wrap {
  overflow-x: auto;
}
.adm2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.adm2-table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
  white-space: nowrap;
}
.adm2-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.adm2-table tbody tr:hover { background: #fafbfd; }
.adm2-table tbody tr:last-child td { border-bottom: none; }
.adm2-th-sortable { cursor: pointer; user-select: none; }
.adm2-th-sortable:hover { color: #334155; background: #f1f5f9; }
.adm2-sort-icon { font-size: 9px; margin-left: 4px; opacity: .5; }
.adm2-sort-icon.active { opacity: 1; color: #4338ca; }
.adm-user-cell { display: flex; align-items: center; gap: 10px; }
.adm-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #4338ca, #818cf8);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.adm-user-name { font-size: 13px; font-weight: 700; color: #1e293b; }
.adm-user-company { font-size: 11.5px; color: #64748b; }
.adm2-table-loading {
  text-align: center;
  padding: 32px;
  color: #94a3b8;
  font-size: 14px;
}
.adm2-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 8px;
}
.adm2-table-count { font-size: 13px; color: #64748b; font-weight: 600; }

/* ── Pagination ── */
.adm2-pagination {
  display: flex;
  gap: 4px;
}
.adm2-page-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s, border-color .12s;
}
.adm2-page-btn:hover { background: #f1f5f9; }
.adm2-page-btn.active { background: #4338ca; color: #fff; border-color: #4338ca; }
.adm2-page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Loading spinner ── */
.adm2-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px;
  color: #94a3b8;
  font-size: 14px;
}

/* ── Referrals ── */
.adm2-ref-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.adm2-ref-kpi {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.adm2-ref-kpi-val {
  font-size: 28px;
  font-weight: 900;
  color: #1e293b;
  line-height: 1;
}
.adm2-ref-kpi-val--blue   { color: #2563eb; }
.adm2-ref-kpi-val--teal   { color: #0f766e; }
.adm2-ref-kpi-val--green  { color: #16a34a; }
.adm2-ref-kpi-val--purple { color: #7c3aed; }
.adm2-ref-kpi-label {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.adm2-ref-list { padding: 0; }
.adm2-ref-row {
  display: grid;
  grid-template-columns: 1.5fr 1.5fr 80px 90px 80px;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #f8fafc;
  font-size: 13px;
}
.adm2-ref-row:last-child { border-bottom: none; }
.adm2-ref-row:hover { background: #fafbfd; }
.adm2-ref-head {
  background: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1.5px solid #e2e8f0;
}
.adm2-ref-head:hover { background: #f8fafc; }
.adm2-ref-bonus-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.adm2-ref-bonus-tag--granted { background: #dcfce7; color: #15803d; }
.adm2-ref-bonus-tag--pending { background: #fef3c7; color: #92400e; }
.adm2-ref-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.adm2-ref-status-tag--registered  { background: #dbeafe; color: #1d4ed8; }
.adm2-ref-status-tag--estimated   { background: #ccfbf1; color: #0f766e; }
.adm2-ref-status-tag--subscribed  { background: #dcfce7; color: #15803d; }
.adm2-ref-status-tag--incomplete  { background: #f1f5f9; color: #64748b; }

/* ── Subscriptions tab list ── */
.adm2-subs-list { padding: 0; }
.adm2-sub-filters { display: flex; gap: 8px; }
.adm2-sub-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #f8fafc;
  font-size: 13px;
}
.adm2-sub-row:last-child { border-bottom: none; }
.adm2-sub-row:hover { background: #fafbfd; }
.adm2-sub-head {
  background: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1.5px solid #e2e8f0;
}
.adm2-sub-head:hover { background: #f8fafc; }

/* ── USER DETAIL MODAL (adm2) ── */
.adm2-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1300;
  padding: 20px;
  animation: adm2OverlayIn .2s ease;
}
@keyframes adm2OverlayIn { from { opacity:0; } to { opacity:1; } }
.adm2-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 28px 70px rgba(0,0,0,.35);
  animation: adm2ModalIn .25s cubic-bezier(.22,.9,.36,1);
  display: flex;
  flex-direction: column;
}
.adm2-modal--sm { max-width: 440px; }
@keyframes adm2ModalIn {
  from { opacity:0; transform: translateY(18px) scale(.97); }
  to   { opacity:1; transform: none; }
}

/* Modal hero header */
.adm2-modal-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 100%);
  padding: 28px 24px 22px;
  border-radius: 20px 20px 0 0;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.adm2-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.adm2-modal-close:hover { background: rgba(255,255,255,.3); }
.adm2-modal-hero-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.3);
}
.adm2-modal-hero-info { flex: 1; }
.adm2-modal-hero-name {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 2px;
  letter-spacing: -.3px;
}
.adm2-modal-hero-company {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  margin: 0 0 10px;
}
.adm2-modal-hero-badges { display: flex; gap: 8px; flex-wrap: wrap; }

/* Modal body */
.adm2-modal-body {
  padding: 0;
  flex: 1;
  overflow-y: auto;
}

/* Metrics bar */
.adm2-modal-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #f1f5f9;
}
.adm2-modal-metric {
  padding: 16px;
  text-align: center;
  border-right: 1px solid #f1f5f9;
}
.adm2-modal-metric:last-child { border-right: none; }
.adm2-modal-metric-val {
  font-size: 24px;
  font-weight: 900;
  color: #1e293b;
  line-height: 1;
}
.adm2-modal-metric-val--green  { color: #16a34a; }
.adm2-modal-metric-val--purple { color: #7c3aed; }
.adm2-modal-metric-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Sections */
.adm2-modal-section {
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
}
.adm2-modal-section:last-child { border-bottom: none; }
.adm2-modal-section-title {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin: 0 0 14px;
}

/* Info grid */
.adm2-modal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.adm2-modal-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.adm2-modal-info-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.adm2-modal-info-val {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  word-break: break-all;
}

/* Quick actions big grid */
.adm2-modal-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.adm2-action-big {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-align: center;
  transition: transform .12s, box-shadow .15s;
  line-height: 1.3;
}
.adm2-action-big i { font-size: 18px; }
.adm2-action-big:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.adm2-action-big--green  { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.adm2-action-big--blue   { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.adm2-action-big--indigo { background: #e0e7ff; color: #4338ca; border-color: #c7d2fe; }
.adm2-action-big--amber  { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.adm2-action-big--teal   { background: #ccfbf1; color: #0f766e; border-color: #99f6e4; }
.adm2-action-big--red    { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.adm2-action-big--gray   { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.adm2-action-big--purple { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }

/* Timeline */
.adm2-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.adm2-timeline-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}
.adm2-timeline-item:not(:last-child):before {
  content: '';
  position: absolute;
  left: 15px;
  top: 34px;
  bottom: 0;
  width: 1px;
  background: #e2e8f0;
}
.adm2-timeline-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.adm2-timeline-dot--blue   { background: #dbeafe; color: #2563eb; }
.adm2-timeline-dot--green  { background: #dcfce7; color: #16a34a; }
.adm2-timeline-dot--amber  { background: #fef3c7; color: #d97706; }
.adm2-timeline-dot--red    { background: #fee2e2; color: #dc2626; }
.adm2-timeline-dot--purple { background: #ede9fe; color: #7c3aed; }
.adm2-timeline-dot--gray   { background: #f1f5f9; color: #64748b; }
.adm2-timeline-body { flex: 1; }
.adm2-timeline-event {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 2px;
}
.adm2-timeline-date {
  font-size: 11.5px;
  color: #94a3b8;
}
.adm2-timeline-empty {
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
  padding: 16px 0;
}

/* Textarea obs */
.adm2-obs-textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  color: #1e293b;
  resize: vertical;
  transition: border-color .15s;
  box-sizing: border-box;
  background: #f8fafc;
}
.adm2-obs-textarea:focus { outline: none; border-color: #818cf8; background: #fff; }
.adm2-obs-saved {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #16a34a;
  margin-top: 6px;
}

/* Modal footer & header-simple */
.adm2-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfd;
  border-radius: 0 0 20px 20px;
}
.adm2-modal-cancel-btn {
  padding: 10px 18px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: background .12s;
}
.adm2-modal-cancel-btn:hover { background: #e2e8f0; }
.adm2-modal-save-btn {
  padding: 10px 20px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  background: #4338ca;
  color: #fff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background .12s, transform .1s;
}
.adm2-modal-save-btn:hover { background: #3730a3; transform: translateY(-1px); }
.adm2-modal-header-simple {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid #f1f5f9;
}
.adm2-modal-header-simple h3 {
  font-size: 16px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.adm2-modal-close-simple {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
}
.adm2-modal-close-simple:hover { background: #e2e8f0; }
.adm2-modal-desc {
  font-size: 13.5px;
  color: #64748b;
  margin: 0 0 16px;
}

/* Plan options in change-plan modal */
.adm2-plan-options { display: flex; flex-direction: column; gap: 10px; }
.adm2-plan-option { display: block; cursor: pointer; }
.adm2-plan-option input[type="radio"] { display: none; }
.adm2-plan-option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 11px;
  transition: border-color .15s, background .15s;
}
.adm2-plan-option input:checked + .adm2-plan-option-card {
  border-color: #4338ca;
  background: #ede9fe;
}
.adm2-plan-option-card:hover { border-color: #818cf8; background: #f5f3ff; }
.adm2-plan-option-name { font-size: 14px; font-weight: 700; color: #1e293b; }
.adm2-plan-option-desc { font-size: 12px; color: #64748b; margin-top: 2px; }

/* Bonus quick buttons */
.adm2-bonus-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.adm2-bonus-quick-btn {
  padding: 7px 13px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  background: #e0e7ff;
  color: #4338ca;
  border: 1.5px solid #c7d2fe;
  cursor: pointer;
  transition: background .12s;
}
.adm2-bonus-quick-btn:hover { background: #c7d2fe; }

/* ── Responsive Admin V2 ── */
@media (max-width: 1200px) {
  .adm2-kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .adm2-overview-grid { grid-template-columns: 1fr 1fr; }
  .adm2-stats-row { grid-template-columns: repeat(3, 1fr); }
  .adm2-ref-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .adm-tab { padding: 16px 16px 0; }
  .adm2-header { padding: 16px 18px 14px; }
  .adm2-nav { padding: 0 16px; }
  .adm2-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .adm2-overview-grid { grid-template-columns: 1fr; }
  .adm2-stats-row { grid-template-columns: repeat(2, 1fr); }
  .adm2-ref-kpis { grid-template-columns: repeat(2, 1fr); }
  .adm2-modal-actions { grid-template-columns: repeat(2, 1fr); }
  .adm2-user-cards { display: flex; }
  .adm2-panel--table { display: none; }
}
@media (max-width: 600px) {
  .adm2-header { padding: 14px 14px 12px; flex-direction: column; align-items: flex-start; }
  .adm2-header-right { flex-wrap: wrap; gap: 6px; }
  .adm2-header-title { font-size: 17px; }
  .adm2-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .adm2-kpi { padding: 14px; gap: 10px; }
  .adm2-kpi-val { font-size: 22px; }
  .adm2-mrr-banner { flex-direction: column; gap: 16px; }
  .adm2-stats-row { grid-template-columns: 1fr 1fr; }
  .adm2-ref-kpis { grid-template-columns: 1fr 1fr; }
  .adm2-toolbar { flex-direction: column; align-items: stretch; }
  .adm2-filters { flex-direction: column; }
  .adm-tab { padding: 12px 12px 0; }
  .adm2-modal { border-radius: 20px 20px 0 0; max-height: 95vh; }
  .adm2-modal-overlay { align-items: flex-end; padding: 0; }
  .adm2-modal-metrics { grid-template-columns: repeat(2, 1fr); }
  .adm2-modal-info-grid { grid-template-columns: 1fr; }
  .adm2-modal-actions { grid-template-columns: repeat(2, 1fr); }
  .adm2-ref-row { grid-template-columns: 1fr 1fr; font-size: 12px; }
  .adm2-sub-row { grid-template-columns: 1fr 1fr; font-size: 12px; }
}
