*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-2: #151515;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.22);
  --text: #ffffff;
  --muted: #a3a3a3;
  --accent: #2563eb;
  --accent-2: #3b82f6;
  --accent-soft: rgba(37, 99, 235, 0.18);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.16);
  --danger: #ef4444;
  --input-bg: #0a0a0a;
  --topbar-bg: rgba(0, 0, 0, 0.78);
  --glow-1: rgba(37, 99, 235, 0.18);
  --glow-2: rgba(239, 68, 68, 0.1);
  --shadow: rgba(0, 0, 0, 0.6);
  --radius: 16px;
  --grad: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --border: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.22);
  --text: #0a0a0a;
  --muted: #525252;
  --accent: #1d4ed8;
  --accent-2: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --red: #dc2626;
  --red-soft: rgba(220, 38, 38, 0.1);
  --danger: #dc2626;
  --input-bg: #ffffff;
  --topbar-bg: rgba(255, 255, 255, 0.85);
  --glow-1: rgba(37, 99, 235, 0.07);
  --glow-2: rgba(239, 68, 68, 0.05);
  --shadow: rgba(0, 0, 0, 0.12);
  color-scheme: light;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 520px at 88% -8%, var(--glow-1), transparent 62%),
    radial-gradient(900px 480px at -12% 6%, var(--glow-2), transparent 58%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  transition: background-color 0.35s ease, color 0.35s ease;
}

a { color: inherit; }
img { max-width: 100%; }
::selection { background: rgba(37, 99, 235, 0.42); }

/* ---------- animacoes ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes barIn {
  from { width: 0; }
}
@keyframes pop {
  0% { transform: scale(0.72); }
  55% { transform: scale(1.22); }
  100% { transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 18px 44px rgba(37, 99, 235, 0.38); }
  50% { box-shadow: 0 24px 64px rgba(239, 68, 68, 0.4); }
}
@keyframes brandShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}
@keyframes rippleOut {
  from { transform: scale(0); opacity: 0.5; }
  to { transform: scale(1); opacity: 0; }
}
@keyframes tabPop {
  0% { transform: scale(0.86); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

#app > * {
  animation: fadeUp 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
@media (max-width: 480px) {
  .brand-logo { width: 26px; height: 26px; }
}

.brand span {
  background: linear-gradient(120deg, #ef4444, #dc2626, #ef4444);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brandShift 7s ease infinite;
}

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

.user-chip {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
}
.user-chip img { width: 100%; height: 100%; object-fit: cover; }
.user-chip:hover { transform: scale(1.08); box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4); }

.navlink {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 4px;
  transition: color 0.15s;
}
.navlink:hover { color: var(--text); }

.link { color: var(--accent-2); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.link:hover { text-decoration: underline; }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  transition: color 0.15s, border-color 0.15s, transform 0.15s, background 0.15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.icon-btn:disabled:hover { background: transparent; border-color: var(--border); }

.key-input {
  width: 190px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
}

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px 40px;
  flex: 1;
}

.foot {
  padding-top: 0;
  padding-bottom: 108px;
  color: var(--muted);
  font-size: 0.82rem;
}
.foot a { color: var(--muted); transition: color 0.15s; }
.foot a:hover { color: var(--text); }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ---------- botoes ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--grad);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.15s;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(37, 99, 235, 0.38); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn.ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn.ghost::after { display: none; }
.btn.ghost:hover { border-color: var(--border-strong); box-shadow: none; }
.btn.danger { color: var(--danger); border-color: rgba(239, 68, 68, 0.3); }
.btn.danger:hover { background: var(--red-soft); border-color: rgba(239, 68, 68, 0.5); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }
.btn:disabled::after { display: none; }

.small-btn { padding: 8px 12px; font-size: 0.85rem; border-radius: 9px; }

/* ripple */
.ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%);
  animation: rippleOut 0.6s ease-out forwards;
}

/* ---------- barra de progresso ---------- */
.bar { height: 6px; border-radius: 999px; background: rgba(128, 140, 170, 0.18); overflow: hidden; }
.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d4ed8, #3b82f6);
  transition: width 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
  animation: barIn 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 34px 0 16px;
}
.section-head h2 { margin: 0; font-size: 1.15rem; letter-spacing: -0.01em; }

