/* ================================================================
   APP.CSS — AppFunnelsPro Premium Minimalist Theme
   Light/Dark mode • White gradients • Elegant & Compact
   ================================================================ */

/* ----------------------------------------------------------------
   1. CSS VARIABLES — LIGHT MODE (Default)
   ---------------------------------------------------------------- */
:root {
  /* Backgrounds */
  --bg:      #f5f7fa;
  --bg-grad: linear-gradient(160deg, #f8f9fc 0%, #eef1f8 50%, #f5f7fa 100%);
  --s1:      #ffffff;
  --s2:      #f0f2f7;
  --s3:      #e8ebf2;
  --s4:      #dce0ea;

  /* Borders */
  --b1: rgba(0,0,0,.06);
  --b2: rgba(0,0,0,.10);
  --b3: rgba(255,107,53,.22);

  /* Accent */
  --or:     #ff6b35;
  --or-l:   #fff4ef;
  --or-rgb: 255,107,53;
  --gold:   #f59e0b;
  --grn:    #10b981;
  --grn-l:  #ecfdf5;
  --red:    #ef4444;
  --red-l:  #fef2f2;
  --blue:   #3b82f6;
  --blue-l: #eff6ff;
  --purple: #8b5cf6;
  --purple-l: #f5f3ff;

  /* Text */
  --txt:  #1e293b;
  --txt2: #334155;
  --mut:  #64748b;
  --fnt:  #94a3b8;
  --inv:  #ffffff;

  /* Effects */
  --r:    12px;
  --r-sm: 8px;
  --r-lg: 16px;
  --r-xl: 20px;
  --sh:   0 1px 3px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --sh-sm: 0 1px 2px rgba(0,0,0,.04);
  --sh-lg: 0 4px 24px rgba(0,0,0,.06), 0 12px 48px rgba(0,0,0,.04);
  --sh-up: 0 -2px 16px rgba(0,0,0,.04);

  /* Transitions */
  --ease: cubic-bezier(.4, 0, .2, 1);

  /* Sidebar */
  --sidebar-w: 260px;
  --sidebar-bg: #ffffff;
  --sidebar-border: rgba(0,0,0,.06);

  /* Compat aliases */
  --accent:     #ff6b35;
  --accent-rgb: 255,107,53;
  --grad:       linear-gradient(135deg, #ff6b35, #f59e0b);
}

/* ----------------------------------------------------------------
   1b. DARK MODE VARIABLES
   ---------------------------------------------------------------- */
[data-theme="dark"] {
  --bg:      #0c0d14;
  --bg-grad: linear-gradient(160deg, #0c0d14 0%, #111220 50%, #0f1019 100%);
  --s1:      #161824;
  --s2:      #1c1e30;
  --s3:      #24263a;
  --s4:      #2d3048;

  --b1: rgba(255,255,255,.06);
  --b2: rgba(255,255,255,.10);
  --b3: rgba(255,107,53,.22);

  --or-l:     rgba(255,107,53,.08);
  --grn-l:    rgba(16,185,129,.08);
  --red-l:    rgba(239,68,68,.08);
  --blue-l:   rgba(59,130,246,.08);
  --purple-l: rgba(139,92,246,.08);

  --txt:  #f0f0f8;
  --txt2: #d1d5e0;
  --mut:  #8890a8;
  --fnt:  #505570;
  --inv:  #0c0d14;

  --sh:    0 1px 3px rgba(0,0,0,.2), 0 4px 16px rgba(0,0,0,.15);
  --sh-sm: 0 1px 2px rgba(0,0,0,.15);
  --sh-lg: 0 4px 24px rgba(0,0,0,.25), 0 12px 48px rgba(0,0,0,.15);
  --sh-up: 0 -2px 16px rgba(0,0,0,.15);

  --sidebar-bg: #12132000;
  --sidebar-border: rgba(255,255,255,.06);
}

/* ----------------------------------------------------------------
   2. RESET & BASE
   ---------------------------------------------------------------- */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--txt);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
}

a { color: var(--or); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: #e05a2a; }

img { max-width: 100%; height: auto; display: block; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--fnt); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--mut); }

/* ----------------------------------------------------------------
   3. BACKGROUND — Subtle gradient orbs (light mode: invisible, dark mode: faint)
   ---------------------------------------------------------------- */
.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(120px); opacity: .03; }
[data-theme="dark"] .orb { opacity: .06; }
.o1 { width: 500px; height: 500px; background: #ff6b35; top: -150px; left: -100px; }
.o2 { width: 400px; height: 400px; background: #8b5cf6; bottom: -100px; right: -100px; }
.o3 { width: 300px; height: 300px; background: #f59e0b; top: 50%; left: 50%; }

@keyframes orbF {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.05); }
  66%      { transform: translate(-20px, 20px) scale(.95); }
}

/* ----------------------------------------------------------------
   4. LAYOUT
   ---------------------------------------------------------------- */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform .3s var(--ease);
}

.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 28px 32px 40px;
  position: relative; z-index: 1;
  max-width: 1400px;
}

/* ----------------------------------------------------------------
   5. SIDEBAR STYLING
   ---------------------------------------------------------------- */
.sidebar-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 16px;
}
.sidebar-logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; flex-shrink: 0;
}
.sidebar-logo-text { display: flex; flex-direction: column; }
.sidebar-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px; font-weight: 700; color: var(--txt); letter-spacing: -.3px;
}
.sidebar-brand em {
  font-style: normal; color: var(--or);
}
.sidebar-version {
  font-size: 10px; color: var(--fnt); font-weight: 500; letter-spacing: .5px; text-transform: uppercase;
}

/* User block */
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 14px 8px; padding: 10px 12px;
  background: var(--s2); border-radius: var(--r-sm);
}
.sidebar-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0;
}
.sidebar-user-info { min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-email { font-size: 11px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Dividers */
.sidebar-divider {
  height: 1px; background: var(--b1); margin: 6px 16px;
}

/* Section labels */
.sidebar-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: .8px;
  text-transform: uppercase; color: var(--fnt);
  padding: 12px 20px 4px; list-style: none;
}

/* Nav links */
.sidebar-nav { list-style: none; padding: 0; }
.sidebar-nav li { list-style: none; }

.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; margin: 1px 10px;
  border-radius: var(--r-sm); color: var(--mut);
  font-size: 13px; font-weight: 500;
  transition: all .15s var(--ease);
  text-decoration: none; position: relative;
}
.nav-link i {
  width: 18px; text-align: center; font-size: 13px; flex-shrink: 0;
  transition: color .15s var(--ease);
}
.nav-link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-link:hover {
  background: var(--or-l); color: var(--or);
  text-decoration: none;
}
.nav-link:hover i { color: var(--or); }

