/* ═══════════════════════════════════════════════════════════
   D2 Academy — Premium CSS v4.0
   DrowDigital Dark Lime Theme
   ═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,500;0,700;1,500&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --lime: #aaff00;
  --lime-dim: rgba(170, 255, 0, 0.7);
  --lime-glow: rgba(170, 255, 0, 0.15);
  --lime-soft: rgba(170, 255, 0, 0.08);
  --lime-border: rgba(170, 255, 0, 0.18);
  --bg: rgba(8, 15, 0, 0.97);
  --bg2: #0e1600;
  --sf: rgba(255, 255, 255, 0.038);
  --sf2: rgba(255, 255, 255, 0.065);
  --sf3: rgba(255, 255, 255, 0.09);
  --w: #ffffff;
  --t: rgba(255, 255, 255, 0.68);
  --m: rgba(255, 255, 255, 0.38);
  --bd: rgba(255, 255, 255, 0.08);
  --bd2: rgba(255, 255, 255, 0.12);
  --gr: #00e68a;
  --rd: #ff5252;
  --or: #ffa940;
  --yw: #ffe066;
  --bl: #40c9ff;
  --rs: #ff6b81;
  --r: 16px;
  --font: 'Manrope', system-ui, sans-serif;
  --serif: 'Playfair Display', Georgia, serif;
  --mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--t);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.12;
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(170,255,0,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170,255,0,0.018) 1px, transparent 1px);
  background-size: 72px 72px;
}

a { color: var(--lime-dim); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--lime); }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }

/* ═══ NAVBAR ═══ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgb(8 15 0 / 22%); backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--bd);
  width: 100%; /* prevent overflow */
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between; height: 68px;
  min-width: 0; /* prevent flex overflow */
}
.nav-brand {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
}
.nav-logo {
  width: 60px; height: 40px;
  background: var(--lime); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px; color: #0e1600;
  box-shadow: 0 0 20px rgba(170, 255, 0, 0.25);
  letter-spacing: -0.02em;
}
.nav-title { font-weight: 900; font-size: 17px; color: var(--w); letter-spacing: 0.02em; }
.nav-title span { color: var(--lime); }
.nav-sub {
  font-size: 9.5px; color: var(--m); text-transform: uppercase;
  letter-spacing: 2px; font-weight: 700;
}
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 18px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7); font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,0.03); backdrop-filter: blur(8px);
  transition: all 0.25s; text-decoration: none;
}
.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.2); }
.nav-link.active { background: rgba(170,255,0,0.1); border-color: rgba(170,255,0,0.35); color: var(--lime); }
.nav-cart {
  position: relative; font-size: 18px; cursor: pointer; text-decoration: none;
  color: var(--t); padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03);
  transition: all 0.25s;
}
.nav-cart:hover { background: rgba(255,255,255,0.08); color: #fff; }
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  width: 18px; height: 18px; background: var(--lime); border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 900; color: #0e1600;
}
.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--lime); display: flex; align-items: center; justify-content: center;
  color: #0e1600; font-weight: 800; font-size: 14px; text-decoration: none;
  box-shadow: 0 0 12px rgba(170,255,0,0.2);
}
.nav-logout {
  font-size: 12px; color: var(--m); cursor: pointer; background: none; border: none;
  padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.2s;
}
.nav-logout:hover { color: var(--rd); border-color: rgba(255,82,82,0.3); }
.btn-login {
  background: var(--lime); color: #0e1600; border: none;
  padding: 9px 24px; border-radius: 999px; font-size: 13px; font-weight: 800;
  transition: all 0.25s; text-decoration: none; display: inline-flex;
  box-shadow: 0 0 20px rgba(170,255,0,0.15);
}
.btn-login:hover { background: #c8ff33; transform: scale(1.04); color: #0e1600; }
.nav-ham { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--w); }
@media(max-width:768px) {
  .nav-ham { display: block; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: 68px; left: 0; right: 0;
    background: rgba(8,15,0,0.97); backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--bd);
    flex-direction: column; padding: 20px 24px; gap: 10px; z-index: 99;
  }
}

/* ═══ HERO ═══ */
.hero {
  max-width: 1280px; margin: 0 auto; padding: 100px 32px 80px;
  text-align: center; position: relative;
  width: 100%; /* prevent overflow */
}
.hero::before {
  content: ''; position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: min(700px, 100vw); height: 500px;
  background: radial-gradient(ellipse, rgba(170,255,0,0.08) 0%, transparent 65%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(170,255,0,0.1); border: 1px solid rgba(170,255,0,0.3);
  border-radius: 999px; padding: 8px 20px;
  font-size: 12px; font-weight: 800; color: var(--lime);
  letter-spacing: 0.5px; text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.hero h1 {
  font-family: var(--font); font-size: clamp(2.5rem, 5.5vw, 4.2rem);
  font-weight: 900; color: var(--w); line-height: 1.08;
  margin: 24px 0 20px; letter-spacing: -0.03em;
}
.hero h1 .hl { color: var(--lime); }
.hero h1 .hl-g {
  font-family: var(--serif); font-style: italic;
  font-weight: 500; color: var(--lime);
}
.hero-p {
  font-size: 17px; color: var(--t); max-width: 540px;
  margin: 0 auto 36px; line-height: 1.7; font-weight: 500;
}
.hero-p strong { color: var(--w); }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 28px; border-radius: 999px;
  font-size: 14px; font-weight: 700; border: none; cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22,0.68,0,1.2);
  text-decoration: none; letter-spacing: 0.01em;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }
.btn-primary {
  background: var(--lime); color: #0e1600;
  box-shadow: 0 0 24px rgba(170,255,0,0.12);
}
.btn-primary:hover { background: #c8ff33; transform: scale(1.04); color: #0e1600; }
.btn-ghost {
  background: transparent; color: var(--w);
  border: 1.5px solid rgba(255,255,255,0.25);
}
.btn-ghost:hover { border-color: rgba(170,255,0,0.5); color: var(--lime); }
.btn-green { background: var(--gr); color: #fff; }
.btn-green:hover { transform: scale(1.03); box-shadow: 0 0 20px rgba(0,230,138,0.2); }
.btn-red { background: var(--rd); color: #fff; }
.btn-red:hover { opacity: 0.9; transform: scale(1.02); }
.btn-sm { padding: 8px 18px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }
.btn-outline {
  background: transparent; border: 1px solid var(--bd2); color: var(--t);
}
.btn-outline:hover { border-color: rgba(170,255,0,0.4); color: var(--lime); }
.btn-or { background: var(--or); color: #fff; }

/* ═══ STATS ROW ═══ */
.stats-row {
  max-width: 1280px; margin: 0 auto; padding: 0 32px 70px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.stat-card {
  background: var(--sf); border: 1px solid var(--bd);
  border-radius: 20px; padding: 28px 24px; text-align: center;
  transition: all 0.3s; position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 80%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(170,255,0,0.2), transparent);
}
.stat-card:hover {
  transform: translateY(-4px); background: var(--sf2);
  border-color: var(--lime-border);
}
.stat-num {
  font-family: var(--font); font-size: 34px; font-weight: 900;
  line-height: 1; margin-bottom: 4px; color: var(--lime);
}
.stat-label { font-size: 12px; color: var(--m); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* ═══ SECTIONS ═══ */
.section { max-width: 1280px; margin: 0 auto; padding: 0 32px 70px; }
.stag {
  font-size: 11px; font-weight: 900; letter-spacing: 3px;
  text-transform: uppercase; margin-bottom: 8px; color: var(--lime);
}
.stitle {
  font-family: var(--font); font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 900; color: var(--w); line-height: 1.15;
  margin-bottom: 6px; letter-spacing: -0.02em;
}
.sdesc { font-size: 14px; color: var(--m); margin-bottom: 28px; font-weight: 500; }

/* ═══ FILTER & SEARCH ═══ */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-chip {
  padding: 7px 18px; border-radius: 999px; font-size: 12px; font-weight: 700;
  cursor: pointer; background: var(--sf); color: var(--m);
  border: 1px solid var(--bd); transition: all 0.25s; white-space: nowrap;
}
.filter-chip:hover { border-color: rgba(170,255,0,0.3); color: var(--lime); }
.filter-chip.active {
  background: rgba(170,255,0,0.12); color: var(--lime);
  border-color: rgba(170,255,0,0.4);
}
.search-bar { position: relative; max-width: 420px; margin-bottom: 20px; }
.search-bar input, .search-bar .search-input {
  width: 100%; padding: 12px 18px 12px 42px;
  background: var(--sf); border: 1px solid var(--bd); border-radius: 999px;
  color: var(--w); font-size: 14px; outline: none;
  transition: all 0.25s; font-weight: 500;
}
.search-bar input:focus { border-color: rgba(170,255,0,0.4); background: var(--sf2); }
.search-bar input::placeholder { color: var(--m); }
.search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--m); pointer-events: none;
}

/* ═══ CARDS GRID ═══ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }

/* Course Card */
.card {
  background: var(--sf); border: 1px solid var(--bd); border-radius: 20px;
  overflow: hidden; transition: all 0.4s cubic-bezier(0.22,0.68,0,1.2);
  cursor: pointer; text-decoration: none; color: inherit; position: relative;
}
.card::before {
  content: ''; position: absolute; border-radius: 20px; z-index: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(170,255,0,0.06), transparent);
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none; /* prevent overlay from blocking child click events */
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px rgba(170,255,0,0.04);
  border-color: var(--lime-border);
}
.card:hover::before { opacity: 1; }
.card-thumb {
  width: 100%; height: 170px; object-fit: cover; display: block;
  border-bottom: 1px solid var(--bd);
}
.card-head {
  padding: 50px 22px 16px 20px; border-bottom: 1px solid var(--bd);
  position: relative; z-index: 1;
}
.card-head.ai { background: linear-gradient(135deg, rgba(170,255,0,0.06), transparent); }
.card-head.def { background: linear-gradient(135deg, rgba(0,230,138,0.04), transparent); }
.card-emoji { font-size: 36px; margin-bottom: 10px; display: block; }
.card-tags { display: flex; gap: 4px; position: absolute; top: 16px; right: 16px; z-index: 2; }
.tag {
  font-size: 9px; font-weight: 800; padding: 3px 10px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.8px;
}
.tag-best { background: rgba(255,169,64,0.15); color: var(--or); border: 1px solid rgba(255,169,64,0.2); }
.tag-new, .tag-trend { background: rgba(170,255,0,0.12); color: var(--lime); border: 1px solid rgba(170,255,0,0.2); }
.tag-cert { background: rgba(0,230,138,0.12); color: var(--gr); border: 1px solid rgba(0,230,138,0.2); }
.card-title {
  font-size: 16px; font-weight: 800; color: var(--w);
  margin-bottom: 5px; line-height: 1.3; letter-spacing: -0.01em;
}
.card-meta { font-size: 12px; color: var(--m); font-weight: 500; }
.card-body { padding: 18px 22px; position: relative; z-index: 1; }
.card-desc {
  font-size: 13px; color: var(--t); line-height: 1.65; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.price-row { display: flex; justify-content: space-between; align-items: center; }
.price-now { font-size: 20px; font-weight: 900; color: var(--w); }
.price-orig { font-size: 13px; color: var(--m); text-decoration: line-through; margin-left: 8px; }
.price-off { font-size: 11px; font-weight: 800; color: var(--lime); margin-left: 6px; }
.card-rating { font-size: 13px; color: var(--yw); font-weight: 700; }
.card-enrolled {
  margin-top: 10px; font-size: 12px; font-weight: 800;
  color: var(--lime); display: flex; align-items: center; gap: 4px;
}

/* Workshop Card */
.w-card {
  background: var(--sf); border: 1px solid var(--bd); border-radius: 20px;
  padding: 0; transition: all 0.4s cubic-bezier(0.22,0.68,0,1.2);
  cursor: pointer; text-decoration: none; color: inherit; display: block; overflow: hidden;
  position: relative;
}
.w-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px rgba(170,255,0,0.04);
  border-color: var(--lime-border);
}
.w-card-body { padding: 22px; }
.w-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.seats-tag {
  background: rgba(255,107,129,0.12); color: var(--rs); border: 1px solid rgba(255,107,129,0.2);
  font-size: 10px; font-weight: 800; padding: 4px 12px; border-radius: 999px; text-transform: uppercase;
}
.w-title { font-size: 16px; font-weight: 800; color: var(--w); margin-bottom: 8px; line-height: 1.3; }
.w-desc { font-size: 13px; color: var(--t); line-height: 1.65; margin-bottom: 14px; }
.w-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.w-tag {
  font-size: 11px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  background: var(--sf2); color: var(--t); border: 1px solid var(--bd);
}
.w-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px; border-top: 1px solid var(--bd);
}
.w-price { font-size: 22px; font-weight: 900; color: var(--w); }

/* ═══ DETAIL PAGES ═══ */
.detail-wrap { max-width: 1040px; margin: 0 auto; padding: 40px 32px 70px; }
.detail-back {
  font-size: 13px; color: var(--lime-dim); font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  margin-bottom: 20px; padding: 6px 16px; border-radius: 999px;
  border: 1px solid var(--bd); background: var(--sf); transition: all 0.25s;
}
.detail-back:hover { border-color: rgba(170,255,0,0.4); color: var(--lime); }
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 36px; }
.detail-title {
  font-family: var(--font); font-size: 30px; font-weight: 900;
  color: var(--w); margin: 14px 0 10px; line-height: 1.2; letter-spacing: -0.02em;
}
.detail-desc { color: var(--t); font-size: 15px; line-height: 1.75; margin-bottom: 24px; }
.detail-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.d-stat {
  background: var(--sf); border: 1px solid var(--bd); border-radius: 14px;
  padding: 12px 18px; transition: all 0.25s;
}
.d-stat:hover { border-color: var(--lime-border); }
.d-stat-l { font-size: 10px; color: var(--m); margin-bottom: 2px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.d-stat-v { font-size: 14px; font-weight: 800; }

/* Purchase Card */
.purchase-card {
  position: sticky; top: 76px;
  background: var(--sf); border: 1px solid var(--bd); border-radius: 24px;
  padding: 28px; overflow: hidden;
}
.purchase-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
}
.p-price { font-size: 36px; font-weight: 900; color: var(--w); letter-spacing: -0.02em; }
.p-orig { font-size: 16px; color: var(--m); text-decoration: line-through; margin-left: 12px; }
.p-off { font-size: 13px; font-weight: 800; color: var(--lime); margin-top: 4px; }
.p-info { margin-top: 22px; font-size: 13px; color: var(--m); line-height: 2.2; font-weight: 500; }
.p-info strong { color: var(--w); }

