/* ============================================================
   EduPortal – Main Stylesheet
   Font: Poppins | Colors: Dark Blue (#11143A) & Accent Orange (#CF5939)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-dark: #11143A;
  --accent-orange: #CF5939;
  --black:     #11143A;
  --white:     #ffffff;
  --gray-900:  #0f1235;
  --gray-800:  #181b42;
  --gray-700:  #1e2250;
  --gray-600:  #2a2e62;
  --gray-500:  #3d427d;
  --gray-400:  #6a6fa8;
  --gray-300:  #a0a4cf;
  --gray-200:  #d0d2e8;
  --gray-100:  #ecedf5;
  --sidebar-width:  260px;
  --header-height:  64px;
  --footer-height:  52px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--primary-dark);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}
form#empForm {
    overflow: scroll;
}
/* ── LOGIN PAGE ─────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-dark);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(207,89,57,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 960px;
  padding: 24px;
}

.login-brand { text-align: center; margin-bottom: 48px; }

.login-brand .brand-logo {
  width: 56px; height: 56px;
  background: var(--accent-orange);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.login-brand .brand-logo i { font-size: 28px; color: var(--white); }

.login-brand h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--white);
}

.login-brand p {
  color: var(--gray-300);
  font-size: 0.9rem;
  margin-top: 4px;
}

.portal-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 640px) {
  .portal-cards { grid-template-columns: 1fr; }
}

.portal-card {
  background: var(--gray-800);
  border: 1px solid var(--gray-600);
  border-radius: 20px;
  padding: 36px 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.portal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-orange);
  transform: scaleX(0);
  transition: var(--transition);
}

.portal-card:hover { border-color: var(--accent-orange); transform: translateY(-4px); }
.portal-card:hover::before { transform: scaleX(1); }

.portal-icon {
  width: 52px; height: 52px;
  background: var(--gray-700);
  border: 1px solid var(--gray-500);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}

.portal-icon i { font-size: 22px; color: var(--accent-orange); }
.portal-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; }

.portal-card p {
  color: var(--gray-300);
  font-size: 0.82rem;
  margin-bottom: 28px;
  line-height: 1.6;
}

.login-form .form-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-300);
  margin-bottom: 6px;
}

.login-form .form-control {
  background: var(--gray-700);
  border: 1px solid var(--gray-500);
  color: var(--white);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  transition: var(--transition);
}

.login-form .form-control:focus {
  background: var(--gray-700);
  border-color: var(--accent-orange);
  color: var(--white);
  box-shadow: 0 0 0 3px rgba(207,89,57,0.2);
}

.login-form .form-control::placeholder { color: var(--gray-400); }

.btn-login {
  width: 100%;
  background: var(--accent-orange);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 11px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.3px;
  transition: var(--transition);
  cursor: pointer;
}

.btn-login:hover { background: #b84a2e; transform: translateY(-1px); }

.login-footer-text {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.75rem;
  margin-top: 32px;
}

/* ── HEADER ─────────────────────────────────────── */
.top-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--primary-dark);
  border-bottom: 1px solid var(--gray-600);
  z-index: 1040;
  display: flex; align-items: center;
  padding: 0 20px;
  gap: 16px;
}

.header-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--white);
  flex-shrink: 0;
}

.header-brand-icon {
  width: 36px; height: 36px;
  background: var(--accent-orange);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}

.header-brand-icon i { font-size: 18px; color: var(--white); }

.header-brand span { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.3px; }

.header-portal-badge {
  background: var(--gray-700);
  border: 1px solid var(--gray-500);
  color: var(--gray-200);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.header-btn {
  width: 36px; height: 36px;
  background: var(--gray-700);
  border: 1px solid var(--gray-600);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-300);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-size: 15px;
}

.header-btn:hover { background: var(--gray-600); color: var(--accent-orange); border-color: var(--accent-orange); }

.user-avatar {
  width: 36px; height: 36px;
  background: var(--accent-orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--white);
  cursor: pointer;
}

.back-btn {
  background: var(--gray-700);
  border: 1px solid var(--gray-600);
  color: var(--gray-200);
  border-radius: 8px;
  padding: 5px 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; gap: 6px;
  text-decoration: none;
}