.nav-link.active {
  background: var(--or-l); color: var(--or); font-weight: 600;
}
.nav-link.active i { color: var(--or); }
.nav-link.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: var(--or); border-radius: 0 3px 3px 0;
}

/* Nav badges */
.nav-badge {
  margin-left: auto; font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px; letter-spacing: .3px;
  white-space: nowrap;
}
.badge-gold   { background: rgba(245,158,11,.1); color: var(--gold); }
.badge-or     { background: rgba(255,107,53,.1);  color: var(--or); }
.badge-purple { background: rgba(139,92,246,.1);  color: var(--purple); }
.badge-grn, .badge-green { background: rgba(16,185,129,.1); color: var(--grn); }
.badge-red    { background: rgba(239,68,68,.1);   color: var(--red); }
.badge-blue   { background: rgba(59,130,246,.1);  color: var(--blue); }

/* Sidebar bottom */
.sidebar-bottom { margin-top: auto; padding-bottom: 12px; }
.nav-logout { color: var(--red) !important; }
.nav-logout:hover { background: var(--red-l) !important; }

/* Theme toggle in sidebar */
.sidebar-theme-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px; margin-bottom: 4px;
}
.sidebar-theme-toggle span { font-size: 11px; color: var(--fnt); font-weight: 500; }

.theme-switch {
  position: relative; width: 44px; height: 24px; cursor: pointer;
}
.theme-switch input { opacity: 0; width: 0; height: 0; }
.theme-slider {
  position: absolute; inset: 0;
  background: var(--s3); border-radius: 12px;
  transition: .3s var(--ease);
}
.theme-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; top: 3px;
  background: var(--or); border-radius: 50%;
  transition: .3s var(--ease);
}
.theme-switch input:checked + .theme-slider { background: var(--s4); }
.theme-switch input:checked + .theme-slider::before { transform: translateX(20px); }

/* ----------------------------------------------------------------
   6. HAMBURGER (Mobile)
   ---------------------------------------------------------------- */
.hamburger {
  display: none; position: fixed; top: 14px; left: 14px;
  z-index: 200; width: 40px; height: 40px;
  border-radius: var(--r-sm); border: 1px solid var(--b1);
  background: var(--s1); color: var(--txt);
  font-size: 16px; cursor: pointer;
  align-items: center; justify-content: center;
  box-shadow: var(--sh-sm); transition: all .2s var(--ease);
}
.hamburger:hover { border-color: var(--or); color: var(--or); }
.hamburger.active { background: var(--or); color: #fff; border-color: var(--or); }

.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.3);
  backdrop-filter: blur(4px); z-index: 99;
  opacity: 0; visibility: hidden;
  transition: all .3s var(--ease);
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }

/* ----------------------------------------------------------------
   7. PAGE HEADER & TITLES
   ---------------------------------------------------------------- */
.page-header {
  margin-bottom: 24px;
}
.page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 700; color: var(--txt);
  letter-spacing: -.3px; margin-bottom: 4px;
}
.page-subtitle {
  font-size: 13px; color: var(--mut); line-height: 1.5;
}
.page-badge {
  display: inline-block; padding: 3px 10px; border-radius: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; margin-bottom: 8px;
  background: var(--or-l); color: var(--or);
}

/* Section titles */
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px; font-weight: 700; color: var(--txt);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.section-title i { color: var(--or); font-size: 14px; }

/* ----------------------------------------------------------------
   8. CARDS
   ---------------------------------------------------------------- */
.card {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r); padding: 20px;
  box-shadow: var(--sh-sm);
  transition: all .2s var(--ease);
}
.card:hover {
  box-shadow: var(--sh);
  border-color: var(--b2);
}

/* Stat cards */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.stat-card {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r); padding: 16px 18px;
  box-shadow: var(--sh-sm);
  display: flex; align-items: center; gap: 14px;
  transition: all .2s var(--ease);
}
.stat-card:hover { border-color: var(--or); box-shadow: var(--sh); transform: translateY(-1px); }
.stat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.stat-icon.orange { background: var(--or-l); color: var(--or); }
.stat-icon.green  { background: var(--grn-l); color: var(--grn); }
.stat-icon.blue   { background: var(--blue-l); color: var(--blue); }
.stat-icon.purple { background: var(--purple-l); color: var(--purple); }
.stat-icon.red    { background: var(--red-l); color: var(--red); }
.stat-label { font-size: 11px; color: var(--mut); font-weight: 500; margin-bottom: 2px; }
.stat-value { font-size: 20px; font-weight: 700; color: var(--txt); line-height: 1.2; }
.stat-info { display: flex; flex-direction: column; }

