/* ============================================================
   ACELERA ENEM — Premium Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Palette */
  --bg:            #0D0B1E;
  --bg-2:          #13102A;
  --bg-3:          #1A1635;
  --card:          rgba(255,255,255,0.04);
  --card-solid:    #181530;
  --card-hover:    rgba(255,255,255,0.07);
  --border:        rgba(255,255,255,0.08);
  --border-focus:  rgba(124,92,252,0.6);

  /* Ink */
  --ink:           #F0EEFF;
  --ink-soft:      #9B96BE;
  --ink-muted:     #5E5A78;

  /* Brand */
  --purple-1:      #7C5CFC;
  --purple-2:      #A855F7;
  --purple-3:      #6D28D9;
  --purple-glow:   rgba(124,92,252,0.35);

  /* Accent */
  --gold-a:        #FF8A3D;
  --gold-b:        #FF4D6D;
  --mint:          #10D978;
  --mint-dim:      rgba(16,217,120,0.15);
  --danger:        #FF4D6D;
  --danger-dim:    rgba(255,77,109,0.15);
  --blue:          #4A6CF7;
  --blue-dim:      rgba(74,108,247,0.15);
  --amber:         #F59E0B;
  --amber-dim:     rgba(245,158,11,0.15);

  /* Gradients */
  --grad-brand:    linear-gradient(135deg, var(--purple-1), var(--purple-2));
  --grad-gold:     linear-gradient(135deg, var(--gold-a), var(--gold-b));
  --grad-hero:     linear-gradient(135deg, #1E1550 0%, #0D0B1E 100%);

  /* Typography */
  --font-display:  'Poppins', sans-serif;
  --font-body:     'Inter', -apple-system, sans-serif;

  /* Radii */
  --r-xs:   6px;
  --r-sm:   10px;
  --r-md:   16px;
  --r-lg:   22px;
  --r-xl:   28px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 2px 12px rgba(0,0,0,0.4);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 40px rgba(124,92,252,0.25);

  /* Transitions */
  --t-fast:   0.12s ease;
  --t-normal: 0.22s ease;
  --t-slow:   0.4s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  touch-action: manipulation;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.2;
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

button { cursor: pointer; font-family: var(--font-body); }

input, textarea, select {
  font-family: var(--font-body);
  font-size: 15px;
}

::selection { background: rgba(124,92,252,0.35); color: var(--ink); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple-3); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--purple-1);
  outline-offset: 3px;
}

/* ============================================================
   LANDING PAGE — LAYOUT
   ============================================================ */
.lp-body {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(124,92,252,0.3) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(168,85,247,0.15) 0%, transparent 50%),
    var(--bg);
}

.lp-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: rgba(13,11,30,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-normal);
}

.lp-nav.scrolled {
  background: rgba(13,11,30,0.95);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.brand-dot {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 0 20px var(--purple-glow);
}

.lp-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.lp-nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color var(--t-fast);
}

.lp-nav-links a:hover { color: var(--ink); }

.lp-content { padding-top: 80px; }

/* ============================================================
   LANDING — HERO
   ============================================================ */
.lp-hero {
  text-align: center;
  padding: 100px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124,92,252,0.15);
  border: 1px solid rgba(124,92,252,0.35);
  border-radius: var(--r-full);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #C4B0FF;
  margin-bottom: 28px;
  animation: fadeUp 0.6s ease both;
}

.hero-badge span { color: var(--ink-muted); }

.lp-hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: -2px;
  margin-bottom: 24px;
  animation: fadeUp 0.6s 0.1s ease both;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.lp-hero h1 .grad {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lp-hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
  animation: fadeUp 0.6s 0.2s ease both;
}

.lp-hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.3s ease both;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.4s ease both;
}

.hero-stat-item {
  text-align: center;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-stat-lbl {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.hero-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* App preview floating card */
.lp-hero-preview {
  max-width: 900px;
  margin: 60px auto 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  background: var(--bg-2);
  animation: fadeUp 0.8s 0.5s ease both;
  position: relative;
}

.preview-topbar {
  background: var(--bg-3);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.preview-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}

.preview-dot:nth-child(1) { background: #FF5F57; }
.preview-dot:nth-child(2) { background: #FEBC2E; }
.preview-dot:nth-child(3) { background: #28C840; }

.preview-url {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted);
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 5px 12px;
}

.preview-body {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.preview-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px;
}

.preview-card-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.preview-card-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.preview-bar-group { margin-top: 12px; }

.preview-bar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
}

.preview-bar-label { color: var(--ink-soft); width: 90px; flex-shrink: 0; }

.preview-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
}

.preview-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--grad-brand);
}

/* ============================================================
   LANDING — SECTIONS
   ============================================================ */
.lp-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--purple-1);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: var(--ink);
}

.section-sub {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 560px;
  line-height: 1.7;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 52px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-brand);
  opacity: 0;
  transition: opacity var(--t-normal);
}

