@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/Cairo-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/Cairo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bs-font-sans-serif: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  --bs-body-font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  --uob-navy-deep: #071930;
  --uob-navy: #0c2340;
  --uob-blue: #143d73;
  --uob-royal: #1d569e;
  --uob-sky: #2b72c9;
  --uob-gold: #c89b2b;
  --uob-gold-bright: #e0b445;
  --uob-gold-soft: #f7eed6;
  --uob-teal: #0d8a7c;
  --uob-surface: #f4f7fb;
  --uob-card: #ffffff;
  --uob-ink: #0f223d;
  --uob-muted: #526580;
  --uob-border: #dbe4f0;
  --uob-shadow-sm: 0 4px 14px rgba(12, 35, 64, 0.06);
  --uob-shadow-md: 0 12px 32px rgba(12, 35, 64, 0.09);
  --uob-shadow-lg: 0 20px 48px rgba(12, 35, 64, 0.13);
  --uob-radius-sm: 10px;
  --uob-radius-md: 16px;
  --uob-radius-lg: 22px;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  direction: rtl;
  text-align: right;
  font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--uob-ink);
  background-color: var(--uob-surface);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(200, 155, 43, 0.08) 0%, transparent 38%),
    radial-gradient(circle at 88% 12%, rgba(20, 61, 115, 0.08) 0%, transparent 42%),
    linear-gradient(180deg, #f8fafd 0%, #eef3f9 100%);
  background-attachment: fixed;
  margin-bottom: 92px;
  line-height: 1.75;
}

button,
input,
select,
textarea,
.btn,
.form-control,
.form-select,
.navbar-brand,
.nav-link,
h1, h2, h3, h4, h5, h6 {
  font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
}

input[autocomplete="username"],
input[type="password"],
input[type="email"] {
  direction: ltr;
  text-align: right;
}

/* Official Top Header & Navbar */
.uob-header {
  background: linear-gradient(135deg, var(--uob-navy-deep) 0%, var(--uob-navy) 45%, var(--uob-blue) 100%);
  border-bottom: 3px solid var(--uob-gold);
  box-shadow: 0 6px 24px rgba(7, 25, 48, 0.22);
  position: relative;
  z-index: 100;
}

.uob-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 28px
  );
  pointer-events: none;
}

.uob-navbar {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.uob-brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.uob-brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 50%;
  padding: 3px;
  border: 2px solid var(--uob-gold);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}

.uob-brand-logo--cc {
  width: 46px;
  height: 46px;
}

.uob-brand-wrap:hover .uob-brand-logo,
.uob-cc-badge:hover .uob-brand-logo {
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(200, 155, 43, 0.45);
}

.uob-navbar .navbar-brand {
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  margin: 0;
  padding: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.uob-navbar .navbar-nav {
  gap: 0.25rem;
  align-items: center;
}

.uob-navbar .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 0.48rem 0.9rem !important;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.uob-navbar .nav-link:hover,
.uob-navbar .nav-link:focus {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.uob-navbar .btn-link.nav-link {
  color: var(--uob-gold-soft) !important;
  border: 1px solid rgba(200, 155, 43, 0.45);
  background: rgba(200, 155, 43, 0.14);
  text-decoration: none;
}

.uob-navbar .btn-link.nav-link:hover {
  background: rgba(200, 155, 43, 0.28);
  border-color: var(--uob-gold-bright);
  color: #ffffff !important;
}

.uob-cc-badge {
  display: flex;
  align-items: center;
  padding-inline-start: 0.75rem;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.18);
  margin-inline-start: 0.5rem;
}

/* Main Content Container */
.uob-main-container {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

/* Headings & Page Titles */
main h1 {
  color: var(--uob-navy);
  font-weight: 800;
  font-size: clamp(1.55rem, 2.5vw, 2.05rem);
  margin-bottom: 1.15rem;
  position: relative;
  padding-bottom: 0.65rem;
}

main h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 68px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--uob-gold), var(--uob-royal));
}

