/* ==========================================================================
   AIN SHAMS UNIVERSITY (ASU) — ENTERPRISE DESIGN SYSTEM (WCAG 2.2 AA)
   Visual Identity: Prestigious Academic Institution + Modern Enterprise
   Supports Full RTL (Arabic) & LTR (English) via CSS Logical Properties
   ========================================================================== */

:root {
  /* ASU Institutional Palette */
  --asu-emerald-950: #021a13;
  --asu-emerald-900: #063327;
  --asu-emerald-850: #084031;
  --asu-emerald-800: #0b4f3e;
  --asu-emerald-700: #0f6852;
  --asu-emerald-600: #148065;
  --asu-emerald-500: #10b981;
  --asu-emerald-400: #34d399;
  --asu-emerald-100: #e6f4f0;
  --asu-emerald-50:  #f0fdf9;

  --asu-gold-800: #714e03;
  --asu-gold-700: #8a6004;
  --asu-gold-600: #b8860b;
  --asu-gold-500: #d4af37;
  --asu-gold-400: #e5c158;
  --asu-gold-200: #fae8a4;
  --asu-gold-100: #fef9e7;
  --asu-gold-50:  #fffdf5;

  /* Neutrals & Slate */
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;

  /* Semantic Theme Variables (Light Mode Default) */
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-muted: #e2e8f0;
  --bg-card: #ffffff;
  --bg-input: #ffffff;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --border-color: #e2e8f0;
  --border-subtle: #edf2f7;
  --border-strong: #cbd5e1;
  --border-focus: #0f6852;

  --status-success-bg: #ecfdf5;
  --status-success-text: #065f46;
  --status-success-border: #a7f3d0;

  --status-warning-bg: #fffbeb;
  --status-warning-text: #92400e;
  --status-warning-border: #fde68a;

  --status-danger-bg: #fef2f2;
  --status-danger-text: #991b1b;
  --status-danger-border: #fecaca;

  --status-info-bg: #f0f9ff;
  --status-info-text: #075985;
  --status-info-border: #bae6fd;

  --status-neutral-bg: #f8fafc;
  --status-neutral-text: #475569;
  --status-neutral-border: #e2e8f0;

  /* Typography & Font Sizing */
  --font-sans: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Amiri', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14.5px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;

  /* 8pt Spatial Rhythm Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Multi-Layered Diffused Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.09), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

  /* Geometry & Focus */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  --focus-ring: 2px solid var(--asu-emerald-700);
  --focus-ring-offset: 2px;

  --sidebar-width: 272px;
  --sidebar-collapsed-width: 68px;
  --header-height: 70px;
  --gov-strip-height: 32px;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-canvas: #070b13;
  --bg-surface: #0e1524;
  --bg-subtle: #141e33;
  --bg-muted: #1c2b48;
  --bg-card: #0e1524;
  --bg-input: #141e33;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #070b13;

  --border-color: #202e4c;
  --border-subtle: #18243b;
  --border-strong: #2c3f66;
  --border-focus: #10b981;

  --asu-emerald-100: #063327;
  --asu-gold-100: #382404;

  --status-success-bg: rgba(6, 78, 59, 0.4);
  --status-success-text: #6ee7b7;
  --status-success-border: #047857;

  --status-warning-bg: rgba(69, 26, 3, 0.4);
  --status-warning-text: #fcd34d;
  --status-warning-border: #92400e;

  --status-danger-bg: rgba(69, 10, 10, 0.4);
  --status-danger-text: #fca5a5;
  --status-danger-border: #991b1b;

  --status-info-bg: rgba(8, 47, 73, 0.4);
  --status-info-text: #7dd3fc;
  --status-info-border: #0369a1;

  --status-neutral-bg: #141e33;
  --status-neutral-text: #cbd5e1;
  --status-neutral-border: #202e4c;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.65);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.75);
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.skip-link {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: 16px;
  background: var(--asu-emerald-900);
  color: #ffffff;
  padding: 10px 18px;
  z-index: 10000;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: inset-block-start 0.15s ease;
}

.skip-link:focus {
  inset-block-start: 12px;
}

/* ==========================================================================
   GOVERNMENT / INSTITUTIONAL TOP STRIP
   ========================================================================== */
.gov-top-strip {
  background: linear-gradient(90deg, #021a13 0%, #063327 50%, #021a13 100%);
  color: #f8fafc;
  padding-inline: 24px;
  height: var(--gov-strip-height);
  font-size: 12px;
  border-block-end: 2px solid var(--asu-gold-500);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.gov-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: 0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gov-seal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--asu-gold-400);
  display: inline-block;
  box-shadow: 0 0 8px rgba(229, 193, 88, 0.85);
  flex-shrink: 0;
}

.gov-status-pills {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.system-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 6px #10b981;
  display: inline-block;
  animation: pulse-glow 2.5s infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.9); }
}