/* ---------- hero ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(20px, 4vw, 40px);
  border-radius: 22px;
  border: 1px solid var(--border);
  background:
    radial-gradient(520px 260px at 92% 0%, rgba(37, 99, 235, 0.26), transparent 70%),
    radial-gradient(420px 220px at 60% 120%, rgba(239, 68, 68, 0.13), transparent 70%),
    var(--surface);
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad);
  opacity: 0.85;
}
.hero h1 { margin: 0 0 6px; font-size: clamp(1.5rem, 3.4vw, 2.3rem); letter-spacing: -0.03em; line-height: 1.15; }
.hero p { margin: 0 0 18px; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 10px;
}
.hero-art {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.38);
  animation: float 6s ease-in-out infinite, pulseGlow 4.5s ease-in-out infinite;
}
.hero-art span { transform: translateX(3px); }
@media (max-width: 560px) { .hero-art { display: none; } }

/* ---------- estatisticas ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.2s, transform 0.2s;
}
.stat:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat-num {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--text), var(--muted));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-num.time { font-size: 1.25rem; }
.stat-sub { font-size: 0.9rem; font-weight: 600; color: var(--muted); -webkit-text-fill-color: var(--muted); margin-left: 2px; }
.stat-label { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }

/* ---------- filtros ---------- */
.filters { display: grid; gap: 12px; margin-bottom: 18px; }
.search {
  width: 100%;
  max-width: 420px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search:focus { border-color: rgba(37, 99, 235, 0.65); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.chip:active { transform: scale(0.95); }
.chip.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

/* ---------- grade de cursos ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.card-wrap {
  position: relative;
  animation: fadeUp 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 20px 48px var(--shadow);
}

.card-cover { aspect-ratio: 16 / 9; background: var(--surface-2); position: relative; overflow: hidden; }
.card-cover img, .course-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.card:hover .card-cover img { transform: scale(1.06); }
.card-cover.fallback, .course-cover.fallback {
  display: grid;
  place-items: center;
  background:
    radial-gradient(300px 140px at 20% 0%, rgba(37, 99, 235, 0.3), transparent 70%),
    linear-gradient(135deg, #14213c, #0f1830);
}
[data-theme="light"] .card-cover.fallback, [data-theme="light"] .course-cover.fallback {
  background:
    radial-gradient(300px 140px at 20% 0%, rgba(37, 99, 235, 0.18), transparent 70%),
    linear-gradient(135deg, #dfe8f9, #eef3fb);
}
.card-cover.fallback::after, .course-cover.fallback::after {
  content: attr(data-letter);
  font-size: 3rem;
  font-weight: 800;
  color: rgba(59, 130, 246, 0.3);
}
[data-theme="light"] .card-cover.fallback::after, [data-theme="light"] .course-cover.fallback::after {
  color: rgba(37, 99, 235, 0.25);
}

.card-body { padding: 16px; display: grid; gap: 10px; align-content: start; }
.card-body h3 { margin: 0; font-size: 1.02rem; letter-spacing: -0.01em; }
.card-body p { margin: 0; }

.badge {
  display: inline-block;
  align-self: start;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.32);
  background: var(--red-soft);
  color: #fca5a5;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
[data-theme="light"] .badge { color: #b91c1c; }

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.2s, border-color 0.2s, transform 0.2s, background 0.2s;
}
.fav-btn:hover { color: #fbbf24; border-color: rgba(251, 191, 36, 0.5); transform: scale(1.1); }
.fav-btn.on { color: #fbbf24; border-color: rgba(251, 191, 36, 0.55); background: rgba(30, 24, 8, 0.6); }
.fav-btn.pop { animation: pop 0.5s cubic-bezier(0.2, 0.7, 0.3, 1); }

/* ---------- pagina do curso ---------- */
.back {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 18px;
  transition: color 0.15s, transform 0.15s;
}
.back:hover { color: var(--text); }
.back:active { transform: translateX(-2px); }

.course-head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 26px;
}
.course-cover { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.course-info h1 { margin: 8px 0 8px; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.02em; }
.course-info p { margin: 0 0 10px; }
.course-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 720px) { .course-head { grid-template-columns: 1fr; } }

.section-group { margin-bottom: 26px; }
.group-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.group-title span { font-weight: 400; }

.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lesson-list > li {
  animation: fadeUp 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.lesson-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.lesson-row:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateX(4px); }
.lesson-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--border);
}
.lesson-num.done { color: #fff; background: linear-gradient(135deg, #1d4ed8, #3b82f6); border: none; }
.lesson-name { flex: 1; font-weight: 500; }
.lesson-dur { white-space: nowrap; }
.lesson-play { color: var(--muted); font-size: 0.85rem; }
.note-count {
  font-size: 0.75rem;
  color: var(--accent-2);
  border: 1px solid rgba(59, 130, 246, 0.34);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- player ---------- */
.player-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}
@media (max-width: 900px) {
  .player-page { grid-template-columns: 1fr; }
  .playlist { position: static !important; max-height: none !important; }
}

.video-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.video-wrap video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; animation: fadeIn 0.5s ease both; }

