/* ============================================================
   RescueWill – Master Stylesheet
   Theme: Industrial Rescue | Orange + Black
   ============================================================ */

/* ── Reset & Root ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base:        #080808;
  --bg-secondary:   #111111;
  --bg-card:        #181818;
  --bg-card-hover:  #222222;
  --bg-nav:         rgba(8,8,8,0.95);

  --orange:         #FF6B00;
  --orange-light:   #FF8C3A;
  --orange-dark:    #CC5200;
  --orange-glow:    rgba(255, 107, 0, 0.25);
  --orange-glow-lg: rgba(255, 107, 0, 0.45);

  --metallic:       #A0A0A0;
  --metallic-light: #D4D4D4;
  --metallic-dark:  #606060;

  --text-primary:   #FFFFFF;
  --text-secondary: #B3B3B3;
  --text-muted:     #707070;

  --border:         #2a2a2a;
  --border-light:   #333333;

  --success:  #2ECC71;
  --error:    #E74C3C;
  --warning:  #F39C12;
  --info:     #3498DB;

  --radius:    8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow:        0 4px 24px rgba(0,0,0,0.6);
  --shadow-orange: 0 0 30px var(--orange-glow);
  --shadow-card:   0 8px 32px rgba(0,0,0,0.5);

  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --nav-height: 70px;

  --font-main:    'Inter', 'Segoe UI', sans-serif;
  --font-display: 'Montserrat', 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ── Typography ──────────────────────────────────────────── */
h1,h2,h3,h4,h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }

.text-orange   { color: var(--orange); }
.text-muted    { color: var(--text-muted); }
.text-secondary{ color: var(--text-secondary); }
.text-center   { text-align: center; }

/* ── Container ───────────────────────────────────────────── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  text-transform: uppercase;
}
.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 0 20px var(--orange-glow);
}
.btn-primary:hover {
  background: var(--orange-light);
  box-shadow: 0 0 35px var(--orange-glow-lg);
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-light);
}
.btn-secondary:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.15); }
.btn-lg { padding: 16px 40px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 8px 18px; font-size: 0.8rem; }
.btn-icon { padding: 10px; width: 40px; height: 40px; justify-content: center; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.badge-new   { background: var(--orange); color: #fff; }
.badge-plan  { background: #1a472a; color: #2ECC71; border: 1px solid #2ECC71; }
.badge-free  { background: #0d3b5e; color: #3498DB; border: 1px solid #3498DB; }
.badge-level { padding: 2px 8px; font-size: 0.7rem; font-weight: 700; }

/* ── NAVBAR ──────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  transition: background var(--transition);
}
.navbar.scrolled { background: rgba(8,8,8,0.99); }

.navbar .container {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.navbar__logo-icon {
  width: 38px; height: 38px;
}
.navbar__logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
}
.navbar__logo-text span { color: var(--orange); }

.navbar__links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.navbar__links a {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.navbar__links a:hover, .navbar__links a.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.07);
}

.navbar__search {
  position: relative;
  flex: 1;
  max-width: 320px;
}
.navbar__search input {
  width: 100%;
  padding: 8px 16px 8px 40px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: var(--transition);
}
.navbar__search input:focus {
  outline: none;
  border-color: var(--orange);
  background: rgba(255,107,0,0.05);
}
.navbar__search svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-muted);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.navbar__notif {
  position: relative;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  transition: var(--transition);
  cursor: pointer;
}
.navbar__notif:hover { background: rgba(255,255,255,0.15); }
.navbar__notif svg { width: 18px; }
.navbar__notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--orange);
  border-radius: 50%;
  border: 2px solid var(--bg-base);
}

.navbar__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  object-fit: cover;
  cursor: pointer;
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--orange);
}

/* Dropdown */
.navbar__user { position: relative; }
.navbar__dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: var(--transition);
  z-index: 200;
}
.navbar__user:hover .navbar__dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.navbar__dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.navbar__dropdown a:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.07);
}
.navbar__dropdown hr { border-color: var(--border); margin: 6px 0; }
.navbar__dropdown a.danger { color: var(--error); }
.navbar__dropdown a svg { width: 16px; }

