:root {
  --brand: #103c78;
  --brand-dark: #0a2850;
  --accent: #d4a017;
}

body {
  background: #f4f6fa;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

.app-navbar {
  background: #12182b;
}

.app-sidebar {
  width: 270px;
  min-width: 270px;
  flex-shrink: 0;
  background: #1b2233;
  border-right: 1px solid #0f1420;
  box-shadow: 2px 0 10px rgba(0,0,0,0.15);
}
@media (min-width: 768px) {
  .app-sidebar {
    position: sticky;
    top: 56px;
    align-self: flex-start;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }
}

.sidebar-inner { padding: 16px 12px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 3px;
  border-radius: 9px;
  color: #b7c0d8;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  transition: background .15s, transform .1s;
}
.sidebar-link:hover { background: #262f47; color: #e9edf7; transform: translateX(2px); }
.sidebar-link.active { background: #27ae60; color: #fff; box-shadow: 0 2px 8px rgba(39,174,96,.35); }
.sidebar-link i { font-size: 17px; width: 20px; text-align: center; }

.sidebar-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 11px 14px;
  margin-top: 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #7d89a8;
  text-transform: uppercase;
  cursor: pointer;
}
.sidebar-group-toggle:hover { background: #242c40; color: #e9edf7; }
.sidebar-group-toggle i.bi:first-child { font-size: 15px; margin-right: 6px; }
.sidebar-chevron { font-size: 12px; transition: transform .2s; }
.sidebar-chevron.rotated { transform: rotate(180deg); }
.sidebar-group-body { padding-left: 4px; border-left: 2px solid #2a3350; margin-left: 14px; }
.sidebar-group-body .sidebar-link { font-size: 14px; padding: 8px 12px; }

.app-body-row { align-items: flex-start; min-height: calc(100vh - 56px); }
.app-main { min-height: calc(100vh - 56px); overflow: visible; min-width: 0; flex: 1 1 0%; }
.content-wrapper { max-width: 1320px; width: 100%; margin: 0 auto; }

.stat-card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(20,30,60,.06);
  transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(20,30,60,.12); }
.stat-card .stat-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff;
}

.welcome-banner {
  background: linear-gradient(120deg, var(--brand-dark) 0%, var(--brand) 55%, #1a5cb8 100%);
  color: #fff;
  border-radius: 16px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(16,60,120,.18);
}
.welcome-banner::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}
.welcome-banner::before {
  content: "";
  position: absolute;
  right: 60px; bottom: -60px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.welcome-banner h4, .welcome-banner p { position: relative; z-index: 1; }

/* Dashboard-only dark blue theme */
.app-main.dashboard-page {
  background: linear-gradient(180deg, #0a1f44 0%, #0e2a5e 100%);
  border-radius: 16px;
  margin: 10px;
}
.dashboard-page .welcome-banner {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: none;
}
.dashboard-page .welcome-banner h4 {
  font-size: 2rem;
  font-weight: 800;
}
.dashboard-page .welcome-banner p {
  font-size: 1.1rem;
}
.dashboard-page .stat-card {
  background: #ffffff;
}
.dashboard-page .stat-card .fs-4 {
  font-size: 2rem !important;
  font-weight: 800;
}
.dashboard-page .stat-card .text-muted.small {
  font-size: 0.95rem !important;
  font-weight: 600;
  color: #45537a !important;
}
.dashboard-page .card:not(.stat-card) {
  background: #ffffff;
}
.dashboard-page h6.fw-bold {
  font-size: 1.2rem;
}

.card { border-radius: 12px; border: none; box-shadow: 0 2px 10px rgba(20,30,60,.06); }
.table thead { background: #f0f3f9; }

.faculty-tabs .nav-link {
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: #33415c;
  background: #eef2fb;
  border: 1px solid transparent;
}
.faculty-tabs .nav-link:hover { background: #e2e9f8; }
.faculty-tabs .nav-link.active { background: var(--brand); color: #fff; }
.faculty-tabs .nav-link.active .badge { background: rgba(255,255,255,.25) !important; color: #fff !important; }
.faculty-tabs .badge { font-weight: 600; }

.lecturer-card {
  border-left: 4px solid var(--brand);
  transition: box-shadow .15s ease, transform .15s ease;
}
.lecturer-card:hover { box-shadow: 0 4px 16px rgba(20,30,60,.10); }
.lecturer-card .card-header {
  border-bottom: 1px solid #eef1f7;
  border-radius: 0;
  padding: 12px 16px;
}
.lecturer-card .bi-person-badge { color: var(--brand); font-size: 1.1rem; margin-right: 4px; }
.lecturer-card table td, .lecturer-card table th { padding: 8px 12px; }
.lecturer-card table tr:hover { background: #f8f9fd; }

.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); color: #fff; }
.btn-outline-brand { background: #fff; border: 1px solid var(--brand); color: var(--brand); }
.btn-outline-brand:hover { background: var(--brand); color: #fff; }

/* ============================================================
   LOGIN PAGE — split panel design (illustration left, form right)
   ============================================================ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #eef3fb 0%, #dfe9f8 55%, #d8e5f6 100%);
  padding: 32px 20px;
  box-sizing: border-box;
}
.login-card {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 900px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(16,40,80,.20), 0 4px 14px rgba(16,40,80,.08) !important;
  background: #fff;
}

/* Illustration side (LEFT) */
.login-illustration-side {
  flex: 1 1 320px;
  min-width: 0;
  background: linear-gradient(150deg, var(--brand-dark) 0%, var(--brand) 65%, #2f6fd6 140%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 44px 32px;
  color: #fff;
  min-height: 420px;
}
.login-illustration-side::before {
  content: "";
  position: absolute;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  top: -120px; right: -110px;
}
.login-illustration-side::after {
  content: "";
  position: absolute;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  bottom: -90px; left: -70px;
}

/* Logo — its own standalone element at the top of the illustration side */
.login-brand-logo {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 0 16px;
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  position: relative;
  z-index: 2;
}
.login-brand-logo img { width: 62px; height: 62px; object-fit: contain; }
.login-brand-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: 22px;
  position: relative;
  z-index: 2;
  margin-bottom: 4px;
}
.login-brand-sub { font-size: 13px; opacity: .8; position: relative; z-index: 2; margin-bottom: 26px; }

/* Simple contained icon row instead of floating/overflowing badges */
.login-icon-row {
  display: flex;
  gap: 14px;
  position: relative;
  z-index: 2;
  margin-bottom: 22px;
}
.login-icon-row .login-badge {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  color: #fff;
}
.login-tagline { max-width: 280px; position: relative; z-index: 2; }
.login-tagline h5 { font-weight: 700; font-size: 17px; }
.login-tagline p { opacity: .82; font-size: 13.5px; margin-bottom: 0; }

/* Form side (RIGHT) */
.login-form-side {
  flex: 1 1 320px;
  min-width: 0;
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}
.login-form-side h3 { font-weight: 700; }

.form-control.login-input {
  border-radius: 10px;
  padding: 11px 14px;
  border-color: #dde4ef;
}
.form-control.login-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(16,60,120,.12);
}
.login-submit-btn {
  border-radius: 10px;
  padding: 12px;
  font-weight: 600;
  letter-spacing: .2px;
}
.login-demo-box {
  background: #f7f9fc;
  border-radius: 12px;
  padding: 14px 16px;
}

/* ---- Responsive: stack cleanly, no overlap, no overflow ---- */
@media (max-width: 860px) {
  .login-card { flex-direction: column; max-width: 420px; }
  .login-illustration-side {
    flex: 0.7 1 auto;
    min-height: 0;
    justify-content: flex-start;
    padding: 32px 24px 24px;
  }
  .login-form-side {
    flex: 1 1 auto;
    justify-content: flex-start;
    padding: 36px 26px 32px;
  }
  .login-tagline { display: none; }
  .login-icon-row { margin-bottom: 4px; }
}
@media (max-width: 767.98px) {
  .login-wrapper {
    min-height: 100dvh;
    align-items: stretch;
    padding: 0;
  }
  .login-card { border-radius: 0; max-width: 100%; min-height: 100dvh; }

  .login-illustration-side { padding: 22px 20px 16px; }
  .login-brand-logo { width: 52px; height: 52px; margin-bottom: 8px; }
  .login-brand-logo img { width: 38px; height: 38px; }
  .login-brand-name { font-size: 16px; margin-bottom: 1px; }
  .login-brand-sub { font-size: 11.5px; margin-bottom: 12px; }
  .login-icon-row { gap: 8px; margin-bottom: 0; }
  .login-icon-row .login-badge { width: 32px; height: 32px; font-size: 14px; }

  .login-form-side { padding: 22px 22px 24px; }
  .login-form-side h3 { font-size: 1.35rem; margin-bottom: 2px; }
  .login-form-side > p.small { margin-bottom: 16px !important; }
  .login-form-side .mb-3 { margin-bottom: .65rem !important; }
  .login-form-side .mb-2 { margin-bottom: .45rem !important; }
  .login-input { padding: 9px 12px !important; }
  .login-submit-btn { padding: 10px !important; }
  .login-demo-box { padding: 10px 12px; margin-top: 14px !important; }
  .login-demo-box p { margin-bottom: 4px !important; }
  .login-demo-box ul { margin-bottom: 0; }
  .login-demo-box li { line-height: 1.5; }
}
@media (max-height: 450px) and (max-width: 900px) {
  .login-wrapper { padding: 10px; }
  .login-card { flex-direction: row !important; max-width: 700px; border-radius: 14px; min-height: 0 !important; }
  .login-illustration-side { flex: 1 1 200px !important; padding: 14px 16px !important; justify-content: center !important; }
  .login-brand-logo { width: 40px; height: 40px; margin-bottom: 6px; }
  .login-brand-logo img { width: 28px; height: 28px; }
  .login-brand-name { font-size: 14px; margin-bottom: 0; }
  .login-brand-sub { display: none; }
  .login-icon-row { display: none; }
  .login-form-side { flex: 1 1 220px !important; padding: 14px 18px !important; justify-content: center !important; }
  .login-form-side h3 { font-size: 1.1rem; margin-bottom: 0; }
  .login-form-side > p.small { display: none; }
  .login-form-side .mb-3 { margin-bottom: .4rem !important; }
  .login-demo-box { display: none; }
}
@media (max-width: 400px) {
  .login-illustration-side { padding: 18px 16px 12px; }
  .login-form-side { padding: 18px 18px 20px; }
}
@media (max-height: 700px) and (max-width: 767.98px) {
  .login-illustration-side { padding: 14px 20px 10px; }
  .login-brand-logo { width: 42px; height: 42px; margin-bottom: 6px; }
  .login-brand-logo img { width: 30px; height: 30px; }
  .login-brand-sub { display: none; }
  .login-icon-row { display: none; }
  .login-form-side { padding: 18px 22px 18px; }
  .login-demo-box { padding: 8px 12px; }
}

/* ---------- Transcript print styles ---------- */
.transcript-sheet[dir="rtl"] {
  font-family: 'Segoe UI', Tahoma, 'Noto Naskh Arabic', 'Traditional Arabic', Arial, sans-serif;
}
.transcript-sheet {
  background: #fff;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 45px 35px;
  border: 1px solid #e2e6ee;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(16, 60, 120, .07);
}
.transcript-sheet::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  background: linear-gradient(90deg, #103c78 0%, #1a5cb8 50%, #103c78 100%);
}
.transcript-watermark {
  position: absolute;
  top: 45%; left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 90px;
  font-weight: 800;
  letter-spacing: 8px;
  color: rgba(16, 60, 120, 0.045);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}
.transcript-sheet > * { position: relative; z-index: 1; }
.transcript-crest {
  width: 90px; height: 90px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
}
.transcript-crest img { width: 100%; height: 100%; object-fit: contain; }
.transcript-sheet table { font-size: 13px; page-break-inside: avoid; break-inside: avoid; border-collapse: separate; border-spacing: 0; }
.transcript-sheet th, .transcript-sheet td { padding: 6px 8px; }
.transcript-sheet table.table-bordered { border-radius: 8px; overflow: hidden; border: 1px solid #d8e0ee !important; }
.transcript-sheet table.table-bordered th, .transcript-sheet table.table-bordered td { border-color: #e5eaf3 !important; }
.transcript-sheet tbody tr:nth-child(even) td { background: #fafbfd; }
.sem-header td { background: linear-gradient(90deg, #103c78, #1a5cb8); color: #fff; font-weight: 600; letter-spacing: .6px; font-size: 13.5px; }
.sem-header th { background: #eef2fb; font-weight: 700; color: #103c78; font-size: 11.5px; text-transform: uppercase; letter-spacing: .3px; }
.sem-total td { background: #eef2fb !important; font-weight: 700; color: #103c78; }
.cgpa-row { box-shadow: 0 4px 14px rgba(16,60,120,.18); }
.cgpa-row td { background: linear-gradient(90deg, #0c2c5c, #103c78); color: #fff; font-weight: 700; font-size: 14.5px; padding: 10px 8px; }
.transcript-footer-seal {
  width: 90px; height: 90px; border-radius: 50%;
  border: 2px dashed #b9c6dc; display:flex; align-items:center; justify-content:center;
  margin: 0 auto 8px; color:#9aa9c2; font-size:10px; text-align:center; line-height:1.2;
}
.signature-line {
  border-top: 1px solid #333;
  margin: 0 auto 4px;
  width: 80%;
}

/* ============================================================
   MOBILE RESPONSIVE POLISH (phones & small tablets, < 768px)
   ============================================================ */
@media (max-width: 767.98px) {

  /* ---- Navbar ---- */
  .app-navbar .navbar-brand { font-size: 16px; }
  .app-navbar .navbar-brand span {
    width: 42px !important; height: 42px !important; margin-right: 8px !important;
    box-shadow: 0 3px 10px rgba(0,0,0,.35), 0 0 0 2px rgba(255,255,255,.15) !important;
  }
  .app-navbar .navbar-brand img { width: 34px !important; height: 34px !important; }
  .app-navbar .dropdown-menu { min-width: 180px; }

  /* ---- Sidebar (offcanvas drawer) — a touch narrower so it doesn't eat the whole screen ---- */
  .app-sidebar { width: 85vw; max-width: 300px; }
  .sidebar-link, .sidebar-group-toggle { font-size: 14px; padding: 11px 14px; }

  /* ---- Main content spacing ---- */
  .app-main { padding: 12px !important; }
  .content-wrapper { max-width: 100%; }

  /* ---- Page headers: title + action buttons stack cleanly ---- */
  h4.mb-0, h4.mb-1 { font-size: 1.25rem; }
  .d-flex.justify-content-between.align-items-center.mb-3 { flex-direction: column; align-items: stretch !important; gap: 10px; }
  .d-flex.justify-content-between.align-items-center.mb-3 > .d-flex { flex-wrap: wrap; }
  .d-flex.justify-content-between.align-items-center.mb-3 .btn,
  .d-flex.justify-content-between.align-items-center.mb-3 a.btn { flex: 1 1 auto; }

  /* ---- Welcome banner ---- */
  .welcome-banner { padding: 18px 20px; border-radius: 12px; }
  .welcome-banner h4 { font-size: 1.15rem; }
  .welcome-banner p { font-size: .85rem; }

  /* ---- Stat cards ---- */
  .stat-card { border-radius: 12px; padding: 14px !important; }
  .stat-card .stat-icon { width: 42px; height: 42px; font-size: 18px; border-radius: 10px; }
  .stat-card .fs-4 { font-size: 1.15rem !important; }
  .stat-card .text-muted.small { font-size: 11px; }

  /* ---- Faculty / status tab pills — tighter so more fit per row ---- */
  .faculty-tabs { gap: 6px !important; }
  .faculty-tabs .nav-link { padding: 6px 12px; font-size: 12.5px; }

  /* ---- Cards in general ---- */
  .card { border-radius: 10px; }
  .card-body, .card > .p-4 { padding: 16px !important; }

  /* ---- Lecturer / grouped cards ---- */
  .lecturer-card .card-header { padding: 10px 12px; flex-direction: column; align-items: flex-start !important; }

  /* ---- Tables: smaller, tighter, but never truncated — table-responsive still allows horizontal scroll ---- */
  .table-responsive table { font-size: 12.5px; }
  .table-responsive table th, .table-responsive table td { padding: 8px 10px; white-space: nowrap; }
  .table-responsive table th:first-child, .table-responsive table td:first-child { padding-left: 14px; }
  .badge { font-size: 11px; }

  /* ---- Forms: stack any hardcoded 2-up fields (col-6) for comfortable tap targets ---- */
  .modal-body .row.g-3 > [class*="col-6"],
  .card .row.g-2 > [class*="col-6"],
  .card .row.g-3 > [class*="col-6"] { flex: 0 0 100%; max-width: 100%; }
  .form-control, .form-select { font-size: 16px; } /* prevents iOS auto-zoom on focus */
  .modal-dialog { margin: 10px; }

  /* ---- Dashboard-page dark theme tweaks ---- */
  .dashboard-page .welcome-banner { padding: 18px 20px; }

  /* ---- Official transcript sheet — readable + no horizontal overflow on a phone ---- */
  .transcript-sheet { padding: 14px !important; font-size: 12px; }
  .transcript-sheet table { font-size: 11px !important; }
  .transcript-sheet th, .transcript-sheet td { padding: 4px 5px !important; }
  .transcript-crest { width: 46px !important; height: 46px !important; }
  .transcript-watermark { font-size: 46px !important; }
  .signature-line { width: 70% !important; }

  /* ---- Mobile sidebar-open button (now inside the top navbar, right-aligned) ---- */
  .mobile-menu-btn {
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    padding: 6px 12px;
    border-color: rgba(255,255,255,.5);
  }
  .mobile-menu-btn:hover, .mobile-menu-btn:active { background: rgba(255,255,255,.15); border-color: #fff; }

  /* ---- Sharia PDF grid (Excel-layout preview) — allow horizontal scroll instead of squashing ---- */
  .sharia-pdf-sheet { padding: 10px !important; overflow-x: auto; }
  .sharia-grid { font-size: 10.5px !important; min-width: 900px; }

  /* ---- Recipe/step/options cards & progress bars ---- */
  .progress { min-width: 90px; }
}

/* Extra-small phones (< 400px) — a bit tighter still */
@media (max-width: 399.98px) {
  .stat-card .stat-icon { width: 36px; height: 36px; font-size: 16px; }
  .stat-card .fs-4 { font-size: 1rem !important; }
  .app-navbar .navbar-brand { font-size: 13.5px; }
}

/* ---------- Session Log table (attendance: when each session was taken) ---------- */
.seslog-card { border-radius: 14px; overflow: hidden; border: 1px solid #e5eaf3; box-shadow: 0 2px 10px rgba(16,60,120,.05); }
.seslog-header-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #103c78, #1a5cb8);
  color: #fff; font-size: 13px; margin-right: 6px;
}
.seslog-table thead tr { background: linear-gradient(90deg, #f2f6fc, #eaf1fb); }
.seslog-table thead th {
  color: #103c78; font-size: .72rem; text-transform: uppercase; letter-spacing: .4px;
  font-weight: 700; border-bottom: 2px solid #dde6f4; padding: 11px 14px; white-space: nowrap;
}
.seslog-table thead th i { margin-right: 5px; opacity: .7; }
.seslog-table tbody td { padding: 11px 14px; border-bottom: 1px solid #f0f3f9; }
.seslog-table tbody tr:last-child td { border-bottom: none; }
.seslog-table tbody tr:hover { background: #f8fafc; }
.seslog-session-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 20px;
  background: linear-gradient(135deg, #103c78, #1a5cb8);
  color: #fff; font-weight: 700; font-size: .82rem;
  box-shadow: 0 2px 6px rgba(16,60,120,.25);
}
.seslog-date-cell { font-weight: 600; color: #1f2937; }
.seslog-day-pill {
  background: #eef2fb; color: #4a5568; font-size: .74rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
}
.seslog-count-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: #e6f6ea; color: #1b6e2e; font-weight: 700; font-size: .78rem;
  padding: 5px 12px; border-radius: 20px;
}

/* ---------- Attendance Report (matches the official sample layout) ---------- */
.attrep-sheet {
  background: #fff; max-width: 100%; margin: 0 auto;
  padding: 28px 34px; border: 1px solid #e2e6ee; border-radius: 10px;
  box-shadow: 0 6px 24px rgba(16,60,120,.07);
  font-family: -apple-system, 'Segoe UI', Arial, sans-serif;
}
.attrep-header { display: flex; align-items: flex-start; gap: 16px; border-bottom: 3px solid #16305c; padding-bottom: 14px; margin-bottom: 16px; }
.attrep-crest { width: 52px; height: 52px; flex-shrink: 0; margin-top: 2px; }
.attrep-crest img { width: 100%; height: 100%; object-fit: contain; }
.attrep-uni { font-weight: 800; font-size: 1.3rem; color: #16305c; letter-spacing: .2px; line-height: 1.2; }
.attrep-arabic { color: #6b7280; font-size: .85rem; margin-top: 1px; direction: rtl; }
.attrep-sub { color: #c9781f; font-weight: 700; font-size: .82rem; letter-spacing: .3px; margin-top: 4px; }
.attrep-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 20px;
  background: #f8f9fb; border: 1px solid #edeff3; border-radius: 8px;
  padding: 12px 18px; margin-bottom: 18px;
}
.attrep-meta-label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .4px; color: #8a94a6; font-weight: 700; }
.attrep-meta-value { display: block; font-size: .88rem; color: #1a1f2b; font-weight: 700; margin-top: 2px; }
.attrep-course-block { margin-bottom: 22px; page-break-inside: avoid; break-inside: avoid; }
.attrep-course-title {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px;
  font-weight: 700; font-size: .88rem; color: #fff;
  background: #16305c;
  padding: 9px 16px; border-radius: 6px 6px 0 0;
}
.attrep-sessions-recorded { font-size: .74rem; font-weight: 500; opacity: .9; }
.attrep-grid { width: 100%; border-collapse: collapse; font-size: .8rem; border: 1px solid #e5e8ee; border-top: none; }
.attrep-grid thead tr { background: #f3f5f8; }
.attrep-grid thead th {
  color: #5a6473; font-weight: 700; text-align: center; padding: 9px 8px;
  border-bottom: 1px solid #e5e8ee; white-space: nowrap; font-size: .68rem; text-transform: uppercase; letter-spacing: .3px;
}
.attrep-grid-id { text-align: left !important; padding-left: 14px !important; font-family: 'Courier New', monospace; color: #4a5568; }
.attrep-grid-name { text-align: left !important; min-width: 160px; }
.attrep-grid-sess { width: 40px; }
.attrep-grid-pct { width: 60px; }
.attrep-grid tbody td { border-bottom: 1px solid #f0f2f6; padding: 8px; text-align: center; }
.attrep-grid tbody tr:nth-child(even) { background: #fafbfc; }
.attrep-grid td.attrep-grid-id, .attrep-grid td.attrep-grid-name { text-align: left; padding-left: 14px; }
.attrep-grid-pct { font-weight: 700; color: #1a1f2b; }
.attrep-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px; padding: 0 5px; border-radius: 5px;
  font-weight: 700; font-size: .72rem;
}
.attrep-badge-present { background: #e3f5e8; color: #1e7e34; }
.attrep-badge-absent { background: #fbe4e4; color: #c0392b; }
.attrep-badge-late { background: #fdedd8; color: #b0650a; }
.attrep-badge-sick { background: #dcedfb; color: #1a6bb5; }
.attrep-badge-permission { background: #ece2f5; color: #6a1b9a; }
.attrep-badge-none { background: transparent; color: #c3c9d4; }
.attrep-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  background: #f6f7f9; border: 1px solid #edeff3; border-radius: 8px;
  padding: 10px 16px; margin: 6px 0 18px; font-size: .78rem; color: #4a5568;
}
.attrep-legend span { display: inline-flex; align-items: center; gap: 5px; }
.attrep-empty-box {
  background: #fdf6e3; border-left: 4px solid #d99a2b; border-radius: 6px;
  padding: 12px 18px; margin-bottom: 18px;
}
.attrep-empty-title { font-weight: 700; color: #a3670f; font-size: .85rem; margin-bottom: 6px; }
.attrep-empty-box ul { margin: 0; padding-left: 20px; font-size: .82rem; color: #4a5568; }
.attrep-empty-box li { margin-bottom: 2px; }
.attrep-footer { margin-top: 22px; padding-top: 12px; border-top: 1px solid #e5eaf3; text-align: center; font-size: .72rem; color: #8a94a6; line-height: 1.6; }

@media print {
  .no-print { display: none !important; }
  html, body { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }
  .app-sidebar, .app-navbar { display: none !important; }
  .app-main { padding: 0 !important; margin: 0 !important; height: auto !important; overflow: visible !important; }
  .app-body-row { height: auto !important; overflow: visible !important; }
  .transcript-sheet { border: none; box-shadow: none !important; padding: 10px 20px; }
  .attrep-sheet { border: none; box-shadow: none !important; padding: 10px 15px; }
  .attrep-course-block { page-break-inside: avoid; break-inside: avoid; }
  .cgpa-row { box-shadow: none !important; }
  .transcript-sheet table tr { page-break-inside: avoid; break-inside: avoid; }
  .transcript-sheet .row.mt-5 { page-break-inside: avoid; break-inside: avoid; }
  body { background: #fff; }
  @page { margin: 14mm 12mm; }
}
