/* ============================================================
   LANGATA TVET COLLEGE — Main Stylesheet
   Brand Colors: Purple · Blue · White · Gold
   ============================================================ */
:root {
  --purple:        #5b21b6;
  --purple-dark:   #3b0764;
  --purple-mid:    #7c3aed;
  --purple-light:  #a78bfa;
  --blue:          #1d4ed8;
  --blue-dark:     #1e3a8a;
  --blue-light:    #3b82f6;
  --gold:          #f59e0b;
  --gold-dark:     #d97706;
  --gold-light:    #fcd34d;
  --white:         #ffffff;
  --off-white:     #faf9ff;
  --bg-light:      #f5f3ff;
  --text-dark:     #1e1b4b;
  --text-muted:    #6b7280;
  --border:        #e0d9f7;
  --success:       #059669;
  --danger:        #dc2626;
  --warning:       #d97706;

  /* Semantic aliases */
  --primary:       var(--purple);
  --primary-dark:  var(--purple-dark);
  --primary-light: var(--purple-mid);
  --secondary:     var(--gold);

  --shadow:    0 4px 24px rgba(91,33,182,.12);
  --shadow-sm: 0 2px 8px rgba(91,33,182,.08);
  --radius:    12px;
  --radius-sm: 8px;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg-light:   #1a1433;
  --white:      #231b4a;
  --text-dark:  #e8e3ff;
  --border:     #3b2d6b;
  --off-white:  #1e1842;
  --shadow:     0 4px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); color: var(--text-dark); background: var(--bg-light); line-height: 1.6; }

/* ── NAVBAR ── */
.navbar-ltvtc {
  background: linear-gradient(90deg, var(--purple-dark) 0%, var(--purple) 60%, var(--blue-dark) 100%) !important;
  box-shadow: 0 2px 16px rgba(59,7,100,.3);
  padding: .65rem 0;
}
.navbar-ltvtc .navbar-brand { color: var(--white) !important; font-weight: 800; font-size: 1.1rem; letter-spacing:.02em; }
.navbar-ltvtc .navbar-brand span { color: var(--gold); }
.navbar-ltvtc .nav-link { color: rgba(255,255,255,.88) !important; font-weight: 500; transition: color .2s; padding: .45rem .85rem !important; font-size: .9rem; }
.navbar-ltvtc .nav-link:hover, .navbar-ltvtc .nav-link.active { color: var(--gold-light) !important; }
.navbar-ltvtc .navbar-toggler { border-color: rgba(255,255,255,.4); }
.navbar-ltvtc .navbar-toggler-icon { filter: invert(1); }

/* ── HERO ── */
.hero-section {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 45%, var(--blue-dark) 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  position: relative; overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Ccircle cx='40' cy='40' r='3' fill='%23ffffff' fill-opacity='0.04'/%3E%3C/g%3E%3C/svg%3E") repeat;
}
.hero-section .hero-content { position: relative; z-index: 1; }
.hero-section h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; line-height: 1.2; }
.hero-section p { font-size: 1.1rem; opacity: .9; }
.hero-badge {
  display: inline-block; background: var(--gold); color: var(--purple-dark);
  font-size: .75rem; font-weight: 800; padding: .3rem .9rem; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: .85rem;
}
.hero-gold-bar { width: 60px; height: 4px; background: var(--gold); border-radius: 2px; margin: .75rem 0 1rem; }