.back-btn:hover { background: var(--gray-600); border-color: var(--accent-orange); color: var(--white); }

.search-wrap { position: relative; }

.search-wrap i {
  position: absolute;
  left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 13px;
}

.search-input {
  background: var(--gray-700);
  border: 1px solid var(--gray-600);
  color: var(--white);
  border-radius: 9px;
  padding: 8px 14px 8px 36px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.83rem;
  width: 200px;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-orange);
  width: 240px;
  box-shadow: 0 0 0 3px rgba(207,89,57,0.15);
}

.search-input::placeholder { color: var(--gray-400); }

/* ── SIDEBAR ─────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: var(--header-height); left: 0; bottom: var(--footer-height);
  width: var(--sidebar-width);
  background: var(--primary-dark);
  border-right: 1px solid var(--gray-600);
  overflow-y: auto;
  z-index: 1030;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  scrollbar-width: thin;
  scrollbar-color: var(--accent-orange) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--accent-orange); border-radius: 4px; }

.sidebar-inner { padding: 12px 0 24px; }

.sidebar-section-label {
  padding: 14px 20px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gray-400);
}

.nav-link-main {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  color: var(--gray-300);
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.nav-link-main:hover { color: var(--white); background: var(--gray-800); }

.nav-link-main.active { color: var(--white); background: var(--gray-800); }

.nav-link-main.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--accent-orange);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  width: 32px; height: 32px;
  background: var(--gray-700);
  border: 1px solid var(--gray-600);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: var(--transition);
}

.nav-link-main:hover .nav-icon,
.nav-link-main.active .nav-icon {
  background: var(--gray-600);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.nav-arrow { margin-left: auto; font-size: 11px; transition: transform 0.25s ease; }
.nav-link-main[aria-expanded="true"] .nav-arrow { transform: rotate(90deg); }

.submenu { background: transparent; }

.sub-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 20px 8px 52px;
  color: var(--gray-400);
  text-decoration: none;
  font-size: 0.81rem;
  font-weight: 400;
  transition: var(--transition);
  cursor: pointer;
}

.sub-link::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gray-500);
  flex-shrink: 0;
  transition: var(--transition);
}

.sub-link:hover { color: var(--white); }
.sub-link:hover::before { background: var(--accent-orange); }
.sub-link.active { color: var(--white); font-weight: 500; }
.sub-link.active::before { background: var(--accent-orange); }

/* ── FOOTER ─────────────────────────────────────── */
.site-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--footer-height);
  background: var(--primary-dark);
  border-top: 1px solid var(--gray-600);
  z-index: 1040;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}

.footer-left {
  font-size: 0.75rem;
  color: var(--gray-400);
}

.footer-left span { color: var(--accent-orange); font-weight: 600; }

.footer-right {
  font-size: 0.72rem;
  color: var(--gray-500);
}

/* ── MAIN CONTENT ───────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  padding: 28px;
  padding-bottom: calc(var(--footer-height) + 20px);
  min-height: calc(100vh - var(--header-height));
  transition: margin-left 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ── SIDEBAR OVERLAY (mobile) ───────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1025;
}

/* ── PAGE CONTENT ───────────────────────────────── */
.page-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.page-subtitle { color: var(--gray-300); font-size: 0.83rem; margin-bottom: 28px; }
.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-300);
  margin-bottom: 14px;
}

/* ── STAT CARDS ─────────────────────────────────── */
.stat-card {
  background: var(--gray-800);
  border: 1px solid var(--gray-600);
  border-radius: 16px;
  padding: 22px;
  transition: var(--transition);
}

.stat-card:hover { border-color: var(--accent-orange); }

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-300);
  margin-bottom: 10px;
}

.stat-value { font-size: 1.9rem; font-weight: 800; color: var(--white); line-height: 1; margin-bottom: 6px; }
.stat-change { font-size: 0.76rem; font-weight: 500; color: var(--gray-300); }