/* Curriculum */
.cur-mod {
  background: var(--sf); border: 1px solid var(--bd); border-radius: 16px;
  padding: 18px 22px; margin-bottom: 10px;
}
.cur-mod h3 { font-size: 14px; font-weight: 800; color: var(--w); margin-bottom: 10px; }
.cur-lesson {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; font-size: 13px; color: var(--t); cursor: default;
}
.cur-lesson .lesson-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--bd2); display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: transparent; flex-shrink: 0;
  transition: all 0.25s; cursor: pointer;
}
.cur-lesson .lesson-check:hover { border-color: var(--lime); }
.cur-lesson .lesson-check.done {
  background: var(--lime); border-color: var(--lime); color: #0e1600;
}
.cur-lesson .lesson-dur { margin-left: auto; font-size: 11px; color: var(--m); flex-shrink: 0; }

/* Progress */
.progress-bar-wrap {
  background: var(--bd); border-radius: 999px; height: 6px;
  overflow: hidden; margin-top: 8px;
}
.progress-bar-fill {
  height: 100%; background: var(--lime); border-radius: 999px;
  transition: width 0.4s ease; box-shadow: 0 0 8px rgba(170,255,0,0.3);
}
.progress-text { font-size: 11px; color: var(--m); margin-top: 4px; font-weight: 600; }