/* ----------------------------------------------------------------
   9. BUTTONS
   ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; font-family: inherit;
  border: 1px solid transparent; cursor: pointer;
  transition: all .2s var(--ease); text-decoration: none;
  white-space: nowrap; line-height: 1.4;
}
.btn i { font-size: 12px; }

.btn-primary {
  background: var(--or); color: #fff; border-color: var(--or);
}
.btn-primary:hover {
  background: #e05a2a; border-color: #e05a2a;
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(var(--or-rgb),.25);
  color: #fff; text-decoration: none;
}

.btn-secondary {
  background: var(--s2); color: var(--txt2);
  border-color: var(--b1);
}
.btn-secondary:hover {
  background: var(--s3); border-color: var(--b2);
  text-decoration: none; color: var(--txt);
}

.btn-ghost {
  background: transparent; color: var(--mut);
  border-color: var(--b1);
}
.btn-ghost:hover {
  background: var(--s2); color: var(--txt);
  text-decoration: none;
}

.btn-danger {
  background: var(--red-l); color: var(--red);
  border-color: rgba(239,68,68,.15);
}
.btn-danger:hover {
  background: var(--red); color: #fff;
  text-decoration: none;
}

.btn-success {
  background: var(--grn-l); color: var(--grn);
  border-color: rgba(16,185,129,.15);
}
.btn-success:hover {
  background: var(--grn); color: #fff;
  text-decoration: none;
}

.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: 5px; }
.btn-lg { padding: 10px 22px; font-size: 14px; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: 8px; }
.btn-block { width: 100%; }

/* ----------------------------------------------------------------
   10. FORM ELEMENTS
   ---------------------------------------------------------------- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--txt2); margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 9px 14px;
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r-sm); color: var(--txt);
  font-size: 13px; font-family: inherit;
  transition: all .2s var(--ease);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--or);
  box-shadow: 0 0 0 3px rgba(var(--or-rgb),.08);
}
.form-input::placeholder { color: var(--fnt); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: var(--fnt); margin-top: 4px; }

/* Input group */
.input-group {
  display: flex; gap: 0;
}
.input-group .form-input {
  border-radius: var(--r-sm) 0 0 var(--r-sm);
}
.input-group .btn {
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

/* ----------------------------------------------------------------
   11. TABLES
   ---------------------------------------------------------------- */
.table-wrap {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r); overflow: hidden;
  box-shadow: var(--sh-sm);
}
table {
  width: 100%; border-collapse: collapse;
}
th {
  padding: 10px 14px; text-align: left;
  font-size: 11px; font-weight: 600; color: var(--mut);
  text-transform: uppercase; letter-spacing: .5px;
  background: var(--s2); border-bottom: 1px solid var(--b1);
}
td {
  padding: 10px 14px; border-bottom: 1px solid var(--b1);
  font-size: 13px; color: var(--txt2); vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--s2); }

.td-email { font-weight: 600; color: var(--txt); }
.td-muted { color: var(--mut); font-size: 12px; }
.td-faint { color: var(--fnt); font-size: 12px; font-style: italic; }
.td-nowrap { white-space: nowrap; }
.td-actions { text-align: center; }

.domain-pill {
  display: inline-block; padding: 2px 8px;
  background: var(--or-l); border: 1px solid rgba(var(--or-rgb),.15);
  border-radius: 20px; font-size: 11px; font-weight: 600; color: var(--or);
}
.action-btns { display: flex; gap: 4px; justify-content: center; }

/* Status badges */
.status-active {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; color: var(--grn);
}
.status-active::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--grn); flex-shrink: 0;
}
.status-suspended {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; color: var(--red);
}
.status-suspended::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); flex-shrink: 0;
}

/* ----------------------------------------------------------------
   12. FILTER BAR
   ---------------------------------------------------------------- */
.filter-bar {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px;
}
.filter-bar .btn,
.filter-btn {
  padding: 6px 14px; font-size: 12px; font-weight: 500;
  border-radius: 20px; background: var(--s1); border: 1px solid var(--b1);
  color: var(--mut); cursor: pointer; transition: all .2s var(--ease);
  font-family: inherit;
}
.filter-bar .btn:hover, .filter-btn:hover {
  border-color: var(--or); color: var(--or); background: var(--or-l);
}
.filter-bar .btn.active, .filter-btn.active {
  background: var(--or); border-color: var(--or); color: #fff;
}

/* ----------------------------------------------------------------
   13. APPS GRID
   ---------------------------------------------------------------- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 24px;
}

.app-card {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r); overflow: hidden;
  box-shadow: var(--sh-sm);
  display: flex; flex-direction: column;
  transition: all .25s var(--ease);
}
.app-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
  border-color: var(--or);
}

.app-cover {
  position: relative; width: 100%; padding-top: 100%;
  background: var(--s2); overflow: hidden;
}
.app-cover img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .3s var(--ease);
}
.app-card:hover .app-cover img { transform: scale(1.04); }

.app-badge {
  position: absolute; top: 8px; left: 8px;
  padding: 2px 8px; border-radius: 5px;
  font-size: 10px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  z-index: 2;
}
.app-type-badge {
  position: absolute; top: 8px; right: 8px;
  padding: 2px 8px; border-radius: 5px;
  font-size: 9px; font-weight: 700; letter-spacing: .3px;
  color: #fff; z-index: 2; text-transform: uppercase;
}
.app-type-badge.principal { background: var(--or); }
.app-type-badge.upsell { background: var(--purple); }
.app-type-badge.bonus { background: var(--grn); }

.app-info {
  padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1;
}
.app-name {
  font-size: 13px; font-weight: 700; color: var(--txt);
  line-height: 1.3; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.app-cat {
  font-size: 10px; font-weight: 600; color: var(--mut);
  text-transform: uppercase; letter-spacing: .3px;
}

.app-actions {
  display: flex; gap: 6px; padding: 0 14px 12px;
}
.app-actions .btn { flex: 1; font-size: 11px; padding: 6px 10px; }

/* ----------------------------------------------------------------
   14. VIDEO AULAS
   ---------------------------------------------------------------- */
.videos-section {
  margin-bottom: 32px;
}
.videos-section .section-title {
  font-size: 15px; padding-bottom: 10px;
  border-bottom: 1px solid var(--b1); margin-bottom: 16px;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.video-card {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r); overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: all .2s var(--ease);
}
.video-card:hover {
  box-shadow: var(--sh); border-color: var(--b2);
  transform: translateY(-2px);
}

.video-thumb {
  position: relative; padding-top: 56.25%;
  background: var(--s3); overflow: hidden; cursor: pointer;
}
.video-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .3s var(--ease);
}
.video-card:hover .video-thumb img { transform: scale(1.04); }
.video-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.25); opacity: 0;
  transition: opacity .2s var(--ease);
}
.video-card:hover .video-play-btn { opacity: 1; }
.video-play-btn i {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--or); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; box-shadow: 0 4px 12px rgba(var(--or-rgb),.4);
}