.feature-card:hover {
  border-color: rgba(124,92,252,0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), 0 0 30px var(--purple-glow);
}

.feature-card:hover::before { opacity: 0.05; }

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: rgba(124,92,252,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  position: relative;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
}

.feature-desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  position: relative;
}

/* How it works */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 52px;
}

.step-card {
  text-align: center;
}

.step-num {
  width: 52px;
  height: 52px;
  border-radius: var(--r-full);
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 20px;
  box-shadow: 0 0 30px var(--purple-glow);
}

.step-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 52px;
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px;
  position: relative;
}

.pricing-card.featured {
  background: var(--grad-brand);
  border-color: transparent;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: scale(1.04);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-gold);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: var(--r-full);
}

.pricing-plan {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.pricing-card.featured .pricing-plan { color: rgba(255,255,255,0.7); }

.pricing-price {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -2px;
  margin-bottom: 4px;
}

.pricing-price sup {
  font-size: 1.2rem;
  vertical-align: top;
  margin-top: 12px;
  display: inline-block;
}

.pricing-price sub {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.7;
}

.pricing-desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.pricing-card.featured .pricing-desc { color: rgba(255,255,255,0.8); }

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.pricing-features li::before {
  content: '✓';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(124,92,252,0.2);
  color: var(--purple-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.pricing-card.featured .pricing-features li::before {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 52px;
}

.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
}

.testimonial-stars {
  color: var(--amber);
  font-size: 14px;
  margin-bottom: 14px;
}

.testimonial-text {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 18px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.testimonial-name {
  font-weight: 700;
  font-size: 14px;
}

.testimonial-info {
  font-size: 12px;
  color: var(--ink-muted);
}

/* CTA section */
.lp-cta-section {
  margin: 40px 24px 80px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  background: var(--grad-brand);
  border-radius: var(--r-xl);
  padding: 70px 48px;
  text-align: center;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.lp-cta-section::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}

.lp-cta-section::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -40px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.lp-cta-section h2 {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -1px;
  color: #fff;
  margin-bottom: 14px;
  position: relative;
}

.lp-cta-section p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  position: relative;
}

.lp-footer {
  border-top: 1px solid var(--border);
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.lp-footer-note {
  font-size: 13px;
  color: var(--ink-muted);
}

/* ============================================================
   APP — LAYOUT
   ============================================================ */
.app-body {
  background: var(--bg);
}

#app {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 18px 100px;
}

/* ============================================================
   APP — TOPBAR
   ============================================================ */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13,11,30,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -18px;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
}

.app-brand .brand-dot {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}

.app-navtabs {
  display: flex;
  gap: 3px;
  background: rgba(255,255,255,0.04);
  padding: 4px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}

.app-navtab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--r-sm);
  border: none;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all var(--t-fast);
}

.app-navtab:hover { color: var(--ink-soft); }
.app-navtab.active {
  background: var(--purple-3);
  color: #fff;
  box-shadow: 0 2px 12px rgba(109,40,217,0.5);
}

.app-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 22px;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--t-fast);
}

.btn:hover::after { background: rgba(255,255,255,0.08); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.38; cursor: not-allowed; }

.btn-grad {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,92,252,0.45);
}

.btn-grad:hover {
  box-shadow: 0 8px 30px rgba(124,92,252,0.6);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--grad-gold);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,138,61,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--ink-soft);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--purple-1);
  color: var(--ink);
}

.btn-ghost {
  background: var(--card);
  color: var(--ink-soft);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--card-hover);
  color: var(--ink);
}

.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(255,77,109,0.25);
}

.btn-sm {
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--r-sm);
}

.btn-lg {
  font-size: 16px;
  padding: 15px 30px;
  border-radius: var(--r-lg);
}

.btn-block { width: 100%; }

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   CARDS & PANELS
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 16px;
}

.card-elevated {
  background: var(--bg-2);
  border: 1px solid var(--border);
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}

.panel-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

/* ============================================================
   ONBOARDING
   ============================================================ */
.onboard-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 40px 18px;
}

.onboard-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 48px 40px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.onboard-card::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,252,0.3), transparent 70%);
  pointer-events: none;
}

.onboard-emoji {
  font-size: 48px;
  margin-bottom: 12px;
  position: relative;
}

.onboard-card h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
  position: relative;
}

.onboard-card p {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin-bottom: 28px;
  line-height: 1.6;
  position: relative;
}

.field-group {
  margin-bottom: 16px;
  text-align: left;
  position: relative;
}

.field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.field-input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--ink);
  font-size: 15px;
  transition: border-color var(--t-fast);
  outline: none;
}

.field-input:focus { border-color: var(--purple-1); }
.field-input::placeholder { color: var(--ink-muted); }

/* API Key input toggle */
.api-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.api-row .field-input { flex: 1; font-size: 13px; padding: 10px 14px; }

/* ============================================================
   DASHBOARD (HOME)
   ============================================================ */
