/* =========================================================================
   Super Open College — Student & Admin Portal
   Layout: dark navy sidebar + white content (EQUIP AI structure)
   Branding: deep navy blue (old SOC identity) + a single teal accent
   Type: Poppins for headings/buttons/nav, Montserrat for body text
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --navy:        #1B2559;
  --navy-deep:   #10143a;
  --sidebar-bg:  #11142B;
  --sidebar-hover: #1c2044;
  --white:       #ffffff;
  --surface:     #f7f8fc;
  --line:        #e7e9f3;
  --ink:         #171a2b;
  --muted:       #6b7086;
  --muted-2:     #9498ab;
  --teal:        #16c79a;
  --teal-soft:   #e3faf4;
  --blue-tint:   #eef1fd;
  --amber:       #f5a524;
  --amber-soft:  #fef3e0;
  --red:         #e5484d;
  --red-soft:    #fdecec;

  --font-head: 'Poppins', -apple-system, sans-serif;
  --font-body: 'Montserrat', -apple-system, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(17,20,43,0.04), 0 10px 30px -14px rgba(17,20,43,0.16);
}

* { box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.35em;
  color: var(--ink);
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--teal); }

button, .btn { font-family: var(--font-head); }

/* AUTH (login / signup) — split screen, matches old SOC layout */
.auth-screen { display: flex; min-height: 100vh; background: var(--white); }
.auth-left { flex: 1 1 50%; display: flex; flex-direction: column; padding: 44px 64px; max-width: 620px; }
.auth-back { color: var(--muted); font-size: 13.5px; font-weight: 600; margin-bottom: 40px; display: inline-flex; align-items: center; gap: 6px; }
.auth-form-wrap { max-width: 420px; margin: auto 0; width: 100%; }
.auth-form-wrap h1 { font-size: 30px; margin-bottom: 8px; }
.auth-form-wrap .subtitle { color: var(--muted); margin-bottom: 32px; font-size: 14.5px; }

