/* ============================================================
   Legacy Bridge AI Academy — Design System v2.0
   styles/legacy-theme.css
   Loaded by every page. Do not remove.
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --bg:            #050b14;
  --bg-secondary:  #07111e;
  --card:          rgba(11, 22, 38, 0.96);
  --card-solid:    #0b1624;
  --sidebar:       #060f1c;
  --border:        rgba(212, 175, 55, 0.28);
  --border-subtle: rgba(212, 175, 55, 0.11);
  --gold:          #D4AF37;
  --gold-light:    #F0D060;
  --gold-deep:     #B8860B;
  --gold-bg:       rgba(212, 175, 55, 0.08);
  --gold-bg-hover: rgba(212, 175, 55, 0.16);
  --text:          #F8FAFC;
  --text-secondary:#A8B3C4;
  --text-muted:    #6E7A8A;
  --success:       #35D07F;
  --success-bg:    rgba(53, 208, 127, 0.1);
  --danger:        #D96C5F;
  --danger-bg:     rgba(217, 108, 95, 0.1);
  --info:          #5BA4CF;
  --shadow:        0 8px 40px rgba(0, 0, 0, 0.55);
  --shadow-gold:   0 0 32px rgba(212, 175, 55, 0.18);
  --radius:        16px;
  --radius-sm:     10px;
  --radius-lg:     22px;
  --sidebar-w:     242px;
  --transition:    0.2s ease;
  --font:          'Inter', 'Segoe UI', system-ui, -apple-system, Helvetica, Arial, sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: radial-gradient(ellipse at 15% 0%, rgba(212,175,55,0.04) 0%, transparent 50%), var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }
img { max-width: 100%; }

/* ===== APP SHELL ===== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--sidebar) 0%, #040a12 100%);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Logo area */
.sidebar-logo {
  padding: 22px 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  background: rgba(212, 175, 55, 0.03);
}

.sidebar-emblem-img {
  height: 52px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin-bottom: 10px;
}

.logo-name {
  font-size: 12px; font-weight: 700;
  color: var(--gold);
  line-height: 1.35;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.logo-tagline {
  font-size: 11px; color: var(--text-muted);
  margin-top: 3px;
}

/* Nav */
.sidebar-nav {
  padding: 10px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13.5px; font-weight: 500;
  transition: all var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
}

.nav-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }

.nav-item:hover {
  background: var(--gold-bg);
  color: var(--gold);
  border-color: var(--border-subtle);
}

.nav-item.active {
  background: var(--gold-bg-hover);
  color: var(--gold);
  border-color: var(--border);
  font-weight: 600;
}

.nav-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 12px;
}

.nav-section-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted);
  padding: 8px 12px 3px;
}

.sidebar-footer {
  padding: 10px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

/* ===== MOBILE HEADER ===== */
.mobile-header {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; height: 54px;
  background: var(--sidebar);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 14px;
  gap: 12px;
  z-index: 90;
}

.mobile-logo {
  font-size: 12px; font-weight: 700; color: var(--gold);
  text-transform: uppercase; letter-spacing: 0.5px; flex: 1;
}

.hamburger {
  background: none;
  border: 1px solid var(--border);
  color: var(--gold);
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}

/* Overlay */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 99;
  backdrop-filter: blur(2px);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 34px 38px 52px;
  min-width: 0;
}

/* ===== PAGE HEADER ===== */
.page-header { margin-bottom: 26px; }

.page-title {
  font-size: 27px; font-weight: 700;
  color: var(--gold); margin-bottom: 5px; line-height: 1.2;
  text-shadow: 0 0 28px rgba(212, 175, 55, 0.22);
}

.page-subtitle { font-size: 14px; color: var(--text-secondary); }

/* ===== HERO BANNER ===== */
.hero-banner {
  background: linear-gradient(135deg, rgba(11,22,40,0.98) 0%, rgba(6,12,22,0.99) 50%, rgba(9,17,30,0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.30);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin-bottom: 28px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow), 0 0 52px rgba(212, 175, 55, 0.13);
}