/* ── BUTTONS ── */
.btn-hero-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--purple-dark);
  font-weight: 700; border: none;
  padding: .75rem 2rem; border-radius: 50px; font-size: .95rem;
  transition: all .25s;
  box-shadow: 0 4px 16px rgba(245,158,11,.4);
  text-decoration: none; display: inline-block;
}
.btn-hero-primary:hover { background: linear-gradient(135deg,var(--gold-dark),#b45309); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(245,158,11,.5); color: var(--purple-dark); }

.btn-hero-outline {
  background: transparent; color: var(--white);
  font-weight: 600; border: 2px solid rgba(255,255,255,.55);
  padding: .7rem 1.8rem; border-radius: 50px; font-size: .95rem;
  transition: all .25s; text-decoration: none; display: inline-block;
}
.btn-hero-outline:hover { background: rgba(255,255,255,.12); border-color: var(--white); color: var(--white); }

.btn-purple {
  background: var(--purple); color: var(--white); font-weight: 600;
  border: none; border-radius: 50px; padding: .55rem 1.5rem;
  transition: all .2s; font-size: .875rem;
}
.btn-purple:hover { background: var(--purple-dark); color: var(--white); transform: translateY(-1px); }

/* ── SECTION ── */
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-size: 1.85rem; font-weight: 800; color: var(--purple); }
.section-divider { width: 50px; height: 4px; background: var(--gold); border-radius: 2px; margin: .75rem auto 1rem; }
.section-sub { color: var(--text-muted); font-size: .95rem; }

/* ── STATS ── */
.stats-section { background: var(--white); box-shadow: var(--shadow-sm); padding: 2rem 0; }
.stat-card { text-align: center; padding: 1rem; }
.stat-number { font-size: 2.4rem; font-weight: 800; color: var(--purple); line-height: 1; }
.stat-label { color: var(--text-muted); font-size: .875rem; font-weight: 500; margin-top: .25rem; }

/* ── CARDS ── */
.card-ltvtc {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s; overflow: hidden;
}
.card-ltvtc:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-ltvtc .card-header-ltvtc {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: var(--white); padding: 1rem 1.5rem; font-weight: 600;
}
.card-ltvtc .card-body { padding: 1.5rem; }

/* ── COURSE CARD ── */
.course-card { border-left: 4px solid var(--gold); }
.course-icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: var(--white); display: flex; align-items: center;
  justify-content: center; font-size: 1.3rem; flex-shrink: 0;
}
.course-badge { background: rgba(91,33,182,.1); color: var(--purple); font-size: .75rem; font-weight: 600; padding: .25rem .6rem; border-radius: 20px; }
.level-badge {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--purple-dark); font-size: .72rem; font-weight: 800;
  padding: .2rem .55rem; border-radius: 12px;
}

/* ── FORMS ── */
.form-ltvtc .form-control, .form-ltvtc .form-select {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: .65rem 1rem; font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
  background: var(--white); color: var(--text-dark);
}
.form-ltvtc .form-control:focus, .form-ltvtc .form-select:focus {
  border-color: var(--purple-mid); box-shadow: 0 0 0 3px rgba(124,58,237,.15); outline: none;
}
.form-ltvtc .form-label { font-weight: 600; font-size: .875rem; color: var(--text-dark); margin-bottom: .35rem; }
.form-section-title {
  font-size: 1rem; font-weight: 700; color: var(--purple);
  border-bottom: 2px solid var(--border); padding-bottom: .5rem; margin-bottom: 1.25rem;
}
.required-star { color: var(--danger); }

/* Course+Level selection grid */
.course-select-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .5rem;
}
.course-select-grid select { width: 100%; }
.programme-group { margin-bottom: .5rem; }
.programme-group optgroup { font-weight: 700; color: var(--purple); }