/* Mobile menu */
.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
  margin-left: auto;
}
.navbar__burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}
.navbar__burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.navbar__burger.open span:nth-child(2) { opacity: 0; }
.navbar__burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ── HERO (Landing) ──────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8,8,8,0.85) 0%,
    rgba(8,8,8,0.5) 50%,
    rgba(8,8,8,0.8) 100%
  );
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--orange-glow);
  border: 1px solid var(--orange);
  border-radius: 999px;
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 20px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.8);
}
.hero__title .highlight {
  color: var(--orange);
  position: relative;
}
.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 560px;
  line-height: 1.7;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 56px;
}
.hero__stats {
  display: flex;
  gap: 40px;
}
.hero__stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--orange);
  display: block;
}
.hero__stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── SECTION ─────────────────────────────────────────────── */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 16px;
}
.section__title {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section__title::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.4em;
  background: var(--orange);
  border-radius: 2px;
  flex-shrink: 0;
}
.section__link {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--transition);
}
.section__link:hover { color: var(--orange); }

/* ── COURSE CARD ─────────────────────────────────────────── */
.course-card {
  display: block;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.course-card:hover {
  border-color: var(--orange);
  transform: translateY(-6px);
  box-shadow: var(--shadow-orange);
}
.course-card__thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-secondary);
}
.course-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.course-card:hover .course-card__thumb img { transform: scale(1.08); }

.course-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}
.course-card:hover .course-card__overlay { opacity: 1; }

.btn-play {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--orange);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px var(--orange-glow-lg);
  transition: transform 0.2s;
}
.btn-play:hover { transform: scale(1.12); }
.btn-play svg {
  width: 18px; height: 18px;
  fill: #fff;
  margin-left: 3px;
}

.course-card__thumb .badge {
  position: absolute;
  top: 10px; left: 10px;
}

.course-card__info {
  padding: 16px;
}
.course-card__cat {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--orange);
  margin-bottom: 6px;
  display: block;
}
.course-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.course-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  gap: 8px;
}

/* ── COURSE ROW (Netflix scroll) ─────────────────────────── */
.course-row { margin-bottom: 48px; }
.course-row__track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* Scrollable variant */
.course-row--scroll .course-row__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.course-row--scroll .course-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
}
.course-row__track::-webkit-scrollbar { height: 4px; }
.course-row__track::-webkit-scrollbar-track { background: transparent; }
.course-row__track::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

/* ── HERO CARD (featured) ────────────────────────────────── */
.featured-hero {
  position: relative;
  height: 420px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 48px;
}
.featured-hero img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.featured-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8,8,8,0.95) 30%, rgba(8,8,8,0.2) 100%);
  display: flex;
  align-items: center;
  padding: 48px;
}
.featured-hero__content { max-width: 500px; }
.featured-hero__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}
.featured-hero__title { margin-bottom: 12px; }
.featured-hero__desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-hero__meta {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.featured-hero__actions { display: flex; gap: 12px; }

/* ── PROGRESS BAR ────────────────────────────────────────── */
.progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-bar__fill {
  height: 100%;
  background: var(--orange);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ── FORMS ───────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.form-label span.req { color: var(--orange); }

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition);
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--orange);
  background: rgba(255,107,0,0.04);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.12);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control.is-error { border-color: var(--error); }
.form-control.is-valid { border-color: var(--success); }

.form-control-icon { position: relative; }
.form-control-icon .form-control { padding-left: 42px; }
.form-control-icon svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.form-error {
  font-size: 0.78rem;
  color: var(--error);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 18px; height: 18px;
  flex-shrink: 0;
  accent-color: var(--orange);
  cursor: pointer;
  margin-top: 2px;
}
.form-check-label { font-size: 0.85rem; color: var(--text-secondary); }
.form-check-label a { color: var(--orange); text-decoration: underline; }