/* ==========================================================================
   PRIMARY INSTITUTIONAL HEADER & BALANCED NAVBAR
   ========================================================================== */
.institutional-header {
  background: var(--bg-surface);
  border-block-end: 1px solid var(--border-color);
  padding-inline: 24px;
  height: var(--header-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="dark"] .institutional-header {
  background: rgba(14, 21, 36, 0.88);
  border-block-end: 1px solid var(--border-color);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* 1. Start Group: Navigation Toggle & Official Identity */
.header-start-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.btn-sidebar-toggle {
  display: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-sidebar-toggle:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: opacity var(--transition-fast);
}

.brand-identity:hover {
  opacity: 0.92;
}

.asu-seal-wrap {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--asu-gold-500) 0%, var(--asu-emerald-700) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(6, 51, 39, 0.22);
  transition: transform var(--transition-fast);
}

.brand-identity:hover .asu-seal-wrap {
  transform: scale(1.04);
}

.asu-seal-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-titles h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.brand-titles p {
  margin: 2px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
  white-space: nowrap;
}

[data-theme="dark"] .brand-titles p {
  color: var(--asu-gold-400);
}

/* 2. Center Group: Spotlight Search Bar */
.header-center-group {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.header-search-wrap {
  position: relative;
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
}

.search-input-icon {
  position: absolute;
  inset-inline-start: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
}

.header-search-input {
  width: 100%;
  height: 38px;
  padding-inline-start: 38px;
  padding-inline-end: 72px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  transition: all var(--transition-normal);
}

.header-search-input:focus {
  background: var(--bg-surface);
  border-color: var(--asu-emerald-700);
  box-shadow: 0 0 0 3px rgba(15, 104, 82, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04);
  outline: none;
}

.header-search-input:focus + .search-shortcut-kbd {
  border-color: var(--asu-emerald-600);
}

.search-shortcut-kbd {
  position: absolute;
  inset-inline-end: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  pointer-events: none;
}

/* 3. End Group: Controls, Persona Switcher & Identity */
.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Persona Switcher Pill */
.persona-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-subtle);
  padding: 4px 10px 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.persona-select-wrap:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface);
}

.persona-icon {
  color: var(--asu-emerald-700);
  flex-shrink: 0;
}

[data-theme="dark"] .persona-icon {
  color: var(--asu-gold-400);
}

.persona-select-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.select-control-sm {
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  max-width: 210px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.select-control-sm:focus {
  border-color: var(--asu-emerald-700);
  outline: none;
}

/* Auth Session Cluster */
.auth-session-cluster {
  display: flex;
  align-items: center;
}

.auth-logged-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.user-profile-badge:hover {
  background: var(--bg-muted);
}

.user-profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--asu-emerald-800) 0%, var(--asu-emerald-950) 100%);
  border: 1.5px solid var(--asu-gold-500);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  box-shadow: 0 1px 3px rgba(6, 51, 39, 0.25);
  flex-shrink: 0;
}

.user-profile-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-profile-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-role-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--asu-gold-100);
  color: var(--asu-gold-800);
  border: 1px solid var(--asu-gold-400);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

[data-theme="dark"] .badge-role-tag {
  background: rgba(212, 175, 55, 0.15);
  color: var(--asu-gold-200);
  border-color: rgba(212, 175, 55, 0.35);
}

.btn-logout-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-logout-control:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

[data-theme="dark"] .btn-logout-control:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.35);
  color: #fca5a5;
}

/* Header Divider */
.header-divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
  margin-inline: 2px;
  flex-shrink: 0;
}

