/* =============================================
   LIMITLESS TRAINING HUB — Stylesheet
   Theme: Corporate Real Estate — Navy / White / Gold
   Fonts: Cormorant Garamond (display) + DM Sans (body)
============================================= */

/* ---- CSS Variables ---- */
:root {
  --navy:      #0B1F3A;
  --navy-mid:  #122844;
  --navy-dark: #071527;
  --gold:      #C9A84C;
  --gold-light:#E4C47A;
  --gold-pale: #F5E8C4;
  --white:     #FFFFFF;
  --off-white: #F8F7F4;
  --gray-100:  #F2F1EE;
  --gray-200:  #E5E3DC;
  --gray-400:  #9E9B92;
  --gray-600:  #5A5850;
  --green:     #2D7A4F;
  --green-bg:  #EAF5EE;
  --yellow:    #D4820A;
  --yellow-bg: #FEF3DC;
  --locked:    #9E9B92;
  --locked-bg: #F2F1EE;
  --red:       #C0392B;
  --red-bg:    #FDEEEC;

  --sidebar-w: 260px;
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 4px 24px rgba(11,31,58,0.10);
  --shadow-lg: 0 8px 40px rgba(11,31,58,0.16);
  --transition: 0.22s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--navy);
  background: var(--off-white);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  line-height: 1.2;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: 'DM Sans', sans-serif; }
input { font-family: 'DM Sans', sans-serif; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.hidden { display: none !important; }

/* ---- Page System ---- */
.page { min-height: 100vh; }
.page.active { display: block; }
.page.hidden { display: none; }


/* ============================================
   LOGIN PAGE
============================================= */
#page-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--navy-dark);
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 30%, rgba(201,168,76,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 20% 80%, rgba(18,40,68,0.9) 0%, transparent 70%),
    linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-mid) 100%);
}

.gold-line {
  position: absolute;
  top: 0; left: 50%;
  width: 1px; height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(201,168,76,0.3) 40%, rgba(201,168,76,0.3) 60%, transparent);
  transform: translateX(-50%);
}

.login-overlay {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(201,168,76,0.04) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(201,168,76,0.04) 60px);
}

.login-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: 440px;
  padding: 24px;
}

.login-brand {
  text-align: center;
  animation: fadeDown 0.7s ease both;
}

.logo-mark {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy-dark);
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 700;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 32px rgba(201,168,76,0.4);
}

.logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 6px;
}

.login-tagline {
  color: var(--gold-light);
  font-size: 13px;
  letter-spacing: 1px;
  margin-top: 6px;
  opacity: 0.85;
}

.login-card {
  background: rgba(255,255,255,0.97);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(201,168,76,0.15);
  animation: fadeUp 0.7s 0.15s ease both;
}

.login-card h2 {
  font-size: 28px;
  color: var(--navy);
  margin-bottom: 6px;
}

.login-sub {
  color: var(--gray-400);
  font-size: 14px;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--navy);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 44px; }
.toggle-pass {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: 0.5;
  transition: opacity var(--transition);
}
.toggle-pass:hover { opacity: 1; }

.login-error {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy) 100%);
  box-shadow: 0 4px 20px rgba(11,31,58,0.3);
  transform: translateY(-1px);
}

.btn-primary.full { width: 100%; justify-content: center; }

.btn-outline {
  border: 2px solid var(--navy);
  color: var(--navy);
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.login-hint {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--gray-400);
}


/* ============================================
   APP LAYOUT
============================================= */
#page-app {
  display: flex;
  min-height: 100vh;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy-dark);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.logo-mark.sm {
  width: 38px; height: 38px;
  font-size: 22px;
  border-radius: 10px;
  margin: 0;
  box-shadow: 0 4px 16px rgba(201,168,76,0.35);
}

.logo-text-sm {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--white);
}

.nav-links {
  padding: 16px 0;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.nav-link:hover, .nav-link.active {
  background: rgba(201,168,76,0.1);
  color: var(--gold-light);
  border-left-color: var(--gold);
}

.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy-dark);
  font-weight: 700;
  font-size: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.user-avatar-sm {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy-dark);
  font-weight: 700;
  font-size: 14px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
}

.user-role {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
}

