/* =====================================================================
   Student Portal -- sidebar dashboard layout.
   Palette matches the rest of the site: #a12c2f (red), #f5a425 (gold),
   #1f272b (heading text), #7a7a7a (body text), #f7f7f7 (page bg).
   ===================================================================== */

body.student-portal {
  background-color: #f4f5f7;
  font-family: 'Poppins', sans-serif;
  margin: 0;
}

/* ---------------- Top bar ---------------- */
.portal-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: #1f272b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
}

.portal-topbar-left { display: flex; align-items: center; gap: 16px; }

.portal-menu-trigger {
  display: none;
  background: none; border: none; color: #fff; font-size: 20px; cursor: pointer;
}

.portal-logo { color: #fff; font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: .5px; }
.portal-logo span { display: block; font-size: 11px; font-weight: 400; color: #b9b9b9; text-transform: uppercase; letter-spacing: 1px; }

.portal-topbar-right { display: flex; align-items: center; gap: 20px; }

.portal-bell { position: relative; color: #fff; font-size: 18px; text-decoration: none; }
.portal-bell-badge {
  position: absolute; top: -8px; right: -10px;
  background: #a12c2f; color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 10px; padding: 1px 5px; line-height: 1.4;
}

.portal-user { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 13px; font-weight: 600; }
.portal-user img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }

.portal-logout { color: #cfcfcf; font-size: 17px; text-decoration: none; }
.portal-logout:hover { color: #a12c2f; }

/* ---------------- Shell / Sidebar ---------------- */
.portal-shell { display: flex; padding-top: 64px; min-height: 100vh; }

.portal-sidebar {
  width: 240px;
  background: #fff;
  border-right: 1px solid #eee;
  position: fixed;
  top: 64px; bottom: 0; left: 0;
  overflow-y: auto;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 900;
}

.portal-sidebar ul { list-style: none; margin: 0; padding: 0; }

.portal-sidebar li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 24px;
  color: #6f6f6f;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
  position: relative;
}

.portal-sidebar li a i { width: 18px; text-align: center; color: #b0b0b0; }

.portal-sidebar li a .nav-badge {
  margin-left: auto;
  background: #a12c2f;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
}

.portal-sidebar li.active a,
.portal-sidebar li a:hover {
  background: #fdf3f0;
  color: #a12c2f;
  border-left-color: #a12c2f;
}

.portal-sidebar li.active a i,
.portal-sidebar li a:hover i { color: #a12c2f; }

.portal-back-site {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 24px 0;
  padding-top: 16px;
  border-top: 1px solid #eee;
  color: #b0b0b0;
  font-size: 13px;
  text-decoration: none;
}

.portal-back-site:hover { color: #a12c2f; }

/* ---------------- Main content ---------------- */
.portal-main {
  margin-left: 240px;
  flex: 1;
  padding: 30px 30px 60px;
  width: calc(100% - 240px);
}

.portal-page-head { margin-bottom: 24px; }
.portal-page-head h1 { font-size: 24px; font-weight: 800; color: #1f272b; margin: 0 0 4px; }
.portal-page-head p { color: #7a7a7a; font-size: 14px; margin: 0; }

/* Reuse .content-card / .mini-stats from inner-pages.css, plus portal-specific bits */
.portal-main .content-card { margin-bottom: 24px; }

.portal-welcome-banner {
  background: linear-gradient(120deg, #a12c2f, #c9483c);
  border-radius: 18px;
  padding: 30px 35px;
  color: #fff;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.portal-welcome-banner h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.portal-welcome-banner p { margin: 0; color: #ffe1de; font-size: 14px; }
.portal-welcome-banner .badge-pill {
  background: rgba(255,255,255,.18); padding: 8px 18px; border-radius: 20px; font-size: 13px; font-weight: 600;
}

.portal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.portal-grid .stat-box { background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.05); }

.portal-two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }

/* Generic data table used across Attendance / Results / Assignments etc. */
.portal-table { width: 100%; border-collapse: collapse; }
.portal-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  color: #a1a1a1; padding: 10px 14px; border-bottom: 2px solid #f0f0f0;
}
.portal-table td { padding: 14px; border-bottom: 1px solid #f2f2f2; font-size: 14px; color: #1f272b; vertical-align: middle; }
.portal-table tr:last-child td { border-bottom: none; }

.pill {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  padding: 4px 12px; border-radius: 20px; letter-spacing: .3px;
}
.pill-green  { background: #d4edda; color: #1c6b34; }
.pill-yellow { background: #fdf0dc; color: #9a6b0f; }
.pill-red    { background: #f8d7da; color: #a12c2f; }
.pill-grey   { background: #eee; color: #6f6f6f; }
.pill-blue   { background: #dbe9ff; color: #2456a1; }

.progress-track { background: #f0f0f0; border-radius: 20px; height: 8px; overflow: hidden; }
.progress-fill { background: #a12c2f; height: 100%; border-radius: 20px; }

.portal-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid #f2f2f2;
}
.portal-list-item:last-child { border-bottom: none; }
.portal-list-item .title { font-weight: 600; color: #1f272b; font-size: 14px; }
.portal-list-item .meta { color: #a1a1a1; font-size: 12.5px; }

.portal-btn {
  display: inline-block; background: #a12c2f; color: #fff; font-size: 13px; font-weight: 600;
  padding: 10px 22px; border-radius: 20px; text-decoration: none; border: none; cursor: pointer;
  text-transform: uppercase; letter-spacing: .3px;
}
.portal-btn:hover { opacity: .9; color: #fff; }
.portal-btn.outline { background: #fff; color: #a12c2f; border: 1px solid #a12c2f; }
.portal-btn.small { padding: 7px 16px; font-size: 12px; }

.portal-form-row { margin-bottom: 18px; }
.portal-form-row label { display: block; font-size: 12px; text-transform: uppercase; font-weight: 600; color: #1f272b; margin-bottom: 8px; letter-spacing: .5px; }
.portal-form-row input[type="text"],
.portal-form-row input[type="email"],
.portal-form-row input[type="password"],
.portal-form-row input[type="date"],
.portal-form-row select,
.portal-form-row textarea {
  width: 100%; border: 1px solid #eee; background: #f7f7f7; border-radius: 10px;
  padding: 12px 16px; font-size: 14px; color: #1f272b; font-family: inherit;
}
.portal-form-row textarea { min-height: 110px; resize: vertical; }

.video-thumb-wrap { position: relative; border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.video-thumb-wrap img { width: 100%; height: 170px; object-fit: cover; display: block; }
.video-thumb-wrap .play-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center; color: #a12c2f; font-size: 18px;
}

@media (max-width: 992px) {
  .portal-grid { grid-template-columns: repeat(2, 1fr); }
  .portal-two-col { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .portal-menu-trigger { display: block; }
  .portal-user span { display: none; }
  .portal-sidebar {
    left: -260px;
    width: 240px;
    transition: left .25s ease;
    box-shadow: 10px 0 30px rgba(0,0,0,.1);
  }
  .portal-sidebar.open { left: 0; }
  .portal-main { margin-left: 0; width: 100%; padding: 20px 16px 50px; }
  .portal-grid { grid-template-columns: 1fr 1fr; }
  .portal-welcome-banner { flex-direction: column; align-items: flex-start; }
}