.auth-right {
  flex: 1 1 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  overflow: hidden;
}
.auth-right::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
}
.auth-brand { position: relative; text-align: center; color: #fff; padding: 40px; }
.auth-brand .emblem { width: 84px; height: 84px; margin: 0 auto 18px; opacity: 0.95; }
.auth-brand .name { font-family: var(--font-head); font-size: 26px; font-weight: 800; letter-spacing: 0.02em; line-height: 1.25; }
.auth-brand .name span { display: block; }
.auth-brand .tagline { margin-top: 14px; color: #c3c8e6; font-size: 13.5px; max-width: 320px; margin-left: auto; margin-right: auto; }

@media (max-width: 860px) {
  .auth-right { display: none; }
  .auth-left { max-width: none; padding: 32px 24px; }
}

/* FORM ELEMENTS */
label { display: block; font-size: 13.5px; font-weight: 600; margin: 16px 0 6px; color: var(--ink); font-family: var(--font-head); }
label:first-of-type { margin-top: 0; }
label .req { color: var(--red); }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-family: var(--font-body);
  background: var(--blue-tint);
  color: var(--ink);
  transition: border-color .15s, background .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(27,37,89,0.10);
}
.field-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.checkbox-row { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; font-size: 13.5px; }
.checkbox-row label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; color: var(--muted); cursor: pointer; }
.checkbox-row input[type="checkbox"] { width: auto; accent-color: var(--navy); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font-size: 14.5px; font-weight: 600;
  cursor: pointer; transition: opacity .15s, transform .04s;
}
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; margin-top: 22px; }
.btn-auto { width: auto; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { opacity: 0.92; color: #fff; }
.btn-teal { background: var(--teal); color: #06332a; }
.btn-teal:hover { opacity: 0.9; }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-sm { width: auto; padding: 8px 15px; font-size: 13px; }
.btn-danger-outline { background: transparent; border-color: var(--red); color: var(--red); }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 18px; border: 1px solid transparent; }
.alert-error   { background: var(--red-soft); color: var(--red); border-color: #f6cccd; }
.alert-success { background: var(--teal-soft); color: #0d7a5f; border-color: #bdeee0; }
.alert-info    { background: var(--blue-tint); color: var(--navy); border-color: #d7ddf5; }

/* APP SHELL — dark sidebar + white content */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: #b7bad0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 26px 24px 20px; }
.sidebar-logo .mark { width: 30px; height: 30px; flex-shrink: 0; }
.sidebar-logo .text { font-family: var(--font-head); font-weight: 800; font-size: 14.5px; color: #fff; line-height: 1.2; letter-spacing: 0.01em; }

.sidebar-scroll { flex: 1; overflow-y: auto; padding: 6px 16px; }
.nav-group-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.09em; color: #565a78; font-weight: 700; font-family: var(--font-head); margin: 20px 10px 8px; }
.nav-group:first-child .nav-group-label { margin-top: 4px; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 2px;
  color: #b7bad0; font-size: 13.5px; font-weight: 500; font-family: var(--font-head);
  transition: background .12s, color .12s;
}
.nav-item .ic { width: 18px; text-align: center; flex-shrink: 0; opacity: 0.85; }
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--navy); color: #fff; }
.nav-item.active .ic { opacity: 1; }

.sidebar-user {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 16px 20px 20px;
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user .avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-head); font-size: 14px; flex-shrink: 0;
}
.sidebar-user .who { min-width: 0; flex: 1; }
.sidebar-user .name { color: #fff; font-size: 13px; font-weight: 600; font-family: var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .email { color: #7d8099; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-signout { display: block; padding: 0 20px 22px; }
.sidebar-signout a { color: var(--red); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }

/* Mobile top bar (hamburger + logo) — hidden on desktop */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--sidebar-bg);
  padding: 14px 18px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.mobile-topbar .brand-mini { display: flex; align-items: center; gap: 9px; color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 14px; }
.hamburger-btn {
  background: none; border: none; cursor: pointer; padding: 6px;
  display: flex; flex-direction: column; gap: 4px; width: auto;
}
.hamburger-btn span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,12,26,0.5);
  z-index: 45;
}
.sidebar-overlay.open { display: block; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .mobile-topbar { display: flex; }
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 270px;
    max-width: 82vw;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 50;
    flex-direction: column;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-logo { padding: 22px 22px 18px; }
  .sidebar-scroll { display: block; padding: 6px 16px; }
  .nav-group { display: block; }
  .nav-group-label { display: block; }
  .nav-item { padding: 10px 12px; }
  .sidebar-user, .sidebar-signout { display: flex; }
  .sidebar-signout { display: block; }
}

@media (min-width: 901px) {
  .sidebar-overlay { display: none !important; }
}

.main { flex: 1; min-width: 0; }
.main-inner { padding: 30px 36px 60px; max-width: 1240px; }
@media (max-width: 900px) { .main-inner { padding: 20px 16px 40px; } }

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; flex-wrap: wrap; gap: 14px; }
.topbar h1 { font-size: 24px; margin: 0; }
.topbar .actions { display: flex; align-items: center; gap: 12px; }
.avatar-pill { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-head); font-size: 14px; }

/* CARDS / STATS (EQUIP AI style) */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; overflow-x: auto; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stat-grid { grid-template-columns: 1fr; } }

