    @import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&display=swap');

    @font-face {
      font-family: 'Amiri';
      font-style: normal;
      font-weight: 400;
      font-display: swap;
      src: local('Amiri'),
           url('../fonts/amiri-regular.ttf') format('truetype'),
           url('https://fonts.gstatic.com/s/amiri/v30/J7aRnpd8CGxBHqUp.ttf') format('truetype');
    }

    @font-face {
      font-family: 'Amiri';
      font-style: normal;
      font-weight: 700;
      font-display: swap;
      src: local('Amiri Bold'), local('Amiri-Bold'),
           url('../fonts/amiri-bold.ttf') format('truetype'),
           url('https://fonts.gstatic.com/s/amiri/v30/J7acnpd8CGxBHp2VkZY4.ttf') format('truetype');
    }

    /* ==========================================================================
       TIPOGRAFI BAHASA ARAB 'AMIRI' (ONLINE & OFFLINE)
       ========================================================================== */
    .font-arabic,
    .arabic-text,
    [lang="ar"],
    .is-arabic {
      font-family: 'Amiri', 'Traditional Arabic', 'Scheherazade New', serif !important;
      font-size: 1.25em;
      line-height: 2.1 !important;
      letter-spacing: 0 !important;
      word-spacing: 2px;
    }

    .arabic-block,
    .stimulus-arabic {
      font-family: 'Amiri', 'Traditional Arabic', 'Scheherazade New', serif !important;
      font-size: 1.3em;
      line-height: 2.2 !important;
      direction: rtl;
      text-align: right;
      letter-spacing: 0 !important;
      word-spacing: 2px;
      unicode-bidi: embed;
    }

    [dir="rtl"] {
      text-align: right;
      direction: rtl;
      unicode-bidi: embed;
    }

    [dir="auto"] {
      unicode-bidi: plaintext;
    }

    .arabic-inline {
      font-family: 'Amiri', serif !important;
      font-size: 1.22em;
      line-height: 2.0;
      letter-spacing: 0 !important;
      display: inline-block;
      vertical-align: middle;
      padding: 0 4px;
      unicode-bidi: isolate;
    }

    .q-preview-arabic {
      font-family: 'Amiri', serif !important;
      font-size: 1.25em;
      line-height: 2.1 !important;
      letter-spacing: 0 !important;
    }

    /* ==========================================================================
       EXAMON AI GENERATING LOADER ANIMATION (V2 POLISHED & LIVE REALTIME)
       ========================================================================== */
    .ai-orb-container {
      position: relative;
      width: 104px;
      height: 104px;
      margin: 0 auto 12px auto;
      display: flex;
      align-items: center;
      justify-content: center;
      user-select: none;
    }

    .ai-orb-ambient {
      position: absolute;
      inset: -6px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, rgba(168, 85, 247, 0.25) 50%, transparent 70%);
      filter: blur(8px);
      animation: ai-orb-pulse 3s ease-in-out infinite alternate;
    }

    .ai-orb-ring-outer {
      position: absolute;
      inset: 0;
      border-radius: 50%;
      padding: 2.5px;
      background: conic-gradient(from 0deg, #38bdf8, #6366f1, #a855f7, #ec4899, #38bdf8);
      -webkit-mask: radial-gradient(circle, transparent 62%, black 64%);
      mask: radial-gradient(circle, transparent 62%, black 64%);
      animation: ai-orb-spin 3s linear infinite;
      will-change: transform;
    }

    .ai-orb-ring-inner {
      position: absolute;
      inset: 7px;
      border-radius: 50%;
      padding: 1.5px;
      background: conic-gradient(from 180deg, rgba(236, 72, 153, 0.8), rgba(99, 102, 241, 0.2), rgba(56, 189, 248, 0.9), rgba(168, 85, 247, 0.3));
      -webkit-mask: radial-gradient(circle, transparent 58%, black 60%);
      mask: radial-gradient(circle, transparent 58%, black 60%);
      animation: ai-orb-spin-reverse 4s linear infinite;
      will-change: transform;
    }

    .ai-orb-core {
      position: absolute;
      inset: 10px;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 30%, #1e1b4b 0%, #0f172a 70%, #020617 100%);
      box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.2), inset 0 -4px 10px rgba(99, 102, 241, 0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 2;
    }

    .ai-orb-text {
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: "Poppins", "Inter", sans-serif;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.2px;
      line-height: 1;
      z-index: 3;
    }

    .ai-orb-letter {
      display: inline-block;
      color: #ffffff;
      opacity: 0.7;
      animation: ai-orb-letter-wave 2.2s ease-in-out infinite;
      will-change: transform, opacity;
    }

    .ai-orb-badge-ai {
      margin-left: 3px;
      background: linear-gradient(135deg, #a5b4fc, #38bdf8);
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
      font-weight: 800;
      text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
      animation: ai-orb-glow 2s ease-in-out infinite alternate;
    }

    .ai-orb-letter:nth-child(1) { animation-delay: 0.0s; }
    .ai-orb-letter:nth-child(2) { animation-delay: 0.1s; }
    .ai-orb-letter:nth-child(3) { animation-delay: 0.2s; }
    .ai-orb-letter:nth-child(4) { animation-delay: 0.3s; }
    .ai-orb-letter:nth-child(5) { animation-delay: 0.4s; }
    .ai-orb-letter:nth-child(6) { animation-delay: 0.5s; }

    @keyframes ai-orb-spin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }

    @keyframes ai-orb-spin-reverse {
      from { transform: rotate(360deg); }
      to { transform: rotate(0deg); }
    }

    @keyframes ai-orb-pulse {
      0% { transform: scale(0.96); opacity: 0.45; }
      100% { transform: scale(1.06); opacity: 0.8; }
    }

    @keyframes ai-orb-letter-wave {
      0%, 100% { opacity: 0.6; transform: translateY(0); }
      30% { opacity: 1; transform: translateY(-1.5px) scale(1.08); color: #e0e7ff; }
      60% { opacity: 0.75; transform: translateY(0); }
    }

    @keyframes ai-orb-glow {
      0% { filter: drop-shadow(0 0 2px rgba(56, 189, 248, 0.4)); }
      100% { filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.8)); }
    }

    .shimmer-bar {
      background-size: 30px 30px;
      background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0.22) 75%, transparent 75%, transparent);
      animation: ai-shimmer-move 1.5s linear infinite;
    }

    @keyframes ai-shimmer-move {
      0% { background-position: 0 0; }
      100% { background-position: 30px 0; }
    }

    @keyframes ai-live-ping {
      0% { transform: scale(1); opacity: 1; }
      75%, 100% { transform: scale(2.2); opacity: 0; }
    }
    .ai-live-ping-dot {
      animation: ai-live-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
    }

    /* Legacy compatibility */
    .loader-wrapper {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 104px;
      height: 104px;
      font-family: "Poppins", "Inter", sans-serif;
      font-size: 1.05em;
      font-weight: 600;
      color: white;
      border-radius: 50%;
      background-color: #1e1b4b;
      user-select: none;
      margin: 0 auto 12px auto;
      box-shadow: 0 8px 20px -4px rgba(71, 30, 236, 0.45);
    }

    .loader {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      aspect-ratio: 1 / 1;
      border-radius: 50%;
      background-color: transparent;
      animation: loader-rotate 2s linear infinite;
      z-index: 0;
    }

    @keyframes loader-rotate {
      0% {
        transform: rotate(90deg);
        box-shadow:
          0 10px 20px 0 #fff inset,
          0 20px 30px 0 #ad5fff inset,
          0 60px 60px 0 #471eec inset;
      }
      50% {
        transform: rotate(270deg);
        box-shadow:
          0 10px 20px 0 #fff inset,
          0 20px 10px 0 #d60a47 inset,
          0 40px 60px 0 #311e80 inset;
      }
      100% {
        transform: rotate(450deg);
        box-shadow:
          0 10px 20px 0 #fff inset,
          0 20px 30px 0 #ad5fff inset,
          0 60px 60px 0 #471eec inset;
      }
    }

    .loader-letter {
      display: inline-block;
      opacity: 0.5;
      transform: translateY(0);
      animation: loader-letter-anim 2s infinite;
      z-index: 1;
      border-radius: 50ch;
      border: none;
    }

    .loader-letter:nth-child(1) { animation-delay: 0s; }
    .loader-letter:nth-child(2) { animation-delay: 0.1s; }
    .loader-letter:nth-child(3) { animation-delay: 0.2s; }
    .loader-letter:nth-child(4) { animation-delay: 0.3s; }
    .loader-letter:nth-child(5) { animation-delay: 0.4s; }
    .loader-letter:nth-child(6) { animation-delay: 0.5s; }
    .loader-letter:nth-child(7) { animation-delay: 0.6s; }
    .loader-letter:nth-child(8) { animation-delay: 0.7s; }

    @keyframes loader-letter-anim {
      0%, 100% {
        opacity: 0.5;
        transform: translateY(0);
      }
      20% {
        opacity: 1;
        transform: scale(1.14);
      }
      40% {
        opacity: 0.75;
        transform: translateY(0);
      }
    }

    /* --- FONTS & GLOBAL --- */
    /* Fonts loaded via HTML link */

    html,
    body {
      width: 100%;
      max-width: 100%;
      overflow-x: hidden;
      overscroll-behavior-x: none;
    }

    body {
      font-family: 'Inter', sans-serif;
      background-color: #f8fafc;
      /* Slate 50 */
      color: #334155;
      /* Slate 700 */
      user-select: none;
      overflow-x: hidden;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .font-heading {
      font-family: 'Poppins', sans-serif;
    }

    /* --- UTILITIES --- */
    .glass {
      background: rgba(255, 255, 255, 0.9);
      backdrop-filter: blur(12px);
      border: 1px solid rgba(255, 255, 255, 0.6);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    }

    .fade-in {
      animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(10px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Custom Scrollbar */
    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }

    ::-webkit-scrollbar-track {
      background: transparent;
    }

    ::-webkit-scrollbar-thumb {
      background: #cbd5e1;
      border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb:hover {
      background: #94a3b8;
    }

    /* --- SIDEBAR STYLES --- */
    .sidebar-bg {
      background: #2b369e;
      /* Warna baru sesuai permintaan */
      border-right: 1px solid rgba(0, 0, 0, 0.1);
      color: #e0e7ff;
      /* Indigo-50 */
    }

    .sidebar-item {
      position: relative;
      display: flex;
      align-items: center;
      padding: 12px 16px;
      margin-bottom: 4px;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
      overflow: hidden;
      white-space: nowrap;
      font-weight: 500;
      font-size: 0.9rem;
    }

    .sidebar-item:hover {
      background: rgba(255, 255, 255, 0.08);
      color: #f1f5f9;
    }

    .sidebar-item.active {
      background: #2563eb;
      /* Blue 600 */
      color: #fff;
      box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    }

    .sidebar-item i {
      width: 24px;
      text-align: center;
      margin-right: 12px;
      font-size: 1.1rem;
      flex-shrink: 0;
      transition: transform 0.2s;
    }

    .sidebar-item:hover i {
      transform: scale(1.1);
    }

    /* --- SIDEBAR DROPDOWN & GROUP STYLES (ALWAYS VISIBLE & GROUPED) --- */
    .sidebar-group-label {
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #93c5fd;
      opacity: 0.85;
      padding: 14px 12px 6px 12px;
      display: flex;
      align-items: center;
      gap: 6px;
      user-select: none;
    }

    .sidebar-group-label i {
      font-size: 0.72rem;
      opacity: 0.9;
    }

    #admin-sidebar.collapsed .sidebar-group-label {
      display: none !important;
    }

    .submenu {
      max-height: none !important;
      overflow: visible !important;
      background: transparent !important;
      border-radius: 0;
      margin: 0 !important;
      display: block !important;
    }

    .submenu.open {
      max-height: none !important;
      margin-bottom: 0;
    }

    .submenu-item {
      display: flex;
      align-items: center;
      padding: 10px 16px 10px 24px;
      font-size: 0.88rem;
      color: #cbd5e1;
      cursor: pointer;
      transition: all 0.2s;
      border-radius: 8px;
      margin: 2px 0;
      font-weight: 500;
    }

    .submenu-item:hover {
      background: rgba(255, 255, 255, 0.08);
      color: #f1f5f9;
    }

    .submenu-item.active {
      background: #2563eb;
      color: #fff;
      box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
      font-weight: 600;
    }

    .sidebar-item .chevron {
      display: none !important;
    }

    /* Logika Collapse Sidebar */
    #admin-sidebar.collapsed {
      width: 80px;
    }

    #admin-sidebar.collapsed .sidebar-text,
    #admin-sidebar.collapsed .user-info-text,
    #admin-sidebar.collapsed .sidebar-header-text,
    #admin-sidebar.collapsed .section-label {
      display: none;
    }

    #admin-sidebar.collapsed .sidebar-item {
      justify-content: center;
      padding: 12px 0;
    }

    #admin-sidebar.collapsed .sidebar-item i {
      margin-right: 0;
    }

    #admin-sidebar.collapsed .user-info-avatar {
      margin-right: 0;
      width: 40px;
      height: 40px;
    }

    /* --- MODERN DASHBOARD CARDS --- */
    .dash-card {
      background: #ffffff;
      border-radius: 16px;
      border: 1px solid #e2e8f0;
      /* Slate 200 */
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
      padding: 0;
      /* PENTING: Padding 0 agar konten/tabel bisa full width */
      overflow: hidden;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      display: flex;
      flex-direction: column;
    }

    .dash-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
      border-color: #cbd5e1;
    }

    /* Ikon Stat Card */
    .stat-card-icon {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.25rem;
      transition: transform 0.3s ease;
    }

    .dash-card:hover .stat-card-icon {
      transform: scale(1.1) rotate(6deg);
    }

    /* --- MODERN TABLE STYLES --- */
    .table-modern {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
    }

    .table-modern thead th {
      background-color: #f8fafc;
      color: #64748b;
      font-weight: 600;
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      padding: 16px;
      border-bottom: 1px solid #e2e8f0;
      text-align: left;
    }

    /* Rounded corners untuk header tabel */
    .table-modern thead th:first-child {
      border-top-left-radius: 0px;
    }

    .table-modern thead th:last-child {
      border-top-right-radius: 0px;
    }

    .table-modern tbody td {
      padding: 16px;
      border-bottom: 1px solid #f1f5f9;
      vertical-align: middle;
      color: #334155;
    }

    .table-modern tbody tr:last-child td {
      border-bottom: none;
    }

    .table-modern tbody tr:hover {
      background-color: #f8fafc;
    }

    /* --- BADGES & CHIPS --- */
    .badge {
      display: inline-flex;
      align-items: center;
      padding: 4px 10px;
      border-radius: 9999px;
      font-size: 0.7rem;
      font-weight: 700;
      letter-spacing: 0.025em;
      text-transform: uppercase;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }

    .badge-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      margin-right: 6px;
    }

    /* --- TIMELINE --- */
    .timeline-item {
      position: relative;
      padding-left: 24px;
      padding-bottom: 24px;
      border-left: 2px solid #e2e8f0;
    }

    .timeline-item:last-child {
      border-left-color: transparent;
      padding-bottom: 0;
    }

    .timeline-dot {
      position: absolute;
      left: -6px;
      top: 0;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: #cbd5e1;
      border: 2px solid #fff;
      box-shadow: 0 0 0 2px #f1f5f9;
      transition: all 0.2s;
    }

    .timeline-item:hover .timeline-dot {
      background: #3b82f6;
      transform: scale(1.3);
    }

    /* --- UTILITIES GRADIENT --- */
    .bg-gradient-blue {
      background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
      color: white;
    }

    .bg-gradient-purple {
      background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
      color: white;
    }

    .bg-gradient-emerald {
      background: linear-gradient(135deg, #10b981 0%, #059669 100%);
      color: white;
    }

    .bg-gradient-orange {
      background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
      color: white;
    }

    /* --- SECURITY BADGE --- */
    .cbt-secure-badge {
      position: static;
      transform: none;
      background: transparent;
      color: #94a3b8;
      /* Slate 400 */
      padding: 0;
      margin-top: 25px;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      font-family: monospace;
      font-size: 11px;
      font-weight: 500;
      pointer-events: none;
      border: none;
      box-shadow: none;
      backdrop-filter: none;
    }

    .cbt-secure-badge i {
      color: #f59e0b;
      /* Kuning emas */
      font-size: 12px;
    }

    @media (max-width: 640px) {
      .cbt-secure-badge {
        font-size: 9px !important;
        padding: 4px 12px !important;
        gap: 5px !important;
        bottom: 4px !important;
        max-width: 85% !important;
      }
    }

    #page-login {
      background-color: #0f172a;
      /* Fallback */
    }

    /* --- MODERN EXAM UI UPDATE --- */
    /* 1. Header Gradient & Glass */
    .exam-header {
      background: #2b369e;
      /* Warna Biru Sidebar Admin */
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      color: white;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    /* 2. Timer Capsule */
    .timer-capsule {
      background: rgba(0, 0, 0, 0.25);
      border: 1px solid rgba(255, 255, 255, 0.2);
      color: #facc15;
      padding: 6px 16px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      gap: 8px;
      font-family: 'Courier New', monospace;
    }

    /* 3. Question Card & Typography */
    .question-card {
      background: white;
      border-radius: 20px;
      box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
      border: 1px solid #f1f5f9;
      overflow: hidden;
    }

    .question-text {
      font-family: 'Poppins', sans-serif;
      font-weight: 500;
      color: #1e293b;
      line-height: 1.8;
    }

    /* 4. Modern Option (Radio Button Replacement) */
    .option-label {
      display: flex;
      align-items: center;
      padding: 16px 20px;
      border: 2px solid #e2e8f0;
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      background: #fff;
      position: relative;
    }

    .option-label:hover {
      background-color: #f8fafc;
      border-color: #cbd5e1;
      transform: translateY(-1px);
    }

    .option-label.checked {
      border-color: #3b82f6;
      /* Blue 500 */
      background-color: #eff6ff;
      /* Blue 50 */
      box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    }

    /* Custom Radio Circle */
    .custom-radio {
      width: 22px;
      height: 22px;
      border: 2px solid #cbd5e1;
      border-radius: 50%;
      margin-right: 16px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
      background: white;
    }

    .option-label.checked .custom-radio {
      border-color: #3b82f6;
      background: #3b82f6;
    }

    .custom-radio::after {
      content: '';
      width: 8px;
      height: 8px;
      background: white;
      border-radius: 50%;
      transform: scale(0);
      transition: transform 0.2s;
    }

    .option-label.checked .custom-radio::after {
      transform: scale(1);
    }

    /* 5. Navigation Sidebar Compact */
    .nav-btn-modern {
      width: 36px;
      /* Ukuran fix kecil */
      height: 36px;
      font-size: 0.75rem;
      border-radius: 8px;
      font-weight: 600;
      transition: all 0.2s;
      border: 1px solid #e2e8f0;
      color: #64748b;
      background: white;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .nav-btn-modern:hover {
      border-color: #94a3b8;
      color: #334155;
    }

    /* Active / Current Question */
    .nav-btn-modern.current {
      border: 2px solid #f59e0b;
      /* Amber/Yellow border */
      background: #fffbeb;
      color: #d97706;
      transform: scale(1.1);
      z-index: 10;
      box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
    }

    /* Answered */
    .nav-btn-modern.answered {
      background: #3b82f6;
      border-color: #3b82f6;
      color: white;
      box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    }

    /* --- MOBILE & TABLET OVERHAUL STYLES (ANDROID APK CBT) (< 1024px) --- */
    @media (max-width: 1023px) {
      #admin-sidebar {
        display: none !important;
      }

      header.bg-white\/80,
      #admin-header {
        display: none !important;
      }

      #admin-content {
        padding: 16px !important;
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important;
        background-color: #fff !important;
      }
    }

      .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        margin-bottom: 24px;
        padding: 18px 16px;
        border-radius: 20px;
        background: linear-gradient(135deg, #4f46e5 0%, #6366f1 55%, #7c3aed 100%);
        color: #fff;
        position: relative;
        overflow: hidden;
        box-shadow: 0 10px 24px -10px rgba(79, 70, 229, 0.55);
      }

      .mobile-header::after {
        content: '';
        position: absolute;
        top: -40px;
        right: -40px;
        width: 130px;
        height: 130px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
      }

      .mobile-user-greeting {
        display: flex;
        flex-direction: column;
        min-width: 0;
        flex: 1;
        position: relative;
        z-index: 1;
      }

      .mobile-greeting-text {
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: rgba(255, 255, 255, 0.85);
      }

      .mobile-user-name {
        font-size: 17px;
        font-weight: 800;
        color: #fff;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .mobile-role-badge {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background: rgba(255, 255, 255, 0.18);
        border: 1px solid rgba(255, 255, 255, 0.28);
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        padding: 3px 9px;
        border-radius: 999px;
        margin-top: 6px;
        width: fit-content;
      }

      .mobile-avatar {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.95);
        color: #4f46e5;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 20px;
        flex-shrink: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        position: relative;
        z-index: 1;
      }

      .mobile-avatar-img {
        object-fit: cover;
      }

      .mobile-banner-card {
        background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
        border-radius: 20px;
        padding: 24px;
        color: white;
        margin-bottom: 24px;
        box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.3);
        position: relative;
        overflow: hidden;
      }

      .mobile-banner-card::after {
        content: '';
        position: absolute;
        top: -20%;
        right: -10%;
        width: 150px;
        height: 150px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
      }

      /* --- MENU UTAMA GRID (SESUAI GAMBAR REFERENSI: KOTAK CARD PUTIH, ICON SQUIRCLE GRADASI BERWARNA) --- */
      .mobile-menu-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 10px;
        margin-bottom: 28px;
      }

      .mobile-menu-grid .mobile-menu-item {
        width: calc((100% - 30px) / 4);
        max-width: calc((100% - 30px) / 4);
        flex: 0 0 calc((100% - 30px) / 4);
        box-sizing: border-box;
      }

      @media (min-width: 640px) {
        #page-student-dashboard .mobile-menu-grid {
          display: grid;
          grid-template-columns: repeat(4, 1fr);
          gap: 16px 14px;
        }
        #page-student-dashboard .mobile-menu-grid .mobile-menu-item {
          width: auto;
          max-width: none;
          flex: none;
        }
      }

      .mobile-menu-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        background: #ffffff;
        border: 1px solid #f1f5f9;
        border-radius: 20px;
        padding: 12px 4px 10px;
        box-shadow: 0 4px 14px -3px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
        cursor: pointer;
        min-width: 0;
        transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        -webkit-tap-highlight-color: transparent;
        user-select: none;
      }

      .mobile-menu-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.09), 0 2px 6px rgba(0, 0, 0, 0.04);
        border-color: #e2e8f0;
      }

      .mobile-menu-item:active {
        transform: scale(0.94);
      }

      .mobile-menu-icon {
        width: 52px;
        height: 52px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        flex-shrink: 0;
      }

      /* Vibrant Academic Colorful Gradients */
      .icon-grad-emerald {
        background: linear-gradient(145deg, #059669 0%, #047857 100%);
        color: #fef08a; /* Golden amber icon */
        box-shadow: 0 6px 14px -3px rgba(5, 150, 105, 0.38);
      }

      .icon-grad-teal {
        background: linear-gradient(145deg, #0d9488 0%, #0f766e 100%);
        color: #fef08a;
        box-shadow: 0 6px 14px -3px rgba(13, 148, 136, 0.38);
      }

      .icon-grad-orange {
        background: linear-gradient(145deg, #ea580c 0%, #c2410c 100%);
        color: #fef9c3;
        box-shadow: 0 6px 14px -3px rgba(234, 88, 12, 0.38);
      }

      .icon-grad-purple {
        background: linear-gradient(145deg, #9333ea 0%, #7e22ce 100%);
        color: #fef08a;
        box-shadow: 0 6px 14px -3px rgba(147, 51, 234, 0.38);
      }

      .icon-grad-blue {
        background: linear-gradient(145deg, #2563eb 0%, #1d4ed8 100%);
        color: #fef08a;
        box-shadow: 0 6px 14px -3px rgba(37, 99, 235, 0.38);
      }

      .icon-grad-red {
        background: linear-gradient(145deg, #e11d48 0%, #be123c 100%);
        color: #fef08a;
        box-shadow: 0 6px 14px -3px rgba(225, 29, 72, 0.38);
      }

      .icon-grad-sky {
        background: linear-gradient(145deg, #0284c7 0%, #0369a1 100%);
        color: #fef08a;
        box-shadow: 0 6px 14px -3px rgba(2, 132, 199, 0.38);
      }

      .icon-grad-brown {
        background: linear-gradient(145deg, #9a3412 0%, #7c2d12 100%);
        color: #fed7aa;
        box-shadow: 0 6px 14px -3px rgba(154, 52, 18, 0.38);
      }

      .icon-grad-indigo {
        background: linear-gradient(145deg, #4f46e5 0%, #4338ca 100%);
        color: #fef08a;
        box-shadow: 0 6px 14px -3px rgba(79, 70, 229, 0.38);
      }

      .icon-grad-slate {
        background: linear-gradient(145deg, #475569 0%, #334155 100%);
        color: #fef08a;
        box-shadow: 0 6px 14px -3px rgba(71, 85, 105, 0.38);
      }

      .icon-grad-amber {
        background: linear-gradient(145deg, #d97706 0%, #b45309 100%);
        color: #fefce8;
        box-shadow: 0 6px 14px -3px rgba(217, 119, 6, 0.38);
      }

      .icon-grad-cyan {
        background: linear-gradient(145deg, #0891b2 0%, #0e7490 100%);
        color: #fef08a;
        box-shadow: 0 6px 14px -3px rgba(8, 145, 178, 0.38);
      }

      .mobile-menu-label {
        font-size: 11px;
        font-weight: 700;
        color: #1e293b;
        width: 100%;
        text-align: center;
        line-height: 1.25;
        margin-top: 8px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: normal;
        overflow-wrap: normal;
        hyphens: none;
      }

      /* ==========================================================================
         ACADEMIC LIVE HERO CARD (PERSIS REFERENSI: DEEP GREEN / GOLDEN AMBER)
         ========================================================================== */
      .academic-hero-card {
        position: relative;
        background: linear-gradient(140deg, #064e3b 0%, #065f46 45%, #047857 100%);
        border-radius: 22px;
        padding: 16px 14px 14px;
        color: #ffffff;
        margin-bottom: 20px;
        box-shadow: 0 10px 25px -5px rgba(6, 78, 59, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
        overflow: hidden;
      }

      .academic-hero-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
        background-size: 16px 16px;
        pointer-events: none;
        opacity: 0.6;
      }

      .hero-top-row {
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 8px;
      }

      .hero-badge-tag {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background: rgba(251, 191, 36, 0.15);
        border: 1px solid rgba(251, 191, 36, 0.4);
        color: #fef08a;
        padding: 3px 10px;
        border-radius: 9999px;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.8px;
        text-transform: uppercase;
      }

      .hero-clock-box {
        text-align: right;
      }

      .hero-clock-label {
        font-size: 9px;
        color: #a7f3d0;
        font-weight: 600;
        letter-spacing: 0.4px;
        text-transform: uppercase;
      }

      .hero-clock-time {
        font-size: 13px;
        font-weight: 800;
        color: #fbbf24;
        font-family: 'JetBrains Mono', 'Courier New', monospace;
        letter-spacing: 0.5px;
      }

      .hero-main-title {
        position: relative;
        z-index: 2;
        font-family: 'Playfair Display', 'Merriweather', Georgia, serif;
        font-size: 18px;
        font-weight: 900;
        color: #ffffff;
        line-height: 1.2;
        margin-bottom: 2px;
        letter-spacing: -0.2px;
      }

      .hero-sub-meta {
        position: relative;
        z-index: 2;
        font-size: 11px;
        font-weight: 600;
        color: #a7f3d0;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 6px;
      }

      .hero-stats-row {
        position: relative;
        z-index: 2;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
      }

      @media (max-width: 420px) {
        .hero-stats-row {
          gap: 4px;
        }
      }

      .hero-stat-pill {
        background: rgba(0, 0, 0, 0.22);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 12px;
        padding: 6px 2px 6px;
        text-align: center;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
      }

      .hero-stat-pill:hover {
        transform: translateY(-2px);
        background: rgba(0, 0, 0, 0.35);
        border-color: rgba(251, 191, 36, 0.4);
      }

      .hero-stat-pill:active {
        transform: scale(0.94);
      }

      .hero-stat-pill.pill-active {
        background: rgba(251, 191, 36, 0.18);
        border: 1.5px solid #fbbf24;
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
      }

      .hero-pill-lbl {
        font-size: 8px;
        font-weight: 700;
        color: #a7f3d0;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        line-height: 1;
        margin-bottom: 3px;
      }

      .hero-stat-pill.pill-active .hero-pill-lbl {
        color: #fef08a;
      }

      .hero-pill-val {
        font-size: 10.5px;
        font-weight: 800;
        color: #ffffff;
        line-height: 1;
        white-space: nowrap;
      }

      .hero-stat-pill.pill-active .hero-pill-val {
        color: #fbbf24;
      }

      .mobile-info-banner {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        border-radius: 20px;
        padding: 20px;
        color: white;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }

      .mobile-info-badge {
        background: #fbbf24;
        color: #78350f;
        font-size: 10px;
        font-weight: 800;
        padding: 4px 10px;
        border-radius: 6px;
        text-transform: uppercase;
      }

      /* ===== MODERN MOBILE DASHBOARD ===== */
      .mobile-dash-section {
        margin-bottom: 26px;
      }

      .mobile-dash-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
      }

      .mobile-dash-card {
        border-radius: 16px;
        padding: 12px 14px;
        color: #fff;
        position: relative;
        overflow: hidden;
        box-shadow: 0 8px 18px -10px rgba(15, 23, 42, 0.35);
        display: flex;
        flex-direction: column;
      }

      .mobile-dash-card::after {
        content: '';
        position: absolute;
        top: -30px;
        right: -30px;
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
      }

      .mobile-dash-card.grad-blue {
        background: linear-gradient(135deg, #3b82f6, #2563eb);
      }

      .mobile-dash-card.grad-emerald {
        background: linear-gradient(135deg, #10b981, #059669);
      }

      .mobile-dash-card.grad-purple {
        background: linear-gradient(135deg, #8b5cf6, #6d28d9);
      }

      .mobile-dash-card.grad-orange,
      .examon-stat-card {
        background: linear-gradient(135deg, #f59e0b, #d97706);
      }

      .examon-stat-card {
        border-radius: 16px;
        padding: 12px 14px;
        color: #fff;
        position: relative;
        overflow: hidden;
        box-shadow: 0 8px 18px -10px rgba(15, 23, 42, 0.35);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
      }

      .examon-stat-card::after {
        content: '';
        position: absolute;
        top: -30px;
        right: -30px;
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        pointer-events: none;
      }

      .mobile-dash-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.22);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        margin-bottom: 8px;
        position: relative;
        z-index: 1;
      }

      .mobile-dash-label {
        font-size: 9.5px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        opacity: 0.85;
        margin-bottom: 1px;
        position: relative;
        z-index: 1;
      }

      .mobile-dash-value {
        font-size: 24px;
        font-weight: 800;
        line-height: 1.1;
        position: relative;
        z-index: 1;
      }

      .mobile-dash-value-sm {
        font-size: 17px;
        text-transform: capitalize;
        line-height: 1.3;
      }

      .mobile-dash-chip {
        display: inline-block;
        font-size: 9px;
        font-weight: 700;
        background: rgba(255, 255, 255, 0.2);
        padding: 3px 8px;
        border-radius: 999px;
        margin-top: auto;
        width: fit-content;
        position: relative;
        z-index: 1;
      }

      .mobile-dash-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
      }

      .mobile-dash-row {
        display: flex;
        align-items: center;
        gap: 12px;
        background: #fff;
        border: 1px solid #f1f5f9;
        border-radius: 14px;
        padding: 12px 14px;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
        cursor: pointer;
        transition: transform 0.15s ease;
      }

      .mobile-dash-row:active {
        transform: scale(0.98);
      }

      .mobile-dash-row-icon {
        width: 40px;
        height: 40px;
        border-radius: 11px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        flex-shrink: 0;
      }

      .mobile-dash-row-body {
        flex: 1;
        min-width: 0;
      }

      .mobile-dash-row-title {
        font-size: 13px;
        font-weight: 700;
        color: #1e293b;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .mobile-dash-row-sub {
        font-size: 11px;
        color: #64748b;
        margin-top: 2px;
      }

      .mobile-dash-empty {
        background: #f8fafc;
        border: 1px dashed #cbd5e1;
        border-radius: 14px;
        padding: 12px 14px;
        text-align: center;
        color: #94a3b8;
      }

      .mobile-dash-empty i {
        font-size: 16px;
        display: inline-block;
        margin-right: 6px;
        vertical-align: -2px;
      }

      .mobile-dash-empty p {
        font-size: 12px;
        font-weight: 600;
        display: inline;
      }

      /* ===== PAPAN RANKING ===== */
      .ranking-section {
        margin-bottom: 28px;
      }

      .ranking-chips {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
      }

      .ranking-chips::-webkit-scrollbar {
        display: none;
      }

      .ranking-chip {
        flex-shrink: 0;
        padding: 8px 16px;
        border-radius: 999px;
        background: #f1f5f9;
        border: 1px solid #e2e8f0;
        color: #475569;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s;
        -webkit-tap-highlight-color: transparent;
      }

      .ranking-chip.active {
        background: linear-gradient(135deg, #6366f1, #8b5cf6);
        border-color: transparent;
        color: #fff;
        box-shadow: 0 6px 14px -4px rgba(99, 102, 241, 0.5);
      }

      /* ===== PAPAN RANKING (ENHANCED PODIUM & 3X4 STUDENT PHOTO) ===== */
      .ranking-podium {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        align-items: end;
        margin-top: 6px;
      }

      .rank-item {
        border-radius: 20px;
        padding: 18px 8px 14px 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        position: relative;
        overflow: visible;
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
      }

      .rank-item:active {
        transform: scale(0.98);
      }

      .rank-item::after {
        content: '';
        position: absolute;
        top: -26px;
        right: -26px;
        width: 75px;
        height: 75px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.15);
        pointer-events: none;
      }

      .rank-gold {
        background: linear-gradient(160deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
        color: #fff;
        padding-top: 26px;
        box-shadow: 0 14px 28px -6px rgba(217, 119, 6, 0.55), 0 0 1px 1px rgba(254, 240, 138, 0.3);
        z-index: 3;
      }

      .rank-silver {
        background: linear-gradient(160deg, #94a3b8 0%, #64748b 60%, #475569 100%);
        color: #fff;
        padding-top: 18px;
        box-shadow: 0 10px 22px -6px rgba(100, 116, 139, 0.45);
        z-index: 2;
      }

      .rank-bronze {
        background: linear-gradient(160deg, #ea580c 0%, #c2410c 60%, #9a3412 100%);
        color: #fff;
        padding-top: 18px;
        box-shadow: 0 10px 22px -6px rgba(194, 65, 12, 0.45);
        z-index: 2;
      }

      .rank-empty {
        background: #f8fafc;
        border: 1.5px dashed #cbd5e1;
        min-height: 140px;
        border-radius: 20px;
        align-items: center;
        justify-content: center;
        box-shadow: none;
      }

      /* Crown & Ranking Badges */
      .rank-crown {
        position: relative;
        z-index: 2;
        margin-bottom: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .rank-crown i {
        font-size: 22px;
        color: #fef08a;
        filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
        animation: crownFloat 3s ease-in-out infinite;
      }

      @keyframes crownFloat {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-3px); }
      }

      .rank-num {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 800;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
      }

      .rank-num-silver {
        background: linear-gradient(135deg, #f8fafc, #cbd5e1);
        color: #334155;
        border: 1.5px solid #ffffff;
      }

      .rank-num-bronze {
        background: linear-gradient(135deg, #ffedd5, #fdba74);
        color: #7c2d12;
        border: 1.5px solid #ffffff;
      }

      /* Container Pas Foto 3x4 Formal */
      .rank-photo-wrap {
        position: relative;
        z-index: 1;
        margin-bottom: 8px;
        display: flex;
        justify-content: center;
      }

      /* Bingkai Pas Foto 3x4 Formal dengan Sedikit Radius */
      .rank-photo-frame {
        width: 52px;
        height: 69px; /* rasio 3:4 */
        border-radius: 9px;
        overflow: hidden;
        position: relative;
        background: #f1f5f9;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
      }

      /* Bingkai Juara 1 (Emas Mewah) */
      .rank-photo-gold {
        width: 60px;
        height: 80px; /* rasio 3:4 lebih megah */
        border-radius: 10px;
        border: 2.5px solid #fef08a;
        outline: 2px solid rgba(255, 255, 255, 0.65);
        outline-offset: 1.5px;
        box-shadow: 0 0 16px rgba(254, 240, 138, 0.75), 0 6px 14px rgba(0, 0, 0, 0.35);
        background: linear-gradient(135deg, #fef3c7, #fde68a);
      }

      /* Bingkai Juara 2 (Perak / Silver) */
      .rank-photo-silver {
        border: 2.5px solid #f8fafc;
        outline: 2px solid rgba(226, 232, 240, 0.6);
        outline-offset: 1.5px;
        box-shadow: 0 0 12px rgba(241, 245, 249, 0.65), 0 4px 10px rgba(0, 0, 0, 0.28);
        background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
      }

      /* Bingkai Juara 3 (Perunggu / Bronze) */
      .rank-photo-bronze {
        border: 2.5px solid #ffedd5;
        outline: 2px solid rgba(254, 215, 170, 0.6);
        outline-offset: 1.5px;
        box-shadow: 0 0 12px rgba(254, 215, 170, 0.65), 0 4px 10px rgba(0, 0, 0, 0.28);
        background: linear-gradient(135deg, #ffedd5, #fed7aa);
      }

      /* Gambar Pas Foto 3x4 */
      .rank-photo-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
        display: block;
      }

      /* Fallback Avatar Pas Foto 3x4 jika tidak ada foto / error */
      .rank-photo-fallback {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        color: #1e293b;
        position: relative;
        background: rgba(255, 255, 255, 0.95);
      }

      .rank-photo-initial {
        font-size: 20px;
        font-weight: 800;
        line-height: 1;
        color: #1e293b;
      }

      .rank-photo-gold .rank-photo-initial {
        font-size: 24px;
      }

      .rank-photo-icon {
        font-size: 9px;
        color: #64748b;
        margin-top: 3px;
        opacity: 0.8;
      }

      /* Nama Siswa (Full Name, Tidak Terputus Paksa) */
      .rank-name {
        font-size: 11px;
        font-weight: 700;
        color: #ffffff;
        line-height: 1.25;
        width: 100%;
        max-width: 100%;
        margin-top: 4px;
        margin-bottom: 4px;
        white-space: normal;
        word-break: break-word;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 28px;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        position: relative;
        z-index: 1;
      }

      /* Nilai / Rata-rata Skor */
      .rank-score-wrap {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.22);
        border: 1px solid rgba(255, 255, 255, 0.28);
        border-radius: 999px;
        padding: 2px 8px;
        margin-top: 2px;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
        position: relative;
        z-index: 1;
      }

      .rank-score {
        font-size: 13px;
        font-weight: 800;
        color: #ffffff;
        letter-spacing: -0.01em;
      }

      .rank-label {
        font-size: 9px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        background: rgba(255, 255, 255, 0.28);
        color: #ffffff;
        padding: 3px 9px;
        border-radius: 999px;
        margin-top: 6px;
        position: relative;
        z-index: 1;
        border: 1px solid rgba(255, 255, 255, 0.35);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
      }

      /* Single Juara Card (Bila hanya ada 1 siswa dengan nilai) */
      .rank-single-wrap {
        display: flex;
        justify-content: center;
      }

      .rank-item-single {
        width: 100%;
        max-width: 300px;
        border-radius: 22px;
        padding: 26px 16px;
        background: linear-gradient(160deg, #f59e0b 0%, #d97706 60%, #b45309 100%);
        color: #fff;
        box-shadow: 0 14px 30px -8px rgba(217, 119, 6, 0.55);
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        position: relative;
        overflow: visible;
      }

      .rank-item-single::after {
        content: '';
        position: absolute;
        top: -30px;
        right: -30px;
        width: 90px;
        height: 90px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.15);
        pointer-events: none;
      }

      .rank-item-single .rank-photo-frame {
        width: 66px;
        height: 88px;
        border-radius: 10px;
      }

      .rank-item-single .rank-name {
        font-size: 14px;
        min-height: auto;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        margin-top: 6px;
        margin-bottom: 6px;
      }

      .rank-item-single .rank-score {
        font-size: 16px;
      }

      .bottom-nav {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100vw;
        height: 64px;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        z-index: 100;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
        transform: translateZ(0);
      }

      /* Ruang kosong di bawah konten admin agar tidak tertutup bottom-nav mobile */
      #admin-content {
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important;
      }

      /* ==========================================================================
         OPTIMASI TAMPILAN KHUSUS TABLET ANDROID (≥ 768px) - EKSEKUTIF & PROPORSIONAL
         ========================================================================== */
      @media (min-width: 768px) {
        /* Kontainer Utama Terpusat Seimbang */
        #admin-content {
          padding: 24px 28px !important;
          padding-bottom: 120px !important;
          background-color: #f8fafc !important;
        }

        #admin-content > div,
        .academic-hero-card,
        #examon-hero-header-card,
        .mobile-dash-section,
        .ranking-section {
          max-width: 1040px !important;
          margin-left: auto !important;
          margin-right: auto !important;
        }

        /* 1. Hero Header Card Tablet: Proporsi Rapi & Lapang */
        .academic-hero-card {
          padding: 22px 26px !important;
          border-radius: 26px !important;
          margin-bottom: 22px !important;
          box-shadow: 0 12px 30px -8px rgba(79, 70, 229, 0.45) !important;
        }

        /* 2a. Menu Utama Grid Tablet Admin Panel: 4 Kolom Sempurna (16 Menu Pas 4 Baris) */
        #page-admin .mobile-menu-grid,
        #admin-content .mobile-menu-grid {
          display: grid !important;
          grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
          gap: 14px 12px !important;
          margin-bottom: 26px !important;
        }
        #page-admin .mobile-menu-grid .mobile-menu-item,
        #admin-content .mobile-menu-grid .mobile-menu-item {
          width: auto !important;
          max-width: none !important;
          flex: none !important;
        }

        /* 2b. Menu Utama Grid Tablet Siswa (Portal Siswa): 4 Kolom Penuh Simetris (Tanpa Kolom Kosong) */
        #page-student-dashboard .mobile-menu-grid {
          grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
          gap: 16px 14px !important;
          margin-bottom: 26px !important;
        }

        #page-student-dashboard .mobile-menu-item {
          padding: 16px 10px 14px !important;
          border-radius: 22px !important;
        }

        #page-student-dashboard .mobile-menu-icon {
          width: 58px !important;
          height: 58px !important;
          border-radius: 18px !important;
          font-size: 24px !important;
        }

        #page-student-dashboard .mobile-menu-label {
          font-size: 13px !important;
          font-weight: 800 !important;
          margin-top: 10px !important;
          line-height: 1.25 !important;
        }

        /* 2c. Kontainer Portal Siswa di Layar Tablet: Lapang & Nyaman */
        #page-student-dashboard header > div,
        #page-student-dashboard main {
          max-width: 960px !important;
        }

        #page-student-dashboard main {
          padding: 24px 28px 48px !important;
        }

        #page-student-dashboard header {
          padding-left: 24px !important;
          padding-right: 24px !important;
        }

        .mobile-menu-item {
          padding: 15px 10px 13px !important;
          border-radius: 20px !important;
          border: 1px solid #e2e8f0 !important;
          box-shadow: 0 4px 14px -3px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02) !important;
          transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
        }

        .mobile-menu-item:hover {
          transform: translateY(-3px) !important;
          box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.1) !important;
          border-color: #cbd5e1 !important;
        }

        .mobile-menu-item:active {
          transform: scale(0.95) !important;
        }

        .mobile-menu-icon {
          width: 54px !important;
          height: 54px !important;
          border-radius: 16px !important;
          font-size: 22px !important;
        }

        .mobile-menu-label {
          font-size: 11.5px !important;
          font-weight: 700 !important;
          margin-top: 8px !important;
          line-height: 1.25 !important;
        }

        /* 3. Dashboard Metrik Statistik: 1 Baris Sejajar 4 Kolom */
        .mobile-dash-grid {
          grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
          gap: 14px !important;
          margin-bottom: 24px !important;
        }

        .mobile-dash-card {
          padding: 16px 18px !important;
          border-radius: 20px !important;
          min-height: 104px !important;
          box-shadow: 0 8px 20px -8px rgba(15, 23, 42, 0.25) !important;
        }

        /* 4. Podium Papan Ranking Siswa Terpusat di Tengah */
        .ranking-podium {
          max-width: 640px !important;
          margin-left: auto !important;
          margin-right: auto !important;
          gap: 16px !important;
        }

        /* 5. Bottom Navigation Dock Tablet: Nyaman Dijangkau Jempol */
        .bottom-nav {
          height: 66px !important;
          padding-left: 12% !important;
          padding-right: 12% !important;
          box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
        }

        /* 6. Optimasi Menu Jadwal Ujian (dash-exams) Mode Tablet (≥ 768px) */
        #filter-exams-jenjang-wrapper {
          max-width: 1040px !important;
          margin-left: auto !important;
          margin-right: auto !important;
          padding: 14px 18px !important;
          border-radius: 20px !important;
        }

        .exam-head {
          max-width: 1040px !important;
          margin-left: auto !important;
          margin-right: auto !important;
          padding: 14px 18px !important;
          border-radius: 20px !important;
          box-shadow: 0 4px 18px -4px rgba(15, 23, 42, 0.07) !important;
        }

        #exams-btn-row {
          display: grid !important;
          grid-template-columns: 1fr 1fr !important;
          gap: 12px !important;
          margin-bottom: 10px !important;
        }

        .exam-btn-add, #qr-open-gallery {
          height: 42px !important;
          min-height: 42px !important;
          font-size: 13px !important;
          border-radius: 14px !important;
        }

        .exam-search input {
          height: 42px !important;
          font-size: 13px !important;
          border-radius: 14px !important;
        }

        .exam-filter-row select {
          height: 40px !important;
          min-height: 40px !important;
          font-size: 12px !important;
          border-radius: 12px !important;
        }

        .exam-groups {
          max-width: 1040px !important;
          margin-left: auto !important;
          margin-right: auto !important;
        }

        .exam-group {
          margin-bottom: 24px !important;
        }

        .exam-group-head {
          padding: 10px 18px !important;
          border-radius: 16px !important;
          font-size: 14px !important;
        }

        .exam-carousel {
          display: grid !important;
          grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
          gap: 16px !important;
          overflow-x: visible !important;
          padding-bottom: 8px !important;
        }

        .exam-carousel .exam-row {
          width: 100% !important;
          min-width: 0 !important;
          margin-right: 0 !important;
          border-radius: 20px !important;
          padding: 18px !important;
          box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06) !important;
          transition: all 0.25s ease !important;
        }

        .exam-carousel .exam-row:hover {
          transform: translateY(-2px) !important;
          box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.12) !important;
        }

        .exam-carousel-dots,
        .exam-dots {
          display: none !important;
        }

        /* 7. Optimasi Menu Bank Soal (dash-questions) Mode Tablet (≥ 768px) */
        #filter-banksoal-jenjang-wrapper {
          max-width: 1040px !important;
          margin-left: auto !important;
          margin-right: auto !important;
          padding: 14px 18px !important;
          border-radius: 20px !important;
        }

        #bank-soal-view,
        #bank-soal-cards-container,
        #q-table-container,
        #form-add-q {
          max-width: 1040px !important;
          margin-left: auto !important;
          margin-right: auto !important;
        }

        .subj-group-card {
          border-radius: 22px !important;
          border: 1px solid #e2e8f0 !important;
          margin-bottom: 22px !important;
          box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.06) !important;
          overflow: hidden !important;
        }

        .subj-group-head {
          padding: 16px 22px !important;
          border-bottom: 1px solid #f1f5f9 !important;
        }

        .hscroll-row {
          display: flex !important;
          flex-wrap: wrap !important;
          gap: 14px !important;
          padding: 18px 22px 22px !important;
          overflow-x: visible !important;
        }

        .result-mini-card {
          width: calc(25% - 11px) !important;
          min-width: 180px !important;
          padding: 16px !important;
          border-radius: 18px !important;
          box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
          transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
        }

        .result-mini-card:hover {
          transform: translateY(-3px) !important;
          box-shadow: 0 10px 22px rgba(99, 102, 241, 0.18) !important;
          border-color: #6366f1 !important;
        }
      }

      /* ==========================================================================
         ADAPTASI DESKTOP PRO ADMIN PANEL (PC & LAPTOP WEB HOSTING ≥ 1024px)
         ========================================================================== */
      @media (min-width: 1024px) {
        /* 1. Tampilkan Sidebar Kiri Permanen & Rapi */
        #admin-sidebar {
          display: flex !important;
          position: relative !important;
          transform: none !important;
          flex-shrink: 0 !important;
          height: 100% !important;
          z-index: 30 !important;
          box-shadow: 4px 0 20px rgba(0, 0, 0, 0.06) !important;
        }

        /* 2. Tampilkan Header Atas Desktop */
        header.bg-white\/80,
        #admin-header {
          display: flex !important;
          flex-shrink: 0 !important;
        }

        /* 3. Sembunyikan Navigasi Bawah Mobile pada Layar PC Desktop */
        #bottom-nav-mobile,
        .bottom-nav {
          display: none !important;
        }

        /* 4. Area Konten Utama Desktop (Padding Rapi & Scroll Lancar) */
        #admin-content {
          padding: 28px 32px !important;
          padding-bottom: 48px !important;
          background-color: #f8fafc !important;
        }

        #admin-content > div,
        .academic-hero-card,
        #examon-hero-header-card,
        .mobile-dash-section,
        .ranking-section {
          max-width: 1240px !important;
          margin-left: auto !important;
          margin-right: auto !important;
        }

        /* 5. Grid Menu Utama di Desktop: 4 Kolom Proporsional */
        #page-admin .mobile-menu-grid,
        #admin-content .mobile-menu-grid {
          display: grid !important;
          grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
          gap: 16px 14px !important;
          margin-bottom: 28px !important;
        }
      }

      /* Optimalisasi Tablet Landscape Lebar (768px - 1023px) */
      @media (min-width: 768px) and (max-width: 1023px) {
        .bottom-nav {
          padding-left: 12% !important;
          padding-right: 12% !important;
        }
      }

      /* ==========================================================================
         DEFINITIVE SCROLLING & ISOLATION ENGINE (ANTI TUMPUK LOGIN VS DASHBOARD)
         ========================================================================== */
      #page-admin.hidden,
      #page-login.hidden,
      #page-exam.hidden {
        display: none !important;
      }

      #page-login:not(.hidden) {
        display: flex !important;
      }

      #page-admin:not(.hidden) {
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        overflow: hidden !important;
        display: flex !important;
      }

      #page-admin > div.flex-1 {
        min-height: 0 !important;
        height: 100% !important;
        flex: 1 1 0% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
      }

      #admin-content {
        flex: 1 1 0% !important;
        min-height: 0 !important;
        height: auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-y: contain !important;
      }

      /* Sembunyikan bottom-nav saat keyboard muncul */
      #bottom-nav-mobile.kb-hidden {
        display: none !important;
      }
      #admin-content.kb-padding {
        padding-bottom: 16px;
      }

      .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: #94a3b8;
        cursor: pointer;
        flex: 1;
        position: relative;
        transition: color 0.2s ease;
        -webkit-tap-highlight-color: transparent;
      }

      .bottom-nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%) scaleX(0);
        width: 32px;
        height: 3px;
        background: #2563eb;
        border-radius: 0 0 4px 4px;
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      }

      .bottom-nav-item.active {
        color: #2563eb;
      }

      .bottom-nav-item.active::before {
        transform: translateX(-50%) scaleX(1);
      }

      .bottom-nav-item i {
        font-size: 19px;
        transition: transform 0.2s;
      }

      .bottom-nav-item:active i {
        transform: scale(0.85);
      }

      .bottom-nav-item span {
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.01em;
      }

      .bottom-nav-item.logout-item {
        color: #dc2626;
      }

      .bottom-nav-item.logout-item i {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: rgba(239, 68, 68, 0.12);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
      }

      .bottom-nav-item.logout-item:active i {
        transform: scale(0.85);
      }

      /* Mobile top bar with back button */
      .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px 4px;
        margin-bottom: 8px;
      }

      .mobile-back-btn {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: #f1f5f9;
        color: #475569;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.2s;
        border: 1px solid #e2e8f0;
        flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
      }

      .mobile-back-btn:active {
        background: #e2e8f0;
        transform: scale(0.9);
      }

      .mobile-topbar-title {
        font-size: 15px;
        font-weight: 700;
        color: #1e293b;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .mobile-logout-btn {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: #fef2f2;
        color: #ef4444;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        cursor: pointer;
        transition: all 0.2s;
        border: 1px solid #fecaca;
        flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
      }

      .mobile-logout-btn:active {
        background: #fee2e2;
        transform: scale(0.9);
      }

    /* ===== Grup slide horizontal mapel & kelas ===== */
    .hscroll-row {
      display: flex;
      gap: 12px;
      overflow-x: auto;
      padding: 4px 4px 12px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      scroll-snap-type: x proximity;
    }

    .hscroll-row::-webkit-scrollbar {
      display: none;
    }

    .hscroll-row > * {
      flex-shrink: 0;
      scroll-snap-align: start;
    }

    .date-divider {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 12px 0 16px;
    }

    .date-divider::before,
    .date-divider::after {
      content: "";
      flex: 1;
      height: 1px;
      background: linear-gradient(to right, transparent, #cbd5e1);
    }

    .date-divider::after {
      background: linear-gradient(to left, transparent, #cbd5e1);
    }

    .date-divider .date-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: linear-gradient(135deg, #4f46e5, #6366f1);
      color: #fff;
      font-weight: 800;
      font-size: 13px;
      padding: 8px 18px;
      border-radius: 999px;
      box-shadow: 0 6px 14px rgba(79, 70, 229, 0.3);
      white-space: nowrap;
    }

    .subj-group-card {
      background: #fff;
      border: 1px solid #e2e8f0;
      border-radius: 18px;
      box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
      overflow: hidden;
      transition: box-shadow 0.25s;
    }

    .subj-group-card:hover {
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
    }

    .subj-group-head {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 18px;
      border-bottom: 1px solid #f1f5f9;
      background: linear-gradient(90deg, #f8fafc, #ffffff);
      cursor: pointer;
      transition: background 0.2s;
    }

    .subj-group-head:hover {
      background: #f8fafc;
    }

    .result-mini-card {
      flex-shrink: 0;
      scroll-snap-align: start;
      width: 175px;
      background: linear-gradient(180deg, #f8fafc, #ffffff);
      border: 1.5px solid #e2e8f0;
      border-radius: 14px;
      padding: 14px;
      text-align: left;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      flex-direction: column;
      gap: 8px;
      -webkit-tap-highlight-color: transparent;
    }

    .result-mini-card:hover {
      border-color: #6366f1;
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(99, 102, 241, 0.16);
    }

    .result-mini-card .mini-icon {
      width: 38px;
      height: 38px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
    }

    .result-mini-card .mini-class {
      font-weight: 800;
      font-size: 15px;
      color: #1e293b;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

.result-mini-card .mini-count {
      font-size: 12px;
      font-weight: 600;
      color: #64748b;
    }

    /* ===== MODAL LOG AKTIVITAS ===== */
    .al-modal-mask {
      position: fixed;
      inset: 0;
      z-index: 9999;
      background: rgba(15, 23, 42, 0.6);
      display: flex;
      align-items: flex-end;
      justify-content: center;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.25s, visibility 0.25s;
      -webkit-tap-highlight-color: transparent;
    }

    .al-modal-mask.show {
      opacity: 1;
      visibility: visible;
    }

    .al-modal {
      width: 100%;
      max-width: 520px;
      background: #fff;
      border-radius: 20px 20px 0 0;
      max-height: 85vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      transform: translateY(24px);
      transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.25);
    }

    .al-modal-mask.show .al-modal {
      transform: translateY(0);
    }

    .al-modal-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 16px 16px 12px;
      border-bottom: 1px solid #f1f5f9;
      position: sticky;
      top: 0;
      background: #fff;
      z-index: 2;
    }

    .al-modal-title {
      display: flex;
      align-items: center;
      gap: 9px;
      font-size: 15px;
      font-weight: 800;
      color: #1e293b;
    }

    .al-modal-title i {
      color: #6366f1;
    }

    .al-modal-close {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      border: 1px solid #e2e8f0;
      background: #f8fafc;
      color: #64748b;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 14px;
      transition: all 0.15s;
    }

    .al-modal-close:active {
      background: #e2e8f0;
      transform: scale(0.9);
    }

    .al-modal-body {
      padding: 12px 16px 20px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 10px;
      -webkit-overflow-scrolling: touch;
    }

    @media (min-width: 640px) {
      .al-modal-mask {
        align-items: center;
        padding: 20px;
      }

      .al-modal {
        border-radius: 20px;
      }
    }

    /* ==========================================================================
       EXAMON LOGIN PAGE — MODERN PREMIUM DESIGN SYSTEM
       ========================================================================== */
    .login-backdrop {
      position: relative;
      background: radial-gradient(circle at top right, #1e1b4b 0%, #0f172a 60%, #090d16 100%);
      overflow: hidden;
    }

    .login-backdrop-glow {
      position: absolute;
      top: -15%;
      left: 50%;
      transform: translateX(-50%);
      width: 480px;
      height: 380px;
      background: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, rgba(139, 92, 246, 0.15) 45%, transparent 70%);
      filter: blur(40px);
      pointer-events: none;
      z-index: 1;
    }

    .login-card-premium {
      background: rgba(255, 255, 255, 0.94);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, 0.8);
      box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(99, 102, 241, 0.12);
      border-radius: 28px;
    }

    .login-logo-frameless-wrap {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 14px;
    }

    .login-logo-frameless {
      width: auto;
      max-width: 190px;
      height: auto;
      max-height: 84px;
      object-fit: contain !important;
      border-radius: 0 !important;
      border: none !important;
      box-shadow: none !important;
      background: transparent !important;
      overflow: visible !important;
      transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .login-logo-frameless:hover {
      transform: translateY(-2px) scale(1.04);
      box-shadow: none !important;
    }

    .examon-serif-brand {
      font-family: 'Playfair Display', 'Merriweather', 'Times New Roman', Georgia, serif !important;
      font-weight: 900;
      font-size: 2.3rem;
      color: #0f172a;
      letter-spacing: -0.5px;
      line-height: 1.15;
      margin-bottom: 2px;
    }

    .examon-serif-brand .examon-serif-gold {
      color: #d97706;
      font-style: italic;
      font-weight: 900;
    }

    .examon-serif-tagline {
      font-family: 'Playfair Display', 'Merriweather', 'Times New Roman', Georgia, serif !important;
      font-weight: 700;
      font-size: 0.95rem;
      color: #1e293b;
      letter-spacing: 0.1px;
      margin-top: 3px;
    }

    .examon-serif-tagline .examon-serif-gold-sub {
      color: #d97706;
      font-style: italic;
      font-weight: 800;
    }

    .login-divider-ornament {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      margin: 14px 0 20px;
    }

    .login-divider-line {
      flex: 1;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.25), transparent);
    }

    .login-input-group {
      position: relative;
      display: flex;
      align-items: center;
    }

    .login-input-group input {
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .login-input-group input:focus {
      background: #ffffff;
      border-color: #4f46e5;
      box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    }

    .login-btn-cta {
      background: linear-gradient(135deg, #4338ca 0%, #4f46e5 50%, #7c3aed 100%);
      box-shadow: 0 10px 25px -3px rgba(79, 70, 229, 0.45), 0 4px 6px -2px rgba(79, 70, 229, 0.2);
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .login-btn-cta:hover {
      transform: translateY(-1.5px);
      box-shadow: 0 14px 30px -4px rgba(79, 70, 229, 0.55);
    }

    .login-btn-cta:active {
      transform: scale(0.98);
    }

    .login-footer-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 14px;
      border-radius: 9999px;
      background: rgba(241, 245, 249, 0.8);
      border: 1px solid rgba(226, 232, 240, 0.8);
      font-size: 12px;
      font-weight: 600;
      color: #475569;
      transition: all 0.2s ease;
      text-decoration: none;
    }

    .login-footer-pill:hover {
      background: #eef2ff;
      border-color: rgba(99, 102, 241, 0.3);
      color: #4338ca;
      transform: translateY(-1px);
    }

    /* Mobile Viewport Keyboard Safety & Anti-Distortion */
    #page-login {
      min-height: 100vh;
      min-height: 100dvh;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding-top: max(1rem, env(safe-area-inset-top));
      padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
    #page-login.hidden,
    #page-student-dashboard.hidden,
    #page-exam.hidden {
      display: none !important;
    }

    @media (max-height: 700px) {
      .login-card-premium {
        padding: 1.25rem 1.5rem !important;
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
      }
      .login-logo-frameless-wrap {
        margin-bottom: 6px !important;
      }
      .login-logo-frameless-wrap {
        margin-bottom: 8px !important;
      }
      .login-logo-frameless {
        width: auto !important;
        max-width: 160px !important;
        height: auto !important;
        max-height: 72px !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        object-fit: contain !important;
        background: transparent !important;
      }
      .examon-serif-brand {
        font-size: 1.85rem !important;
      }
      .login-divider-ornament {
        margin-top: 4px !important;
        margin-bottom: 8px !important;
      }
    }

    /* ==========================================================================
       MEDIA SOAL (VIDEO EMBED & HYBRID AUDIO CAPSULE)
       ========================================================================== */
    .exam-media-container {
      margin: 14px 0;
      width: 100%;
    }

    .exam-video-wrapper {
      position: relative;
      width: 100%;
      max-width: 680px;
      aspect-ratio: 16 / 9;
      margin: 0 auto;
      border-radius: 16px;
      overflow: hidden;
      background: #090d16;
      border: 1px solid #cbd5e1;
      box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12);
    }

    .exam-video-wrapper iframe {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border: none;
    }

    .exam-audio-capsule {
      background: linear-gradient(135deg, #ffffff 0%, #f5f7ff 100%);
      border: 1.5px solid #c7d2fe;
      border-radius: 18px;
      padding: 14px 18px;
      margin: 10px 0 14px 0;
      box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.1);
      display: flex;
      flex-direction: column;
      gap: 10px;
      user-select: none;
      transition: all 0.2s ease;
    }

    .exam-audio-capsule.locked {
      background: #f8fafc;
      border-color: #e2e8f0;
      opacity: 0.85;
    }

    .audio-header-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .audio-title-pill {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: #4338ca;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .audio-limit-badge {
      font-size: 11px;
      font-weight: 700;
      padding: 3px 10px;
      border-radius: 9999px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      transition: all 0.2s;
    }

    .audio-limit-badge.active {
      background: #e0e7ff;
      color: #3730a3;
      border: 1px solid #c7d2fe;
    }

    .audio-limit-badge.locked {
      background: #fee2e2;
      color: #b91c1c;
      border: 1px solid #fecaca;
    }

    .audio-controls-row {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .audio-play-btn {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
      color: white;
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
      transition: all 0.15s ease;
      flex-shrink: 0;
    }

    .audio-play-btn:hover:not(:disabled) {
      transform: scale(1.05);
      box-shadow: 0 6px 16px rgba(79, 70, 229, 0.45);
    }

    .audio-play-btn:active:not(:disabled) {
      transform: scale(0.95);
    }

    .audio-play-btn:disabled {
      background: #94a3b8;
      cursor: not-allowed;
      box-shadow: none;
      transform: none;
    }

    .audio-track-wrap {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .audio-progress-bar {
      width: 100%;
      height: 6px;
      background: #e2e8f0;
      border-radius: 4px;
      position: relative;
      cursor: pointer;
      overflow: hidden;
    }

    .audio-progress-fill {
      height: 100%;
      background: #4f46e5;
      border-radius: 4px;
      width: 0%;
      transition: width 0.1s linear;
    }

    .audio-time-row {
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      font-family: monospace;
      color: #64748b;
      font-weight: 600;
    }

    /* ==========================================================================
       VIDEO SOAL CAPSULE + BATAS PUTAR (cermin audio, tema merah) — v2.0.18+patch
       ========================================================================== */
    .exam-video-capsule {
      background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
      border: 1.5px solid #fecaca;
      border-radius: 18px;
      padding: 14px 16px;
      margin: 10px 0 14px 0;
      box-shadow: 0 8px 20px -4px rgba(220, 38, 38, 0.1);
      display: flex;
      flex-direction: column;
      gap: 10px;
      user-select: none;
      transition: all 0.2s ease;
    }

    .exam-video-capsule.locked {
      background: #f8fafc;
      border-color: #e2e8f0;
      opacity: 0.9;
    }

    .video-header-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .video-title-pill {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: #b91c1c;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .video-limit-badge {
      font-size: 11px;
      font-weight: 700;
      padding: 3px 10px;
      border-radius: 9999px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      transition: all 0.2s;
    }

    .video-limit-badge.active {
      background: #fee2e2;
      color: #991b1b;
      border: 1px solid #fecaca;
    }

    .video-limit-badge.free {
      background: #dcfce7;
      color: #166534;
      border: 1px solid #bbf7d0;
    }

    .video-limit-badge.locked {
      background: #fee2e2;
      color: #b91c1c;
      border: 1px solid #fecaca;
    }

    .exam-video-wrapper.video-locked iframe,
    .exam-video-wrapper.video-locked video {
      filter: grayscale(1) blur(1px);
      pointer-events: none;
    }

    .video-gate-overlay {
      position: absolute;
      inset: 0;
      z-index: 5;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 10px;
      background: rgba(9, 13, 22, 0.78);
      border-radius: 16px;
      cursor: pointer;
      text-align: center;
      padding: 12px;
    }

    .video-gate-overlay p {
      color: #fecaca;
      font-size: 12px;
      font-weight: 700;
      margin: 0;
    }

    .video-gate-btn {
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
      color: #fff;
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      cursor: pointer;
      box-shadow: 0 6px 18px rgba(220, 38, 38, 0.5);
      transition: transform 0.15s ease;
    }

    .video-gate-btn:hover {
      transform: scale(1.06);
    }

    .video-locked-placeholder {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      background: #0f172a;
      color: #fca5a5;
      border-radius: 16px;
    }

    .video-locked-placeholder i {
      font-size: 28px;
    }

    .video-locked-placeholder p {
      font-size: 12px;
      font-weight: 700;
      margin: 0;
    }

    .exam-video-native {
      width: 100%;
      max-width: 680px;
      margin: 0 auto;
      border-radius: 16px;
      background: #090d16;
      display: block;
    }

    /* Mencegah kedipan card header lama di dashboard admin/guru */
    .mobile-header {
      display: none !important;
    }

    /* ==========================================================================
       TABLET & DESKTOP DOCKED EXAM INTERFACE (Min-Width: 768px)
       Membuat antarmuka ujian di tablet (iPad / Galaxy Tab) mengikuti layout Desktop:
       - Panel navigasi soal (#exam-nav) terpasang paten (docked) di kolom kanan
       - Kapsul timer stopwatch di tengah header tampil penuh dengan font mono tegas
       - Tombol floating bulat di mobile disembunyikan
       - Area pertanyaan (#question-container) luas dan nyaman disentuh
       ========================================================================== */
    @media (min-width: 768px) {
      #page-exam {
        height: 100vh !important;
        height: 100dvh !important;
        overflow: hidden !important;
      }

      /* Header Tablet */
      #page-exam .exam-header {
        height: 68px !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
      }

      #page-exam .timer-capsule {
        display: flex !important;
        padding: 0.5rem 1.25rem !important;
        border-radius: 0.75rem !important;
        font-size: 1.125rem !important;
      }

      /* Area Utama Ujian & Navigasi Tersemat (Docked 2-Column) */
      #page-exam .flex-1.overflow-hidden.relative {
        display: flex !important;
        flex-direction: row !important;
      }

      #main-exam-area {
        flex: 1 1 0% !important;
        min-width: 0 !important;
        padding: 1.75rem 2rem !important;
      }

      #main-exam-area > div {
        max-width: 900px !important;
        margin: 0 auto !important;
        padding-bottom: 3rem !important;
      }

      /* Sidebar Navigasi Soal Terpasang Paten di Kanan (Docked) */
      #exam-nav {
        position: relative !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: none !important;
        width: 290px !important;
        min-width: 290px !important;
        max-width: 320px !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        box-shadow: -4px 0 15px -3px rgba(0, 0, 0, 0.05) !important;
        border-left: 1px solid #e2e8f0 !important;
        z-index: 20 !important;
      }

      /* Sembunyikan tombol floating navigasi di tablet */
      #page-exam > button[onclick*="toggleExamNav"],
      button.fixed.bottom-6.right-6 {
        display: none !important;
      }

      /* Grid Nomor Soal */
      #nav-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 0.5rem !important;
      }

      /* Card Soal Lebih Lega di Tablet */
      #question-container {
        padding: 2rem !important;
        border-radius: 1.25rem !important;
        min-height: 420px !important;
      }
    }

    /* ==========================================================================
       JEDA KOREKSI SOAL (CHECKPOINTS) VISUAL ENHANCEMENT
       ========================================================================== */
    .timer-capsule.timer-capsule-paused {
      background: rgba(120, 53, 15, 0.45) !important;
      border-color: rgba(245, 158, 11, 0.8) !important;
      box-shadow: 0 0 18px rgba(245, 158, 11, 0.3) !important;
      transition: all 0.3s ease;
    }

    .checkpoint-badge-anim {
      animation: pulse-amber-glow 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }

    @keyframes pulse-amber-glow {
      0%, 100% {
        opacity: 1;
        transform: scale(1);
      }
      50% {
        opacity: 0.88;
        transform: scale(0.97);
      }
    }

    /* ==========================================================================
       1. CEGAH FLICKER TOMBOL LAMA DI MANAJEMEN USER (dash-users)
       Menyembunyikan tombol teks bawaan lama secara instan via CSS sebelum
       toolbar 5-ikon [data-kn-unified] selesai disisipkan ke DOM.
       ========================================================================== */
    #admin-content button[onclick*="openImportUserModal"]:not(.kn-act):not([data-kn-icon]),
    #admin-content button[onclick*="openUserModal()"]:not(.kn-act):not([data-kn-icon]),
    #admin-content button[onclick*="handleClearDatabase"]:not(.kn-act):not([data-kn-icon]),
    #admin-content [data-kn-userscard] {
      display: none !important;
    }

    /* ==========================================================================
       2. ISOLASI PERAN GURU (ROLE GUARD KHUSUS ADMIN)
       Sembunyikan menu Database Cluster, Asisten AI, dan E-Sertifikat untuk Guru
       ========================================================================== */
    :is(html.role-guru, body.role-guru) #menu-db-clusters-sidebar,
    :is(html.role-guru, body.role-guru) #menu-db-clusters,
    :is(html.role-guru, body.role-guru) #menu-ai-assistant,
    :is(html.role-guru, body.role-guru) #sidebar-menu-ai-assistant,
    :is(html.role-guru, body.role-guru) #bottom-nav-ai-assistant,
    :is(html.role-guru, body.role-guru) #menu-sertifikat,
    :is(html.role-guru, body.role-guru) #mobile-menu-db-clusters,
    :is(html.role-guru, body.role-guru) #mobile-menu-ai-assistant,
    :is(html.role-guru, body.role-guru) #mobile-menu-sertifikat,
    :is(html.role-guru, body.role-guru) #card-db-clusters,
    :is(html.role-guru, body.role-guru) #card-ai-assistant,
    :is(html.role-guru, body.role-guru) #card-sertifikat,
    :is(html.role-guru, body.role-guru) #ai-assistant-fab {
      display: none !important;
    }
