/* ══════════════════════════════════════════════════════════════
   SUCCEED Platform — styles.css
   Brand: Burgundy Red (#8B1A2B) + Navy Blue (#0A1D3D)
   ══════════════════════════════════════════════════════════════ */
:root {
  --burgundy: #8B1A2B;
  --burgundy-dark: #6E1422;
  --burgundy-light: #A52942;
  --navy: #0A1D3D;
  --navy-light: #122B56;
  --navy-dark: #060F20;
  --accent: #C5A54E;
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --green: #16A34A;
  --red: #DC2626;
  --amber: #D97706;
  --blue: #2563EB;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.1);
  --sidebar-w: 260px;
  --topbar-h: 60px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--gray-100); color: var(--gray-800); line-height: 1.6; min-height: 100vh; }
a { color: var(--burgundy); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 2px; }
img { max-width: 100%; }
input, button, select, textarea { font-family: inherit; font-size: inherit; }
h1,h2,h3 { line-height: 1.3; }

/* ── Page Management ─────────────────────────── */
.page { display: none; min-height: 100vh; }
.page.active { display: flex; }

/* ══════════════════════════════════════════════
   AUTH PAGES
   ══════════════════════════════════════════════ */
.auth-layout { display: flex; min-height: 100vh; width: 100%; }
.auth-sidebar {
  width: 400px; min-width: 400px;
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 40%, var(--navy-light) 100%);
  color: var(--white); padding: 3rem 2.5rem;
  display: flex; flex-direction: column; justify-content: center;
}
.auth-brand { margin-bottom: 2.5rem; }
.brand-logo { max-height: 64px; margin-bottom: 1rem; }
.auth-brand h1 { font-size: 2rem; font-weight: 800; letter-spacing: 3px; color: var(--accent); }
.brand-tagline { font-size: .9rem; color: var(--gray-300); margin-top: .5rem; line-height: 1.5; }
.auth-features { margin-top: 1rem; }
.feature { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: .92rem; color: var(--gray-300); }
.feature-icon { font-size: 1.2rem; width: 26px; text-align: center; }
.auth-footer-text { margin-top: auto; padding-top: 2rem; font-size: .75rem; color: var(--gray-500); }
.auth-footer-text p { margin-bottom: .2rem; }

.auth-content { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--gray-50); }
.auth-card { width: 100%; max-width: 440px; background: var(--white); border-radius: 16px; padding: 2.5rem; box-shadow: var(--shadow-lg); }
.auth-card-lg { max-width: 560px; }
.auth-card h2 { font-size: 1.5rem; font-weight: 700; color: var(--navy); margin-bottom: .4rem; }
.auth-subtitle { color: var(--gray-500); font-size: .9rem; margin-bottom: 1.75rem; }

/* ── Forms ─────────────────────────────────── */
.form-group { margin-bottom: 1.15rem; }
.form-group label { display: block; font-weight: 500; font-size: .85rem; margin-bottom: .35rem; color: var(--gray-700); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .65rem .85rem; border: 1.5px solid var(--gray-300); border-radius: 8px;
  font-size: .93rem; transition: border-color .2s, box-shadow .2s; background: var(--white);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--burgundy); box-shadow: 0 0 0 3px rgba(139,26,43,.1); outline: none;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.form-hint { font-size: .8rem; color: var(--gray-500); margin-top: .25rem; display: block; }
.input-with-icon { position: relative; }
.input-with-icon input { padding-right: 2.5rem; }
.toggle-pw { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: .25rem; color: var(--gray-400); }
.eye-icon { width: 18px; height: 18px; }
.checkbox-wrap { display: flex; align-items: flex-start; gap: .5rem; font-size: .88rem; color: var(--gray-600); cursor: pointer; margin-bottom: .75rem; }
.checkbox-wrap input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--burgundy); margin-top: 2px; flex-shrink: 0; }
.text-link { font-size: .85rem; color: var(--burgundy); }