.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.stat-icon.blue  { background: var(--blue-tint); color: var(--navy); }
.stat-icon.teal  { background: var(--teal-soft); color: #0d7a5f; }
.stat-icon.amber { background: var(--amber-soft); color: #a8690a; }
.stat-icon.red   { background: var(--red-soft); color: var(--red); }
.stat-num { font-family: var(--font-head); font-size: 24px; font-weight: 800; line-height: 1; }
.stat-label { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

.section-card { margin-bottom: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.section-head h2 { font-size: 17px; margin: 0; display: flex; align-items: center; gap: 9px; }

/* BADGES */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700; font-family: var(--font-head); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-paid    { background: var(--teal-soft); color: #0d7a5f; }
.badge-pending { background: var(--amber-soft); color: #a8690a; }
.badge-unpaid  { background: var(--red-soft); color: var(--red); }

/* TABLE */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 14px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.06em; font-family: var(--font-head); }
tr:last-child td { border-bottom: none; }
td .sub { color: var(--muted); font-size: 12px; }

.progress-track { width: 140px; height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--navy), var(--teal)); border-radius: 999px; }

.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; }
.search-box { padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 13.5px; min-width: 240px; background: var(--blue-tint); }

/* COURSE CATALOG CARDS */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 980px) { .course-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .course-grid { grid-template-columns: 1fr; } }

.course-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.course-cover { width: calc(100% + 44px); margin: -22px -22px 16px; height: 150px; object-fit: cover; }
.course-cover-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  color: rgba(255,255,255,0.5); font-size: 40px;
}
.course-card .type-pill { align-self: flex-start; background: var(--blue-tint); color: var(--navy); font-size: 11px; font-weight: 700; font-family: var(--font-head); padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; }
.course-card h3 { font-size: 16.5px; margin-bottom: 6px; }
.course-card .meta { color: var(--muted); font-size: 12.5px; margin-bottom: 16px; }
.course-card .price { font-family: var(--font-head); font-weight: 800; font-size: 19px; color: var(--navy); margin-bottom: 16px; }

/* LOCKED STATE */
.locked-panel { text-align: center; padding: 60px 30px; background: var(--white); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.locked-panel .icon { font-size: 36px; margin-bottom: 14px; }
.locked-panel h2 { margin-bottom: 8px; }
.locked-panel p { color: var(--muted); max-width: 420px; margin: 0 auto 22px; }

/* BANK TRANSFER BOX */
.bank-box { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 24px; margin: 18px 0; }
.bank-box .row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.13); font-size: 14px; }
.bank-box .row:last-child { border-bottom: none; }
.bank-box .row span:first-child { color: #a9adcf; }
.bank-box .row span:last-child { font-weight: 700; font-family: var(--font-head); letter-spacing: 0.02em; }

.pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
@media (max-width: 620px) { .pay-options { grid-template-columns: 1fr; } }
.pay-option { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: left; background: var(--white); cursor: pointer; transition: border-color .15s, box-shadow .15s; display: block; }
.pay-option:hover { border-color: var(--navy); box-shadow: var(--shadow); }
.pay-option h3 { font-size: 16px; margin-bottom: 4px; }
.pay-option p { color: var(--muted); font-size: 13px; margin: 0; }

.footer-note { text-align: center; color: var(--muted-2); font-size: 12px; padding: 30px 0 10px; }

/* Password field with show/hide eye toggle */
.password-field { position: relative; }
.password-field input { padding-right: 44px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; width: auto;
  padding: 6px 8px; font-size: 16px; line-height: 1; color: var(--muted);
}
.password-toggle:hover { color: var(--navy); }

/* Two-column responsive grid used on Settings / Programs pages */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.two-col.uneven { grid-template-columns: 1.1fr 1fr; }
@media (max-width: 800px) {
  .two-col, .two-col.uneven { grid-template-columns: 1fr; }
}

/* Logo image used in sidebars and auth screens */
.sidebar-logo img.logo-img { height: 36px; width: auto; }
.auth-form-logo { height: 40px; width: auto; margin-bottom: 22px; }
.auth-brand img.logo-img { height: 72px; width: auto; margin: 0 auto 16px; }

@media (max-width: 480px) {
  .auth-form-logo { height: 32px; margin-bottom: 14px; }
  .auth-brand img.logo-img { height: 56px; }
  .sidebar-logo img.logo-img { height: 28px; }
}