/* Utility Group: Language & Theme */
.header-utility-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-header-pill:hover {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

.btn-theme-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-theme-circle:hover {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
  transform: rotate(15deg);
  box-shadow: var(--shadow-xs);
}

/* ForeSec Pill Link in Governance Strip */
.foresec-top-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* ==========================================================================
   APP SHELL & SIDEBAR NAVIGATION
   ========================================================================== */
.app-shell {
  display: flex;
  min-height: calc(100vh - var(--header-height) - var(--gov-strip-height));
  position: relative;
}

/* Collapsible Sidebar */
.primary-nav-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-surface);
  border-inline-end: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
  height: calc(100vh - var(--header-height) - var(--gov-strip-height));
  position: sticky;
  top: var(--header-height);
  z-index: 30;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.sidebar-nav-content {
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 800;
  padding: 16px 12px 6px;
  white-space: nowrap;
  transition: opacity 0.15s ease;
  border-block-start: 1px solid var(--border-subtle);
  margin-block-start: 6px;
}

.nav-section-label:first-child {
  border-block-start: none;
  margin-block-start: 0;
  padding-block-start: 6px;
}

.nav-btn {
  width: 100%;
  text-align: start;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  position: relative;
}

.nav-btn .nav-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  fill: currentColor;
  opacity: 0.72;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.nav-btn .nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-btn:hover {
  background: rgba(15, 104, 82, 0.05);
  color: var(--text-primary);
  transform: translateX(1px);
}

[dir="rtl"] .nav-btn:hover {
  transform: translateX(-1px);
}

.nav-btn:hover .nav-icon {
  opacity: 1;
  fill: var(--asu-emerald-700);
}

.nav-btn[aria-current="page"] {
  background: rgba(15, 104, 82, 0.09);
  color: var(--asu-emerald-900);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--asu-emerald-700);
}

[dir="rtl"] .nav-btn[aria-current="page"] {
  box-shadow: inset -3px 0 0 var(--asu-emerald-700);
}

[data-theme="dark"] .nav-btn[aria-current="page"] {
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
  box-shadow: inset 3px 0 0 #10b981;
}

[dir="rtl"][data-theme="dark"] .nav-btn[aria-current="page"] {
  box-shadow: inset -3px 0 0 #10b981;
}

.nav-btn[aria-current="page"] .nav-icon {
  opacity: 1;
  fill: var(--asu-emerald-700);
}

[data-theme="dark"] .nav-btn[aria-current="page"] .nav-icon {
  fill: #34d399;
}

/* Sidebar Collapsed State */
.primary-nav-sidebar[data-collapsed="true"] {
  width: var(--sidebar-collapsed-width);
  min-width: var(--sidebar-collapsed-width);
}

.primary-nav-sidebar[data-collapsed="true"] .nav-section-label {
  display: none;
}

.primary-nav-sidebar[data-collapsed="true"] .nav-btn {
  justify-content: center;
  padding: 12px 0;
}

.primary-nav-sidebar[data-collapsed="true"] .nav-btn .nav-label {
  display: none;
}

.primary-nav-sidebar[data-collapsed="true"] .collapse-text {
  display: none;
}

/* Sidebar Footer / Collapse Trigger */
.sidebar-footer {
  padding: 12px 14px;
  border-block-start: 1px solid var(--border-color);
  background: var(--bg-subtle);
}

.btn-collapse {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
}

.btn-collapse:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.collapse-icon {
  font-size: 14px;
  transition: transform 0.25s ease;
}

.primary-nav-sidebar[data-collapsed="true"] .collapse-icon {
  transform: rotate(180deg);
}

/* Mobile Backdrop */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  z-index: 25;
}

/* ==========================================================================
   MAIN WORKSPACE & PAGE HEADER
   ========================================================================== */
.main-workspace {
  flex: 1;
  padding: 28px 36px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden;
}

/* Page Header & Context Bar */
.page-header {
  background: transparent;
  border: none;
  padding: 0 0 18px 0;
  margin-block-end: 24px;
  border-block-end: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
  color: var(--asu-emerald-700);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--slate-400);
  font-size: 11px;
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

.page-header-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 18px;
}

.page-header-text h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.page-header-text p {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 850px;
  line-height: 1.5;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Sub-Tab Navigation Bar Component */
.subtab-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 22px;
  border-block-end: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
  padding-block-end: 2px;
}

.subtab-bar::-webkit-scrollbar {
  display: none;
}