.dashboard-header {
  padding: 28px 0 20px;
}

.greet-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple-1);
  margin-bottom: 4px;
}

.greet-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.greet-sub {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 4px;
}

.greet-sub b { color: var(--purple-1); }

/* Hero card */
.hero-card {
  background: var(--grad-brand);
  border-radius: var(--r-xl);
  padding: 28px 30px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
}

.hero-card::before {
  content: '';
  position: absolute;
  right: -50px; top: -50px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 70%);
  pointer-events: none;
}

.hero-card::after {
  content: '';
  position: absolute;
  left: -30px; bottom: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,0,0,0.15), transparent 70%);
  pointer-events: none;
}

.hero-left, .hero-right { position: relative; z-index: 1; }

.hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 6px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.hero-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 18px;
}

.streak-badge {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 2;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 5px 12px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  backdrop-filter: blur(8px);
}

.hero-right {
  border-left: 1px solid rgba(255,255,255,0.2);
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.liga-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
}

.liga-xp {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 10px;
}

.liga-track {
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: 8px;
}

.liga-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-a), var(--gold-b));
  border-radius: var(--r-full);
  transition: width 1s ease;
}

.liga-caption {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
}

/* Stats Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  transition: all var(--t-fast);
}

.stat-card:hover {
  border-color: rgba(124,92,252,0.3);
  transform: translateY(-2px);
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}

.stat-lbl {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
}

.stat-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* Bottom grid */
.bottom-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
}

/* Bar chart */
.barchart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 110px;
  margin-bottom: 20px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bar-shell {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bar-fill {
  width: 55%;
  border-radius: 5px 5px 2px 2px;
  background: rgba(124,92,252,0.3);
  min-height: 3px;
  transition: height 0.5s ease;
}

.bar-col.today .bar-fill {
  background: var(--grad-brand);
  box-shadow: 0 0 15px rgba(124,92,252,0.5);
}

.bar-day {
  font-size: 10.5px;
  color: var(--ink-muted);
  font-weight: 600;
}

/* Area bars */
.area-bars { margin-top: 14px; }

.area-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
}

.area-bar-label {
  width: 120px;
  flex-shrink: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.area-bar-track {
  flex: 1;
  height: 7px;
  background: var(--bg-3);
  border-radius: var(--r-full);
  overflow: hidden;
}

.area-bar-fill {
  height: 100%;
  background: var(--grad-brand);
  border-radius: var(--r-full);
  transition: width 0.6s ease;
}

.area-bar-pct {
  width: 36px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}

/* Ranking */
.rank-tabs {
  display: flex;
  gap: 3px;
  background: var(--bg-3);
  padding: 4px;
  border-radius: var(--r-md);
  margin-bottom: 14px;
}

.rank-tab {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  padding: 7px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  transition: all var(--t-fast);
}

.rank-tab.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.rank-row:last-child { border-bottom: none; }

.rank-pos {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.rank-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-name {
  flex: 1;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-name.me { color: var(--purple-1); }

.rank-score {
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-muted);
}

.rank-empty {
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
  padding: 16px 0;
  line-height: 1.6;
}

/* ============================================================
   SETUP (SIMULADOS)
   ============================================================ */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.chip {
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all var(--t-fast);
  user-select: none;
}

.chip:hover {
  border-color: var(--purple-1);
  color: var(--ink);
}

.chip.active {
  background: rgba(124,92,252,0.2);
  border-color: var(--purple-1);
  color: var(--purple-1);
  box-shadow: 0 0 15px rgba(124,92,252,0.2);
}

.avail-note {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: -14px;
  margin-bottom: 22px;
}

.avail-note b { color: var(--purple-1); }

/* ============================================================
   QUIZ
   ============================================================ */
.progress-strip {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 18px 0 0;
}

.prog-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  transition: all var(--t-fast);
}

.prog-dot.current {
  border-color: var(--purple-1);
  border-width: 2.5px;
  box-shadow: 0 0 8px rgba(124,92,252,0.5);
}

.prog-dot.answered-correct {
  background: var(--mint);
  border-color: var(--mint);
}

.prog-dot.answered-incorrect {
  background: var(--danger);
  border-color: var(--danger);
}

/* Timer bar */
.timer-bar-wrap {
  height: 4px;
  background: var(--bg-3);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: 18px;
}

.timer-bar-fill {
  height: 100%;
  background: var(--grad-brand);
  border-radius: var(--r-full);
  transition: width 1s linear;
}

.q-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 8px;
}

.q-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple-1);
  background: rgba(124,92,252,0.12);
  border: 1px solid rgba(124,92,252,0.2);
  border-radius: var(--r-sm);
  padding: 5px 12px;
}

.q-counter {
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 700;
}

.q-statement {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  white-space: pre-line;
  margin-bottom: 28px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: all var(--t-fast);
}

.option:hover {
  border-color: var(--purple-1);
  background: rgba(124,92,252,0.06);
}