.hero-banner::before {
  content: '';
  position: absolute; top: -90px; right: -90px;
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(212,175,55,0.16), transparent 65%);
  pointer-events: none;
}

.hero-banner::after {
  content: '';
  position: absolute; bottom: -60px; left: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(212,175,55,0.07), transparent 70%);
  pointer-events: none;
}

.hero-label {
  display: inline-block;
  background: rgba(212, 175, 55, 0.1); border: 1px solid rgba(212, 175, 55, 0.32);
  color: var(--gold); font-size: 11px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 16px;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.1);
}

.hero-title {
  font-size: clamp(20px, 3vw, 32px); font-weight: 700;
  color: var(--text); margin-bottom: 10px; line-height: 1.2;
}

.hero-title span { color: var(--gold); }

.hero-sub {
  color: var(--text-secondary); font-size: 14px;
  max-width: 540px; line-height: 1.65;
}

.hero-actions {
  display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap;
}

/* ===== STAT GRID ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px; margin-bottom: 26px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.stat-card:hover {
  border-color: rgba(212, 175, 55, 0.38);
  box-shadow: var(--shadow), 0 0 38px rgba(212, 175, 55, 0.20);
  transform: translateY(-1px);
}

.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold-deep) 0%, var(--gold) 45%, transparent 100%);
}

.stat-icon { font-size: 20px; margin-bottom: 10px; }

.stat-value {
  font-size: 30px; font-weight: 700;
  color: var(--gold); line-height: 1; margin-bottom: 6px;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}

.stat-label { font-size: 12px; color: var(--text-muted); }
.stat-change { font-size: 12px; color: var(--success); margin-top: 4px; }

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
  letter-spacing: 0.01em;
}

.section-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border-subtle), transparent 80%);
}

/* ===== GENERIC CARD ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 16px;
  gap: 10px; flex-wrap: wrap;
}

.card-title { font-size: 15px; font-weight: 600; color: var(--text); }

/* ===== PROGRESS BARS ===== */
.progress-bar {
  height: 7px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px; overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-light));
  border-radius: 999px;
  transition: width 0.6s ease;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.progress-lg { height: 11px; }

/* ===== COURSE CARDS (list layout) ===== */
.course-list { display: flex; flex-direction: column; gap: 12px; }

.course-card {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex; gap: 16px; align-items: center;
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.course-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow), var(--shadow-gold);
}

.course-thumb {
  width: 68px; height: 68px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0d1e34, #1a3a18, var(--gold-deep));
  border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.course-info { flex: 1; min-width: 0; }

.course-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.course-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }

.course-progress-row {
  display: flex; align-items: center; gap: 10px;
}

.course-progress-row .progress-bar { flex: 1; }

.progress-pct { font-size: 12px; color: var(--gold); font-weight: 600; white-space: nowrap; }

/* Course grid layout (courses page) */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

.course-grid-card {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.course-grid-card:hover {
  border-color: rgba(212, 175, 55, 0.36);
  transform: translateY(-3px);
  box-shadow: var(--shadow), var(--shadow-gold);
}

.course-grid-card.status-k12-gateway {
  border-color: rgba(212,175,55,0.3);
}
.course-grid-card.status-k12-gateway:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow), var(--shadow-gold);
}

.course-grid-img {
  height: 130px;
  background: linear-gradient(135deg, #0a1826, #0d2038);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  font-size: 42px;
}

/* Course card image system — themed gradient fallback + optional real image */
.course-img-wrap {
  height: 130px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.course-img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block; z-index: 1;
}

.course-img-fallback {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
}

.course-img-icon { font-size: 34px; line-height: 1; }

.course-img-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(212,175,55,0.65);
  text-align: center; padding: 0 10px;
}

.course-grid-body { padding: 18px; }

.course-grid-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 6px; line-height: 1.35;
}

.course-grid-desc {
  font-size: 12px; color: var(--text-secondary);
  line-height: 1.55; margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-grid-footer {
  display: flex; justify-content: space-between;
  align-items: center; gap: 8px; flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13.5px; font-weight: 600;
  border: none; cursor: pointer;
  transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-deep), var(--gold));
  color: #050b14;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: 0 4px 24px rgba(212,175,55,0.45);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent; color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.36);
}