.subtab-btn {
  background: transparent;
  border: none;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  position: relative;
  white-space: nowrap;
  transition: var(--transition-fast);
  border-block-end: 2px solid transparent;
}

.subtab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.subtab-btn[aria-selected="true"],
.subtab-btn.active {
  color: var(--asu-emerald-800);
  font-weight: 700;
  border-block-end-color: var(--asu-emerald-700);
}

[data-theme="dark"] .subtab-btn[aria-selected="true"],
[data-theme="dark"] .subtab-btn.active {
  color: #6ee7b7;
  border-block-end-color: #10b981;
}

/* ==========================================================================
   KPI CARDS & SUMMARY WIDGETS
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-block-end: 26px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-block-end: 12px;
}

.kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-block-start: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* KPI Accent Line */
.kpi-card::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  height: 3px;
  background: var(--slate-300);
}

.kpi-card[data-variant="primary"]::before { background: var(--asu-emerald-700); }
.kpi-card[data-variant="warning"]::before { background: var(--asu-gold-500); }
.kpi-card[data-variant="danger"]::before  { background: #ef4444; }
.kpi-card[data-variant="info"]::before    { background: #0284c7; }
.kpi-card[data-variant="success"]::before { background: #10b981; }

/* ==========================================================================
   PANEL CARDS & CONTAINERS
   ========================================================================== */
.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-block-end: 22px;
  box-shadow: var(--shadow-xs);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-block-end: 1px solid var(--border-color);
  padding-block-end: 14px;
  margin-block-end: 18px;
}

.panel-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-header-title h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.panel-header-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-block-start: 2px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

/* ==========================================================================
   DATA TABLES (Sticky Headers, Responsive, Hover Rows)
   ========================================================================== */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: start;
}

th, td {
  padding: 11px 14px;
  border-block-end: 1px solid var(--border-color);
  vertical-align: middle;
}

th {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

tr:last-child td {
  border-block-end: none;
}

tbody tr {
  transition: background-color 0.1s ease;
}

tbody tr:nth-child(even) td {
  background-color: rgba(15, 23, 42, 0.015);
}

[data-theme="dark"] tbody tr:nth-child(even) td {
  background-color: rgba(255, 255, 255, 0.015);
}

tbody tr:hover td {
  background-color: var(--bg-subtle);
}

.table-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Table empty state */
.table-empty-row td {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
}

/* ==========================================================================
   STATUS BADGES & PILLS
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.25;
}

.badge-pill {
  border-radius: var(--radius-full);
  padding: 3px 10px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

.badge-success {
  background: var(--status-success-bg);
  color: var(--status-success-text);
  border: 1px solid var(--status-success-border);
}

.badge-warning {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
  border: 1px solid var(--status-warning-border);
}

.badge-danger {
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
  border: 1px solid var(--status-danger-border);
}

.badge-info {
  background: var(--status-info-bg);
  color: var(--status-info-text);
  border: 1px solid var(--status-info-border);
}

.badge-neutral {
  background: var(--status-neutral-bg);
  color: var(--status-neutral-text);
  border: 1px solid var(--status-neutral-border);
}

.badge-policy {
  background: var(--asu-gold-100);
  color: var(--asu-gold-700);
  border: 1px solid var(--asu-gold-600);
}

/* ==========================================================================
   BUTTONS & FORM CONTROLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-normal);
  line-height: 1.3;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--asu-emerald-800);
  color: #ffffff;
  border-color: var(--asu-emerald-900);
  box-shadow: 0 1px 2px rgba(11, 79, 62, 0.2);
}

.btn-primary:hover {
  background: var(--asu-emerald-900);
  box-shadow: 0 2px 4px rgba(11, 79, 62, 0.3);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--slate-400);
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
  border-color: #b91c1c;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-success {
  background: #16a34a;
  color: #ffffff;
}

.btn-success:hover {
  background: #15803d;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-subtle);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 11px 20px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

/* Inputs & Form Elements */
.input-control, .select-control, textarea.input-control {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13.5px;
  transition: var(--transition-normal);
  width: 100%;
}

.input-control:focus, .select-control:focus, textarea.input-control:focus {
  border-color: var(--asu-emerald-700);
  box-shadow: 0 0 0 3px rgba(15, 104, 82, 0.15);
  outline: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-block-end: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-field .field-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-start: 14px;
}

/* ==========================================================================
   ALERTS & NOTICES
   ========================================================================== */
.alert-banner {
  padding: 13px 18px;
  border-radius: var(--radius-md);
  margin-block-end: 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-inline-start: 4px solid currentColor;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-success {
  background: var(--status-success-bg);
  color: var(--status-success-text);
  border-color: var(--status-success-border);
}

.alert-danger {
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
  border-color: var(--status-danger-border);
}

.alert-warning {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
  border-color: var(--status-warning-border);
}

.alert-info {
  background: var(--status-info-bg);
  color: var(--status-info-text);
  border-color: var(--status-info-border);
}

/* ==========================================================================
   STEPPER & CAPACITY PROGRESS BARS
   ========================================================================== */
.stepper-horizontal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin-block: 16px 20px;
  padding-inline: 10px;
}

.stepper-horizontal::before {
  content: '';
  position: absolute;
  top: 14px;
  inset-inline: 40px;
  height: 2px;
  background: var(--border-color);
  z-index: 1;
}

.step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  transition: var(--transition-normal);
}

.step-node.completed .step-circle {
  background: var(--asu-emerald-800);
  border-color: var(--asu-emerald-800);
  color: #ffffff;
}

.step-node.active .step-circle {
  background: var(--asu-gold-500);
  border-color: var(--asu-gold-600);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

.step-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  max-width: 90px;
}

.step-node.active .step-label {
  color: var(--text-primary);
  font-weight: 700;
}

/* Concurrency & Seat Capacity Progress Bar */
.capacity-meter-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.capacity-meter-bar {
  height: 8px;
  background: var(--slate-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.capacity-meter-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.capacity-meter-fill[data-state="available"] { background: #10b981; }
.capacity-meter-fill[data-state="warning"]   { background: #f59e0b; }
.capacity-meter-fill[data-state="full"]      { background: #ef4444; }

/* Progress Bar for Degree Audit & Metrics */
.progress-bar-container {
  height: 10px;
  background: var(--slate-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-block: 8px 12px;
}

[data-theme="dark"] .progress-bar-container {
  background: var(--slate-800);
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--asu-emerald-800), var(--asu-emerald-600));
  transition: width 0.4s ease;
}

/* Risk Factor Pills & Audit Requirement Items */
.risk-factor-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
  border: 1px solid var(--status-danger-border);
  margin-inline-end: 4px;
  margin-block-end: 4px;
}

.audit-requirement-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  margin-block-end: 8px;
  box-shadow: var(--shadow-xs);
}

.audit-check-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.audit-check-icon.satisfied { color: #16a34a; }
.audit-check-icon.pending   { color: #dc2626; }

/* Live Status Floating Toast */
#live-status-region {
  position: sticky;
  top: calc(var(--header-height) + 10px);
  z-index: 100;
  margin-block-end: 16px;
}

#live-status-region .alert-banner {
  box-shadow: var(--shadow-lg);
  animation: toast-slide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@keyframes toast-slide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  background: transparent;
  max-width: 580px;
  width: 92%;
  box-shadow: var(--shadow-xl);
}

.modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
}

.modal-box {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 22px;
  background: var(--bg-subtle);
  border-block-end: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close:hover {
  color: var(--text-primary);
  background: var(--bg-muted);
}

.modal-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 22px;
  background: var(--bg-subtle);
  border-block-start: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   EMPTY STATES & SKELETONS
   ========================================================================== */
.empty-state-box {
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  margin-block: 16px;
}

.empty-state-icon {
  font-size: 36px;
  opacity: 0.6;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.empty-state-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0;
}

/* Skeleton Loading Shimmer */
.skeleton-box {
  background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--bg-muted) 50%, var(--bg-subtle) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.card-section-title {
  font-size: 15px;
  font-weight: 700;
  margin-block-end: 14px;
  padding-block-end: 6px;
  border-block-end: 2px solid var(--asu-emerald-800);
  color: var(--asu-emerald-800);
}

[data-theme="dark"] .card-section-title {
  border-block-end-color: var(--asu-gold-500);
  color: var(--asu-gold-500);
}

.mono-code {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ==========================================================================
   PRESTIGIOUS UNIVERSITY PORTAL (OXFORD / HARVARD STYLE)
   Ain Shams University & ForeSec Hardened Design System
   ========================================================================== */

/* Official Circular ASU Seal */
.asu-seal-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.asu-seal-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--asu-gold-500);
  box-shadow: 0 2px 10px rgba(197, 155, 39, 0.3);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.asu-seal-img:hover {
  transform: scale(1.06);
}

/* ForeSec Pill Badge in Top Governance Strip */
.foresec-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-full);
  transition: background-color 0.2s ease;
}

.foresec-pill-badge:hover {
  background: rgba(255, 255, 255, 0.2);
}

.foresec-pill-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #e2e8f0;
}