.player-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.12s, background 0.15s;
}
.tool-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.tool-btn:active { transform: scale(0.93); }

.tool-speed {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
}
.tool-speed select {
  width: auto;
  padding: 4px 6px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
}

.next-card {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  background: var(--accent-soft);
  animation: slideDown 0.35s ease both;
}
.next-card span { flex: 1; font-size: 0.92rem; }
.next-card .btn { padding: 8px 14px; font-size: 0.85rem; }

.player-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.player-head h1 { margin: 0 0 4px; font-size: clamp(1.25rem, 2.6vw, 1.7rem); letter-spacing: -0.02em; }
.player-head p { margin: 0; }
.player-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.pop { animation: pop 0.5s cubic-bezier(0.2, 0.7, 0.3, 1); }

.playlist {
  position: sticky;
  top: 84px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  max-height: calc(100vh - 110px);
  overflow: auto;
}
.playlist h2 { margin: 0 0 12px; font-size: 0.95rem; letter-spacing: -0.01em; }
.playlist ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.playlist li {
  animation: fadeUp 0.4s ease both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
.playlist .pl-section {
  margin: 10px 0 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.playlist li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.playlist li a:hover { background: var(--surface-2); transform: translateX(3px); }
.playlist li.active a { background: var(--surface-2); border-color: var(--border-strong); }
.pl-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--border);
}
.pl-num.done { color: #fff; background: linear-gradient(135deg, #1d4ed8, #3b82f6); border: none; }
.pl-name { flex: 1; font-size: 0.88rem; line-height: 1.35; }
.playlist .pl-dur { color: var(--muted); white-space: nowrap; }

/* ---------- anotacoes ---------- */
.notes-panel {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.notes-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.notes-head h2 { margin: 0; font-size: 1.05rem; letter-spacing: -0.01em; }
.note-form { display: flex; gap: 10px; margin-bottom: 16px; }
.note-form input {
  flex: 1;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.note-form input:focus { border-color: rgba(37, 99, 235, 0.65); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18); }
.note-form .btn { white-space: nowrap; }
@media (max-width: 560px) { .note-form { flex-direction: column; } }

.notes-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.note-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(128, 140, 170, 0.05);
  animation: fadeUp 0.35s ease both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
.note-item.new { animation: pop 0.5s cubic-bezier(0.2, 0.7, 0.3, 1), fadeUp 0.35s ease both; }
.note-item.removing { opacity: 0; transform: translateX(10px); transition: opacity 0.2s, transform 0.2s; }
.note-jump {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid rgba(59, 130, 246, 0.38);
  background: var(--accent-soft);
  color: var(--accent-2);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.15s, transform 0.12s;
}
.note-jump:hover { background: rgba(59, 130, 246, 0.22); }
.note-jump:active { transform: scale(0.92); }
.note-text { flex: 1; font-size: 0.9rem; white-space: pre-wrap; word-break: break-word; }
.note-del { width: 28px; height: 28px; font-size: 0.72rem; }
.notes-empty { padding: 6px 2px; }

/* ---------- aba anotacoes (agrupadas) ---------- */
.notes-group { margin-bottom: 26px; }
.notes-group .group-title { justify-content: space-between; }
.notes-tab-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notes-tab-list > li {
  animation: fadeUp 0.4s ease both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
.note-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.note-link:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateX(4px); }
.note-time-chip {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid rgba(239, 68, 68, 0.34);
  background: var(--red-soft);
  color: #fca5a5;
  font-size: 0.76rem;
  font-weight: 700;
}
[data-theme="light"] .note-time-chip { color: #b91c1c; }
.note-body { display: grid; gap: 2px; min-width: 0; }
.note-body strong { font-size: 0.92rem; font-weight: 600; }
.note-body .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- conta / auth ---------- */
.auth-wrap { display: grid; place-items: center; padding: 20px 0 40px; }
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 30px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(37, 99, 235, 0.16), transparent 70%),
    radial-gradient(300px 180px at 0% 100%, rgba(239, 68, 68, 0.09), transparent 70%),
    var(--surface);
  box-shadow: 0 26px 70px var(--shadow);
  animation: fadeUp 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.auth-head h1 { margin: 0 0 4px; font-size: 1.5rem; letter-spacing: -0.02em; }
.auth-head p { margin: 0 0 20px; }
.auth-form { margin-top: 4px; }
.auth-form label { display: grid; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.auth-form input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-form input:focus { border-color: rgba(37, 99, 235, 0.65); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18); }
.auth-form .btn { margin-top: 4px; width: 100%; }
.form-error {
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: var(--red-soft);
  color: #fca5a5;
  font-size: 0.84rem;
}
[data-theme="light"] .form-error { color: #b91c1c; }
.shake { animation: shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }

.google-btn {
  width: 100%;
  background: #fff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #1f2937;
}
.google-btn:hover { box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18); }
.google-btn::after { display: none; }
.google-off {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed var(--border-strong);
  background: rgba(128, 140, 170, 0.06);
  line-height: 1.45;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-switch { margin-top: 16px; text-align: center; font-size: 0.88rem; color: var(--muted); }
.link-btn {
  border: none;
  background: none;
  padding: 0;
  color: var(--accent-2);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s;
}
.link-btn:hover { color: var(--red); text-decoration: underline; }
.auth-note { margin: 18px 0 0; text-align: center; line-height: 1.45; }

/* ---------- perfil ---------- */
.profile-page { display: grid; gap: 18px; max-width: 720px; margin: 0 auto; }
.profile-card {
  padding: 30px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background:
    radial-gradient(460px 220px at 100% 0%, rgba(37, 99, 235, 0.18), transparent 70%),
    radial-gradient(320px 180px at 0% 100%, rgba(239, 68, 68, 0.1), transparent 70%),
    var(--surface);
  text-align: center;
  animation: fadeUp 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.profile-card h1 { margin: 14px 0 2px; font-size: 1.45rem; letter-spacing: -0.02em; }
.profile-card p { margin: 0 0 12px; }
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 84px; height: 84px; margin: 0 auto; font-size: 2rem; box-shadow: 0 14px 36px rgba(37, 99, 235, 0.35); }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- painel / admin ---------- */
.admin { max-width: 980px; }
.admin-top { margin-bottom: 22px; }
.admin-top h1 { margin: 0 0 6px; font-size: 1.6rem; letter-spacing: -0.02em; }
.admin-top p { margin: 0; }

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
  margin-bottom: 18px;
}
.panel h2 { margin: 0 0 14px; font-size: 1.05rem; letter-spacing: -0.01em; }

.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row.three { grid-template-columns: 1.2fr 0.9fr 1fr; align-items: end; }
@media (max-width: 760px) { .form-row, .form-row.three { grid-template-columns: 1fr; } }
.form label { display: grid; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--muted); }

input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
input[type="file"] { padding: 8px; color: var(--muted); }
input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.course-admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.course-admin-head h2 { margin: 0 0 2px; }
.course-admin-head p { margin: 0; }

.sections-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0 14px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 14px;
}
.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.8rem;
  animation: fadeIn 0.3s ease both;
}
.pill-x {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.pill-x:hover { color: var(--danger); background: var(--red-soft); }
.add-section { display: inline-flex; gap: 6px; align-items: center; }
.add-section input {
  width: 130px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

.admin-lessons { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.admin-lessons li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(128, 140, 170, 0.04);
  animation: fadeUp 0.3s ease both;
}
.al-sec {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.al-name { flex: 1; font-size: 0.92rem; }
.al-move { display: inline-flex; gap: 4px; }

.section-pill, .al-sec { color: var(--muted); }

.upload-status { display: grid; gap: 6px; }
.upload-status[hidden] { display: none; }

/* ---------- tabbar ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(14px, env(safe-area-inset-bottom));
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  animation: slideDown 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  max-width: calc(100vw - 20px);
}
[data-theme="light"] .tabbar { background: rgba(255, 255, 255, 0.9); }

.tab {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 62px;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  overflow: hidden;
  transition: color 0.2s, background 0.2s, transform 0.15s;
}
.tab svg { width: 20px; height: 20px; transition: transform 0.2s; }
.tab:hover { color: var(--text); background: rgba(128, 140, 170, 0.1); }
.tab:active svg { transform: scale(0.88); }
.tab.active { color: #fff; background: linear-gradient(135deg, var(--accent), #1d4ed8); }
.tab.active svg { animation: tabPop 0.35s cubic-bezier(0.2, 0.7, 0.3, 1); }
.tab.active::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 30%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
}
@media (max-width: 420px) {
  .tab { min-width: 0; padding: 8px 9px; font-size: 0.6rem; }
  .tab svg { width: 19px; height: 19px; }
}

/* ---------- estados ---------- */
.empty {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.small-empty { padding: 40px 20px; }
.empty-art { font-size: 2rem; color: var(--muted); margin-bottom: 8px; }
.empty h3 { margin: 0 0 8px; }
.empty p { margin: 0 0 20px; }

.loading { display: grid; place-items: center; min-height: 40vh; }
.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(128, 140, 170, 0.2);
  border-top-color: var(--accent-2);
  border-right-color: var(--red);
  animation: spin 0.8s linear infinite;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 90;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.9rem;
  box-shadow: 0 18px 50px var(--shadow);
  max-width: min(90vw, 480px);
}
.toast.show { animation: toastIn 0.35s cubic-bezier(0.2, 0.7, 0.3, 1) both; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

@media (max-width: 480px) {
  .container { padding: 22px 14px 32px; }
  .brand { font-size: 1.05rem; }
  .hero { padding: 24px 20px; }
  .card-body { padding: 14px; }
  .key-input { width: 130px; }
  .player-actions { width: 100%; }
  .auth-card { padding: 22px; }
  .profile-card { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- loja: preço e bloqueio ---------- */
.card-wrap { position: relative; }
.price-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.price-tag.owned {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  font-size: 0.72rem;
}
.owned-line {
  margin: 4px 0 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #22c55e;
}
.lesson-lock { font-size: 0.85rem; opacity: 0.75; }
.lock-note { margin: 6px 0 0; font-size: 0.85rem; color: var(--muted); }

/* ---------- paywall ---------- */
.paywall {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  animation: fadeUp 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.paywall-cover { min-height: 220px; background: var(--surface-2); overflow: hidden; position: relative; }
.paywall-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.paywall-body { padding: 26px 24px; display: grid; gap: 10px; align-content: center; }
.paywall-body h1 { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.9rem); letter-spacing: -0.02em; }
.paywall-body p { margin: 0; }
.price-big {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #ef4444, #dc2626);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.paywall-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
@media (max-width: 720px) {
  .paywall { grid-template-columns: 1fr; }
  .paywall-cover { min-height: 0; aspect-ratio: 16 / 9; }
}

/* ---------- checkout ---------- */
.checkout-page { display: grid; gap: 16px; margin-top: 8px; }
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
}
.checkout-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid;
  gap: 12px;
  animation: fadeUp 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.checkout-card h1 { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.7rem); letter-spacing: -0.02em; }
.checkout-card code {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.8rem;
}
.checkout-summary {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid;
  gap: 10px;
  position: sticky;
  top: 16px;
}
.checkout-summary h2 { margin: 0; font-size: 1.05rem; }
.checkout-cover { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.checkout-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.checkout-total strong { font-size: 1.35rem; letter-spacing: -0.02em; }
.checkout-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.checkout-actions .btn { flex: 0 1 auto; }
.checkout-check {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  animation: popIn 0.4s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.checkout-card.success { justify-items: start; }
.checkout-steps { margin: 4px 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); font-size: 0.92rem; }
.checkout-steps strong { color: var(--text); }
.pix-box {
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed rgba(59, 130, 246, 0.5);
  background: var(--accent-soft);
  display: grid;
  gap: 10px;
}
.pix-box h2 { margin: 0; font-size: 0.98rem; }
.pix-code {
  width: 100%;
  resize: vertical;
  min-height: 84px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  word-break: break-all;
}
.pix-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pix-off {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: var(--red-soft);
}
.pix-off p { margin: 4px 0 0; }

/* metodos de pagamento */
.pay-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}
.pay-method {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.pay-method:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.pay-method.active {
  border-color: rgba(59, 130, 246, 0.75);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
}
.pay-method.is-off { opacity: 0.42; cursor: not-allowed; }
.pay-method-label { font-weight: 700; font-size: 0.9rem; letter-spacing: -0.01em; }
.pay-method-sub { color: var(--muted); font-size: 0.72rem; }
.pay-panels { display: grid; gap: 10px; }
.pay-panel { display: grid; gap: 12px; }
.pay-info { display: grid; gap: 4px; }
.pay-info h2 { margin: 0; font-size: 1rem; }
.pay-info p { margin: 0; }
@media (max-width: 820px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
  .pay-methods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .pay-methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- minhas compras ---------- */
.my-orders { display: grid; gap: 10px; }
.my-orders h2 { margin: 0 0 4px; font-size: 1.05rem; }
.orders-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.order-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.order-info { display: grid; gap: 2px; flex: 1 1 180px; }
.order-amount { font-weight: 800; letter-spacing: -0.01em; }
.order-item.paid { border-color: rgba(34, 197, 94, 0.35); }
.order-item.review { border-color: rgba(59, 130, 246, 0.45); }

/* ---------- créditos e contato ---------- */
.credits-hero { margin: 8px 0 18px; animation: fadeUp 0.4s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.credits-hero h1 { margin: 4px 0 6px; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.03em; }
.credits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.contact-card { display: grid; gap: 10px; }
.contact-card h2, .credits-grid h2 { margin: 0 0 4px; font-size: 1.05rem; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}
.contact-row:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.contact-icon {
  flex: 0 0 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
}
.contact-text { display: grid; gap: 1px; min-width: 0; }
.contact-text span { overflow-wrap: anywhere; }
.credits-list { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); font-size: 0.92rem; }
.credits-list strong { color: var(--text); }

/* ---------- admin: pedidos e preço ---------- */
.admin-orders { display: grid; gap: 10px; }
.admin-order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.admin-order {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.admin-order.pago { border-color: rgba(34, 197, 94, 0.4); }
.admin-order.cancelado { opacity: 0.65; }
.status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--border-strong);
  color: var(--muted);
}
.status-pill.pago { color: #22c55e; border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.1); }
.status-pill.pendente { color: var(--accent-2); border-color: rgba(59, 130, 246, 0.4); background: var(--accent-soft); }
.status-pill.cancelado { color: var(--red); border-color: rgba(239, 68, 68, 0.4); background: var(--red-soft); }
.price-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.price-form label {
  display: grid;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.price-form input[type="number"] {
  width: 110px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.check-line { display: flex !important; align-items: center; gap: 7px; padding-bottom: 9px; }
.check-line input { accent-color: var(--accent); }

/* ---------- tabbar: 6 abas ---------- */
@media (max-width: 640px) {
  .tabbar { gap: 2px; padding: 6px; }
  .tab { flex: 1 1 auto; min-width: 0; padding: 8px 8px; font-size: 0.6rem; }
  .tab svg { width: 18px; height: 18px; }
}
@media (max-width: 380px) {
  .tab { padding: 7px 6px; font-size: 0.55rem; }
  .tab svg { width: 17px; height: 17px; }
}
@media (max-width: 340px) {
  .tab span { display: none; }
  .tab { padding: 10px 9px; }
}

/* CTA vermelho da paleta (azul, vermelho, preto, branco) */
.btn.cta-red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
}
.btn.cta-red:hover { box-shadow: 0 12px 34px rgba(239, 68, 68, 0.45); }