/* Topics */
.topic-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; background: var(--sf); border: 1px solid var(--bd);
  border-radius: 14px; margin-bottom: 8px; font-size: 14px; color: var(--t);
}
.topic-check { color: var(--lime); font-weight: 800; }

/* Seats */
.seats-wrap {
  background: var(--sf2); border-radius: 12px; padding: 14px;
  margin-bottom: 16px; border: 1px solid var(--bd);
}
.seats-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--m); margin-bottom: 6px; font-weight: 600; }
.seats-bar { height: 6px; background: var(--bd); border-radius: 999px; overflow: hidden; }
.seats-fill { height: 100%; background: var(--lime); border-radius: 999px; box-shadow: 0 0 8px rgba(170,255,0,0.3); }

/* ═══ CART ═══ */
.cart-wrap { max-width: 720px; margin: 0 auto; padding: 40px 32px 70px; }
.cart-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px; background: var(--sf); border: 1px solid var(--bd);
  border-radius: 16px; margin-bottom: 10px; transition: all 0.25s;
}
.cart-item:hover { border-color: var(--lime-border); }
.cart-left { display: flex; align-items: center; gap: 14px; }
.cart-emoji { font-size: 26px; }
.ci-title { font-weight: 800; color: var(--w); font-size: 14px; }
.ci-type { font-size: 12px; color: var(--m); font-weight: 500; }
.cart-right { display: flex; align-items: center; gap: 18px; }
.ci-price { font-weight: 900; color: var(--w); font-size: 17px; }
.ci-remove {
  color: var(--rd); cursor: pointer; font-size: 16px; background: none; border: none;
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; transition: all 0.2s; border: 1px solid transparent;
}
.ci-remove:hover { border-color: rgba(255,82,82,0.3); background: rgba(255,82,82,0.08); }
.cart-summary {
  background: var(--sf); border: 1px solid var(--bd); border-radius: 20px;
  padding: 24px; margin-top: 18px; position: relative; overflow: hidden;
}
.cart-summary::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
}
.cart-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-weight: 600; }
.cart-total { font-weight: 900; color: var(--lime); font-size: 24px; }
.cart-note { text-align: center; margin-top: 10px; font-size: 11px; color: var(--m); }

/* Coupon */
.coupon-row { display: flex; gap: 8px; margin-bottom: 12px; }
.coupon-row input {
  flex: 1; padding: 10px 16px; background: rgba(8,15,0,0.6);
  border: 1px solid var(--bd); border-radius: 999px; color: var(--w);
  font-size: 13px; outline: none; text-transform: uppercase; font-weight: 600;
}
.coupon-row input:focus { border-color: rgba(170,255,0,0.4); }
.coupon-msg { font-size: 12px; margin-bottom: 10px; font-weight: 700; }
.coupon-msg.ok { color: var(--lime); }
.coupon-msg.err { color: var(--rd); }
.discount-row { color: var(--lime); font-weight: 800; }

/* ═══ AUTH ═══ */
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 70px 24px 90px; }
.auth-title {
  font-family: var(--font); font-size: 30px; font-weight: 900;
  color: var(--w); text-align: center; margin: 10px 0 4px; letter-spacing: -0.02em;
}
.auth-sub { text-align: center; color: var(--m); font-size: 14px; margin-bottom: 28px; }
.auth-tabs {
  display: flex; background: var(--sf); border-radius: 999px;
  border: 1px solid var(--bd); overflow: hidden; margin-bottom: 28px;
}
.auth-tab {
  flex: 1; padding: 11px 0; border: none; font-weight: 800; font-size: 13px;
  cursor: pointer; text-align: center; background: transparent;
  color: var(--m); transition: all 0.3s;
}
.auth-tab.active { background: var(--lime); color: #0e1600; }
.auth-demo {
  text-align: center; font-size: 12px; color: var(--m); margin-top: 14px;
  padding: 14px; background: var(--sf); border-radius: 14px;
  border: 1px solid var(--bd); font-weight: 500;
}
.auth-demo strong { color: var(--lime); font-weight: 700; }
.forgot-link {
  display: block; text-align: right; font-size: 12px;
  color: var(--lime-dim); cursor: pointer; margin-top: -8px; margin-bottom: 14px;
  font-weight: 600;
}
.forgot-link:hover { text-decoration: underline; color: var(--lime); }

/* ═══ FORMS ═══ */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 11px; font-weight: 800; color: var(--m);
  margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1.5px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 18px;
  background: var(--sf); border: 1px solid var(--bd); border-radius: 14px;
  color: var(--w); font-size: 14px; outline: none;
  transition: all 0.25s; font-weight: 500;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: rgba(170,255,0,0.4); background: var(--sf2);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--m); }
