/* ==========================================================================
   ATAMAP Security Academy — Shared Stylesheet
   Apple-inspired design language
   ========================================================================== */

:root {
  --bg: #FFFFFF;
  --text: #0d1b2a;
  --accent: #D4AF37;       /* Gold */
  --secondary: #F07000;    /* Orange */
  --surface: #F5F5F7;      /* Light gray */
  --border: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-w: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  font-size: 17px;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ===== Layout helpers ===== */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 768px) {
  .container { padding: 0 16px; }
}

.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .section-tight { padding: 40px 0; }
}

.text-center { text-align: center; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.15;
}
.section-subtitle {
  font-size: clamp(17px, 2vw, 20px);
  color: #475569;
  max-width: 640px;
  margin: 0 auto 0;
  line-height: 1.55;
}

/* ===== Top Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.nav-brand img { height: 32px; width: auto; }
.nav-brand .brand-text { color: var(--text); }
.nav-brand .brand-text small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--secondary); }
@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 980px;
  transition: all var(--transition);
  cursor: pointer;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: #fff;
}
.btn-primary:hover {
  background: #1a2942;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-gold {
  background: var(--accent);
  color: var(--text);
}
.btn-gold:hover {
  background: #c4a02f;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
}
.btn-secondary:hover { background: #ebebef; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--surface); }
.btn-orange {
  background: var(--secondary);
  color: #fff;
}
.btn-orange:hover { background: #d66500; transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 14px 32px; font-size: 17px; }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ===== Hero ===== */
.hero {
  padding: 80px 0 64px;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(212, 175, 55, 0.06) 0%, transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}