.btn-outline:hover {
  background: var(--gold-bg);
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.15);
}

.btn-ghost {
  background: rgba(255,255,255,0.06); color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--text); }

.btn-danger {
  background: var(--danger-bg); color: var(--danger);
  border: 1px solid rgba(217,108,95,0.35);
}

.btn-danger:hover { background: rgba(217,108,95,0.2); }

.btn-sm  { padding: 7px 14px; font-size: 12.5px; border-radius: 10px; }
.btn-lg  { padding: 13px 28px; font-size: 15px; border-radius: 14px; }
.btn-full { width: 100%; justify-content: center; }

.btn-icon {
  width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.2px;
}

.badge-gold  { background: var(--gold-bg);   color: var(--gold);    border: 1px solid var(--border); }
.badge-green { background: var(--success-bg); color: var(--success); border: 1px solid rgba(53,208,127,0.28); }
.badge-muted { background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.1); }
.badge-danger{ background: var(--danger-bg);  color: var(--danger);  border: 1px solid rgba(217,108,95,0.28); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px; letter-spacing: 0.3px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 13px;
  background: rgba(5,11,18,0.85);
  border: 1px solid rgba(212,175,55,0.22);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px; outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-textarea { resize: vertical; min-height: 110px; line-height: 1.6; }

.form-select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23D4AF37' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}

.form-message {
  margin-top: 12px; padding: 11px 14px;
  border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.5;
  border: 1px solid var(--border); background: var(--gold-bg);
  color: var(--text-secondary); min-height: 42px;
}

.form-message.error  { background: var(--danger-bg);  border-color: rgba(217,108,95,0.35); color: var(--danger); }
.form-message.success{ background: var(--success-bg); border-color: rgba(53,208,127,0.3);  color: var(--success); }

/* ===== TABS ===== */
.tabs {
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  overflow-x: auto; scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab-item {
  padding: 10px 16px; font-size: 13.5px; font-weight: 500;
  color: var(--text-muted);
  border: none; border-bottom: 2px solid transparent;
  background: none; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}

.tab-item:hover { color: var(--text-secondary); }

.tab-item.active {
  color: var(--gold); border-bottom-color: var(--gold); font-weight: 600;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== CHAT ===== */
.chat-wrap {
  background: rgba(5,11,18,0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
}

.chat-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap;
  background: rgba(6,16,26,0.6);
}

.chat-title { font-size: 14px; font-weight: 600; color: var(--text); }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-muted);
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
}

.status-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted);
}

.status-pill.online { color: var(--success); border-color: rgba(53,208,127,0.3); }
.status-pill.online .status-dot { background: var(--success); }
.status-pill.error  { color: var(--danger);  border-color: rgba(217,108,95,0.3); }
.status-pill.error  .status-dot { background: var(--danger); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 300px; max-height: 400px;
}

.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.chat-msg { display: flex; gap: 9px; max-width: 88%; }
.chat-msg.user { flex-direction: row-reverse; align-self: flex-end; }
.chat-msg.ai   { align-self: flex-start; }

.chat-av {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}

.chat-msg.ai   .chat-av { background: linear-gradient(135deg, var(--gold-deep), var(--gold)); color: #050B12; font-weight: 700; }
.chat-msg.user .chat-av { background: rgba(255,255,255,0.09); color: var(--text-secondary); }

.chat-bubble {
  padding: 10px 14px; font-size: 13.5px; line-height: 1.6;
}

.chat-msg.ai   .chat-bubble {
  background: rgba(10,20,36,0.96); border: 1px solid var(--border-subtle);
  border-radius: 4px 14px 14px 14px; color: var(--text);
}

.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, var(--gold-deep), #7a5a00);
  border-radius: 14px 4px 14px 14px; color: #F5F1E6;
}

.chat-response-box {
  margin: 0 18px 18px;
  padding: 16px; min-height: 120px;
  background: rgba(5,11,18,0.7);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  font-size: 13.5px; line-height: 1.7; color: var(--text);
  white-space: pre-wrap;
}

