:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #edf1f7;
  --text: #111827;
  --muted: #637083;
  --line: #dde3ec;
  --brand: #126c5a;
  --brand-2: #0d4f8b;
  --accent: #f6c65b;
  --good: #139f68;
  --danger: #da3f45;
  --shadow: 0 18px 55px rgba(20, 35, 60, 0.12);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f14;
  --surface: #121821;
  --surface-2: #1c2633;
  --text: #f4f7fb;
  --muted: #a7b2c1;
  --line: #263244;
  --brand: #52c7a5;
  --brand-2: #72a7ff;
  --accent: #ffd76e;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(18, 108, 90, 0.08), transparent 34%),
    radial-gradient(circle at 92% 4%, rgba(13, 79, 139, 0.1), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  padding-bottom: 92px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  font-weight: 800;
  letter-spacing: 0;
}

.mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  box-shadow: 0 12px 28px rgba(18, 108, 90, 0.24);
}

.li-mark {
  position: relative;
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
}

.li-mark::after {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  content: "";
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn,
.ghost-btn,
.primary-btn,
.secondary-btn,
.chip {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  background: var(--surface);
  color: var(--text);
}

.ghost-btn,
.secondary-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  font-weight: 700;
}

.ghost-btn {
  background: transparent;
  color: var(--text);
}

.secondary-btn {
  background: var(--surface);
  color: var(--text);
}

.primary-btn {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  box-shadow: 0 14px 30px rgba(18, 108, 90, 0.18);
}

.primary-btn:disabled,
.secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.icon-btn:hover,
.ghost-btn:hover,
.secondary-btn:hover,
.primary-btn:hover,
.chip:hover {
  transform: translateY(-1px);
}

.main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 44px) 36px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 28px;
  align-items: center;
  min-height: 520px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 740px;
  margin-bottom: 18px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.93;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
}