.hero-logo {
  height: 72px;
  width: auto;
  margin: 0 auto 28px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 18px;
}
.hero h1 .accent { color: var(--secondary); }
.hero .subtitle {
  font-size: clamp(17px, 2.4vw, 22px);
  color: #475569;
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.5;
}
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Course Cards ===== */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
@media (max-width: 900px) {
  .courses-grid { grid-template-columns: 1fr; gap: 18px; }
}
.course-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.course-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(212, 175, 55, 0.3);
}
.course-card:hover::before { transform: scaleX(1); }
.course-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(240, 112, 0, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--secondary);
  margin-bottom: 22px;
}
.course-card h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.course-card .course-desc {
  color: #475569;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 20px;
  flex: 1;
}
.course-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.course-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #475569;
}
.course-meta-item i { color: var(--accent); width: 16px; text-align: center; }
.course-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 20px;
}
.course-price .amount {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.course-price .currency { font-size: 16px; color: #64748b; font-weight: 500; }

/* ===== Features Grid ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr; }
}
.feature {
  padding: 28px 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: all var(--transition);
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--secondary);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.feature h4 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.feature p { color: #475569; font-size: 15px; line-height: 1.5; }

/* ===== How It Works ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
  position: relative;
}
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .steps { grid-template-columns: 1fr; }
}
.step {
  text-align: center;
  padding: 20px;
}
.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  margin: 0 auto 16px;
}
.step h4 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.step p { color: #475569; font-size: 14px; }

/* ===== Pricing ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; }
}
.price-card {
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #fff;
  text-align: center;
  transition: all var(--transition);
}
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.15);
}
.price-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.price-card h4 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.price-card .price-amount {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 16px 0 4px;
}
.price-card .price-period { color: #64748b; font-size: 14px; margin-bottom: 24px; }
.price-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
}
.price-card ul li {
  padding: 8px 0;
  font-size: 15px;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 10px;
}
.price-card ul li i { color: var(--accent); }

/* ===== Certificate preview ===== */
.cert-preview {
  margin-top: 48px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
}
.cert-preview-frame {
  background: #fff;
  border: 2px solid var(--accent);
  padding: 8px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-width: 720px;
  margin: 0 auto;
}
.cert-preview-inner {
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 40px;
  border-radius: 8px;
}

/* ===== Footer ===== */
.footer {
  background: var(--text);
  color: #cbd5e1;
  padding: 64px 0 32px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.footer-brand img {
  height: 36px;
  filter: brightness(0) invert(1);
  margin-bottom: 14px;
}
.footer-brand p { font-size: 14px; line-height: 1.6; max-width: 320px; }
.footer h5 {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.footer ul { list-style: none; }
.footer ul li { padding: 6px 0; font-size: 14px; }
.footer ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}

/* ===== Forms ===== */
.form-wrap {
  max-width: 480px;
  margin: 48px auto;
  padding: 40px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.form-wrap.compact { max-width: 560px; padding: 32px; }
.form-wrap h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.form-wrap .form-sub {
  color: #64748b;
  font-size: 15px;
  margin-bottom: 28px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  transition: all var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12);
}
textarea.form-control { resize: vertical; min-height: 96px; }
.form-hint { font-size: 13px; color: #64748b; margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: #64748b;
}
.form-footer a { color: var(--secondary); font-weight: 600; }
.form-footer a:hover { text-decoration: underline; }

/* ===== Payment ===== */
.payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 920px;
  margin: 48px auto;
}
@media (max-width: 768px) {
  .payment-grid { grid-template-columns: 1fr; }
}
.payment-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.payment-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.bank-row:last-child { border-bottom: none; }
.bank-row .label { color: #64748b; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; }
.bank-row .value { font-weight: 600; }
.bank-row .value.mono { font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 17px; }
.copy-btn {
  background: none;
  color: var(--secondary);
  font-size: 13px;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background var(--transition);
}
.copy-btn:hover { background: var(--surface); }
.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}
.summary-line .label { color: #64748b; font-size: 14px; }
.summary-line .value { font-size: 20px; font-weight: 700; }

/* ===== Dashboard ===== */
.dash-header {
  background: linear-gradient(135deg, var(--text) 0%, #1a2942 100%);
  color: #fff;
  padding: 48px 0;
}
.dash-header h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.dash-header .sub { color: #cbd5e1; font-size: 16px; }
.dash-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-top: -32px;
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 768px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}
.stat .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat .stat-label {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat .stat-value.gold { color: var(--accent); }
.stat .stat-value.orange { color: var(--secondary); }
.stat .stat-value.green { color: #16a34a; }

/* Progress bar */
.progress-wrap { margin: 20px 0; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 500;
}
.progress-bar {
  height: 10px;
  background: var(--surface);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  border-radius: 999px;
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Module list (dashboard + course page) */
.module-list { margin-top: 16px; }
.module-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.module-item:hover { box-shadow: var(--shadow-sm); }
.module-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  transition: background var(--transition);
}
.module-header:hover { background: var(--surface); }
.module-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.module-item.completed .module-num {
  background: var(--accent);
  color: var(--text);
}
.module-info { flex: 1; min-width: 0; }
.module-info h4 { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.module-info .module-meta {
  font-size: 13px;
  color: #64748b;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.module-status {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.module-status.locked { background: #f1f5f9; color: #64748b; }
.module-status.in-progress { background: #fef3c7; color: #92400e; }
.module-status.completed { background: #dcfce7; color: #166534; }
.module-status.failed { background: #fee2e2; color: #991b1b; }

.accordion-body {
  display: none;
  padding: 0 20px 16px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}
.accordion-body.open { display: block; }
.lesson-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 15px;
}
.lesson-row:last-child { border-bottom: none; }
.lesson-row .lesson-info { display: flex; align-items: center; gap: 12px; }
.lesson-row .lesson-num {
  font-size: 13px;
  color: #94a3b8;
  width: 24px;
}
.lesson-row .lesson-title { color: var(--text); }
.lesson-row .lesson-check {
  color: var(--accent);
  font-size: 14px;
}
.lesson-row a { color: var(--secondary); font-size: 14px; font-weight: 500; }
.lesson-row a:hover { text-decoration: underline; }
.module-test-btn {
  margin: 16px 0 4px;
  display: flex;
  justify-content: flex-end;
}

/* ===== Lesson page ===== */
.lesson-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  margin: 48px auto;
  max-width: var(--max-w);
  padding: 0 24px;
}
@media (max-width: 900px) {
  .lesson-layout { grid-template-columns: 1fr; }
}
.lesson-main {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}
.breadcrumb a:hover { color: var(--secondary); }
.breadcrumb i { font-size: 10px; }
.lesson-progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface);
  border-radius: 999px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
  margin-bottom: 16px;
}
.lesson-main h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.2;
}
.lesson-main .lesson-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary);
  margin-bottom: 8px;
}
.lesson-content {
  font-size: 17px;
  line-height: 1.7;
  color: #1e293b;
  margin: 28px 0;
}
.lesson-content p { margin-bottom: 18px; }
.lesson-content h3 {
  font-size: 21px;
  font-weight: 600;
  margin: 32px 0 12px;
  letter-spacing: -0.01em;
}
.lesson-content ul { margin: 12px 0 18px 20px; }
.lesson-content ul li { margin-bottom: 8px; }
.lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.lesson-side {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}
.lesson-side h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 12px;
}
.side-lesson {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: background var(--transition);
  margin-bottom: 4px;
}
.side-lesson:hover { background: var(--surface); }
.side-lesson.active { background: var(--surface); font-weight: 600; }
.side-lesson .side-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex-shrink: 0;
}
.side-lesson.done .side-num {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text);
}
.side-lesson .title { flex: 1; min-width: 0; }

/* ===== Tests / Exam ===== */
.test-wrap {
  max-width: 720px;
  margin: 48px auto;
  padding: 0 24px;
}
.test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}
.test-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.test-timer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--text);
  color: #fff;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.test-timer i { color: var(--accent); }
