/* =============================================================================
   Admin Workspace Professional Design System & Responsive Framework
   Enterprise-grade styling for Desktop & Mobile devices.
   Built for high speed, silky smooth interaction, and strict print isolation.
   ============================================================================= */

@media screen {
  :root {
    /* Color Palette - University & Engineering Royal Theme */
    --brand: #0c2b44;
    --brand-dark: #071c2d;
    --brand-2: #103c5c;
    --brand-3: #176696;
    --brand-light: #257bb5;
    --brand-soft: #f0f6fa;
    --brand-border: #d2e4f1;

    /* Accents & States */
    --accent: #059669;
    --accent-dark: #047857;
    --accent-teal: #0d9488;
    --accent-soft: #ecfdf5;
    --accent-border: #a7f3d0;

    --amber: #d97706;
    --amber-dark: #b45309;
    --amber-soft: #fffbeb;
    --amber-border: #fde68a;

    --rose: #dc2626;
    --rose-dark: #b91c1c;
    --rose-soft: #fef2f2;
    --rose-border: #fecaca;

    --purple: #7c3aed;
    --purple-soft: #f5f3ff;
    --purple-border: #ddd6fe;

    --blue: #0284c7;
    --blue-soft: #e0f2fe;
    --blue-border: #bae6fd;

    /* Neutrals & Surfaces */
    --ink: #0f172a;
    --ink-muted: #475569;
    --ink-light: #64748b;
    --ink-faint: #94a3b8;
    --line: #e2e8f0;
    --line-subtle: #f1f5f9;
    --bg: #f8fafc;
    --card: #ffffff;

    /* Elevations & Layered Shadows */
    --shadow-xs: 0 1px 2px rgba(12, 43, 68, 0.04);
    --shadow-sm: 0 2px 6px rgba(12, 43, 68, 0.05), 0 1px 2px rgba(12, 43, 68, 0.03);
    --shadow: 0 4px 20px -2px rgba(12, 43, 68, 0.07), 0 2px 6px -1px rgba(12, 43, 68, 0.03);
    --shadow-hover: 0 12px 30px -4px rgba(12, 43, 68, 0.12), 0 4px 10px -2px rgba(12, 43, 68, 0.05);
    --shadow-lg: 0 24px 50px -10px rgba(12, 43, 68, 0.18), 0 10px 20px -4px rgba(12, 43, 68, 0.08);

    /* Radii */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-pill: 9999px;

    /* Animation Timing */
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.16s var(--ease-spring);
    --transition-base: 0.24s var(--ease-spring);
    --transition-smooth: 0.36s var(--ease-spring);
  }

  /* ---------------------------------------------------------------------------
     1. Core Reset, Base Elements & Typography
     --------------------------------------------------------------------------- */
  html {
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
  }
  body {
    background: var(--bg) !important;
    color: var(--ink);
    font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, Tahoma, Arial, sans-serif !important;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  *, *::before, *::after {
    box-sizing: border-box;
  }
  [hidden] { display: none !important; }
  bdi { unicode-bidi: isolate; }
  .aw-icon { width:1.15em!important; height:1.15em!important; max-width:24px!important; max-height:24px!important; min-width:14px; min-height:14px; display:block; flex:0 0 auto; }
  .aw-icon-text { display:inline-flex; align-items:center; gap:8px; }
  ::selection { background: #cce9e5; color: #0c3d3a; }

  /* Accessible Skip Link */
  .aw-skip {
    position: fixed;
    inset-block-start: 12px;
    inset-inline-start: 16px;
    z-index: 9999;
    padding: 12px 22px;
    background: #ffffff;
    color: var(--brand);
    border: 2px solid var(--brand-3);
    border-radius: var(--radius-sm);
    font-weight: 800;
    box-shadow: var(--shadow-lg);
    transform: translateY(-160%);
    transition: transform var(--transition-fast);
    text-decoration: none;
  }
  .aw-skip:focus { transform: none; outline: 3px solid var(--amber); }

  /* Global Interactive Focus Rings */
  a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 3px solid var(--amber);
    outline-offset: 2px;
  }

  /* Containers & Layout Wrappers */
  .wrap, .container, .tp-shell {
    width: 100%;
    max-width: 1420px;
    margin-inline: auto;
    padding-inline: clamp(14px, 3.2vw, 32px);
    overflow-x: clip;
  }

  /* Universal Cards and Panels */
  .card, .panel, .tp-card {
    background: var(--card);
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    min-width: 0;
    transition: box-shadow var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
  }
  .card:hover, .panel:hover, .tp-card:hover {
    border-color: #cbd5e1 !important;
  }

  /* ---------------------------------------------------------------------------
     2. App Masthead & Brand Header
     --------------------------------------------------------------------------- */
  .aw-masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 14px 0 22px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--line);
  }
  .aw-identity {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 0;
  }
  .aw-logo {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-3));
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
    box-shadow: 0 6px 16px rgba(12, 43, 68, 0.22);
  }
  .aw-identity strong {
    display: block;
    color: var(--brand);
    font-size: 15.5px;
    font-weight: 900;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .aw-identity small {
    color: var(--ink-muted);
    font-size: 12px;
    font-weight: 600;
  }
  .aw-breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-muted);
    margin-top: 2px;
  }
  .aw-breadcrumbs a {
    color: var(--ink-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
  }
  .aw-breadcrumbs a:hover {
    color: var(--brand-3);
  }
  .aw-breadcrumbs-sep {
    color: var(--ink-faint);
    font-size: 10px;
  }
  .aw-breadcrumbs-current {
    color: var(--accent-dark);
    font-weight: 800;
  }
  .aw-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--brand-3);
    background: #eef4f8;
    padding: 2px 9px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--brand-border);
  }
  .aw-date-badge .aw-icon {
    width: 13px !important;
    height: 13px !important;
  }
  .aw-account {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    flex-wrap: wrap;
  }
  .aw-dept-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    border: 1px solid var(--accent-border);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 13px;
    box-shadow: var(--shadow-xs);
  }
  .aw-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--brand-soft);
    color: var(--brand);
    border: 1px solid var(--brand-border);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 13px;
    box-shadow: var(--shadow-xs);
  }
  .aw-account a.aw-logout, .btn.danger-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--rose-dark);
    background: var(--rose-soft);
    border: 1px solid var(--rose-border);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 800;
    min-height: 40px;
    transition: all var(--transition-fast);
  }
  .aw-account a.aw-logout:hover, .btn.danger-link:hover {
    background: var(--rose);
    color: #ffffff;
    border-color: var(--rose);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.22);
  }

  /* ---------------------------------------------------------------------------
     3. Royal Hero Banner (`.top`, `.topbar`)
     --------------------------------------------------------------------------- */
  .top, .topbar {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 100% 0%, rgba(13, 148, 136, 0.24) 0%, transparent 45%),
                radial-gradient(circle at 0% 100%, rgba(2, 132, 199, 0.18) 0%, transparent 45%),
                linear-gradient(135deg, #071c2d 0%, #0c2b44 55%, #103c5c 100%) !important;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 16px 42px rgba(12, 43, 68, 0.2) !important;
    padding: 28px 32px;
    margin-bottom: 24px;
  }
  .top::after, .topbar::after {
    content: "";
    position: absolute;
    inset: auto -60px -90px auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
  }
  .top::before, .topbar::before {
    content: "";
    position: absolute;
    inset: -60px auto auto -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(13, 148, 136, 0.14);
    pointer-events: none;
  }
  .top > *, .topbar > * { position: relative; z-index: 1; }
  .top .meta, .topbar .meta { color: #e7f2f8; }
  .top h1, .topbar h1 { margin: 4px 0 8px; font-size: clamp(22px, 2.8vw, 30px); font-weight: 900; letter-spacing: -0.02em; }
  .top .aw-welcome { margin: 0; font-size: 13.5px; color: #9fd3f0; font-weight: 700; }
  .top .aw-intro { margin: 0 0 18px; color: #dbeef7; font-size: 14px; font-weight: 400; max-width: 640px; line-height: 1.6; }

  /* ---------------------------------------------------------------------------
     4. Form Controls & Inputs
     --------------------------------------------------------------------------- */
  input, select, textarea {
    min-width: 0;
    max-width: 100%;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    min-height: 44px;
    box-shadow: var(--shadow-xs);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  }
  input::placeholder, textarea::placeholder { color: var(--ink-faint); }
  input:hover, select:hover, textarea:hover { border-color: #94a3b8; }
  input:focus, select:focus, textarea:focus {
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
    outline: none;
    background-color: #ffffff;
  }
  input[type="checkbox"], input[type="radio"] {
    min-height: 0;
    width: 20px;
    height: 20px;
    accent-color: var(--accent-teal);
    flex-shrink: 0;
    cursor: pointer;
  }

  /* ---------------------------------------------------------------------------
     5. Buttons & Action Links
     --------------------------------------------------------------------------- */
  .btn, .tp-btn, .save, .tabbtn, .row-actions a, .btn-light, .btn-blue, .btn-green, .btn-red {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 9px 18px;
    border-radius: var(--radius-sm) !important;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.4;
    text-decoration: none;
    touch-action: manipulation;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
  }
  .btn:hover, .tp-btn:hover, .btn-light:hover, .btn-blue:hover, .btn-green:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(12, 43, 68, 0.12) !important;
  }
  .btn:active, .tp-btn:active, .save:active {
    transform: translateY(0.5px);
  }

  /* Button Variations */
  .btn.base, .btn-light {
    background: #ffffff !important;
    color: var(--brand) !important;
    border-color: #cbd5e1 !important;
    box-shadow: var(--shadow-xs) !important;
  }
  .btn.base:hover, .btn-light:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
  }
  .btn.primary, .btn-blue, .btn.students, .btn.courses, .btn.search, .btn.reg, .btn.withdraw, .btn.examReview {
    background: linear-gradient(135deg, var(--brand), var(--brand-3)) !important;
    color: #ffffff !important;
    border-color: var(--brand) !important;
  }
  .btn.teal, .btn-green, .save, .btn.stats, .btn.indicators, .btn.courseResults {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-teal)) !important;
    color: #ffffff !important;
    border-color: var(--accent-dark) !important;
  }
  .btn.secondary, .tp-btn.secondary, .btn-outline {
    background: #ffffff;
    color: var(--brand);
    border-color: #cbd5e1;
  }
  .btn.danger, .tp-btn.danger, .btn-red {
    background: var(--rose-soft) !important;
    color: var(--rose-dark) !important;
    border-color: var(--rose-border) !important;
  }
  .btn.danger:hover, .tp-btn.danger:hover, .btn-red:hover {
    background: var(--rose) !important;
    color: #ffffff !important;
    border-color: var(--rose) !important;
  }
  .btn.small, .tp-btn.small, .mini {
    min-height: 38px;
    padding: 6px 13px;
    font-size: 12.5px;
    border-radius: var(--radius-xs) !important;
  }
  .btn.word {
    background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
    color: #ffffff !important;
  }
  .btn.word-ar {
    background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
    color: #ffffff !important;
  }

  /* ---------------------------------------------------------------------------
     6. Badges, Pills & Status Chips
     --------------------------------------------------------------------------- */
  .badge, .pill, .tp-badge, .status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    white-space: nowrap;
  }
  .badge-teal, .pill-teal, .approved, .badge.ok, .badge.open {
    background: var(--accent-soft);
    color: var(--accent-dark);
    border: 1px solid var(--accent-border);
  }
  .badge-blue, .pill-blue {
    background: var(--blue-soft);
    color: #0369a1;
    border: 1px solid var(--blue-border);
  }
  .badge-amber, .pill-amber, .pending, .badge.warn {
    background: var(--amber-soft);
    color: var(--amber-dark);
    border: 1px solid var(--amber-border);
  }
  .badge-rose, .pill-rose, .rejected, .badge.closed {
    background: var(--rose-soft);
    color: var(--rose-dark);
    border: 1px solid var(--rose-border);
  }
  .cancelled {
    background: #f1f5f9;
    color: var(--ink-muted);
    border: 1px solid var(--line);
  }

  /* ---------------------------------------------------------------------------
     7. Alerts, Flash Messages & Notifications
     --------------------------------------------------------------------------- */
  .tp-message, .alert, .flash, .ok, .err, .warn, .info {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
  }
  .tp-message, .alert-ok, .flash.ok, .ok {
    background: var(--accent-soft);
    color: #065f46;
    border-color: var(--accent-border);
    border-inline-start: 4px solid var(--accent);
  }
  .tp-message.error, .alert-err, .flash.err, .err {
    background: var(--rose-soft);
    color: #991b1b;
    border-color: var(--rose-border);
    border-inline-start: 4px solid var(--rose);
  }
  .alert-warn, .warn {
    background: var(--amber-soft);
    color: #92400e;
    border-color: var(--amber-border);
    border-inline-start: 4px solid var(--amber);
  }
  .info {
    background: var(--blue-soft);
    color: #075985;
    border-color: var(--blue-border);
    border-inline-start: 4px solid var(--blue);
  }

  /* ---------------------------------------------------------------------------
     8. Data Tables & Advanced Scrolling System
     --------------------------------------------------------------------------- */
  .table-wrap, .tablewrap, .table-responsive, .aw-table-scroll {
    position: relative;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    scrollbar-color: #9eb6c8 #edf3f7;
    scrollbar-width: thin;
  }
  table, .tp-table, .table, .data, .routes {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: right;
    font-size: 13.5px;
  }
  thead th, .tp-table thead th, .table th, .data th, .routes th {
    position: sticky;
    top: 0;
    background: #f1f5f9 !important;
    color: var(--brand) !important;
    font-weight: 800;
    padding: 13px 15px;
    border-bottom: 2px solid var(--line);
    white-space: nowrap;
    z-index: 2;
  }
  tbody td, .tp-table td, .table td, .data td, .routes td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    vertical-align: middle;
  }
  tbody tr {
    transition: background var(--transition-fast);
  }
  tbody tr:nth-child(even) { background: #fbfdff; }
  tbody tr:hover { background: #f0f7fd !important; }

  /* Sticky First Column for Context Preservation during Horizontal Scroll */
  .aw-sticky-col, td:first-child[data-sticky="true"] {
    position: sticky;
    right: 0;
    background: inherit;
    z-index: 1;
    box-shadow: -4px 0 8px -2px rgba(12, 43, 68, 0.08);
  }
  thead th.aw-sticky-col, thead th:first-child[data-sticky="true"] {
    z-index: 3;
    background: #f1f5f9 !important;
  }

  /* Table Hint & Scroll Shadow System */
  .aw-table-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 16px;
    color: var(--ink-muted);
    font-size: 12.5px;
    font-weight: 700;
    background: #eef4f8;
    border-radius: var(--radius) var(--radius) 0 0;
    border: 1px solid var(--line);
    border-bottom: 0;
  }
  .aw-table-hint[hidden] { display: none !important; }

  /* Dynamic Table Scroll Shadows (applied via JS) */
  .aw-table-scroll.has-scroll-left::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 20px;
    background: linear-gradient(to right, rgba(12, 43, 68, 0.08), transparent);
    pointer-events: none;
    z-index: 2;
  }
  .aw-table-scroll.has-scroll-right::after {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 20px;
    background: linear-gradient(to left, rgba(12, 43, 68, 0.08), transparent);
    pointer-events: none;
    z-index: 2;
  }

  /* ---------------------------------------------------------------------------
     9. Instant Arabic Search / Filter Bar
     --------------------------------------------------------------------------- */
  .aw-filter {
    display: block;
    margin-bottom: 16px;
    position: relative;
  }
  .aw-filter-inner {
    display: flex;
    align-items: center;
    position: relative;
  }
  .aw-filter input {
    width: 100%;
    padding-inline-start: 40px;
    padding-inline-end: 40px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: 12px;
  }
  .aw-filter input:focus {
    background: #ffffff;
    border-color: var(--brand-3);
    box-shadow: 0 0 0 3px rgba(23, 102, 150, 0.16);
  }
  .aw-filter-icon {
    position: absolute;
    inset-inline-start: 14px;
    color: var(--ink-light);
    font-size: 16px;
    pointer-events: none;
  }
  .aw-filter-clear {
    position: absolute;
    inset-inline-end: 12px;
    background: #e2e8f0;
    border: none;
    color: var(--ink-muted);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 15px;
    display: none;
    place-items: center;
    line-height: 1;
    transition: all var(--transition-fast);
  }
  .aw-filter-clear:hover {
    background: var(--rose-soft);
    color: var(--rose-dark);
  }
  .aw-search-status {
    font-size: 13px;
    color: var(--ink-muted);
    margin: 8px 6px 0;
    font-weight: 700;
  }

  /* ---------------------------------------------------------------------------
     10. Admin Dashboard (`admin_home.php`) Specific Layout
     --------------------------------------------------------------------------- */
  .aw-dashboard {
    margin-block: 16px 48px;
  }
  .aw-dashboard .top {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
    gap: 26px;
    align-items: center;
  }
  .aw-term {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
  }
  .aw-term label {
    font-weight: 800;
    font-size: 14px;
    color: #e0eff8;
  }
  .aw-term select {
    flex: 1;
    min-width: 220px;
    background: #ffffff;
    color: var(--brand);
    font-weight: 800;
    border-radius: var(--radius-sm);
  }
  .aw-quicklinks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .aw-quicklinks .btn {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    min-height: 44px;
    padding: 8px 14px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 9px;
    text-align: start;
    border-radius: 12px !important;
    transition: all var(--transition-fast);
  }
  .aw-quicklinks .btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2) !important;
  }

  .aw-context {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    padding: 14px 10px;
    color: var(--ink-muted);
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px;
  }
  .aw-context strong { color: var(--brand); }

  /* Dashboard Grid */
  .aw-dashboard > .grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
  }
  .aw-departments {
    position: sticky;
    top: 20px;
    padding: 24px;
  }
  .aw-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
  }
  .aw-section-heading h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    color: var(--brand);
  }
  .aw-count {
    background: #e2e8f0;
    color: var(--brand);
    font-size: 12.5px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-variant-numeric: tabular-nums;
  }
  .aw-dept-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 60vh;
    overflow-y: auto;
    padding-inline-end: 4px;
  }
  .aw-dashboard .dept a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    border-radius: var(--radius-sm);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
  }
  .aw-dashboard .dept a:hover {
    background: #f1f5f9;
    color: var(--brand-3);
  }
  .aw-dashboard .dept a.active {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
    border-inline-start: 4px solid var(--accent);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.12);
  }

  /* Services Grid Cards */
  .aw-services-panel {
    padding: 26px;
  }
  .aw-dashboard .actionbar .left {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .aw-service-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    min-height: 112px;
    padding: 16px 20px;
    background: #ffffff !important;
    color: var(--brand) !important;
    border: 1.5px solid var(--line) !important;
    border-radius: var(--radius) !important;
    text-align: start;
    font-size: 15px;
    font-weight: 900;
    box-shadow: var(--shadow-xs) !important;
    transition: all var(--transition-fast) !important;
  }
  .aw-service-btn:hover {
    background: #f8fafc !important;
    border-color: var(--brand-3) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow) !important;
  }
  .aw-service-btn .aw-service-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
  }
  .aw-service-btn .aw-service-note {
    color: var(--ink-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
  }
  .aw-service-btn.smart-highlight {
    background: linear-gradient(135deg, #ffffff, #f0fdf4) !important;
    border-color: #86efac !important;
  }
  .aw-service-btn.smart-highlight:hover {
    border-color: var(--accent) !important;
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.18) !important;
  }

  /* ---------------------------------------------------------------------------
     11. Advanced Enterprise Dashboard Components (Modern & Organized)
     --------------------------------------------------------------------------- */
  @keyframes aw-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.85); }
  }
  .aw-pulse-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25);
    animation: aw-pulse 2s infinite ease-in-out;
  }

  /* Quick Overview KPI Ribbon */
  .aw-kpi-ribbon {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
  }
  .aw-kpi-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-fast);
    min-width: 0;
    width: 100%;
  }
  .aw-kpi-card:hover {
    border-color: var(--brand-3);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
  }
  .aw-kpi-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 20px;
    flex-shrink: 0;
  }
  .aw-kpi-icon .aw-icon { width:20px!important; height:20px!important; }
  .aw-kpi-content {
    min-width: 0;
    flex: 1;
  }
  .aw-kpi-label {
    font-size: 12px;
    color: var(--ink-muted);
    font-weight: 700;
    margin-bottom: 2px;
  }
  .aw-kpi-val {
    font-size: 15px;
    color: var(--brand);
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
    font-variant-numeric: tabular-nums;
  }

  /* Spotlight Command Search Bar */
  .aw-spotlight-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 2px solid var(--brand-border);
    border-radius: var(--radius);
    padding: 7px 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px -2px rgba(12, 43, 68, 0.06);
    transition: all var(--transition-fast);
  }
  .aw-spotlight-bar:focus-within {
    border-color: var(--brand-3);
    box-shadow: 0 6px 20px -2px rgba(23, 102, 150, 0.18), 0 0 0 3px rgba(23, 102, 150, 0.12);
  }
  .aw-spotlight-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand-3);
    flex-shrink: 0;
  }
  .aw-spotlight-icon .aw-icon {
    width: 17px !important;
    height: 17px !important;
  }
  .aw-spotlight-input {
    flex: 1;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 8px 4px !important;
    font-size: 14.5px !important;
    font-weight: 700;
    color: var(--ink);
    min-height: 38px !important;
  }
  .aw-spotlight-input:focus {
    outline: none !important;
  }
  .aw-spotlight-input::placeholder {
    color: var(--ink-faint);
    font-weight: 500;
  }
  .aw-spotlight-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
    color: var(--ink-muted);
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    user-select: none;
    line-height: 1.4;
  }
  .aw-spotlight-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--brand), var(--brand-3));
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
  }
  .aw-spotlight-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(12, 43, 68, 0.22);
  }
  .aw-spotlight-btn .aw-icon {
    width: 15px !important;
    height: 15px !important;
  }

  /* Quick Category Filter Tabs */
  .aw-category-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 5px;
    background: #f1f5f9;
    border-radius: 14px;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    scrollbar-width: none;
  }
  .aw-category-tabs::-webkit-scrollbar { display: none; }
  .aw-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    color: var(--ink-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
    touch-action: manipulation;
  }
  .aw-tab-btn:hover {
    color: var(--brand);
    background: rgba(255, 255, 255, 0.85);
  }
  .aw-tab-btn.active {
    color: #ffffff;
    background: var(--brand);
    box-shadow: 0 4px 12px rgba(12, 43, 68, 0.16);
  }
  .aw-tab-btn .aw-icon {
    width: 15px !important;
    height: 15px !important;
  }

  /* Categorized Services Grouping */
  .aw-category-group {
    margin-bottom: 26px;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
  }
  .aw-category-group:last-child {
    margin-bottom: 0;
  }
  .aw-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1.5px solid var(--line-subtle);
  }
  .aw-category-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 900;
    color: var(--brand);
    margin: 0;
  }
  .aw-category-title .aw-icon { width:17px!important; height:17px!important; color:var(--brand-3); }
  .aw-category-badge {
    font-size: 11px;
    padding: 2px 9px;
    border-radius: var(--radius-pill);
    background: var(--brand-soft);
    color: var(--brand-3);
    border: 1px solid var(--brand-border);
    font-weight: 800;
  }
  .aw-services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  /* Quick Student Search Box */
  .aw-quick-search-box {
    margin-bottom: 18px;
    background: linear-gradient(135deg, #f0f7fd 0%, #f8fafc 100%);
    border: 1.5px solid var(--brand-border);
    border-radius: var(--radius);
    padding: 12px 14px;
    box-shadow: var(--shadow-xs);
  }
  .aw-student-search-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
  }
  .aw-student-search-icon {
    position: absolute;
    inset-inline-start: 14px;
    color: var(--brand-3);
    pointer-events: none;
  }
  .aw-student-search-inner input[type="search"] {
    flex: 1;
    padding-inline-start: 42px;
    padding-inline-end: 14px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    min-height: 44px;
  }
  .aw-student-search-inner input[type="search"]:focus {
    border-color: var(--brand-3);
    box-shadow: 0 0 0 3px rgba(23, 102, 150, 0.16);
    background: #ffffff;
  }
  .aw-student-search-submit {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 9px 18px;
    background: linear-gradient(135deg, var(--brand), var(--brand-3));
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 800;
    font-size: 13.5px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 12px rgba(12, 43, 68, 0.16);
  }
  .aw-student-search-submit:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 18px rgba(12, 43, 68, 0.25);
  }
  .aw-student-search-submit .aw-icon {
    width: 16px !important;
    height: 16px !important;
  }

  /* Modern High-End Service Card */
  .aw-service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-fast);
    overflow: hidden;
  }
  .aw-service-card:hover {
    border-color: var(--brand-3);
    transform: translateY(-2.5px);
    box-shadow: var(--shadow-hover);
    background: #ffffff;
  }
  .aw-service-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block: 0;
    width: 4px;
    background: transparent;
    transition: background var(--transition-fast);
  }
  .aw-service-card:hover::before {
    background: var(--brand-3);
  }
  .aw-service-card.featured {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border-color: #86efac;
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.08);
  }
  .aw-service-card.featured:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 26px rgba(5, 150, 105, 0.18);
  }
  .aw-service-card.featured::before {
    background: var(--accent);
  }
  .aw-service-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    text-decoration: none;
    color: var(--ink);
    flex: 1;
    width: 100%;
  }
  .aw-service-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: transform var(--transition-fast);
  }
  .aw-service-icon .aw-icon { width:20px!important; height:20px!important; stroke-width:1.75; }
  .aw-filter-icon .aw-icon { width:16px!important; height:16px!important; }
  .aw-nav-icon .aw-icon { width:19px!important; height:19px!important; margin-inline:auto; }
  .aw-empty-icon {
    display:grid;
    place-items:center;
    width:58px;
    height:58px;
    margin:0 auto 14px;
    border-radius:18px;
    background:var(--brand-soft);
    color:var(--brand-3);
    border:1px solid var(--brand-border);
  }
  .aw-empty-icon .aw-icon { width:24px!important; height:24px!important; }
  .aw-service-card:hover .aw-service-icon {
    transform: scale(1.08);
  }
  .aw-service-body {
    flex: 1;
    min-width: 0;
  }
  .aw-service-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 15px;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 4px;
    line-height: 1.4;
    transition: color var(--transition-fast);
  }
  .aw-service-main:hover .aw-service-name {
    color: var(--brand-3);
  }
  .aw-service-desc {
    font-size: 12px;
    color: var(--ink-muted);
    line-height: 1.55;
    margin: 0;
    font-weight: 500;
  }
  .aw-service-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent-dark);
    border: 1px solid var(--accent-border);
  }
  .aw-service-arrow {
    color: var(--ink-faint);
    font-size: 15px;
    flex-shrink: 0;
    transition: transform var(--transition-fast), color var(--transition-fast);
  }
  .aw-service-card:hover .aw-service-arrow {
    color: var(--brand-3);
    transform: translateX(-4px);
  }

  /* Subactions Pills inside Cards */
  .aw-service-subactions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line-subtle);
  }
  .aw-subaction-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: #f1f5f9;
    color: var(--brand);
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all var(--transition-fast);
  }
  .aw-subaction-pill:hover {
    background: var(--brand-soft);
    color: var(--brand-3);
    border-color: var(--brand-border);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(12, 43, 68, 0.08);
  }
  .aw-subaction-pill .aw-icon {
    width: 13px !important;
    height: 13px !important;
  }

  /* Empty Department Selection State */
  .aw-empty-dept-state {
    padding: 42px 24px;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius);
    margin-top: 10px;
  }
  .aw-empty-dept-state h3 {
    color: var(--brand);
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 8px;
  }
  .aw-empty-dept-state p {
    color: var(--ink-muted);
    font-size: 13.5px;
    max-width: 500px;
    margin: 0 auto 20px;
    line-height: 1.6;
  }
  .aw-empty-quick-dept {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 680px;
    margin: 0 auto;
  }

  /* Color Schemes for Icons */
  .icon-emerald { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
  .icon-blue    { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
  .icon-indigo  { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
  .icon-purple  { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
  .icon-amber   { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
  .icon-teal    { background: #f0fdfa; color: #0d9488; border: 1px solid #99f6e4; }
  .icon-rose    { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

  /* Department List Numbers */
  .aw-dept-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #e2e8f0;
    color: var(--brand);
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
  }

  .aw-mobile-dept-picker {
    display: none;
  }

  /* Global quick access / command palette */
  .aw-command-trigger {
    position: fixed;
    inset-inline-start: 22px;
    inset-block-end: 22px;
    z-index: 880;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid rgba(12, 43, 68, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--brand);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font: 800 12.5px 'Cairo', sans-serif;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  }
  .aw-command-trigger:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(12,43,68,.18); }
  .aw-command-trigger > span:first-child { display:grid; place-items:center; width:24px; height:24px; border-radius:7px; background:var(--brand); color:#fff; }
  .aw-command-trigger kbd,
  .aw-command-search kbd {
    padding: 2px 7px;
    border: 1px solid #cbd5e1;
    border-bottom-width: 2px;
    border-radius: 6px;
    background: #f8fafc;
    color: var(--ink-muted);
    font: 700 10.5px system-ui, sans-serif;
    direction: ltr;
  }
  .aw-command-palette {
    width: min(620px, calc(100vw - 28px));
    max-height: min(700px, calc(100dvh - 40px));
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(148,163,184,.5);
    border-radius: 20px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 32px 90px rgba(7,28,45,.28);
  }
  .aw-command-palette::backdrop { background: rgba(7,28,45,.52); backdrop-filter: blur(4px); }
  .aw-command-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 22px 14px; }
  .aw-command-head h2 { margin:2px 0 0; color:var(--brand); font-size:21px; line-height:1.35; }
  .aw-command-kicker { color:var(--accent-dark); font-size:11px; font-weight:900; }
  .aw-command-close { display:grid; place-items:center; width:38px; height:38px; border:1px solid var(--line); border-radius:10px; background:#f8fafc; color:var(--ink-muted); font-size:25px; line-height:1; cursor:pointer; }
  .aw-command-search { position:relative; display:flex; align-items:center; margin:0 22px; }
  .aw-command-search > span { position:absolute; inset-inline-start:14px; color:var(--ink-light); font-size:22px; pointer-events:none; }
  .aw-command-search input { width:100%; height:50px; padding-inline:44px 62px; background:#f8fafc; font-weight:700; }
  .aw-command-search kbd { position:absolute; inset-inline-end:12px; }
  .aw-command-status { margin:10px 24px 6px; color:var(--ink-light); font-size:11.5px; font-weight:700; }
  .aw-command-list { display:grid; gap:5px; max-height:430px; overflow-y:auto; padding:6px 12px 16px; }
  .aw-command-item { display:flex; align-items:center; gap:12px; padding:12px; border:1px solid transparent; border-radius:12px; color:var(--ink); text-decoration:none; transition:background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast); }
  .aw-command-item:hover, .aw-command-item:focus-visible { background:var(--brand-soft); border-color:var(--brand-border); transform:translateX(-2px); }
  .aw-command-item.current { background:var(--accent-soft); border-color:var(--accent-border); }
  .aw-command-icon { display:grid; place-items:center; flex:0 0 40px; width:40px; height:40px; border-radius:11px; background:#eef4f8; color:var(--brand-3); }
  .aw-command-copy { display:grid; flex:1; min-width:0; }
  .aw-command-copy strong { color:var(--brand); font-size:13.5px; }
  .aw-command-copy small { color:var(--ink-muted); font-size:11.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .aw-command-arrow { color:var(--ink-faint); font-size:17px; }
  .aw-dashboard .dept a.active .aw-dept-code {
    background: #059669;
    color: #ffffff;
  }

  /* ---------------------------------------------------------------------------
     12. Floating Back-to-Top Button
     --------------------------------------------------------------------------- */
  .aw-back-to-top {
    position: fixed;
    inset-block-end: 78px;
    inset-inline-end: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--brand);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
    display: grid;
    place-items: center;
    font-size: 19px;
    font-weight: 900;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px) scale(0.9);
    transition: all var(--transition-base);
    z-index: 900;
  }
  .aw-back-to-top.visible {
    opacity: 0.96;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
  .aw-back-to-top:hover {
    opacity: 1;
    background: var(--brand-3);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(12, 43, 68, 0.28);
  }

  /* ---------------------------------------------------------------------------
     13. Responsive Breakpoints & Mobile First Polish
     --------------------------------------------------------------------------- */
  .aw-bottom-nav {
    display: none;
  }

  @media (max-width: 1120px) {
    .aw-kpi-ribbon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .aw-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .aw-dashboard .actionbar .left { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .aw-dashboard > .grid { grid-template-columns: 260px minmax(0, 1fr); gap: 18px; }
  }

  @media (max-width: 860px) {
    .aw-dashboard .top {
      grid-template-columns: 1fr;
      padding: 22px;
    }
    .aw-dashboard > .grid {
      grid-template-columns: 1fr;
      gap: 16px;
    }
    .aw-departments {
      position: static;
      padding: 18px 16px;
    }
    /* A native picker is clearer than a partially clipped horizontal ribbon. */
    .aw-mobile-dept-picker { display:grid; gap:7px; }
    .aw-mobile-dept-picker label { display:flex; align-items:center; gap:7px; color:var(--brand); font-size:12.5px; font-weight:800; }
    .aw-mobile-dept-control { display:flex; gap:8px; }
    .aw-mobile-dept-control select { width:100%; background:#f8fafc; border-color:var(--brand-border); font-weight:800; }
    .aw-departments > .aw-filter,
    .aw-departments > .aw-dept-list,
    .aw-departments > .aw-search-status { display:none !important; }
  }

  @media (max-width: 768px) {
    /* Safety padding for mobile dock */
    body {
      padding-bottom: calc(72px + env(safe-area-inset-bottom, 12px)) !important;
    }
    .aw-command-trigger { display:none; }
    .aw-command-palette { border-radius:18px; }
    .aw-command-head { padding:16px 16px 12px; }
    .aw-command-search { margin-inline:16px; }
    .aw-command-list { padding-inline:8px; }
    .wrap, .container, .tp-shell {
      padding-inline: 12px !important;
      margin-block: 0 16px;
    }
    .top, .topbar {
      padding: 20px 16px;
      border-radius: var(--radius) !important;
    }
    .top h1, .topbar h1 {
      font-size: 21px;
    }
    .aw-quicklinks {
      grid-template-columns: 1fr 1fr;
    }

    /* Prevent iOS zoom on input tap */
    input:not([type="checkbox"]):not([type="radio"]), select, textarea {
      font-size: 16px !important;
    }

    /* KPI Ribbon & Services Grid on Mobile */
    .aw-kpi-ribbon {
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 18px;
    }
    .aw-kpi-card {
      padding: 12px 14px;
      gap: 10px;
    }
    .aw-kpi-icon {
      width: 38px;
      height: 38px;
      font-size: 18px;
      border-radius: 10px;
    }
    .aw-kpi-label {
      font-size: 11px;
    }
    .aw-kpi-val {
      font-size: 13.5px;
    }
    .aw-services-grid {
      grid-template-columns: 1fr;
      gap: 10px;
    }
    .aw-service-card {
      padding: 14px 16px;
      gap: 12px;
    }
    .aw-service-icon {
      width: 42px;
      height: 42px;
      font-size: 20px;
      border-radius: 12px;
    }
    .aw-service-name {
      font-size: 14.5px;
    }

    /* Services Grid Single Column */
    .aw-dashboard .actionbar .left {
      grid-template-columns: 1fr;
      gap: 10px;
    }
    .aw-service-btn {
      min-height: 80px;
      padding: 14px 16px;
    }

    /* Student Search Box on mobile */
    .aw-student-search-inner {
      flex-direction: column;
      align-items: stretch;
      gap: 8px;
    }
    .aw-student-search-submit {
      width: 100%;
      justify-content: center;
    }

    /* Table Actions Cell Flex Wrap for Mobile */
    .actions-cell, .row-actions {
      display: flex !important;
      flex-wrap: wrap !important;
      gap: 6px !important;
      min-width: 0 !important;
    }
    .actions-cell .btn, .row-actions .btn {
      flex: 1 1 auto;
      min-width: 70px;
      padding: 6px 8px;
    }
    .actions-col {
      width: auto !important;
      min-width: 180px !important;
    }

    /* Docked Mobile Bottom Navigation Bar */
    .aw-bottom-nav {
      display: flex;
      align-items: center;
      justify-content: space-around;
      position: fixed;
      inset-inline: 0;
      inset-block-end: 0;
      height: calc(58px + env(safe-area-inset-bottom, 0px));
      padding-bottom: env(safe-area-inset-bottom, 0px);
      background: rgba(255, 255, 255, 0.94);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-top: 1px solid var(--line);
      box-shadow: 0 -4px 20px rgba(12, 43, 68, 0.08);
      z-index: 1000;
    }
    .aw-bottom-nav-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      flex: 1;
      height: 100%;
      color: var(--ink-muted);
      text-decoration: none;
      font-size: 11px;
      font-weight: 700;
      gap: 3px;
      transition: color var(--transition-fast);
      touch-action: manipulation;
    }
    .aw-bottom-nav-item .aw-nav-icon {
      font-size: 20px;
      line-height: 1;
      transition: transform var(--transition-fast);
    }
    .aw-bottom-nav-item:hover, .aw-bottom-nav-item:active {
      color: var(--brand);
    }
    .aw-bottom-nav-item.active {
      color: var(--accent-dark);
      font-weight: 900;
    }
    .aw-bottom-nav-item.active .aw-nav-icon {
      transform: translateY(-2px) scale(1.1);
    }

    /* Tabs on mobile: horizontal scrollable strip */
    .tabs {
      display: flex !important;
      flex-wrap: nowrap !important;
      overflow-x: auto !important;
      -webkit-overflow-scrolling: touch;
      padding-bottom: 6px;
      gap: 8px;
    }
    .tabs::-webkit-scrollbar { display: none; }
    .tabbtn, .tab {
      white-space: nowrap !important;
      flex-shrink: 0 !important;
    }
  }

  @media (max-width: 420px) {
    .aw-kpi-ribbon { grid-template-columns: 1fr; }
    .aw-kpi-card { min-height: 68px; }
  }

  @media (max-width: 440px) {
    .aw-quicklinks { grid-template-columns: 1fr; }
    .aw-term select { min-width: 100%; }
    .aw-account { justify-content: flex-end; }
    .btn, .tp-btn { min-height: 44px; }
    .top, .topbar { padding: 16px 14px; }
  }
}

/* -----------------------------------------------------------------------------
   13. Print & PDF Strict Isolation
   Ensures no UI bars, filters or mobile widgets ever leak into printed reports.
   ----------------------------------------------------------------------------- */
@media print {
  .aw-skip,
  .aw-filter,
  .aw-table-hint,
  .aw-search-status,
  .aw-back-to-top,
  .aw-bottom-nav,
  .aw-command-trigger,
  .aw-command-palette,
  .aw-quicklinks,
  .aw-masthead .aw-logout,
  .top-actions,
  .actions-cell,
  .row-actions {
    display: none !important;
  }
  .table-wrap, .tablewrap, .table-responsive, .aw-table-scroll {
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
  }
  .aw-sticky-col {
    position: static !important;
    box-shadow: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}