/* ── Buttons ───────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.5rem; border-radius: 8px; font-weight: 600; font-size: .93rem;
  cursor: pointer; border: none; transition: all .2s; min-height: 42px; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--burgundy); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--burgundy-dark); }
.btn-outline { background: transparent; border: 1.5px solid var(--burgundy); color: var(--burgundy); }
.btn-outline:hover:not(:disabled) { background: rgba(139,26,43,.04); }
.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover:not(:disabled) { background: var(--gray-100); }
.btn-success { background: var(--green); color: var(--white); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-block { width: 100%; }
.btn-sm { padding: .4rem 1rem; font-size: .85rem; min-height: 36px; }
.btn-spinner { width: 16px; height: 16px; border: 2.5px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ───────────────────────────────── */
.divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--gray-400); font-size: .82rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.auth-switch-text { text-align: center; font-size: .88rem; color: var(--gray-500); }

/* ── Stepper ───────────────────────────────── */
.stepper { display: flex; align-items: center; justify-content: center; margin-bottom: 1.75rem; }
.step { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.step-num { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 600; background: var(--gray-200); color: var(--gray-500); transition: all .3s; }
.step.active .step-num { background: var(--burgundy); color: var(--white); }
.step.done .step-num { background: var(--green); color: var(--white); }
.step-text { font-size: .72rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .5px; }
.step.active .step-text { color: var(--burgundy); font-weight: 600; }
.step.done .step-text { color: var(--green); }
.step-connector { width: 50px; height: 2px; background: var(--gray-200); margin: 0 .5rem; margin-bottom: 1.1rem; }
.reg-step { display: none; }
.reg-step.active { display: block; }

/* ── Password Meter ────────────────────────── */
.pw-meter { margin-top: .4rem; }
.pw-meter .bar { height: 4px; border-radius: 2px; background: var(--gray-200); }
.pw-meter .bar-fill { height: 100%; border-radius: 2px; transition: width .3s, background .3s; }
.pw-meter .pw-text { font-size: .75rem; margin-top: .2rem; }
.pw-rules { list-style: none; margin-top: .5rem; font-size: .8rem; color: var(--gray-400); }
.pw-rules li { padding: .15rem 0; padding-left: 1.2rem; position: relative; }
.pw-rules li::before { content: '○'; position: absolute; left: 0; }
.pw-rules li.pass { color: var(--green); }
.pw-rules li.pass::before { content: '●'; }

/* ── Review Card ───────────────────────────── */
.review-card { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.review-row { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px solid var(--gray-100); font-size: .88rem; }
.review-row .rlabel { color: var(--gray-500); }
.review-row .rvalue { font-weight: 500; }

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

/* ── Sidebar ───────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w); background: var(--navy);
  color: var(--white); display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 100; transition: transform .3s;
}
.sidebar-brand { padding: 1rem 1.25rem; display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid rgba(255,255,255,.06); }
.sidebar-logo { height: 32px; }
.sidebar-name { font-weight: 700; font-size: 1.15rem; letter-spacing: 2px; color: var(--accent); }
.mobile-close { display: none; background: none; border: none; color: var(--white); font-size: 1.2rem; cursor: pointer; margin-left: auto; }
.sidebar-nav { flex: 1; padding: .75rem 0; overflow-y: auto; }
.nav-link {
  display: flex; align-items: center; gap: .7rem; padding: .6rem 1.25rem; color: var(--gray-400);
  font-size: .9rem; font-weight: 500; text-decoration: none; border-left: 3px solid transparent; transition: all .15s;
}
.nav-link:hover { background: rgba(255,255,255,.04); color: var(--gray-200); text-decoration: none; }
.nav-link.active { color: var(--white); background: rgba(139,26,43,.25); border-left-color: var(--burgundy-light); }
.nav-ico { font-size: 1.1rem; width: 22px; text-align: center; }
.nav-txt { flex: 1; }
.nav-badge { background: var(--burgundy); color: var(--white); font-size: .7rem; padding: .1rem .45rem; border-radius: 10px; font-weight: 700; }
.nav-section-label { padding: 1rem 1.25rem .4rem; font-size: .68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-500); font-weight: 600; }
.sidebar-bottom { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.06); }
.user-card { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--burgundy); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.user-info { overflow: hidden; }
.user-name { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: .72rem; color: var(--gray-400); text-transform: capitalize; }

/* ── Main Area ─────────────────────────────── */
.main-area { flex: 1; margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  background: var(--white); height: var(--topbar-h); padding: 0 1.75rem;
  display: flex; align-items: center; border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 50; gap: 1rem;
}
.topbar-title { font-size: 1.1rem; font-weight: 600; color: var(--navy); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.topbar-greeting { font-size: .85rem; color: var(--gray-500); }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: .25rem; }
.hamburger svg { width: 22px; height: 22px; color: var(--gray-600); }

.main-scroll { flex: 1; padding: 1.5rem; overflow-y: auto; }

/* ── Sections ──────────────────────────────── */
.sec { display: none; }
.sec.active { display: block; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.sec-head h3 { font-size: 1.2rem; font-weight: 600; color: var(--navy); }

/* ── Stats ─────────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 1.25rem; display: flex; align-items: center; gap: .9rem; box-shadow: var(--shadow); border-left: 4px solid var(--navy); }
.stat-icon { font-size: 1.6rem; width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.si-blue { background: rgba(37,99,235,.1); }
.si-purple { background: rgba(139,92,246,.1); }
.si-amber { background: rgba(217,119,6,.1); }
.si-green { background: rgba(22,163,74,.1); }
.stat-val { font-size: 1.5rem; font-weight: 700; display: block; line-height: 1; color: var(--navy); }
.stat-lbl { font-size: .78rem; color: var(--gray-500); }

/* ── Cards ─────────────────────────────────── */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 1rem; }
.card-head { padding: .85rem 1.25rem; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }
.card-head h3 { font-size: .95rem; font-weight: 600; color: var(--navy); }
.card-head small { font-size: .82rem; color: var(--gray-500); font-weight: 400; }
.card-body { padding: 1.25rem; }
.empty { text-align: center; padding: 1.5rem; color: var(--gray-400); font-size: .92rem; }

.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; }
.grid-1-1 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* ── Quick Actions ─────────────────────────── */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.qbtn { padding: .85rem; border-radius: 8px; border: 1.5px solid var(--gray-200); background: var(--gray-50); cursor: pointer; font-size: .88rem; font-weight: 500; transition: all .2s; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.qbtn span:first-child { font-size: 1.3rem; }
.qbtn:hover { border-color: var(--burgundy); background: rgba(139,26,43,.03); }

/* ── Tables ────────────────────────────────── */
.dtable { width: 100%; border-collapse: separate; border-spacing: 0; }
.dtable th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); font-weight: 600; padding: .65rem .85rem; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); }
.dtable td { padding: .7rem .85rem; border-bottom: 1px solid var(--gray-100); font-size: .88rem; }
.dtable tr:hover td { background: var(--gray-50); }