.text-center h1::after,
.uob-hero-card h1::after,
.report-hero h1::after {
  right: 50%;
  transform: translateX(50%);
}

.report-hero h1 {
  color: #ffffff;
  padding-bottom: 0;
}

.report-hero h1::after {
  display: none;
}

main h2 {
  color: var(--uob-navy);
  font-weight: 700;
}

/* Home Hero Showcase */
.uob-hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7faff 100%);
  border: 1px solid var(--uob-border);
  border-top: 5px solid var(--uob-gold);
  border-radius: var(--uob-radius-lg);
  padding: 3rem 2rem;
  box-shadow: var(--uob-shadow-md);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.uob-hero-card::before {
  content: "";
  position: absolute;
  top: -80px;
  left: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 155, 43, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.uob-hero-card::after {
  content: "";
  position: absolute;
  bottom: -90px;
  right: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 61, 115, 0.09) 0%, transparent 70%);
  pointer-events: none;
}

.uob-crest-pair {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1.6rem;
  background: linear-gradient(180deg, #ffffff 0%, #f3f7fc 100%);
  border: 1px solid rgba(200, 155, 43, 0.38);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(12, 35, 64, 0.08);
}

.uob-crest-pair img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(12, 35, 64, 0.14));
  transition: transform 0.3s ease;
}

.uob-crest-pair img:hover {
  transform: translateY(-3px) scale(1.04);
}

.uob-crest-divider {
  width: 2px;
  height: 54px;
  background: linear-gradient(180deg, transparent, var(--uob-gold), transparent);
}

.uob-hero-card h1.display-4 {
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
  font-weight: 800;
  color: var(--uob-navy);
  margin-bottom: 0.85rem;
}

.uob-hero-card > p {
  font-size: 1.12rem;
  color: var(--uob-muted);
  max-width: 620px;
  margin: 0 auto 1.75rem;
}

.uob-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

/* Official Buttons */
.btn {
  font-weight: 600;
  border-radius: 10px;
  padding: 0.55rem 1.35rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-sm {
  padding: 0.32rem 0.85rem;
  border-radius: 8px;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--uob-blue) 0%, var(--uob-royal) 100%);
  border-color: var(--uob-blue);
  box-shadow: 0 4px 12px rgba(20, 61, 115, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--uob-navy) 0%, var(--uob-blue) 100%);
  border-color: var(--uob-navy);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(12, 35, 64, 0.3);
}

.btn-outline-primary {
  color: var(--uob-blue);
  border-color: var(--uob-blue);
  background-color: rgba(255, 255, 255, 0.85);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--uob-blue);
  border-color: var(--uob-blue);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-outline-secondary {
  color: var(--uob-navy);
  border-color: #b8c7dc;
  background-color: #ffffff;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background-color: var(--uob-navy);
  border-color: var(--uob-navy);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.22rem rgba(29, 86, 158, 0.22);
  border-color: var(--uob-royal);
}