.video-info {
  padding: 12px 14px;
}
.video-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.video-category {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  color: var(--or); letter-spacing: .3px;
}
.video-duration {
  font-size: 10px; font-weight: 600; color: var(--fnt);
  background: var(--s2); padding: 2px 6px; border-radius: 4px;
}
.video-title {
  font-size: 13px; font-weight: 700; color: var(--txt);
  line-height: 1.3; margin-bottom: 4px;
}
.video-desc {
  font-size: 12px; color: var(--mut); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.video-actions { margin-top: 10px; }
.video-watch-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 6px;
  background: var(--or-l); color: var(--or);
  font-size: 12px; font-weight: 600; border: none;
  cursor: pointer; transition: all .2s var(--ease);
  font-family: inherit;
}
.video-watch-btn:hover { background: var(--or); color: #fff; }

/* Video Modal */
.video-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.75); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.video-modal-overlay.active { display: flex; }
.video-modal {
  background: var(--s1); border-radius: var(--r-lg);
  width: 100%; max-width: 900px; overflow: hidden;
  box-shadow: var(--sh-lg);
}
.video-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--b1);
}
.video-modal-header h3 { font-size: 14px; font-weight: 700; color: var(--txt); }
.video-modal-close {
  width: 30px; height: 30px; border-radius: 6px;
  border: 1px solid var(--b1); background: var(--s2);
  color: var(--mut); cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s var(--ease);
}
.video-modal-close:hover { background: var(--red-l); color: var(--red); border-color: rgba(239,68,68,.15); }
.video-modal-body { padding: 0; }
.video-modal-body iframe {
  width: 100%; aspect-ratio: 16/9; border: none; display: block;
}

/* ----------------------------------------------------------------
   15. ESTRUTURA (Funnels)
   ---------------------------------------------------------------- */
.funnel-section {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r); margin-bottom: 16px;
  box-shadow: var(--sh-sm); overflow: hidden;
}
.funnel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid var(--b1);
}
.funnel-info h2 { font-size: 14px; font-weight: 700; color: var(--txt); }
.funnel-info .funnel-id { font-size: 10px; color: var(--fnt); font-weight: 600; letter-spacing: .3px; }

.pages-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; padding: 14px 18px;
}
.page-card {
  padding: 14px; background: var(--s2);
  border: 1px solid var(--b1); border-radius: var(--r-sm);
  transition: all .2s var(--ease);
}
.page-card:hover { border-color: var(--or); }
.page-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 9px; font-weight: 700; letter-spacing: .3px;
  margin-bottom: 6px; text-transform: uppercase;
}
.badge-primary { background: var(--or-l); color: var(--or); }
.badge-quiz { background: var(--purple-l); color: var(--purple); }
.page-title { font-size: 13px; font-weight: 700; color: var(--txt); margin-bottom: 4px; }
.page-description { font-size: 12px; color: var(--mut); line-height: 1.4; margin-bottom: 10px; }
.preview-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 6px;
  background: var(--or-l); color: var(--or); border: none;
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: all .2s var(--ease); font-family: inherit;
}
.preview-btn:hover { background: var(--or); color: #fff; }

.download-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-sm);
  background: var(--or); color: #fff; border: none;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .2s var(--ease); font-family: inherit;
  text-decoration: none; white-space: nowrap;
}
.download-btn:hover { background: #e05a2a; transform: translateY(-1px); text-decoration: none; color: #fff; }

/* ----------------------------------------------------------------
   16. MATERIAIS EXTRAS
   ---------------------------------------------------------------- */
.materiais-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px; margin-bottom: 20px;
}
.mat-stat {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r-sm); padding: 12px 14px; text-align: center;
}
.mat-stat-num { font-size: 20px; font-weight: 700; color: var(--or); }
.mat-stat-label { font-size: 11px; color: var(--mut); font-weight: 500; }

.accordion-item {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r); margin-bottom: 8px;
  overflow: hidden; box-shadow: var(--sh-sm);
}
.accordion-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; cursor: pointer;
  transition: background .2s var(--ease);
}
.accordion-header:hover { background: var(--s2); }
.accordion-header h3 { font-size: 13px; font-weight: 700; color: var(--txt); }
.accordion-header .count { font-size: 11px; color: var(--mut); font-weight: 500; }
.accordion-header i {
  font-size: 12px; color: var(--fnt);
  transition: transform .2s var(--ease);
}
.accordion-item.active .accordion-header i { transform: rotate(180deg); }

.accordion-body {
  padding: 0 16px 14px;
  border-top: 1px solid var(--b1);
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease;
}
.accordion-item.active .accordion-body { max-height: 5000px; }

.mat-category { margin-top: 12px; }
.mat-category-title {
  font-size: 11px; font-weight: 700; color: var(--or);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
}

.mat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}
.mat-item {
  position: relative; border-radius: var(--r-sm);
  overflow: hidden; cursor: pointer;
  border: 1px solid var(--b1);
  transition: all .2s var(--ease);
}
.mat-item:hover { border-color: var(--or); transform: scale(1.02); }
.mat-item img {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
}
.mat-item-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5); opacity: 0;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .2s var(--ease);
}
.mat-item:hover .mat-item-overlay { opacity: 1; }
.mat-item-overlay i { color: #fff; font-size: 18px; }

/* ----------------------------------------------------------------
   17. CRIATIVOS IA
   ---------------------------------------------------------------- */
.criativos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.criativo-card {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r); overflow: hidden; cursor: pointer;
  box-shadow: var(--sh-sm); transition: all .2s var(--ease);
}
.criativo-card:hover { box-shadow: var(--sh); border-color: var(--b2); transform: translateY(-2px); }
.criativo-cover {
  position: relative; padding-top: 100%;
  background: var(--s2); overflow: hidden;
}
.criativo-cover img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.criativo-info { padding: 12px 14px; }
.criativo-name { font-size: 13px; font-weight: 700; color: var(--txt); margin-bottom: 4px; }
.criativo-desc { font-size: 12px; color: var(--mut); margin-bottom: 8px; line-height: 1.4; }
.criativo-count { font-size: 11px; font-weight: 600; color: var(--or); }