.btn-logout {
  width: 100%;
  padding: 9px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  transition: all var(--transition);
}
.btn-logout:hover {
  background: rgba(192,57,43,0.15);
  color: #e87b6e;
  border-color: rgba(192,57,43,0.3);
}

/* ---- MOBILE HEADER ---- */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--navy-dark);
  padding: 12px 20px;
  z-index: 99;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(201,168,76,0.2);
}

.hamburger {
  font-size: 22px;
  color: var(--white);
}

.mobile-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--white);
}

/* ---- MAIN CONTENT ---- */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 40px;
  min-height: 100vh;
}

/* ---- Content Sections ---- */
.content-section { display: none; }
.content-section.active { display: block; animation: fadeIn 0.3s ease; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
}

.section-sub {
  color: var(--gray-400);
  font-size: 14px;
  margin-top: 4px;
}

.header-date {
  font-size: 13px;
  color: var(--gray-400);
  background: var(--white);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--gray-200);
  white-space: nowrap;
}

/* ---- Stats Row ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  text-align: center;
  transition: transform var(--transition);
}

.stat-card:hover { transform: translateY(-2px); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
}

.stat-icon.gold { background: var(--gold-pale); }
.stat-icon.blue { background: #EAF0FB; }
.stat-icon.gray { background: var(--locked-bg); }
.stat-icon.green { background: var(--green-bg); }

.stat-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
}

.stat-label {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 2px;
}

/* ---- Overall Progress ---- */
.overall-progress-card {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.overall-progress-card::before {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(201,168,76,0.08);
}

.op-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.op-title {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
}

.op-pct {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold-light);
}

.progress-bar-wrap {
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  height: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 8px;
  transition: width 1s ease;
}

.op-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}

/* ---- Module Cards Grid ---- */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.cards-heading {
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
}

.module-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
}

.module-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.module-card.locked { opacity: 0.65; }
.module-card.locked::before { background: var(--gray-200); }

.module-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.module-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  font-family: 'Cormorant Garamond', serif;
}

.module-desc {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 16px;
}

.module-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.status-badge.completed {
  background: var(--green-bg);
  color: var(--green);
}

.status-badge.in-progress {
  background: var(--yellow-bg);
  color: var(--yellow);
}

.status-badge.locked {
  background: var(--locked-bg);
  color: var(--locked);
}

.btn-module {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all var(--transition);
}

.btn-module:hover {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy-dark);
  transform: translateY(-1px);
}

.btn-module:disabled, .btn-module.disabled {
  background: var(--gray-200);
  color: var(--gray-400);
  cursor: not-allowed;
  transform: none;
}

.module-progress-mini {
  margin-top: 12px;
}

.module-progress-mini .progress-bar-wrap {
  background: var(--gray-100);
}

/* ---- Module Detail Page ---- */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  margin-bottom: 24px;
  transition: color var(--transition);
}
.btn-back:hover { color: var(--gold); }

.module-detail-header {
  margin-bottom: 28px;
}

.module-detail-num {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}

.module-detail-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.module-detail-desc {
  font-size: 15px;
  color: var(--gray-600);
}

.video-wrap {
  background: var(--navy-dark);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  width: 100%;
  max-width: 800px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-lg);
}

.video-wrap iframe {
  width: 100%; height: 100%;
  border: none;
}

.detail-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 800px;
  margin-bottom: 28px;
}

.detail-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow);
}

.detail-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-card ul {
  list-style: none;
  padding: 0;
}

.detail-card ul li {
  font-size: 13px;
  color: var(--gray-600);
  padding: 5px 0;
  padding-left: 18px;
  position: relative;
  border-bottom: 1px solid var(--gray-100);
}

.detail-card ul li:last-child { border-bottom: none; }

.detail-card ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
  font-size: 12px;
}

.notes-text {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.7;
}

.quiz-section {
  max-width: 800px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.quiz-info h4 {
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
}

.quiz-info p {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

.btn-quiz {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy-dark);
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-quiz:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.4);
}

/* ---- Video Library ---- */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.video-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  transition: all var(--transition);
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.video-card-thumb {
  aspect-ratio: 16/9;
  background: var(--navy-dark);
  overflow: hidden;
}

