/* ============================================================
   Agentive Academy — LMS Layer (v3.0)
   Extends main.css for dashboards, login, admin pages
   ============================================================ */

/* ── LMS Shell ── */
.lms-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.lms-sidebar {
  background: var(--navy, #030617); color: rgba(255,255,255,0.85);
  padding: 24px 16px; position: fixed; top: 0; left: 0; bottom: 0; width: 260px;
  overflow-y: auto; z-index: 100; display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.lms-sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin-bottom: 24px; }
.lms-sidebar-brand img { height: 40px; width: auto; }
.lms-sidebar-brand span { font-weight: 700; font-size: 15px; color: #fff; }
.lms-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.lms-sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: 8px; font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.65);
  text-decoration: none; transition: all 0.2s;
}
.lms-sidebar nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.lms-sidebar nav a.active { background: rgba(200,157,120,0.15); color: var(--gold, #C89D78); font-weight: 600; }
.lms-sidebar nav a span:first-child { width: 20px; text-align: center; font-size: 16px; }
.lms-sidebar-section { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.3); padding: 20px 14px 6px; }
.lms-main { margin-left: 260px; padding: 32px 40px; min-height: 100vh; background: var(--cream, #F4EEEB); }
.lms-main-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }

@media (max-width: 1024px) {
  .lms-shell { grid-template-columns: 1fr; }
  .lms-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .lms-sidebar.open { transform: translateX(0); }
  .lms-main { margin-left: 0; padding: 24px 20px; }
}

/* ── Auth Pages ── */
.auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: linear-gradient(135deg, var(--navy, #030617) 0%, #151829 50%, #0D1F3C 100%);
  position: relative; overflow: hidden;
}
.auth-shell::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(200,157,120,0.08), transparent 60%);
}
.auth-card {
  background: var(--white, #F9F1F4); border-radius: 20px; padding: 48px 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3); max-width: 480px; width: 100%;
  position: relative; z-index: 2;
}
.auth-card-wide { max-width: 560px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 32px; }
.auth-brand img { height: 56px; width: auto; }
.auth-brand .auth-label { font-size: 11px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold, #C89D78); }
.auth-divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; color: var(--text-light, #716879); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--cream-dark, #EBE3DE); }
.auth-footer { margin-top: 24px; text-align: center; font-size: 13px; color: var(--text-mid, #4A4555); }
.auth-footer a { color: var(--gold, #C89D78); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Course Grid ── */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.course-card {
  background: var(--white, #F9F1F4); border-radius: 16px; overflow: hidden;
  border: 1px solid var(--cream-dark, #EBE3DE); transition: all 0.3s;
  display: flex; flex-direction: column;
}
.course-card:hover { transform: translateY(-6px); box-shadow: 0 20px 48px rgba(3,6,23,0.16); border-color: rgba(200,157,120,0.4); }
.course-card-cover {
  height: 120px; display: flex; align-items: center; justify-content: center;
  font-size: 48px; position: relative;
}
.course-card-body { padding: 20px 24px; flex: 1; display: flex; flex-direction: column; }
.course-card-title { font-size: 1.05rem; font-weight: 700; color: var(--navy, #030617); margin-bottom: 6px; }
.course-card-desc { font-size: 0.85rem; color: var(--text-mid, #4A4555); line-height: 1.6; flex: 1; margin-bottom: 16px; }
.course-card-meta { display: flex; gap: 16px; font-size: 0.75rem; color: var(--text-light, #716879); margin-bottom: 12px; }
.course-card-progress { height: 6px; background: var(--cream-dark, #EBE3DE); border-radius: 3px; overflow: hidden; margin-bottom: 16px; }
.course-card-progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold, #C89D78), var(--gold-light, #E6B682)); border-radius: 3px; transition: width 0.6s; }
.course-card-actions { display: flex; gap: 8px; }

/* ── Stats Grid ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: var(--white, #F9F1F4); border-radius: 12px; padding: 20px;
  border: 1px solid var(--cream-dark, #EBE3DE); text-align: center;
}
.stat-number { font-size: 2rem; font-weight: 800; color: var(--navy, #030617); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-mid, #4A4555); margin-top: 4px; font-weight: 500; }

/* ── Countdown Timer ── */
.countdown-banner {
  background: linear-gradient(135deg, rgba(200,157,120,0.12), rgba(200,157,120,0.04));
  border: 1px solid rgba(200,157,120,0.25); border-radius: 12px;
  padding: 16px 24px; display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.countdown-timer { display: flex; gap: 16px; }
.countdown-unit { text-align: center; }
.countdown-num { font-size: 1.5rem; font-weight: 800; color: var(--navy, #030617); line-height: 1; }
.countdown-lbl { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-mid, #4A4555); }

/* ── Free Badge ── */
.free-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(200,157,120,0.15); color: var(--gold-dark, #8B6E50);
  padding: 4px 12px; border-radius: 20px; font-size: 0.7rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}

/* ── Lockout Screen ── */
.lockout-overlay {
  position: fixed; inset: 0; background: rgba(3,6,23,0.95); z-index: 10000;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  gap: 20px; color: #fff; text-align: center; padding: 40px;
}
.lockout-overlay h2 { font-size: 2rem; font-weight: 800; }
.lockout-overlay p { color: rgba(255,255,255,0.65); max-width: 480px; }

/* ── Achievements ── */
.achievements-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.achievement-card {
  background: var(--white, #F9F1F4); border-radius: 12px; padding: 16px;
  border: 1px solid var(--cream-dark, #EBE3DE); text-align: center;
}
.achievement-card.locked { opacity: 0.4; filter: grayscale(0.8); }
.achievement-icon { font-size: 32px; margin-bottom: 8px; }
.achievement-title { font-size: 0.85rem; font-weight: 700; color: var(--navy, #030617); }
.achievement-desc { font-size: 0.75rem; color: var(--text-mid, #4A4555); margin-top: 4px; }

/* ── Admin Table ── */
.data-table { width: 100%; border-collapse: collapse; background: var(--white, #F9F1F4); border-radius: 12px; overflow: hidden; }
.data-table th { background: var(--navy, #030617); color: #fff; padding: 12px 16px; font-size: 0.8rem; font-weight: 600; text-align: left; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.data-table td { padding: 12px 16px; font-size: 0.875rem; border-bottom: 1px solid var(--cream-dark, #EBE3DE); }
.data-table tr:hover td { background: rgba(200,157,120,0.04); }
.data-table .badge-paid { background: rgba(34,197,94,0.12); color: #166534; padding: 3px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 700; }
.data-table .badge-free { background: rgba(59,130,246,0.12); color: #1D4ED8; padding: 3px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 700; }
.data-table .badge-active { background: rgba(34,197,94,0.12); color: #166534; padding: 3px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 700; }
.data-table .badge-expired { background: rgba(239,68,68,0.12); color: #DC2626; padding: 3px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 700; }
.data-table .badge-locked { background: rgba(107,114,128,0.12); color: #4B5563; padding: 3px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 700; }

/* ── Toolbar ── */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar .form-input { max-width: 280px; padding: 8px 14px; font-size: 0.875rem; }
.toolbar .form-select { max-width: 180px; padding: 8px 14px; font-size: 0.875rem; }

/* ── Chart Area ── */
.chart-container { background: var(--white, #F9F1F4); border-radius: 12px; padding: 24px; border: 1px solid var(--cream-dark, #EBE3DE); }
.chart-bar-graph { display: flex; align-items: flex-end; gap: 4px; height: 200px; }
.chart-bar {
  flex: 1; background: linear-gradient(180deg, var(--gold, #C89D78), var(--gold-light, #E6B682));
  border-radius: 4px 4px 0 0; transition: height 0.6s; min-width: 8px; position: relative; cursor: pointer;
}
.chart-bar:hover { opacity: 0.85; }
.chart-bar-tooltip { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 11px; white-space: nowrap; margin-bottom: 4px; }
.chart-bar:hover .chart-bar-tooltip { display: block; }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(3,6,23,0.6); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { background: var(--white, #F9F1F4); border-radius: 16px; padding: 32px; max-width: 560px; width: 100%; max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-mid); padding: 4px; }
.modal-close:hover { color: var(--navy); }

/* ── DoD Disclaimer ── */
.dod-disclaimer {
  background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.15);
  border-radius: 8px; padding: 12px 16px; font-size: 0.75rem;
  color: #991B1B; line-height: 1.5; margin-top: 16px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .course-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-card { padding: 32px 24px; }
}

/* ── Misc Utilities ── */
.hidden { display: none !important; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 32px; }
.mb { margin-bottom: 16px; }
.mb-lg { margin-bottom: 32px; }
.text-center { text-align: center; }