.creative-item {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r); overflow: hidden; margin-bottom: 14px;
}
.video-container { position: relative; }
.video-container video { width: 100%; display: block; }
.creative-info { padding: 12px 14px; }
.creative-title {
  font-size: 13px; font-weight: 700; color: var(--txt);
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.creative-badge {
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  background: var(--or-l); color: var(--or); font-weight: 700;
}
.creative-actions { display: flex; gap: 6px; }
.btn-play, .btn-download-single {
  padding: 6px 12px; border-radius: 6px;
  font-size: 11px; font-weight: 600; border: none;
  cursor: pointer; transition: all .2s var(--ease);
  display: inline-flex; align-items: center; gap: 4px;
  font-family: inherit;
}
.btn-play { background: var(--or-l); color: var(--or); }
.btn-play:hover { background: var(--or); color: #fff; }
.btn-download-single { background: var(--s2); color: var(--txt2); }
.btn-download-single:hover { background: var(--s3); }

/* ----------------------------------------------------------------
   18. PAINEL (User Panel)
   ---------------------------------------------------------------- */
.panel-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.panel-card {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r); padding: 20px;
  box-shadow: var(--sh-sm);
}
.panel-card-title {
  font-size: 14px; font-weight: 700; color: var(--txt);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.panel-card-title i { color: var(--or); font-size: 14px; }

.info-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--b1);
}
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 12px; color: var(--mut); font-weight: 500; }
.info-value { font-size: 13px; font-weight: 600; color: var(--txt); }

/* ----------------------------------------------------------------
   19. ADMIN PANEL
   ---------------------------------------------------------------- */
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 20px; flex-wrap: wrap;
}
.admin-search {
  display: flex; gap: 8px; flex: 1; max-width: 400px;
}
.admin-search .form-input {
  flex: 1; min-width: 0;
}
.admin-add {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r); padding: 16px;
  margin-bottom: 16px; box-shadow: var(--sh-sm);
}
.admin-add-title { font-size: 13px; font-weight: 700; color: var(--txt); margin-bottom: 12px; }
.admin-add-form {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: end;
}
.admin-add-form .form-input { flex: 1; min-width: 160px; }

/* ----------------------------------------------------------------
   20. COMUNIDADE
   ---------------------------------------------------------------- */
.community-card {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r); padding: 28px; text-align: center;
  box-shadow: var(--sh-sm);
}
.community-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--grn-l); color: var(--grn);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin: 0 auto 14px;
}
.community-title { font-size: 16px; font-weight: 700; color: var(--txt); margin-bottom: 6px; }
.community-desc { font-size: 13px; color: var(--mut); margin-bottom: 16px; line-height: 1.5; }

/* ----------------------------------------------------------------
   21. PROTEGER & EDITOR (keep existing patterns)
   ---------------------------------------------------------------- */
.result h3 { margin-bottom: 4px; font-size: 13px; font-weight: 700; color: var(--txt); }
.result p { font-size: 12px; color: var(--mut); }
.det {
  margin-top: 8px; padding: 10px 12px;
  background: var(--s2); border-radius: var(--r-sm);
  font-size: 12px; color: var(--mut); border: 1px solid var(--b1);
}

/* ----------------------------------------------------------------
   22. TOAST NOTIFICATIONS
   ---------------------------------------------------------------- */
#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  padding: 10px 18px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600;
  transform: translateY(100px); opacity: 0;
  transition: all .3s var(--ease);
  box-shadow: var(--sh-lg);
  max-width: 380px;
}
#toast.show {
  transform: translateY(0); opacity: 1;
}
#toast.ok {
  background: var(--grn); color: #fff;
}
#toast.er {
  background: var(--red); color: #fff;
}
#toast:not(.ok):not(.er) {
  background: var(--s1); color: var(--txt);
  border: 1px solid var(--b1);
}

/* ----------------------------------------------------------------
   23. LOADING
   ---------------------------------------------------------------- */
.page-loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 20px; gap: 14px;
}
.page-loading p { font-size: 13px; color: var(--mut); }

.spin-lg {
  width: 32px; height: 32px;
  border: 3px solid var(--b1);
  border-top-color: var(--or);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,.4); backdrop-filter: blur(4px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
}
.loading-overlay p { font-size: 14px; color: #fff; font-weight: 600; }

/* ----------------------------------------------------------------
   24. ANIMATIONS
   ---------------------------------------------------------------- */
.fade-in {
  opacity: 0; transform: translateY(12px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.fade-in.visible {
  opacity: 1; transform: translateY(0);
}
.fade-in.delay-1 { transition-delay: .05s; }
.fade-in.delay-2 { transition-delay: .10s; }
.fade-in.delay-3 { transition-delay: .15s; }

@keyframes sIn {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* ----------------------------------------------------------------
   25. DASHBOARD SPECIFIC
   ---------------------------------------------------------------- */
.dash-welcome {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r-lg); padding: 24px 28px;
  margin-bottom: 20px; box-shadow: var(--sh-sm);
  position: relative; overflow: hidden;
}
.dash-welcome::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 200px; height: 100%; opacity: .06;
  background: var(--grad); border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.dash-welcome h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px; font-weight: 700; color: var(--txt);
  margin-bottom: 4px; position: relative;
}
.dash-welcome p {
  font-size: 13px; color: var(--mut); position: relative;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; margin-bottom: 20px;
}

.quick-link {
  display: flex; align-items: center; gap: 14px;
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r); padding: 16px 18px;
  box-shadow: var(--sh-sm); transition: all .2s var(--ease);
  text-decoration: none; color: var(--txt);
}
.quick-link:hover {
  border-color: var(--or); box-shadow: var(--sh);
  transform: translateY(-2px); text-decoration: none; color: var(--txt);
}
.quick-link-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.quick-link-text { flex: 1; }
.quick-link-title { font-size: 13px; font-weight: 700; color: var(--txt); }
.quick-link-desc { font-size: 11px; color: var(--mut); }
.quick-link i.fa-chevron-right { color: var(--fnt); font-size: 12px; }

/* ----------------------------------------------------------------
   26. SEARCH BAR
   ---------------------------------------------------------------- */
.search-bar {
  position: relative; margin-bottom: 16px;
}
.search-bar .form-input {
  padding-left: 36px;
}
.search-bar i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--fnt); font-size: 13px;
}

/* ----------------------------------------------------------------
   27. EMPTY STATE
   ---------------------------------------------------------------- */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--fnt);
}
.empty-state i { font-size: 40px; margin-bottom: 14px; display: block; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--mut); margin-bottom: 6px; }
.empty-state p { font-size: 13px; color: var(--fnt); }