.form-select option { background: var(--bg2); }
.form-textarea { min-height: 110px; resize: vertical; border-radius: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ═══ DASHBOARD ═══ */
.dash-wrap { max-width: 1240px; margin: 0 auto; padding: 40px 32px 70px; }
.dash-title {
  font-family: var(--font); font-size: 30px; font-weight: 900;
  color: var(--w); margin-bottom: 4px; letter-spacing: -0.02em;
}
.dash-sub { color: var(--m); font-size: 14px; margin-bottom: 28px; font-weight: 500; }
.dash-tabs { display: flex; gap: 8px; margin-bottom: 28px; overflow-x: auto; }
.dash-tab {
  padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 700;
  cursor: pointer; background: var(--sf); color: var(--m);
  border: 1px solid var(--bd); white-space: nowrap; transition: all 0.25s; text-decoration: none;
}
.dash-tab:hover { border-color: rgba(170,255,0,0.3); color: var(--lime); }
.dash-tab.active {
  background: rgba(170,255,0,0.12); color: var(--lime);
  border-color: rgba(170,255,0,0.4);
}

/* Meet Card */
.meet-card {
  background: linear-gradient(135deg, rgba(170,255,0,0.06), rgba(0,230,138,0.04));
  border: 1px solid rgba(170,255,0,0.2); border-radius: 14px;
  padding: 14px 18px; margin-top: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  position: relative; z-index: 2; /* sit above card::before overlay */
}
.meet-card .meet-label { font-size: 12px; color: var(--lime); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.meet-card .meet-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; background: var(--lime); color: #0e1600;
  border-radius: 999px; font-size: 13px; font-weight: 800;
  text-decoration: none; transition: all 0.25s; border: none; cursor: pointer;
  position: relative; z-index: 3; pointer-events: auto;
  -webkit-tap-highlight-color: rgba(170,255,0,0.2);
  min-height: 44px; /* iOS/Android tap target */
}
.meet-card .meet-btn:hover { background: #c8ff33; transform: scale(1.04); color: #0e1600; }
.meet-card .meet-btn:active { transform: scale(0.97); background: #b8e800; }

/* ═══ ADMIN ═══ */
.admin-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 14px; margin-bottom: 28px;
}
.a-stat {
  background: var(--sf); border: 1px solid var(--bd); border-radius: 18px;
  padding: 22px 18px; transition: all 0.25s; position: relative; overflow: hidden;
}
.a-stat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(170,255,0,0.15), transparent);
}
.a-stat:hover { border-color: var(--lime-border); transform: translateY(-2px); }
.a-stat-icon { font-size: 22px; margin-bottom: 8px; }
.a-stat-num { font-size: 26px; font-weight: 900; letter-spacing: -0.02em; }
.a-stat-label { font-size: 11px; color: var(--m); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.a-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--sf); border: 1px solid var(--bd); border-radius: 14px;
  padding: 14px 18px; margin-bottom: 8px; transition: all 0.25s;
}
.a-item:hover { border-color: var(--lime-border); }
.a-item-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.a-item-emoji { font-size: 22px; flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.a-item-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.a-item-title {
  font-weight: 800; color: var(--w); font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.a-item-meta { font-size: 11px; color: var(--m); font-weight: 500; }
.a-item-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.add-card {
  background: var(--sf); border: 1px solid var(--bd); border-radius: 20px;
  padding: 28px; margin-bottom: 28px; position: relative; overflow: hidden;
}
.add-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(170,255,0,0.2), transparent);
}
.add-card h3 { font-size: 17px; font-weight: 900; color: var(--w); margin-bottom: 18px; }

/* Admin search */
.admin-search { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-search input, .admin-search select {
  padding: 9px 16px; background: var(--sf); border: 1px solid var(--bd);
  border-radius: 999px; color: var(--w); font-size: 13px; outline: none; font-weight: 500;
}
.admin-search input:focus, .admin-search select:focus { border-color: rgba(170,255,0,0.4); }
.admin-search input { flex: 1; min-width: 200px; }

/* Profile */
.profile-card {
  background: var(--sf); border: 1px solid var(--bd); border-radius: 20px;
  padding: 28px; max-width: 520px;
}
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--lime); display: flex; align-items: center; justify-content: center;
  color: #0e1600; font-size: 26px; font-weight: 900;
  box-shadow: 0 0 20px rgba(170,255,0,0.2);
}
.profile-name { font-size: 20px; font-weight: 900; color: var(--w); }
.profile-email { font-size: 13px; color: var(--m); }
.profile-info { font-size: 14px; color: var(--t); line-height: 2.2; font-weight: 500; }

/* ═══ EMPTY STATE ═══ */
.empty { text-align: center; padding: 60px 20px; color: var(--m); }

