/* SIAPIYA_CSP_MAIN_STYLESHEET_EXTRACTION_V36968 */
    /* ==============================================
       1. APPLE SYSTEM FONT & THEME VARIABLES
       ============================================== */
    :root {
      --bs-primary: #0066cc; /* Deep Blue Apple (Lebih Gelap & Solid) */
      --bs-primary-rgb: 0, 102, 204;
    }

    *, *::before, *::after { box-sizing: border-box; }

    html, body {
      width: 100%;
      max-width: 100%;
      height: 100%;
      margin: 0;
      overflow: hidden;
      overscroll-behavior: none;
    }

    body { 
      background-color: #f5f5f7; /* Abu-abu cerah khas background macOS */
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important; 
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      color: #1d1d1f; 
      transition: background-color 0.3s ease, color 0.3s ease;
      touch-action: manipulation;
    }

    img, svg, canvas, video { max-width: 100%; }
    .row { min-width: 0; }
    .table-responsive {
      max-width: 100%;
      overflow-x: auto;
      overscroll-behavior-x: contain;
      -webkit-overflow-scrolling: touch;
    }
    
    /* ==============================================
       2. LOGIN UI PREMIUM (Glassmorphism Apple)
       ============================================== */
    #loginScreen { 
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100vh;
      height: 100dvh;
      display: flex; 
      align-items: center; 
      justify-content: center; 
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
      padding: max(24px, env(safe-area-inset-top)) 12px max(24px, env(safe-area-inset-bottom));
      background: linear-gradient(135deg, #005bb5 0%, #00d2ff 100%);
      transition: background-color 0.3s ease, color 0.3s ease;
    }
    .login-card {
      background: rgba(255, 255, 255, 0.85); /* Efek kaca tembus pandang */
      border-radius: 20px; /* Lengkungan halus */
      box-shadow: 0 8px 32px rgba(0,0,0,0.1);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, 0.4);
    }
    .login-title { font-weight: 700; color: var(--bs-primary); letter-spacing: -0.5px; }
    
    /* ==============================================
       3. SIDEBAR UI PREMIUM (macOS Style)
       ============================================== */
    #dashboardApp {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100vh;
      height: 100dvh;
      overflow: hidden;
    }

    .app-shell {
      display: flex;
      width: 100%;
      height: 100%;
      min-width: 0;
      overflow: hidden;
    }

    #sidebarMenu {
      width: 278px;
      min-width: 278px;
      height: 100vh;
      height: 100dvh;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
      scrollbar-gutter: stable;
    }

    .sidebar { 
      background-color: rgba(255, 255, 255, 0.8); 
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-right: 1px solid #e5e5ea;
      padding-top: 20px; 
      box-shadow: 2px 0 10px rgba(0,0,0,0.02);
      display: flex;
      flex-direction: column;
      transition: background-color 0.3s ease;
    }

    .offcanvas-body.sidebar {
      width: 100%;
      min-width: 0;
      height: auto;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
      scrollbar-gutter: auto;
    }
    .sidebar a { 
      color: #86868b; 
      text-decoration: none; 
      padding: 12px 15px; 
      
      /* Membuat Ikon dan Teks sejajar sempurna */
      display: flex; 
      align-items: center;
      gap: 12px; 
      
      /* Mencegah teks turun ke baris 2 */
      white-space: nowrap; 
      overflow: hidden; 
      text-overflow: ellipsis; 
      
      border-radius: 8px; 
      margin: 5px 15px; 
      font-weight: 500;
      transition: all 0.2s ease;
    }
    .sidebar a:hover { 
      background-color: #f5f5f7; 
      color: var(--bs-primary); 
    }
    .sidebar a.active { 
      background-color: var(--bs-primary); 
      color: white; 
      box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
    }
    .app-brand { 
      font-weight: 700; 
      font-size: 1.3rem; 
      padding: 0 20px 20px 20px; 
      color: var(--bs-primary); 
      margin-bottom: 10px; 
      letter-spacing: -0.5px;
    }
    
    /* ==============================================
       4. LAYOUT, CARDS, & COMPONENTS
       ============================================== */
    .content-area {
      position: relative;
      flex: 1 1 auto;
      min-width: 0;
      width: 100%;
      height: 100vh;
      height: 100dvh;
      padding: 0;
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior-y: contain;
      scrollbar-gutter: stable;
      transition: background-color 0.3s ease;
    }

    #dashboardApp .content-area > .card {
      width: auto;
      max-width: 100%;
      margin: 22px 30px 30px !important;
    }

    .app-topbar {
      position: sticky;
      top: 0;
      z-index: 1040;
      min-height: 72px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 10px 24px;
      padding-top: max(10px, env(safe-area-inset-top));
      background: rgba(245, 245, 247, 0.88);
      border-bottom: 1px solid rgba(0, 0, 0, 0.08);
      backdrop-filter: blur(22px) saturate(180%);
      -webkit-backdrop-filter: blur(22px) saturate(180%);
      box-shadow: 0 1px 12px rgba(0, 0, 0, 0.035);
    }

    .min-w-0 { min-width: 0 !important; }

    .topbar-title-wrap {
      flex: 1 1 0;
      min-width: 0;
      overflow: hidden;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .topbar-brand-icon {
      width: 38px;
      height: 38px;
      flex: 0 0 38px;
      display: grid;
      place-items: center;
      border-radius: 12px;
      color: #fff;
      background: var(--bs-primary);
      box-shadow: 0 5px 14px rgba(0, 102, 204, 0.22);
    }

    .topbar-page-title {
      margin: 0;
      max-width: 48vw;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      font-size: 1rem;
      font-weight: 750;
      letter-spacing: -0.2px;
      color: #1d1d1f;
    }

    .topbar-page-subtitle {
      display: block;
      max-width: 48vw;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      color: #86868b;
      font-size: 0.75rem;
      font-weight: 600;
    }

    .app-topbar > .dropdown {
      flex: 0 1 auto;
      min-width: 0;
    }

    .account-menu-button {
      max-width: min(360px, 48vw);
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 7px 10px 7px 7px;
      color: #1d1d1f;
      background: rgba(255, 255, 255, 0.82);
      border: 1px solid rgba(0, 0, 0, 0.08) !important;
      border-radius: 14px;
      box-shadow: 0 3px 12px rgba(0, 0, 0, 0.045);
    }

    .account-menu-button.dropdown-toggle::after { display: none; }

    .account-menu-button:hover,
    .account-menu-button:focus,
    .account-menu-button.show {
      color: #1d1d1f;
      background: #fff;
      box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
    }

    .account-avatar {
      width: 38px;
      height: 38px;
      flex: 0 0 38px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      color: #fff;
      background: linear-gradient(135deg, var(--bs-primary), #36a8ff);
      font-size: 0.82rem;
      font-weight: 800;
      letter-spacing: 0.5px;
    }

    .account-meta {
      min-width: 0;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      line-height: 1.15;
    }

    .account-name {
      display: block;
      width: 100%;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      font-size: 0.88rem;
      font-weight: 750;
    }

    .account-role {
      display: block;
      width: 100%;
      margin-top: 3px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      color: #86868b;
      font-size: 0.7rem;
      font-weight: 650;
    }

    .account-dropdown-menu {
      width: 290px;
      max-width: calc(100vw - 24px);
      padding: 8px;
      overflow: hidden;
      border: 1px solid rgba(0, 0, 0, 0.08);
      border-radius: 16px;
      box-shadow: 0 18px 55px rgba(0, 0, 0, 0.16);
    }

    .account-dropdown-header {
      padding: 11px 12px 12px;
      border-bottom: 1px solid rgba(0, 0, 0, 0.07);
      margin-bottom: 6px;
    }

    .account-dropdown-menu .dropdown-item {
      display: flex;
      align-items: center;
      gap: 11px;
      min-height: 44px;
      padding: 9px 11px;
      border-radius: 10px;
      font-weight: 650;
    }

    .account-dropdown-menu .dropdown-item i {
      width: 20px;
      text-align: center;
      font-size: 1rem;
    }
    
    .text-primary { color: var(--bs-primary) !important; }
    .bg-primary { background-color: var(--bs-primary) !important; }

    /* Card Melengkung ala iOS */
    .card { 
      border-radius: 16px; 
      box-shadow: 0 4px 24px rgba(0,0,0,0.04) !important; 
      border: none !important; 
      background-color: #ffffff;
      transition: background-color 0.3s ease; 
    }
    
    /* Tabel Bersih (Clean Look) */
    .table { border-radius: 8px; overflow: hidden; font-size: 14px; vertical-align: middle; }
    .table thead th { background-color: #f5f5f7; color: #86868b; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid #e5e5ea; }
    .table-dark { background-color: #1d1d1f; }
    
    /* Input Form Estetik */
    .form-control, .form-select { border-radius: 8px; border: 1px solid #d2d2d7; padding: 10px 15px; background-color: #ffffff; transition: all 0.2s ease; }
    .form-control:focus, .form-select:focus { border-color: var(--bs-primary); box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15); }
    
    /* Tombol Interaktif */
    .btn { border-radius: 8px; font-weight: 600; letter-spacing: 0.3px; padding: 10px 20px; transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1); border: none; }
    .btn-primary { background-color: var(--bs-primary); color: white; }
    .btn-primary:hover { background-color: #005bb5; box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25); transform: translateY(-1px); }

    /* ==============================================
       5. DARK MODE STYLES (Disesuaikan dengan iOS Dark Mode)
       ============================================== */
    [data-bs-theme="dark"] body { background-color: #000000; color: #f5f5f7; }
    [data-bs-theme="dark"] #loginScreen { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); }
    [data-bs-theme="dark"] .login-card { background: rgba(30, 30, 30, 0.7); border: 1px solid rgba(255,255,255,0.1); }
    [data-bs-theme="dark"] .sidebar { background-color: rgba(28, 28, 30, 0.8); border-right: 1px solid #333; box-shadow: 2px 0 10px rgba(0,0,0,0.3); }
    [data-bs-theme="dark"] .sidebar a { color: #86868b; }
    
    /* Biru Cerah (Azure) Khusus Dark Mode agar kontras */
    [data-bs-theme="dark"] .sidebar a:hover { background-color: #2c2c2e; color: #0a84ff; } 
    [data-bs-theme="dark"] .sidebar a.active { background-color: #0a84ff; color: white; box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3); }
    [data-bs-theme="dark"] .app-topbar {
      background: rgba(0, 0, 0, 0.82);
      border-bottom-color: rgba(255, 255, 255, 0.12);
      box-shadow: 0 1px 16px rgba(0, 0, 0, 0.35);
    }
    [data-bs-theme="dark"] .topbar-page-title { color: #f5f5f7; }
    [data-bs-theme="dark"] .topbar-page-subtitle,
    [data-bs-theme="dark"] .account-role { color: #98989d; }
    [data-bs-theme="dark"] .account-menu-button,
    [data-bs-theme="dark"] .account-menu-button:hover,
    [data-bs-theme="dark"] .account-menu-button:focus,
    [data-bs-theme="dark"] .account-menu-button.show {
      color: #f5f5f7;
      background: rgba(28, 28, 30, 0.9);
      border-color: rgba(255, 255, 255, 0.13) !important;
    }
    [data-bs-theme="dark"] .account-dropdown-menu {
      color: #f5f5f7;
      background: #1c1c1e;
      border-color: rgba(255, 255, 255, 0.12);
    }
    [data-bs-theme="dark"] .account-dropdown-header { border-bottom-color: rgba(255, 255, 255, 0.1); }
    [data-bs-theme="dark"] .account-dropdown-menu .dropdown-item { color: #f5f5f7; }
    [data-bs-theme="dark"] .account-dropdown-menu .dropdown-item:hover,
    [data-bs-theme="dark"] .account-dropdown-menu .dropdown-item:focus { background: #2c2c2e; }
    [data-bs-theme="dark"] .account-dropdown-menu .dropdown-item.text-danger { color: #ff6961 !important; }
    [data-bs-theme="dark"] .text-primary { color: #0a84ff !important; }
    [data-bs-theme="dark"] .btn-primary { background-color: #0a84ff; color: white; }
    [data-bs-theme="dark"] .btn-primary:hover { background-color: #0070ea; box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3); }
    
    [data-bs-theme="dark"] .card { background-color: #1c1c1e !important; border: 1px solid #2c2c2e !important; box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important; }
    [data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select { background-color: #2c2c2e; border-color: #3a3a3c; color: #f5f5f7; }
    [data-bs-theme="dark"] .form-control:focus, [data-bs-theme="dark"] .form-select:focus { background-color: #3a3a3c; border-color: #0a84ff; box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.15); }
    [data-bs-theme="dark"] .table thead th { background-color: #1c1c1e; color: #86868b; border-bottom: 2px solid #3a3a3c; }
    [data-bs-theme="dark"] .table-dark { background-color: #000; border-color: #333; }
    
    /* Dark Mode untuk Pop-up SweetAlert2 */
    [data-bs-theme="dark"] div:where(.swal2-container) div:where(.swal2-popup) { background-color: #1c1c1e; color: #f5f5f7; border: 1px solid #333; border-radius: 16px; }
    [data-bs-theme="dark"] div:where(.swal2-container) h2:where(.swal2-title) { color: #f5f5f7; }

    /* Safe-area & bottom-nav guard untuk pop-up di mobile */
    @media (max-width: 767px) {
      body.swal2-shown .bottom-nav {
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateY(calc(100% + env(safe-area-inset-bottom))) !important;
      }

      .swal2-container {
        padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)) !important;
      }

      .swal2-container .swal2-popup {
        width: min(100%, 920px) !important;
        margin: 0 !important;
        max-height: calc(100dvh - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom))) !important;
      }

      .swal2-container .swal2-html-container {
        max-height: calc(100dvh - 240px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
      }

      .swal2-container .swal2-actions {
        position: sticky;
        bottom: 0;
        z-index: 2;
        margin: 0 !important;
        padding: 12px 0 max(6px, env(safe-area-inset-bottom));
        background: inherit;
      }
    }

    /* Memaksa teks gelap menjadi putih saat mode gelap aktif */
    [data-bs-theme="dark"] .text-dark { color: #f5f5f7 !important; }

    /* ==============================================
       STYLING KHUSUS TABEL JADWAL MATRIKS
       ============================================== */
    .jadwal-header-hari {
      background-color: #e9ecef;
      font-weight: 800 !important; /* Header sangat tebal */
      font-size: 1.1rem;
      letter-spacing: 1px;
      color: #1d1d1f;
      border: 2px solid #ccc;
    }
    .jadwal-header-kolom {
      background-color: #f8f9fa;
      font-weight: 700 !important;
      border: 1px solid #dee2e6;
    }
    .cell-isi {
      background-color: #ffffff;
      transition: background-color 0.3s ease;
    }
    .cell-kosong {
      background-color: #fbfbfb;
      border: 1px dashed #dee2e6;
    }
    
    /* Penyesuaian Mode Gelap (Dark Mode) */
    [data-bs-theme="dark"] .jadwal-header-hari {
      background-color: #1c1c1e;
      color: #f5f5f7;
      border-color: #333;
    }
    [data-bs-theme="dark"] .jadwal-header-kolom {
      background-color: #2c2c2e;
      color: #a1a1aa;
      border-color: #444;
    }
    [data-bs-theme="dark"] .cell-isi {
      background-color: #1c1c1e; /* Warna gelap bersih */
    }
    [data-bs-theme="dark"] .cell-kosong {
      background-color: #000000;
      border: 1px dashed #333;
    }

    /* ==============================================
       6. MOBILE BOTTOM NAVIGATION (Native App Feel)
       ============================================== */
    @media (max-width: 767px) {
      .content-area {
        scrollbar-gutter: auto;
        padding-bottom: 0 !important;
      }

      #dashboardApp .content-area > .card {
        margin: 12px 12px calc(92px + env(safe-area-inset-bottom)) !important;
      }

      .app-topbar {
        min-height: 66px;
        gap: 8px;
        padding-left: 12px;
        padding-right: 10px;
      }

      .topbar-brand-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 10px;
      }

      .topbar-page-title,
      .topbar-page-subtitle { max-width: 36vw; }

      .account-menu-button {
        max-width: 53vw;
        gap: 7px;
        padding: 5px 7px 5px 5px;
      }

      .account-avatar {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: 0.76rem;
      }

      .account-name { font-size: 0.8rem; }
      .account-role { font-size: 0.65rem; }
      .account-menu-button > .bi-chevron-down { display: none; }

      .form-control,
      .form-select,
      textarea,
      input,
      select { font-size: 16px !important; }

      /* Tombol ringkas khusus HP: Manajemen Rapor */
      .rapor-save-bar {
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom)) !important;
        justify-content: center !important;
      }

      .rapor-save-all-btn {
        width: auto !important;
        max-width: 270px !important;
        min-height: 40px;
        padding: 8px 16px !important;
        font-size: 0.76rem !important;
        line-height: 1.15;
        letter-spacing: 0.01em;
        white-space: nowrap;
      }

      .rapor-save-all-btn i {
        font-size: 0.95rem !important;
        margin-right: 6px !important;
      }

      /* Tombol ringkas khusus HP: Rekap & Cetak */
      .rekap-action-buttons {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px !important;
        margin-top: 14px !important;
        padding-top: 10px !important;
      }

      .rekap-action-buttons .btn {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        padding: 6px 4px !important;
        border-radius: 11px !important;
        font-size: 0.68rem !important;
        line-height: 1.12;
        letter-spacing: 0;
        white-space: normal;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
      }

      .rekap-action-buttons .btn i {
        font-size: 0.82rem;
        flex: 0 0 auto;
      }

      .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 70px;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(0,0,0,0.1);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 1030;
        padding-bottom: env(safe-area-inset-bottom); /* Dukungan iPhone X ke atas */
        box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
      }
      
      [data-bs-theme="dark"] .bottom-nav {
        background: rgba(28, 28, 30, 0.85);
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
      }

      .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #86868b;
        text-decoration: none;
        font-size: 0.75rem;
        font-weight: 600;
        width: 20%;
        transition: all 0.2s ease;
        cursor: pointer;
      }
      
      .bottom-nav-item i { font-size: 1.5rem; margin-bottom: 2px; transition: transform 0.2s ease; }
      .bottom-nav-item:active i { transform: scale(0.9); }
      
      .bottom-nav-item.active { color: var(--bs-primary); }
      [data-bs-theme="dark"] .bottom-nav-item.active { color: #0a84ff; }
    }

    /* ==============================================
       6B. JADWAL MENGAJAR MINGGUAN GURU
       ============================================== */
    .teacher-weekly-table {
      min-width: 760px;
      font-size: .84rem;
    }
    .weekly-mobile-details { display: none; }
    .weekly-mobile-class-block + .weekly-mobile-class-block {
      margin-top: .45rem;
      padding-top: .45rem;
      border-top: 1px dashed rgba(134, 134, 139, .35);
    }
    .weekly-mobile-subject-line {
      display: flex;
      align-items: flex-start;
      gap: .35rem;
      margin-top: .28rem;
      min-width: 0;
    }
    .weekly-mobile-subject-code {
      flex: 0 0 auto;
      min-width: 32px;
      padding: .13rem .34rem;
      border-radius: 999px;
      background: rgba(var(--bs-primary-rgb), .12);
      color: var(--bs-primary);
      font-size: .58rem;
      font-weight: 800;
      line-height: 1.15;
      text-align: center;
      letter-spacing: .02em;
    }
    .weekly-mobile-subject-name {
      min-width: 0;
      color: var(--bs-body-color);
      font-size: .68rem;
      font-weight: 650;
      line-height: 1.2;
      overflow-wrap: anywhere;
    }
    .weekly-mobile-room {
      margin-top: .3rem;
      color: var(--bs-secondary-color);
      font-size: .62rem;
      font-weight: 600;
      line-height: 1.15;
    }

    @media (max-width: 767px) {
      .teacher-weekly-table {
        width: 100%;
        min-width: 0 !important;
        table-layout: fixed;
        font-size: .72rem;
      }
      .teacher-weekly-table .weekly-col-number,
      .teacher-weekly-table .weekly-col-subject,
      .teacher-weekly-table .weekly-col-room {
        display: none !important;
      }
      .teacher-weekly-table .weekly-col-day { width: 18% !important; }
      .teacher-weekly-table .weekly-col-period { width: 19% !important; }
      .teacher-weekly-table .weekly-col-class { width: 43% !important; }
      .teacher-weekly-table .weekly-col-mode { width: 20% !important; }
      .teacher-weekly-table th,
      .teacher-weekly-table td {
        padding: .46rem .34rem;
        vertical-align: top;
        overflow-wrap: anywhere;
      }
      .teacher-weekly-table .weekly-desktop-classes { display: none; }
      .teacher-weekly-table .weekly-mobile-details { display: block; }
      .teacher-weekly-table .weekly-day-label {
        font-size: .69rem;
        line-height: 1.1;
      }
      .teacher-weekly-table .weekly-today-label {
        font-size: .55rem;
        margin-top: .15rem;
      }
      .teacher-weekly-table .weekly-period-badge {
        max-width: 100%;
        padding: .3rem .42rem;
        white-space: normal;
        font-size: .63rem;
        line-height: 1.05;
      }
      .teacher-weekly-table .weekly-jp-label {
        font-size: .56rem;
        line-height: 1.05;
      }
      .teacher-weekly-table .weekly-mode-badge {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: .16rem;
        width: 100%;
        min-height: 42px;
        padding: .32rem .2rem !important;
        border-radius: .65rem;
        white-space: normal;
        font-size: .57rem;
        line-height: 1.05;
        text-align: center;
      }
      .teacher-weekly-table .weekly-mode-badge i { font-size: .82rem; }
      .teacher-weekly-table .weekly-class-name {
        display: inline-block;
        max-width: 100%;
        padding: .2rem .42rem;
        border-radius: 999px;
        background: var(--bs-secondary-bg);
        color: var(--bs-body-color);
        font-size: .65rem;
        font-weight: 800;
        line-height: 1.1;
      }
    }

    /* ==============================================
       7. TIMELINE AGENDA GURU
       ============================================== */
    .timeline-container { position: relative; padding-left: 25px; margin-top: 10px; }
    .timeline-container::before { content: ''; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: #e5e5ea; }
    .timeline-item { position: relative; margin-bottom: 20px; }
    .timeline-item::before { content: ''; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--bs-primary); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--bs-primary); }
    .timeline-time { font-size: 0.8rem; font-weight: 800; color: var(--bs-primary); letter-spacing: 0.5px; margin-bottom: 4px; }
    .timeline-content { background: #fbfbfd; padding: 12px 15px; border-radius: 12px; border: 1px solid #e5e5ea; transition: transform 0.2s ease; }
    .timeline-content:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
    
    [data-bs-theme="dark"] .timeline-container::before { background: #3a3a3c; }
    [data-bs-theme="dark"] .timeline-item::before { box-shadow: 0 0 0 1px #0a84ff; background: #0a84ff; border-color: #1c1c1e; }
    [data-bs-theme="dark"] .timeline-content { background: #1c1c1e; border-color: #333; }

    /* ==============================================
       8. UI ABSENSI MODERN (Cards & Sticky Bar)
       ============================================== */
    .absen-card { background: #fff; border-radius: 15px; padding: 18px; margin-bottom: 15px; border: 1px solid #f0f0f5; box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: transform 0.2s; }
    .absen-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.06); }
    [data-bs-theme="dark"] .absen-card { background: #1c1c1e; border-color: #333; box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
    
    /* Sembunyikan radio button bawaan yang jelek */
    .absen-radio-group input[type="radio"] { display: none; }
    
    /* Desain Tombol Pill */
    .absen-btn { display: inline-block; padding: 10px 5px; margin: 0 4px; border-radius: 12px; border: 2px solid #e9ecef; font-weight: 700; cursor: pointer; color: #adb5bd; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-size: 0.9rem; background: transparent; }
    [data-bs-theme="dark"] .absen-btn { border-color: #444; color: #666; }
    
    /* Animasi saat tombol dipilih (Checked) */
    .absen-radio-group input[value="H"]:checked + .absen-btn { background: #198754; color: #fff; border-color: #198754; box-shadow: 0 4px 12px rgba(25,135,84,0.4); transform: scale(1.05); }
    .absen-radio-group input[value="I"]:checked + .absen-btn { background: #0d6efd; color: #fff; border-color: #0d6efd; box-shadow: 0 4px 12px rgba(13,110,253,0.4); transform: scale(1.05); }
    .absen-radio-group input[value="S"]:checked + .absen-btn { background: #ffc107; color: #000; border-color: #ffc107; box-shadow: 0 4px 12px rgba(255,193,7,0.4); transform: scale(1.05); }
    .absen-radio-group input[value="A"]:checked + .absen-btn { background: #dc3545; color: #fff; border-color: #dc3545; box-shadow: 0 4px 12px rgba(220,53,69,0.4); transform: scale(1.05); }

    /* Live Counter Bar */
    .live-counter-bar { background: rgba(0, 102, 204, 0.05); border-radius: 12px; padding: 15px; margin-bottom: 25px; display: flex; justify-content: space-between; font-weight: 800; font-size: 1rem; border: 1px solid rgba(0, 102, 204, 0.1); }
    [data-bs-theme="dark"] .live-counter-bar { background: rgba(10, 132, 255, 0.1); border-color: rgba(10, 132, 255, 0.2); }

    /* Sticky Bottom Bar untuk Simpan */
    .sticky-simpan-bar { position: fixed; bottom: 70px; /* Tepat di atas bottom nav HP */ left: 0; right: 0; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); padding: 15px; border-top: 1px solid rgba(0,0,0,0.05); z-index: 1020; box-shadow: 0 -10px 30px rgba(0,0,0,0.05); display: flex; justify-content: flex-end; }
    [data-bs-theme="dark"] .sticky-simpan-bar { background: rgba(28, 28, 30, 0.85); border-color: #333; }
    
    @media (min-width: 768px) { .sticky-simpan-bar { bottom: 0; padding-right: 30px; } }
  
  /* ==============================================
       9. PERBAIKAN DARK MODE (BANK TP & NILAI)
       ============================================== */
    /* 1. Kolom Input Teks TP */
    .tp-textarea { background-color: #f8f9fa; color: #212529; }
    [data-bs-theme="dark"] .tp-textarea { background-color: #2b2b2d; color: #f8f9fa; border-color: #444; }

    /* 2. Dropdown TP Premium di Halaman Nilai */
    .tp-select-premium { background-color: #f4f9ff; color: #084298; box-shadow: 0 2px 5px rgba(13,110,253,0.08); height: 50px; border: 1px solid var(--bs-primary); }
    [data-bs-theme="dark"] .tp-select-premium { background-color: rgba(13,110,253,0.1); color: #8bb4f6; border-color: var(--bs-primary); }

    /* 3. Kartu Daftar TP Tersimpan */
    .tp-card-item { background: #ffffff; border-left: 5px solid var(--bs-primary) !important; border: 1px solid #f0f0f5; transition: transform 0.2s; }
    .tp-card-item-text { color: #2c3e50; }
    
    [data-bs-theme="dark"] .tp-card-item { background: #1c1c1e; border-color: #333 !important; border-left: 5px solid var(--bs-primary) !important; }
    [data-bs-theme="dark"] .tp-card-item-text { color: #e0e0e0; }

    /* 4. Kotak Pembungkus Daftar TP (Adaptif Abu-abu) */
    .tp-preview-box { background-color: #f8f9fa; border: 1px solid #e9ecef; }
    [data-bs-theme="dark"] .tp-preview-box { background-color: #212529; border: 1px solid #333; }
    /* ==============================================
       10. REKAP DASHBOARD (DARK MODE FIX)
       ============================================== */
    .rekap-card-main { background-color: #fcfcfc; }
    .rekap-card-inner { background-color: #ffffff; }

    [data-bs-theme="dark"] .rekap-card-main { background-color: #1c1c1e !important; border-color: #333 !important; }
    [data-bs-theme="dark"] .rekap-card-inner { background-color: #2c2c2e !important; border-color: #444 !important; }
    
    /* Penyesuaian garis border agar lebih soft di mode gelap */
    [data-bs-theme="dark"] .rekap-card-inner.border-primary { border-color: #0a84ff !important; }
    [data-bs-theme="dark"] .progress { background-color: #3a3a3c !important; }
    [data-bs-theme="dark"] .border-end { border-color: #444 !important; }

    /* ==============================================
       11. FIX: FORM JURNAL & BG-LIGHT DI MODE GELAP
       ============================================== */
    
    /* Menjinakkan class bg-light pada input dan textarea agar ikut gelap */
    [data-bs-theme="dark"] .form-control.bg-light, 
    [data-bs-theme="dark"] textarea.bg-light {
      background-color: #2c2c2e !important;
      color: #f5f5f7 !important;
      border-color: #3a3a3c !important;
    }

    /* Memberikan efek visual khas Apple untuk kolom yang dikunci (Readonly) */
    [data-bs-theme="dark"] .form-control[readonly] {
      background-color: #1c1c1e !important; /* Warna sedikit lebih pekat / tenggelam */
      color: #a1a1aa !important; /* Teks abu-abu agak redup */
      border-color: #333 !important;
      opacity: 1; /* Mencegah bug transparansi bawaan iOS Safari */
    }
    /* ==============================================
       12. FIX: WADAH & KOLOM MASTER MAPEL DI MODE GELAP
       ============================================== */
       
    /* 1. Menjinakkan kotak pembungkus (bg-light & bg-white) agar ikut gelap dan elegan */
    [data-bs-theme="dark"] .bg-light,
    [data-bs-theme="dark"] .bg-white {
        background-color: #1c1c1e !important;
        color: #f5f5f7 !important;
        border-color: #333 !important;
    }

    /* 2. Memaksa SEMUA kotak isian (input & select) menjadi gelap sempurna */
    [data-bs-theme="dark"] input.form-control, 
    [data-bs-theme="dark"] select.form-select {
        background-color: #2c2c2e !important;
        color: #f5f5f7 !important;
        border-color: #3a3a3c !important;
    }

    /* 3. Menyesuaikan teks "Contoh: ..." (Placeholder) agar tidak terlalu terang */
    [data-bs-theme="dark"] input.form-control::placeholder,
    [data-bs-theme="dark"] textarea.form-control::placeholder {
        color: #636366 !important;
    }
    
    /* 4. Menyesuaikan list dropdown (option) saat diklik di mode gelap */
    [data-bs-theme="dark"] select.form-select option {
        background-color: #1c1c1e;
        color: #f5f5f7;
    }

    @media (min-width: 768px) {
      .content-area { overflow-y: scroll; }
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
      }
    }

    @media print {
      html, body, #dashboardApp { position: static !important; height: auto !important; overflow: visible !important; }
      .app-topbar, .sidebar, .bottom-nav { display: none !important; }
      .content-area { height: auto !important; overflow: visible !important; }
      #dashboardApp .content-area > .card { margin: 0 !important; }
    }

    /* ==============================================
       16. ABSENSI HARIAN QR / GERBANG
       ============================================== */
    .daily-stat-card { min-height: 112px; border: 1px solid rgba(0,0,0,.06) !important; }
    .daily-stat-number { font-size: 1.75rem; font-weight: 800; line-height: 1; }
    .daily-scanner-shell { max-width: 560px; margin: 0 auto; border-radius: 22px; overflow: hidden; background: #000; position: relative; }
    #dailyQrReader { width: 100%; min-height: 280px; background: #000; }
    #dailyQrReader video { object-fit: cover !important; border-radius: 18px; }
    .daily-scan-result { display:none; position:absolute; inset:0; z-index:20; align-items:center; justify-content:center; text-align:center; padding:24px; color:#fff; backdrop-filter:blur(7px); -webkit-backdrop-filter:blur(7px); }
    .daily-scan-result.show { display:flex; }
    .daily-avatar { width:46px; height:46px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; background:rgba(var(--bs-primary-rgb),.12); color:var(--bs-primary); flex:0 0 auto; }
    .daily-status-pill { min-width:78px; }
    .qr-student-card { border:1px solid #d2d2d7; border-radius:14px; padding:12px; background:#fff; }
    [data-bs-theme="dark"] .qr-student-card { background:#1c1c1e; border-color:#3a3a3c; }
    .daily-mobile-card { display:none; }
    @media (max-width: 767px) {
      .daily-stat-card { min-height:94px; }
      .daily-stat-number { font-size:1.4rem; }
      #dailyQrReader { min-height:250px; }
      .daily-desktop-table { display:none; }
      .daily-mobile-card { display:block; }
      .daily-filter-actions .btn { padding:.55rem .7rem; font-size:.78rem; }
      .daily-admin-grid .card-body { padding:1rem; }
    }