/* ── Badges ────────────────────────────────── */
.badge { display: inline-flex; padding: .15rem .55rem; border-radius: 20px; font-size: .72rem; font-weight: 600; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-approved, .badge-accepted { background: #DCFCE7; color: #166534; }
.badge-rejected, .badge-declined { background: #FCE7E7; color: #991B1B; }
.badge-submitted { background: #DBEAFE; color: #1E40AF; }
.badge-draft { background: var(--gray-100); color: var(--gray-600); }
.badge-withdrawn { background: var(--gray-200); color: var(--gray-600); }

/* ── Filter Bar ────────────────────────────── */
.filter-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.filter-bar .form-group { flex: 1; min-width: 160px; margin-bottom: 0; }

/* ── School Cards ──────────────────────────── */
.school-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.school-card { border: 1.5px solid var(--gray-200); border-radius: var(--radius); padding: 1.15rem; transition: border-color .2s, box-shadow .2s; cursor: pointer; }
.school-card:hover { border-color: var(--burgundy); box-shadow: var(--shadow-md); }
.school-card h4 { font-size: .95rem; color: var(--navy); margin-bottom: .4rem; }
.school-card .meta { font-size: .82rem; color: var(--gray-500); margin-bottom: .15rem; }
.school-card .tags { margin-top: .5rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.tag { font-size: .7rem; padding: .15rem .45rem; border-radius: 4px; background: var(--gray-100); color: var(--gray-600); }
.tag-yes { background: #DCFCE7; color: #166534; }

/* ── Profile Grid ──────────────────────────── */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.pfield { margin-bottom: .75rem; }
.pfield .plabel { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); margin-bottom: .15rem; }
.pfield .pvalue { font-size: .95rem; font-weight: 500; }

/* ── Modal ─────────────────────────────────── */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.45); }
.modal-box { position: relative; background: var(--white); border-radius: 14px; width: 90%; max-width: 520px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal-lg { max-width: 640px; }
.modal-head { padding: 1rem 1.5rem; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 1.05rem; font-weight: 600; color: var(--navy); }
.modal-head button { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--gray-500); padding: .25rem; }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-foot { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: .75rem; }

/* ── Chat ──────────────────────────────────── */
.chat-box { min-height: 200px; max-height: 350px; overflow-y: auto; border: 1px solid var(--gray-200); border-radius: 8px; padding: .75rem; margin-bottom: .75rem; background: var(--gray-50); }
.chat-msg { margin-bottom: .6rem; font-size: .88rem; }
.chat-msg.user { text-align: right; }
.chat-msg .bubble { display: inline-block; padding: .5rem .85rem; border-radius: 12px; max-width: 80%; text-align: left; }
.chat-msg.user .bubble { background: var(--burgundy); color: var(--white); border-bottom-right-radius: 4px; }
.chat-msg.bot .bubble { background: var(--white); border: 1px solid var(--gray-200); border-bottom-left-radius: 4px; }
.chat-input { display: flex; gap: .5rem; }
.chat-input input { flex: 1; }

/* ── Toast ─────────────────────────────────── */
#toast-container { position: fixed; top: 1.25rem; right: 1.25rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; }
.toast { padding: .75rem 1.1rem; border-radius: 8px; color: var(--white); font-size: .88rem; font-weight: 500; min-width: 260px; max-width: 380px; display: flex; align-items: center; gap: .5rem; animation: slideIn .3s ease-out; box-shadow: var(--shadow-lg); cursor: pointer; }
.toast-success { background: var(--green); }
.toast-error { background: var(--red); }
.toast-info { background: var(--blue); }
.toast-warning { background: var(--amber); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { opacity: 1; } to { opacity: 0; transform: translateX(100%); } }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .grid-2-1, .grid-1-1 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .auth-layout { flex-direction: column; }
  .auth-sidebar { width: 100%; min-width: 100%; padding: 2rem 1.5rem; }
  .auth-features { display: none; }
  .auth-content { padding: 1.25rem; }
  .auth-card, .auth-card-lg { max-width: 100%; padding: 1.5rem; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .mobile-close { display: block; }
  .main-area { margin-left: 0; }
  .hamburger { display: block; }
  .topbar { padding: 0 1rem; }
  .main-scroll { padding: 1rem; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .topbar-greeting { display: none; }
  .filter-bar { flex-direction: column; }
  .filter-bar .form-group { min-width: 100%; }
  .school-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stat-row { grid-template-columns: 1fr; }
  .stepper { gap: 0; }
  .step-connector { width: 25px; }
}