.foresec-pill-logo {
  height: 16px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* Sidebar ForeSec Partner Lockup (Dark Navy Brand Identity - matching official ForeSec styling) */
.sidebar-foresec-footer {
  padding: 12px 14px;
  border-block-start: 1px solid #1e293b;
  background: #020617 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  direction: ltr;
}

.sidebar-foresec-footer .foresec-powered {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.01em;
  text-transform: none;
  white-space: nowrap;
}

.foresec-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.foresec-logo-link:hover {
  opacity: 0.88;
  transform: scale(1.03);
}

.foresec-footer-logo {
  height: 22px;
  max-width: 120px;
  object-fit: contain;
  vertical-align: middle;
}

.primary-nav-sidebar[data-collapsed="true"] .sidebar-foresec-footer {
  display: none;
}

/* Prestigious University Portal Hero Header */
.asu-prestige-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-block-end: 26px;
  background: linear-gradient(135deg, #ffffff 0%, #fbf9f2 55%, #f7f2e7 100%);
  border: 1px solid rgba(197, 155, 39, 0.35);
  box-shadow: 0 4px 20px rgba(15, 34, 55, 0.04);
  padding: 26px 32px;
  display: flex;
  align-items: stretch;
}

[data-theme="dark"] .asu-prestige-hero {
  background: linear-gradient(135deg, #101726 0%, #0d1e19 100%);
  border-color: rgba(197, 155, 39, 0.3);
}

.asu-hero-watermark-wrap {
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  bottom: 0;
  width: 42%;
  overflow: hidden;
  pointer-events: none;
}

.asu-hero-watermark-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.16;
  filter: grayscale(30%) contrast(110%);
  mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}

html[dir="ltr"] .asu-hero-watermark-img {
  mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}

.asu-prestige-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.asu-prestige-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.asu-prestige-title-group {
  max-width: 780px;
}

.asu-prestige-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #8a6004;
  background: rgba(197, 155, 39, 0.12);
  border: 1px solid rgba(197, 155, 39, 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-block-end: 8px;
  letter-spacing: 0.02em;
}

.badge-gold-star {
  color: var(--asu-gold-500);
  font-size: 12px;
}

.asu-prestige-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--asu-emerald-850);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .asu-prestige-title {
  color: #f1f5f9;
}