/* ----------------------------------------------------------------
   28. MODAL (Generic)
   ---------------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--s1); border-radius: var(--r-lg);
  width: 100%; max-width: 560px;
  box-shadow: var(--sh-lg); overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--b1);
}
.modal-header h3 { font-size: 14px; font-weight: 700; color: var(--txt); }
.modal-close {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid var(--b1); background: var(--s2);
  color: var(--mut); cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--red-l); color: var(--red); }
.modal-body { padding: 18px; }
.modal-footer {
  padding: 14px 18px; border-top: 1px solid var(--b1);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* Image modal for materiais */
.img-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.85);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.img-modal-overlay.active { display: flex; }
.img-modal-content {
  max-width: 90vw; max-height: 90vh;
}
.img-modal-content img {
  max-width: 100%; max-height: 85vh;
  border-radius: var(--r); box-shadow: var(--sh-lg);
}
.img-modal-actions {
  display: flex; gap: 8px; justify-content: center; margin-top: 12px;
}

/* ----------------------------------------------------------------
   29. BANNER
   ---------------------------------------------------------------- */
.banner-section {
  margin: 24px 0; text-align: center;
}
.banner-section img {
  width: 100%; max-width: 900px; margin: 0 auto;
  border-radius: var(--r); box-shadow: var(--sh);
}

/* ----------------------------------------------------------------
   30. RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    background: var(--s1);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--sh-lg);
  }
  .main-content {
    margin-left: 0;
    padding: 20px 16px 32px;
  }
  .hamburger {
    display: flex;
  }
  .main-content { padding-top: 60px; }
}

@media (max-width: 768px) {
  .apps-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
  .videos-grid {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .panel-grid {
    grid-template-columns: 1fr;
  }
  .pages-grid {
    grid-template-columns: 1fr;
  }
  .criativos-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .page-title { font-size: 18px; }
  .dash-welcome h1 { font-size: 18px; }
  .filter-bar { gap: 4px; }
  .filter-btn { padding: 5px 10px; font-size: 11px; }
}

@media (max-width: 480px) {
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .app-info { padding: 8px 10px; }
  .app-name { font-size: 12px; }
  .app-actions { padding: 0 10px 8px; }
  .app-actions .btn { font-size: 10px; padding: 5px 6px; }
  .main-content { padding: 16px 12px 24px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-value { font-size: 18px; }
}

/* ----------------------------------------------------------------
   31. EDITOR & PROTEGER — Full Component Library
   ---------------------------------------------------------------- */

/* ---- Hero ---- */
.hero {
  text-align: center; padding: 32px 0 24px;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--or-l); border: 1px solid rgba(var(--or-rgb),.15);
  border-radius: 20px; padding: 4px 14px;
  font-size: 12px; color: var(--or); font-weight: 600; margin-bottom: 14px;
}
.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 800;
  line-height: 1.15; margin-bottom: 8px; color: var(--txt);
}
.hero p { color: var(--mut); font-size: 13px; max-width: 480px; margin: 0 auto; line-height: 1.6; }

/* ---- Gradient text ---- */
.g {
  background: linear-gradient(135deg, var(--or), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Card system (cd) ---- */
.cd {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r); overflow: hidden; margin-bottom: 16px;
  transition: border-color .2s var(--ease); box-shadow: var(--sh-sm);
}
.cd:hover { border-color: var(--b2); }
.cd.hl { border-color: rgba(var(--or-rgb),.2); box-shadow: 0 0 0 1px rgba(var(--or-rgb),.06), var(--sh); }
.cd-h {
  padding: 14px 18px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--b1); background: var(--s2); cursor: pointer; user-select: none;
}
.cd-hl { display: flex; align-items: center; gap: 10px; }
.cd-ic {
  width: 32px; height: 32px; background: var(--or-l);
  border: 1px solid rgba(var(--or-rgb),.12); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.cd-t { font-weight: 700; font-size: 13px; color: var(--txt); }
.cd-st { font-size: 11px; color: var(--mut); margin-top: 1px; }
.cd-b { padding: 18px; }

/* ---- Mode selector ---- */
.mode-sel {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 20px;
}
.mode-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--s1); border: 2px solid var(--b1);
  border-radius: var(--r); padding: 18px 14px;
  cursor: pointer; transition: all .2s var(--ease);
  font-family: inherit; color: var(--mut);
}
.mode-btn:hover { border-color: var(--b2); background: var(--s2); }
.mode-btn.active {
  border-color: var(--or); background: var(--or-l); color: var(--or);
  box-shadow: 0 0 0 3px rgba(var(--or-rgb),.08);
}
.mode-ic {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--s2); display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: all .2s var(--ease);
}
.mode-btn.active .mode-ic { background: var(--or); color: #fff; }
.mode-tx { font-size: 13px; font-weight: 700; }
.mode-desc { font-size: 11px; color: var(--fnt); }

/* ---- Collapsible sections ---- */
.coll { margin-bottom: 0; }
.coll .cd { margin-bottom: 16px; }
.coll .cd-b {
  max-height: 4000px; overflow: visible;
  transition: max-height .35s var(--ease), padding .35s var(--ease), opacity .25s;
  opacity: 1;
}
.coll.shut .cd-b { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; overflow: hidden; }
.chev {
  font-size: 11px; color: var(--fnt); transition: transform .25s var(--ease);
  display: inline-block;
}
.coll.shut .chev { transform: rotate(-90deg); }

/* ---- Form grid ---- */
.fg { margin-bottom: 12px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .fgrid { grid-template-columns: 1fr; } }
.rq { color: var(--or); font-weight: 700; }

/* ---- Color picker ---- */
.crow {
  display: flex; align-items: center; gap: 8px;
}
.cswch {
  width: 36px; height: 36px; border-radius: 8px;
  overflow: hidden; border: 2px solid var(--b1);
  flex-shrink: 0; cursor: pointer;
}
.cswch input[type="color"] {
  width: 48px; height: 48px; border: none; cursor: pointer;
  margin: -6px; padding: 0;
}
.chex {
  width: 90px !important; font-family: 'SF Mono', monospace !important;
  font-size: 12px !important; text-transform: uppercase;
  padding: 8px 10px !important; letter-spacing: .5px;
}
.cprev {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: var(--r-sm); margin-top: 12px;
  color: #fff; font-size: 12px; font-weight: 700;
}
.cprev-l { opacity: .85; letter-spacing: 1px; }
.cprev-c { font-family: monospace; font-size: 11px; opacity: .9; }

/* ---- Upload zone ---- */
#uploadZone, .upload-zone-v {
  border: 2px dashed var(--b2); border-radius: var(--r);
  padding: 32px 20px; text-align: center;
  cursor: pointer; transition: all .2s var(--ease);
  background: var(--s2);
}
#uploadZone:hover, .upload-zone-v:hover,
#uploadZone.dg, .upload-zone-v.dg {
  border-color: var(--or); background: var(--or-l);
}
.u-ic { font-size: 2.2rem; margin-bottom: 10px; }
#uploadZone h3, .upload-zone-v h3 {
  font-size: 14px; font-weight: 700; color: var(--txt); margin-bottom: 6px;
}
#uploadZone p, .upload-zone-v p {
  font-size: 12px; color: var(--mut); margin-bottom: 10px;
}