.option .bubble {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-muted);
  overflow: hidden;
  transition: all var(--t-fast);
}

.option .bubble .fill {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--grad-brand);
  transform: scale(0);
  transition: transform 0.28s cubic-bezier(.34,1.56,.64,1);
}

.option .bubble .letter {
  position: relative;
  z-index: 1;
  transition: color 0.2s;
}

.option.selected .bubble { border-color: var(--purple-1); }
.option.selected .bubble .fill { transform: scale(1); }
.option.selected .bubble .letter { color: #fff; }
.option.selected { border-color: var(--purple-1); background: rgba(124,92,252,0.08); }

.option .opt-text {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
}

/* Reveal states */
.option.reveal-correct {
  border-color: var(--mint) !important;
  background: var(--mint-dim) !important;
}
.option.reveal-correct .bubble { border-color: var(--mint); }
.option.reveal-correct .bubble .fill { background: var(--mint); transform: scale(1); }

.option.reveal-incorrect {
  border-color: var(--danger) !important;
  background: var(--danger-dim) !important;
}
.option.reveal-incorrect .bubble { border-color: var(--danger); }
.option.reveal-incorrect .bubble .fill { background: var(--danger); transform: scale(1); }

.option.locked { cursor: default; }

/* Feedback bar */
.feedback-bar {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-size: 14px;
  display: none;
  align-items: center;
  gap: 10px;
}

.feedback-bar.show { display: flex; animation: slideUp 0.3s ease; }

.feedback-bar.correct {
  background: var(--mint-dim);
  color: var(--mint);
  border: 1px solid rgba(16,217,120,0.25);
}

.feedback-bar.incorrect {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(255,77,109,0.25);
}

/* Results */
.score-hero {
  text-align: center;
  padding: 20px 0 12px;
}

.score-num {
  font-family: var(--font-display);
  font-size: 60px;
  font-weight: 900;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  letter-spacing: -3px;
}

.score-lbl {
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 8px;
}

.xp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--amber-dim);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--r-full);
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--amber);
  margin-top: 10px;
}

.missed-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.missed-item:last-child { border-bottom: none; }

.missed-item .m-ans {
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* ============================================================
   REDAÇÃO
   ============================================================ */
.tema-chip {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--card);
  cursor: pointer;
  margin-bottom: 10px;
  transition: all var(--t-fast);
}

.tema-chip:hover { border-color: var(--purple-1); }

.tema-chip.active {
  border-color: var(--purple-1);
  background: rgba(124,92,252,0.08);
}