/* ═══ TOAST ═══ */
.toast {
  position: fixed; top: 84px; right: 20px; z-index: 200;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 800; font-size: 14px; color: #0e1600;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  animation: slideIn 0.3s cubic-bezier(0.22,0.68,0,1.2);
  max-width: 400px;
}
.toast-ok { background: var(--lime); }
.toast-err { background: var(--rd); color: #fff; }
@keyframes slideIn { from { transform: translateX(50px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { opacity: 1; } to { transform: translateX(50px); opacity: 0; } }

/* ═══ MODAL ═══ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px); z-index: 150;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto;
}
.modal-box {
  background: rgba(14,22,0,0.98); border: 1px solid var(--bd);
  border-radius: 24px; padding: 32px; width: 100%; max-width: 620px;
  max-height: 90vh; overflow-y: auto;
  animation: modalIn 0.25s cubic-bezier(0.22,0.68,0,1.2);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
.modal-box h2 {
  font-size: 18px; font-weight: 900; color: var(--w); margin-bottom: 22px;
  display: flex; justify-content: space-between; align-items: center;
}
.modal-close {
  background: none; border: none; color: var(--m); font-size: 24px;
  cursor: pointer; padding: 0; line-height: 1; transition: color 0.2s;
}
.modal-close:hover { color: var(--rd); }
@keyframes modalIn { from { transform: translateY(-20px) scale(0.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

/* ═══ FOOTER ═══ */
.footer {
  background: rgba(8,15,0,0.98); border-top: 1px solid var(--bd);
  padding: 50px 32px 0; position: relative;
}
.footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(170,255,0,0.2), transparent);
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
.footer-brand { font-weight: 900; font-size: 19px; color: var(--w); margin-bottom: 10px; letter-spacing: 0.02em; }
.footer-brand span { color: var(--lime); }
.footer-desc { font-size: 13px; color: var(--m); line-height: 1.7; }
.footer-col h4 {
  font-size: 11px; font-weight: 800; color: var(--lime);
  margin-bottom: 14px; text-transform: uppercase; letter-spacing: 2px;
}
.footer-col a {
  display: block; font-size: 13px; color: var(--m); margin-bottom: 10px;
  text-decoration: none; transition: all 0.2s; font-weight: 500;
}
.footer-col a:hover { color: var(--w); transform: translateX(3px); }
.footer-bottom {
  max-width: 1280px; margin: 28px auto 0; padding: 24px 0;
  border-top: 1px solid var(--bd);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
.footer-copy { font-size: 12px; color: var(--m); font-weight: 500; }
.rzp-badge {
  font-size: 11px; color: var(--m); display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--bd);
  background: var(--sf); font-weight: 600;
}

/* ═══ CTA SECTION ═══ */
.cta-section {
  background: linear-gradient(135deg, rgba(170,255,0,0.1), rgba(0,230,138,0.05));
  border: 1px solid rgba(170,255,0,0.2); border-radius: 28px;
  padding: 56px 48px; text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(170,255,0,0.06), transparent 70%);
}

/* ═══ SPINNER ═══ */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(14,22,0,0.2); border-top-color: #0e1600;
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.badge-refunded {
  background: rgba(255,169,64,0.15); color: var(--or);
  font-size: 10px; font-weight: 800; padding: 2px 10px; border-radius: 999px;
}

/* ═══════════════════════════════════════════════════════
   FULLY RESPONSIVE SYSTEM — D2 Academy
   Breakpoints: 1280 → 1024 → 768 → 480 → 360
   ═══════════════════════════════════════════════════════ */

/* ── 1280px: large tablets / small laptops ── */
@media (max-width: 1280px) {
  .nav-inner      { padding: 0 24px; }
  .hero           { padding: 90px 24px 70px; }
  .section        { padding: 0 24px 60px; }
  .stats-row      { padding: 0 24px 60px; }
  .detail-wrap    { padding: 36px 24px 60px; }
  .dash-wrap      { padding: 36px 24px 60px; }
  .cart-wrap      { padding: 36px 24px 60px; }
  .auth-wrap      { padding: 60px 24px 80px; }
  .footer         { padding: 44px 24px 0; }
}

/* ── 1024px: tablets landscape ── */
@media (max-width: 1024px) {
  .stats-row          { grid-template-columns: repeat(2, 1fr); }
  .detail-grid        { grid-template-columns: 1fr; }
  .purchase-card      { position: static; margin-top: 0; }
  .footer-inner       { grid-template-columns: 1fr 1fr; gap: 32px; }
  .grid               { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

  /* purchase card top bar stays visible */
  .purchase-card::before { display: block; }
}

/* ── 768px: tablets portrait & large phones ── */
@media (max-width: 768px) {

  /* ── Navbar ── */
  .nav-ham     { display: block; }
  .nav-links   { display: none; }
  .nav-inner   { padding: 0 16px; height: 60px; }
  .nav-logo    { width: 36px; height: 36px; font-size: 12px; border-radius: 10px; }
  .nav-title   { font-size: 15px; }
  .nav-sub     { font-size: 8.5px; letter-spacing: 1.5px; }
  .nav-links.open {
    display: flex;
    position: fixed; /* fixed so it overlays content */
    top: 60px; left: 0; right: 0;
    background: rgba(8,15,0,0.97);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--bd);
    flex-direction: column;
    padding: 20px 20px 28px;
    gap: 8px;
    z-index: 99;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .nav-links.open .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 18px;
    font-size: 14px;
    border-radius: 14px;
  }
  .nav-links.open .nav-cart {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
  }
  .nav-links.open .nav-cart::after {
    content: 'Cart';
    font-size: 14px;
    font-weight: 600;
    color: var(--t);
  }
  .nav-links.open #authArea {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--bd);
  }
  .nav-links.open .btn-login {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 14px;
  }
  .nav-links.open .nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
  }
  .nav-links.open .nav-logout {
    flex: 1;
    text-align: left;
    padding: 10px 14px;
  }

  /* ── Hero ── */
  .hero { padding: 56px 20px 44px; }
  .hero::before { width: 100%; }
  .hero h1 {
    font-size: clamp(1.9rem, 7.5vw, 2.6rem);
    margin: 18px 0 16px;
    letter-spacing: -0.025em;
  }
  .hero-badge { font-size: 11px; padding: 7px 14px; gap: 6px; }
  .hero-p { font-size: 15px; max-width: 100%; margin-bottom: 28px; }
  .hero-btns { flex-direction: column; align-items: center; gap: 10px; }
  .hero-btns .btn { width: 100%; max-width: 320px; justify-content: center; }

  /* ── Stats ── */
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 20px 48px;
    gap: 12px;
  }
  .stat-card { padding: 22px 16px; border-radius: 16px; }
  .stat-num  { font-size: 28px; }

  /* ── Sections / Grid ── */
  .section { padding: 0 20px 48px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }

  /* ── Section headers ── */
  .stitle { font-size: clamp(1.5rem, 5vw, 2rem); }

  /* ── Filters ── */
  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
  }
  .filter-bar::-webkit-scrollbar { display: none; }

  /* ── Detail Page ── */
  .detail-wrap { padding: 28px 20px 56px; }
  .detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .detail-title { font-size: 22px; }
  .detail-stats { gap: 8px; }
  .d-stat { padding: 10px 14px; }
  .purchase-card { position: static; padding: 22px; }

  /* ── Cart ── */
  .cart-wrap { padding: 28px 20px 56px; }
  .cart-item { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cart-right { width: 100%; justify-content: space-between; }
  .coupon-row { flex-direction: column; }
  .coupon-row input { border-radius: 14px !important; }

  /* ── Forms ── */
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .auth-wrap { padding: 50px 20px 70px; }

  /* ── Dashboard ── */
  .dash-wrap { padding: 20px 16px 48px; }
  .dash-title { font-size: 20px; }
  .dash-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    padding-bottom: 4px;
    gap: 6px;
  }
  .dash-tabs::-webkit-scrollbar { display: none; }
  .dash-tab { white-space: nowrap; font-size: 13px; padding: 8px 14px; }

  /* ── Admin ── */
  .admin-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .a-item { flex-wrap: wrap; gap: 10px; }
  .a-item-actions { width: 100%; justify-content: flex-end; }

  /* ── Profile ── */
  .profile-card { max-width: 100%; }

  /* ── Footer ── */
  .footer         { padding: 40px 20px 0; }
  .footer-inner   { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom  { flex-direction: column; text-align: center; gap: 12px; }

  /* ── Modal ── */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box {
    border-radius: 24px 24px 0 0;
    max-height: 90vh;
    padding: 24px 20px;
  }

  /* ── Toast ── */
  .toast {
    left: 16px; right: 16px;
    top: 72px;
    border-radius: 16px;
    text-align: center;
  }

  /* ── CTA Section ── */
  .cta-section { padding: 40px 24px; border-radius: 20px; }

  /* ── Meet card ── */
  .meet-card { flex-direction: column; align-items: flex-start; }
  .meet-card .meet-btn { width: 100%; justify-content: center; }
}