.chat-response-box.placeholder { color: var(--text-muted); }

.chat-input-row {
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex; gap: 10px; align-items: flex-end;
  background: rgba(6,16,26,0.75);
}

.prompt-chips {
  display: flex; flex-wrap: wrap; gap: 7px;
  padding: 10px 14px 0;
}

.prompt-chip {
  padding: 6px 13px;
  background: var(--gold-bg); border: 1px solid var(--border-subtle);
  border-radius: 999px; font-size: 12.5px; color: var(--text-secondary);
  cursor: pointer; transition: all var(--transition);
  border-top-style: solid;
}

.prompt-chip:hover {
  background: var(--gold-bg-hover); color: var(--gold); border-color: var(--border);
}

/* ===== CERTIFICATE CARDS ===== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.cert-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow), var(--shadow-gold);
  position: relative; overflow: hidden;
}

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

.cert-card.locked { border-color: var(--border-subtle); box-shadow: var(--shadow); opacity: 0.65; }
.cert-card.locked::before { background: rgba(255,255,255,0.08); }

.cert-badge {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-deep), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(212,175,55,0.28);
}

.cert-card.locked .cert-badge { background: rgba(255,255,255,0.06); box-shadow: none; }

.cert-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.cert-desc  { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 14px; }

.cert-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ===== NOTIFICATION ITEMS ===== */
.notification-list { display: flex; flex-direction: column; gap: 9px; }

.notif-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  background: var(--card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.notif-item:hover { border-color: var(--border); }
.notif-item.unread { border-left: 3px solid var(--gold); }

.notif-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--gold-bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}

.notif-body  { flex: 1; min-width: 0; }
.notif-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.notif-text  { font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }
.notif-time  { font-size: 12px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

/* ===== HELP CARDS ===== */
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.help-card {
  background: var(--card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); padding: 20px;
  cursor: pointer; transition: all var(--transition);
  display: flex; gap: 14px; align-items: flex-start;
}

.help-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}

.help-icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: var(--gold-bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; flex-shrink: 0;
}

.help-t { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.help-d { font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--text-muted); margin-bottom: 18px;
}

.breadcrumb a { transition: color var(--transition); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .cur { color: var(--text-secondary); }

/* ===== LESSON LAYOUT ===== */
.lesson-layout {
  display: grid; grid-template-columns: 1fr 290px;
  gap: 20px; align-items: start;
}

.lesson-panel {
  background: var(--card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); overflow: hidden;
  position: sticky; top: 20px;
}

.lesson-panel-hdr {
  padding: 14px 16px; border-bottom: 1px solid var(--border-subtle);
  font-size: 13px; font-weight: 600; color: var(--gold);
}

.lesson-li {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 16px; font-size: 12.5px; color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer; transition: background var(--transition);
}

.lesson-li:last-child { border-bottom: none; }
.lesson-li:hover { background: var(--gold-bg); }
.lesson-li.active { background: var(--gold-bg); color: var(--gold); font-weight: 600; }
.lesson-li.done   { color: var(--success); }

.lesson-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600; flex-shrink: 0;
}