.test-timer.warn { background: var(--secondary); }
.test-timer.danger { background: #dc2626; animation: pulse 1s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.test-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.test-q {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
}
.test-q .q-num {
  color: var(--secondary);
  font-weight: 700;
  flex-shrink: 0;
}
.test-options { list-style: none; }
.test-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 15px;
}
.test-option:hover { background: var(--surface); border-color: rgba(212, 175, 55, 0.4); }
.test-option.selected {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--accent);
}
.test-option input { accent-color: var(--accent); }
.test-option .letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.test-option.selected .letter { background: var(--accent); color: var(--text); }
.test-option.correct { background: #dcfce7; border-color: #16a34a; }
.test-option.correct .letter { background: #16a34a; color: #fff; }
.test-option.incorrect { background: #fee2e2; border-color: #dc2626; }
.test-option.incorrect .letter { background: #dc2626; color: #fff; }

/* Result panel */
.result-card {
  text-align: center;
  padding: 48px 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  max-width: 560px;
  margin: 48px auto;
}
.result-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 20px;
}
.result-icon.pass { background: #dcfce7; color: #16a34a; }
.result-icon.fail { background: #fee2e2; color: #dc2626; }
.result-card h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.result-card .score {
  font-size: 56px;
  font-weight: 700;
  color: var(--text);
  margin: 16px 0 8px;
  letter-spacing: -0.04em;
}
.result-card .score-label { color: #64748b; margin-bottom: 8px; }
.result-card .pass-thresh { font-size: 14px; color: #94a3b8; margin-bottom: 28px; }
.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Certificate page ===== */
.cert-page {
  background: var(--surface);
  min-height: 100vh;
  padding: 48px 0;
}
.cert-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}
.cert {
  background: #fff;
  border: 12px solid var(--accent);
  border-radius: 4px;
  padding: 8px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}
.cert::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(212, 175, 55, 0.4);
  pointer-events: none;
  border-radius: 2px;
}
.cert-inner {
  padding: 48px 56px;
  text-align: center;
  position: relative;
}
@media (max-width: 640px) {
  .cert-inner { padding: 32px 20px; }
}
.cert-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}
.cert-top img { height: 64px; margin-bottom: 14px; }
.cert-org {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text);
  text-transform: uppercase;
}
.cert-org-sub {
  font-size: 13px;
  color: var(--secondary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 2px;
}
.cert-title {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 16px 0;
  color: var(--text);
}
.cert-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 8px 0 32px;
  color: var(--accent);
  font-size: 14px;
}
.cert-ornament::before, .cert-ornament::after {
  content: '';
  width: 60px;
  height: 1px;
  background: var(--accent);
}
.cert-body { font-size: 17px; color: #334155; line-height: 1.8; }
.cert-body .student-name {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin: 12px 0 4px;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--accent);
  display: inline-block;
  padding: 0 32px 6px;
}
.cert-course {
  font-size: 22px;
  font-weight: 600;
  color: var(--secondary);
  margin: 16px 0;
}
.cert-score {
  font-size: 16px;
  color: #475569;
  margin-top: 8px;
}
.cert-score .pct { font-weight: 700; color: var(--text); font-size: 22px; }
.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 56px;
  flex-wrap: wrap;
  gap: 24px;
}
.cert-sig-block { text-align: center; flex: 1; min-width: 200px; }
.cert-sig-name {
  font-family: 'Brush Script MT', cursive;
  font-size: 30px;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}
.cert-sig-line {
  border-top: 1px solid var(--text);
  padding-top: 6px;
  margin-top: 18px;
}
.cert-sig-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}
.cert-sig-creds {
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.cert-sig-role {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}
.cert-id {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  margin-top: 8px;
  letter-spacing: 0.05em;
}
.cert-seal {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #b8941f);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
  line-height: 1.2;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
  border: 3px solid #fff;
  outline: 1px solid var(--accent);
}
.cert-seal .seal-year { font-size: 14px; margin-top: 2px; }
.cert-verify {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}
.cert-verify a { color: var(--secondary); font-weight: 600; }
.cert-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ===== Alerts / banners ===== */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-info { background: #eff6ff; color: #1e40af; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert i { font-size: 16px; }

/* ===== Empty state ===== */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  max-width: 480px;
  margin: 0 auto;
}
.empty-state .icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--secondary);
  margin: 0 auto 18px;
}
.empty-state h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.empty-state p { color: #64748b; font-size: 15px; margin-bottom: 20px; }

/* ===== Utilities ===== */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 14px; }
.text-muted { color: #64748b; }
.text-gold { color: var(--accent); }
.text-orange { color: var(--secondary); }
.hidden { display: none !important; }
.text-center { text-align: center; }

/* ===== Print (for certificate download) ===== */
@media print {
  .nav, .footer, .cert-actions, .alert, .print-hide { display: none !important; }
  body { background: #fff; }
  .cert-page { padding: 0; background: #fff; }
  .cert-container { max-width: 100%; padding: 0; }
  .cert { box-shadow: none; margin: 0; }
  @page { size: A4 landscape; margin: 12mm; }
}