.tema-chip .ty {
  font-size: 11px;
  font-weight: 700;
  color: var(--purple-1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.tema-chip .tt {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.apoio-box {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  white-space: pre-line;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.essay-editor {
  width: 100%;
  min-height: 360px;
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--ink);
  resize: vertical;
  outline: none;
  transition: border-color var(--t-fast);
}

.essay-editor:focus { border-color: var(--purple-1); }
.essay-editor::placeholder { color: var(--ink-muted); }

.editor-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 20px;
  font-size: 13px;
  color: var(--ink-muted);
}

.editor-meta .warn { color: var(--danger); font-weight: 700; }
.editor-meta .ok   { color: var(--mint); font-weight: 700; }

/* Grading loading */
.grading-loading {
  text-align: center;
  padding: 60px 0;
  color: var(--ink-soft);
}

.spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid var(--bg-3);
  border-top-color: var(--purple-1);
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

/* Essay result */
.nota-hero {
  text-align: center;
  padding: 14px 0 24px;
}

.nota-num {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -2px;
}

.nota-max {
  font-size: 22px;
  color: var(--ink-muted);
  font-weight: 500;
}

.nota-lbl {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin-top: 6px;
}

.comp-card {
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: border-color var(--t-fast);
}

.comp-card:hover { border-color: rgba(124,92,252,0.3); }

.comp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.comp-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.comp-score {
  font-size: 15px;
  font-weight: 900;
  color: var(--purple-1);
  font-family: var(--font-display);
}

.comp-track {
  height: 6px;
  background: var(--bg-3);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: 12px;
}

.comp-fill {
  height: 100%;
  background: var(--grad-brand);
  border-radius: var(--r-full);
  transition: width 0.6s ease;
}

.comp-comment {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 10px;
}

.comp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-good {
  font-size: 11.5px;
  background: var(--mint-dim);
  color: var(--mint);
  border: 1px solid rgba(16,217,120,0.2);
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-weight: 600;
}

.tag-bad {
  font-size: 11.5px;
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(255,77,109,0.2);
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-weight: 600;
}

.erro-item {
  border-left: 3px solid var(--danger);
  padding: 12px 16px;
  margin-bottom: 12px;
  background: rgba(255,77,109,0.05);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.erro-tipo {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--danger);
  margin-bottom: 5px;
}

.erro-trecho {
  font-size: 13.5px;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 6px;
}

.erro-exp {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Essay history */
.redacao-hist-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all var(--t-fast);
}

.redacao-hist-item:last-child { border-bottom: none; }

.redacao-hist-main {
  flex: 1;
  cursor: pointer;
  transition: opacity var(--t-fast);
}

.redacao-hist-main:hover { opacity: 0.8; }

.redacao-hist-item .rh-tema {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.redacao-hist-item .rh-date {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 3px;
}

.redacao-hist-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.redacao-hist-item .rh-nota {
  font-size: 16px;
  font-weight: 800;
  color: var(--purple-1);
  font-family: var(--font-display);
  cursor: pointer;
}

.btn-trash-red {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-trash-red:hover {
  color: var(--danger);
  background: var(--danger-dim);
  border-color: rgba(255, 77, 109, 0.3);
  transform: scale(1.08);
}

/* ============================================================
   API KEY MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 36px;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

.modal-box h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
}

.modal-box p {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.mt-sm        { margin-top: 10px; }
.mt-md        { margin-top: 18px; }
.mt-lg        { margin-top: 28px; }
.mb-sm        { margin-bottom: 10px; }
.mb-md        { margin-bottom: 18px; }
.mb-lg        { margin-bottom: 28px; }

.color-muted  { color: var(--ink-muted); }
.color-soft   { color: var(--ink-soft); }
.color-purple { color: var(--purple-1); }
.color-mint   { color: var(--mint); }
.color-danger { color: var(--danger); }

.font-display { font-family: var(--font-display); }
.font-bold    { font-weight: 700; }
.font-black   { font-weight: 900; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
}

.badge-purple {
  background: rgba(124,92,252,0.15);
  color: var(--purple-1);
  border: 1px solid rgba(124,92,252,0.25);
}

.badge-mint {
  background: var(--mint-dim);
  color: var(--mint);
  border: 1px solid rgba(16,217,120,0.25);
}

.badge-gold {
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid rgba(245,158,11,0.25);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-in {
  animation: fadeUp 0.5s ease both;
}

/* ============================================================
   RESPONSIVE DESIGN SYSTEM (DESKTOP, TABLET & MOBILE)
   ============================================================ */

/* 1. Global Safe Area & Padding */
#app {
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

/* 2. Breakpoint: TABLET LANDSCAPE & SMALL DESKTOPS (<= 960px) */
@media (max-width: 960px) {
  .lp-nav { padding: 16px 28px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .pricing-card.featured { transform: none; }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .preview-body { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .bottom-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* 3. Breakpoint: TABLET PORTRAIT (<= 768px) */
@media (max-width: 768px) {
  /* Prevent auto-zoom on mobile inputs */
  input, textarea, select {
    font-size: 16px !important;
  }

  .lp-hero { padding: 80px 20px 50px; }
  .lp-hero h1 { font-size: clamp(2rem, 7vw, 3.2rem); letter-spacing: -1px; }
  .lp-section { padding: 60px 18px; }
  .section-title { font-size: clamp(1.6rem, 5vw, 2.2rem); }
  
  .hero-card {
    grid-template-columns: 1fr;
    padding: 22px 20px;
    gap: 18px;
  }
  .hero-right {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.18);
    padding-left: 0;
    padding-top: 18px;
  }
  .streak-badge {
    position: static;
    margin-bottom: 12px;
    display: inline-block;
  }

  .pricing-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  
  .lp-cta-section {
    padding: 48px 24px;
    margin: 30px 16px 60px;
  }
  .lp-cta-section h2 { font-size: 1.8rem; }
  
  .lp-footer {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 30px 20px;
  }
  .lp-nav-links { display: none; }
}

/* 4. Breakpoint: MOBILE SMARTPHONES (<= 640px) */
@media (max-width: 640px) {
  /* App Container */
  #app {
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  }

  /* App Topbar Mobile */
  .app-topbar {
    padding: 10px 14px;
    margin: 0 -14px 16px;
    position: sticky;
    top: 0;
    z-index: 90;
  }
  .app-brand { font-size: 16px; }
  .app-brand .brand-dot { width: 22px; height: 22px; font-size: 11px; }

  .app-user-chip {
    padding: 4px 10px;
    font-size: 12px;
    gap: 6px;
  }
  .app-user-chip span:nth-child(2) {
    max-width: 75px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Native Mobile Bottom Navigation Bar */
  .app-navtabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 180;
    background: rgba(19, 16, 42, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 6px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.6);
  }

  .app-navtab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: var(--r-sm);
    min-height: 48px;
    white-space: nowrap;
  }

  .app-navtab.active {
    background: rgba(124,92,252,0.22);
    color: #fff;
    border: 1px solid rgba(124,92,252,0.4);
    box-shadow: 0 0 14px rgba(124,92,252,0.25);
  }

  /* Dashboard Header */
  .dashboard-header { padding: 14px 0 12px; }
  .greet-title { font-size: 22px; }
  .greet-sub { font-size: 13px; }

  /* Hero Card */
  .hero-card {
    padding: 18px 16px;
    border-radius: var(--r-lg);
  }
  .hero-title { font-size: 17px; }
  .hero-meta {
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 12px;
    margin-bottom: 14px;
  }

  /* Stats Grid */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .stat-card {
    padding: 12px 14px;
    border-radius: var(--r-md);
  }
  .stat-icon {
    width: 32px;
    height: 32px;
    font-size: 15px;
    margin-bottom: 8px;
  }
  .stat-num { font-size: 20px; }
  .stat-lbl { font-size: 9.5px; }

  /* Barchart & Areas */
  .barchart { height: 85px; gap: 4px; margin-bottom: 16px; }
  .bar-col .bar-day { font-size: 9px; }
  .area-bar-row { gap: 6px; font-size: 12px; }
  .area-bar-label { width: 85px; font-size: 11px; }

  /* Buttons & Touch Targets */
  .btn {
    min-height: 44px;
    padding: 10px 18px;
    font-size: 14px;
  }
  .btn-row {
    gap: 8px;
  }
  .btn-row > .btn {
    flex: 1 1 auto;
  }

  /* Chips / Filters */
  .chip-group { gap: 6px; margin-bottom: 16px; }
  .chip {
    padding: 7px 13px;
    font-size: 12.5px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
  }

  /* Quiz Interface */
  .progress-strip {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 10px 0 4px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .progress-strip::-webkit-scrollbar { display: none; }
  
  .prog-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
  }

  .q-meta { margin-bottom: 12px; gap: 6px; }
  .q-tag { font-size: 11px; padding: 4px 10px; }
  .q-counter { font-size: 12px; }
  .q-statement {
    font-size: 14.5px;
    line-height: 1.65;
    margin-bottom: 20px;
  }

  .options { gap: 8px; }
  .option {
    padding: 12px 14px;
    gap: 12px;
    min-height: 48px;
    border-radius: var(--r-md);
  }
  .option .bubble {
    width: 28px;
    height: 28px;
    font-size: 12px;
    flex-shrink: 0;
  }
  .option .opt-text {
    font-size: 13.5px;
    line-height: 1.45;
  }

  .feedback-bar {
    padding: 12px 14px;
    font-size: 13px;
    border-radius: var(--r-md);
  }

  /* Redação */
  .tema-chip { padding: 12px 14px; }
  .tema-chip .tt { font-size: 13.5px; }
  .apoio-box {
    max-height: 170px;
    padding: 14px;
    font-size: 12.5px;
    margin-bottom: 16px;
  }
  .essay-editor {
    min-height: 240px;
    padding: 14px;
    font-size: 14.5px;
    line-height: 1.65;
  }
  .editor-meta { font-size: 11.5px; flex-wrap: wrap; gap: 6px; }
  .nota-hero .nota-num { font-size: 44px; }
  .comp-card { padding: 14px; }
  .comp-head { flex-wrap: wrap; gap: 4px; }
  .comp-name { font-size: 13px; }
  .comp-score { font-size: 14px; }
  .comp-comment { font-size: 12.5px; }
  
  .redacao-hist-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 0;
  }
  .redacao-hist-actions {
    width: 100%;
    justify-content: space-between;
  }

  /* Score / Results */
  .score-num { font-size: 46px; }
  .missed-item {
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
  }

  /* Onboarding Card */
  .onboard-wrap { padding: 20px 12px; min-height: 100vh; }
  .onboard-card { padding: 32px 20px; border-radius: var(--r-lg); }
  .onboard-card h1 { font-size: 22px; }

  /* Modals Overlay */
  .modal-overlay { padding: 14px; }
  .modal-box {
    padding: 24px 18px;
    border-radius: var(--r-lg);
    max-width: 100%;
  }

  /* Floating Tutor IA (Adjusted above Bottom Nav) */
  .tutor-fab {
    bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    right: 14px !important;
    padding: 9px 15px !important;
    font-size: 12.5px !important;
    gap: 6px !important;
  }

  /* Fullscreen Tutor Modal on Mobile */
  .tutor-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    z-index: 350 !important;
    border: none !important;
  }
  .tutor-header {
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px;
  }
  .tutor-footer {
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  /* Notification Toast */
  .toast {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    right: 14px !important;
    left: 14px !important;
    max-width: calc(100vw - 28px) !important;
    font-size: 13px !important;
    padding: 12px 16px !important;
  }
}

/* 5. Breakpoint: EXTRA SMALL MOBILE (<= 380px) */
@media (max-width: 380px) {
  .greet-title { font-size: 20px; }
  .app-brand { font-size: 15px; }
  .app-navtab { font-size: 10.5px; padding: 6px 2px; }
  .hero-card { padding: 14px 12px; }
  .hero-title { font-size: 15px; }
  .stat-grid { grid-template-columns: 1fr; }
  .btn { font-size: 13px; padding: 8px 14px; }
  .score-num { font-size: 38px; }
}

/* ============================================================
   AI TUTOR (GEMINI ASSISTANT) STYLES
   ============================================================ */
.tutor-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 250;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #7C5CFC, #4A6CF7);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 9999px;
  padding: 12px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 30px rgba(124,92,252,0.45);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  animation: pulseGlow 3s infinite ease-in-out;
}

.tutor-fab:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 35px rgba(124,92,252,0.6);
}

.tutor-fab-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 8px 25px rgba(124,92,252,0.4); }
  50% { box-shadow: 0 8px 35px rgba(74,108,247,0.7); }
}