.asu-prestige-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 6px 0 0;
  line-height: 1.5;
  max-width: 740px;
}

.asu-hero-partner-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(197, 155, 39, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .asu-hero-partner-lockup {
  background: rgba(16, 23, 38, 0.75);
}

.hero-partner-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.hero-foresec-link {
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.hero-foresec-link:hover {
  transform: scale(1.03);
}

.hero-foresec-logo {
  height: 28px;
  max-width: 130px;
  object-fit: contain;
}

[data-theme="dark"] .hero-foresec-logo {
  filter: brightness(0) invert(1);
}

.asu-prestige-stat-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-start: 16px;
  flex-wrap: wrap;
}

.prestige-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--asu-emerald-850);
  background: rgba(8, 56, 44, 0.06);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(8, 56, 44, 0.08);
}

[data-theme="dark"] .prestige-stat-item {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--asu-gold-500);
}

/* Academic Chips & Risk Tags (Eliminates Awkward Oval Blobs) */
.academic-chip {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
}

.academic-chip.chip-danger {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.academic-chip.chip-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.academic-chip.chip-info {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

[data-theme="dark"] .academic-chip.chip-danger {
  background: rgba(153, 27, 27, 0.25);
  color: #fca5a5;
  border-color: rgba(153, 27, 27, 0.4);
}

/* Institutional Bulletins */
.prestige-bulletin {
  display: flex;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15, 34, 55, 0.02);
  transition: transform 0.15s ease;
}

.prestige-bulletin:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.bulletin-ribbon {
  width: 4px;
  background: var(--asu-gold-500);
  flex-shrink: 0;
}

.bulletin-body {
  padding: 10px 14px;
  flex: 1;
}

.bulletin-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulletin-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.bulletin-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 3px 0 0;
  line-height: 1.45;
}

