:root {
  --navy: #0F172A;
  --navy-light: #1E293B;
  --green: #16A34A;
  --green-hover: #15803D;
  --white: #FFFFFF;
  --bg-color: #F1F5F9;
  --border: #CBD5E1;
  --border-light: #E2E8F0;
  --text-main: #334155;
  --text-muted: #64748B;
  --red: #EF4444;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
body { background: var(--bg-color); color: var(--text-main); font-size: 14px; line-height: 1.6; overflow-x: hidden; }

button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: none; background: transparent; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--green); outline-offset: 2px;
}
img, video { max-width: 100%; display: block; }

h1, h2, h3, h4 { color: var(--navy); font-weight: 700; line-height: 1.25; margin-bottom: 0.45em; }
h1 { font-size: clamp(26px, 3.5vw, 36px); letter-spacing: -0.02em; }
h2 { font-size: clamp(20px, 2.4vw, 25px); letter-spacing: -0.015em; }
h3 { font-size: 17px; }
.muted { color: var(--text-muted); }
.highlight-text { color: #4ADE80; }
.page-intro .highlight-text { color: var(--green); }
.error-text { color: var(--red); font-weight: 600; }

/* APP SHELL */
.app { display: flex; min-height: 100vh; width: 100%; }
.sidebar {
  width: 260px;
  background: var(--navy);
  color: var(--white);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  overflow-y: auto;
  transition: transform 0.25s ease;
}
.main {
  flex: 1;
  margin-left: 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.content { padding: 28px 32px; max-width: 1240px; margin: 0 auto; width: 100%; flex: 1; }

/* SIDEBAR */
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; color: var(--white); font-weight: 700; font-size: 19px; }
.brand img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--white); flex-shrink: 0; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand small { font-size: 10px; color: #4ADE80; font-weight: 700; letter-spacing: 1.2px; }

.side-label { font-size: 11px; font-weight: 700; color: #94A3B8; margin: 18px 0 8px 12px; letter-spacing: 0.6px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  padding: 10px 12px;
  border-radius: 6px;
  color: #CBD5E1;
  text-align: left;
  font-weight: 500;
  min-height: 40px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-link:hover { background: var(--navy-light); color: var(--white); }
.nav-link.active { background: var(--green); color: var(--white); font-weight: 600; }

.enroll-link { background: rgba(22, 163, 74, 0.14); color: #4ADE80; border: 1px solid rgba(22, 163, 74, 0.35); }
.enroll-link:hover { background: rgba(22, 163, 74, 0.24); }

.sidebar-bottom { margin-top: auto; padding-top: 20px; }
.help-card { background: var(--navy-light); border: 1px solid #334155; padding: 15px; border-radius: 8px; font-size: 12px; }
.help-card b { display: block; color: var(--white); margin-bottom: 4px; }
.help-card p { color: #CBD5E1; margin-bottom: 10px; }
.support-links { display: flex; flex-direction: column; gap: 6px; }
.support-links a { color: #4ADE80; font-weight: 600; font-size: 12px; word-break: break-word; }
.support-links a:hover { text-decoration: underline; }

/* TOPBAR */
.topbar {
  height: 68px;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.menu-btn { display: none; font-size: 22px; color: var(--navy); padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border-light); }
.breadcrumb { font-size: 14px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb b { color: var(--navy); font-weight: 600; }
.top-cta { padding: 8px 16px; min-height: 38px; }

/* BUTTONS & FORM FIELDS */
.primary-btn, .outline-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 6px; font-weight: 600; font-size: 14px;
  min-height: 42px; transition: background-color 0.15s ease, border-color 0.15s ease;
}
.primary-btn { background: var(--green); color: var(--white); }
.primary-btn:hover { background: var(--green-hover); }
.primary-btn:disabled { background: #94A3B8; cursor: not-allowed; }
.outline-btn { background: var(--white); color: var(--navy); border: 1px solid var(--border); }
.outline-btn:hover { border-color: var(--navy); background: #F8FAFC; }
.full-btn { width: 100%; }

.field {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--white); color: var(--navy); font-size: 14px; margin-bottom: 14px;
}
.field:focus { border-color: var(--green); }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.textarea { min-height: 115px; resize: vertical; }

/* PAGES */
.page { display: none; }
.page.active { display: block; }
.page-intro { margin-bottom: 24px; }

/* HERO */
.hero {
  background: var(--navy); color: var(--white);
  border-radius: 12px; padding: 36px;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 32px; align-items: center;
  margin-bottom: 32px; box-shadow: var(--shadow-md);
}
.hero-tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: #4ADE80; background: rgba(22, 163, 74, 0.14); border: 1px solid rgba(22, 163, 74, 0.35);
  padding: 4px 10px; border-radius: 4px; margin-bottom: 12px;
}
.hero-copy h2 { color: var(--white); margin-bottom: 12px; }
.hero-copy p { color: #CBD5E1; margin-bottom: 22px; font-size: 15px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .outline-btn { background: var(--white); color: var(--navy); border-color: var(--white); }
.hero-actions .outline-btn:hover { background: #E2E8F0; }
.hero-image { width: 100%; }
.hero-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; }

/* SECTION HEADINGS */
.section-heading { margin: 32px 0 16px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.section-heading p { font-size: 13px; margin-bottom: 0; }

/* COMPLETE PACKAGE CARD */
.package-card {
  background: var(--white); border: 2px solid var(--navy); border-radius: 10px;
  padding: 26px 28px; display: flex; justify-content: space-between; align-items: center; gap: 28px;
  margin-bottom: 32px; box-shadow: var(--shadow-sm);
}
.package-info { max-width: 720px; }
.badge-pill {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  color: var(--navy); background: var(--bg-color); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 4px; margin-bottom: 8px;
}
.package-info h3 { font-size: 20px; margin-bottom: 8px; }
.package-info p { color: var(--text-muted); margin-bottom: 0; font-size: 14px; }
.package-price { text-align: right; min-width: 210px; flex-shrink: 0; }
.package-price .price { display: block; font-size: 30px; font-weight: 700; color: var(--navy); margin-bottom: 12px; }

/* COURSES & SERVICES CARDS */
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 32px; }
.item-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.item-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.item-image { height: 170px; width: 100%; object-fit: cover; border-bottom: 1px solid var(--border-light); }
.item-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.item-type { font-size: 11px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.item-body h3 { margin-bottom: 8px; font-size: 16px; }
.item-body p { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.item-deliverable { font-size: 12px; color: var(--text-main); background: var(--bg-color); padding: 8px 10px; border-radius: 6px; margin-bottom: 16px; flex: 1; }
.item-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border-light); padding-top: 14px; }
.item-price { font-weight: 700; color: var(--navy); font-size: 15px; }
.item-price.tbc { color: var(--red); font-size: 12px; font-weight: 600; }

/* STEPS GRID */
.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 32px; }
.step-card { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 20px; box-shadow: var(--shadow-sm); }
.step-num { display: inline-block; font-size: 12px; font-weight: 700; color: var(--green); margin-bottom: 8px; }
.step-card h3 { font-size: 16px; margin-bottom: 6px; }
.step-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 0; }

/* STRUCTURED VIDEOS & IMAGES GRIDS */
.media-grid { display: grid; gap: 20px; margin-bottom: 32px; }
.media-grid--videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.media-grid--images { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.media-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.media-frame {
  width: 100%; aspect-ratio: 16 / 9; background: var(--navy);
  overflow: hidden; border-bottom: 1px solid var(--border-light);
}
.media-frame video,
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.media-caption { padding: 14px 16px; }
.media-caption h3 { font-size: 15px; margin-bottom: 4px; }
.media-caption p { font-size: 12px; color: var(--text-muted); margin-bottom: 0; }

/* WORKSPACE & CHECKOUT */
.workspace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 22px; box-shadow: var(--shadow-sm); }
.result-box {
  background: var(--bg-color); border: 1px solid var(--border); padding: 14px;
  border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; min-height: 155px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--navy);
}

.checkout-summary-card { background: var(--bg-color); border: 1px solid var(--green); border-radius: 8px; padding: 16px; }
.summary-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.summary-title { font-weight: 700; color: var(--navy); font-size: 15px; }
.summary-price { font-weight: 700; color: var(--navy); font-size: 16px; }
.summary-desc { font-size: 13px; margin-top: 8px; margin-bottom: 6px; }
.summary-deliverable { font-size: 12px; color: var(--text-main); margin-bottom: 0; }

.contact-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.contact-box b { display: block; color: var(--navy); font-size: 13px; margin-bottom: 4px; }
.contact-box p { font-size: 12px; margin-bottom: 10px; }
.contact-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-inline .outline-btn { font-size: 12px; padding: 8px 12px; min-height: 36px; }

.bank-details-box { background: var(--bg-color); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.bank-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 14px; }
.bank-row span { color: var(--text-muted); }
.bank-row b { color: var(--navy); }
.acct-num { font-size: 16px; letter-spacing: 0.8px; }
.bank-total { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; margin-bottom: 0; }
.bank-total b { color: var(--green); font-size: 16px; }

.tbc-warning { margin-top: 12px; font-size: 12px; }
.notice {
  margin-top: 18px; font-size: 12px; background: #FEF2F2;
  border: 1px solid #FECACA; color: #991B1B; padding: 12px; border-radius: 6px;
}

/* FOOTER & TOAST */
.footer {
  margin-top: 32px; padding: 20px 0; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 12px; color: var(--text-muted); font-size: 12px;
}
.footer-brand { display: flex; flex-direction: column; gap: 2px; }
.footer-brand b { color: var(--navy); font-size: 13px; }
.footer-contacts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.footer-contacts a { color: var(--navy); font-weight: 500; }
.footer-contacts a:hover { color: var(--green); text-decoration: underline; }

.toast {
  position: fixed; bottom: 20px; right: 20px; max-width: calc(100vw - 40px);
  background: var(--navy); color: var(--white); padding: 12px 18px; border-radius: 6px;
  font-size: 13px; font-weight: 500; box-shadow: var(--shadow-md);
  transform: translateY(100px); opacity: 0; transition: all 0.25s ease; z-index: 100;
}
.toast.show { transform: translateY(0); opacity: 1; }
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55); z-index: 45; }

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1024px) {
  .course-grid, .media-grid--images, .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; padding: 28px; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; height: 62px; }
  .content { padding: 18px 14px; }
  .mobile-overlay.show { display: block; }

  .course-grid,
  .media-grid--videos,
  .media-grid--images,
  .steps-grid,
  .workspace-grid { grid-template-columns: 1fr; gap: 14px; }

  .package-card { flex-direction: column; align-items: flex-start; padding: 20px; }
  .package-price { text-align: left; width: 100%; min-width: 0; }
  .footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 430px) {
  .hero { padding: 20px 16px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .primary-btn,
  .hero-actions .outline-btn { width: 100%; }
  .item-footer { flex-direction: column; align-items: stretch; }
  .item-footer .outline-btn { width: 100%; }
  .contact-inline .outline-btn { width: 100%; }
}

/* AUTHENTICATION, STUDENT AND ADMIN ADDITIONS */
[hidden] { display: none !important; }
.account-actions { display:flex; align-items:center; gap:10px; }
.auth-backdrop { position:fixed; inset:0; z-index:200; background:rgba(15,23,42,.68); display:grid; place-items:center; padding:18px; }
.auth-modal { position:relative; width:min(100%,440px); background:#fff; border-radius:14px; padding:30px; box-shadow:0 24px 70px rgba(0,0,0,.25); }
.auth-modal h2 { padding-right:25px; }
.auth-close { position:absolute; right:16px; top:12px; font-size:28px; color:var(--text-muted); }
.auth-tabs { display:flex; gap:8px; margin:20px 0; border-bottom:1px solid var(--border); }
.auth-tab { padding:10px 14px; color:var(--text-muted); border-bottom:3px solid transparent; font-weight:600; }
.auth-tab.active { color:var(--green); border-color:var(--green); }
.auth-message { margin-top:12px; color:var(--green); font-size:13px; }
.text-button { color:var(--green); margin-top:14px; font-weight:600; }
.dashboard-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:20px 0; }
.stat-card { background:#fff; border:1px solid var(--border); border-radius:10px; padding:20px; }
.stat-card strong { display:block; font-size:26px; color:var(--navy); }
.stat-card span { color:var(--text-muted); font-size:12px; }
.table-wrap { overflow-x:auto; }
.data-table { width:100%; border-collapse:collapse; min-width:520px; }
.data-table th,.data-table td { padding:11px; border-bottom:1px solid var(--border-light); text-align:left; font-size:13px; }
.data-table th { color:var(--navy); background:var(--bg-color); }
.admin-course-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.admin-course-form textarea { grid-column:1/-1; }
.admin-course-form button { justify-self:start; }
.account-user { color:var(--text-muted); font-size:12px; }
@media(max-width:768px) {
 .account-actions .top-cta { display:none; }
 .auth-modal { padding:24px 18px; }
 .dashboard-stats { grid-template-columns:1fr; }
 .admin-course-form { grid-template-columns:1fr; }
 .admin-course-form textarea { grid-column:auto; }
}




/*
  TheoNet Academy Supabase connection
*/


/* FOUNDER, SEARCH, WELCOME AND PAYSTACK */
.welcome-banner {
  display:flex; flex-direction:column; gap:3px; padding:14px 18px; margin-bottom:20px;
  background:#ECFDF5; border:1px solid #A7F3D0; border-radius:9px; color:#065F46;
}
.welcome-banner strong { font-size:16px; }
.welcome-banner span { font-size:13px; }
.founder-section {
  display:grid; grid-template-columns:180px 1fr; gap:24px; align-items:center;
  padding:22px; margin:8px 0 30px; background:#fff; border:1px solid var(--border);
  border-radius:12px; box-shadow:var(--shadow-sm);
}
.founder-photo-wrap { width:180px; aspect-ratio:1/1; overflow:hidden; border-radius:10px; background:var(--bg-color); }
.founder-photo-wrap img { width:100%; height:100%; object-fit:cover; }
.founder-kicker { display:inline-block; color:var(--green); font-size:11px; font-weight:700; letter-spacing:1px; margin-bottom:7px; }
.founder-copy h2 { margin-bottom:4px; }
.founder-role { color:var(--green); font-weight:700; margin-bottom:8px; }
.founder-copy p:last-child { color:var(--text-muted); margin-bottom:0; }
.course-search { max-width:620px; margin-bottom:22px; }
.payment-panel { align-self:stretch; }
.payment-panel > .muted { margin-bottom:20px; }
.payment-total { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px; margin:18px 0; border-radius:8px; background:var(--bg-color); border:1px solid var(--border); }
.payment-total span { color:var(--text-muted); }
.payment-total strong { color:var(--green); font-size:22px; }
.payment-note { color:var(--text-muted); font-size:12px; margin-top:14px; }
.payment-status { min-height:20px; margin-top:12px; color:var(--navy); font-size:13px; }
.fixed-course-price { display:flex; align-items:center; justify-content:space-between; padding:11px 12px; margin-bottom:14px; border:1px solid var(--border); border-radius:6px; background:var(--bg-color); color:var(--text-muted); }
.fixed-course-price strong { color:var(--green); font-size:15px; }
@media(max-width:768px) {
  .founder-section { grid-template-columns:1fr; gap:16px; }
  .founder-photo-wrap { width:min(100%,220px); margin:0 auto; }
  .founder-copy { text-align:center; }
}