/* Tutor Chat Modal / Drawer */
.tutor-modal {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 420px;
  max-width: calc(100vw - 32px);
  height: 580px;
  max-height: calc(100vh - 48px);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(124,92,252,0.2);
  z-index: 290;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUpTutor 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpTutor {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tutor-header {
  padding: 16px 20px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tutor-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tutor-avatar-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7C5CFC, #00D2FF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  box-shadow: 0 2px 10px rgba(124,92,252,0.4);
}

.tutor-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tutor-msg {
  display: flex;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 92%;
}

.tutor-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.tutor-msg.assistant {
  align-self: flex-start;
}

.tutor-bubble {
  padding: 12px 16px;
  border-radius: var(--r-md);
  word-break: break-word;
}

.tutor-msg.user .tutor-bubble {
  background: var(--grad-brand);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.tutor-msg.assistant .tutor-bubble {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--ink);
  border-bottom-left-radius: 2px;
}

.tutor-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(0,0,0,0.15);
  border-top: 1px solid var(--border);
}

.tutor-sug-chip {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
}

.tutor-sug-chip:hover {
  background: var(--card-hover);
  color: var(--ink);
  border-color: var(--purple-1);
}

.tutor-footer {
  padding: 12px 16px;
  background: var(--bg-3);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.tutor-input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-family: var(--font-body);
  outline: none;
}

.tutor-input:focus {
  border-color: var(--purple-1);
}

/* AI Question Explanation Box */
.ai-expl-card {
  margin-top: 20px;
  background: linear-gradient(135deg, rgba(124,92,252,0.08) 0%, rgba(74,108,247,0.04) 100%);
  border: 1px solid rgba(124,92,252,0.3);
  border-radius: var(--r-md);
  padding: 20px;
  animation: fadeIn 0.4s ease;
}

.ai-expl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124,92,252,0.2);
  color: #C4B5FD;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(124,92,252,0.4);
}