/* Immutable Audit RBAC Restricted Guidance Card */
.audit-restricted-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-inline-start: 4px solid var(--asu-gold-500);
  border-radius: 14px;
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-block-end: 24px;
  box-shadow: 0 4px 16px rgba(15, 34, 55, 0.03);
}

.audit-restricted-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  background: var(--asu-gold-100);
  color: var(--asu-gold-700);
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--status-warning-border);
}

.audit-restricted-content {
  flex: 1;
}

.audit-restricted-content h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.audit-restricted-content p {
  margin: 6px 0 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 760px;
}

.audit-restricted-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Modern Prestigious Layout Sizing */
.main-workspace {
  padding: 26px 34px;
  max-width: 1600px;
}

.panel-card {
  padding: 24px 28px;
  margin-block-end: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(15, 34, 55, 0.03);
  border: 1px solid var(--border-color);
}

.panel-header {
  margin-block-end: 18px;
  padding-block-end: 14px;
}

.kpi-grid {
  gap: 18px;
  margin-block-end: 24px;
}

.kpi-card {
  padding: 20px 22px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 34, 55, 0.03);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  position: relative;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--asu-emerald-850);
}

[data-theme="dark"] .kpi-value {
  color: #f1f5f9;
}

.grid-2 {
  gap: 22px;
}

.grid-3 {
  gap: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 16px;
  word-wrap: break-word;
}

th {
  background: #f8faf9;
  color: var(--asu-emerald-850);
  font-weight: 700;
}

[data-theme="dark"] th {
  background: #172136;
  color: #e2e8f0;
}

.input-control, .select-control, textarea.input-control {
  padding: 8px 12px;
  border-radius: 8px;
}

.btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Tablets & Mobile)
   ========================================================================== */
@media (max-width: 1200px) {
  .brand-titles p {
    display: none;
  }
  .header-search-wrap {
    max-width: 320px;
  }
  .select-control-sm {
    max-width: 150px;
  }
}

@media (max-width: 1024px) {
  .institutional-header {
    grid-template-columns: auto 1fr;
    gap: 14px;
  }
  .header-center-group {
    display: none;
  }
  .header-controls {
    justify-content: flex-end;
  }
}

@media (max-width: 860px) {
  .btn-sidebar-toggle {
    display: inline-flex;
  }

  .primary-nav-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    height: 100vh;
    z-index: 100;
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }

  html[dir="rtl"] .primary-nav-sidebar {
    transform: translateX(100%);
  }
  html[dir="ltr"] .primary-nav-sidebar {
    transform: translateX(-100%);
  }

  .primary-nav-sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .sidebar-backdrop.mobile-open {
    display: block;
  }

  .main-workspace {
    padding: 16px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .institutional-header {
    padding-inline: 14px;
    height: 64px;
  }
  .brand-titles h1 {
    font-size: 14px;
  }
  .asu-seal-wrap {
    width: 38px;
    height: 38px;
  }
  .persona-select-label {
    display: none;
  }
  .user-profile-name {
    display: none;
  }
  .btn-header-pill span {
    display: none;
  }
  .header-divider {
    display: none;
  }
  .gov-top-strip {
    font-size: 11px;
    padding-inline: 14px;
  }
  .foresec-pill-badge {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   AUTHENTICATED SSO LOGIN PORTAL (FULL PAGE)
   ========================================================================== */
.login-page-wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: #061c16;
}

.login-backdrop-image {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.login-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(1.15) brightness(0.85);
  transform: scale(1.02);
  transition: transform 10s ease;
}

.login-backdrop-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center 35%, rgba(8, 56, 44, 0.82) 0%, rgba(5, 26, 20, 0.94) 80%, rgba(3, 16, 12, 0.98) 100%);
  backdrop-filter: blur(2px);
}

.login-top-bar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(4, 22, 17, 0.65);
  border-block-end: 1px solid rgba(197, 155, 39, 0.25);
  backdrop-filter: blur(8px);
}