/* ── 480px: phones ── */
@media (max-width: 480px) {

  /* ── Stats: 2-col still but smaller ── */
  .stats-row { gap: 10px; }
  .stat-card { padding: 18px 12px; }
  .stat-num { font-size: 24px; }
  .stat-label { font-size: 10px; letter-spacing: 0.5px; }

  /* ── Hero ── */
  .hero { padding: 44px 16px 36px; }
  .hero-badge { font-size: 10px; padding: 6px 12px; }
  .hero h1 { font-size: clamp(1.75rem, 8vw, 2.2rem); margin: 14px 0 14px; }
  .hero-p { font-size: 14px; line-height: 1.65; }

  /* ── Sections ── */
  .section { padding: 0 16px 40px; }
  .stats-row { padding: 0 16px 40px; }

  /* ── Cards ── */
  .card-head { padding: 44px 18px 14px !important; }
  .card-body { padding: 14px 18px; }
  .card-title { font-size: 15px; }

  /* ── Grid: single column, no bleed ── */
  .grid { grid-template-columns: 1fr; gap: 12px; width: 100%; }

  /* ── Admin stats: 2 on small phone ── */
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .a-stat-num { font-size: 22px; }

  /* ── Admin search: full width stacked ── */
  .admin-search { flex-direction: column; }
  .admin-search input,
  .admin-search select,
  .admin-search .btn,
  .admin-search a { width: 100% !important; }

  /* ── All buttons full-width on small phone ── */
  .hero-btns .btn { max-width: 100%; font-size: 14px; padding: 13px 24px; }

  /* ── Purchase card ── */
  .p-price { font-size: 28px; }
  .p-orig  { font-size: 14px; }

  /* ── Cart ── */
  .cart-total { font-size: 20px; }
  .cart-wrap { padding: 20px 16px 48px; }

  /* ── Dashboard ── */
  .dash-wrap { padding: 16px 14px 48px; }
  .dash-title { font-size: 18px; }
  .dash-sub { font-size: 13px; }
  .dash-tab { font-size: 12px; padding: 7px 12px; }

  /* Dashboard order rows: stack on mobile */
  .order-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
  }
  .order-row > div:last-child {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Dashboard stats mini-grid */
  .dash-stat { padding: 12px 14px; border-radius: 12px; }
  .dash-stat-val { font-size: 22px; }
  .dash-stat-lbl { font-size: 11px; }

  /* Dashboard profile info: 1 col on phone */
  .profile-info,
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 4px 0 !important;
  }
  .profile-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .profile-avatar { width: 56px !important; height: 56px !important; font-size: 22px !important; }

  /* Meet card: full-width button */
  .meet-card { padding: 12px 14px; gap: 10px; }
  .meet-card .meet-btn { width: 100%; justify-content: center; font-size: 14px; padding: 12px 20px; }
  .meet-label { font-size: 12px; }

  /* ── Detail ── */
  .detail-wrap { padding: 20px 16px 48px; }

  /* ── Auth ── */
  .auth-wrap { padding: 36px 16px 56px; }
  .auth-title { font-size: 24px; }

  /* ── Footer ── */
  .footer { padding: 36px 16px 0; }
  .footer-brand { font-size: 16px; }

  /* ── Modal ── */
  .modal-box { padding: 20px 16px 28px; }
  .modal-box h2 { font-size: 16px; }

  /* ── Forms: prevent iOS/Android zoom on focus ── */
  .form-input, .form-select, .form-textarea {
    font-size: 16px !important;
    -webkit-appearance: none; /* consistent look on Android Chrome */
  }

  /* ── Add card admin ── */
  .add-card { padding: 20px; }

  /* ── Workshop card footer ── */
  .w-foot { flex-direction: column; align-items: flex-start; gap: 10px; }
  .w-foot .btn { width: 100%; justify-content: center; }

  /* ── CTA section ── */
  .cta-section { padding: 32px 16px; border-radius: 16px; }

  /* ── Progress text ── */
  .progress-text { font-size: 11px; }

  /* ── Empty state ── */
  .empty-state { padding: 40px 16px; }
  .empty-state-icon { font-size: 44px; }
  .empty-state-title { font-size: 16px; }
  .empty-state-sub { font-size: 13px; }
}