/* Password toggle */
.form-password { position: relative; }
.form-password .form-control { padding-right: 44px; }
.form-password__toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  transition: color var(--transition);
}
.form-password__toggle:hover { color: var(--text-primary); }

/* Password strength */
.password-strength { margin-top: 6px; }
.password-strength__bars {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}
.password-strength__bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.strength-0 .password-strength__bar:nth-child(1)                       { background: var(--error); }
.strength-1 .password-strength__bar:nth-child(-n+2)                    { background: var(--error); }
.strength-2 .password-strength__bar:nth-child(-n+3)                    { background: var(--warning); }
.strength-3 .password-strength__bar:nth-child(-n+4)                    { background: var(--success); }
.strength-4 .password-strength__bar                                     { background: var(--success); }
.password-strength__label { font-size: 0.75rem; color: var(--text-muted); }

/* ── AUTH LAYOUT ─────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  background: var(--bg-base);
}
.auth-visual {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: none;
}
@media (min-width: 1024px) { .auth-visual { display: block; } }
.auth-visual canvas { position: absolute; inset: 0; }
.auth-visual__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(8,8,8,0.7) 0%, rgba(255,107,0,0.15) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px;
}
.auth-visual__tagline {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  max-width: 400px;
}
.auth-visual__sub { color: var(--text-secondary); font-size: 1rem; }

.auth-form-panel {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 40px;
  overflow-y: auto;
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
  text-decoration: none;
}
.auth-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
}
.auth-logo-text span { color: var(--orange); }

.auth-title   { font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }
.auth-sub     { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 32px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.auth-footer a { color: var(--orange); font-weight: 600; }

/* ── ALERT / FLASH ───────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  border-left: 4px solid;
}
.alert svg { width: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: rgba(46,204,113,0.1);  border-color: var(--success); color: #a7f3c7; }
.alert-error   { background: rgba(231,76,60,0.1);   border-color: var(--error);   color: #fca5a5; }
.alert-warning { background: rgba(243,156,18,0.1);  border-color: var(--warning); color: #fde68a; }
.alert-info    { background: rgba(52,152,219,0.1);  border-color: var(--info);    color: #93c5fd; }

/* ── MODAL ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal__title { font-size: 1.25rem; font-weight: 700; }
.modal__close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.07);
  color: var(--text-secondary);
  transition: var(--transition);
}
.modal__close:hover { background: var(--error); color: #fff; }

/* ── CARD ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card-hover:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow-orange);
}

/* ── PLANS ───────────────────────────────────────────────── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.plan-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
  transition: var(--transition);
}
.plan-card.popular {
  border-color: var(--orange);
  box-shadow: var(--shadow-orange);
}
.plan-card__popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--orange);
  color: #fff;
  padding: 4px 20px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}
.plan-card__name { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.plan-card__desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 24px; }
.plan-card__price { margin-bottom: 24px; }
.plan-card__amount {
  font-size: 3rem;
  font-weight: 900;
  font-family: var(--font-display);
  color: var(--orange);
}
.plan-card__period { color: var(--text-muted); font-size: 0.85rem; }
.plan-card__features { list-style: none; margin-bottom: 32px; }
.plan-card__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.plan-card__features li:last-child { border: none; }
.plan-card__features li svg { width: 16px; color: var(--success); flex-shrink: 0; }

/* ── PLAYER ──────────────────────────────────────────────── */
.player-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding-top: calc(var(--nav-height) + 24px);
  min-height: 100vh;
}
.player-main {}
.player-video {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  position: relative;
}
.player-video iframe {
  width: 100%; height: 100%;
  border: none;
}
.player-info { padding: 24px 0; }
.player-info__title { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.player-info__meta  { color: var(--text-muted); font-size: 0.85rem; }

.player-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: fit-content;
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  max-height: calc(100vh - var(--nav-height) - 48px);
  display: flex;
  flex-direction: column;
}
.player-sidebar__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
}
.player-sidebar__list { overflow-y: auto; flex: 1; }
.lesson-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}
.lesson-item:hover, .lesson-item.active {
  background: rgba(255,107,0,0.08);
}
.lesson-item.active { border-left: 3px solid var(--orange); }
.lesson-item.completed .lesson-item__num { background: var(--success); }
.lesson-item__num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.lesson-item__info { flex: 1; min-width: 0; }
.lesson-item__title {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lesson-item__dur { font-size: 0.72rem; color: var(--text-muted); }

/* ── TOAST ───────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.875rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
  animation: slideInToast 0.3s ease;
}
.toast svg { width: 18px; flex-shrink: 0; }
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--error); }
@keyframes slideInToast {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

/* ── COOKIE CONSENT ──────────────────────────────────────── */
.cookie-consent {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 5000;
  background: rgba(20,20,20,0.97);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  backdrop-filter: blur(8px);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cookie-consent.show { transform: translateY(0); }
.cookie-consent__text { flex: 1; font-size: 0.85rem; color: var(--text-secondary); min-width: 200px; }
.cookie-consent__text a { color: var(--orange); }
.cookie-consent__actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ── PROFILE ─────────────────────────────────────────────── */
.profile-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}
.profile-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 3px solid var(--orange);
  object-fit: cover;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--orange);
  flex-shrink: 0;
}
.profile-info__name  { font-size: 1.5rem; font-weight: 800; }
.profile-info__email { color: var(--text-muted); font-size: 0.875rem; }
.profile-info__badges { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.profile-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.profile-tab {
  padding: 10px 20px;
  border-bottom: 2px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: -1px;
}
.profile-tab:hover { color: var(--text-primary); }
.profile-tab.active { color: var(--orange); border-color: var(--orange); }

/* ── ADMIN ───────────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--nav-height);
}
.admin-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: fixed;
  top: var(--nav-height);
  bottom: 0;
  overflow-y: auto;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.admin-nav a:hover, .admin-nav a.active {
  color: var(--orange);
  background: rgba(255,107,0,0.08);
  border-left: 3px solid var(--orange);
}
.admin-nav a svg { width: 18px; }
.admin-content {
  flex: 1;
  margin-left: 240px;
  padding: 32px;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.admin-title { font-size: 1.5rem; font-weight: 700; }

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.stat-card__value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--orange);
  font-family: var(--font-display);
}
.stat-card__label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 14px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.data-table tr:hover td { background: rgba(255,255,255,0.03); }

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  margin-top: auto;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer__brand-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 12px;
  line-height: 1.7;
  max-width: 280px;
}
.footer__col-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer__links { list-style: none; }
.footer__links li { margin-bottom: 10px; }
.footer__links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--orange); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}
.footer__lgpd {
  background: rgba(255,107,0,0.08);
  border: 1px solid rgba(255,107,0,0.2);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer__lgpd svg { width: 16px; color: var(--orange); flex-shrink: 0; }

/* ── LOADING SPINNER ─────────────────────────────────────── */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen {
  position: fixed; inset: 0;
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
.loading-screen.done { opacity: 0; pointer-events: none; }

/* ── UTILITIES ───────────────────────────────────────────── */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--metallic-dark); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .player-layout { grid-template-columns: 1fr; }
  .player-sidebar { position: static; max-height: 400px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .admin-sidebar { display: none; }
  .admin-content { margin-left: 0; }
}

@media (max-width: 768px) {
  .navbar__links, .navbar__search { display: none; }
  .navbar__burger { display: flex; }
  .hero__stats { gap: 20px; }
  .auth-form-panel { padding: 32px 20px; }
  .featured-hero { height: 300px; }
  .featured-hero__overlay { padding: 24px; }
  .footer__grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .plans-grid { grid-template-columns: 1fr; }
  .profile-header { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .featured-hero { display: none; }
}