.login-top-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-top-seal {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #c59b27;
  object-fit: cover;
  box-shadow: 0 0 10px rgba(197, 155, 39, 0.35);
}

.login-top-titles {
  display: flex;
  flex-direction: column;
}

.login-top-title-ar {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.login-top-title-en {
  font-size: 11.5px;
  color: #c59b27;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.login-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-ctrl-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.login-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #c59b27;
  color: #fff;
}

.login-card-container {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.login-card {
  width: 100%;
  max-width: 490px;
  background: var(--bg-surface);
  border: 1.5px solid rgba(197, 155, 39, 0.4);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55), 0 0 30px rgba(197, 155, 39, 0.15);
  padding: 34px 30px;
  text-align: center;
  animation: login-card-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes login-card-pop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-header-group {
  margin-block-end: 22px;
}

.login-seal-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 155, 39, 0.16) 0%, rgba(8, 56, 44, 0.06) 100%);
  border: 2px solid #c59b27;
  box-shadow: 0 4px 18px rgba(197, 155, 39, 0.35);
  margin-block-end: 12px;
}

.login-seal-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
}

.login-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
}

.login-card-english {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-accent, #c59b27);
  letter-spacing: 0.05em;
  margin: 0 0 8px 0;
  text-transform: uppercase;
}

.login-gold-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #c59b27, transparent);
  margin: 6px auto 10px auto;
  border-radius: 2px;
}

.login-card-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.login-form {
  text-align: start;
}

.login-form .form-field {
  margin-block-end: 14px;
}

.login-form .form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-block-end: 5px;
}

.login-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  inset-inline-start: 12px;
  font-size: 15px;
  opacity: 0.6;
  pointer-events: none;
}

.login-input-control {
  width: 100%;
  padding: 10px 14px;
  padding-inline-start: 36px;
  padding-inline-end: 36px;
  font-size: 13.5px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input-control:focus {
  border-color: #08382c;
  outline: none;
  box-shadow: 0 0 0 3px rgba(8, 56, 44, 0.15);
}

[data-theme="dark"] .login-input-control:focus {
  border-color: #c59b27;
  box-shadow: 0 0 0 3px rgba(197, 155, 39, 0.2);
}

.btn-toggle-password {
  position: absolute;
  inset-inline-end: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 15px;
  opacity: 0.6;
  padding: 4px;
}

.btn-toggle-password:hover {
  opacity: 1;
}

.btn-login-submit {
  width: 100%;
  padding: 11px 18px;
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #08382c 0%, #0d5c48 100%);
  border: 1px solid #c59b27;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(8, 56, 44, 0.35);
  margin-block-start: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(8, 56, 44, 0.45);
  background: linear-gradient(135deg, #0a4637 0%, #106f57 100%);
}

.btn-login-submit:active {
  transform: translateY(0);
}

.login-quick-creds {
  margin-block-start: 18px;
  padding-block-start: 14px;
  border-block-start: 1px dashed var(--border-color);
  text-align: start;
}

.quick-creds-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-block-end: 8px;
}

.quick-creds-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.btn-quick-fill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 6px 8px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-primary);
  cursor: pointer;
  text-align: start;
  transition: all 0.15s ease;
}

.btn-quick-fill:hover {
  border-color: #c59b27;
  background: rgba(197, 155, 39, 0.08);
}

.btn-quick-fill.active-sa {
  grid-column: span 2;
  border-color: #c59b27;
  background: rgba(197, 155, 39, 0.12);
  border-width: 1.5px;
}

.btn-quick-fill code {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-block-start: 2px;
}

.guest-bypass-row {
  margin-block-start: 12px;
  text-align: center;
}

.link-guest-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 8px;
}

.link-guest-btn:hover {
  color: #08382c;
  font-weight: 600;
}

[data-theme="dark"] .link-guest-btn:hover {
  color: #c59b27;
}

.login-card-footer {
  margin-block-start: 18px;
  text-align: center;
}

.login-foresec-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: var(--bg-subtle);
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.login-foresec-logo {
  height: 18px;
  width: auto;
  vertical-align: middle;
}

.foresec-micro-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.login-security-notice {
  font-size: 11px;
  color: var(--text-muted);
  margin: 8px 0 0 0;
  line-height: 1.4;
}