/* Cards & Panels */
.card,
.uob-surface-card {
  background: var(--uob-card);
  border: 1px solid var(--uob-border);
  border-top: 4px solid var(--uob-blue);
  border-radius: var(--uob-radius-md);
  box-shadow: var(--uob-shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  box-shadow: var(--uob-shadow-md);
}

.card-body {
  padding: 1.5rem;
}

/* Auth / Form Cards (Login, Register, Settings, Admin Edit/Delete) */
.uob-auth-wrapper {
  max-width: 540px;
  margin: 0.75rem auto 2rem;
}

.uob-auth-card {
  background: var(--uob-card);
  border: 1px solid var(--uob-border);
  border-top: 5px solid var(--uob-gold);
  border-radius: var(--uob-radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: var(--uob-shadow-md);
}

.uob-auth-crest {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.uob-auth-crest img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.uob-auth-links {
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--uob-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.uob-auth-links p {
  margin-bottom: 0;
}

.uob-auth-links a {
  font-weight: 600;
  color: var(--uob-royal);
  text-decoration: none;
}

.uob-auth-links a:hover {
  color: var(--uob-navy);
  text-decoration: underline;
}

/* Form Controls */
.form-label,
form label {
  font-weight: 600;
  color: var(--uob-navy);
  margin-bottom: 0.4rem;
}

.form-control,
.form-select {
  border: 1.5px solid #cbd6e6;
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  color: var(--uob-ink);
  background-color: #fcfdff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  background-color: #ffffff;
}

/* 4-Digit Visual Captcha Row */
.uob-captcha-row {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
}

.uob-captcha-input {
  direction: ltr;
  text-align: center;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.25em;
  flex: 1;
}

.uob-captcha-input::placeholder {
  font-size: 0.88rem;
  letter-spacing: normal;
  font-weight: 500;
}

.uob-captcha-box {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(12, 35, 64, 0.08);
}

.uob-captcha-box img {
  height: 46px;
  width: 148px;
  display: block;
  user-select: none;
}

.uob-captcha-refresh {
  padding: 0 0.9rem;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Student Profile / Details List */
dl.row {
  background: var(--uob-card);
  border: 1px solid var(--uob-border);
  border-top: 4px solid var(--uob-gold);
  border-radius: var(--uob-radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--uob-shadow-sm);
  margin-right: 0;
  margin-left: 0;
}

.card-body dl.row {
  border: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

dl.row dt {
  color: var(--uob-muted);
  font-weight: 700;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px dashed #e5ecf5;
}

dl.row dd {
  color: var(--uob-navy);
  font-weight: 600;
  padding: 0.7rem 0.5rem;
  margin-bottom: 0;
  border-bottom: 1px dashed #e5ecf5;
}

dl.row dt:last-of-type,
dl.row dd:last-of-type {
  border-bottom: none;
}

/* Tables */
.table-responsive {
  background: var(--uob-card);
  border: 1px solid var(--uob-border);
  border-radius: var(--uob-radius-md);
  box-shadow: var(--uob-shadow-sm);
  overflow: hidden;
}

.report-panel .table-responsive {
  box-shadow: none;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background: linear-gradient(180deg, #eef3fa 0%, #e3ebf6 100%);
  color: var(--uob-navy);
  font-weight: 700;
  border-bottom: 2px solid #cbd6e6;
  padding: 0.85rem 1rem;
}

.table tbody td {
  padding: 0.8rem 1rem;
  vertical-align: middle;
  color: var(--uob-ink);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(244, 247, 251, 0.65);
}

.table tbody tr:hover > * {
  background-color: rgba(29, 86, 158, 0.045);
}

/* Evaluation Questionnaire Interactive Rating Pills */
#material-selection,
#lecturer-selection {
  background: var(--uob-card);
  border: 1px solid var(--uob-border);
  border-right: 5px solid var(--uob-gold);
  border-radius: var(--uob-radius-md);
  padding: 1.5rem;
  box-shadow: var(--uob-shadow-sm);
}

section[aria-labelledby="questions-heading"] .card {
  border-top: 4px solid var(--uob-navy);
  margin-bottom: 1.25rem !important;
}

section[aria-labelledby="questions-heading"] .card h3.h5 {
  color: var(--uob-navy);
  font-weight: 800;
  padding-bottom: 0.75rem;
  margin-bottom: 1.1rem;
  border-bottom: 2px solid var(--uob-gold-soft);
}

section[aria-labelledby="questions-heading"] fieldset.mb-3 {
  background: #f8fafd;
  border: 1px solid #e4ecf7;
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin-bottom: 0.9rem !important;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

section[aria-labelledby="questions-heading"] fieldset.mb-3:hover {
  border-color: #c5d4e8;
  background: #ffffff;
}

section[aria-labelledby="questions-heading"] fieldset.mb-3 legend {
  font-weight: 700;
  color: var(--uob-ink);
  margin-bottom: 0.75rem;
  float: none;
  width: 100%;
}

section[aria-labelledby="questions-heading"] label.form-check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.25rem 0 0.25rem 0.6rem;
  padding: 0.45rem 0.95rem;
  border: 1.5px solid #cfd9e8;
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--uob-muted);
  transition: all 0.18s ease;
}

section[aria-labelledby="questions-heading"] label.form-check-inline:hover {
  border-color: var(--uob-royal);
  color: var(--uob-navy);
  background: #f2f7ff;
}

section[aria-labelledby="questions-heading"] label.form-check-inline .form-check-input {
  margin: 0;
  float: none;
}

section[aria-labelledby="questions-heading"] label.form-check-inline:has(.form-check-input:checked) {
  background: linear-gradient(135deg, var(--uob-navy) 0%, var(--uob-royal) 100%);
  border-color: var(--uob-navy);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(20, 61, 115, 0.24);
  transform: translateY(-1px);
}

section[aria-labelledby="questions-heading"] label.form-check-inline:has(.form-check-input:checked) .form-check-label {
  color: #ffffff;
}

/* Alerts & Badges */
.alert {
  border-radius: var(--uob-radius-sm);
  border-width: 1px;
  font-weight: 600;
}

.alert-success {
  background-color: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.alert-info {
  background-color: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.badge.bg-success {
  background: linear-gradient(135deg, #059669, #0d9488) !important;
  padding: 0.4em 0.85em;
  border-radius: 999px;
}

/* Official Footer */
.uob-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: var(--uob-navy-deep);
  color: rgba(255, 255, 255, 0.82) !important;
  border-top: 3px solid var(--uob-gold) !important;
  padding: 0.9rem 0;
  font-size: 0.9rem;
}

.uob-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.uob-footer-logos {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.uob-footer-logos img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 50%;
  padding: 2px;
  border: 1px solid var(--uob-gold);
}

.uob-footer a {
  color: var(--uob-gold-bright);
  text-decoration: none;
  font-weight: 600;
}

.uob-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ==========================================================================
   Admin Management Tables & Badges
   ========================================================================== */
.uob-admin-group-card {
  border: 1px solid #dce5ed;
  border-top: 3px solid var(--uob-navy);
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(12, 35, 64, 0.06);
  overflow: hidden;
}

.uob-admin-group-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 1.1rem 1.4rem;
}

.uob-badge-role {
  display: inline-block;
  padding: 0.28rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.uob-badge-role--sudo {
  background: #fdf2f8;
  color: #9d174d;
  border: 1px solid #fbcfe8;
}

.uob-badge-role--sysadmin {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.uob-badge-role--coladmin {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.uob-badge-role-tag {
  font-family: Consolas, monospace;
  font-size: 0.85rem;
  background: #f1f5f9;
  color: #334155;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.uob-count-badge {
  background: #ffffff;
  color: var(--uob-navy);
  border: 1px solid #cbd5e1;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.84rem;
}

.uob-admin-table thead th {
  background: #f8fafc;
  color: var(--uob-navy);
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 2px solid #e2e8f0;
  padding: 0.95rem 1.2rem;
}

.uob-admin-table tbody td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.94rem;
}

.uob-admin-table tbody tr:hover {
  background-color: #f8fbff;
}

.uob-account-code {
  background: #f1f5f9;
  color: var(--uob-navy);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.88rem;
  border: 1px solid #e2e8f0;
}

.uob-badge-platform {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
}

.uob-badge-status {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.uob-badge-status--active {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.uob-badge-status--inactive {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.btn-outline-danger {
  color: #dc2626;
  border-color: #fca5a5;
  background-color: #fff;
}

.btn-outline-danger:hover {
  background-color: #dc2626;
  border-color: #dc2626;
  color: #fff;
}