.lesson-li.active .lesson-num { background: var(--gold); color: #050B12; }
.lesson-li.done   .lesson-num { background: var(--success); color: #050B12; }

/* ===== AVATAR ===== */
.avatar {
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-deep), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #050B12; flex-shrink: 0;
}

.avatar-xl { width: 80px; height: 80px; font-size: 28px; }
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
.avatar-md { width: 40px; height: 40px; font-size: 15px; }
.avatar-sm { width: 30px; height: 30px; font-size: 12px; }

/* ===== UTILITIES ===== */
.divider { height: 1px; background: var(--border-subtle); margin: 18px 0; }

.empty-state { text-align: center; padding: 44px 20px; color: var(--text-muted); }
.empty-state .ei { font-size: 38px; margin-bottom: 12px; }
.empty-state .et { font-size: 15px; color: var(--text-secondary); margin-bottom: 7px; }
.empty-state .ed { font-size: 13px; }

.two-col   { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.three-col { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.flex-row  { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }

.mt-sm { margin-top: 10px; }
.mt-md { margin-top: 20px; }
.mt-lg { margin-top: 32px; }
.mb-sm { margin-bottom: 10px; }
.mb-md { margin-bottom: 20px; }

.text-gold    { color: var(--gold); }
.text-muted   { color: var(--text-muted); }
.text-sec     { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-sm  { font-size: 13px; }
.text-xs  { font-size: 12px; }
.font-bold    { font-weight: 700; }
.font-semibold{ font-weight: 600; }
.text-center  { text-align: center; }

/* ===== PUBLIC HOMEPAGE ===== */
.pub-header {
  padding: 18px 6%;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(5,11,18,0.92);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
}

.pub-logo {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 700; color: var(--gold);
  text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.3;
}

.pub-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.pub-nav { display: flex; gap: 9px; align-items: center; }

.pub-hero {
  padding: 76px 6% 64px;
  text-align: center; max-width: 860px; margin: 0 auto;
}

.pub-hero-title {
  font-size: clamp(30px, 5.5vw, 58px); font-weight: 700;
  line-height: 1.1; color: var(--text); margin-bottom: 18px;
}

.pub-hero-title span { color: var(--gold); }

.pub-hero-sub {
  font-size: clamp(14px, 2vw, 17px); color: var(--text-secondary);
  max-width: 580px; margin: 0 auto 34px; line-height: 1.7;
}

.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px; padding: 0 6% 56px;
  max-width: 1200px; margin: 0 auto;
}

.pub-card {
  background: var(--card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); padding: 22px 18px;
  transition: all var(--transition); display: block; box-shadow: var(--shadow);
}

.pub-card:hover {
  border-color: var(--border);
  transform: translateY(-3px);
  box-shadow: var(--shadow), var(--shadow-gold);
}

.pub-ci  { font-size: 24px; margin-bottom: 10px; }
.pub-ct  { font-size: 14px; font-weight: 600; color: var(--gold); margin-bottom: 5px; }
.pub-cd  { font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }

.pub-footer {
  background: rgba(5,11,18,0.96);
  border-top: 1px solid var(--border-subtle);
  padding: 24px 6%; text-align: center;
  color: var(--text-muted); font-size: 13px;
}

.pub-footer a { color: var(--text-muted); margin: 0 10px; transition: color var(--transition); }
.pub-footer a:hover { color: var(--gold); }

/* ===== LOGIN PAGE ===== */
.login-shell {
  min-height: 100vh; background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 28px 18px;
  position: relative;
}

/* Large background emblem — fixed so it always fills the viewport */
.login-bg-emblem {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}

.login-bg-emblem img {
  width: 145vmin;
  height: auto;
  object-fit: contain;
  opacity: 0.38;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 60px rgba(212, 175, 55, 0.42));
}

.login-card {
  width: 100%; max-width: 420px;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: var(--radius-lg); padding: 38px 36px;
  position: relative; z-index: 1;
}

.login-logo-area { text-align: center; margin-bottom: 26px; }

.login-emblem-img {
  height: 80px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
  margin: 0 auto 11px;
}

.login-h { font-size: 21px; font-weight: 700; color: var(--text); margin-bottom: 3px; text-shadow: 0 1px 12px rgba(0,0,0,0.9); }
.login-s { font-size: 13px; color: var(--text-muted); text-shadow: 0 1px 8px rgba(0,0,0,0.9); }

.login-tabs-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5px;
  background: transparent;
  border-radius: var(--radius-sm); padding: 4px; margin-bottom: 22px;
}

/* Scoped label shadow so floating text stays readable over the emblem */
.login-card .form-label {
  text-shadow: 0 1px 8px rgba(0,0,0,0.9);
}

.login-tab {
  padding: 9px; border-radius: 6px;
  font-size: 13.5px; font-weight: 600; text-align: center;
  cursor: pointer; transition: all var(--transition);
  color: var(--text-muted); border: none; background: none;
}

.login-tab.active {
  background: var(--gold-bg); color: var(--gold); border: 1px solid var(--border);
}

.login-back {
  display: block; text-align: center; margin-top: 18px;
  font-size: 12.5px; color: var(--text-muted); transition: color var(--transition);
}

.login-back:hover { color: var(--gold); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 32px rgba(0,0,0,0.55); }
  .mobile-header { display: flex; }
  .main-content { margin-left: 0; padding: 84px 20px 44px; }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-panel { position: static; }
  .sidebar-overlay.active { display: block; }
}