/* ---- Tags ---- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tg {
  padding: 3px 10px; border-radius: 12px;
  background: var(--s1); border: 1px solid var(--b1);
  font-size: 11px; font-weight: 500; color: var(--mut);
}

/* ---- Progress bar ---- */
.prog {
  display: none; margin-top: 14px; text-align: center;
}
.prog-w {
  height: 6px; background: var(--s3); border-radius: 3px;
  overflow: hidden; margin-bottom: 6px;
}
.prog-b {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--or), var(--gold));
  border-radius: 3px; transition: width .3s var(--ease);
}
.prog-t { font-size: 11px; color: var(--mut); }

/* ---- File chip ---- */
.fchip {
  display: none; align-items: center; gap: 10px;
  padding: 10px 14px; margin-top: 12px;
  background: var(--grn-l); border: 1px solid rgba(16,185,129,.2);
  border-radius: var(--r-sm);
}
.fchip.sh { display: flex; }
.fchip-ic { font-size: 18px; flex-shrink: 0; }
.fchip-info { flex: 1; min-width: 0; }
.fchip-n {
  font-size: 13px; font-weight: 600; color: var(--txt);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fchip-s { font-size: 11px; color: var(--mut); }
.fchip-x {
  width: 24px; height: 24px; border-radius: 6px;
  border: 1px solid var(--b1); background: var(--s1);
  color: var(--mut); cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.fchip-x:hover { background: var(--red-l); color: var(--red); border-color: var(--red); }

/* ---- Error box ---- */
.err-box {
  display: none; margin-top: 12px; padding: 10px 14px;
  background: var(--red-l); border: 1px solid rgba(239,68,68,.2);
  border-radius: var(--r-sm); font-size: 12px; color: var(--red);
  font-weight: 600;
}

/* ---- Empty placeholder ---- */
.empty-p {
  text-align: center; padding: 24px 16px;
  font-size: 12px; color: var(--fnt); font-style: italic;
}

/* ---- Info & Warning boxes ---- */
.info-b {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--blue-l); border: 1px solid rgba(59,130,246,.15);
  font-size: 12px; color: var(--txt2); line-height: 1.5;
}
.warn-b {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: #fffbeb; border: 1px solid rgba(245,158,11,.2);
  font-size: 12px; color: #92400e; line-height: 1.5;
  margin-bottom: 14px;
}
[data-theme="dark"] .warn-b { background: rgba(245,158,11,.06); border-color: rgba(245,158,11,.15); color: #fbbf24; }

/* ---- Small buttons (btn-s) ---- */
.btn-s {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--r-sm); border: 1px solid var(--b1);
  background: var(--s1); color: var(--txt); font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .2s var(--ease);
}
.btn-s:hover { border-color: var(--b2); background: var(--s2); }
.btn-s.pri {
  background: linear-gradient(135deg, var(--or), var(--gold));
  color: #fff; border: none; box-shadow: 0 2px 12px rgba(var(--or-rgb),.25);
}
.btn-s.pri:hover { box-shadow: 0 4px 20px rgba(var(--or-rgb),.35); transform: translateY(-1px); }
.btn-s:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ---- Add button ---- */
.add-btn {
  display: block; width: 100%; padding: 10px; margin-top: 10px;
  border: 2px dashed var(--b2); border-radius: var(--r-sm);
  background: transparent; color: var(--or); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .2s var(--ease);
}
.add-btn:hover { border-color: var(--or); background: var(--or-l); }

/* ---- Export button ---- */
.btn-exp {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--r); border: none;
  background: linear-gradient(135deg, var(--or), var(--gold));
  color: #fff; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all .2s var(--ease);
  box-shadow: 0 4px 16px rgba(var(--or-rgb),.25);
}
.btn-exp:hover { box-shadow: 0 6px 24px rgba(var(--or-rgb),.35); transform: translateY(-2px); }
.btn-exp:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ---- Export wrapper ---- */
.exp-w { text-align: center; }

/* ---- Checklist ---- */
.chk {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-bottom: 8px;
}
.chk-i {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-sm);
  background: var(--s2); border: 1px solid var(--b1);
  font-size: 12px; font-weight: 500; color: var(--mut);
  transition: all .2s;
}
.chk-i.ok { background: var(--grn-l); border-color: rgba(16,185,129,.2); color: var(--grn); }
.chk-i .c {
  display: inline-flex; width: 16px; height: 16px;
  align-items: center; justify-content: center;
  font-size: 11px;
}