.video-card-thumb iframe {
  width: 100%; height: 100%;
  border: none;
  pointer-events: none;
}

.video-card-body {
  padding: 16px 18px;
}

.video-card-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.video-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.video-card-desc {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.5;
}

/* ---- Search ---- */
.search-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
  max-width: 640px;
}

.search-bar-wrap:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.search-icon { font-size: 18px; opacity: 0.5; }

.search-input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 15px;
  color: var(--navy);
  background: transparent;
}

.search-input::placeholder { color: var(--gray-400); }

.search-results { display: flex; flex-direction: column; gap: 12px; }

.search-result-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.search-result-item:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateX(3px);
}

.search-result-icon {
  width: 40px; height: 40px;
  background: var(--gold-pale);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.search-result-title { font-weight: 600; font-size: 14px; color: var(--navy); }
.search-result-type { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

.search-empty, .search-placeholder {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* ---- Certificates ---- */
.cert-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.cert-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  border-top: 3px solid var(--gold);
  cursor: pointer;
  transition: all var(--transition);
}

.cert-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.cert-card-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.cert-card-module {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.cert-card-date {
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 14px;
}

.cert-card-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  transition: color var(--transition);
}

.cert-card:hover .cert-card-btn { color: var(--navy); }

/* ---- Certificate Preview ---- */
.cert-preview-wrap { animation: fadeIn 0.4s ease; }

.certificate {
  background: var(--white);
  border-radius: 16px;
  max-width: 780px;
  margin: 0 auto 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 60px rgba(11,31,58,0.18);
}

.cert-watermark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cormorant Garamond', serif;
  font-size: 80px;
  font-weight: 700;
  color: rgba(201,168,76,0.06);
  letter-spacing: 12px;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

.cert-border-outer {
  padding: 24px;
  background: linear-gradient(135deg, rgba(201,168,76,0.08) 0%, transparent 60%);
}

.cert-border-inner {
  border: 2px solid var(--gold);
  border-radius: 10px;
  padding: 40px 48px;
  text-align: center;
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.98);
  box-shadow: inset 0 0 0 6px rgba(201,168,76,0.08);
}

.cert-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.cert-logo-mark {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 700;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}

.cert-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 5px;
}

.cert-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
}

.cert-divider {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 20px;
}

.cert-presented {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.cert-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
}

.cert-body {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.cert-module {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 28px;
}

.cert-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 28px;
}

.cert-meta { text-align: center; }
.cert-meta-label { font-size: 11px; color: var(--gray-400); letter-spacing: 0.5px; margin-bottom: 4px; }
.cert-meta-val { font-size: 14px; font-weight: 600; color: var(--navy); }

.cert-seal {
  font-size: 36px;
  color: var(--gold);
}

.cert-sig-row { display: flex; justify-content: center; }

.cert-sig-line {
  text-align: center;
  border-top: 1.5px solid var(--gray-200);
  padding-top: 10px;
  width: 200px;
}

.cert-sig-name { font-size: 13px; font-weight: 600; color: var(--navy); }
.cert-sig-title { font-size: 11px; color: var(--gray-400); }

.cert-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Animations ---- */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- Sidebar Overlay (mobile) ---- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7,21,39,0.6);
  z-index: 98;
}

.sidebar-overlay.active { display: block; }

/* ============================================
   RESPONSIVE — Tablet & Mobile
============================================= */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .detail-cards-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .mobile-header { display: flex; }

  .main-content {
    margin-left: 0;
    padding: 80px 16px 24px;
  }

  .section-title { font-size: 24px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .modules-grid { grid-template-columns: 1fr; }
  .videos-grid { grid-template-columns: 1fr; }
  .cert-list { grid-template-columns: 1fr; }

  .quiz-section { flex-direction: column; align-items: flex-start; }

  .cert-border-inner { padding: 28px 20px; }
  .cert-name { font-size: 32px; }
  .cert-meta-row { gap: 20px; }
  .cert-label { font-size: 24px; }

  .login-card { padding: 28px 20px; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .overall-progress-card { padding: 20px; }
  .section-header { flex-direction: column; }
  .cert-actions { flex-direction: column; align-items: stretch; }
  .cert-actions button { width: 100%; justify-content: center; }
}