.ai-expl-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.ai-expl-content b, .ai-expl-content strong {
  color: var(--ink);
}

.ai-expl-content p {
  margin-bottom: 10px;
}

/* ============================================================
   AUTHENTICATION VIEW (LOGIN & CADASTRO)
   ============================================================ */
.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 40px);
  padding: 40px 18px;
}

.auth-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 38px 34px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,252,0.35), transparent 70%);
  pointer-events: none;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
}

.auth-brand-dot {
  width: 38px;
  height: 38px;
  font-size: 18px;
  margin: 0 auto 12px;
}

.auth-brand-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.auth-sub {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin-bottom: 20px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-3);
  padding: 4px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}

.auth-tab-btn {
  flex: 1;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: var(--r-sm);
  border: none;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all var(--t-fast);
}

.auth-tab-btn:hover { color: var(--ink-soft); }
.auth-tab-btn.active {
  background: var(--purple-3);
  color: #fff;
  box-shadow: 0 2px 10px rgba(109,40,217,0.4);
}

.auth-form {
  margin-top: 20px;
  position: relative;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 22px 0 16px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  padding: 0 12px;
}

.demo-accounts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.demo-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: left;
  transition: all var(--t-fast);
}

.demo-btn:hover {
  border-color: var(--purple-1);
  transform: translateY(-2px);
  background: var(--card-hover);
}

.demo-badge {
  font-size: 10.5px;
  font-weight: 800;
  margin-bottom: 2px;
}

.demo-pro .demo-badge { color: var(--amber); }
.demo-premium .demo-badge { color: #00D2FF; }
.demo-free .demo-badge { color: var(--ink-soft); }

.demo-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.demo-meta {
  font-size: 10px;
  color: var(--ink-muted);
  margin-top: 3px;
}

.auth-plan-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.auth-plan-card {
  border: 1.5px solid var(--border);
  background: var(--card);
  border-radius: var(--r-md);
  padding: 14px 8px 10px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all var(--t-fast);
}

.auth-plan-card:hover {
  border-color: rgba(124,92,252,0.4);
}

.auth-plan-card.active {
  border-color: var(--purple-1);
  background: rgba(124,92,252,0.12);
  box-shadow: 0 0 16px rgba(124,92,252,0.25);
}

.ap-ribbon {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-gold);
  color: #fff;
  font-size: 8.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--r-full);
  white-space: nowrap;
}