/* ---- Phone preview mockup ---- */
.prev-phone {
  width: 220px; background: var(--txt); border-radius: 28px;
  padding: 8px; box-shadow: var(--sh-lg); position: relative;
}
.prev-bar {
  height: 18px; background: #111; border-radius: 20px 20px 0 0;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.prev-bar::after {
  content: ''; width: 60px; height: 6px;
  background: #222; border-radius: 4px;
}
.prev-scr {
  background: #fff; border-radius: 0 0 20px 20px; padding: 20px 14px;
  text-align: center; min-height: 260px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.prev-logo-ph {
  width: 64px; height: 64px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 12px; color: #fff;
}
.prev-logo {
  width: 64px; height: 64px; border-radius: 16px;
  object-fit: cover; margin-bottom: 12px;
}
.prev-nm {
  font-size: 15px; font-weight: 800; color: #1e293b; margin-bottom: 4px;
}
.prev-ds {
  font-size: 11px; color: #64748b; margin-bottom: 14px; line-height: 1.4;
}
.prev-bt {
  padding: 10px 24px; border-radius: 10px; border: none;
  font-size: 13px; font-weight: 700; cursor: default;
  letter-spacing: .3px;
}

/* ---- Logo upload ---- */
.logo-row {
  display: flex; gap: 16px; align-items: flex-start;
}
.logo-box {
  width: 80px; height: 80px; border-radius: 14px;
  border: 2px dashed var(--b2); background: var(--s2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--fnt); text-align: center;
  overflow: hidden; flex-shrink: 0;
}
.logo-box img { width: 100%; height: 100%; object-fit: cover; }
.logo-rgt { flex: 1; }
@media (max-width: 480px) { .logo-row { flex-direction: column; } .logo-box { width: 60px; height: 60px; } }

/* ---- Product / Reel / Bonus items ---- */
.pit, .reel-item, .bonus-item {
  padding: 12px 14px; margin-bottom: 10px;
  background: var(--s2); border: 1px solid var(--b1);
  border-radius: var(--r-sm); position: relative;
}
.pit:last-child, .reel-item:last-child, .bonus-item:last-child {
  margin-bottom: 4px;
}
.pit .fg, .reel-item .fg, .bonus-item .fg { margin-bottom: 8px; }

/* ---- Vendas type display ---- */
.vd-type { display: flex; gap: 8px; }
.vd-type-btn {
  flex: 1; padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--s2); border: 2px solid var(--b1);
  text-align: center; font-size: 13px; font-weight: 600; color: var(--mut);
  transition: all .2s;
}
.vd-type-btn.active {
  border-color: var(--or); background: var(--or-l); color: var(--or);
}

/* ---- Log box (proteger) ---- */
.log-box {
  max-height: 200px; overflow-y: auto; margin-top: 12px;
  padding: 10px 12px; background: var(--s2); border: 1px solid var(--b1);
  border-radius: var(--r-sm); font-family: 'SF Mono', monospace;
  font-size: 11px; color: var(--mut); line-height: 1.7;
  display: none;
}
.log-box.sh { display: block; }

/* ---- Stats (proteger page) ---- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.stat {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r); padding: 16px; text-align: center;
  box-shadow: var(--sh-sm);
}
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--or), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---- Scoped editor inputs (raw input/textarea/select inside cards) ---- */
.cd-b input[type="text"],
.cd-b input[type="url"],
.cd-b input[type="email"],
.cd-b input[type="password"],
.cd-b textarea,
.cd-b select {
  width: 100%; background: var(--s2); border: 1px solid var(--b1);
  border-radius: var(--r-sm); padding: 10px 12px;
  color: var(--txt); font-size: 13px; font-family: inherit;
  outline: none; transition: border-color .2s var(--ease), box-shadow .2s;
}
.cd-b input:focus, .cd-b textarea:focus, .cd-b select:focus {
  border-color: var(--or); box-shadow: 0 0 0 3px rgba(var(--or-rgb),.08);
}
.cd-b input::placeholder, .cd-b textarea::placeholder {
  color: var(--fnt);
}
.cd-b textarea { resize: vertical; min-height: 70px; }
.cd-b label {
  display: block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--mut); margin-bottom: 4px;
}
#fileInput { display: none; }

/* ---- Show/hide modifiers ---- */
.sh { display: flex !important; }
.dg { border-color: var(--or) !important; background: var(--or-l) !important; }

/* ----------------------------------------------------------------
   32. LOGIN PAGE
   ---------------------------------------------------------------- */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative; z-index: 1;
  background: var(--bg-grad);
  background-attachment: fixed;
}

.login-box {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: var(--r-xl);
  padding: 40px 36px;
  width: 100%; max-width: 400px;
  box-shadow: var(--sh-lg);
}

.login-logo {
  text-align: center; margin-bottom: 28px;
}
.login-logo .logo-ic {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin: 0 auto 14px;
  box-shadow: 0 4px 16px rgba(255,107,53,.25);
}
.login-logo h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 700; color: var(--txt);
  margin-bottom: 4px;
}
.login-logo p {
  font-size: 13px; color: var(--mut); margin: 0;
}

.login-err {
  display: none;
  background: var(--red-l);
  border: 1px solid rgba(239,68,68,.2);
  color: var(--red);
  font-size: 12px; font-weight: 500;
  padding: 10px 14px; border-radius: var(--r-sm);
  margin-bottom: 16px; text-align: center;
}
.login-err.show { display: block; }

.login-wrap .fg {
  margin-bottom: 14px;
}
.login-wrap .fg label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--txt2); margin-bottom: 5px;
}
.login-wrap .fg input {
  width: 100%;
  padding: 10px 14px;
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: var(--r-sm);
  color: var(--txt);
  font-size: 13px; font-family: inherit;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  outline: none;
}
.login-wrap .fg input:focus {
  border-color: var(--or);
  box-shadow: 0 0 0 3px rgba(var(--or-rgb), .1);
}
.login-wrap .fg input::placeholder { color: var(--fnt); }

.btn-full {
  width: 100%;
  padding: 12px 20px;
  background: var(--grad);
  color: #fff; border: none;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s var(--ease);
  box-shadow: 0 4px 12px rgba(var(--or-rgb), .3);
}
.btn-full:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--or-rgb), .4);
}

/* Login page background orbs — subtle on standalone page */
.login-wrap ~ .bg-orbs .orb,
body > .bg-orbs .orb { opacity: .04; }

@media (max-width: 480px) {
  .login-box { padding: 28px 22px; }
  .login-logo h2 { font-size: 19px; }
}

/* ----------------------------------------------------------------
   33. UTILITY CLASSES
   ---------------------------------------------------------------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--mut); }
.text-faint { color: var(--fnt); }
.text-or { color: var(--or); }
.text-grn { color: var(--grn); }
.text-red { color: var(--red); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-sm { font-size: 12px; }
.fs-xs { font-size: 11px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }

/* ----------------------------------------------------------------
   33. PRINT
   ---------------------------------------------------------------- */
@media print {
  .sidebar, .hamburger, .sidebar-overlay, .bg-orbs, #toast, .loading-overlay { display: none !important; }
  .main-content { margin: 0; padding: 20px; }
}
