:root {
  --bg: #0b0e14;
  --bg-2: #121722;
  --card: #161c28;
  --card-2: #1c2432;
  --border: #262f40;
  --text: #e7ecf3;
  --muted: #8b96a8;
  --brand: #4f7cff;
  --brand-2: #6c8cff;
  --accent: #22c55e;
  --danger: #ef4444;
  --warn: #f59e0b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 100% -10%, #16203a 0%, transparent 55%), var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 460px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,14,20,.8); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -.3px; display: flex; align-items: center; gap: 9px; }
.brand .dot { width: 11px; height: 11px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--accent)); box-shadow: 0 0 12px var(--brand); }
.nav-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-links a { color: var(--muted); padding: 8px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); background: var(--card); text-decoration: none; }
.nav-links a.active { color: var(--text); background: var(--card-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; transition: .15s; text-decoration: none;
  background: var(--card-2); color: var(--text);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 6px 18px rgba(79,124,255,.35); }
.btn-primary:hover { color: #fff; }
.btn-success { background: linear-gradient(135deg, #16a34a, #22c55e); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-danger { background: transparent; border-color: #5b2b2b; color: #ff8b8b; }
.btn-danger:hover { background: rgba(239,68,68,.12); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card-pad-0 { padding: 0; overflow: hidden; }

/* Forms */
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
input, textarea, select {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  font-size: 15px; font-family: inherit; transition: .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,124,255,.18); }
textarea { min-height: 90px; resize: vertical; }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.check-row input { width: auto; }
.check-row label { margin: 0; }

/* Grid */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* Course card */
.course-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .18s; display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-3px); border-color: #34405a; text-decoration: none; }
.course-card .cover { aspect-ratio: 16/9; background: linear-gradient(135deg, #1a2336, #0f1520); object-fit: cover; width: 100%; }
.course-card .body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.course-card h3 { margin: 0 0 6px; font-size: 17px; color: var(--text); }
.course-card p { color: var(--muted); font-size: 14px; margin: 0 0 14px; flex: 1; }

/* Progress */
.progress { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 99px; transition: width .4s; }

/* Badges & pills */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.badge-green { background: rgba(34,197,94,.14); color: #4ade80; }
.badge-yellow { background: rgba(245,158,11,.14); color: #fbbf24; }
.badge-red { background: rgba(239,68,68,.14); color: #f87171; }
.badge-gray { background: var(--card-2); color: var(--muted); }
.price { font-size: 28px; font-weight: 800; letter-spacing: -.5px; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
tr:hover td { background: var(--card-2); }

/* Flash */
.flash { padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; font-weight: 500; border: 1px solid; }
.flash-error { background: rgba(239,68,68,.1); border-color: #5b2b2b; color: #ffb4b4; }
.flash-success { background: rgba(34,197,94,.1); border-color: #245b35; color: #9ff0b8; }

/* Layout helpers */
.page { padding: 34px 0 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 30px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.spacer { flex: 1; }
.center { text-align: center; }
.hr { height: 1px; background: var(--border); border: 0; margin: 22px 0; }

/* Stat cards */
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat .n { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* Player layout */
.player { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
@media (max-width: 900px) { .player { grid-template-columns: 1fr; } }
.video-wrap { aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.video-wrap iframe, .video-wrap video { width: 100%; height: 100%; border: 0; }
.lesson-list { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; max-height: 70vh; overflow-y: auto; }
.mod-title { padding: 12px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); background: var(--bg-2); font-weight: 700; }
.lesson-item { display: flex; align-items: center; gap: 11px; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 14px; }
.lesson-item:hover { background: var(--card-2); text-decoration: none; }
.lesson-item.active { background: rgba(79,124,255,.12); border-left: 3px solid var(--brand); }
.lesson-item .tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; display: grid; place-items: center; font-size: 11px; }
.lesson-item .tick.done { background: var(--accent); border-color: var(--accent); color: #05230f; }
.lesson-item .dur { margin-left: auto; color: var(--muted); font-size: 12px; }

/* QR box */
.qr-box { display: inline-block; background: #fff; padding: 14px; border-radius: 14px; }
.qr-box img, .qr-box canvas { width: 240px; height: 240px; display: block; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-family: monospace; font-size: 12px; }

.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 9px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.list-plain li:last-child { border-bottom: 0; }
.dim { opacity: .6; }
/* Curso bloqueado (cadeado) */
.course-card.locked { opacity: .96; }
.course-card.locked .cover { filter: grayscale(.7) brightness(.5); }
.lock-overlay { position: absolute; inset: 0; display: grid; place-items: center; }
.lock-badge { background: rgba(0,0,0,.6); color: #fff; padding: 8px 14px; border-radius: 99px; font-size: 13px; font-weight: 700; border: 1px solid rgba(255,255,255,.2); }

/* Order bumps */
.bump { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px dashed var(--border); border-radius: 12px; margin-bottom: 10px; cursor: pointer; transition: .15s; }
.bump:hover { border-color: var(--brand); background: var(--card-2); }
.bump.checked { border-style: solid; border-color: var(--accent); background: rgba(34,197,94,.06); }
.bump input { width: auto; margin-top: 3px; }
.bump .bp { margin-left: auto; font-weight: 800; white-space: nowrap; }
.bump .bd { color: var(--muted); font-size: 13px; margin-top: 2px; }

.hero { padding: 40px 0 10px; }
.hero h1 { font-size: 40px; letter-spacing: -1px; margin: 0 0 12px; line-height: 1.1; }
.hero p { font-size: 18px; color: var(--muted); max-width: 620px; }
@media (max-width: 620px) { .hero h1 { font-size: 30px; } }