.ap-badge {
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 2px;
}

.ap-price {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}

.ap-price span {
  font-size: 10px;
  color: var(--ink-muted);
}

.ap-desc {
  font-size: 10px;
  color: var(--ink-muted);
  margin-top: 4px;
  line-height: 1.3;
}

.auth-footer-note {
  font-size: 11.5px;
  color: var(--ink-muted);
  text-align: center;
  margin-top: 20px;
  line-height: 1.5;
}

/* ============================================================
   ÁREA MEU PLANO
   ============================================================ */
.chip-plan-badge {
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  padding: 2px 7px;
  border-radius: var(--r-full);
  letter-spacing: 0.02em;
}

.myplan-card {
  background: linear-gradient(135deg, #1E1550 0%, #13102A 100%);
  border: 1px solid rgba(124,92,252,0.3);
  border-radius: var(--r-xl);
  padding: 28px 30px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md), 0 0 30px rgba(124,92,252,0.15);
  position: relative;
  overflow: hidden;
}

.myplan-card::before {
  content: '';
  position: absolute;
  right: -50px; top: -50px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,252,0.2), transparent 70%);
  pointer-events: none;
}

.myplan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.myplan-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.myplan-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.myplan-desc {
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 520px;
  line-height: 1.6;
}

.myplan-price-box {
  text-align: right;
}

.myplan-price {
  font-size: 28px;
  font-weight: 900;
  color: var(--ink);
  font-family: var(--font-display);
}

.myplan-price sub {
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 500;
}

.myplan-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--mint);
  margin-top: 4px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}

.myplan-meta-row {
  display: flex;
  gap: 24px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.myplan-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meta-lbl {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.meta-val {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.myplan-upgrade-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,138,61,0.12);
  border: 1px solid rgba(255,138,61,0.3);
  border-radius: var(--r-md);
  padding: 14px 20px;
  margin-top: 20px;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.myplan-upgrade-banner b {
  display: block;
  font-size: 14px;
  color: #fff;
  margin-bottom: 2px;
}

.myplan-upgrade-banner span {
  font-size: 12.5px;
  color: rgba(255,255,255,0.85);
}

/* Quotas Grid */
.quota-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.quota-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
}

.quota-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.quota-track {
  height: 7px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: 8px;
}

.quota-fill {
  height: 100%;
  border-radius: var(--r-full);
  transition: width 0.6s ease;
}

.quota-note {
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* Plans Comparison Grid */
.plans-comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.plan-card-compare {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--t-fast);
}

.plan-card-compare:hover {
  border-color: rgba(124,92,252,0.4);
}

.plan-card-compare.featured {
  border-color: var(--purple-1);
  background: rgba(124,92,252,0.08);
  box-shadow: 0 0 30px rgba(124,92,252,0.2);
}

.plan-card-compare.current-active {
  border-color: var(--mint);
  box-shadow: 0 0 20px rgba(16,217,120,0.18);
}

.plan-popular-tag {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-brand);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.plan-current-tag {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--mint);
  color: #0D0B1E;
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--r-full);
  text-transform: uppercase;
}

.plan-badge-icon {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  width: fit-content;
}

.plan-name-c {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}

.plan-price-c {
  font-size: 26px;
  font-weight: 900;
  color: var(--ink);
  font-family: var(--font-display);
  margin-bottom: 4px;
}

.plan-price-c sub {
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 500;
}

.plan-desc-c {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 18px;
  min-height: 38px;
  line-height: 1.5;
}

.plan-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  flex: 1;
}

.plan-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.plan-features-list li span {
  color: var(--mint);
  font-weight: 800;
}

.plan-action-box {
  margin-top: auto;
}

/* Modals Upgrade & User Menu */
.upgrade-modal-box {
  max-width: 480px;
  padding: 28px 24px;
}

.upgrade-price-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin-bottom: 16px;
}

.upgrade-features-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
}

.pay-method-opt {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  background: var(--card);
}

.pay-method-opt.active {
  border-color: var(--purple-1);
  background: rgba(124,92,252,0.1);
}

.user-menu-box {
  max-width: 360px;
  padding: 20px;
}

.user-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.user-menu-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: transparent;
  border: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: all var(--t-fast);
}

.user-menu-item:hover {
  background: var(--card-hover);
}

.umi-icon { font-size: 20px; }
.umi-title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.umi-sub { font-size: 11px; color: var(--ink-muted); }

/* Responsive adjustments for Auth and Meu Plano */
@media (max-width: 768px) {
  .quota-grid { grid-template-columns: 1fr; }
  .plans-comparison-grid { grid-template-columns: 1fr; }
  .auth-plan-selector { grid-template-columns: 1fr; }
  .demo-accounts-grid { grid-template-columns: 1fr; }
  .myplan-price-box { text-align: left; margin-top: 10px; width: 100%; }
  .myplan-status { justify-content: flex-start; }
}