@media (max-width: 768px) {
  .stat-grid  { grid-template-columns: 1fr 1fr; }
  .two-col    { grid-template-columns: 1fr; }
  .three-col  { grid-template-columns: 1fr 1fr; }
  .hero-banner{ padding: 22px 18px; }
  .pub-hero   { padding: 44px 5% 36px; }
  .course-card{ flex-direction: column; }
  .cert-grid  { grid-template-columns: 1fr; }
  .login-card { padding: 26px 20px; }
}

@media (max-width: 480px) {
  .stat-grid  { grid-template-columns: 1fr; }
  .three-col  { grid-template-columns: 1fr; }
  .main-content { padding: 70px 13px 34px; }
  .page-title { font-size: 21px; }
}

/* ── Micro-animations ── */
@keyframes lba-fade-in-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lba-fade-in-up {
  animation: lba-fade-in-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .lba-fade-in-up { animation: none; }
}

/* ── Disabled button states ── */
.btn:disabled,
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.52;
}
.btn:disabled:hover,
.btn[disabled]:hover {
  transform: none;
  box-shadow: none;
}
.btn-outline:disabled:hover,
.btn-outline[disabled]:hover {
  background: transparent;
  border-color: rgba(212,175,55,0.36);
}

/* ── Phase 8: Visual consistency polish ── */

/* Planned/coming-soon cards: suppress lift — nothing is interactive on these cards */
.course-grid-card.status-planned:hover,
.course-grid-card.status-coming-soon:hover {
  transform: none;
  box-shadow: var(--shadow);
  border-color: rgba(255,255,255,0.08);
}

/* Lesson sidebar circles: smooth active/done state transition */
.lesson-num {
  transition: background var(--transition), color var(--transition);
}

/* ── Additive premium utilities (apply selectively on specific pages) ── */

/* Deeper gradient card with enhanced gold hover */
.premium-card {
  background: linear-gradient(160deg, rgba(14,26,46,0.99) 0%, rgba(7,14,24,0.99) 100%);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: var(--radius);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}
.premium-card:hover {
  border-color: rgba(212,175,55,0.38);
  box-shadow: var(--shadow), 0 0 40px rgba(212,175,55,0.14);
  transform: translateY(-2px);
}

/* Staggered fade-in for lists — apply to children via JS nth-delay or CSS :nth-child */
@keyframes lba-stagger-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stagger-in {
  animation: lba-stagger-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stagger-in:nth-child(2) { animation-delay: 0.07s; }
.stagger-in:nth-child(3) { animation-delay: 0.14s; }
.stagger-in:nth-child(4) { animation-delay: 0.21s; }
.stagger-in:nth-child(5) { animation-delay: 0.28s; }
.stagger-in:nth-child(6) { animation-delay: 0.35s; }
@media (prefers-reduced-motion: reduce) {
  .stagger-in { animation: none; }
}

/* Gold shimmer sweep — decorative overlay, use on hero/banner elements */
@keyframes lba-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.hero-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(212,175,55,0.06) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: lba-shimmer 6s linear infinite;
  pointer-events: none;
  border-radius: inherit;
}
@media (prefers-reduced-motion: reduce) {
  .hero-shimmer::after { animation: none; }
}

/* Thin gold line section separator */
.section-divider {
  border: none;
  border-top: 1px solid rgba(212,175,55,0.18);
  margin: 32px 0;
}

/* Subtle notice/info strip */
.notice-strip {
  background: rgba(212,175,55,0.05);
  border: 1px solid rgba(212,175,55,0.18);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}