/* ── 360px: very small Android phones ── */
@media (max-width: 360px) {
  .stats-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-num  { font-size: 20px; }
  .stat-card { padding: 14px 10px; border-radius: 14px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .nav-inner { padding: 0 12px; height: 56px; }
  .nav-logo  { width: 32px; height: 32px; font-size: 11px; border-radius: 9px; }
  .nav-title { font-size: 14px; }
  .nav-sub   { display: none; }
  .hero h1   { font-size: 1.65rem; letter-spacing: -0.02em; }
  .hero { padding: 36px 14px 32px; }
  .stitle    { font-size: 1.35rem; }
  .section   { padding: 0 14px 36px; }
  .stats-row { padding: 0 14px 36px; }
  .detail-stats { flex-direction: column; }
  .d-stat   { width: 100%; }
  .cart-wrap { padding: 20px 14px 48px; }
  .btn { padding: 10px 20px; font-size: 13px; }
  .hero-btns .btn { padding: 12px 20px; }
  .dash-wrap { padding: 14px 12px 40px; }
  .dash-title { font-size: 17px; }
  .grid { gap: 10px; }
  .meet-card { padding: 10px 12px; }
  .meet-card .meet-btn { padding: 11px 16px; font-size: 13px; }
  .order-row { padding: 12px 14px; }
  .empty-state { padding: 32px 12px; }
}

/* ── Touch & Accessibility improvements ── */
@media (hover: none) and (pointer: coarse) {
  /* Ensure tap targets are at least 44px (Apple HIG / Material Design) */
  .btn, .nav-link, .nav-cart, .filter-chip,
  .dash-tab, .auth-tab, .nav-ham, .ci-remove,
  .lesson-check, .nav-logout,
  .meet-card .meet-btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .filter-chip { min-height: 40px; }

  /* Android tap feedback */
  .meet-card .meet-btn,
  .btn-primary, .btn-outline, .btn-ghost {
    -webkit-tap-highlight-color: rgba(170,255,0,0.15);
  }

  /* Remove hover transforms on touch (avoid sticky hover states on Android) */
  .card:hover,
  .w-card:hover,
  .stat-card:hover,
  .a-stat:hover,
  .a-item:hover,
  .cart-item:hover {
    transform: none;
  }
  /* Keep border-color changes (they work fine on touch) */
}

/* ── Utility: prevent horizontal overflow on all sizes ── */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

/* Prevent ANY child from causing horizontal scroll */
* {
  max-width: 100%;
}

/* Ensure images and media are responsive */
img, video, iframe, embed, object, svg {
  max-width: 100%;
  height: auto;
}

/* ── Safe area insets (iPhone notch / home bar) ── */
@supports (padding: env(safe-area-inset-bottom)) {
  .footer-bottom {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .nav-links.open {
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }
  .modal-box {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .toast {
    top: calc(72px + env(safe-area-inset-top));
  }
  @media (max-width: 768px) {
    .navbar {
      padding-top: env(safe-area-inset-top);
    }
  }
}

/* ── Smooth scrollbar on iOS ── */
.dash-tabs,
.filter-bar,
.nav-links.open,
.modal-box {
  -webkit-overflow-scrolling: touch;
}

/* ═══════════════════════════════════════════════════════
   ANDROID-SPECIFIC FIXES
   ═══════════════════════════════════════════════════════ */

/* Prevent text size adjustment on orientation change (Android) */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Smooth native-feel scrolling on Android */
.dash-tabs,
.filter-bar,
.nav-links.open,
.modal-box,
.grid {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Dashboard course card inner layout: ensure content stacks properly on mobile */
@media (max-width: 480px) {
  /* Course/workshop thumbnail */
  .grid .card img[style*="height:130px"] {
    height: 110px !important;
    border-radius: 8px !important;
  }
  .grid .card img[style*="height:120px"] {
    height: 100px !important;
    border-radius: 8px !important;
  }

  /* Dash stat summary grid inside orders tab */
  div[style*="grid-template-columns:repeat(auto-fit,minmax(130px"] {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }

  /* Profile info 2-col grid → 1-col on phone */
  div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 360px) {
  /* Orders stat: 2 cols on very small screen */
  div[style*="grid-template-columns:repeat(auto-fit,minmax(130px"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ── Focus ring for keyboard/Android accessibility ── */
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── Prevent long URLs / text overflow in order rows ── */
.order-row .order-id,
.order-row div[style*="white-space:nowrap"] {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