/* ── STEPS ── */
.steps-container { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: nowrap; margin-bottom: 2.5rem; }
.step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.step-circle { width: 36px; height: 36px; border-radius: 50%; background: var(--border); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; z-index: 1; transition: all .3s; }
.step.active .step-circle { background: var(--purple); color: var(--white); }
.step.done .step-circle { background: var(--success); color: var(--white); }
.step-label { font-size: .75rem; margin-top: .4rem; color: var(--text-muted); text-align: center; }
.step.active .step-label { color: var(--purple); font-weight: 600; }
.step:not(:last-child)::after { content: ''; position: absolute; top: 18px; left: 50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.step.done:not(:last-child)::after { background: var(--success); }

/* ── ADMISSION LETTER ── */
.letter-container {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); max-width: 800px; margin: 0 auto; box-shadow: var(--shadow);
}
.letter-header {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple), var(--blue-dark));
  color: var(--white); padding: 2rem; text-align: center;
  border-radius: var(--radius) var(--radius) 0 0;
}
.letter-header h4 { font-size: 1.3rem; font-weight: 800; }
.letter-gold-bar { width: 50px; height: 3px; background: var(--gold); border-radius: 2px; margin: .5rem auto; }
.letter-body { padding: 2rem 2.5rem; font-size: .9rem; line-height: 1.8; }
.letter-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; background: var(--bg-light); padding: 1.25rem; border-radius: var(--radius-sm); margin: 1.25rem 0; }
.letter-info-item label { font-size: .72rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.letter-info-item span { display: block; font-weight: 700; color: var(--purple); }

/* ── ADMIN STATS ── */
.admin-stat {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 1.5rem; border-left: 4px solid var(--purple); transition: all .2s;
}
.admin-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.admin-stat .stat-icon { width: 50px; height: 50px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.admin-stat h3 { font-size: 2rem; font-weight: 800; color: var(--purple); }
.admin-stat p { color: var(--text-muted); font-size: .875rem; margin: 0; }

/* ── SIDEBAR ── */
.admin-sidebar {
  background: linear-gradient(180deg, var(--purple-dark) 0%, #1e1b4b 100%);
  min-height: 100vh; width: 260px;
  position: fixed; top: 0; left: 0;
  overflow-y: auto; z-index: 1000; transition: transform .3s;
}
.sidebar-brand { padding: 1.5rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar-brand h4 { color: var(--white); font-weight: 800; font-size: .95rem; margin: 0; }
.sidebar-brand small { color: var(--gold-light); font-size: .72rem; }
.sidebar-brand .brand-logo {
  width: 42px; height: 42px; background: var(--gold);
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center; color: var(--purple-dark);
  font-weight: 900; font-size: 1.1rem; margin-bottom: .75rem;
}
.sidebar-nav { padding: 1rem 0; }
.sidebar-section { padding: .75rem 1.5rem .25rem; font-size: .65rem; text-transform: uppercase; color: rgba(255,255,255,.35); font-weight: 700; letter-spacing: .1em; }
.sidebar-link { display: flex; align-items: center; gap: .75rem; padding: .65rem 1.5rem; color: rgba(255,255,255,.75); font-size: .875rem; text-decoration: none; transition: all .2s; border-left: 3px solid transparent; }
.sidebar-link:hover { background: rgba(255,255,255,.07); color: var(--white); }
.sidebar-link.active { background: rgba(124,58,237,.25); color: var(--white); border-left-color: var(--gold); }
.sidebar-link .icon { width: 18px; text-align: center; flex-shrink: 0; }
.admin-main { margin-left: 260px; min-height: 100vh; background: var(--bg-light); }
.admin-topbar { background: var(--white); box-shadow: var(--shadow-sm); padding: .75rem 1.5rem; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.admin-content { padding: 1.5rem; }

/* ── TABLES ── */
.table-ltvtc { font-size: .875rem; }
.table-ltvtc thead th { background: linear-gradient(90deg,var(--purple),var(--blue)); color: var(--white); font-weight: 600; border: none; padding: .85rem 1rem; }
.table-ltvtc tbody td { padding: .85rem 1rem; vertical-align: middle; border-color: var(--border); }
.table-ltvtc tbody tr:hover { background: rgba(91,33,182,.04); }

/* ── BADGES & STATUS ── */
.badge-status { padding: .35rem .8rem; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge-pending   { background: #fef3c7; color: #92400e; }
.badge-approved  { background: #d1fae5; color: #065f46; }
.badge-rejected  { background: #fee2e2; color: #991b1b; }
.badge-active    { background: #d1fae5; color: #065f46; }
.badge-archived  { background: #f3f4f6; color: #6b7280; }

/* ── ALERTS ── */
.alert-ltvtc { border-radius: var(--radius-sm); padding: 1rem 1.25rem; border: none; font-size: .875rem; }

/* ── FOOTER ── */
.footer-main { background: linear-gradient(135deg,var(--purple-dark),#1e1b4b); color: rgba(255,255,255,.8); padding: 3rem 0 1.5rem; }
.footer-main h5 { color: var(--white); font-weight: 700; margin-bottom: 1rem; }
.footer-main a { color: rgba(255,255,255,.6); text-decoration: none; font-size: .875rem; display: block; margin-bottom: .4rem; }
.footer-main a:hover { color: var(--gold); }
.footer-bottom { background: var(--purple-dark); color: rgba(255,255,255,.5); text-align: center; padding: 1rem 0; font-size: .8rem; }

/* ── ANNOUNCEMENT ── */
.announcement-card { border-left: 3px solid var(--gold); padding: 1rem 1.25rem; background: var(--white); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: .75rem; box-shadow: var(--shadow-sm); }
.announcement-card .ann-date { font-size: .75rem; color: var(--text-muted); margin-bottom: .25rem; }
.announcement-card h6 { font-weight: 700; color: var(--purple); margin: 0 0 .25rem; }

/* ── SEARCH ── */
.search-hero { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); border-radius: 50px; padding: .6rem 1.5rem; color: var(--white); width: 100%; font-size: .95rem; }
.search-hero::placeholder { color: rgba(255,255,255,.55); }
.search-hero:focus { outline: none; background: rgba(255,255,255,.2); }

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.show { transform: translateX(0); }
  .admin-main { margin-left: 0; }
}
@media (max-width: 576px) {
  .hero-section { padding: 3rem 0 2.5rem; }
  .hero-section h1 { font-size: 1.75rem; }
  .letter-info-grid { grid-template-columns: 1fr; }
  .letter-body { padding: 1.25rem; }
  .step-label { display: none; }
  .course-select-grid { grid-template-columns: 1fr; }
}

/* ── PRINT ── */
@media print {
  .no-print { display: none !important; }
  .admin-sidebar, .admin-topbar { display: none !important; }
  .admin-main { margin-left: 0 !important; }
  body { background: white; }
  .letter-container { box-shadow: none; border: 1px solid #ddd; }
}

/* ── UTILITIES ── */
.text-purple { color: var(--purple) !important; }
.text-gold   { color: var(--gold) !important; }
.bg-purple   { background: var(--purple) !important; }
.bg-gold     { background: var(--gold) !important; }
.rounded-ltvtc { border-radius: var(--radius) !important; }
.cursor-pointer { cursor: pointer; }

/* ── ADDITIONAL MODERN ENHANCEMENTS ── */

/* Navbar transition */
#mainNavbar { transition: background .3s, box-shadow .3s; }

/* Mobile nav overlay */
@media (max-width: 991px) {
  .navbar-collapse { background: var(--purple-dark); border-radius: 0 0 12px 12px; padding: 1rem; margin-top: .5rem; }
  .navbar-ltvtc .nav-link { padding: .65rem 1rem !important; border-radius: 8px; }
  .navbar-ltvtc .nav-link:hover { background: rgba(255,255,255,.08); }
}

/* Floating action button on mobile */
.fab-apply {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--gold); color: var(--purple-dark);
  display: none; align-items: center; justify-content: center;
  font-size: 1.3rem; box-shadow: 0 4px 20px rgba(245,158,11,.5);
  text-decoration: none; transition: transform .2s;
}
.fab-apply:hover { transform: scale(1.1); color: var(--purple-dark); }
@media (max-width: 576px) { .fab-apply { display: flex; } }

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Cards hover animation */
.card-ltvtc { transition: transform .2s, box-shadow .2s; }

/* Back to top button */
#backToTop {
  position: fixed; bottom: 5rem; right: 1.5rem; z-index: 998;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--purple); color: white; border: none;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(91,33,182,.3); cursor: pointer;
  font-size: .85rem; transition: all .2s;
}
#backToTop:hover { background: var(--purple-dark); transform: translateY(-2px); }
#backToTop.visible { display: flex; }

/* Toast notifications */
.toast-container { position: fixed; top: 80px; right: 1rem; z-index: 9999; }

/* Admin notification dot */
.nav-badge { width:8px;height:8px;background:var(--gold);border-radius:50%;display:inline-block;margin-left:4px;vertical-align:middle; }

/* Loading spinner */
.spinner-ltvtc { width:40px;height:40px;border:4px solid var(--border);border-top-color:var(--purple);border-radius:50%;animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* Application status indicator on homepage */
.app-status-bar {
  background: linear-gradient(90deg, rgba(245,158,11,.15), rgba(91,33,182,.1));
  border: 1px solid var(--gold);
  border-radius: 50px;
  padding: .4rem 1.25rem;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.app-status-dot { width:8px;height:8px;border-radius:50%;background:var(--success);animation:pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* Document tabs */
.doc-tab { cursor:pointer;border:1.5px solid var(--border);border-radius:50px;padding:.35rem .9rem;font-size:.82rem;text-decoration:none;color:var(--text-dark);transition:all .2s; }
.doc-tab:hover,.doc-tab.active { background:var(--purple);color:white;border-color:var(--purple); }
