/* =====================================================================
   University Academic Platform — application theme
   ===================================================================== */
:root {
  /* Al-Imra International University — navy & academic gold,
     matching the public website (alimrauniversity.com). */
  --uap-primary: #16324F;      /* navy — links, buttons */
  --uap-primary-dark: #0B192C; /* deepest navy */
  --uap-primary-light: #D4AF37;/* gold — accents on dark surfaces */
  --uap-accent: #D4AF37;       /* gold */
  --uap-sidebar: #0B192C;      /* navy sidebar */
  --uap-sidebar-hover: #102A43;
  --uap-sidebar-active: #D4AF37;
  --uap-text-muted: #6B7A94;
  --uap-bg: #F4F7FB;
  --uap-border: #E2E7EF;
  --sidebar-width: 264px;

  --uap-gold-soft: rgba(212, 175, 55, .20);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: var(--uap-bg);
  color: #1f2937;
  font-size: 0.925rem;
}

a { color: var(--uap-primary); text-decoration: none; }
a:hover { color: var(--uap-primary-dark); }

/* ---------- Layout shell ---------- */
.uap-shell { display: flex; min-height: 100vh; }

.uap-sidebar {
  width: var(--sidebar-width);
  background: var(--uap-sidebar);
  color: #cbd5e1;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  z-index: 1040;
  transition: transform .25s ease;
}
.uap-sidebar .brand {
  padding: 1.05rem 1.25rem;
  display: flex; align-items: center; gap: .65rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.uap-sidebar .brand .logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--uap-primary), var(--uap-accent));
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.1rem;
  flex-shrink: 0;
}
.uap-sidebar .brand .brand-name { color: #fff; font-weight: 600; font-size: 1rem; line-height: 1.15; }
.uap-sidebar .brand .brand-sub { color: #94a3b8; font-size: .72rem; }

.uap-nav { overflow-y: auto; flex: 1; padding: .5rem 0 2rem; }
.uap-nav::-webkit-scrollbar { width: 6px; }
.uap-nav::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }
.uap-nav .nav-section {
  color: #64748b; font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; padding: 1rem 1.25rem .35rem;
}
.uap-nav a.nav-link {
  display: flex; align-items: center; gap: .75rem;
  padding: .55rem 1.25rem; color: #cbd5e1; font-size: .875rem;
  border-left: 3px solid transparent;
}
.uap-nav a.nav-link i { width: 18px; text-align: center; font-size: .95rem; color: #94a3b8; }
.uap-nav a.nav-link:hover { background: var(--uap-sidebar-hover); color: #fff; }
.uap-nav a.nav-link:hover i { color: #fff; }
.uap-nav a.nav-link.active {
  background: linear-gradient(90deg, var(--uap-gold-soft), transparent);
  color: #fff; border-left-color: var(--uap-primary-light);
}
.uap-nav a.nav-link.active i { color: var(--uap-primary-light); }

/* ---------- Main ---------- */
.uap-main { flex: 1; margin-left: var(--sidebar-width); min-width: 0; }
.uap-topbar {
  background: #fff; border-bottom: 1px solid var(--uap-border);
  padding: .7rem 1.5rem; display: flex; align-items: center; gap: 1rem;
  position: sticky; top: 0; z-index: 1020;
}
.uap-topbar .page-title { font-weight: 600; font-size: 1.05rem; margin: 0; }
.uap-topbar .spacer { flex: 1; }
.uap-content { padding: 1.5rem; }

.sidebar-toggle { background: none; border: none; font-size: 1.2rem; color: #374151; cursor: pointer; display: none; }

/* ---------- Cards & stats ---------- */
.card { border: 1px solid var(--uap-border); border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom: 1px solid var(--uap-border); font-weight: 600; border-radius: 12px 12px 0 0 !important; }

.stat-card { border-radius: 12px; padding: 1.15rem 1.25rem; background: #fff; border: 1px solid var(--uap-border); height: 100%; }
.stat-card .stat-icon {
  width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  font-size: 1.2rem; color: #fff; margin-bottom: .75rem;
}
.stat-card .stat-value { font-size: 1.7rem; font-weight: 700; line-height: 1; color: #111827; }
.stat-card .stat-label { color: var(--uap-text-muted); font-size: .8rem; margin-top: .3rem; }
.bg-grad-indigo { background: linear-gradient(135deg,#102A43,#16324F); }
.bg-grad-sky    { background: linear-gradient(135deg,#0ea5e9,#38bdf8); }
.bg-grad-green  { background: linear-gradient(135deg,#059669,#10b981); }
.bg-grad-amber  { background: linear-gradient(135deg,#d97706,#f59e0b); }
.bg-grad-rose   { background: linear-gradient(135deg,#e11d48,#fb7185); }
.bg-grad-violet { background: linear-gradient(135deg,#7c3aed,#a78bfa); }
.bg-grad-slate  { background: linear-gradient(135deg,#475569,#64748b); }

/* ---------- Buttons / badges ---------- */
.btn-primary { background: var(--uap-primary); border-color: var(--uap-primary); }
.btn-primary:hover { background: var(--uap-primary-dark); border-color: var(--uap-primary-dark); }
.btn-outline-primary { color: var(--uap-primary); border-color: var(--uap-primary); }
.btn-outline-primary:hover { background: var(--uap-primary); border-color: var(--uap-primary); }
.text-primary { color: var(--uap-primary) !important; }

/* ---------- Tables ---------- */
.table { --bs-table-hover-bg: #f8fafc; }
.table thead th { background: #f9fafb; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; border-bottom: 1px solid var(--uap-border); }
.table td, .table th { vertical-align: middle; }

/* ---------- Avatar ---------- */
.avatar-circle {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--uap-primary); color: #fff; display: grid; place-items: center;
  font-weight: 600; font-size: .85rem; flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: .72rem; }

/* ---------- Timeline / pipeline ---------- */
.pipeline { list-style: none; padding: 0; margin: 0; }
.pipeline li { display: flex; gap: .75rem; padding: .35rem 0; align-items: flex-start; }
.pipeline .dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: .65rem; color: #fff; margin-top: 2px; }
.pipeline .dot.done { background: #10b981; }
.pipeline .dot.current { background: var(--uap-primary); }
.pipeline .dot.todo { background: #d1d5db; }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: flex; }
.auth-visual {
  flex: 1; background: linear-gradient(135deg,#0B192C,#102A43 55%,#16324F);
  color: #fff; display: flex; flex-direction: column; justify-content: center;
  padding: 3rem; position: relative; overflow: hidden;
}
.auth-visual h1 { font-weight: 700; font-size: 2.1rem; }
.auth-visual .feature { display: flex; gap: .75rem; align-items: center; margin: .6rem 0; opacity: .95; }
.auth-visual .feature i { width: 20px; }
.auth-form { width: 460px; max-width: 100%; display: flex; align-items: center; justify-content: center; padding: 2.5rem; background:#fff; }
.auth-form .inner { width: 100%; max-width: 340px; }

.portal-card {
  border: 1px solid var(--uap-border); border-radius: 14px; padding: 1.25rem; background:#fff;
  display:flex; flex-direction:column; gap:.4rem; transition: .15s; height:100%;
}
.portal-card:hover { border-color: var(--uap-primary); box-shadow: 0 6px 18px rgba(11,25,44,.14); transform: translateY(-2px); }
.portal-card .p-icon { width: 46px; height:46px; border-radius: 11px; display:grid; place-items:center; color:#fff; font-size:1.2rem; }

/* ---------- Notification dropdown ---------- */
.notif-dot { position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; background: #ef4444; border-radius: 50%; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .uap-sidebar { transform: translateX(-100%); }
  .uap-sidebar.show { transform: translateX(0); }
  .uap-main { margin-left: 0; }
  .sidebar-toggle { display: inline-block; }
}

/* ---------- Print ---------- */
@media print {
  .uap-sidebar, .uap-topbar, .no-print, .btn { display: none !important; }
  .uap-main { margin-left: 0; }
  .uap-content { padding: 0; }
  body { background: #fff; }
}


/* ---------- AIU brand polish ---------- */
h1, h2, h3, .h1, .h2, .h3, .uap-sidebar .brand .name {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  letter-spacing: -0.01em;
}
.uap-sidebar .brand { border-bottom-color: rgba(212, 175, 55, .22); }
.btn-primary:hover, .btn-primary:focus { background: var(--uap-primary-dark); border-color: var(--uap-primary-dark); }
.badge.bg-primary { background: var(--uap-primary) !important; }