.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.metric strong {
  display: block;
  font-size: 24px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.phone {
  width: min(390px, 100%);
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #0a1018;
  box-shadow: var(--shadow);
  padding: 12px;
}

.phone-screen {
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(180deg, #f9fbff, #eaf0f7);
  color: #111827;
  min-height: 560px;
}

.phone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
}

.phone-course {
  margin: 0 18px 16px;
  padding: 18px;
  border-radius: 18px;
  background: #101820;
  color: white;
}

.phone-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.phone-progress span {
  display: block;
  width: 68%;
  height: 100%;
  background: var(--accent);
}

.lesson-card {
  margin: 0 18px 12px;
  padding: 16px;
  border-radius: 16px;
  background: white;
  box-shadow: 0 12px 22px rgba(18, 31, 51, 0.08);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0;
}

.section-head p {
  color: var(--muted);
  max-width: 610px;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.course-card {
  position: relative;
  display: flex;
  min-height: 250px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(20, 35, 60, 0.06);
}

.course-card h3 {
  margin-bottom: 8px;
  font-size: 22px;
}

.course-card p {
  color: var(--muted);
  line-height: 1.45;
}

.course-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.badge,
.price,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.badge {
  background: color-mix(in srgb, var(--brand) 13%, transparent);
  color: var(--brand);
}

.price {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  color: #805900;
}

.pill {
  background: var(--surface-2);
  color: var(--muted);
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.chip {
  padding: 0 14px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.chip.active {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
  color: var(--brand);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dashboard {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
}

.sidebar,
.content-panel {
  padding: 18px;
}

.profile-box {
  display: grid;
  gap: 10px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  font-weight: 800;
}

.progress-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.progress-item {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-2);
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 72%, transparent);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.lesson-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.lesson-stage {
  min-height: 520px;
  padding: clamp(20px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lesson-stage h2 {
  margin-bottom: 16px;
}

.lesson-body {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.65;
}

.lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.module-list {
  display: grid;
  gap: 10px;
}

.module-btn {
  width: 100%;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.module-btn.active {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 9%, var(--surface));
}

.quiz-options {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.quiz-option {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
  font-weight: 700;
}

.quiz-option.correct {
  border-color: var(--good);
  background: color-mix(in srgb, var(--good) 14%, var(--surface));
}

.quiz-option.wrong {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
}

.certificate-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.certificate {
  position: relative;
  width: 100%;
  max-width: 1120px;
  min-height: 790px;
  margin: 0 auto;
  background:
    linear-gradient(
      135deg,
      #fffdf7 0%,
      #fffefb 40%,
      #f8fbff 100%
    );

  color: #0f172a;
  border-radius: 20px;
  overflow: visible;
  padding: 54px;
  box-sizing: border-box;

  border: 1px solid rgba(212,175,55,0.35);

  box-shadow:
    0 30px 80px rgba(15,23,42,0.10),
    inset 0 0 0 1px rgba(255,255,255,0.7);

  page-break-inside: avoid;
  break-inside: avoid;
}

.certificate::before {
  content: "";

  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at top right,
      rgba(15,118,110,0.06),
      transparent 30%
    ),

    radial-gradient(
      circle at bottom left,
      rgba(30,64,175,0.05),
      transparent 35%
    ),

    repeating-linear-gradient(
      45deg,
      rgba(212,175,55,0.03) 0px,
      rgba(212,175,55,0.03) 2px,
      transparent 2px,
      transparent 12px
    );

  pointer-events: none;
}

.certificate::after {
  content: "";

  position: absolute;

  right: -120px;
  top: -120px;

  width: 420px;
  height: 420px;

  border-radius: 999px;

  border: 2px solid rgba(212,175,55,0.28);

  pointer-events: none;
}

.cert-border {
  position: absolute;
  inset: 14px;
  border: 1px solid color-mix(in srgb, #d7bd65 70%, transparent);
  border-radius: 6px;
  pointer-events: none;
}

.cert-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cert-issuer {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: right;
  text-transform: uppercase;
}

.cert-title {
  text-align: center;

  font-size: 58px;
  font-weight: 900;
  line-height: 1.08;

  background:
    linear-gradient(
      90deg,
      #0f766e,
      #0f172a,
      #1d4ed8
    );

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  margin-bottom: 18px;

  letter-spacing: -0.03em;
}

.cert-subtitle {
  position: relative;
  z-index: 1;
  color: var(--muted);
  text-align: center;
}

.cert-name {
  text-align: center;

  font-size: 60px;

  font-weight: 900;

  letter-spacing: -0.03em;

  color: #0f172a;

  margin-bottom: 18px;
}

.cert-course {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.45;
  text-align: center;
}

.cert-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 34px 0 0;
}

.cert-meta div {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.cert-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cert-meta strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
}

.cert-foot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: end;
  margin-top: 58px;
}

.signature {
  border-top: 1px solid var(--line);
  padding-top: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.signature-name {
  display: block;
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
}

.seal {
  width: 130px;
  height: 130px;
  border-radius: 999px;

  border: 6px solid #d4af37;

  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: 900;
  color: #b45309;

  background:
    radial-gradient(circle,
      #fff8dc,
      #f5deb3);

  box-shadow:
    inset 0 0 0 4px rgba(255,255,255,0.5),
    0 10px 35px rgba(212,175,55,0.28);

  letter-spacing: .08em;
}

.qr-block {
  display: grid;
  justify-items: end;
  text-align: right;
}

.qr {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 2px;
  width: 126px;
  height: 126px;
  padding: 8px;
  border: 1px solid var(--line);
  background: white;
}

.qr i {
  background: #111827;
}

.verification {
  max-width: 720px;
  margin: 40px auto;
  padding: 28px;
}

.verify-check {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--good) 16%, var(--surface));
  color: var(--good);
  font-size: 34px;
  font-weight: 800;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-card,
.table-row {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-card strong {
  display: block;
  font-size: 26px;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.trust-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  align-items: center;
  margin-top: 44px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(20, 35, 60, 0.06);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.trust-grid div,
.info-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.trust-grid strong,
.trust-grid span {
  display: block;
}

.trust-grid span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.info-page {
  min-height: 56vh;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.info-card {
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(20, 35, 60, 0.06);
}

.info-card p,
.legal-card p {
  color: var(--muted);
  line-height: 1.6;
}

.legal-card {
  max-width: 850px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 42px);
}

.legal-list {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.legal-list p {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 44px) 118px;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.footer-links button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  padding: 0 10px;
}

.bottom-nav {
  position: fixed;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 30;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-width: 520px;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bottom-nav button.active {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 8, 12, 0.58);
}

.modal {
  width: min(460px, 100%);
  padding: 22px;
}

.payment-modal {
  width: min(620px, 100%);
}

.field {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 16px 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.segmented button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented button.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 8px 18px rgba(20, 35, 60, 0.08);
}

.payment-steps {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.payment-steps div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.payment-steps strong {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
}

.payment-steps span {
  color: var(--muted);
  font-weight: 800;
}

.upi-box {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.upi-box img {
  width: 180px;
  height: 180px;
  border: 8px solid #fff;
  border-radius: 8px;
  background: #fff;
}

.upi-box h3 {
  margin: 12px 0 8px;
}

.pay-link {
  text-decoration: none;
}

.status-box {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 12px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 60;
  max-width: 360px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.hide {
  display: none !important;
}

@media (max-width: 920px) {
  .hero,
  .dashboard,
  .lesson-view,
  .certificate-wrap,
  .trust-band {
    grid-template-columns: 1fr;
  }

  .phone {
    margin: 0 auto;
  }

  .course-grid,
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .shell {
    padding-bottom: 86px;
  }

  .topbar {
    padding: 12px 14px;
  }

  .nav-actions .ghost-btn,
  .nav-actions .secondary-btn {
    display: none;
  }

  .main {
    padding: 18px 14px 28px;
  }

  .hero {
    min-height: auto;
  }

  .metric-row,
  .course-grid,
  .admin-grid,
  .trust-grid,
  .info-grid,
  .cert-meta,
  .cert-foot,
  .table-row {
    grid-template-columns: 1fr;
  }

  .cert-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .cert-issuer,
  .qr-block {
    text-align: left;
    justify-items: start;
  }

  .phone-screen {
    min-height: 480px;
  }

  .section-head {
    display: block;
  }

  .course-card {
    min-height: 218px;
  }

  .lesson-stage {
    min-height: 460px;
  }

  .lesson-body {
    font-size: 18px;
  }

  .bottom-nav {
    display: grid;
  }

  .site-footer {
    display: block;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 16px;
  }

  .upi-box {
    grid-template-columns: 1fr;
  }

  .upi-box img {
    width: min(220px, 100%);
    height: auto;
  }
}

@media print {
  body {
    background: white;
  }

  .topbar,
  .bottom-nav,
  .site-footer,
  .certificate-wrap > .panel,
  .toast {
    display: none !important;
  }

  .main {
    padding: 0;
  }

  .certificate {
    min-height: 96vh;
    box-shadow: none;
  }
}
/* ===== PREMIUM UI POLISH ===== */

.course-card,
.panel,
.admin-card,
.metric,
.lesson-card,
.table-row {
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.course-card:hover,
.panel:hover,
.admin-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 22px 55px rgba(15, 23, 42, 0.12),
    0 6px 20px rgba(18, 108, 90, 0.08);
}

.course-card:hover {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}

/* ===== BETTER BUTTONS ===== */

.primary-btn {
  position: relative;
  overflow: hidden;
}

.primary-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      120deg,
      transparent 20%,
      rgba(255,255,255,0.18) 50%,
      transparent 80%
    );
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.primary-btn:hover::before {
  transform: translateX(120%);
}

/* ===== PAYMENT MODAL FIX ===== */

.modal-backdrop {
  overflow-y: auto;
  padding:
    max(18px, env(safe-area-inset-top))
    18px
    max(18px, env(safe-area-inset-bottom));
}

.payment-modal {
  width: min(620px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 20px;
  padding: 24px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.payment-modal::-webkit-scrollbar {
  width: 8px;
}

.payment-modal::-webkit-scrollbar-thumb {
  background: rgba(120,120,120,0.4);
  border-radius: 999px;
}

/* ===== UPI BOX ===== */

.upi-box {
  border-radius: 18px;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface) 96%, white),
      var(--surface-2)
    );
}

.upi-box img {
  box-shadow:
    0 10px 30px rgba(0,0,0,0.08);
}

/* ===== CERTIFICATE PREMIUM ===== */

.certificate {
  border-radius: 22px;
}

.certificate::after {
  opacity: 0.08;
}

.signature-name {
  font-family: cursive;
  letter-spacing: 1px;
}

.seal {
  box-shadow:
    inset 0 0 0 4px rgba(255,255,255,0.3),
    0 10px 25px rgba(201,169,78,0.25);
}

/* ===== PREMIUM GLASS TOPBAR ===== */

.topbar {
  backdrop-filter: blur(24px);
  border-bottom:
    1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

/* ===== COURSE GRID BETTER ===== */

.course-card {
  border-radius: 18px;
}

.course-card h3 {
  line-height: 1.1;
}

/* ===== MOBILE RESPONSIVE FIXES ===== */

@media (max-width: 680px) {

  .topbar {
    gap: 10px;
  }

  .brand {
    font-size: 15px;
  }

  .nav-actions {
    gap: 6px;
  }

  .hero-copy {
    font-size: 16px;
  }

  h1 {
    line-height: 1.02;
  }

  .course-card {
    min-height: auto;
    padding: 16px;
  }

  .payment-modal {
    width: 100%;
    max-height: 94vh;
    padding: 18px;
    border-radius: 18px;
  }

  .upi-box {
    gap: 14px;
    padding: 14px;
  }

  .upi-box img {
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
  }

  .certificate {
    padding: 22px;
  }

  .cert-title {
    margin-top: 34px;
  }

  .cert-name {
    font-size: 34px;
  }

  .cert-course {
    font-size: 18px;
  }

  .table-row {
    gap: 8px;
  }
}

/* ===== SMOOTH APP FEEL ===== */

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}
/* ===== CERTIFICATE PROFESSIONAL PATCH ===== */

/* ===== FINAL CERTIFICATE FIX ===== */

.certificate {
  height: 720px !important;
  min-height: unset !important;
  padding: 40px !important;
  overflow: hidden;
}

.cert-title {
  margin-top: 18px;
  margin-bottom: 10px;
}

.cert-subtitle {
  margin-bottom: 10px;
}

.cert-name {
  margin-bottom: 12px;
}

.cert-course {
  font-size: 20px;
}

.cert-meta {
  margin-top: 26px;
}

.cert-foot {
  margin-top: 34px;
  align-items: center;
}

.signature-name {
  font-family: cursive;
}

.qr-block {
  gap: 6px;
}

.cert-verify-text {
  margin: 0;
  font-size: 12px;
}

@media print {

  body {
    background: white !important;
  }

  body * {
    visibility: hidden;
  }

  .certificate,
  .certificate * {
    visibility: visible;
  }

  .certificate {
    position: absolute;
    left: 0;
    top: 0;

    width: 100% !important;
    height: 700px !important;

    padding: 34px !important;

    margin: 0 !important;

    transform: scale(0.94);

    transform-origin: top center;

    box-shadow: none !important;

    border-radius: 0 !important;

    overflow: hidden !important;
  }

  .certificate-wrap {
    display: block !important;
  }

  .certificate-wrap > .panel {
    display: none !important;
  }

  @page {
    size: landscape;
    margin: 0;
  }
}
/* ===== PAYMENT SUCCESS UI ===== */

.loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 999px;
  animation: spin .7s linear infinite;
}

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

.success-popup {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;

  opacity: 0;
  pointer-events: none;

  transition: .35s ease;
}

.success-popup.show {
  opacity: 1;
}

.success-card {
  width: min(92vw, 420px);

  background: white;

  border-radius: 24px;

  padding: 36px;

  text-align: center;

  box-shadow:
    0 30px 90px rgba(15,23,42,0.22);

  transform: translateY(24px) scale(.96);

  transition: .35s ease;
}

.success-popup.show .success-card {
  transform: translateY(0) scale(1);
}

.success-icon {
  width: 84px;
  height: 84px;

  margin: 0 auto 18px;

  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 42px;
  font-weight: 900;

  color: white;

  background:
    linear-gradient(
      135deg,
      #10b981,
      #059669
    );

  box-shadow:
    0 20px 40px rgba(16,185,129,0.28);
}

.success-card h2 {
  margin-bottom: 10px;
}

.success-card p {
  color: #64748b;
}
.certificate {
  background: #fff !important;
  color: #111827 !important;
  box-shadow: none !important;
}

.certificate::before {
  opacity: 0.4;
}

* {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
