    /* SMS Nasarawa - Modern Design System 2026 */

    /* ==================== CSS Variables ==================== */
    :root {
      /* Primary Colors - Vibrant Blue Gradient */
      --primary-50: #eff6ff;
      --primary-100: #dbeafe;
      --primary-200: #bfdbfe;
      --primary-300: #93c5fd;
      --primary-400: #60a5fa;
      --primary-500: #3b82f6;
      --primary-600: #2563eb;
      --primary-700: #1d4ed8;
      --primary-800: #1e40af;
      --primary-900: #1e3a8a;

      /* Success Green */
      --success-500: #10b981;
      --success-600: #059669;

      /* Warning Yellow */
      --warning-500: #f59e0b;
      --warning-600: #d97706;

      /* Danger Red */
      --danger-500: #ef4444;
      --danger-600: #dc2626;

      /* Neutral Grays */
      --gray-50: #f9fafb;
      --gray-100: #f3f4f6;
      --gray-200: #e5e7eb;
      --gray-300: #d1d5db;
      --gray-400: #9ca3af;
      --gray-500: #6b7280;
      --gray-600: #4b5563;
      --gray-700: #374151;
      --gray-800: #1f2937;
      --gray-900: #111827;

      /* Gradients */
      --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
      --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
      --gradient-cool: linear-gradient(135deg, #30cfd0 0%, #330867 100%);

      /* Shadows */
      --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
      --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
      --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
      --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
      --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
      --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
      --shadow-premium-nav: 0 4px 20px -5px rgba(0, 0, 0, 0.08), 0 2px 8px -2px rgba(0, 0, 0, 0.04);
      --shadow-premium-card: 0 20px 40px -12px rgba(0, 0, 0, 0.08);

      /* Border Radius */
      --radius-sm: 0.375rem;
      --radius-md: 0.5rem;
      --radius-lg: 0.75rem;
      --radius-xl: 1rem;
      --radius-2xl: 1.5rem;
      --radius-full: 9999px;

      /* Transitions */
      --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
      --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
      --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* ==================== Global Styles ==================== */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      background: #f8fafc;
    }

    /* ==================== Glassmorphism ==================== */
    .glass {
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.2);
      box-shadow: var(--shadow-glass);
    }

    .glass-card {
      background: rgba(255, 255, 255, 0.7);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, 0.4);
      box-shadow: var(--shadow-xl);
      border-radius: var(--radius-2xl);
      transition: all var(--transition-base);
    }

    .glass-card:hover {
      transform: translateY(-8px);
      background: rgba(255, 255, 255, 0.8);
      box-shadow: var(--shadow-2xl), 0 0 20px rgba(102, 126, 234, 0.15);
    }

    .premium-card {
      background: white;
      border: 1px solid #f1f5f9;
      box-shadow: var(--shadow-sm);
      border-radius: var(--radius-2xl);
      transition: all var(--transition-base);
    }

    @media (min-width: 1024px) {
      .premium-card {
        box-shadow: var(--shadow-premium-card);
      }
      
      .premium-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-xl);
      }
    }

    /* ==================== Sidebar ==================== */
    .sidebar-container {
      --sidebar-width: 280px;
      --sidebar-collapsed-width: 88px;
      --sidebar-bg: #0f172a;
      --sidebar-active-bg: rgba(59, 130, 246, 0.1);
      --sidebar-active-color: #60a5fa;
      --sidebar-text: #cbd5e1;
      --sidebar-hover-bg: rgba(255, 255, 255, 0.05);

      display: flex;
      flex-direction: column;
      height: 100vh;
      width: var(--sidebar-width);
      background: var(--sidebar-bg);
      color: var(--sidebar-text);
      transition: width var(--transition-base);
      position: sticky;
      top: 0;
      z-index: 40;
      border-right: 1px solid rgba(255, 255, 255, 0.05);
    }

    .sidebar-container.collapsed {
      width: var(--sidebar-collapsed-width);
    }

    @media (max-width: 768px) {
      .sidebar-container {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        width: 280px !important;
        transition: left var(--transition-base);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.2);
      }

      .sidebar-container.mobile-active {
        left: 0;
      }
      
      .collapse-toggle {
        display: none !important;
      }
    }

    .sidebar-header {
      padding: 1.5rem;
      display: flex;
      align-items: center;
      gap: 1rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .sidebar-logo {
      width: 40px;
      height: 40px;
      min-width: 40px;
      background: var(--gradient-primary);
      border-radius: var(--radius-xl);
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }

    .sidebar-brand-text {
      white-space: nowrap;
      opacity: 1;
      transition: opacity var(--transition-fast);
    }

    .collapsed .sidebar-brand-text {
      opacity: 0;
      width: 0;
      pointer-events: none;
    }

    .sidebar-content {
      flex: 1;
      padding: 1.25rem 0.75rem;
      overflow-y: auto;
    }

    /* Scrollbar for sidebar */
    .sidebar-content::-webkit-scrollbar {
      width: 4px;
    }

    .sidebar-content::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.1);
    }

    .nav-group {
      margin-bottom: 1.5rem;
    }

    .nav-group-title {
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: #64748b;
      margin-bottom: 0.5rem;
      padding-left: 0.75rem;
      white-space: nowrap;
    }

    .collapsed .nav-group-title {
      display: none;
    }

    .nav-link {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: 0.75rem 0.75rem;
      border-radius: var(--radius-lg);
      font-size: 0.875rem;
      font-weight: 500;
      color: var(--sidebar-text);
      text-decoration: none;
      transition: all var(--transition-fast);
      margin-bottom: 0.25rem;
      position: relative;
    }

    .nav-link:hover {
      background: var(--sidebar-hover-bg);
      color: white;
    }

    .nav-link.active {
      background: var(--sidebar-active-bg);
      color: var(--sidebar-active-color);
    }

    .nav-link.active::after {
      content: '';
      position: absolute;
      right: -0.75rem;
      width: 4px;
      height: 24px;
      background: var(--sidebar-active-color);
      border-radius: 4px 0 0 4px;
    }

    .nav-link-icon {
      width: 20px;
      height: 20px;
      min-width: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .nav-link-text {
      transition: all var(--transition-fast);
      opacity: 1 !important;
      visibility: visible !important;
      width: auto !important;
      height: auto !important;
      display: inline-block !important;
      white-space: nowrap !important;
      color: #ffffff !important;
      font-weight: 600;
      letter-spacing: 0.025em;
      margin-left: 0.5rem;
    }

    .collapsed .nav-link-text {
      opacity: 0 !important;
      visibility: hidden !important;
      width: 0 !important;
      height: 0 !important;
      overflow: hidden !important;
      pointer-events: none !important;
      margin-left: 0 !important;
    }

    .sidebar-footer {
      padding: 1.25rem 0.75rem;
      border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .user-profile {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: 0.5rem;
      border-radius: var(--radius-xl);
      background: rgba(255, 255, 255, 0.03);
    }

    .collapsed .user-profile {
      padding: 0.5rem;
      justify-content: center;
    }

    .user-avatar {
      width: 36px;
      height: 36px;
      min-width: 36px;
      border-radius: var(--radius-lg);
      background: var(--gradient-cool);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      color: white;
      font-size: 0.875rem;
    }

    .user-info {
      overflow: hidden;
      white-space: nowrap;
    }

    .collapsed .user-info {
      display: none;
    }

    .user-name {
      font-size: 0.875rem;
      font-weight: 600;
      color: white;
      display: block;
    }

    .user-role {
      font-size: 0.75rem;
      color: var(--sidebar-text);
      display: block;
    }

    /* Collapse Toggle Button */
    .collapse-toggle {
      width: 24px;
      height: 24px;
      background: var(--sidebar-bg);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: white;
      border-radius: 6px;
      position: absolute;
      right: -12px;
      top: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      z-index: 50;
      transition: all var(--transition-fast);
    }

    .collapse-toggle:hover {
      background: var(--primary-600);
      transform: scale(1.1);
    }

    .collapsed .collapse-toggle svg {
      transform: rotate(180deg);
    }

    /* ==================== Buttons ==================== */
    .btn {
      position: relative;
      overflow: hidden;
      border: none;
      font-weight: 600;
      letter-spacing: 0.025em;
      transition: all var(--transition-base);
      cursor: pointer;
    }

    .btn::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.3);
      transform: translate(-50%, -50%);
      transition: width 0.6s, height 0.6s;
    }

    .btn:hover::before {
      width: 300px;
      height: 300px;
    }

    .btn-primary {
      background: var(--gradient-primary);
      color: white;
      box-shadow: 0 4px 14px 0 rgba(102, 126, 234, 0.39);
    }

    .btn-primary:hover {
      box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
      transform: translateY(-2px);
    }

    .btn-success {
      background: var(--gradient-success);
      color: white;
      box-shadow: 0 4px 14px 0 rgba(17, 153, 142, 0.39);
    }

    .btn-success:hover {
      box-shadow: 0 6px 20px rgba(17, 153, 142, 0.5);
      transform: translateY(-2px);
    }

    /* ==================== Cards ==================== */
    .stat-card {
      position: relative;
      overflow: hidden;
      transition: all var(--transition-base);
    }

    .stat-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 4px;
      background: var(--gradient-primary);
      transform: scaleX(0);
      transition: transform var(--transition-base);
    }

    .stat-card:hover::before {
      transform: scaleX(1);
    }

    .stat-card:hover {
      transform: translateY(-8px) scale(1.02);
      box-shadow: var(--shadow-2xl);
    }

    /* ==================== Forms ==================== */
    .form-input {
      border: 2px solid var(--gray-200);
      border-radius: var(--radius-lg);
      padding: 0.75rem 1rem;
      transition: all var(--transition-base);
      font-size: 0.875rem;
    }

    .form-input:focus {
      outline: none;
      border-color: var(--primary-500);
      box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
      transform: translateY(-2px);
    }

    .form-label {
      font-weight: 600;
      font-size: 0.875rem;
      color: var(--gray-700);
      margin-bottom: 0.5rem;
    }

    /* ==================== Modals ==================== */
    .modal-backdrop {
      backdrop-filter: blur(8px);
      background: rgba(0, 0, 0, 0.5);
      animation: fadeIn var(--transition-base);
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    .modal-content {
      animation: slideUp var(--transition-base);
    }

    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(20px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* ==================== Animations ==================== */
    @keyframes pulse {

      0%,
      100% {
        opacity: 1;
      }

      50% {
        opacity: 0.5;
      }
    }

    .animate-pulse {
      animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }

    @keyframes shimmer {
      0% {
        background-position: -1000px 0;
      }

      100% {
        background-position: 1000px 0;
      }
    }

    .loading-shimmer {
      background: linear-gradient(to right,
          #f6f7f8 0%,
          #edeef1 20%,
          #f6f7f8 40%,
          #f6f7f8 100%);
      background-size: 1000px 100%;
      animation: shimmer 2s linear infinite;
    }

    /* ==================== Scrollbar ==================== */
    ::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }

    ::-webkit-scrollbar-track {
      background: var(--gray-100);
    }

    ::-webkit-scrollbar-thumb {
      background: var(--gradient-primary);
      border-radius: var(--radius-full);
    }

    ::-webkit-scrollbar-thumb:hover {
      background: var(--primary-700);
    }

    /* ==================== Utility Classes ==================== */
    .gradient-text {
      background: var(--gradient-primary);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .floating {
      animation: float 3s ease-in-out infinite;
    }

    @keyframes float {

      0%,
      100% {
        transform: translateY(0px);
      }

      50% {
        transform: translateY(-10px);
      }
    }

    /* ==================== Responsive ==================== */
    @media (max-width: 768px) {
      .glass-card {
        border-radius: var(--radius-xl);
      }

      .stat-card:hover {
        transform: translateY(-4px) scale(1.01);
      }
    }

    /* ==================== Spinners ==================== */
    .spinner {
      width: 20px;
      height: 20px;
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-radius: 50%;
      border-top-color: #fff;
      animation: spin 0.8s linear infinite;
      display: inline-block;
      vertical-align: middle;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    .btn-loading {
      pointer-events: none;
      opacity: 0.8;
    }

    .btn-loading .btn-text {
      display: none;
    }

    .hidden {
      display: none;
    }

    /* ==================== Responsive Utilities ==================== */
    .responsive-container {
      width: 100%;
      margin-left: auto;
      margin-right: auto;
      padding-left: 1rem;
      padding-right: 1rem;
    }

    @media (min-width: 640px) {
      .responsive-container {
        max-width: 640px;
      }
    }

    @media (min-width: 768px) {
      .responsive-container {
        max-width: 768px;
      }
    }

    @media (min-width: 1024px) {
      .responsive-container {
        max-width: 1024px;
      }
    }

    @media (min-width: 1280px) {
      .responsive-container {
        max-width: 1280px;
      }
    }

    /* Responsive Table Wrapper */
    .table-responsive {
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      margin-bottom: 1rem;
      border-radius: var(--radius-lg);
    }

    /* Responsive Grid */
    .grid-responsive {
      display: grid;
      gap: 1.5rem;
      grid-template-columns: 1fr;
    }

    @media (min-width: 768px) {
      .grid-responsive-2 {
        grid-template-columns: repeat(2, 1fr);
      }

      .grid-responsive-3 {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    @media (min-width: 1024px) {
      .grid-responsive-4 {
        grid-template-columns: repeat(4, 1fr);
      }
    }

    /* Responsive Flex */
    .flex-responsive {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    @media (min-width: 768px) {
      .flex-responsive {
        flex-direction: row;
        align-items: center;
      }
    }

    /* Portal Utilities */
    .card-list {
      display: grid;
      gap: 1rem;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    /* ==================== Background Patterns ==================== */
    .pattern-dots {
      background-image: radial-gradient(#cbd5e1 0.5px, transparent 0.5px);
      background-size: 24px 24px;
    }

    .pattern-grid {
      background-image: linear-gradient(#e2e8f0 1px, transparent 1px),
        linear-gradient(90deg, #e2e8f0 1px, transparent 1px);
      background-size: 40px 40px;
    }
/* ?? MOBILE TABLE OPTIMIZATIONS */
.sticky-col { position: sticky; left: 0; z-index: 10; background: inherit; }
.sticky-col-2 { left: 4rem; }
.row-student:focus-within { background-color: rgba(99, 102, 241, 0.05) !important; box-shadow: inset 4px 0 0 #6366f1; }
.row-student:focus-within td { color: #1e293b !important; }
@media (max-width: 768px) {
  .sticky-col { border-right: 1px solid #f1f5f9; shadow: 10px 0 15px -3px rgba(0,0,0,0.05); }
  .score-input { font-size: 16px !important; } /* Prevents iOS auto-zoom */
}

/* ?? OVERRIDE FOR MOBILE SIDEBAR Z-INDEX */
@media (max-width: 768px) {
  .sidebar-container { z-index: 100 !important; }
  #mobile-sidebar-overlay { z-index: 90 !important; }
}

/* ==================== Portal Layout ==================== */
.admin-header-premium {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    /* Default for mobile */
    height: 72px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid #f1f5f9;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop Sidebar Offsets */
@media (min-width: 1024px) {
    .admin-header-premium {
        left: 280px;
        box-shadow: var(--shadow-premium-nav);
    }

    #admin-sidebar.collapsed+.admin-header-premium {
        left: 88px;
        box-shadow: var(--shadow-premium-nav);
    }
}

/* Layout Helper for Fixed Header */
.has-fixed-header {
    padding-top: 100px;
}

.admin-identity-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 6px 6px 12px;
    background: #f8fafc;
    border-radius: 99px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.admin-identity-chip:hover {
    background: white;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

