/* ============================================================================
   * SIMALAS OFFICIAL DESIGN SYSTEM (Modern Educational SaaS)
   * Primary Emerald : #06483F
   * Academic Gold   : #D39425
   * Soft Ivory      : #F7F8F5
   * Charcoal Green  : #243A35
   * White           : #FFFFFF
   * ============================================================================ */
  :root {
    color-scheme: light;
    --simalas-emerald: #06483F;
    --simalas-emerald-dark: #04332C;
    --simalas-emerald-mid: #0A5C50;
    --simalas-emerald-soft: #E6F0EE;
    --simalas-gold: #D39425;
    --simalas-gold-dark: #B77D19;
    --simalas-gold-soft: #FCF5E5;
    --simalas-ivory: #F7F8F5;
    --simalas-charcoal: #243A35;
    --simalas-text-muted: #556B65;
    --simalas-border: #DCE4E0;
    --simalas-white: #FFFFFF;
    --simalas-shadow-sm: 0 2px 8px rgba(6, 72, 63, 0.05);
    --simalas-shadow-md: 0 8px 24px rgba(6, 72, 63, 0.07);
    --simalas-shadow-lg: 0 18px 42px rgba(6, 72, 63, 0.12);
    --simalas-radius-card: 14px;
    --simalas-radius-input: 8px;
    --simalas-radius-btn: 8px;

    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--simalas-charcoal);
    background: var(--simalas-ivory);
  }

  * { box-sizing: border-box; }
  [hidden] { display: none !important; }

  body {
    min-height: 100vh;
    margin: 0;
    background: var(--simalas-ivory);
    color: var(--simalas-charcoal);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }

  h1, h2, h3, h4, .simalas-heading {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--simalas-charcoal);
    letter-spacing: -0.015em;
  }

  /* ============================================================================
   * 1. SPLIT-SCREEN LOGIN PAGE (TAHAP 3)
   * ============================================================================ */
  .login-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: stretch;
    background: var(--simalas-ivory);
    padding: 0;
  }

  .simalas-login-split {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    width: 100%;
    min-height: 100vh;
  }

  /* Area Kiri: Branding Emerald & Visual Pendidikan */
  .simalas-login-left {
    background: linear-gradient(155deg, #06483F 0%, #04332C 65%, #032621 100%);
    color: var(--simalas-white);
    padding: clamp(32px, 5vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
  }

  .simalas-login-left::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -120px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(211, 148, 37, 0.22) 0%, transparent 70%);
    pointer-events: none;
  }

  .simalas-login-left::after {
    content: "";
    position: absolute;
    bottom: -140px;
    left: -100px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
  }

  .simalas-brand-hero {
    position: relative;
    z-index: 1;
    max-width: 540px;
  }

  .simalas-logo-showcase {
    display: inline-flex;
    align-items: center;
    background: var(--simalas-white);
    padding: 14px 22px;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    border: 2px solid rgba(211, 148, 37, 0.45);
    margin-bottom: 28px;
  }

  .simalas-logo-horizontal {
    height: clamp(54px, 6vw, 72px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
  }

  .simalas-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(211, 148, 37, 0.18);
    border: 1px solid rgba(211, 148, 37, 0.45);
    color: #F7C86A;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 16px;
  }

  .simalas-hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 600;
    color: var(--simalas-white);
    margin: 0 0 14px;
    line-height: 1.28;
  }

  .simalas-hero-desc {
    font-size: 14.5px;
    color: rgba(247, 248, 245, 0.84);
    line-height: 1.68;
    margin: 0 0 28px;
  }

  /* Elemen Visual Pendidikan Minimalis */
  .simalas-edu-visual-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 8px;
  }

  .simalas-edu-feature-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
  }

  .simalas-edu-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(211, 148, 37, 0.2);
    border: 1px solid rgba(211, 148, 37, 0.45);
    color: #F5B942;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .simalas-edu-feature-card strong {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--simalas-white);
    margin-bottom: 2px;
  }

  .simalas-edu-feature-card span {
    font-size: 12.5px;
    color: rgba(247, 248, 245, 0.76);
    line-height: 1.45;
  }

  .simalas-login-left-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 24px;
    margin-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 12px;
    color: rgba(247, 248, 245, 0.7);
  }

  /* Area Kanan: Form Login Pengguna */
  .simalas-login-right {
    background: var(--simalas-ivory);
    padding: clamp(24px, 4vw, 56px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .login-card {
    width: min(100%, 460px);
    padding: clamp(26px, 4vw, 38px);
    border: 1px solid var(--simalas-border);
    border-radius: var(--simalas-radius-card);
    background: var(--simalas-white);
    box-shadow: var(--simalas-shadow-md);
  }

  .simalas-institution-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--simalas-border);
  }

  .simalas-institution-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: contain;
    border: 1px solid var(--simalas-border);
    padding: 3px;
    background: var(--simalas-white);
    flex-shrink: 0;
  }

  .brand-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--simalas-emerald-soft);
    color: var(--simalas-emerald);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .simalas-institution-name {
    margin: 4px 0 0;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--simalas-charcoal);
  }

  .login-card h1 {
    margin: 0 0 6px;
    font-size: clamp(21px, 3vw, 25px);
    color: var(--simalas-charcoal);
  }

  .subtitle {
    margin: 0 0 20px;
    color: var(--simalas-text-muted);
    font-size: 13.5px;
    line-height: 1.55;
  }

  /* Input dengan Ikon & Toggle Password */
  .simalas-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
  }

  .simalas-input-wrap input,
  .simalas-input-wrap input[type="text"],
  .simalas-input-wrap input[type="password"] {
    width: 100%;
    padding-left: 42px !important;
  }

  .simalas-input-wrap.has-trailing input,
  .simalas-input-wrap.has-trailing input[type="text"],
  .simalas-input-wrap.has-trailing input[type="password"] {
    padding-right: 44px !important;
  }

  .simalas-input-icon {
    position: absolute;
    left: 14px;
    color: var(--simalas-text-muted);
    display: inline-flex;
    align-items: center;
    pointer-events: none;
    z-index: 2;
  }

  .simalas-pwd-toggle {
    position: absolute;
    right: 6px;
    min-height: 30px !important;
    height: 30px;
    padding: 0 8px !important;
    border: 0;
    background: transparent;
    color: var(--simalas-text-muted);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .simalas-pwd-toggle:hover {
    background: var(--simalas-emerald-soft);
    color: var(--simalas-emerald);
  }

  .simalas-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
  }

  .simalas-remember-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--simalas-charcoal);
    font-weight: 500;
    cursor: pointer;
    user-select: none;
  }

  .simalas-remember-label input[type="checkbox"] {
    accent-color: var(--simalas-emerald);
    width: 15px;
    height: 15px;
    margin: 0;
  }

  .simalas-link-btn {
    border: 0;
    background: transparent;
    color: var(--simalas-emerald);
    font-size: 13px;
    font-weight: 600;
    padding: 2px 4px;
    min-height: auto;
    cursor: pointer;
    text-decoration: none;
  }

  .simalas-link-btn:hover {
    color: var(--simalas-gold-dark);
    text-decoration: underline;
  }

  .simalas-admin-help-box {
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--simalas-ivory);
    border: 1px solid var(--simalas-border);
    font-size: 12.5px;
    color: var(--simalas-text-muted);
    line-height: 1.5;
  }

  .simalas-admin-help-box strong {
    color: var(--simalas-charcoal);
  }

  .simalas-demo-route-bar {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--simalas-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
  }

  /* ============================================================================
   * 2. HALAMAN DEMO TERPISAH (#demo-screen)
   * ============================================================================ */
  .simalas-demo-page {
    min-height: 100vh;
    padding: clamp(24px, 4vw, 48px) 16px;
    background: var(--simalas-ivory);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .simalas-demo-container {
    width: min(100%, 760px);
    background: var(--simalas-white);
    border: 1px solid var(--simalas-border);
    border-radius: var(--simalas-radius-card);
    padding: clamp(24px, 4vw, 36px);
    box-shadow: var(--simalas-shadow-md);
  }

  .demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 16px;
  }

  .demo-chip {
    min-height: auto;
    padding: 14px 16px;
    border: 1px solid var(--simalas-border);
    border-left: 4px solid var(--simalas-emerald);
    border-radius: 10px;
    background: var(--simalas-ivory);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.16s ease;
  }

  .demo-chip:hover {
    background: var(--simalas-emerald-soft);
    border-color: var(--simalas-emerald);
    transform: translateY(-1px);
    box-shadow: var(--simalas-shadow-sm);
  }

  .demo-chip strong {
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    color: var(--simalas-emerald);
  }

  .demo-chip span {
    font-size: 12px;
    color: var(--simalas-text-muted);
    font-weight: 400;
  }

  /* ============================================================================
   * 3. FORM, INPUT, & BUTTON STANDARDS (DESIGN SYSTEM)
   * ============================================================================ */
  .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--simalas-charcoal);
  }

  input[type="text"],
  input[type="password"],
  input[type="date"],
  input[type="number"],
  select,
  textarea {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #C6D3CE;
    border-radius: var(--simalas-radius-input);
    background: var(--simalas-white);
    font: inherit;
    font-size: 13.5px;
    color: var(--simalas-charcoal);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--simalas-emerald);
    box-shadow: 0 0 0 3px rgba(6, 72, 63, 0.14);
  }

  button {
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--simalas-radius-btn);
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
  }

  .btn-primary {
    border: 1px solid var(--simalas-emerald);
    background: var(--simalas-emerald);
    color: var(--simalas-white);
    font-weight: 600;
  }
  .btn-primary:hover {
    background: var(--simalas-emerald-dark);
    border-color: var(--simalas-emerald-dark);
  }

  .btn-gold {
    border: 1px solid var(--simalas-gold);
    background: var(--simalas-gold);
    color: var(--simalas-white);
    font-weight: 600;
  }
  .btn-gold:hover {
    background: var(--simalas-gold-dark);
    border-color: var(--simalas-gold-dark);
  }

  .btn-success {
    border: 1px solid #15803d;
    background: #15803d;
    color: var(--simalas-white);
    font-weight: 600;
  }
  .btn-success:hover { background: #166534; }

  .btn-secondary {
    border: 1px solid var(--simalas-border);
    background: var(--simalas-white);
    color: var(--simalas-charcoal);
    font-weight: 500;
  }
  .btn-secondary:hover {
    background: var(--simalas-emerald-soft);
    border-color: #B4C8C2;
    color: var(--simalas-emerald);
  }

  .btn-full { width: 100%; }
  button:disabled { opacity: 0.6; cursor: wait; }

  /* ============================================================================
   * 4. APP SHELL, SIDEBAR EMERALD (COLLAPSIBLE & DRAWER), & TOPBAR
   * ============================================================================ */
  .app-layout {
    min-height: 100vh;
    display: block;
    padding-left: 272px;
    transition: padding-left 0.22s ease;
    background: var(--simalas-ivory);
  }

  .app-layout.sidebar-collapsed {
    padding-left: 78px;
  }

  .sidebar {
    background: var(--simalas-emerald);
    color: var(--simalas-white);
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-right: 1px solid var(--simalas-emerald-dark);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 272px;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.22s ease;
    z-index: 60;
  }

  .app-layout.sidebar-collapsed .sidebar {
    width: 78px;
  }

  .sidebar-brand {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .sidebar-logo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }

  .sidebar-logo-box {
    flex: 1;
    min-width: 0;
    background: var(--simalas-white);
    padding: 7px 12px;
    border-radius: 10px;
    border: 1.5px solid rgba(211, 148, 37, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  }

  .sidebar-logo-full {
    height: 36px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
  }

  .sidebar-logo-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
    background: var(--simalas-white);
    padding: 4px;
    border-radius: 10px;
    border: 1.5px solid rgba(211, 148, 37, 0.5);
    display: none;
  }

  .sidebar-school-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.09);
  }

  .sidebar-school-emblem {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    object-fit: contain;
    background: var(--simalas-white);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid rgba(211, 148, 37, 0.45);
  }

  .sidebar-school-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
  }

  .app-layout.sidebar-collapsed .sidebar-logo-box,
  .app-layout.sidebar-collapsed .sidebar-logo-full,
  .app-layout.sidebar-collapsed .sidebar-school-row,
  .app-layout.sidebar-collapsed .sidebar-brand strong,
  .app-layout.sidebar-collapsed .sidebar-brand small,
  .app-layout.sidebar-collapsed .user-profile-box,
  .app-layout.sidebar-collapsed .nav-item-label,
  .app-layout.sidebar-collapsed .btn-logout-text {
    display: none !important;
  }

  .app-layout.sidebar-collapsed .sidebar-logo-icon {
    display: block;
    margin: 0 auto;
  }

  .sidebar-brand strong {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--simalas-white);
    line-height: 1.25;
  }

  .sidebar-brand small {
    font-size: 11px;
    color: rgba(247, 248, 245, 0.78);
    line-height: 1.25;
  }

  .user-profile-box {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .role-pill {
    align-self: flex-start;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--simalas-gold);
    color: var(--simalas-white);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  .user-profile-box strong {
    font-size: 13px;
    color: var(--simalas-white);
    font-weight: 600;
  }

  .user-profile-box small {
    font-size: 11.5px;
    color: rgba(247, 248, 245, 0.78);
  }

  .nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
  }

  .nav-item {
    min-height: 40px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(247, 248, 245, 0.84);
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--simalas-white);
  }

  .nav-item.active {
    background: var(--simalas-gold);
    color: var(--simalas-white);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(211, 148, 37, 0.3);
  }

  .sidebar-footer {
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .sidebar-footer .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--simalas-white);
  }

  .sidebar-footer .btn-secondary:hover {
    background: rgba(220, 38, 38, 0.85);
    border-color: rgba(220, 38, 38, 0.9);
    color: var(--simalas-white);
  }

  /* MAIN AREA & TOPBAR */
  .main-area {
    padding: 22px clamp(16px, 3vw, 34px);
    overflow-x: clip;
    min-width: 0;
  }

  .topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px 18px;
    background: var(--simalas-white);
    border: 1px solid var(--simalas-border);
    border-radius: var(--simalas-radius-card);
    box-shadow: var(--simalas-shadow-sm);
  }

  .topbar h2 {
    margin: 0;
    font-size: clamp(18px, 2.2vw, 22px);
    color: var(--simalas-charcoal);
  }

  .topbar-sub {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--simalas-text-muted);
  }

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

  /* CARDS & STATISTICS */
  .view-content { display: grid; gap: 18px; }

  .card {
    padding: 20px 22px;
    border: 1px solid var(--simalas-border);
    border-radius: var(--simalas-radius-card);
    background: var(--simalas-white);
    box-shadow: var(--simalas-shadow-sm);
  }

  .card h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: var(--simalas-charcoal);
  }

  .summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
  }

  .stat-box {
    padding: 16px 18px;
    border: 1px solid var(--simalas-border);
    border-top: 3px solid var(--simalas-emerald);
    border-radius: var(--simalas-radius-card);
    background: var(--simalas-white);
    box-shadow: var(--simalas-shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .stat-box:nth-child(2) { border-top-color: var(--simalas-gold); }
  .stat-box:nth-child(3) { border-top-color: #0D9488; }
  .stat-box:nth-child(4) { border-top-color: var(--simalas-emerald-mid); }

  .stat-label {
    font-size: 12.5px;
    color: var(--simalas-text-muted);
    font-weight: 600;
  }

  .stat-value {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    color: var(--simalas-charcoal);
    font-weight: 600;
  }

  .stat-box small {
    font-size: 12px;
    color: var(--simalas-text-muted);
  }

  /* TABLES, FILTERS, PILLS & ALERTS */
  .filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    align-items: center;
  }

  .form-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
  }

  .table-scroll {
    overflow-x: auto;
    border: 1px solid var(--simalas-border);
    border-radius: 12px;
    background: var(--simalas-white);
  }

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

  th, td {
    padding: 10px 12px;
    border-bottom: 1px solid #E8EFEA;
    vertical-align: middle;
  }

  th {
    background: #F2F6F4;
    color: var(--simalas-charcoal);
    font-weight: 600;
    white-space: nowrap;
  }

  tbody tr:hover td {
    background: #FAFBF9;
  }

  tbody tr:last-child td { border-bottom: 0; }

  .pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
  }
  .pill-ok { background: #DCFCE7; color: #166534; }
  .pill-info { background: var(--simalas-emerald-soft); color: var(--simalas-emerald); }
  .pill-warn { background: var(--simalas-gold-soft); color: #925E0C; }
  .pill-err { background: #FEE2E2; color: #991B1B; }

  .alert-box {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13.5px;
    line-height: 1.5;
  }
  .alert-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
  .alert-success { background: var(--simalas-emerald-soft); color: var(--simalas-emerald); border: 1px solid #B7D9D3; }

  .note-inline {
    display: flex;
    gap: 6px;
    align-items: center;
  }
  .note-inline input {
    min-height: 34px;
    padding: 4px 8px;
    font-size: 12.5px;
    width: 180px;
  }
  .note-inline button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .score-input {
    width: 68px;
    min-height: 32px !important;
    padding: 4px 6px !important;
    text-align: center;
  }
  .status-select {
    min-height: 32px !important;
    padding: 4px 8px !important;
    font-weight: 600;
  }

  /* ALAT PERMAINAN KELAS & MODE PROYEKTOR */
  .subtab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
  }
  .subtab-btn {
    border: 1px solid var(--simalas-border);
    background: var(--simalas-ivory);
    color: var(--simalas-charcoal);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
  }
  .subtab-btn.active {
    background: var(--simalas-emerald);
    color: var(--simalas-white);
    border-color: var(--simalas-emerald);
  }
  .game-stage-box {
    padding: 28px 20px;
    border: 2px dashed var(--simalas-gold);
    border-radius: 16px;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--simalas-gold-soft) 100%);
    text-align: center;
    margin: 14px 0;
  }
  .game-big-text {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(26px, 4.5vw, 44px);
    font-weight: 700;
    color: var(--simalas-emerald);
    margin: 10px 0;
    letter-spacing: -0.02em;
  }
  .game-sub-text {
    font-size: 15px;
    color: var(--simalas-text-muted);
    margin: 4px 0;
  }
  .group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 14px;
  }
  .group-card {
    padding: 14px 16px;
    border: 1px solid var(--simalas-border);
    border-radius: 12px;
    background: var(--simalas-ivory);
  }
  .group-card h4 {
    margin: 0 0 8px;
    font-size: 15px;
    color: var(--simalas-emerald);
    border-bottom: 1px solid var(--simalas-border);
    padding-bottom: 6px;
  }
  .group-card ol {
    margin: 0;
    padding-left: 18px;
    font-size: 13.5px;
    line-height: 1.65;
  }
  .flashcard-surface {
    max-width: 640px;
    margin: 14px auto;
    min-height: 210px;
    padding: 28px 24px;
    border: 2px solid var(--simalas-emerald);
    border-radius: 16px;
    background: var(--simalas-white);
    box-shadow: var(--simalas-shadow-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
  }
  .projector-active .game-big-text { font-size: clamp(38px, 6vw, 64px); }
  .projector-active .game-sub-text { font-size: 20px; }
  .projector-active .group-card ol { font-size: 17px; }
  .projector-active .flashcard-surface { min-height: 300px; max-width: 860px; }

  /* 4 TOMBOL KOTAK STATUS ABSENSI (H: HIJAU, I: BIRU, S: KUNING, A: MERAH) */
  .att-btn-group {
    display: inline-flex;
    gap: 5px;
    align-items: center;
  }
  .att-box-btn {
    min-width: 34px;
    min-height: 32px !important;
    padding: 0 9px !important;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.14s ease;
  }
  .att-btn-H { border: 1.5px solid #22c55e; background: #f0fdf4; color: #15803d; }
  .att-btn-H.active { background: #16a34a; color: #ffffff; border-color: #15803d; box-shadow: 0 2px 6px rgba(22, 163, 74, 0.35); }
  .att-btn-I { border: 1.5px solid #3b82f6; background: #eff6ff; color: #1d4ed8; }
  .att-btn-I.active { background: #2563eb; color: #ffffff; border-color: #1d4ed8; box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35); }
  .att-btn-S { border: 1.5px solid #eab308; background: #fefce8; color: #a16207; }
  .att-btn-S.active { background: #eab308; color: #1e293b; border-color: #ca8a04; box-shadow: 0 2px 6px rgba(234, 179, 8, 0.4); }
  .att-btn-A { border: 1.5px solid #ef4444; background: #fef2f2; color: #b91c1c; }
  .att-btn-A.active { background: #dc2626; color: #ffffff; border-color: #b91c1c; box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35); }

  /* KALENDER PENDIDIKAN VISUAL BULANAN */
  .cal-month-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 16px;
    margin-top: 12px;
  }
  .cal-month-card {
    border: 1.5px solid var(--simalas-emerald);
    border-radius: 12px;
    overflow: hidden;
    background: var(--simalas-white);
  }
  .cal-month-header {
    background: var(--simalas-emerald);
    color: var(--simalas-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 13.5px;
    padding: 8px 12px;
  }
  .cal-days-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
  }
  .cal-days-table th, .cal-days-table td {
    border: 1px solid #dce4e0;
    padding: 5px 3px;
    text-align: center;
    width: 14.28%;
  }
  .cal-days-table th {
    background: #f2f6f4;
    font-size: 11px;
    font-weight: 700;
  }
  .cal-day-sun { color: #dc2626; font-weight: 700; background: #fff5f5; }
  .cal-day-mat { background: #3b82f6 !important; color: #ffffff !important; font-weight: 700; }
  .cal-day-hol { background: #ef4444 !important; color: #ffffff !important; font-weight: 700; }
  .cal-day-exm { background: #fde047 !important; color: #1e293b !important; font-weight: 800; }
  .cal-day-rpr { background: #8b5cf6 !important; color: #ffffff !important; font-weight: 700; }
  .cal-day-sem { background: #22c55e !important; color: #ffffff !important; font-weight: 700; }
  .cal-month-footer {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    background: #f2f6f4;
    border-top: 1px solid #dce4e0;
    font-size: 12px;
    font-weight: 600;
    color: var(--simalas-charcoal);
  }
  .cal-legend-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 14px;
    background: var(--simalas-ivory);
    border: 1px solid var(--simalas-border);
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 12.5px;
  }
  .cal-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
  }
  .cal-legend-swatch, .cal-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(0,0,0,0.15);
  }

  /* RADAR PEMANTAUAN PERKEMBANGAN & KEAKTIFAN SISWA */
  .radar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 16px;
  }
  .radar-card-warn {
    border: 1.5px solid #fca5a5;
    background: #fffafa;
    border-radius: 14px;
    padding: 16px 18px;
  }
  .radar-card-ok {
    border: 1.5px solid #86efac;
    background: #f7fee7;
    border-radius: 14px;
    padding: 16px 18px;
  }
  .radar-item {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--simalas-white);
    border: 1px solid var(--simalas-border);
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .radar-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  /* ============================================================================
   * 5. TAHAP 2: REUSABLE SIDEBAR, TOPBAR, NOTIFICATIONS, CHARTS & ROLE DASHBOARDS
   * ============================================================================ */
  .nav-section-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(247, 248, 245, 0.52);
    padding: 10px 12px 4px;
    margin-top: 4px;
  }

  .app-layout.sidebar-collapsed .nav-section-label {
    display: none !important;
  }

  .nav-item-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.92;
  }

  .app-layout.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 10px 0;
  }

  .simalas-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .simalas-sidebar-close-btn {
    display: none;
    min-height: 34px !important;
    width: 34px;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: var(--simalas-white);
    border-radius: 8px;
    align-items: center;
    justify-content: center;
  }

  .simalas-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 28, 25, 0.55);
    backdrop-filter: blur(2px);
    z-index: 90;
  }

  .simalas-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .simalas-topbar-titles {
    min-width: 0;
  }

  .simalas-icon-btn {
    min-height: 38px !important;
    width: 38px;
    padding: 0 !important;
    border: 1px solid var(--simalas-border);
    background: var(--simalas-ivory);
    color: var(--simalas-charcoal);
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
  }

  .simalas-icon-btn:hover {
    background: var(--simalas-emerald-soft);
    border-color: var(--simalas-emerald);
    color: var(--simalas-emerald);
  }

  .simalas-mobile-only {
    display: none !important;
  }

  .simalas-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 8px;
    background: var(--simalas-ivory);
    border: 1px solid var(--simalas-border);
    color: var(--simalas-charcoal);
    font-size: 12.5px;
    font-weight: 600;
  }

  .simalas-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
  }

  /* Notifikasi Dropdown Popover */
  .simalas-notif-wrap {
    position: relative;
  }

  .simalas-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--simalas-gold);
    color: var(--simalas-white);
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--simalas-white);
  }

  .simalas-notif-dropdown {
    position: fixed;
    top: 72px;
    right: 20px;
    width: min(370px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    background: var(--simalas-white);
    border: 1px solid var(--simalas-border);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(8, 37, 29, 0.18);
    z-index: 150;
    overflow: hidden;
  }

  .simalas-notif-header {
    padding: 12px 16px;
    background: var(--simalas-ivory);
    border-bottom: 1px solid var(--simalas-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
  }

  .simalas-notif-list {
    max-height: 330px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .simalas-notif-item {
    padding: 11px 16px;
    border-bottom: 1px solid #EEF2EF;
    font-size: 12.5px;
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    gap: 3px;
    cursor: pointer;
    transition: background 0.14s ease;
  }

  .simalas-notif-item:hover {
    background: var(--simalas-emerald-soft);
  }

  .simalas-notif-item:last-child {
    border-bottom: 0;
  }

  /* HERO BANNER PER ROLE */
  .simalas-role-hero {
    background: linear-gradient(135deg, var(--simalas-emerald) 0%, #095D51 60%, var(--simalas-emerald-dark) 100%);
    color: var(--simalas-white);
    border-radius: var(--simalas-radius-card);
    padding: 22px 24px;
    box-shadow: var(--simalas-shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    overflow: hidden;
  }

  .simalas-role-hero::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(211, 148, 37, 0.25) 0%, transparent 70%);
    pointer-events: none;
  }

  .simalas-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(211, 148, 37, 0.22);
    border: 1px solid rgba(211, 148, 37, 0.55);
    color: #FDE68A;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 6px;
  }

  .simalas-role-hero h3 {
    margin: 0 0 4px;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(18px, 2.3vw, 22px);
    color: var(--simalas-white);
  }

  .simalas-role-hero p {
    margin: 0;
    font-size: 13.5px;
    color: rgba(247, 248, 245, 0.86);
    max-width: 680px;
    line-height: 1.5;
  }

  .simalas-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 1;
  }

  .simalas-hero-btn {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    color: var(--simalas-white);
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .simalas-hero-btn:hover {
    background: var(--simalas-gold);
    border-color: var(--simalas-gold);
    color: var(--simalas-white);
  }

  .simalas-hero-btn.gold-solid {
    background: var(--simalas-gold);
    border-color: var(--simalas-gold);
    color: var(--simalas-white);
  }

  .simalas-hero-btn.gold-solid:hover {
    background: var(--simalas-gold-dark);
  }

  /* ROLE / PERSPECTIVE MODE SWITCHER PILLS */
  .simalas-mode-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    background: var(--simalas-white);
    border: 1px solid var(--simalas-border);
    border-radius: 12px;
  }

  .simalas-mode-pills {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .simalas-mode-pill {
    min-height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--simalas-border);
    background: var(--simalas-ivory);
    color: var(--simalas-charcoal);
    font-size: 12.5px;
    font-weight: 600;
  }

  .simalas-mode-pill.active {
    background: var(--simalas-emerald);
    border-color: var(--simalas-emerald);
    color: var(--simalas-white);
  }

  /* STAT CARD ENHANCEMENTS */
  .simalas-stat-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
  }

  .simalas-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--simalas-emerald-soft);
    color: var(--simalas-emerald);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .stat-box:nth-child(2) .simalas-stat-icon {
    background: var(--simalas-gold-soft);
    color: var(--simalas-gold-dark);
  }

  /* CHARTS, BARS, & VISUALIZATION GRIDS */
  .simalas-chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
  }

  .simalas-bar-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
  }

  .simalas-bar-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .simalas-bar-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    color: var(--simalas-charcoal);
  }

  .simalas-bar-track {
    width: 100%;
    height: 9px;
    border-radius: 999px;
    background: #E9EFECE8;
    border: 1px solid #DCE5E0;
    overflow: hidden;
  }

  .simalas-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--simalas-emerald) 0%, #0D9488 100%);
    transition: width 0.35s ease;
  }

  .simalas-bar-fill.gold {
    background: linear-gradient(90deg, var(--simalas-gold) 0%, #F59E0B 100%);
  }

  /* QUICK MODULE CARDS FOR ROLES */
  .simalas-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
  }

  .simalas-quick-card {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--simalas-border);
    background: var(--simalas-ivory);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: all 0.16s ease;
  }

  .simalas-quick-card:hover {
    background: var(--simalas-emerald-soft);
    border-color: var(--simalas-emerald);
    transform: translateY(-2px);
    box-shadow: var(--simalas-shadow-sm);
  }

  .simalas-quick-card strong {
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    color: var(--simalas-emerald);
  }

  .simalas-quick-card span {
    font-size: 12px;
    color: var(--simalas-text-muted);
    line-height: 1.4;
  }

  /* MEETING BADGE MATRIX (P1-P15) */
  .simalas-meeting-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .simalas-m-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    padding: 0 5px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 700;
    border: 1px solid #DCE5E0;
    background: #F8FAFC;
    color: #64748B;
  }
  .simalas-m-pill.st-H { background: #DCFCE7; border-color: #86EFAC; color: #166534; }
  .simalas-m-pill.st-I { background: #DBEAFE; border-color: #93C5FD; color: #1E40AF; }
  .simalas-m-pill.st-S { background: #FEF9C3; border-color: #FDE047; color: #854D0E; }
  .simalas-m-pill.st-A { background: #FEE2E2; border-color: #FCA5A5; color: #991B1B; }

  /* ============================================================================
   * 6. TAHAP 3: RESPONSIVE REFINEMENT & SCHEDULE UI (REVISI)
   * ============================================================================ */
  html, body {
    max-width: 100vw;
    overflow-x: clip;
  }

  .view-content,
  .view-content > *,
  .card,
  .simalas-chart-grid > *,
  .radar-grid > *,
  .summary-grid > *,
  .cal-month-grid > *,
  .simalas-quick-grid > * {
    min-width: 0;
    max-width: 100%;
  }

  .table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #B4C8C2 #F2F6F4;
  }

  .table-scroll::-webkit-scrollbar {
    height: 7px;
  }
  .table-scroll::-webkit-scrollbar-track {
    background: #F2F6F4;
    border-radius: 999px;
  }
  .table-scroll::-webkit-scrollbar-thumb {
    background: #B4C8C2;
    border-radius: 999px;
  }

  /* Tampilan Jadwal Mingguan Per Hari (Guru & Siswa) */
  .simalas-sched-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
  }

  .simalas-sched-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .simalas-sched-day-btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--simalas-border);
    background: var(--simalas-white);
    color: var(--simalas-text-soft);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.16s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .simalas-sched-day-btn:hover {
    border-color: var(--simalas-emerald);
    color: var(--simalas-emerald);
  }

  .simalas-sched-day-btn.active {
    background: var(--simalas-emerald);
    border-color: var(--simalas-emerald);
    color: var(--simalas-white);
  }

  .simalas-sched-day-btn.is-today:not(.active) {
    border-color: var(--simalas-gold);
    background: var(--simalas-gold-soft);
    color: #92560A;
  }

  .simalas-view-toggle {
    display: inline-flex;
    background: #EFF4F1;
    padding: 3px;
    border-radius: 10px;
    border: 1px solid var(--simalas-border);
    gap: 3px;
  }

  .simalas-view-toggle-btn {
    padding: 6px 12px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--simalas-text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
  }

  .simalas-view-toggle-btn.active {
    background: var(--simalas-white);
    color: var(--simalas-emerald);
    box-shadow: 0 1px 4px rgba(10, 46, 36, 0.1);
  }

  .simalas-sched-day-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 14px;
  }

  .simalas-sched-day-grid.single-day {
    grid-template-columns: 1fr;
  }

  .simalas-sched-day-card {
    background: var(--simalas-white);
    border: 1px solid var(--simalas-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(13, 74, 58, 0.04);
  }

  .simalas-sched-day-card.is-today {
    border-color: var(--simalas-gold);
    box-shadow: 0 4px 14px rgba(211, 148, 37, 0.14);
  }

  .simalas-sched-day-head {
    background: #F4F8F6;
    border-bottom: 1px solid var(--simalas-border);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .simalas-sched-day-card.is-today .simalas-sched-day-head {
    background: linear-gradient(90deg, #FDF6E6, #F4F8F6);
  }

  .simalas-sched-day-title {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--simalas-emerald-dark);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .simalas-sched-list {
    display: flex;
    flex-direction: column;
    divide-y: 1px solid var(--simalas-border-soft);
  }

  .simalas-sched-item {
    padding: 12px 14px;
    border-top: 1px solid #EEF3F0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .simalas-sched-item:first-child {
    border-top: none;
  }

  .simalas-sched-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .simalas-sched-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--simalas-emerald);
    background: #EAF4F0;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
  }

  .simalas-sched-subject {
    font-size: 14px;
    font-weight: 700;
    color: var(--simalas-ink);
    line-height: 1.3;
  }

  .simalas-sched-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--simalas-text-muted);
  }

  .simalas-sched-note-box {
    background: #FAFBF9;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #E5ECE8;
  }

  .simalas-sched-note-box .note-inline {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }

  .simalas-sched-note-box .note-inline input {
    flex: 1;
    min-width: 150px;
    font-size: 12.5px;
    padding: 6px 10px;
  }

  .simalas-sched-note-box .note-inline .btn-save-note {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  /* Lebar minimum input di dalam tabel agar nyaman di tablet & smartphone */
  .att-note-inp,
  .gb-feedback,
  .sub-fb-inp {
    min-width: 155px;
    width: 100%;
  }

  .simalas-kv-th {
    width: 240px;
  }

  /* Penyelarasan Sidebar Desktop saat Diciutkan (Collapsed) */
  @media (min-width: 1025px) {
    .app-layout.sidebar-collapsed .sidebar {
      padding: 18px 8px;
      align-items: center;
    }
    .app-layout.sidebar-collapsed .sidebar-brand {
      width: 100%;
      align-items: center;
    }
    .app-layout.sidebar-collapsed .sidebar-logo-row {
      justify-content: center;
    }
    .app-layout.sidebar-collapsed .nav-list {
      width: 100%;
      align-items: center;
    }
    .app-layout.sidebar-collapsed .nav-item {
      width: 48px;
      height: 42px;
      justify-content: center;
      padding: 0;
    }
    .app-layout.sidebar-collapsed .sidebar-footer {
      width: 100%;
    }
    .app-layout.sidebar-collapsed .simalas-logout-btn {
      padding: 0;
      width: 48px;
      margin: 0 auto;
      display: flex;
    }
  }

  /* LAPTOP BREAKPOINT (1025px - 1280px) */
  @media (min-width: 1025px) and (max-width: 1280px) {
    .app-layout {
      padding-left: 248px;
    }
    .sidebar {
      width: 248px;
    }
    .main-area {
      padding: 18px 20px;
    }
    .summary-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .simalas-chart-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  /* TABLET & MOBILE DRAWER BREAKPOINT (<= 1024px) */
  @media (max-width: 1024px) {
    .simalas-login-split {
      grid-template-columns: 1fr;
      min-height: auto;
    }
    .simalas-login-left {
      padding: 28px 24px;
    }
    .simalas-edu-visual-grid {
      display: none;
    }
    .simalas-login-left-footer {
      margin-top: 14px;
      padding-top: 12px;
    }
    .simalas-login-right {
      padding: 28px 18px 40px;
    }
    .app-layout,
    .app-layout.sidebar-collapsed {
      padding-left: 0 !important;
    }
    .simalas-mobile-only {
      display: inline-flex !important;
    }
    .simalas-desktop-only {
      display: none !important;
    }
    .simalas-sidebar-close-btn {
      display: inline-flex;
    }
    /* Pastikan drawer mobile selalu menampilkan label lengkap meskipun sebelumnya collapsed di desktop */
    .app-layout.sidebar-collapsed .sidebar-logo-box {
      display: flex !important;
    }
    .app-layout.sidebar-collapsed .sidebar-school-row {
      display: flex !important;
    }
    .app-layout.sidebar-collapsed .sidebar-logo-full,
    .app-layout.sidebar-collapsed .sidebar-brand strong,
    .app-layout.sidebar-collapsed .sidebar-brand small,
    .app-layout.sidebar-collapsed .user-profile-box,
    .app-layout.sidebar-collapsed .nav-item-label,
    .app-layout.sidebar-collapsed .btn-logout-text,
    .app-layout.sidebar-collapsed .nav-section-label {
      display: revert !important;
    }
    .app-layout.sidebar-collapsed .sidebar-logo-icon {
      display: none !important;
    }
    .app-layout.sidebar-collapsed .nav-item {
      justify-content: flex-start;
      padding: 9px 12px;
    }
    .sidebar {
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      width: min(290px, 85vw) !important;
      height: 100vh;
      height: 100dvh;
      z-index: 100;
      transform: translateX(-105%);
      transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    }
    .sidebar.mobile-open {
      transform: translateX(0);
    }
    .summary-grid {
      grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    }
  }

  /* SMARTPHONE & SMALL TABLET BREAKPOINT (<= 768px) */
  @media (max-width: 768px) {
    .main-area {
      padding: 14px 12px 28px;
    }
    .topbar {
      padding: 12px 14px;
      gap: 10px;
    }
    .topbar h2 {
      font-size: 16.5px;
      line-height: 1.3;
    }
    .topbar-sub {
      font-size: 12px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .simalas-date-pill {
      display: none;
    }
    .card {
      padding: 16px 14px;
    }
    .simalas-role-hero {
      padding: 18px 16px;
      flex-direction: column;
      align-items: flex-start;
    }
    .simalas-hero-actions {
      width: 100%;
    }
    .simalas-hero-btn {
      flex: 1 1 auto;
      justify-content: center;
    }
    .simalas-mode-bar {
      flex-direction: column;
      align-items: stretch;
      padding: 12px;
    }
    .simalas-mode-pills {
      width: 100%;
      display: grid;
      grid-template-columns: 1fr 1fr;
    }
    .simalas-mode-pill {
      padding: 0 8px;
      font-size: 12px;
      text-align: center;
      justify-content: center;
    }
    .simalas-chart-grid,
    .radar-grid,
    .form-grid-2,
    .cal-month-grid {
      grid-template-columns: 1fr;
      gap: 14px;
    }
    .simalas-quick-grid {
      grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
      gap: 10px;
    }
    /* Form Input & Filter Bar nyaman digunakan di Smartphone */
    input[type="text"],
    input[type="password"],
    input[type="date"],
    input[type="number"],
    select,
    textarea {
      min-height: 42px;
      font-size: 15px;
    }
    .filter-bar {
      flex-direction: column;
      align-items: stretch;
      gap: 10px;
    }
    .filter-bar > .form-group,
    .filter-bar > select,
    .filter-bar > input[type="text"],
    .filter-bar > input[type="password"],
    .filter-bar > button,
    .filter-bar > a.btn-secondary {
      width: 100% !important;
      margin-top: 0 !important;
      justify-content: center;
    }
    .filter-bar .score-input {
      width: 100%;
      text-align: left;
      padding: 8px 12px !important;
    }
    .subtab-bar {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      width: 100%;
    }
    .subtab-btn {
      font-size: 12px;
      padding: 8px 10px;
      text-align: center;
    }
    th, td {
      padding: 8px 10px;
      font-size: 12.5px;
    }
    .simalas-kv-th {
      width: 40%;
      white-space: normal;
    }
    .simalas-sched-day-grid {
      grid-template-columns: 1fr;
    }
    .simalas-notif-dropdown {
      position: fixed;
      top: 68px;
      left: 12px !important;
      right: 12px !important;
      width: auto !important;
      max-width: none !important;
    }
  }

  /* COMPACT SMARTPHONE BREAKPOINT (<= 480px) */
  @media (max-width: 480px) {
    .simalas-refresh-label {
      display: none;
    }
    .simalas-refresh-btn {
      padding: 0 11px;
      min-height: 38px;
    }
    .summary-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    .stat-box {
      padding: 12px 12px;
    }
    .stat-value {
      font-size: 18px;
    }
    .stat-label {
      font-size: 11.5px;
    }
    .simalas-quick-grid,
    .simalas-mode-pills,
    .subtab-bar {
      grid-template-columns: 1fr;
    }
    .login-card {
      padding: 22px 16px;
    }
    .simalas-logo-horizontal {
      height: 48px;
    }
  }

  /* ============================================================================
   * 7. BRANDED LOADING OVERLAY (ANIMASI LOGO SIMALAS CUSTOMIZABLE)
   * Ubah --simalas-loader-size & --simalas-loader-speed di :root atau di sini
   * ============================================================================ */
  .simalas-loading-overlay[hidden] {
    display: none !important;
  }

  .simalas-loading-overlay {
    --simalas-loader-size: 92px;
    --simalas-loader-speed: 1.15s;
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(247, 248, 245, 0.78);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: simalasFadeIn 0.18s ease-out;
  }

  .simalas-loader-card {
    width: min(330px, 92vw);
    background: var(--simalas-white);
    border: 1px solid var(--simalas-border);
    border-top: 4px solid var(--simalas-emerald);
    border-radius: 18px;
    padding: 24px 22px 20px;
    box-shadow: 0 20px 44px rgba(6, 72, 63, 0.16);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .simalas-loader-visual {
    position: relative;
    width: var(--simalas-loader-size);
    height: var(--simalas-loader-size);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    perspective: 500px;
  }

  .simalas-loader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    pointer-events: none;
  }

  .simalas-loader-ring-outer {
    border-top-color: var(--simalas-emerald);
    border-right-color: rgba(6, 72, 63, 0.25);
    animation: simalasSpinRing var(--simalas-loader-speed) linear infinite;
  }

  .simalas-loader-ring-inner {
    inset: 8px;
    border-bottom-color: var(--simalas-gold);
    border-left-color: rgba(211, 148, 37, 0.3);
    animation: simalasSpinRingRev calc(var(--simalas-loader-speed) * 1.45) linear infinite;
  }

  .simalas-loader-logo-wrap {
    width: calc(var(--simalas-loader-size) - 26px);
    height: calc(var(--simalas-loader-size) - 26px);
    border-radius: 50%;
    background: var(--simalas-white);
    border: 1.5px solid #E2EBE6;
    box-shadow: 0 4px 12px rgba(6, 72, 63, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    overflow: hidden;
  }

  .simalas-loader-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  /* 3 Preset Animasi Logo (orbit-pulse, spin-3d, bounce-ring) */
  .simalas-loader-card.anim-orbit-pulse .simalas-loader-logo-wrap {
    animation: simalasLogoPulse 1.7s ease-in-out infinite;
  }

  .simalas-loader-card.anim-spin-3d .simalas-loader-logo-wrap {
    animation: simalasLogoSpin3d 1.8s ease-in-out infinite;
  }

  .simalas-loader-card.anim-bounce-ring .simalas-loader-logo-wrap {
    animation: simalasLogoBounce 1.1s ease-in-out infinite;
  }

  .simalas-loader-title {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--simalas-emerald-dark);
    letter-spacing: 0.01em;
  }

  .simalas-loader-text {
    font-size: 12.5px;
    color: var(--simalas-text-muted);
    line-height: 1.4;
    min-height: 18px;
  }

  .simalas-loader-progress {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: #E7EFEA;
    overflow: hidden;
    margin-top: 2px;
  }

  .simalas-loader-progress-bar {
    width: 42%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--simalas-emerald), var(--simalas-gold));
    animation: simalasProgressSlide 1.25s ease-in-out infinite;
  }

  @keyframes simalasFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes simalasSpinRing {
    to { transform: rotate(360deg); }
  }

  @keyframes simalasSpinRingRev {
    to { transform: rotate(-360deg); }
  }

  @keyframes simalasLogoPulse {
    0%, 100% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
  }

  @keyframes simalasLogoSpin3d {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
  }

  @keyframes simalasLogoBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.04); }
  }

  @keyframes simalasProgressSlide {
    0% { transform: translateX(-110%); }
    100% { transform: translateX(260%); }
  }
