/* ============================================================
   LASHAWN ACADEMY - GLOBAL STYLESHEET
   ============================================================ */

:root {
  --navy: #0f2d52;
  --navy2: #163a68;
  --gold: #d4a017;
  --gold-light: #f0c75e;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1a1e24;
  --muted: #5b6472;
  --border: #e2e6eb;
  --success: #1a7f37;
  --warning: #bf8700;
  --danger: #cf222e;
  --info: #0969da;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a { color: inherit; }

/* ---------- HEADER ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  text-decoration: none;
  color: #fff;
}

.brand .dot { color: var(--gold); }

nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

nav a {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

nav a:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}

nav a.cta {
  background: var(--gold);
  border-color: var(--gold);
  color: #241900;
  font-weight: 600;
}

nav a.cta:hover {
  background: var(--gold-light);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  background: var(--gold);
  color: #241900;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn.secondary:hover { background: var(--bg); border-color: var(--navy); }

.btn.danger {
  background: var(--danger);
  color: #fff;
}

.btn.danger:hover { background: #a40e26; }

.btn.small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.btn.full { width: 100%; text-align: center; }

/* ---------- FORMS ---------- */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,160,23,0.15);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-group .hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- CARDS ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.card .icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  display: block;
}

.card h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.card .price { color: var(--gold); font-weight: 700; margin-top: 0.5rem; font-size: 1.05rem; }

.card-link { display: block; text-decoration: none; }
.card-link .card { transition: border-color 0.15s ease, transform 0.15s ease; cursor: pointer; }
.card-link:hover .card { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow); }

/* ---------- GRID ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ---------- SECTIONS ---------- */
section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

section.alt {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

section.alt > * {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

h2 {
  font-size: 1.7rem;
  color: var(--navy);
  text-align: center;
  margin: 0 0 0.5rem;
}

.subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}

/* ---------- HERO ---------- */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
}

.hero h1 {
  font-size: 2.8rem;
  margin: 0 0 1rem;
  line-height: 1.15;
  color: var(--navy);
}

.hero h1 span { color: var(--gold); }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 480px; margin: 0 0 1.6rem; }

.hero-visual {
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  border-radius: 18px;
  padding: 2.2rem;
  color: #fff;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.hero-visual .big { font-size: 2.2rem; font-weight: 800; }

.hero-visual .row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1rem;
  font-size: 0.85rem;
  color: #cfd9e8;
}

/* ---------- TABLES ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table th {
  background: var(--navy);
  color: #fff;
  padding: 0.7rem 0.9rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

table td {
  padding: 0.65rem 0.9rem;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

table tr:hover td { background: #f8f9fb; }

table .actions {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

/* ---------- BADGES ---------- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: #dafbe1; color: #1a7f37; }
.badge-warning { background: #fff8c5; color: #9a6700; }
.badge-danger { background: #ffebe9; color: #cf222e; }
.badge-info { background: #ddf4ff; color: #0969da; }
.badge-neutral { background: #eaeef2; color: #5b6472; }

/* ---------- ALERTS ---------- */
.alert {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  border: 1px solid;
}

.alert-success { background: #dafbe1; border-color: #1a7f37; color: #1a7f37; }
.alert-warning { background: #fff8c5; border-color: #9a6700; color: #9a6700; }
.alert-danger { background: #ffebe9; border-color: #cf222e; color: #cf222e; }
.alert-info { background: #ddf4ff; border-color: #0969da; color: #0969da; }

/* ---------- DASHBOARD ---------- */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--navy);
  color: #fff;
  padding: 1.2rem 0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .brand {
  padding: 0 1.2rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0 0.6rem;
}

.sidebar nav a {
  border: none;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sidebar nav a:hover { background: rgba(255,255,255,0.1); }
.sidebar nav a.active { background: var(--gold); color: #241900; font-weight: 600; }
.sidebar nav a .icon { font-size: 1.1rem; }

.main-content {
  flex: 1;
  padding: 1.5rem 2rem;
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .dashboard-layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; }
  .sidebar nav { flex-direction: row; overflow-x: auto; }
  .sidebar nav a { white-space: nowrap; }
  .main-content { padding: 1rem; }
}

/* ---------- STAT CARDS ---------- */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}

.stat-card .stat-delta {
  font-size: 0.85rem;
  color: var(--muted);
}

.stat-card.gold .stat-value { color: var(--gold); }
.stat-card.success .stat-value { color: var(--success); }
.stat-card.warning .stat-value { color: var(--warning); }
.stat-card.danger .stat-value { color: var(--danger); }

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal h3 { margin: 0 0 1rem; color: var(--navy); }

.modal .modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 1.2rem;
}

/* ---------- LOGIN ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  padding: 1.5rem;
}

.login-card {
  background: var(--card);
  border-radius: 16px;
  padding: 2.2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.login-card h1 {
  text-align: center;
  color: var(--navy);
  margin: 0 0 0.3rem;
  font-size: 1.5rem;
}

.login-card .subtitle { margin-bottom: 1.5rem; font-size: 0.9rem; }

/* ---------- UTILITIES ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ---------- SPINNER ---------- */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.loading-overlay .spinner {
  width: 40px;
  height: 40px;
  border-color: var(--border);
  border-top-color: var(--gold);
}

/* ---------- PRINT ---------- */
@media print {
  header, nav a.cta, .sidebar, .btn, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .hero-visual { background: #fff !important; color: #000 !important; border: 1px solid #000; }
  .cta-band { background: #fff !important; color: #000 !important; border: 1px solid #000; }
  .card, .quote, .stat-card { border: 1px solid #000; break-inside: avoid; }
  a[href]:after { content: " (" attr(href) ")"; font-size: 0.75em; color: #444; }
}