.stat-icon {
  width: 40px; height: 40px;
  background: var(--gray-700);
  border: 1px solid var(--gray-600);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--accent-orange);
  float: right; margin-top: -4px;
}

/* ── QUICK CARDS ─────────────────────────────────── */
.quick-card {
  background: var(--gray-800);
  border: 1px solid var(--gray-600);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--white);
  display: block;
}

.quick-card:hover {
  background: var(--gray-700);
  border-color: var(--accent-orange);
  color: var(--white);
  transform: translateY(-2px);
}

.quick-card i { font-size: 22px; display: block; margin-bottom: 8px; color: var(--accent-orange); }
.quick-card:hover i { color: var(--white); }
.quick-card span { font-size: 0.78rem; font-weight: 600; }

/* ── DATA TABLE ─────────────────────────────────── */
.data-table-wrap {
  background: var(--gray-800);
  border: 1px solid var(--gray-600);
  border-radius: 16px;
  overflow: hidden;
}

.data-table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-600);
  display: flex; align-items: center; justify-content: space-between;
}

.data-table-header h6 { font-size: 0.88rem; font-weight: 700; margin: 0; }

.table-dark-custom {
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--gray-600);
  color: var(--white);
  margin: 0;
}

.table-dark-custom thead th {
  background: var(--gray-700);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-300);
  border: none;
  padding: 12px 20px;
}

.table-dark-custom tbody td {
  padding: 12px 20px;
  font-size: 0.83rem;
  color: var(--gray-200);
  border-color: var(--gray-700);
  vertical-align: middle;
}

.table-dark-custom tbody tr:hover td { background: var(--gray-700); }

/* ── BADGES ─────────────────────────────────────── */
.badge-status {
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pass   { background: rgba(207,89,57,0.15); color: #ffaa8a; border: 1px solid rgba(207,89,57,0.35); }
.badge-pending{ background: rgba(255,255,255,0.06); color: var(--gray-300); border: 1px solid rgba(255,255,255,0.1); }
.badge-fail   { background: rgba(207,89,57,0.12); color: #ff8a6f; border: 1px solid rgba(207,89,57,0.3); }

/* ── NOTICE CARDS ───────────────────────────────── */
.notice-card {
  background: var(--gray-800);
  border: 1px solid var(--gray-600);
  border-left: 3px solid var(--accent-orange);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
}

.notice-card h6 { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.notice-card p  { font-size: 0.78rem; color: var(--gray-300); margin: 0; }
.notice-card .notice-date { font-size: 0.7rem; color: var(--gray-400); margin-top: 6px; }

/* ── PROGRESS BARS ──────────────────────────────── */
.prog-label {
  display: flex; justify-content: space-between;
  font-size: 0.8rem; margin-bottom: 5px;
}

.prog-label span:first-child { color: var(--gray-200); font-weight: 500; }
.prog-label span:last-child  { color: var(--gray-300); }

.progress-dark {
  background: var(--gray-700);
  border-radius: 50px;
  height: 7px;
  margin-bottom: 14px;
  overflow: hidden;
}

.progress-dark .progress-bar { background: var(--accent-orange); border-radius: 50px; }

/* ── BUTTONS ─────────────────────────────────────── */
.btn-white {
  background: var(--white);
  color: var(--primary-dark);
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-white:hover { background: var(--gray-200); }

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--gray-500);
  border-radius: 8px;
  padding: 7px 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline-white:hover { border-color: var(--accent-orange); background: var(--accent-orange); color: var(--white); }

/* ── GENERIC MODULE PAGE ─────────────────────────── */
.module-empty {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.module-empty i   { font-size: 48px; color: var(--accent-orange); margin-bottom: 16px; display: block; }
.module-empty h5  { color: var(--gray-300); font-weight: 600; margin-bottom: 6px; }
.module-empty p   { color: var(--gray-400); font-size: 0.83rem; max-width: 360px; }

/* ── ANIMATIONS ──────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeInUp 0.4s ease forwards; }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 30px rgba(0,0,0,0.6); }
  .main-content { margin-left: 0 !important; }
  .sidebar-overlay.show { display: block; }
  .search-input { width: 160px; }
}