:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-deeper: #1e3a8a;
    --accent: #f59e0b;
    --accent-light: #fef3c7;
    --accent-deep: #d97706;
    --green: #16a34a;
    --green-light: #dcfce7;
    --red: #dc2626;
    --red-light: #fee2e2;
    --danger: var(--red);
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --sidebar-w: 260px;
    --sidebar-w-collapsed: 68px;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(29,78,216,.04), 0 4px 14px rgba(29,78,216,.07);
    --shadow-lg: 0 8px 32px rgba(29,78,216,0.14);
    --grad-brand: linear-gradient(120deg, var(--primary) 0%, var(--primary-light) 100%);
    --grad-sidebar: linear-gradient(195deg, var(--primary) 0%, var(--primary-deeper) 100%);
    --grad-nav: linear-gradient(180deg, #2f4fe0 0%, #5b3ae9 100%);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { max-width: 100%; overflow-x: hidden; }
  body {
    font-family: 'Archivo', sans-serif;
    color: var(--gray-900);
    min-height: 100vh;
    display: flex;
    background-color: #f8fafc;
    background-image:
      radial-gradient(900px 560px at -8% -12%, rgba(37,99,235,.12), transparent 60%),
      radial-gradient(820px 520px at 108% -6%, rgba(245,158,11,.12), transparent 58%),
      radial-gradient(760px 520px at 50% 112%, rgba(22,163,74,.10), transparent 58%);
    background-repeat: no-repeat;
    background-attachment: fixed;
  }


  /* LOGIN */
  #login-screen { display: flex; min-height: 100vh; width: 100%; position: fixed; inset: 0; z-index: 100; background: white; }

  @keyframes blobFloat1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(30px,-24px) scale(1.08); } }
  @keyframes blobFloat2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-24px,26px) scale(1.06); } }
  @keyframes blobFloat3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(18px,18px) scale(.94); } }
  @keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes ringPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(232,160,32,.35); } 50% { box-shadow: 0 0 0 8px rgba(232,160,32,0); } }

  /* --- Kiri: Hero Section --- */
  .login-hero { flex: 1.15; position: relative; overflow: hidden; background: #ffffff; color: var(--gray-900); display: flex; flex-direction: column; justify-content: center; padding: 60px 64px; border-right: 1px solid var(--gray-200); }
  .hero-mesh { display: none; }
  .hero-grid { display: none; }
  .hero-scrim { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
  .login-hero-content { position: relative; z-index: 1; max-width: 480px; }
  .hero-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
  .hero-brand img { width: 46px; height: 46px; object-fit: contain; background: white; border-radius: 50%; padding: 4px; box-shadow: 0 2px 8px rgba(15,23,42,.10); }
  .hero-brand span { font-size: 15px; font-weight: 700; letter-spacing: .3px; color: var(--gray-700); }
  .hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: #f8fafc; border: 1px solid #e2e8f0; font-size: 12px; font-weight: 600; letter-spacing: .2px; color: #1d4ed8; margin-bottom: 22px; }
  .hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: #2563eb; box-shadow: 0 0 0 0 rgba(29,78,216,.5); animation: ringPulse 2s ease-in-out infinite; }
  .login-hero h2 { font-size: 34px; font-weight: 800; line-height: 1.26; margin-bottom: 14px; letter-spacing: -.3px; color: var(--gray-900); }
  .login-hero h2 em { color: #2563eb; font-style: normal; }
  .login-hero .hero-sub { font-size: 15px; line-height: 1.65; color: var(--gray-500); margin-bottom: 34px; max-width: 440px; }
  .hero-features { display: flex; flex-direction: column; gap: 12px; }
  .hero-feature { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--gray-200); box-shadow: 0 4px 14px -6px rgba(15,23,42,.08); transition: box-shadow .2s, transform .2s; }
  .hero-feature:hover { box-shadow: 0 8px 22px -8px rgba(15,23,42,.14); transform: translateX(2px); }
  .hero-feature .feat-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; background: #f8fafc; display: flex; align-items: center; justify-content: center; color: #2563eb; }
  .hero-feature:nth-child(2) .feat-icon { background: #fef3c7; color: #d97706; }
  .hero-feature .feat-text strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 2px; color: var(--gray-900); }
  .hero-feature .feat-text span { font-size: 12.5px; color: var(--gray-500); line-height: 1.4; }
  .hero-footer { margin-top: 34px; font-size: 12px; color: rgba(255,255,255,.65); letter-spacing: .2px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.15); }

  /* --- Kanan: Form Login --- */
  .login-form-panel { flex: 0 0 440px; max-width: 440px; background: linear-gradient(165deg, var(--gray-50) 0%, #f8fafc 100%); display: flex; align-items: center; justify-content: center; padding: 40px; position: relative; overflow: hidden; }
  .login-form-panel::before, .login-form-panel::after { content: ''; position: absolute; border-radius: 26px; z-index: 0; }
  .login-form-panel::before { width: 150px; height: 150px; background: var(--accent-light); top: 10%; left: -50px; transform: rotate(18deg); opacity: .6; }
  .login-form-panel::after { width: 110px; height: 110px; background: rgba(20,184,166,.10); bottom: 8%; right: -30px; transform: rotate(-14deg); }
  .login-card { z-index: 1; animation: cardIn .5s cubic-bezier(.22,1,.36,1); }
  .login-card { position: relative; overflow: hidden; background: rgba(255,255,255,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(29,78,216,0.08); border-radius: 22px; padding: 46px 38px 40px; width: 100%; max-width: 370px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 30px 60px -20px rgba(29,78,216,.24); }
  .login-logo { text-align: center; margin-bottom: 26px; }
  .login-logo-ring { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(29,78,216,.07), rgba(232,160,32,.14)); border: 1px solid rgba(29,78,216,.07); }
  .login-logo .school-seal { width: 72px; height: 72px; background: var(--primary); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: white; font-size: 26px; font-weight: 800; margin-bottom: 12px; }
  .login-logo .school-logo-img { width: 56px !important; height: 56px !important; object-fit: contain; display: block; }
  .surat-qr-wrap { display: flex; align-items: flex-start; gap: 10px; justify-content: flex-end; margin-top: 24px; }
  .surat-qr-box { text-align: center; }
  .surat-qr-box canvas, .surat-qr-box img { width: 72px !important; height: 72px !important; display: block; margin: 0 auto; }
  .surat-qr-label { font-size: 7pt; color: #555; margin-top: 3px; font-family: 'Archivo', sans-serif; }
  .login-logo h1 { font-size: 21px; font-weight: 800; color: var(--primary-dark); letter-spacing: -.2px; }
  .login-logo p { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
  .login-role-toggle { display: flex; gap: 4px; background: var(--gray-100); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
  .login-role-btn { flex: 1; border: none; background: transparent; padding: 9px 6px; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--gray-500); border-radius: 9px; cursor: pointer; transition: background .18s, color .18s, box-shadow .18s; }
  .login-role-btn:hover { color: var(--gray-700); }
  .login-role-btn.active { background: #fff; color: var(--primary); box-shadow: 0 2px 6px rgba(15,23,42,.10); }
  .login-field { margin-bottom: 16px; }
  .login-field label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
  .input-wrap { position: relative; display: flex; align-items: center; }
  .input-icon { position: absolute; left: 14px; color: var(--gray-400); pointer-events: none; transition: color .2s; }
  .login-field input { width: 100%; padding: 12px 14px 12px 40px; border: 1.5px solid var(--gray-200); border-radius: 12px; font-family: inherit; font-size: 14px; color: var(--gray-900); outline: none; background: rgba(255,255,255,.7); transition: border-color .2s, box-shadow .2s, background .2s; }
  .login-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(29,78,216,.07); background: #fff; }
  .login-field input:focus ~ .input-icon, .input-wrap:focus-within .input-icon { color: var(--primary); }
  .pw-wrap { position: relative; }
  .pw-wrap input { padding-right: 42px !important; }
  .btn-eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 4px; color: var(--gray-400); line-height: 0; transition: color .2s; }
  .btn-eye:hover { color: var(--primary); }
  .login-btn { width: 100%; padding: 13px; background: linear-gradient(120deg, var(--primary) 0%, var(--primary-light) 100%); color: white; border: none; border-radius: 12px; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: filter .2s, transform .15s, box-shadow .2s; margin-top: 10px; box-shadow: 0 10px 24px -10px rgba(29,78,216,.55); }
  .login-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
  .login-btn:active { transform: translateY(0); }
  .login-btn svg { transition: transform .2s; }
  .login-btn:hover svg { transform: translateX(3px); }
  .login-error { font-size: 13px; color: var(--red); text-align: center; margin-top: 12px; padding: 8px 10px; border-radius: 8px; background: var(--red-light); display: none; }
  .login-card-footer { text-align: center; font-size: 11px; color: var(--gray-400); margin-top: 22px; letter-spacing: .2px; }

  /* LAYOUT */
  #app { display: none; width: 100%; }
  .sidebar { width: var(--sidebar-w); background: var(--grad-nav); color: rgba(255,255,255,.8); position: fixed; left: 0; top: 0; bottom: 0; overflow-y: auto; overflow-x: hidden; z-index: 50; display: flex; flex-direction: column; box-shadow: 4px 0 24px rgba(15,23,42,.12); transition: width .22s ease; }
  .sidebar-collapse-btn { position: fixed; top: 28px; left: var(--sidebar-w); transform: translateX(-50%); width: 28px; height: 28px; padding: 0; border-radius: 50%; background: #fff; border: 1px solid var(--gray-200); box-shadow: 0 2px 8px rgba(15,23,42,.18); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 55; color: var(--primary); transition: left .22s ease; }
  .sidebar-collapse-btn:hover { color: var(--primary-dark); }
  .sidebar-collapse-btn svg { transition: transform .22s ease; }
  /* Mode ciut (icon-only): sidebar tetap ada, cuma nyempit ke lebar ikon.
     Trik: font-size:0 di nav-item bikin teksnya "hilang" (lebar teks jadi 0)
     tanpa perlu ubah markup tiap menu, ikon SVG gak kepengaruh krn ukurannya
     dari width/height attribute, bukan dari font-size. */
  @media (min-width: 769px) {
    #app.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
    #app.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }
    #app.sidebar-collapsed .sidebar-collapse-btn { left: var(--sidebar-w-collapsed); }
    #app.sidebar-collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }
    #app.sidebar-collapsed .sidebar-title,
    #app.sidebar-collapsed .nav-label,
    #app.sidebar-collapsed .nav-chevron,
    #app.sidebar-collapsed .nav-submenu { display: none !important; }
    #app.sidebar-collapsed .sidebar-header { padding-left: 0; padding-right: 0; display: flex; justify-content: center; }
    #app.sidebar-collapsed .sidebar-logo { justify-content: center; }
    #app.sidebar-collapsed .nav-section { padding-left: 0; padding-right: 0; }
    #app.sidebar-collapsed .nav-item,
    #app.sidebar-collapsed .nav-parent { font-size: 0; justify-content: center; padding-left: 0; padding-right: 0; gap: 0; margin-left: 6px; margin-right: 6px; border-radius: 9px; }
  }
  .sidebar::before { content: ''; position: absolute; top: -80px; right: -80px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(20,15,70,.35), rgba(20,15,70,0) 70%); pointer-events: none; }
  .sidebar-header { padding: 24px 20px 20px; border-bottom: 1px solid rgba(255,255,255,.15); position: relative; z-index: 1; }
  .sidebar-logo { display: flex; align-items: center; gap: 12px; }
  .sidebar-seal { width: 44px; height: 44px; background: #f8fafc; color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex-shrink: 0; }
  .sidebar-title { font-size: 14px; font-weight: 800; line-height: 1.3; color: #fff; }
  .sidebar-title span { display: block; font-size: 11px; font-weight: 400; color: rgba(255,255,255,.65); opacity: 1; margin-top: 2px; }
  .nav-section { padding: 20px 12px 0; position: relative; z-index: 1; }
  .nav-label { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.5); opacity: 1; letter-spacing: .1em; text-transform: uppercase; padding: 0 8px; margin-bottom: 8px; }
  .nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s; margin-bottom: 3px; font-size: 14px; font-weight: 500; color: rgba(255,255,255,.8); position: relative; }
  .nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
  .nav-item.active { background: #fff; color: var(--primary-dark); font-weight: 700; box-shadow: 0 4px 12px rgba(15,23,42,.18); }
  .nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
  .nav-item.active svg { opacity: 1; color: var(--primary-dark); }

  /* Nav parent (dropdown) */
  .nav-parent .nav-chevron { width: 14px; height: 14px; margin-left: auto; opacity: .55; transition: transform .2s; flex-shrink: 0; }
  .nav-parent.open .nav-chevron { transform: rotate(180deg); }
  .nav-submenu { max-height: 0; overflow: hidden; transition: max-height .22s ease; }
  .nav-submenu.open { max-height: 320px; }
  .nav-subitem { display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 40px; border-radius: 9px; cursor: pointer; transition: background .15s; margin-bottom: 3px; font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,.65); }
  .nav-subitem:hover { background: rgba(255,255,255,.1); color: #fff; }
  .nav-subitem.active { background: #fff; color: var(--primary-dark); font-weight: 700; }
  .nav-subitem::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .6; flex-shrink: 0; }
  .nav-subitem.active::before { background: var(--primary-dark); opacity: 1; }

  /* Kenaikan Kelas & Kelulusan — step wizard (ala SIMKEU) */
  .kk-step { padding: 16px 2px; border-bottom: 1px solid var(--gray-100); }
  .kk-step:last-child { border-bottom: none; }
  .kk-step-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
  .kk-step-main { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; }
  .kk-step-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; background: var(--gray-300); }
  .kk-step-dot.pending { background: var(--red); }
  .kk-step-dot.ready { background: var(--primary-light); }
  .kk-step-dot.done { background: var(--green); }
  .kk-step-dot.locked { background: var(--gray-300); }
  .kk-step-title { font-weight: 700; font-size: 14px; color: var(--gray-900); }
  .kk-step-sub { font-size: 12.5px; color: var(--gray-500); margin-top: 3px; }
  .kk-step-sub.locked-hint { color: var(--accent); display: flex; align-items: center; gap: 5px; }
  .kk-step-detail-toggle { font-size: 12px; color: var(--primary); font-weight: 600; cursor: pointer; margin-top: 6px; display: inline-block; }
  .kk-step-btn { flex-shrink: 0; white-space: nowrap; }
  .kk-step-detail { margin-top: 12px; border: 1px solid var(--gray-200); border-radius: 10px; overflow: hidden; display: none; }
  .kk-step-detail.open { display: block; }
  .kk-step-result { margin-top: 10px; padding: 10px 14px; border-radius: 8px; background: #f0fdf4; border: 1px solid #bbf7d0; font-size: 12.5px; color: #166534; display: none; }
  .kk-step-result.show { display: block; }

  /* Batalkan / Turun Kelas — collapsible koreksi */
  .kk-collapse-header { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--gray-900); cursor: pointer; margin: 20px 0 12px; user-select: none; }
  .kk-collapse-header .kk-chev { width: 15px; height: 15px; flex-shrink: 0; transition: transform .2s; color: var(--gray-500); }
  .kk-collapse-header.open .kk-chev { transform: rotate(180deg); }
  .kk-collapse-header .kk-collapse-sub { font-weight: 500; font-size: 12.5px; color: var(--gray-400); }
  .kk-collapse-body { display: none; }
  .kk-collapse-body.open { display: block; }
  .kk-info-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: #1e3a8a; margin-bottom: 14px; line-height: 1.65; display: flex; gap: 8px; }
  .kk-turun-card { border: 1px solid var(--gray-200); border-radius: 12px; overflow: hidden; }
  .kk-turun-row { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); }
  .kk-turun-row:last-child { border-bottom: none; }

  .main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; transition: margin-left .25s ease; }

  /* Role kiosk: device khusus nempel di pos absen, sidebar dikunci total
     supaya gak ada yang bisa navigasi ke halaman lain dari device fisik. */
  #app.kiosk-locked .sidebar { display: none; }
  #app.kiosk-locked .main { margin-left: 0; }
  #app.kiosk-locked .hamburger,
  #app.kiosk-locked #sidebar-overlay { display: none !important; }
  /* Dropdown akun (ganti password/2FA/logout) juga dikunci total buat kiosk
     -- device ini publik, siapa pun yang megang gak boleh bisa logout atau
     ganti password sendiri. Kalau perlu ganti, dilakukan superadmin lewat
     Kelola Pengguna, bukan dari akun kiosk itu sendiri. */
  #app.kiosk-locked #user-chip { cursor: default; pointer-events: none; }
  #app.kiosk-locked .user-chevron { display: none; }
  .topbar { background: rgba(255,255,255,.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--gray-200); padding: 0 32px; height: 64px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 30; box-shadow: 0 1px 0 rgba(29,78,216,.02), 0 4px 16px -8px rgba(29,78,216,.06); }
  .topbar-left h2 { font-size: 17px; font-weight: 700; color: var(--gray-900); }
  .topbar-left p { font-size: 12px; color: var(--gray-500); margin-top: 1px; }
  .topbar-right { display: flex; align-items: center; gap: 12px; }

  /* Banner mode "Login sebagai" (impersonate) — nempel tepat di bawah
     topbar & ikut sticky, biar tetap kelihatan walau discroll. Dipakai
     saat admin/superadmin sedang menyamar sebagai akun guru tertentu
     (lihat js/guru.js:impersonateGuru & js/core.js:renderImpersonateBanner). */
  .impersonate-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: linear-gradient(90deg, #fff7ed 0%, #fffbeb 100%);
    border-bottom: 1px solid #fed7aa;
    padding: 9px 32px; position: sticky; top: 64px; z-index: 29;
  }
  .impersonate-banner-info { display: flex; align-items: center; gap: 8px; color: #9a3412; font-size: 12.5px; font-weight: 700; }
  .impersonate-banner-info svg { flex-shrink: 0; color: #ea580c; }
  .impersonate-banner-btn {
    display: inline-flex; align-items: center; gap: 6px; font-family: inherit;
    background: #ea580c; color: #fff; border: none; border-radius: 999px;
    font-size: 12px; font-weight: 700; padding: 6px 14px; cursor: pointer;
    transition: background .15s ease, transform .15s ease;
  }
  .impersonate-banner-btn:hover { background: #c2410c; transform: translateY(-1px); }
  @media (max-width: 720px) { .impersonate-banner { padding: 8px 16px; } .impersonate-banner-info { font-size: 11.5px; } }
  .user-chip { display: flex; align-items: center; gap: 10px; background: var(--gray-100); border: 1px solid transparent; border-radius: 50px; padding: 6px 14px 6px 6px; cursor: pointer; position: relative; user-select: none; transition: background .15s, border-color .15s; }
  .user-chip:hover { background: var(--gray-100); border-color: var(--gray-200); }
  .user-avatar { width: 32px; height: 32px; background: var(--grad-brand); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 13px; font-weight: 700; overflow: hidden; box-shadow: 0 2px 6px rgba(29,78,216,.35); }
  .user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .user-name { font-size: 13px; font-weight: 600; color: var(--gray-700); }
  .user-chevron { width: 16px; height: 16px; color: var(--gray-500); transition: transform .2s; flex-shrink: 0; }
  .user-chip.open .user-chevron { transform: rotate(180deg); }
  .user-dropdown { position: absolute; top: calc(100% + 8px); right: 0; background: white; border: 1px solid var(--gray-200); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 180px; z-index: 300; overflow: hidden; display: none; }
  .user-chip.open .user-dropdown { display: block; }
  .user-dropdown-item { display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-size: 13px; font-weight: 500; color: var(--gray-700); cursor: pointer; transition: background .12s; }
  .user-dropdown-item:hover { background: var(--gray-100); }
  .user-dropdown-item svg { color: var(--gray-500); flex-shrink: 0; }
  .user-dropdown-divider { height: 1px; background: var(--gray-200); margin: 4px 0; }

  /* --- Bel Notifikasi (topbar, dekat avatar) --- */
  .ta-topbar-chip { position: relative; }
  .ta-topbar-btn { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 50px; background: var(--gray-100); border: 1px solid transparent; color: var(--gray-800); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
  .ta-topbar-btn:hover { border-color: var(--gray-200); }
  .ta-topbar-chip.open .ta-topbar-btn { background: #eff6ff; border-color: #bfdbfe; }
  .ta-topbar-icon { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--grad-brand); color: #fff; display: flex; align-items: center; justify-content: center; }
  .ta-topbar-text { display: flex; align-items: baseline; gap: 6px; line-height: 1.1; }
  .ta-topbar-year { font-size: 13px; font-weight: 700; color: var(--gray-900); }
  .ta-topbar-sem { font-size: 10.5px; font-weight: 700; color: var(--primary); background: #dbeafe; padding: 2px 7px; border-radius: 999px; }
  .ta-topbar-caret { flex: none; color: var(--gray-400); transition: transform .15s; }
  .ta-topbar-chip.open .ta-topbar-caret { transform: rotate(180deg); color: var(--primary); }
  .ta-topbar-dropdown { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: 220px; max-width: 90vw; background: white; border: 1px solid var(--gray-200); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 300; overflow: hidden; display: none; }
  .ta-topbar-chip.open .ta-topbar-dropdown { display: block; }
  @media (max-width: 640px) {
    .ta-topbar-text, .ta-topbar-caret { display: none; }
    .ta-topbar-btn { padding: 0; width: 40px; height: 40px; justify-content: center; border-radius: 50%; }
    .ta-topbar-dropdown { position: fixed; top: 68px; left: 12px; right: auto; transform: none; width: 220px; }
  }
  .ta-topbar-dropdown-header { padding: 12px 14px 9px; font-size: 12.5px; font-weight: 800; color: var(--gray-900); border-bottom: 1px solid var(--gray-100); }
  .ta-topbar-dropdown-list { max-height: 320px; overflow-y: auto; padding: 6px; }
  .ta-topbar-item { display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 8px 9px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--gray-700); }
  .ta-topbar-item.is-aktif { background: #eff6ff; color: var(--primary-dark); }
  .ta-topbar-tag { margin-left: 2px; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--primary); }

  /* ===== Pengaturan > Tahun Ajaran (hero + timeline) ===== */
  .ta-hero { position: relative; overflow: hidden; border-radius: 16px; padding: 24px 26px; margin-bottom: 22px; background: var(--grad-sidebar); box-shadow: 0 10px 30px -10px rgba(30,58,138,.45); }
  .ta-hero-blob { position: absolute; border-radius: 50%; background: var(--accent); pointer-events: none; }
  .ta-hero-blob-1 { width: 190px; height: 190px; top: -60px; right: -40px; opacity: .16; }
  .ta-hero-blob-2 { width: 110px; height: 110px; bottom: -50px; right: 70px; opacity: .12; }
  .ta-hero-grid { position: absolute; inset: 0; opacity: .08; background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px); background-size: 26px 26px; pointer-events: none; }
  .ta-hero-top { position: relative; display: flex; align-items: flex-start; gap: 14px; }
  .ta-hero-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; color: #fff; backdrop-filter: blur(2px); }
  .ta-hero-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-light); }
  .ta-hero-value { font-size: 34px; font-weight: 800; color: #fff; margin-top: 2px; line-height: 1.15; }
  .ta-hero-foot { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.16); }
  .ta-hero-semester { font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24); padding: 4px 12px; border-radius: 999px; }
  .ta-hero-note { font-size: 12px; color: rgba(255,255,255,.78); }

  .ta-section-label { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
  .ta-count-pill { font-size: 10.5px; font-weight: 800; color: var(--primary); background: #eff6ff; border-radius: 999px; padding: 1px 8px; text-transform: none; letter-spacing: 0; }

  .ta-timeline { position: relative; display: flex; flex-direction: column; gap: 4px; }
  .ta-loading, .ta-empty { padding: 14px 4px; color: var(--gray-400); font-size: 12.5px; }
  .ta-timeline-item { position: relative; display: flex; gap: 14px; padding: 4px 0 18px 2px; }
  .ta-timeline-item::before { content: ''; position: absolute; left: 8px; top: 20px; bottom: -2px; width: 2px; background: var(--gray-200); }
  .ta-timeline-item:last-child::before { display: none; }
  .ta-timeline-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2.5px solid var(--gray-300); margin-top: 2px; z-index: 1; }
  .ta-timeline-item.is-aktif .ta-timeline-dot { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 4px #dbeafe; }
  .ta-timeline-content { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--gray-200); background: #fff; transition: border-color .15s, box-shadow .15s; }
  .ta-timeline-item.is-aktif .ta-timeline-content { border-color: #bfdbfe; background: #f5f9ff; box-shadow: var(--shadow); }
  .ta-timeline-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .ta-timeline-label { font-size: 14px; font-weight: 800; color: var(--gray-900); }
  .ta-timeline-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #fff; background: var(--primary); padding: 3px 10px; border-radius: 999px; }
  .ta-timeline-sub { font-size: 11.5px; color: var(--gray-500); margin-top: 3px; }
  .ta-timeline-action { font-size: 11.5px; font-weight: 700; color: var(--primary); background: #eff6ff; border: 1px solid #bfdbfe; padding: 5px 12px; border-radius: 8px; cursor: pointer; transition: background .15s; }
  .ta-timeline-action:hover { background: #dbeafe; }
  .ta-timeline-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .ta-timeline-del { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; border: 1px solid var(--gray-200); background: #fff; color: var(--gray-400); border-radius: 8px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
  .ta-timeline-del:hover { background: #fef2f2; border-color: #fecaca; color: #dc2626; }

  .ta-add-card { position: relative; overflow: hidden; background: linear-gradient(180deg,#ffffff,var(--gray-50)); border: 1.5px solid var(--gray-200); border-radius: 14px; padding: 18px; box-shadow: 0 1px 3px rgba(15,23,42,.05); }
  .ta-add-card::before { content: ''; position: absolute; top: -34px; right: -34px; width: 110px; height: 110px; border-radius: 50%; background: var(--primary); opacity: .06; pointer-events: none; }
  .ta-add-card-title { position: relative; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; color: var(--gray-900); margin-bottom: 12px; }
  .ta-add-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 7px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 800; box-shadow: 0 2px 6px -1px rgba(37,99,235,.5); }
  .ta-add-form { position: relative; display: flex; flex-direction: row; align-items: stretch; flex-wrap: wrap; gap: 8px; }
  .ta-input-wrap { position: relative; flex: 1 1 150px; min-width: 130px; }
  .ta-input-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); pointer-events: none; }
  .ta-input-wrap input { width: 100%; height: 100%; box-sizing: border-box; padding: 10px 12px 10px 34px; font-size: 13px; border: 1.5px solid var(--gray-300); border-radius: 9px; transition: border-color .15s, box-shadow .15s; }
  .ta-input-wrap input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px #dbeafe; }
  .ta-add-form #ta-btn-tambah { flex: 0 0 auto; white-space: nowrap; }
  .ta-tip-card { background: var(--accent-light); border-radius: 12px; padding: 16px; margin-top: 14px; font-size: 12px; color: #7a5210; line-height: 1.7; }

  .notif-chip { position: relative; }
  .notif-bell-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--gray-100); border: 1px solid transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--gray-700); position: relative; transition: background .15s, border-color .15s; }
  .notif-bell-btn:hover { background: var(--gray-100); border-color: var(--gray-200); }
  .notif-chip.open .notif-bell-btn { background: var(--accent-light); border-color: var(--accent); color: var(--accent-deep); }
  .notif-badge-dot { position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 800; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff; display: none; }
  .notif-dropdown { position: absolute; top: calc(100% + 10px); right: 0; width: 340px; max-width: 90vw; background: white; border: 1px solid var(--gray-200); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 300; overflow: hidden; display: none; }
  .notif-chip.open .notif-dropdown { display: block; }
  @media (max-width: 768px) {
    /* Di layar sempit, dropdown notif di-anchor ke layar (position: fixed)
       supaya tidak nabrak tepi kiri/kanan. Sama dengan pola ortu-notif-panel. */
    .notif-dropdown { position: fixed; top: 68px; left: 12px; right: 12px; width: auto; max-width: none; }
  }
  .notif-dropdown-header { padding: 14px 16px 10px; font-size: 13px; font-weight: 800; color: var(--gray-900); border-bottom: 1px solid var(--gray-100); }
  .notif-dropdown-list { max-height: 360px; overflow-y: auto; }
  .notif-item { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--gray-100); transition: background .12s; }
  .notif-item:last-child { border-bottom: none; }
  .notif-item:hover { background: var(--gray-50); }
  .notif-item-unread { background: #f8fafc; }
  .notif-item-dot { position: absolute; top: 14px; right: 14px; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; }
  .notif-item-icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--accent-light); color: var(--accent-deep); }
  .notif-item-body { flex: 1; min-width: 0; }
  .notif-item-title { font-size: 12.5px; font-weight: 700; color: var(--gray-900); margin-bottom: 2px; }
  .notif-item-sub { font-size: 11.5px; color: var(--gray-500); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .notif-item-time { font-size: 10.5px; color: var(--gray-400); margin-top: 4px; }
  .notif-empty { padding: 28px 16px; text-align: center; font-size: 12.5px; color: var(--gray-400); }

  .content { padding: 28px 32px; flex: 1; min-width: 0; max-width: 100%; }
  .page { display: none; }
  .page.active { display: block; }

  .app-footer { position: relative; padding: 0; text-align: center; font-size: 12px; color: var(--gray-400); border-top: 1px solid var(--gray-200); background: linear-gradient(180deg, #fff 0%, var(--gray-50) 100%); }
  .app-footer::before { content:''; position:absolute; top:-1px; left:0; right:0; height:3px; background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 45%, var(--accent) 100%); }
  .app-footer-inner { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; padding:18px 32px; max-width:1400px; margin:0 auto; text-align:left; font-size:11.5px; color:var(--gray-500); }
  .app-footer-brand { display:flex; align-items:center; gap:12px; }
  .app-footer-logo { width:34px; height:34px; object-fit:contain; border-radius:8px; background:var(--gray-100); padding:4px; flex-shrink:0; }
  .app-footer-title { font-size:13px; font-weight:800; color:var(--gray-900); letter-spacing:.02em; }
  .app-footer-title span { font-weight:600; color:var(--gray-500); }
  .app-footer-sub { font-size:11px; color:var(--gray-400); margin-top:1px; }
  .app-footer-meta { display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:11.5px; color:var(--gray-500); }
  .app-footer-badge { background: var(--grad-brand); color:#fff; font-size:10.5px; font-weight:700; padding:3px 9px; border-radius:20px; letter-spacing:.03em; }
  .app-footer-divider { width:3px; height:3px; border-radius:50%; background:var(--gray-300); flex-shrink:0; }
  .app-footer a { color: var(--primary); font-weight:600; text-decoration: none; }
  .app-footer a:hover { color: var(--primary-light); text-decoration: underline; }
  @media (max-width: 900px) { .app-footer-inner { padding: 14px 16px; font-size: 10.5px; gap: 8px; } }

  /* STATS */
  .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
  .stat-card { background: white; border-radius: var(--radius); padding: 20px; border: 1px solid var(--gray-200); box-shadow: var(--shadow); min-width: 0; overflow: hidden; position: relative; }
  .stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad-brand); opacity: 0; transition: opacity .2s; }
  .stat-card-clickable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
  .stat-card-clickable:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -8px rgba(29,78,216,.16); border-color: var(--primary-light); }
  .stat-card-clickable:hover::before { opacity: 1; }

  /* HERO SELAMAT DATANG — dashboard admin, di atas kartu statistik.
     Beda dari .profile-card (identitas madrasah formal di bawahnya) —
     ini sambutan personal + satu angka sorotan (mis. kehadiran guru
     hari ini), gaya kartu produk modern biar dashboard gak polos. */
  .dash-hero {
    position: relative; overflow: hidden; display: flex; align-items: center;
    justify-content: space-between; gap: 24px; flex-wrap: wrap;
    border-radius: 20px; padding: 28px 32px; margin-bottom: 20px;
    background: linear-gradient(120deg, #eef2ff 0%, #f5f3ff 55%, #fff7ed 100%);
    border: 1px solid var(--gray-100);
  }
  .dash-hero-left { flex: 1; min-width: 260px; }
  .dash-hero-badge { display: inline-flex; align-items: center; gap: 7px; background: #f1f5f9; color: #1d4ed8; font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px; text-transform: uppercase; }
  .dash-hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: #1d4ed8; flex-shrink: 0; }
  .dash-hero-title { font-size: 25px; font-weight: 800; color: var(--gray-900); margin: 0 0 8px; letter-spacing: -.3px; line-height: 1.25; }
  .dash-hero-title .dash-hero-name { background: linear-gradient(90deg, #4f46e5, #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .dash-hero-sub { font-size: 13.5px; color: var(--gray-500); max-width: 540px; line-height: 1.55; margin: 0; }
  .dash-hero-highlight { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 16px; padding: 14px 22px; box-shadow: 0 10px 26px -10px rgba(15,23,42,.18); flex-shrink: 0; }
  .dash-hero-highlight-icon { width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(135deg, #fb923c, #ea580c); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 6px 14px -4px rgba(234,88,12,.45); }
  .dash-hero-highlight-value { font-size: 19px; font-weight: 800; color: var(--gray-900); line-height: 1.2; white-space: nowrap; }
  .dash-hero-highlight-label { font-size: 11px; color: var(--gray-500); margin-top: 2px; white-space: nowrap; }
  @media (max-width: 720px) {
    .dash-hero { padding: 22px 20px; }
    .dash-hero-title { font-size: 21px; }
    .dash-hero-highlight { width: 100%; }
  }

  /* KARTU STATISTIK dashboard admin — versi "jreng": ikon kotak warna solid
     di kiri + angka besar di kanan (beda dari .stat-card lama yg ikonnya
     nempel kanan-atas & masih dipakai di halaman Alumni/BK, sengaja gak
     disentuh biar gak ikut berubah di sana). */
  .dash-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
  .dash-stat-card { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 16px; padding: 18px; border: 1px solid var(--gray-100); box-shadow: var(--shadow); min-width: 0; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
  .dash-stat-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -10px rgba(15,23,42,.16); }
  .dash-stat-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
  .dash-stat-icon.indigo { background: linear-gradient(135deg, #6366f1, #4338ca); }
  .dash-stat-icon.green  { background: linear-gradient(135deg, #22c55e, #15803d); }
  .dash-stat-icon.orange { background: linear-gradient(135deg, #fb923c, #ea580c); }
  .dash-stat-icon.red    { background: linear-gradient(135deg, #f87171, #dc2626); }
  .dash-stat-icon.blue   { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
  .dash-stat-icon.teal   { background: linear-gradient(135deg, #2dd4bf, #0f766e); }
  .dash-stat-value { font-size: 26px; font-weight: 800; color: var(--gray-900); letter-spacing: -.3px; line-height: 1.1; }
  .dash-stat-label { font-size: 12.5px; color: var(--gray-500); margin-top: 3px; }
  .dash-stat-card-active { box-shadow: 0 0 0 2px var(--gray-900) inset, var(--shadow); }
  .dash-stat-card-active .dash-stat-icon { box-shadow: 0 0 0 3px #fff inset; }
  /* Varian tint per status — dipakai kartu yg warnanya dinamis (mis. kartu
     ringkasan di Portal Wali Murid: hijau kalau aman, merah/oranye kalau
     ada yg perlu perhatian), biar "state"-nya kebaca sekilas bukan cuma dari ikon. */
  .dash-stat-card--indigo { border-color: #c7d2fe; background: linear-gradient(180deg, #eef2ff 0%, #fff 45%); }
  .dash-stat-card--green  { border-color: #bbf7d0; background: linear-gradient(180deg, #f0fdf4 0%, #fff 45%); }
  .dash-stat-card--orange { border-color: #fed7aa; background: linear-gradient(180deg, #fff7ed 0%, #fff 45%); }
  .dash-stat-card--red    { border-color: #fecaca; background: linear-gradient(180deg, #fef2f2 0%, #fff 45%); }
  .dash-stat-card--blue   { border-color: #e2e8f0; background: linear-gradient(180deg, #f8fafc 0%, #fff 45%); }
  .dash-stat-card--teal   { border-color: #e2e8f0; background: linear-gradient(180deg, #f8fafc 0%, #fff 45%); }
  .dash-stat-icon { position: relative; }
  @media (max-width: 900px) { .dash-stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .dash-stat-card { padding: 14px; gap: 10px; } .dash-stat-icon { width: 42px; height: 42px; } .dash-stat-value { font-size: 21px; } }
  /* Card ringkasan ijazah di halaman Alumni cuma ada 3 item — pakai auto-fit
     supaya jumlah kolom nyesuaikan lebar layar sendiri (3 di desktop, turun
     jadi 2 lalu 1 penuh di HP), gak kepatok angka tetap yang bikin kepepet
     di layar sempit. */
  #alumni-ijazah-cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  @media (max-width: 480px) { #alumni-ijazah-cards { grid-template-columns: 1fr; } }

  /* Menu shortcut Dashboard Guru — grid ikon+label ala menu app Android
     (tombol polos, gak nampilin angka/nilai), beda gaya dari .dash-stat-card
     admin yg baris horizontal ikon+angka. */
  .dash-guru-menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
  .dash-guru-menu-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; background: #fff; border-radius: 16px; padding: 16px 6px; border: 1px solid var(--gray-100); box-shadow: var(--shadow); cursor: pointer; text-align: center; transition: transform .15s ease, box-shadow .15s ease; }
  .dash-guru-menu-item:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -10px rgba(15,23,42,.16); }
  .dash-guru-menu-icon { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; }
  .dash-guru-menu-icon.blue   { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
  .dash-guru-menu-icon.teal   { background: linear-gradient(135deg, #2dd4bf, #0f766e); }
  .dash-guru-menu-icon.orange { background: linear-gradient(135deg, #fb923c, #ea580c); }
  .dash-guru-menu-icon.green  { background: linear-gradient(135deg, #22c55e, #15803d); }
  .dash-guru-menu-icon.indigo { background: linear-gradient(135deg, #6366f1, #4338ca); }
  .dash-guru-menu-icon.purple { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
  .dash-guru-menu-icon.red    { background: linear-gradient(135deg, #f87171, #dc2626); }
  .dash-guru-menu-icon.pink   { background: linear-gradient(135deg, #f472b6, #be185d); }
  .dash-guru-menu-label { font-size: 12px; font-weight: 600; color: var(--gray-700); line-height: 1.25; }
  @media (max-width: 900px) { .dash-guru-menu-grid { gap: 8px; } .dash-guru-menu-item { padding: 12px 4px; border-radius: 14px; } .dash-guru-menu-icon { width: 40px; height: 40px; border-radius: 12px; } .dash-guru-menu-icon svg { width: 19px; height: 19px; } .dash-guru-menu-label { font-size: 11px; } }

  /* Border & garis aksen atas ikut warna ikon masing-masing kartu saat di-hover,
     bukan biru semua (lihat .stat-icon.<warna> di bawah buat pasangan warnanya). */
  .stat-card-clickable.stat-card-green:hover { border-color: var(--green); }
  .stat-card-clickable.stat-card-green:hover::before { background: linear-gradient(90deg, var(--green) 0%, #22c55e 100%); }
  .stat-card-clickable.stat-card-blue:hover { border-color: var(--primary); }
  .stat-card-clickable.stat-card-blue:hover::before { background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%); }
  .stat-card-clickable.stat-card-teal:hover { border-color: #2563eb; }
  .stat-card-clickable.stat-card-teal:hover::before { background: linear-gradient(90deg, #2563eb 0%, #2dd4bf 100%); }
  .stat-card-clickable.stat-card-amber:hover { border-color: var(--accent-deep); }
  .stat-card-clickable.stat-card-amber:hover::before { background: linear-gradient(90deg, var(--accent-deep) 0%, #f5a524 100%); }
  .stat-card-clickable.stat-card-red:hover { border-color: var(--red); }
  .stat-card-clickable.stat-card-red:hover::before { background: linear-gradient(90deg, var(--red) 0%, #ef4444 100%); }
  /* State "aktif" buat kartu yang dipakai sebagai filter (mis. Status Ijazah Alumni) —
     tetap kepakai warna khas kartunya, tapi permanen kelihatan "kepilih" tanpa perlu hover. */
  .stat-card-clickable.stat-card-active { transform: translateY(-2px); }
  .stat-card-clickable.stat-card-active::before { opacity: 1; }
  .stat-card-clickable.stat-card-blue.stat-card-active { border-color: var(--primary); box-shadow: 0 10px 24px -8px rgba(29,78,216,.22); }
  .stat-card-clickable.stat-card-blue.stat-card-active::before { background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%); }
  .stat-card-clickable.stat-card-green.stat-card-active { border-color: var(--green); box-shadow: 0 10px 24px -8px rgba(34,197,94,.22); }
  .stat-card-clickable.stat-card-green.stat-card-active::before { background: linear-gradient(90deg, var(--green) 0%, #22c55e 100%); }
  .stat-card-clickable.stat-card-amber.stat-card-active { border-color: var(--accent-deep); box-shadow: 0 10px 24px -8px rgba(245,158,11,.22); }
  .stat-card-clickable.stat-card-amber.stat-card-active::before { background: linear-gradient(90deg, var(--accent-deep) 0%, #f5a524 100%); }
  .stat-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
  .stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.02); }
  .stat-icon.blue { background: linear-gradient(140deg, #f1f5f9 0%, #c3ddfb 100%); color: var(--primary); }
  .stat-icon.teal { background: linear-gradient(140deg, #f1f5f9 0%, #cbd5e1 100%); color: #0f5b52; }
  .stat-icon.green { background: linear-gradient(140deg, var(--green-light) 0%, #bdf3d0 100%); color: var(--green); }
  .stat-icon.amber { background: linear-gradient(140deg, var(--accent-light) 0%, #ffe2ae 100%); color: var(--accent-deep); }
  .stat-icon.red { background: linear-gradient(140deg, var(--red-light) 0%, #fecaca 100%); color: var(--red); }

  /* Badge kecil bulat di pojok ikon kartu Kehadiran dashboard ortu saat
     ada pengajuan izin yang masih menunggu persetujuan Wali Kelas — lihat
     renderOrtuDashboard() di js/portal-ortu.js. Overlay di ikon (bukan
     baris terpisah) supaya TIDAK menambah tinggi card — kalau nambah
     baris, grid ikut menyamakan tinggi ke-4 card jadi ada ruang kosong
     aneh di card lain yang tidak punya badge. */
  .ortu-stat-icon-dot { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--accent-deep); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; }

  /* RIWAYAT MENGAJAR — hero card (Jurnal Mengajar) */
  .jm-today-card { padding: 0 !important; overflow: hidden; margin-bottom: 16px; border-color: var(--primary-light); box-shadow: 0 10px 28px -14px rgba(29,78,216,.28); }
  .jm-today-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; flex-wrap: wrap; border-bottom: 1px solid var(--gray-100); }
  .jm-today-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--grad-brand); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 12px -4px rgba(29,78,216,.5); }
  .jm-today-text { flex: 1; min-width: 160px; }
  .jm-today-title { font-size: 15.5px; font-weight: 800; color: var(--gray-900); letter-spacing: -.01em; }
  .jm-today-sub { font-size: 12.5px; color: var(--gray-500); margin-top: 1px; }
  .jm-today-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  @media (max-width: 640px) { .jm-today-head { padding: 14px; } .jm-today-tools { width: 100%; } .jm-today-tools #jurnal-tanggal-pilih { flex: 1; } }

  .riwayat-hero-card { position: relative; overflow: hidden; border-radius: var(--radius); margin-bottom: 16px; padding: 18px 20px; background: linear-gradient(135deg, #fb923c 0%, #ea7e1f 55%, #c1650e 100%); box-shadow: 0 10px 28px -12px rgba(200,110,20,.42); }
  .riwayat-hero-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
  .riwayat-hero-icon { flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); }
  .riwayat-hero-text { min-width: 160px; }
  .riwayat-hero-title { font-size: 15.5px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
  .riwayat-hero-subtitle { font-size: 12.5px; color: rgba(255,255,255,.82); margin-top: 1px; }
  .riwayat-hero-badge { margin-left: auto; font-size: 11.5px; font-weight: 700; color: #c1650e; background: #fff; padding: 5px 13px; border-radius: 20px; white-space: nowrap; }
  .riwayat-hero-panel { position: relative; z-index: 1; display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 16px; background: rgba(255,255,255,.94); border-radius: 12px; padding: 12px 14px; }
  .riwayat-hero-label { font-size: 12px; font-weight: 700; color: var(--gray-600); display: block; margin-bottom: 5px; }
  .riwayat-hero-btn { background: linear-gradient(135deg, #fb923c 0%, #c1650e 100%); color: #fff; box-shadow: 0 4px 12px -4px rgba(193,101,14,.5); }
  .riwayat-hero-btn:hover { filter: brightness(1.06); }
  @media (max-width: 640px) {
    .riwayat-hero-card { padding: 16px; }
    .riwayat-hero-badge { margin-left: 0; }
    .riwayat-hero-panel { flex-direction: column; align-items: stretch; }
    .riwayat-hero-panel .btn { width: 100%; justify-content: center; }
  }

  .dash-guru-hero-card { position: relative; overflow: hidden; border-radius: var(--radius); margin-bottom: 20px; padding: 22px 24px; background: radial-gradient(130% 170% at 0% 0%, #f9a8d4 0%, #ec4899 45%, #9d174d 100%); box-shadow: 0 8px 32px rgba(219,39,119,.30); }
  .dash-guru-hero-blob-1 { position: absolute; top: -80px; right: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.20), rgba(255,255,255,0) 70%); pointer-events: none; }
  .dash-guru-hero-blob-2 { position: absolute; bottom: -100px; left: 20%; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, rgba(253,224,71,.35), rgba(253,224,71,0) 70%); pointer-events: none; }
  .dash-guru-hero-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
  .dash-guru-hero-avatar { flex-shrink: 0; width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 19px; color: #fff; background: linear-gradient(140deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,.1) 100%); border: 3px solid rgba(255,255,255,.5); box-shadow: 0 4px 16px rgba(8,27,56,.3); overflow: hidden; }
  .dash-guru-hero-nama { font-size: 17px; font-weight: 800; color: white; letter-spacing: -.01em; }
  .dash-guru-hero-tanggal { font-size: 12.5px; color: rgba(255,255,255,.78); margin-top: 3px; display: flex; align-items: center; gap: 5px; }
  .dash-guru-hero-badge { margin-left: auto; font-size: 11px; font-weight: 700; color: #be185d; background: white; padding: 6px 13px; border-radius: 20px; box-shadow: 0 4px 12px -4px rgba(0,0,0,.2); white-space: nowrap; }
  @media (max-width: 640px) {
    .dash-guru-hero-card { padding: 18px; }
    .dash-guru-hero-badge { margin-left: 0; }
  }
  .stat-value { font-size: 28px; font-weight: 800; color: var(--gray-900); letter-spacing: -.3px; }
  .stat-label { font-size: 13px; color: var(--gray-500); margin-top: 4px; }

  /* CARD */
  .card { background: white; border-radius: var(--radius); border: 1px solid var(--gray-200); box-shadow: var(--shadow); margin-bottom: 24px; }
  /* Kartu Jurnal Mengajar yang sudah diisi — hijau transparan merata +
     aksen border kiri, biar guru langsung kelihatan mana sesi yg belum digarap. */
  .jurnal-card-terisi { background: rgba(22,163,74,.08); border-color: #bbf0cf; border-left: 3px solid var(--green); }
  .card-header { padding: 18px 22px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
  .card-title { font-size: 15px; font-weight: 700; color: var(--gray-900); }
  .card-body { padding: 22px; }

  /* JAM KOSONG (Jurnal Mengajar) — dibikin ringkas: satu list ber-divider,
     bukan tumpukan card terpisah per baris, biar gak "rame" di mata. Aksen
     amber dipakai secukupnya (ikon + badge kecil), bukan blok warna penuh. */
  .jk-box { padding: 0 !important; overflow: hidden; }
  .jk-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; user-select: none; }
  .jk-head-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-light); color: var(--accent-deep); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .jk-head-icon.blue { background: #dbeafe; color: var(--primary-dark); }
  .jk-head-text { flex: 1; min-width: 0; }
  .jk-head-title { font-size: 14px; font-weight: 700; color: var(--gray-900); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
  .jk-head-count { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--accent-deep); color: #fff; font-size: 11px; font-weight: 700; }
  .jk-head-sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
  .jk-head-chevron { color: var(--gray-400); flex-shrink: 0; transition: transform .2s; }
  .jk-head-chevron.open { transform: rotate(180deg); }
  .jk-body { border-top: 1px solid var(--gray-200); background: var(--gray-50); }
  .jk-body-hint { font-size: 12px; color: var(--gray-500); padding: 12px 18px; }
  .jk-list { display: flex; flex-direction: column; }
  .jk-row { display: flex; align-items: center; gap: 12px; padding: 13px 18px; background: #fff; border-top: 1px solid var(--gray-200); }
  .jk-row.jk-row-pinned { background: #f8fafc; }
  .jk-row-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .jk-row-main { flex: 1; min-width: 0; }
  .jk-row-title { font-size: 13.5px; font-weight: 700; color: var(--gray-900); line-height: 1.35; }
  .jk-row-meta { font-size: 12px; color: var(--gray-500); margin-top: 2px; line-height: 1.4; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .jk-badge { display: inline-flex; align-items: center; padding: 1.5px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; }
  .jk-pin-note { font-size: 11.5px; color: var(--primary-dark); font-weight: 600; margin-top: 3px; display: flex; align-items: center; gap: 4px; }
  .jk-lock-note { font-size: 11px; color: var(--gray-400); margin-top: 3px; }
  .jk-row-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; border: none; background: var(--primary); color: #fff; transition: filter .15s, transform .15s; }
  .jk-row-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
  .jk-row-btn:disabled { background: var(--gray-100); color: var(--gray-400); cursor: not-allowed; transform: none; }
  @media (max-width: 560px) {
    .jk-row { flex-wrap: wrap; }
    .jk-row-btn { margin-left: 20px; }
  }

  /* JURNAL MENGAJAR (guru) — tiap sesi/jam pelajaran jadi kotak sendiri
     (bukan disambung border-top doang) biar guru gak keliru isi jurnal
     sesi yang salah pas ada 2+ jadwal di hari yang sama. */
  .jm-list { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
  .jm-row { padding: 14px 16px; border: 1.5px solid var(--gray-200); border-radius: 12px; background: #fff; }
  .jm-row-head { display: flex; align-items: flex-start; gap: 10px; }
  .jm-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
  .jm-row-main { flex: 1; min-width: 0; }
  .jm-title { font-size: 14px; font-weight: 700; color: var(--gray-900); line-height: 1.35; }
  .jm-meta { font-size: 12px; color: var(--gray-500); margin-top: 1px; }
  .jm-badge { flex-shrink: 0; display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
  .jm-materi { font-size: 12.5px; color: var(--gray-600); margin: 7px 0 0 18px; line-height: 1.4; }
  .jm-note { font-size: 11.5px; margin: 5px 0 0 18px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
  .jm-note-pengganti { color: #6366f1; }
  .jm-note-lock { color: var(--gray-400); font-weight: 500; }
  .jm-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; margin-left: 18px; }
  .jm-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; border: 1.5px solid var(--gray-200); background: #fff; color: var(--gray-700); transition: all .15s; }
  .jm-btn:hover { border-color: var(--primary-light); color: var(--primary); background: var(--gray-50); }
  .jm-btn-primary { border-color: transparent; background: var(--grad-brand); color: #fff; box-shadow: 0 3px 10px -4px rgba(29,78,216,.5); }
  .jm-btn-primary:hover { filter: brightness(1.06); color: #fff; }
  .jm-btn:disabled { opacity: .45; cursor: not-allowed; border-color: var(--gray-200) !important; color: var(--gray-400) !important; background: #fff !important; box-shadow: none !important; }

  /* BUTTONS */
  .btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 9px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all .15s; }
  .btn:disabled { opacity: .5; cursor: not-allowed; filter: none !important; transform: none !important; }
  .btn-primary { background: var(--grad-brand); color: white; box-shadow: 0 4px 12px -4px rgba(29,78,216,.45); }
  .btn-primary:hover { filter: brightness(1.06); box-shadow: 0 6px 16px -4px rgba(29,78,216,.55); transform: translateY(-1px); }
  .btn-success { background: linear-gradient(120deg, var(--green) 0%, #15803d 100%); color: white; box-shadow: 0 4px 12px -4px rgba(22,163,74,.4); }
  .btn-success:hover { filter: brightness(1.06); transform: translateY(-1px); }
  .btn-warning { background: linear-gradient(120deg, var(--accent) 0%, var(--accent-deep) 100%); color: white; box-shadow: 0 4px 12px -4px rgba(232,160,32,.4); }
  .btn-warning:hover { filter: brightness(1.06); transform: translateY(-1px); }
  .export-dropdown {
    position: absolute; top: calc(100% + 4px); right: 0;
    background: white; border: 1px solid var(--border);
    border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12);
    min-width: 160px; z-index: 999; overflow: hidden;
  }
  .export-dropdown button {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 10px 14px;
    background: none; border: none; cursor: pointer;
    font-size: 13px; color: var(--gray-800);
    text-align: left; transition: background .15s;
  }
  .export-dropdown button:hover { background: var(--gray-50); }
  .btn-danger { background: linear-gradient(120deg, var(--red) 0%, #b91c1c 100%); color: white; box-shadow: 0 4px 12px -4px rgba(220,38,38,.4); }
  .btn-danger:hover { filter: brightness(1.06); transform: translateY(-1px); }
  .btn-outline { background: white; color: var(--gray-700); border: 1.5px solid var(--gray-200); }
  .btn-outline:hover { border-color: var(--primary-light); background: var(--gray-50); color: var(--primary); }
  .btn-outline-danger { background: white; color: var(--red); border: 1.5px solid var(--red-light); }
  .btn-outline-danger:hover { border-color: var(--red); background: var(--red-light); }
  .btn-sm { padding: 6px 11px; font-size: 12px; }
  .btn-group { display: flex; gap: 6px; flex-wrap: nowrap; }
  /* Toolbar "Input Absensi Harian" (Tanggal + Semua Hadir/Alpa + Simpan) */
  .absguru-toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
  .absguru-toolbar-tanggal .form-control { width: auto; }
  .absguru-toolbar-quickbtns { display: flex; gap: 6px; }
  .absguru-toolbar-row2 { display: contents; }
  .absguru-toolbar-simpan { margin-left: auto; }
  .btn-group-item { display: inline-flex; }
  .btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; flex-shrink: 0; }
  .btn-icon svg { width: 15px; height: 15px; flex-shrink: 0; }
  /* Tombol aksi tanpa "bungkus" kotak sama sekali — cuma ikon berwarna polos,
     dipakai di kolom Aksi tabel Guru & Tendik. Hover cuma sedikit meredup +
     membesar dikit, biar tetap kerasa interaktif tanpa kotak/border/bg. */
  .btn-icon-plain { background: none !important; border: none !important; box-shadow: none !important; width: 30px; height: 30px; }
  .btn-icon-plain svg { width: 18px; height: 18px; }
  .btn-icon-plain:hover { opacity: .65; transform: scale(1.1); }
  .btn-icon-plain.icon-slate { color: #64748b; }
  .btn-icon-plain.icon-green { color: #10b981; }
  .btn-icon-plain.icon-indigo { color: #6366f1; }
  .btn-icon-plain.icon-amber { color: #d97706; }
  .btn-icon-plain.icon-sky { color: #0ea5e9; }
  .btn-icon-plain.icon-red { color: #dc2626; }
  .btn-icon-plain.icon-purple { color: #8b5cf6; }
  .btn-icon-plain.icon-blue { color: #2563eb; }
  .btn-icon-plain.icon-navy { color: #1e3a5f; }

  /* SEARCH/FILTER */
  .table-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
  .search-box { position: relative; flex: 1; min-width: 220px; }
  .search-box input { width: 100%; padding: 9px 32px 9px 33px; border: 1.5px solid var(--gray-200); border-radius: 9px; font-family: inherit; font-size: 13px; color: var(--gray-900); outline: none; background: var(--gray-50); transition: border-color .2s; }
  .search-box input:focus { border-color: var(--primary); background: white; }
  .search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--gray-500); width: 13px; height: 13px; }
  .search-clear-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border: none; border-radius: 50%; background: var(--gray-200); color: var(--gray-500); font-size: 13px; line-height: 1; display: none; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: background .15s, color .15s; }
  .search-clear-btn:hover { background: #fca5a5; color: #fff; }
  .filter-select { padding: 9px 12px; border: 1.5px solid var(--gray-200); border-radius: 9px; font-family: inherit; font-size: 13px; background: var(--gray-50); color: var(--gray-700); outline: none; cursor: pointer; }
  .filter-select:focus { border-color: var(--primary); }

  /* SPLIT BUTTON — Generate/Hapus Akun Massal (default: generate, panah buka pilihan lain) */
  .split-btn { position: relative; display: inline-flex; flex-shrink: 0; }
  .split-btn .split-btn-main, .split-btn .split-btn-caret { padding: 9px 14px; font-size: 13px; border: 1.5px solid transparent; }
  .split-btn .split-btn-main { border-top-right-radius: 0; border-bottom-right-radius: 0; white-space: nowrap; }
  .split-btn .split-btn-caret { border-top-left-radius: 0; border-bottom-left-radius: 0; padding: 9px 10px; border-left: 1px solid rgba(255,255,255,.35); }
  .split-btn .split-btn-caret svg { transition: transform .15s; }
  .split-btn .split-btn-caret.open svg { transform: rotate(180deg); }
  @media (max-width: 600px) { .split-btn { width: 100%; } .split-btn .split-btn-main { flex: 1; justify-content: center; } }

  /* LAPORAN GURU - controls */
  .lap-header { flex-wrap: wrap; gap: 12px; }
  .lap-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .lap-filter-tabs { display: flex; gap: 6px; }
  .lap-filter-tab { padding: 6px 16px; border-radius: 20px; border: 1.5px solid var(--gray-200); background: white; font-size: 13px; font-family: inherit; cursor: pointer; font-weight: 600; color: var(--gray-500); transition: all .15s; }
  .lap-filter-tab.active { background: var(--grad-brand); color: white; border-color: var(--primary); }

  /* REKAP ABSENSI TABS */
  .rekap-tab { padding:7px 18px; border:none; background:transparent; font-size:13px; font-family:inherit; cursor:pointer; font-weight:600; color:var(--gray-500); transition:all .15s; border-right:1px solid var(--gray-200); }
  .rekap-tab:last-child { border-right:none; }
  .rekap-tab:hover { background:var(--gray-50); color:var(--gray-700); }
  .rekap-tab.rekap-tab-active { background: var(--grad-brand); color:#fff; }

  /* TABLE */
  .table-wrap { overflow-x: auto; }

  /* Roster Absensi (modal Jurnal Mengajar) — list flex, BUKAN tabel, biar
     nama siswa & dropdown status selalu sejajar kelihatan di layar HP
     sekalipun sempit, tanpa perlu scroll ke kanan. */
  .absensi-roster-list { display: flex; flex-direction: column; }
  .roster-absensi-row { display: flex; align-items: center; gap: 8px; padding: 10px 4px; border-bottom: 1px solid var(--gray-200); }
  .roster-absensi-row:last-child { border-bottom: none; }
  .roster-absensi-no { flex: 0 0 20px; font-size: 12.5px; color: var(--gray-500); }
  .roster-absensi-nama { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .roster-absensi-status { flex: 0 0 auto; width: 92px; }
  /* Selektor lebih spesifik dari .form-control{width:100%} yg didefinisikan
     belakangan di file ini -- tanpa ini select-nya menang lebar 100% dan
     mendorong nama siswa sampai hilang (lebarnya keremes jadi 0). */
  select.roster-absensi-status.form-control { width: 92px; flex: 0 0 92px; }
  @media (max-width: 400px) {
    .roster-absensi-status { width: 82px; font-size: 12.5px; padding-left: 6px; padding-right: 6px; }
    select.roster-absensi-status.form-control { width: 82px; flex: 0 0 82px; }
  }
  table { width: 100%; border-collapse: collapse; font-size: 13px; }
  th { background: var(--gray-50); padding: 10px 14px; text-align: left; font-weight: 700; font-size: 11px; letter-spacing: .04em; color: var(--gray-500); text-transform: uppercase; border-bottom: 1px solid var(--gray-200); white-space: nowrap; }
  td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); vertical-align: middle; }
  tr:last-child td { border-bottom: none; }
  tr:hover td { background: var(--gray-50); }
  .badge { display: inline-block; padding: 3px 9px; border-radius: 50px; font-size: 11px; font-weight: 700; white-space: nowrap; }
  .badge-green { background: var(--green-light); color: #15803d; }
  .badge-amber { background: var(--accent-light); color: #92400e; }
  .badge-red { background: var(--red-light); color: var(--red); }
  .badge-blue { background: #f1f5f9; color: var(--primary); }
  .badge-purple { background: #ede9fe; color: #6d28d9; }
  .badge-pink { background: #fce7f3; color: #be185d; }
  .badge-gray { background: var(--gray-100); color: var(--gray-500); }
  .jtm-jadwal-chip { display:inline-block; background:#f8fafc; color:#2563eb; padding:4px 9px; border-radius:8px; font-size:11.5px; font-weight:600; margin:2px 4px 2px 0; white-space:nowrap; }
  .jtm-rombel-badge { display:inline-block; background:var(--gray-100); color:#1e293b; padding:3px 10px; border-radius:8px; font-size:12px; font-weight:700; }
  .guru-td-nama-badge { display:none; } /* dobel status di nama cell — cuma dipakai di tampilan kartu mobile */

  /* Kolom checkbox pilih (Data Guru) — disembunyikan default, baru muncul
     kalau mode pilih diaktifkan lewat tombol "Pilih" (toggleGuruSelectMode()
     nambah class .guru-select-mode ke #page-guru). Biar gak makan tempat
     pas lagi gak dipakai buat hapus massal. */
  .guru-th-check, .guru-td-check { display: none; }
  #page-guru.guru-select-mode .guru-th-check { display: table-cell; }
  #page-guru.guru-select-mode .guru-td-check { display: table-cell; }
  tr.row-nonaktif { opacity: .55; }
  tr.row-nonaktif:hover { opacity: .85; }

  /* MODAL */
  .modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
  .modal-bg.open { display: flex; }
  @keyframes pp-spin { to { transform: rotate(360deg); } }
  .modal { background: white; border-radius: 16px; width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); position: relative; }
  .confirm-bg { position: fixed; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(2px); display: none; align-items: center; justify-content: center; z-index: 400; padding: 20px; opacity: 0; transition: opacity .18s ease; }
  .confirm-bg.open { display: flex; opacity: 1; }
  .confirm-box { background: white; border-radius: 18px; width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(15,23,42,.25); padding: 28px 26px 22px; text-align: center; transform: translateY(10px) scale(.96); opacity: 0; transition: transform .2s cubic-bezier(.34,1.56,.64,1), opacity .18s ease; }
  .confirm-bg.open .confirm-box { transform: translateY(0) scale(1); opacity: 1; }
  .confirm-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
  .confirm-icon.info { background: #f8fafc; color: var(--primary); }
  .confirm-icon.warn { background: #fef3c7; color: #b45309; }
  .confirm-icon.danger { background: var(--red-light); color: var(--red); }
  .confirm-icon.success { background: var(--green-light); color: var(--green); }
  .confirm-title { font-size: 16.5px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
  .confirm-msg { font-size: 13.5px; color: var(--gray-500); line-height: 1.6; margin-bottom: 22px; white-space: pre-line; text-align: left; max-height: 340px; overflow-y: auto; }
  .confirm-actions { display: flex; gap: 10px; }
  .confirm-actions button { flex: 1; padding: 11px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600; font-family: inherit; cursor: pointer; border: none; transition: filter .15s ease, transform .05s ease; }
  .confirm-actions button:active { transform: scale(.97); }
  .confirm-btn-cancel { background: var(--gray-100); color: var(--gray-700); }
  .confirm-btn-cancel:hover { background: var(--gray-200); }
  .confirm-btn-ok { color: white; }
  .confirm-btn-ok.info { background: var(--grad-brand); }
  .confirm-btn-ok.info:hover { filter: brightness(1.08); }
  .confirm-btn-ok.warn { background: #d97706; }
  .confirm-btn-ok.warn:hover { filter: brightness(1.08); }
  .confirm-btn-ok.danger { background: var(--red); }
  .confirm-btn-ok.danger:hover { filter: brightness(1.08); }
  .confirm-btn-ok.success { background: var(--green); }
  .confirm-btn-ok.success:hover { filter: brightness(1.08); }
  .modal-header { padding: 22px 24px 16px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
  .modal-title { font-size: 16px; font-weight: 700; }
  .modal-close { width: 32px; height: 32px; border-radius: 8px; background: var(--gray-100); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--gray-700); }
  .modal-close:hover { background: var(--gray-200); }
  .modal-body { padding: 22px 24px; }
  .modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-200); display: flex; gap: 10px; justify-content: flex-end; }

  /* Footer modal konfirmasi/absen: kolom menyesuaikan jumlah tombol yang tampil (2, 3, dst) */
  .modal-footer-cols { display: grid !important; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; align-items: stretch; }
  .modal-footer-cols .btn { width: 100%; justify-content: center; white-space: nowrap; padding-left: 8px; padding-right: 8px; }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
  /* Grid 3 kolom buat form padat (mis. Profil Ortu) -- field pendek sebaris,
     collapse ke 2 kolom di tablet & 1 kolom di HP (lihat @media di bawah). */
  .form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 16px; }
  /* Grid 4 kolom buat field pendek yang banyak (mis. modal Lengkapi Data Induk
     Siswa) -- collapse ke 2 kolom di tablet & 1 kolom di HP, sama pola dengan
     .form-row-3 (lihat @media di bawah). */
  .form-row-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 14px; margin-bottom: 16px; }
  .form-row-3 .form-group, .form-row .form-group, .form-row-4 .form-group { margin-bottom: 0; }
  .form-row:last-child, .form-row-3:last-child, .form-row-4:last-child { margin-bottom: 0; }
  .form-span-full { grid-column: 1 / -1; }
  .form-group { margin-bottom: 16px; }
  .form-group label { display: block; font-size: 12px; font-weight: 700; color: var(--gray-700); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
  .form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 13px; border: 1.5px solid var(--gray-200); border-radius: 9px; font-family: inherit; font-size: 13px; color: var(--gray-900); outline: none; transition: border-color .2s; }
  .form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }
  .form-group textarea { resize: vertical; min-height: 70px; }

  /* Standalone .form-control (inputs not wrapped in .form-group) */
  .form-control { width: 100%; padding: 10px 13px; border: 1.5px solid var(--gray-200); border-radius: 9px; font-family: inherit; font-size: 13px; color: var(--gray-900); outline: none; background: white; transition: border-color .2s, box-shadow .2s; }
  .form-control:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(20,184,166,.12); }
  .form-control:hover { border-color: var(--gray-300); }

  /* ===== Modal Edit Nama ===== */
  .edit-nama-avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--gray-100); }
  .edit-nama-avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--grad-brand); color: #fff; font-size: 15px; font-weight: 800; display: flex; align-items: center; justify-content: center; letter-spacing: .02em; }
  .edit-nama-avatar-label { font-size: 12px; color: var(--gray-500); line-height: 1.55; }
  .edit-nama-nip-row { display: flex; align-items: center; gap: 9px; margin-top: 14px; padding: 11px 13px; background: var(--gray-50); border: 1.5px solid var(--gray-200); border-radius: 9px; font-size: 12.5px; color: var(--gray-500); }
  .edit-nama-nip-row svg { flex: none; color: var(--gray-400); }
  .edit-nama-nip-row strong { color: var(--gray-700); font-weight: 700; }

  /* Profil Saya (guru self-service) */
  .idd-card { overflow: hidden; }
  .idd-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%); }
  .idd-avatar { flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.3); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }
  .idd-head-title { font-size: 15.5px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
  .idd-head-sub { font-size: 12.5px; color: #94a3b8; margin-top: 1px; }
  .idd-section-label { font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .05em; margin: 22px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--gray-100); }
  .idd-section-label:first-child { margin-top: 0; }
  .idd-section-label-locked { display: flex; align-items: center; gap: 8px; }
  .idd-section-label-locked span { text-transform: none; font-weight: 500; letter-spacing: 0; color: var(--gray-400); font-size: 11.5px; }
  .idd-card input:disabled, .idd-card select:disabled { background: var(--gray-50); color: var(--gray-500); cursor: not-allowed; }
  .idd-footer { padding-top: 0; display: flex; justify-content: flex-end; }
  @media (max-width: 640px) { .idd-head { padding: 16px; } }

  /* JAM BATAS MASUK - card */
  .jam-batas-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
  .jam-batas-card { position: relative; overflow: hidden; border: 1.5px solid var(--gray-200); background: linear-gradient(135deg, #ffffff 55%, var(--accent-light) 160%); margin-bottom: 0 !important; }
  .jam-batas-card::before { content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; top: -70px; right: -50px; background: radial-gradient(circle, rgba(232,160,32,.20), rgba(232,160,32,0) 70%); pointer-events: none; }
  .jam-batas-row { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
  .jam-batas-header { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .jam-batas-icon { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--accent), #f4b942); box-shadow: 0 8px 18px rgba(232,160,32,.32); }
  .jam-batas-icon svg { width: 20px; height: 20px; }
  .jam-batas-text { flex: 1 1 auto; min-width: 0; }
  .jam-batas-title { font-size: 13px; font-weight: 800; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .jam-batas-sub { font-size: 11px; color: var(--gray-500); margin-top: 2px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .jam-batas-input { width: 100% !important; min-width: 0; font-size: 17px !important; font-weight: 800; letter-spacing: .3px; color: var(--primary-dark); padding: 9px 10px !important; border: 2px solid var(--accent) !important; border-radius: 10px !important; background: #fff; box-shadow: 0 3px 10px rgba(232,160,32,.18); box-sizing: border-box; }
  .jam-batas-input:focus { box-shadow: 0 0 0 4px rgba(232,160,32,.18) !important; }
  .jam-batas-input-group { display: flex; align-items: center; gap: 8px; }
  .jam-batas-input-group .jam-batas-input { width: auto !important; flex: 1 1 auto; }
  .jam-batas-card-green { background: linear-gradient(135deg, #ffffff 55%, var(--green-light) 160%); }
  .jam-batas-card-green::before { background: radial-gradient(circle, rgba(22,163,74,.20), rgba(22,163,74,0) 70%); }
  .jam-batas-card-green .jam-batas-icon { background: linear-gradient(135deg, var(--green), #4ade80); box-shadow: 0 8px 18px rgba(22,163,74,.32); }
  .jam-batas-card-green .jam-batas-input { color: var(--green); border-color: var(--green) !important; box-shadow: 0 3px 10px rgba(22,163,74,.18); }
  .jam-batas-card-green .jam-batas-input:focus { box-shadow: 0 0 0 4px rgba(22,163,74,.18) !important; }
  .jam-batas-card-blue { background: linear-gradient(135deg, #ffffff 55%, #dbe8fb 160%); }
  .jam-batas-card-blue::before { background: radial-gradient(circle, rgba(29,78,216,.20), rgba(29,78,216,0) 70%); }
  .jam-batas-card-blue .jam-batas-icon { background: linear-gradient(135deg, var(--primary), var(--primary-light)); box-shadow: 0 8px 18px rgba(29,78,216,.32); }
  .jam-batas-card-blue .jam-batas-input { color: var(--primary); border-color: var(--primary) !important; box-shadow: 0 3px 10px rgba(29,78,216,.18); }
  .jam-batas-card-blue .jam-batas-input:focus { box-shadow: 0 0 0 4px rgba(29,78,216,.18) !important; }
  .jam-batas-card-red { background: linear-gradient(135deg, #ffffff 55%, var(--red-light) 160%); }
  .jam-batas-card-red::before { background: radial-gradient(circle, rgba(220,38,38,.18), rgba(220,38,38,0) 70%); }
  .jam-batas-card-red .jam-batas-icon { background: linear-gradient(135deg, var(--red), #f87171); box-shadow: 0 8px 18px rgba(220,38,38,.30); }
  .jam-batas-card-red .jam-batas-input { color: var(--red); border-color: var(--red) !important; box-shadow: 0 3px 10px rgba(220,38,38,.16); }
  .jam-batas-card-red .jam-batas-input:focus { box-shadow: 0 0 0 4px rgba(220,38,38,.16) !important; }
  @media (max-width: 1100px) and (min-width: 721px) {
    .jam-batas-grid { grid-template-columns: 1fr 1fr; }
    .form-row-3 { grid-template-columns: 1fr 1fr; }
    .form-row-4 { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 720px) {
    .jam-batas-grid { grid-template-columns: 1fr; }
    .jam-batas-row { flex-direction: row; flex-wrap: nowrap; align-items: center; padding: 12px 14px; gap: 10px; }
    .jam-batas-header { flex: 1 1 auto; gap: 10px; min-width: 0; }
    .jam-batas-icon { width: 36px; height: 36px; border-radius: 10px; }
    .jam-batas-icon svg { width: 17px; height: 17px; }
    .jam-batas-text { flex: 1 1 auto; min-width: 0; }
    .jam-batas-title { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .jam-batas-sub { font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
    .jam-batas-input { flex-shrink: 0; width: auto !important; font-size: 13px !important; padding: 7px 8px !important; border-width: 1.5px !important; border-radius: 8px !important; letter-spacing: 0; }
    .jam-batas-input-group { flex-shrink: 0; gap: 5px; }
    .jam-batas-input-group .jam-batas-input { width: 44px !important; text-align: center; }
    .jam-batas-input-group span { font-size: 10.5px !important; }
  }

  /* ============================================================
     POS ABSEN QR — kiosk scan screen
     ============================================================ */
  .qrkiosk-card { position: relative; max-width: 900px; margin: 0 auto 24px; background: linear-gradient(160deg, #ffffff 0%, #f8fafc 55%, #f8fafc 100%); border: 1.5px solid var(--gray-200); border-radius: 24px; padding: 26px 26px 30px; overflow: hidden; box-shadow: 0 20px 50px -24px rgba(29,78,216,.22); }
  .qrkiosk-glow { position: absolute; border-radius: 50%; filter: blur(10px); pointer-events: none; opacity: .55; }
  .qrkiosk-glow-1 { width: 320px; height: 320px; top: -140px; right: -100px; background: radial-gradient(circle, rgba(20,184,166,.18), rgba(20,184,166,0) 70%); }
  .qrkiosk-glow-2 { width: 260px; height: 260px; bottom: -120px; left: -80px; background: radial-gradient(circle, rgba(232,160,32,.20), rgba(232,160,32,0) 70%); }

  .qrkiosk-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
  .qrkiosk-toggle { display: inline-flex; gap: 4px; background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: 999px; padding: 4px; }
  .qrkiosk-toggle-btn { display: inline-flex; align-items: center; gap: 7px; border: none; background: transparent; color: var(--gray-500); font-family: inherit; font-size: 13px; font-weight: 700; padding: 9px 18px; border-radius: 999px; cursor: default; transition: all .2s; }
  .qrkiosk-toggle-btn.active { background: linear-gradient(120deg, var(--accent), #f4b942); color: #fff; box-shadow: 0 6px 16px -4px rgba(232,160,32,.5); }
  .qrkiosk-toggle-emoji { font-size: 15px; }
  .qrkiosk-clock { font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 800; letter-spacing: .5px; color: var(--primary-dark); background: #fff; border: 1px solid var(--gray-200); padding: 8px 16px; border-radius: 12px; box-shadow: var(--shadow); }

  .qrkiosk-layout { position: relative; z-index: 1; display: flex; gap: 30px; flex-wrap: wrap; align-items: flex-start; justify-content: center; }
  .qrkiosk-cam-col { flex: 0 0 auto; width: 100%; max-width: 340px; text-align: center; }
  .qrkiosk-cam-bezel { padding: 6px; border-radius: 22px; background: linear-gradient(135deg, var(--accent), var(--primary-light) 55%, var(--accent) 100%); background-size: 220% 220%; animation: qrkiosk-bezel-shift 6s ease infinite; box-shadow: 0 16px 34px -14px rgba(29,78,216,.35); }
  @keyframes qrkiosk-bezel-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
  .qrkiosk-cam-inner { position: relative; width: 100%; aspect-ratio: 1/1; border-radius: 17px; overflow: hidden; background: #0f172a; }
  .qrkiosk-video { width: 100%; height: 100%; object-fit: cover; }
  .qrkiosk-frame { position: absolute; inset: 12%; pointer-events: none; }
  .qrkiosk-corner { position: absolute; width: 26px; height: 26px; border: 3px solid var(--accent); filter: drop-shadow(0 0 6px rgba(232,160,32,.7)); }
  .qrkiosk-corner-tl { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 6px 0 0 0; }
  .qrkiosk-corner-tr { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 6px 0 0; }
  .qrkiosk-corner-bl { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 0 0 6px; }
  .qrkiosk-corner-br { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 6px 0; }
  .qrkiosk-scanline { position: absolute; left: 4%; right: 4%; top: 6%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(232,160,32,0), var(--accent), rgba(232,160,32,0)); box-shadow: 0 0 10px 2px rgba(232,160,32,.75); animation: qrkiosk-scan 2.2s ease-in-out infinite; }
  @keyframes qrkiosk-scan { 0% { top: 6%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 92%; opacity: 0; } }
  .qrkiosk-idle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #93a4c0; font-size: 13px; padding: 20px; text-align: center; }
  .qrkiosk-idle-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.06); animation: qrkiosk-idle-pulse 2.4s ease-in-out infinite; }
  @keyframes qrkiosk-idle-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.08); } 50% { box-shadow: 0 0 0 12px rgba(255,255,255,0); } }
  .qrkiosk-error { margin-top: 12px; font-size: 12.5px; color: #b91c1c; background: var(--red-light); border: 1px solid #fecaca; border-radius: 10px; padding: 10px 12px; text-align: left; }
  .qrkiosk-btn-main { width: 100%; margin-top: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: none; cursor: pointer; font-family: inherit; font-size: 14.5px; font-weight: 700; color: #fff; padding: 14px 18px; border-radius: 14px; background: linear-gradient(120deg, var(--accent), #f4b942); box-shadow: 0 12px 26px -8px rgba(232,160,32,.5); transition: transform .15s, box-shadow .15s; }
  .qrkiosk-btn-main:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -8px rgba(232,160,32,.6); }
  .qrkiosk-btn-stop { width: 100%; margin-top: 12px; border: 1px solid var(--gray-200); background: #fff; color: var(--gray-700); font-family: inherit; font-size: 13.5px; font-weight: 600; padding: 12px 18px; border-radius: 14px; cursor: pointer; transition: background .15s; }
  .qrkiosk-btn-stop:hover { background: var(--gray-50); }

  .qrkiosk-info-col { flex: 1 1 260px; min-width: 260px; text-align: left; }
  .qrkiosk-desc { font-size: 13px; color: var(--gray-700); line-height: 1.65; background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 14px 16px; }
  .qrkiosk-desc b { color: var(--gray-900); }

  .qrkiosk-result { margin-top: 16px; border-radius: 16px; padding: 18px; text-align: left; animation: qrkiosk-pop .28s cubic-bezier(.2,.9,.3,1.3); }
  @keyframes qrkiosk-pop { 0% { opacity: 0; transform: scale(.92) translateY(6px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
  .qrkiosk-result-row { display: flex; align-items: center; gap: 14px; }
  .qrkiosk-result-icon { flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
  .qrkiosk-result-icon.ok { background: var(--green-light); color: var(--green); animation: qrkiosk-icon-pop .4s ease; }
  .qrkiosk-result-icon.fail { background: var(--red-light); color: var(--red); }
  .qrkiosk-result-icon.foto { background: var(--gray-100); overflow: hidden; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--green); animation: qrkiosk-icon-pop .4s ease; }
  .qrkiosk-result-foto-img { width: 100%; height: 100%; object-fit: cover; display: block; }
  @keyframes qrkiosk-icon-pop { 0% { transform: scale(.5); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
  .qrkiosk-result-name { font-weight: 800; font-size: 16px; color: var(--gray-900); }
  .qrkiosk-result-msg { font-size: 12.5px; color: var(--gray-500); margin-top: 2px; }
  .qrkiosk-result-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
  .qrkiosk-result-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }

  .qrkiosk-riwayat-wrap { margin-top: 20px; text-align: left; }
  .qrkiosk-riwayat-label { font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
  .qrkiosk-riwayat-list { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; }
  .qrkiosk-riwayat-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--gray-200); font-size: 12px; }
  .qrkiosk-riwayat-icon { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
  .qrkiosk-riwayat-time { color: var(--gray-500); flex-shrink: 0; }
  .qrkiosk-riwayat-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gray-700); }

  @media (max-width: 720px) {
    .qrkiosk-card { padding: 18px 16px 22px; border-radius: 18px; }
    .qrkiosk-top { margin-bottom: 16px; }
    .qrkiosk-clock { font-size: 16px; padding: 6px 12px; }
    .qrkiosk-toggle-btn { font-size: 12px; padding: 8px 14px; }
    .qrkiosk-layout { gap: 18px; }
  }

  /* PENETAPAN LOKASI - filter toolbar */
  .penetapan-toolbar { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 20px; padding: 16px 18px; background: linear-gradient(135deg, var(--gray-50), #f8fafc); border: 1.5px solid var(--gray-200); border-radius: 14px; }
  .penetapan-field { min-width: 170px; }
  .penetapan-field-grow { flex: 1; min-width: 220px; }
  .penetapan-field-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: var(--gray-500); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
  .penetapan-field-label svg { width: 13px; height: 13px; color: var(--primary-light); flex-shrink: 0; }
  .penetapan-select { cursor: pointer; }
  .penetapan-search-wrap { position: relative; }
  .penetapan-search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-500); pointer-events: none; }
  .penetapan-search-input { padding-left: 34px !important; }

  /* PENETAPAN LOKASI - kolom belum/sudah */
  .penetapan-col { border-radius: 14px; border: 1.5px solid var(--gray-200); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
  .penetapan-col-header { display: flex; align-items: center; gap: 9px; padding: 12px 16px; border-bottom: 1.5px solid var(--gray-200); }
  .penetapan-col-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
  .penetapan-col-title { font-size: 13px; font-weight: 800; color: var(--gray-900); flex: 1; }
  .penetapan-col-badge { font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 50px; color: #fff; }
  .penetapan-col-body { padding: 14px 16px 16px; }
  .penetapan-col-belum { border-color: #f7dfa8; background: #fffdf8; }
  .penetapan-col-belum .penetapan-col-header { background: var(--accent-light); border-bottom-color: #f7dfa8; }
  .penetapan-col-belum .penetapan-col-dot { background: var(--accent); }
  .penetapan-col-belum .penetapan-col-badge { background: var(--accent); }
  .penetapan-col-sudah { border-color: #b9ecce; background: #f9fffb; }
  .penetapan-col-sudah .penetapan-col-header { background: var(--green-light); border-bottom-color: #b9ecce; }
  .penetapan-col-sudah .penetapan-col-dot { background: var(--green); }
  .penetapan-col-sudah .penetapan-col-badge { background: var(--green); }

  /* SEARCHABLE SELECT (dropdown siswa dengan pencarian) */
  .ssel-wrap { position: relative; }
  .ssel-input { width: 100%; padding: 10px 36px 10px 13px; border: 1.5px solid var(--gray-200); border-radius: 9px; font-family: inherit; font-size: 13px; color: var(--gray-900); outline: none; transition: border-color .2s; background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>') no-repeat right 11px center; }
  .ssel-input:focus { border-color: var(--primary); }
  .ssel-dropdown { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; max-height: 240px; overflow-y: auto; background: #fff; border: 1.5px solid var(--gray-200); border-radius: 9px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
  .ssel-option { padding: 9px 13px; font-size: 13px; color: var(--gray-900); cursor: pointer; }
  .ssel-option:hover, .ssel-option.active { background: var(--gray-50); }
  .ssel-empty { padding: 12px 13px; font-size: 13px; color: var(--gray-500); text-align: center; }

  /* PRINT PREVIEW MODAL */
  .modal-lg { max-width: 720px; }
  .modal-xl { max-width: 880px; }
  .surat-preview { font-family: 'Archivo', sans-serif; font-size: 12pt; line-height: 1.6; color: #000; padding: 20px; }
  .surat-header { display: flex; align-items: center; gap: 12px; border-bottom: 3px solid #000; padding-bottom: 10px; margin-bottom: 16px; }
  .surat-header-logo { width: 78px; height: 78px; flex-shrink: 0; object-fit: contain; }
  .surat-header-logo-placeholder { width: 78px; height: 78px; border-radius: 50%; background: var(--primary-dark); display: flex; align-items: center; justify-content: center; color: white; font-weight: 800; font-size: 14px; flex-shrink: 0; text-align:center; line-height:1.2; }
  .surat-header-text { flex: 1; text-align: center; line-height: 1.25; }
  .surat-header-text h1 { font-family: 'Archivo', sans-serif; font-size: 17pt; font-weight: 900; letter-spacing: .04em; }
  .surat-header-text h2 { font-family: 'Archivo', sans-serif; font-size: 10.5pt; font-weight: 700; }
  .surat-header-text p { font-family: 'Archivo', sans-serif; font-size: 9pt; }
  .surat-header-text p.kop-web { font-family: 'Archivo', sans-serif; font-size: 10pt; }
  .surat-header-text p.kop-alamat { font-family: 'Archivo', sans-serif; font-size: 7.5pt; white-space: nowrap; }
  .surat-header-logo2 { width: 78px; height: 78px; flex-shrink: 0; object-fit: contain; }
  .surat-header-logo2-placeholder { width: 78px; height: 78px; background: #e7edf5; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink:0; font-size:9px; color:#33517d; font-weight:700; text-align:center; padding:4px; line-height:1.3; }
  .surat-title { text-align: center; margin: 16px 0 12px; }
  .surat-title h3 { font-family: 'Archivo', sans-serif; font-size: 13pt; font-weight: 900; text-decoration: underline; text-transform: uppercase; }
  .surat-title p { font-family: 'Archivo', sans-serif; font-size: 10pt; }
  .surat-body p { margin-bottom: 8px; font-size: 11pt; }
  .surat-table { margin: 10px 0 14px 20px; }
  .surat-table tr td:first-child { width: 160px; font-size: 11pt; font-family: 'Archivo', sans-serif; }
  .surat-table tr td:nth-child(2) { width: 20px; font-size: 11pt; }
  .surat-table tr td:last-child { font-size: 11pt; font-weight: bold; font-family: 'Archivo', sans-serif; }
  .surat-keterangan { margin: 10px 0; font-size: 11pt; text-align: justify; font-family: 'Archivo', sans-serif; }
  .surat-ttd { display: flex; justify-content: flex-end; margin-top: 24px; }
  .surat-ttd-box { text-align: center; width: 220px; position: relative; }
  .ttd-img-wrap { width: 160px; height: 80px; margin: 4px auto; position: relative; display: flex; align-items: center; justify-content: center; }
  .ttd-img-wrap img { max-width: 160px; max-height: 80px; object-fit: contain; }
  .ttd-stempel-wrap { position: absolute; left: -30px; top: -10px; width: 90px; height: 90px; opacity: 0.82; }
  .ttd-stempel-wrap img { width: 90px; height: 90px; object-fit: contain; }
  .ttd-garis { width: 180px; margin: 4px auto 4px; border-top: 1px solid #000; }
  .watermark-doc { font-size: 8pt; color: var(--gray-500); text-align: right; margin-top: 20px; padding-top: 8px; border-top: 1px solid var(--gray-300); }

  /* UPLOAD TTD/STEMPEL SETTINGS */
  .settings-upload-area { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--gray-50); border: 1.5px dashed var(--gray-300); border-radius: 10px; cursor: pointer; transition: all .2s; }
  .settings-upload-area:hover { border-color: var(--primary); background: #f0f5ff; }
  .settings-upload-area img { width: 60px; height: 50px; object-fit: contain; border: 1px solid var(--gray-200); border-radius: 6px; background: white; padding: 3px; }
  .settings-upload-area .upload-placeholder { width: 60px; height: 50px; background: var(--gray-200); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--gray-500); font-size: 22px; }
  .settings-upload-info { flex: 1; }
  .settings-upload-info strong { display: block; font-size: 13px; font-weight: 700; color: var(--gray-900); }
  .settings-upload-info span { font-size: 12px; color: var(--gray-500); }

  /* IMPORT */
  .upload-zone { border: 2px dashed var(--gray-300); border-radius: 12px; padding: 40px 24px; text-align: center; cursor: pointer; transition: all .2s; }
  .upload-zone:hover { border-color: var(--primary); background: #f0f5ff; }
  .upload-zone.dragover { border-color: var(--primary); background: #f0f5ff; }
  .upload-zone svg { color: var(--gray-300); margin-bottom: 12px; }
  .upload-zone p { font-size: 14px; font-weight: 600; color: var(--gray-700); }
  .upload-zone span { font-size: 12px; color: var(--gray-500); }
  #file-input { display: none; }

  /* PAGINATION */
  .pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
  .page-info { font-size: 13px; color: var(--gray-500); }
  .page-btns { display: flex; gap: 6px; }
  .page-btn { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; border: 1.5px solid var(--gray-200); background: white; cursor: pointer; color: var(--gray-700); transition: all .15s; }
  .page-btn:hover { border-color: var(--primary); color: var(--primary); }
  .page-btn.active { background: var(--grad-brand); color: white; border-color: var(--primary); }
  .page-btn:disabled { opacity: .4; cursor: not-allowed; }

  /* EMPTY */
  .empty-state { text-align: center; padding: 48px 24px; color: var(--gray-500); }
  .empty-state svg { margin: 0 auto 16px; color: var(--gray-300); }
  .empty-state p { font-size: 15px; font-weight: 600; color: var(--gray-700); }
  .empty-state span { font-size: 13px; }

  /* TOAST */
  #toast { position: fixed; bottom: 28px; right: 28px; background: var(--gray-900); color: white; padding: 12px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; z-index: 999; display: none; box-shadow: var(--shadow-lg); }
  #toast.show { display: flex; gap: 8px; align-items: center; }
  #toast.success { background: linear-gradient(120deg, var(--green) 0%, #15803d 100%); }
  #toast.error { background: linear-gradient(120deg, var(--red) 0%, #b91c1c 100%); }
  #toast.warning { background: linear-gradient(120deg, #f59e0b 0%, #b45309 100%); }

  /* CETAK ONLY */
  @media print {
    #app { display: block !important; }
    #login-screen, .sidebar, .topbar, .content, .modal-bg { display: none !important; }
    #print-area { display: block !important; position: fixed; inset: 0; background: white; z-index: 9999; padding: 40px; }
  }
  #print-area { display: none; }

  .info-row { display: flex; gap: 16px; }
  .info-item { flex: 1; }

  /* ===== RESPONSIVE MOBILE ===== */
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 49; }
  .sidebar-overlay.open { display: block; }
  .hamburger { display: none; width: 38px; height: 38px; align-items: center; justify-content: center; background: var(--gray-100); border: none; border-radius: 8px; cursor: pointer; flex-shrink: 0; }

  @media (max-width: 900px) {
    /* Login: sembunyikan hero, form full width */
    .login-hero { display: none; }
    .login-form-panel { flex: 1; max-width: 100%; background: radial-gradient(120% 140% at 15% 0%, var(--primary-light) 0%, var(--primary) 45%, var(--primary-dark) 100%); }
    .login-form-panel::before, .login-form-panel::after { display: none; }
    .login-card { background: rgba(255,255,255,.94); }
  }

  @media (max-width: 768px) {
    /* Pengaturan: 2 kolom -> 1 kolom di layar sempit */
    .settings-2col { grid-template-columns: 1fr !important; }

    /* Login */
    .login-card { width: 90vw; padding: 32px 24px; }
    .login-hero-content h2 { font-size: 28px; }

    /* Sidebar - hidden by default, slide in */
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay { display: none; }
    .sidebar-overlay.open { display: block; }
    .sidebar-collapse-btn { display: none; }

    /* Main takes full width */
    .main { margin-left: 0; }

    /* Topbar */
    .topbar { padding: 0 16px; }
    .topbar-left h2 { font-size: 15px; }
    .topbar-left p { display: none; }
    .hamburger { display: flex; }

    /* Content padding */
    .content { padding: 16px; }

    /* Stats grid - 2 kolom di mobile */
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 26px !important; }

    /* Dashboard charts - 1 kolom di mobile */
    .dashboard-charts-grid { grid-template-columns: 1fr !important; }
    .kg-table-wrap { height: auto !important; max-height: none !important; overflow-y: visible !important; }

    /* Grid 2 kolom halaman (Profil, Laporan, Penetapan Lokasi) - 1 kolom di mobile */
    .page-grid-2col { grid-template-columns: 1fr !important; }

    /* Card */
    .card-header { padding: 14px 16px; flex-wrap: wrap; gap: 8px; }
    .card-body { padding: 14px 16px; }
    .card-title { font-size: 14px; }

    /* Buttons - grid 2 kolom, ukuran diperbesar seperti tombol di Riwayat Jurnal Mengajar */
    .btn-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
    .btn-group .btn,
    .btn-group .btn-group-item { width: 100%; min-width: 0; padding: 13px 14px; font-size: 14px; justify-content: center; }
    .btn-group .btn-group-item { display: flex; }
    .btn-group .btn-group-item .btn { width: 100%; }
    .btn-sm { padding: 13px 14px; font-size: 14px; }

    /* Backup/Restore & Reset buttons - selalu besar & full-width di mobile */
    .sysdata-actions { flex-direction: column; gap: 8px; }
    .sysdata-actions .btn { width: 100% !important; justify-content: center; padding: 14px 18px !important; font-size: 14.5px !important; border-radius: 10px !important; }

    /* Table controls */
    .table-controls { flex-direction: column; align-items: stretch; }
    .search-box { width: 100%; }
    .filter-select { width: 100%; }

    /* Laporan Guru controls */
    .lap-controls { width: 100%; flex-direction: column; align-items: stretch; }
    .lap-filter-tabs { width: 100%; }
    .lap-filter-tab { flex: 1; text-align: center; }
    #btn-cetak-lap { justify-content: center; width: 100%; }

    /* Table scroll */
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { font-size: 12px; min-width: 560px; }
    th, td { padding: 8px 10px !important; }

    /* Pagination */
    .pagination { flex-direction: column; align-items: flex-start; gap: 10px; }

    /* Modal full width */
    .modal-bg { padding: 0; align-items: flex-end; }
    .modal { max-width: 100%; border-radius: 16px 16px 0 0; max-height: 92vh; }
    .modal-lg { max-width: 100%; }
    .modal-xl { max-width: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr; }
    .form-row-4 { grid-template-columns: 1fr; }

    /* Modal footer - tombol Batal/Simpan dsb disusun ke bawah, bukan kanan-kiri */
    .modal-footer { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
    .modal-footer .btn { width: 100%; justify-content: center; }

    /* Kecuali footer .modal-footer-cols: tetap sejajar (grid kolom sesuai jumlah tombol aktif) */
    .modal-footer-cols { flex-direction: initial; display: grid !important; grid-auto-flow: column; grid-auto-columns: 1fr; }
    .modal-footer-cols .btn { font-size: 12.5px; }

    /* Toolbar Input Absensi Harian - Tanggal sendiri, Hadir/Alpa 2 kolom, Simpan full width di bawah */
    .absguru-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
    .absguru-toolbar-tanggal .form-control { width: 100%; }
    .absguru-toolbar-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
    .absguru-toolbar-quickbtns { display: flex; flex-direction: column; }
    .absguru-toolbar-quickbtns .form-control { width: 100%; min-width: 0; }
    .absguru-toolbar-simpan { margin-left: 0; width: 100%; justify-content: center; padding: 10px; font-size: 13px; }

    /* Info row stack */
    .info-row { flex-direction: column; gap: 8px; }

    /* ===== Tabel Guru -> tampilan kartu di HP, biar nggak perlu geser horizontal ===== */
    #page-guru .table-wrap { overflow-x: visible; }
    #page-guru table { min-width: 0; width: 100%; }
    #page-guru thead { display: none; }
    #page-guru tbody, #page-guru tr, #page-guru td { display: block; width: 100%; }
    #page-guru tr {
      background: #fff; border: 1px solid var(--gray-200); border-radius: 12px;
      margin-bottom: 10px; padding: 4px 14px; box-shadow: 0 1px 2px rgba(15,23,42,.04);
    }
    #page-guru tr.row-nonaktif { opacity: .65; }
    #page-guru tr:hover td { background: transparent; }
    #page-guru td {
      padding: 8px 0 !important; border-bottom: 1px solid var(--gray-100);
      display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px;
    }
    #page-guru td:last-child { border-bottom: none; }
    #page-guru td[data-label]::before {
      content: attr(data-label); font-size: 10.5px; font-weight: 700; color: var(--gray-500);
      text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0;
    }
    /* Checkbox & nomor urut disembunyikan di kartu — nggak penting di mobile */
    #page-guru .guru-td-check, #page-guru .guru-td-no { display: none; }
    /* Nama jadi judul kartu — full width, besar, dilengkapi badge status di sampingnya */
    #page-guru .guru-td-nama {
      display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
      padding-top: 14px !important; font-size: 15px; font-weight: 800; color: var(--gray-900);
    }
    #page-guru .guru-td-nama::before { content: none; }
    #page-guru .guru-td-nama-badge { display: inline-block; }
    /* Kolom Status desktop disembunyikan di kartu (udah nempel di nama) */
    #page-guru .guru-td-status { display: none; }
    /* Baris Aksi — label "Aksi" tetap kelihatan & rata kiri (konsisten sama
       label field lain kayak "Jenis"), tombolnya rata kanan 1 baris horizontal.
       PENTING: rule umum .btn-group di mobile (di atas) set display:grid 2 kolom
       yang bikin 3 tombol icon pecah jadi 2+1 ke bawah -- makanya di sini WAJIB
       di-override balik ke display:flex, bukan cuma flex-wrap/width doang. */
    #page-guru .guru-td-aksi { align-items: center; padding-top: 12px !important; padding-bottom: 12px !important; }
    #page-guru .guru-td-aksi .btn-group {
      display: flex !important;
      flex-wrap: nowrap !important;
      width: auto !important;
      gap: 8px;
    }
    #page-guru .guru-td-aksi .btn-group .btn,
    #page-guru .guru-td-aksi .btn-group .btn-group-item {
      width: 34px !important;
      height: 34px !important;
      min-width: 0 !important;
      padding: 0 !important;
      flex: 0 0 auto !important;
    }

    /* ===== Kolom Aksi halaman Kelas/Rombel di HP: grid 3 kolom tetap biar
       posisi tombol konsisten per baris (3 tombol utama di baris 1, 3 tombol
       sekunder pas di bawahnya) — flex-wrap bebas bikin tombol terakhir
       "loncat" ke kanan karena sisa ruang, bukan sejajar rapi. */
    #page-kelas .btn-group {
      display: grid !important;
      grid-template-columns: repeat(3, 34px) !important;
      width: max-content !important;
      gap: 6px;
    }
    #page-kelas .btn-group .btn:not(.btn-icon) {
      width: auto !important;
      min-width: 0 !important;
      padding: 8px 12px !important;
      font-size: 13px !important;
      white-space: nowrap;
    }
    #page-kelas .btn-group .btn-icon {
      width: 34px !important;
      height: 34px !important;
      padding: 0 !important;
      flex: 0 0 auto !important;
    }
  }

  @media (max-width: 400px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-value { font-size: 22px !important; }
    table { min-width: 480px; }
  }

  @media (max-width: 480px) {
    .user-chip { padding: 6px 8px 6px 6px; gap: 4px; }
    .user-name { display: none; }
  }

  /* ===== Absen Masuk / Pulang - kartu CTA (guru mandiri) ===== */
  .absen-cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .absen-cta-card {
    position: relative; overflow: hidden; text-align: left; cursor: pointer;
    border: none; border-radius: 16px; padding: 18px 16px 16px;
    display: flex; flex-direction: column; gap: 10px;
    font-family: inherit; transition: transform .15s, box-shadow .15s;
    box-shadow: 0 2px 10px rgba(15,23,42,.06);
  }
  .absen-cta-card:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,.10); }
  .absen-cta-card:disabled { opacity: .55; cursor: not-allowed; }
  .absen-cta-masuk { background: linear-gradient(160deg, #f8fafc 0%, #ffffff 62%); }
  .absen-cta-pulang { background: linear-gradient(160deg, #ffe4ec 0%, #ffffff 62%); }
  .absen-cta-icon {
    width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .absen-cta-masuk .absen-cta-icon { background: var(--green); color: #fff; }
  .absen-cta-pulang .absen-cta-icon { background: linear-gradient(135deg, #f43f5e, #e11d48); color: #fff; }
  .absen-cta-title { font-size: 15px; font-weight: 800; color: var(--gray-900); }
  .absen-cta-sub { font-size: 12px; color: var(--gray-500); margin-top: -6px; }

  @media (max-width: 480px) {
    .absen-cta-grid { gap: 8px; }
    .absen-cta-card { padding: 14px 12px 12px; border-radius: 14px; }
    .absen-cta-icon { width: 38px; height: 38px; border-radius: 10px; }
    .absen-cta-title { font-size: 13.5px; }
    .absen-cta-sub { font-size: 11px; }
  }

  /* ===== Ajukan Izin / Sakit - CTA row (guru mandiri) ===== */
  .absen-cta-izin-row {
    width: 100%; display: flex; align-items: center; gap: 14px;
    text-align: left; cursor: pointer; font-family: inherit;
    border: 1px solid var(--gray-200); border-radius: 14px;
    background: linear-gradient(135deg, #eef2ff 0%, #ffffff 68%);
    padding: 12px 14px; margin-top: 12px;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    box-shadow: 0 2px 10px rgba(15,23,42,.05);
  }
  .absen-cta-izin-row:not(:disabled):hover {
    transform: translateY(-2px); border-color: #c7d2fe;
    box-shadow: 0 8px 20px rgba(79,70,229,.14);
  }
  .absen-cta-izin-row:disabled { opacity: .55; cursor: not-allowed; }
  .absen-cta-izin-icon {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(155deg, #818cf8, #6366f1); color: #fff;
    box-shadow: 0 4px 10px rgba(99,102,241,.35);
  }
  .absen-cta-izin-text { flex: 1; min-width: 0; }
  .absen-cta-izin-title { font-size: 14px; font-weight: 800; color: var(--gray-900); display: block; }
  .absen-cta-izin-sub { font-size: 11.5px; color: var(--gray-500); margin-top: 1px; display: block; }
  .absen-cta-izin-arrow { flex-shrink: 0; color: #a5b4fc; transition: transform .15s; }
  .absen-cta-izin-row:not(:disabled):hover .absen-cta-izin-arrow { transform: translateX(3px); color: #6366f1; }

  @media (max-width: 480px) {
    .absen-cta-izin-row { padding: 10px 12px; gap: 10px; }
    .absen-cta-izin-icon { width: 36px; height: 36px; border-radius: 10px; }
    .absen-cta-izin-title { font-size: 13px; }
    .absen-cta-izin-sub { font-size: 11px; }
  }


  /* ===== Status Absensi — timeline pills & chip ===== */
  .absen-status-chip {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 800; padding: 4px 11px 4px 7px; border-radius: 20px; letter-spacing: .01em;
  }
  .absen-status-chip-dot {
    width: 16px; height: 16px; border-radius: 50%;
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 900;
  }
  .absen-jam-pill {
    display: inline-flex; align-items: center; gap: 5px;
    border-radius: 20px; padding: 4px 11px 4px 8px; font-size: 12.5px; font-weight: 700;
  }
  .absen-jam-pill.masuk  { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
  .absen-jam-pill.keluar { background: #fff1f2; border: 1px solid #fecdd3; color: #be123c; }
  .absen-jam-pill.empty  { background: #f8fafc; border: 1px dashed #cbd5e1; color: #94a3b8; font-weight: 500; }

  /* ===== Ajukan Izin/Sakit - pilihan jenis bergaya pill (guru mandiri) ===== */
  .izin-jenis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .izin-jenis-opt {
    display: flex; align-items: center; gap: 8px; justify-content: center;
    padding: 11px 10px; border-radius: 10px; border: 1.5px solid var(--gray-200);
    background: #fff; color: var(--gray-500); font-family: inherit; font-size: 13.5px; font-weight: 700;
    cursor: pointer; transition: border-color .15s, background .15s, color .15s;
  }
  .izin-jenis-opt:hover { border-color: var(--gray-300); }
  .izin-jenis-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .izin-jenis-opt-active { border-color: var(--primary); background: #f8fafc; color: var(--primary); }

  /* ===== Kelola Pengguna - Backup/Restore & Danger Zone ===== */
  .sysdata-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 4px; align-items: stretch; }
  .sysdata-card {
    display: flex; gap: 14px; padding: 22px; border-radius: var(--radius);
    background: #fff; border: 1px solid var(--gray-200); box-shadow: var(--shadow);
    position: relative; overflow: hidden;
  }
  .sysdata-card.sysdata-backup { border-color: #e2e8f0; background: linear-gradient(180deg,#f8fafc 0%, #fff 90px); }
  .sysdata-card.sysdata-danger { border-color: #fecaca; background: linear-gradient(180deg,#fff3f3 0%, #fff 90px); }
  .sysdata-icon {
    flex-shrink: 0; width: 48px; height: 48px; border-radius: 13px; font-size: 22px;
    display: flex; align-items: center; justify-content: center;
  }
  .sysdata-icon-blue { background: linear-gradient(135deg,#33517d,#1e3a5f); color: #fff; box-shadow: 0 4px 12px rgba(51,81,125,.28); }
  .sysdata-icon-red { background: linear-gradient(135deg,#f87171,#dc2626); color: #fff; box-shadow: 0 4px 12px rgba(220,38,38,.28); }
  .sysdata-body { flex: 1; min-width: 0; }
  .sysdata-title { font-size: 15.5px; font-weight: 800; color: var(--gray-900); margin: 0 0 6px; }
  .sysdata-title-danger { color: #b91c1c; }
  .sysdata-desc { font-size: 12.8px; line-height: 1.6; color: var(--gray-500); margin: 0 0 14px; }
  .sysdata-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 14px; padding: 0; }
  .sysdata-tags li { font-size: 11px; font-weight: 700; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
  .sysdata-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
  .sysdata-btn-danger {
    background: linear-gradient(135deg,#ef4444,#dc2626); color: #fff; border: none;
    padding: 9px 18px; font-size: 13px; box-shadow: 0 3px 10px rgba(220,38,38,.3);
  }
  .sysdata-btn-danger:hover { filter: brightness(1.05); }
  .sysdata-note { font-size: 11px; color: var(--gray-400); line-height: 1.5; margin: 0; display: flex; gap: 6px; }
  .sysdata-note span { flex-shrink: 0; }

  @media (max-width: 900px) {
    .sysdata-grid { grid-template-columns: 1fr; }
  }
  @media (max-width: 480px) {
    .sysdata-card { padding: 16px; gap: 10px; }
    .sysdata-icon { width: 38px; height: 38px; font-size: 18px; border-radius: 10px; }
    .sysdata-title { font-size: 14px; }
    .sysdata-desc { font-size: 12.3px; margin-bottom: 12px; }
    .sysdata-actions { margin-bottom: 12px; }
    .sysdata-tags li { font-size: 10.3px; padding: 4px 8px; }
  }

  /* ===== Jadwal Pelajaran — Grid Mingguan, muat 1 layar (kartu per JP, gaya seperti referensi) ===== */
.jadwal-page-card { display: flex; flex-direction: column; height: calc(100vh - 132px); min-height: 540px; margin-bottom: 0; }
.jadwal-page-card .card-header { flex-shrink: 0; }
.jadwal-header-hint { font-size: 11.5px; color: var(--gray-400); font-weight: 500; }
.jadwal-card-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 16px 20px 18px; }

.jadwal-filter-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; flex-shrink: 0; }
.jadwal-filter-field { min-width: 150px; }
.jadwal-filter-field-sm { min-width: 120px; }
.jadwal-filter-field-grow { min-width: 200px; flex: 1; }
.jadwal-filter-field label { font-size: 11.5px; font-weight: 600; color: var(--gray-600); display: block; margin-bottom: 4px; }
.jadwal-filter-field .filter-select { width: 100%; }

.jadwal-grid-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.jadwal-grid-card { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; border: 1px solid var(--gray-200); }

.jadwal-grid-v2 {
  flex: 1; min-height: 0; overflow: auto; background: #fff;
  display: grid;
  grid-template-columns: 84px repeat(6, minmax(96px, 1fr));
  grid-template-rows: 38px repeat(4, minmax(52px, 1fr)) 24px repeat(4, minmax(52px, 1fr));
}

/* Header */
.jadwal-v2-th { position: sticky; top: 0; z-index: 2; background: #eef1f6; color: #475569; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; display: flex; align-items: center; justify-content: center; border-right: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.jadwal-v2-corner { position: sticky; left: 0; top: 0; z-index: 3; }
.jadwal-v2-th-today { background: #dbeee6; color: #0f7a58; }

/* Kolom JAM */
.jadwal-v2-jp { position: sticky; left: 0; z-index: 1; grid-column: 1; text-align: center; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid #e2e8f0; border-bottom: 1px solid #eef0f2; gap: 2px; }
.jadwal-v2-jp-title { font-weight: 700; font-size: 12.5px; color: #1e293b; }
.jadwal-v2-jp-time { font-size: 9px; color: #94a3b8; font-weight: 600; }
.jadwal-v2-jp-istirahat { background: #fffbeb; }

/* Sel isi kolom hari (wrapper: waktu di atas, kartu di bawah) */
.jadwal-v2-cellwrap { border-right: 1px solid #eef0f2; border-bottom: 1px solid #eef0f2; padding: 4px 6px; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 0; min-width: 0; }
.jadwal-v2-time { font-size: 9px; color: #94a3b8; font-weight: 600; padding-left: 3px; flex-shrink: 0; }

.jadwal-v2-card { flex: 1; min-height: 0; background: #fff; border: 1.3px solid #e2e8f0; border-radius: 9px; padding: 6px 9px; cursor: pointer; transition: box-shadow .15s, border-color .15s; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.jadwal-v2-card:hover { border-color: #94a3b8; box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.jadwal-cell-mapel { font-weight: 700; font-size: 12px; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jadwal-cell-guru { font-size: 9.5px; color: #94a3b8; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

.jadwal-v2-kosong { flex: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.jadwal-v2-plus { width: 26px; height: 26px; border-radius: 50%; background: #1e293b; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; line-height: 1; transition: transform .12s, background .15s; }
.jadwal-v2-kosong:hover .jadwal-v2-plus { background: #334155; transform: scale(1.08); }

/* Baris istirahat — tipis, dilewati kolom yang mapelnya melintasi JP4→JP5 */
.jadwal-v2-istirahat-cell { border-right: 1px solid #fde68a; border-top: 1px solid #fde68a; border-bottom: 1px solid #fde68a; text-align: center; font-size: 9px; font-weight: 700; color: #92400e; background: linear-gradient(135deg, #fef3c7, #fde68a); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

.jadwal-grid-empty { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--gray-500); }

/* ===== Pengaturan: Jadwal Pelajaran & Istirahat (card berwarna) ===== */
.jadwalset-card { overflow: hidden; }
.jadwalset-hero { display: flex; align-items: center; gap: 14px; padding: 20px 22px; background: linear-gradient(120deg, var(--primary) 0%, #4f6ed4 55%, #7c6ee8 100%); }
.jadwalset-hero-icon { font-size: 26px; width: 48px; height: 48px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.18); border-radius: 12px; }
.jadwalset-hero-title { font-size: 16px; font-weight: 800; color: #fff; }
.jadwalset-hero-sub { font-size: 12.5px; color: rgba(255,255,255,.85); margin-top: 3px; max-width: 640px; line-height: 1.5; }
.jadwalset-section-label { font-size: 11.5px; font-weight: 800; color: var(--gray-600); text-transform: uppercase; letter-spacing: .05em; }
.jadwalset-field-label { font-size: 12px; color: var(--gray-600); font-weight: 600; display: block; margin-bottom: 5px; }

/* Kartu tiap hari, warna beda-beda biar gampang dibaca sekilas */
.jadwalset-day-card { border-radius: 12px; padding: 12px; border: 1.5px solid; transition: transform .12s, box-shadow .12s; }
.jadwalset-day-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(15,23,42,.08); }
.jadwalset-day-card .jadwalset-day-name { font-size: 12px; font-weight: 800; display: flex; align-items: center; gap: 5px; margin-bottom: 8px; }
.jadwalset-day-card input { width: 100%; padding: 8px 10px; border-radius: 8px; font-size: 15px; font-weight: 700; text-align: center; background: #fff; }
.jadwalset-day-senin  { background: #f8fafc; border-color: #e2e8f0; } .jadwalset-day-senin  .jadwalset-day-name  { color: #1d4ed8; } .jadwalset-day-senin  input  { border: 1.5px solid #cbd5e1; color: #1d4ed8; }
.jadwalset-day-selasa { background: #f8fafc; border-color: #a7f3d0; } .jadwalset-day-selasa .jadwalset-day-name  { color: #047857; } .jadwalset-day-selasa input  { border: 1.5px solid #6ee7b7; color: #047857; }
.jadwalset-day-rabu   { background: #f5f3ff; border-color: #ddd6fe; } .jadwalset-day-rabu   .jadwalset-day-name  { color: #6d28d9; } .jadwalset-day-rabu   input  { border: 1.5px solid #c4b5fd; color: #6d28d9; }
.jadwalset-day-kamis  { background: #fdf2f8; border-color: #fbcfe8; } .jadwalset-day-kamis  .jadwalset-day-name  { color: #be185d; } .jadwalset-day-kamis  input  { border: 1.5px solid #f9a8d4; color: #be185d; }
.jadwalset-day-jumat  { background: #fffbeb; border-color: #fde68a; box-shadow: 0 0 0 1px #fde68a inset; } .jadwalset-day-jumat  .jadwalset-day-name  { color: #b45309; } .jadwalset-day-jumat  input  { border: 1.5px solid #fcd34d; color: #b45309; }
.jadwalset-day-sabtu  { background: #ecfeff; border-color: #a5f3fc; } .jadwalset-day-sabtu  .jadwalset-day-name  { color: #0e7490; } .jadwalset-day-sabtu  input  { border: 1.5px solid #67e8f9; color: #0e7490; }
.jadwalset-day-badge { font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: rgba(180,83,9,.15); color: #b45309; margin-left: auto; }

.jadwalset-istirahat-box { background: linear-gradient(160deg, #fffbeb 0%, #fff7ed 100%); border: 1.5px solid #fde68a; border-radius: 14px; padding: 18px; margin-top: 12px; }
.jadwalset-input { width: 100%; padding: 9px 11px; border: 1.5px solid #fcd34d; border-radius: 9px; font-size: 14px; font-weight: 700; color: #92400e; background: #fff; }

/* Chip hari (checkbox custom) untuk pilih hari istirahat */
.jadwalset-chip { position: relative; }
.jadwalset-chip input { position: absolute; opacity: 0; }
.jadwalset-chip span { display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border-radius: 99px; font-size: 12.5px; font-weight: 700; border: 1.5px solid #fcd34d; background: #fff; color: #92400e; cursor: pointer; transition: background .15s, color .15s, transform .1s; }
.jadwalset-chip input:checked + span { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; border-color: #d97706; box-shadow: 0 2px 6px rgba(217,119,6,.35); }
.jadwalset-chip span:active { transform: scale(.96); }

.jadwalset-btn-simpan { width: 100%; margin-top: 20px; padding: 12px; font-size: 14px; font-weight: 700; border-radius: 10px; background: linear-gradient(120deg, var(--primary), #4f6ed4); box-shadow: 0 4px 12px rgba(37,63,157,.25); }

/* ===== Pengaturan: Jenis Surat untuk Pengajuan Ortu (grid ringkas 2 kolom) ===== */
.jenis-surat-ortu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 10px; }
@media (max-width: 640px) { .jenis-surat-ortu-grid { grid-template-columns: 1fr; } }
.jenis-surat-ortu-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 8px; min-height: 38px; }
.jenis-surat-ortu-nama { font-weight: 600; font-size: 12.5px; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toggle-sm { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; cursor: pointer; }
.toggle-sm input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-sm-track { position: absolute; inset: 0; background: var(--gray-300); border-radius: 20px; transition: .15s; }
.toggle-sm input:checked ~ .toggle-sm-track { background: var(--primary); }
.toggle-sm-knob { position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.toggle-sm input:checked ~ .toggle-sm-knob { left: 18px; }

/* ===== Pengaturan: Jam Pelajaran (editor baris — jam masuk/keluar per JP) ===== */
.jpedit-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.jpedit-tab { padding: 9px 16px; border-radius: 10px; border: 1.5px solid var(--gray-200); background: var(--gray-50); font-size: 13px; font-weight: 700; color: var(--gray-500); cursor: pointer; transition: background .15s, color .15s, border-color .15s; display: flex; align-items: center; gap: 7px; }
.jpedit-tab:hover { background: var(--gray-100); }
.jpedit-tab.active { background: #fff; border-color: var(--primary); color: var(--primary); box-shadow: 0 2px 8px rgba(37,63,157,.12); }
.jpedit-tab .jpedit-tab-badge { font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: rgba(37,63,157,.1); }

.jpedit-list { border: 1.5px solid var(--gray-200); border-radius: 12px; overflow: hidden; background: #fff; }
.jpedit-header { display: grid; grid-template-columns: 56px 84px 1fr 1fr 1fr 76px; gap: 10px; align-items: center; padding: 10px 14px; background: var(--gray-50); border-bottom: 1.5px solid var(--gray-200); }
.jpedit-header span { font-size: 10.5px; font-weight: 800; color: var(--gray-400); text-transform: uppercase; letter-spacing: .04em; }
.jpedit-header span:first-child, .jpedit-header span:nth-child(2) { text-align: center; }
.jpedit-header span:last-child { text-align: right; }

.jpedit-row { display: grid; grid-template-columns: 56px 84px 1fr 1fr 1fr 76px; gap: 10px; align-items: center; padding: 8px 14px; border-left: 3px solid var(--primary); border-bottom: 1px solid var(--gray-100); background: #fff; transition: background .15s; }
.jpedit-row:last-child { border-bottom: none; }
.jpedit-row:hover { background: var(--gray-50); }
.jpedit-row.jpedit-row-istirahat { border-left-color: #d97706; background: #fffbeb; }
.jpedit-row.jpedit-row-istirahat:hover { background: #fef3c7; }
.jpedit-row-jamke { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin: 0 auto; border-radius: 8px; background: var(--gray-100); color: var(--gray-500); font-size: 12px; font-weight: 800; }
.jpedit-row-istirahat .jpedit-row-jamke { background: #fde68a; color: #92400e; }
.jpedit-row-label { display: none; }
.jpedit-row select, .jpedit-row input[type="text"], .jpedit-row input[type="time"], .jpedit-row input[type="number"] { width: 100%; padding: 7px 9px; border: 1.5px solid var(--gray-200); border-radius: 8px; font-family: 'Archivo', sans-serif; font-size: 13px; font-weight: 600; color: var(--gray-700); background: #fff; }
.jpedit-row-istirahat select, .jpedit-row-istirahat input { border-color: #fcd34d; background: #fff; }
.jpedit-row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.jpedit-row-actions button { width: 27px; height: 27px; border-radius: 7px; border: 1.5px solid var(--gray-200); background: #fff; color: var(--gray-500); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s, border-color .15s; }
.jpedit-row-actions button:hover { background: var(--gray-100); color: var(--gray-700); }
.jpedit-row-actions button.jpedit-btn-hapus { border-color: #fecaca; color: #dc2626; }
.jpedit-row-actions button.jpedit-btn-hapus:hover { background: #fef2f2; border-color: #fca5a5; }
.jpedit-row-actions button:disabled { opacity: .35; cursor: not-allowed; }
.jpedit-row-label-na { display: flex; align-items: center; justify-content: center; height: 32px; color: var(--gray-300); font-size: 13px; }
.jpedit-btn-tambah { width: 100%; padding: 10px; margin-top: 12px; border-radius: 10px; border: 1.5px dashed var(--gray-300); background: var(--gray-50); color: var(--gray-500); font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.jpedit-btn-tambah:hover { background: #eef4ff; border-color: var(--primary); color: var(--primary); }
@media (max-width: 900px) {
  .jpedit-header { display: none; }
  .jpedit-row { grid-template-columns: 1fr 1fr; row-gap: 10px; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--gray-200); border-left: 3px solid var(--primary); margin: 10px; }
  .jpedit-row-label { display: block; font-size: 10px; font-weight: 800; color: var(--gray-400); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
  .jpedit-row-jamke { margin: 0; }
  .jpedit-row-label-na { justify-content: flex-start; height: auto; }
  .jpedit-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 720px) {
  .jadwal-page-card { height: calc(100vh - 108px); min-height: 460px; }
  .jadwal-header-hint { display: none; }
  .jadwal-grid-v2 { grid-template-columns: 56px repeat(6, minmax(78px, 1fr)); grid-template-rows: 32px repeat(4, minmax(44px, 1fr)) 20px repeat(4, minmax(44px, 1fr)); }
  .jadwal-v2-jp-title { font-size: 11px; }
  .jadwal-v2-jp-time { font-size: 8px; }
  .jadwal-cell-mapel { font-size: 10.5px; }
  .jadwal-cell-guru { font-size: 8.5px; }
}
/* Profile Madrasah card (dashboard) — diselaraskan dgn gaya kartu terbaru
   (dash-hero / dash-stat-card): rounded besar, gradasi lembut, shadow "hidup".
   Mobile: logo di kiri atas, teks (nama/badge/kontak) ditumpuk di sebelahnya, sosmed baris sendiri di bawah.
   Desktop (>=860px): logo sejajar-tengah dgn seluruh blok teks, sosmed nempel di ujung kanan. */
.profile-card {
  border-radius: 20px !important;
  border: 1px solid var(--gray-100) !important;
  background: linear-gradient(135deg, #fbfbff 0%, #ffffff 55%, #fafaff 100%);
  box-shadow: 0 10px 26px -14px rgba(15,23,42,.14);
}
.profile-card-inner { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.profile-card-brand { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.profile-card-logo {
  width: 52px; height: 52px; border-radius: 14px; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  box-shadow: 0 6px 14px -6px rgba(79,70,229,.25), 0 0 0 1px rgba(79,70,229,.06) inset;
}
.profile-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.profile-card-name { font-size: 16px; font-weight: 800; color: var(--gray-900); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-card-badges { display: flex; gap: 7px; flex-wrap: wrap; }
.profile-card-badges span {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  white-space: nowrap; border: 1px solid transparent;
}
.profile-card-badges span b { font-weight: 800; }
.profile-card-badges span:nth-child(1) { background: #eef2ff; color: #1d4ed8; border-color: #f1f5f9; } /* NSM - indigo */
.profile-card-badges span:nth-child(1) b { color: #3730a3; }
.profile-card-badges span:nth-child(2) { background: #f5f3ff; color: #7c3aed; border-color: #ede9fe; } /* NPSN - violet */
.profile-card-badges span:nth-child(2) b { color: #6d28d9; }
.profile-card-badges span:nth-child(3) { background: #f0fdf4; color: #15803d; border-color: #dcfce7; } /* Status - green */
.profile-card-badges span:nth-child(3) b { color: #166534; }
.profile-card-badges span:nth-child(4) { background: #fff7ed; color: #c2410c; border-color: #fed7aa; } /* Bentuk SP - orange */
.profile-card-badges span:nth-child(4) b { color: #9a3412; }
.profile-card-kontak { display: flex; gap: 7px; flex-wrap: wrap; }
.profile-card-kontak span {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--gray-100); color: var(--gray-600); font-size: 11px; font-weight: 600;
  padding: 4px 11px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--gray-200);
}
.profile-card-sosmed { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.profile-card-sosmed a { transition: transform .15s ease, box-shadow .15s ease; box-shadow: 0 4px 10px -4px rgba(15,23,42,.25); }
.profile-card-sosmed a:hover { transform: translateY(-2px) scale(1.06); box-shadow: 0 8px 16px -6px rgba(15,23,42,.35); }

@media (min-width: 860px) {
  .profile-card-inner { flex-direction: row; align-items: center; flex-wrap: nowrap; gap: 20px; }
  .profile-card-brand { align-items: center; flex: 1; min-width: 0; }
  .profile-card-sosmed { flex-shrink: 0; margin-left: auto; }
}
@media (max-width: 480px) {
  .profile-card-inner { padding: 16px 18px; }
  .profile-card-logo { width: 44px; height: 44px; border-radius: 12px; }
}
/* ===== Wali Kelas — toolbar urutkan & filter (Daftar Siswa) ===== */
.wk-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.wk-toolbar-group { display: flex; align-items: center; gap: 8px; }
.wk-toolbar-label { font-size: 11px; font-weight: 800; color: var(--gray-500); text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 5px; }
.wk-toolbar-divider { width: 1px; align-self: stretch; background: var(--gray-200); margin: 0 2px; }
.wk-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-900);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  border: 1.5px solid var(--gray-200);
  border-radius: 9px;
  padding: 7px 30px 7px 12px;
  width: auto;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.wk-select:hover { border-color: var(--primary-light); }
.wk-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,.12); }

.wk-switch-label { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; color: var(--gray-700); cursor: pointer; margin: 0; user-select: none; }
.wk-switch { position: relative; display: inline-block; width: 36px; height: 21px; flex-shrink: 0; }
.wk-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.wk-switch-track { position: absolute; inset: 0; background: var(--gray-300); border-radius: 999px; transition: background .2s; pointer-events: none; }
.wk-switch-track::before { content: ""; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.wk-switch input:checked + .wk-switch-track { background: var(--red); }
.wk-switch input:checked + .wk-switch-track::before { transform: translateX(15px); }
.wk-switch input:focus-visible + .wk-switch-track { box-shadow: 0 0 0 3px rgba(220,38,38,.2); }

@media (max-width: 640px) {
  .wk-toolbar { flex-direction: column; align-items: stretch; }
  .wk-toolbar-divider { display: none; }
}

/* ===== Wali Kelas — Catatan Wali Kelas (Rapor Mini) ===== */
.wk-catatan-composer {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}
.wk-catatan-composer textarea {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: 9px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--gray-900);
  resize: vertical;
  outline: none;
  transition: border-color .15s;
  background: #fff;
}
.wk-catatan-composer textarea:focus { border-color: var(--primary); }
.wk-catatan-composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.wk-catatan-composer input[type="date"] {
  border: 1.5px solid var(--gray-200);
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-700);
  background: #fff;
  width: auto;
}

.wk-catatan-timeline { display: flex; flex-direction: column; }
.wk-catatan-item { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.wk-catatan-item:last-child { padding-bottom: 0; }
.wk-catatan-item:last-child .wk-catatan-line { display: none; }
.wk-catatan-dot-wrap { position: relative; display: flex; flex-direction: column; align-items: center; width: 20px; flex-shrink: 0; }
.wk-catatan-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(29,78,216,.12); z-index: 1; }
.wk-catatan-item.is-other .wk-catatan-dot { background: var(--gray-300); box-shadow: 0 0 0 3px var(--gray-100); }
.wk-catatan-line { position: absolute; top: 16px; bottom: -16px; width: 1.5px; background: var(--gray-200); }
.wk-catatan-card { flex: 1; min-width: 0; background: #fff; border: 1.5px solid var(--gray-200); border-radius: 11px; padding: 11px 14px; transition: border-color .15s, box-shadow .15s; }
.wk-catatan-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow); }
.wk-catatan-card textarea, .wk-catatan-card input[type="date"] {
  border: 1.5px solid var(--gray-200);
  border-radius: 9px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--gray-900);
  outline: none;
  transition: border-color .15s;
}
.wk-catatan-card textarea { width: 100%; resize: vertical; }
.wk-catatan-card input[type="date"] { width: auto; font-weight: 600; font-size: 12.5px; }
.wk-catatan-card textarea:focus, .wk-catatan-card input[type="date"]:focus { border-color: var(--primary); }
.wk-catatan-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.wk-catatan-date { font-size: 11px; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: .02em; }
.wk-catatan-other-tag { font-size: 10.5px; font-weight: 700; color: var(--gray-500); background: var(--gray-100); padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.wk-catatan-text { font-size: 13px; color: var(--gray-900); white-space: pre-wrap; line-height: 1.55; }
.wk-catatan-actions { display: flex; gap: 6px; margin-top: 9px; }
.wk-catatan-empty { text-align: center; color: var(--gray-400); padding: 28px 14px; font-size: 12.5px; }

/* ===== Wali Kelas — grid Rekap Bulanan (per tanggal) ===== */
.wk-rekap-grid-wrap { max-height: 440px; overflow: auto; border: 1px solid var(--gray-200); border-radius: 10px; }
.wk-rekap-grid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.wk-rekap-grid th, .wk-rekap-grid td { padding: 6px 7px; text-align: center; font-size: 11.5px; border-bottom: 1px solid var(--gray-100); border-right: 1px solid var(--gray-100); white-space: nowrap; }
.wk-rekap-grid thead th { position: sticky; top: 0; background: var(--gray-50); color: var(--gray-500); font-weight: 800; font-size: 10.5px; text-transform: uppercase; letter-spacing: .02em; z-index: 2; border-bottom: 1.5px solid var(--gray-200); }
.wk-rekap-grid tbody tr:hover td { background: var(--gray-50); }
.wk-rekap-sticky { position: sticky; left: 0; background: #fff; text-align: left; z-index: 1; border-right: 1.5px solid var(--gray-200); min-width: 150px; }
.wk-rekap-grid thead .wk-rekap-sticky { z-index: 3; background: var(--gray-50); }
.wk-rekap-grid tbody tr:hover .wk-rekap-sticky { background: var(--gray-50); }

.wk-hari { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 5px; font-size: 10.5px; font-weight: 800; }
.wk-hari-h { background: var(--green-light); color: var(--green); }
.wk-hari-s { background: var(--accent-light); color: var(--accent-deep); }
.wk-hari-i { background: #f1f5f9; color: var(--primary); }
.wk-hari-a { background: var(--red-light); color: var(--red); }
.wk-hari-p { background: #ede9fe; color: #7c3aed; }
.wk-hari-kosong { color: var(--gray-300); }
/* ══════════════════════════════════════════════════════════════
   PORTAL ORANG TUA — layout (sidebar, topbar, user-chip, nav-item,
   card, stat-card, badge, table) PAKAI ULANG class yang sama dengan
   SPA staff di atas, jadi tampilannya konsisten satu bahasa desain
   & otomatis dapat perilaku responsif desktop->mobile yang sama
   (sidebar jadi drawer, hamburger muncul dst) tanpa perlu media
   query terpisah. Yang di-custom di bawah ini CUMA bagian yang
   benar-benar unik di Portal Ortu (switcher anak, kartu identitas
   siswa, util loading/empty state). ID elemen tetap diprefix "ortu-"
   (lihat index.php) supaya tidak bentrok dengan #sidebar dkk milik
   SPA staff yang sama-sama ada di DOM (cuma salah satu ditampilkan).
   ══════════════════════════════════════════════════════════════ */
#ortu-app-screen { width: 100%; }

.ortu-anak-switcher { display: flex; flex-direction: column; gap: 6px; padding: 0 12px; }
.ortu-anak-chip { text-align: left; padding: 9px 12px; border-radius: 9px; border: 1.5px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05); color: rgba(255,255,255,.78); cursor: pointer; font-size: 13px; font-weight: 600;
  font-family: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .15s, border-color .15s, color .15s;
  text-transform: capitalize; letter-spacing: .01em; }
.ortu-anak-chip:hover { background: rgba(255,255,255,.09); color: #fff; }
.ortu-anak-chip.active { background: linear-gradient(90deg, rgba(232,160,32,.22) 0%, rgba(255,255,255,.08) 100%);
  border-color: rgba(232,160,32,.4); color: #fff; }

.ortu-empty-state { text-align: center; padding: 40px 16px; color: var(--gray-500); font-size: 13.5px; }

/* ── Status Data Profil (tab Profil ortu) ─────────────────────────── */
.ortu-profil-status-card { padding: 18px 20px; }
.ortu-profil-status-row { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.ortu-profil-status-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--grad-brand); color: white; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 12px -4px rgba(29,78,216,.4); }
.ortu-profil-status-info { flex: 1; min-width: 180px; }
.ortu-profil-status-title { font-weight: 700; font-size: 14.5px; color: var(--gray-900); line-height: 1.3; }
.ortu-profil-status-sub { font-size: 12px; color: var(--gray-500); margin-top: 3px; }
.ortu-profil-status-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.ortu-btn-sync { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--primary); background: #f8fafc; border: 1.5px solid #f1f5f9; cursor: pointer; transition: all .15s; white-space: nowrap; }
.ortu-btn-sync:hover:not(:disabled) { background: #f1f5f9; border-color: var(--primary-light); }
.ortu-btn-sync:active:not(:disabled) { transform: scale(.97); }
.ortu-btn-sync:disabled { opacity: .65; cursor: not-allowed; }
.ortu-btn-sync svg { flex-shrink: 0; }
.ortu-btn-sync svg.ortu-spin { animation: ortuSpin .8s linear infinite; }
@keyframes ortuSpin { to { transform: rotate(360deg); } }
.ortu-loading { text-align: center; padding: 40px; color: var(--gray-500); font-size: 13.5px; }

/* Kartu identitas siswa di Portal Ortu -- SENGAJA pakai teal (bukan navy
   tema staff) supaya dua sisi pengguna gampang dibedain sekilas: teal untuk
   Portal Ortu, pink untuk dashboard guru mandiri, navy untuk sidebar staf. */
.ortu-siswa-card { position: relative; overflow: hidden; border-radius: var(--radius); margin-bottom: 20px; padding: 22px 24px;
  background: radial-gradient(130% 170% at 0% 0%, #2dd4bf 0%, #0d9488 45%, #0f5b52 100%);
  box-shadow: 0 8px 32px rgba(15,91,82,.30); border: none; }
.ortu-siswa-card .card-body { padding: 0; position: relative; z-index: 1; }
.ortu-siswa-blob-1 { position: absolute; top: -80px; right: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.20), rgba(255,255,255,0) 70%); pointer-events: none; }
.ortu-siswa-blob-2 { position: absolute; bottom: -100px; left: 20%; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(253,224,71,.30), rgba(253,224,71,0) 70%); pointer-events: none; }
.ortu-siswa-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ortu-siswa-avatar { width: 58px; height: 58px; border-radius: 50%; color: #fff; flex-shrink: 0;
  background: linear-gradient(140deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,.1) 100%);
  border: 3px solid rgba(255,255,255,.5); box-shadow: 0 4px 16px rgba(8,27,56,.3); overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 19px; }
.ortu-siswa-head h3 { font-size: 17px; font-weight: 800; color: #fff; margin: 0 0 3px; letter-spacing: -.2px;
  text-transform: capitalize; }
.ortu-siswa-head .sub { font-size: 12.5px; color: rgba(255,255,255,.78); }
.ortu-siswa-badge { margin-left: auto; font-size: 11px; font-weight: 700; color: #0f5b52; background: white;
  padding: 6px 13px; border-radius: 20px; box-shadow: 0 4px 12px -4px rgba(0,0,0,.2); white-space: nowrap; }
@media (max-width: 640px) {
  .ortu-siswa-card { padding: 18px; }
  .ortu-siswa-badge { margin-left: 0; }
}

/* Ringkasan H/S/I/A di atas tabel Absensi (tab Absensi Portal Ortu) */
.ortu-absensi-rekap { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; }
/* Tab Ajukan Izin (Portal Ortu) */
.ortu-izin-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 9px; padding: 10px 13px; font-size: 13px; margin-bottom: 14px; }
.ortu-izin-catatan { font-size: 12px; color: var(--gray-500); font-style: italic; margin-top: 4px; }

/* Tab Absensi Portal Ortu (Ajukan Izin/Sakit digabung dengan Riwayat Absensi):
   grid 2 kolom dgn class khusus (bukan .page-grid-2col) supaya breakpoint-nya
   independen & gak kebentur override lain. Stack jadi 1 kolom di layar sempit. */
.ortu-absensi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; min-width: 0; }
.ortu-absensi-grid > * { min-width: 0; }
@media (max-width: 860px) {
  .ortu-absensi-grid { grid-template-columns: 1fr; }
}
/* Kolom Ajukan Izin/Sakit (form + riwayat pengajuan) diberi soft orange
   penuh biar keliatan beda satu rumpun dari kolom Riwayat Absensi di kanan. */
.ortu-izin-col .card { background: #fff7ed; border: 1px solid #fde8cf; }
.ortu-izin-col .card-header { background: transparent; border-bottom: 1px solid #fce3c3; }
.ortu-izin-col .form-group input,
.ortu-izin-col .form-group select,
.ortu-izin-col .form-group textarea { background: #fff; }
.ortu-izin-col .table-wrap table { background: #fff; }

/* Kolom Pengajuan Surat (BEDA dari Ajukan Izin/Sakit di atas — sengaja dikasih
   tema biru/indigo, bukan oranye, supaya wali tidak ketuker: Izin/Sakit itu soal
   absensi, Pengajuan Surat itu soal dokumen/surat keterangan ke Tata Usaha. */
.ortu-surat-col .card { background: #f8fafc; border: 1px solid #e2e8f0; }
.ortu-surat-col .card-header { background: transparent; border-bottom: 1px solid #e2e8f0; }
.ortu-surat-col .form-group input,
.ortu-surat-col .form-group select,
.ortu-surat-col .form-group textarea { background: #fff; }
.ortu-surat-col .table-wrap table { background: #fff; }
.ortu-surat-icon-badge { width: 40px; height: 40px; border-radius: 10px; background: #2563eb; color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ortu-surat-icon-badge svg { width: 20px; height: 20px; }

/* Riwayat Pengajuan Surat — list rows dengan hairline divider, BUKAN kartu
   bertumpuk dengan bar warna. Titik status kecil di kiri tiap baris cukup
   buat nunjukin status tanpa makan tempat vertikal. */
.ortu-surat-list { padding: 4px 22px 6px; }
.ortu-surat-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--gray-100, #f1f5f9); }
.ortu-surat-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.ortu-surat-btn-pdf { background: transparent; border: 1px solid var(--gray-300, #d6d3d1); border-radius: 7px;
  padding: 4px 10px; font-size: 11.5px; font-weight: 600; color: var(--gray-700, #44403c); cursor: pointer; white-space: nowrap; }
.ortu-surat-btn-pdf:hover { background: var(--gray-100, #f5f5f4); }
.ortu-surat-btn-batal { background: transparent; border: none; font-size: 11.5px; font-weight: 600;
  color: var(--gray-400, #94a3b8); cursor: pointer; white-space: nowrap; text-decoration: underline; }
.ortu-surat-btn-batal:hover { color: var(--red, #dc2626); }
@media (max-width: 640px) {
  .ortu-surat-list { padding: 4px 16px 6px; }
}

/* Tab Akademik Portal Ortu — kartu per mata pelajaran, collapsible.
   Chevron & pola open/close sengaja mirip .kk-collapse-header punya
   staff (bahasa visual sama), tapi class dibikin baru berprefix
   "ortu-" mengikuti konvensi file portal-ortu.js supaya tidak nyantol
   ke style staff manapun. */
.ortu-mapel-card { border: 1px solid var(--gray-200); border-radius: 14px; overflow: hidden; margin: 0 16px 14px; background: #fff; }
.ortu-mapel-card:last-child { margin-bottom: 16px; }

/* Header — ikon inisial mapel + nama/sub + rata-rata besar di kanan */
.ortu-mapel-top { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; }
.ortu-mapel-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 12.5px; letter-spacing: .01em;
}
.ortu-mapel-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-right: auto; }
.ortu-mapel-nama { font-weight: 700; font-size: 15px; color: var(--gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ortu-mapel-sub { font-size: 12px; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ortu-mapel-tren { font-weight: 700; }
.ortu-mapel-tren.tren-naik   { color: var(--green); }
.ortu-mapel-tren.tren-turun  { color: var(--red); }
.ortu-mapel-tren.tren-stabil { color: var(--gray-400); }
.ortu-mapel-rata-box { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.ortu-mapel-rata-num { font-size: 22px; font-weight: 800; }
.ortu-mapel-rata-lbl { font-size: 11px; color: var(--gray-400); white-space: nowrap; }

/* Progress rata-rata */
.ortu-mapel-progress-track { height: 6px; background: var(--gray-100, #f1f5f9); margin: 0 16px 14px; border-radius: 999px; overflow: hidden; }
.ortu-mapel-progress-fill { height: 100%; border-radius: 999px; transition: width .3s; }

/* Stat mini: Tertinggi / Terendah / Selisih */
.ortu-mapel-stat-mini { display: flex; border-top: 1px solid var(--gray-100); }
.ortu-stat-mini-item { flex: 1; text-align: center; padding: 11px 6px; border-right: 1px solid var(--gray-100); }
.ortu-stat-mini-item:last-child { border-right: none; }
.ortu-stat-mini-num { display: block; font-size: 17px; font-weight: 800; color: var(--gray-900); }
.ortu-stat-mini-num.stat-hijau { color: var(--green); }
.ortu-stat-mini-num.stat-amber { color: var(--accent-deep, #d97706); }
.ortu-stat-mini-lbl { display: block; font-size: 11px; color: var(--gray-500); margin-top: 2px; }

.ortu-mapel-body { display: none; border-top: 1px solid var(--gray-100); }
.ortu-mapel-body.open { display: block; }

/* Tombol lihat-semua (chevron bulat, mengambang di bawah kartu) */
.ortu-mapel-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--gray-200); background: #fff;
  color: var(--gray-500);
  margin: -15px auto 12px; cursor: pointer; user-select: none;
  box-shadow: 0 2px 6px rgba(15,23,42,.08);
  transition: transform .2s, color .2s;
}
.ortu-mapel-toggle:hover { color: var(--primary); }
.ortu-mapel-toggle.open .ortu-mapel-chev { transform: rotate(180deg); }
.ortu-mapel-chev { transition: transform .2s; }
/* Rekap Nilai baru — card-row per tanggal, badge jenis & nilai dipisah */
.ortu-nilai-list { padding: 6px 0 2px; }
.ortu-nilai-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--gray-100);
  min-height: 42px;
}
.ortu-nilai-row:last-child { border-bottom: none; }
.ortu-nilai-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ortu-nilai-tgl {
  font-size: 12px;
  color: var(--gray-500);
  width: 78px;
  flex-shrink: 0;
  white-space: nowrap;
}
.ortu-nilai-badges { display: flex; align-items: center; gap: 5px; }

/* Badge jenis: abu netral, teks singkatan */
.ortu-badge-jenis {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .03em;
  background: var(--gray-100, #f3f4f6);
  color: var(--gray-600, #4b5563);
  white-space: nowrap;
  cursor: default;
}

/* Badge nilai: warna sesuai rentang */
.ortu-badge-nilai {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.ortu-nilai-100 { background: #0d9488; color: #fff; }  /* teal — sempurna */
.ortu-nilai-90  { background: #16a34a; color: #fff; }  /* hijau — sangat baik */
.ortu-nilai-80  { background: #65a30d; color: #fff; }  /* hijau muda — baik */
.ortu-nilai-70  { background: #ca8a04; color: #fff; }  /* kuning-amber — cukup */
.ortu-nilai-60  { background: #ea580c; color: #fff; }  /* oranye — perlu perhatian */
.ortu-nilai-50  { background: #dc2626; color: #fff; }  /* merah — perlu bimbingan */

/* CP: teks kecil, flex-1, satu baris, ellipsis kalau panjang */
.ortu-nilai-cp {
  flex: 1;
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}
.ortu-nilai-dash { color: var(--gray-300, #d1d5db); }

.ortu-td-muted { color: var(--gray-300, #d1d5db); }
@media (max-width: 480px) {
  .ortu-mapel-icon { width: 36px; height: 36px; font-size: 11px; border-radius: 9px; }
  .ortu-mapel-nama { font-size: 14px; }
  .ortu-mapel-rata-num { font-size: 19px; }
  .ortu-stat-mini-num { font-size: 15px; }
  .ortu-nilai-tgl { width: 64px; font-size: 11px; }
  .ortu-badge-jenis { font-size: 10.5px; padding: 2px 6px; }
  .ortu-badge-nilai { font-size: 12px; min-width: 30px; padding: 2px 6px; }
  .ortu-nilai-cp { font-size: 11px; }
}

/* Tab Keuangan Portal Ortu — "Rincian Tagihan" jadi collapsible, pola
   sama persis dengan .ortu-mapel-* di atas (chevron + open/close), tapi
   dipisah class/fungsi sendiri (lihat ortuToggleTagihan() di
   portal-ortu.js) supaya modul Nilai & Keuangan tidak saling nyantol
   kalau salah satunya diubah lagi nanti. Body-nya isi riwayat
   pembayaran (bisa >1 baris kalau dicicil), bukan tabel. */
.ortu-tagihan-card { border: 1px solid var(--gray-200); border-radius: 12px; overflow: hidden; margin: 0 16px 12px; }
.ortu-tagihan-card:last-child { margin-bottom: 16px; }
.ortu-tagihan-header { display: flex; align-items: center; gap: 10px; padding: 13px 16px; cursor: pointer; user-select: none; flex-wrap: wrap; }
.ortu-tagihan-header:hover { background: var(--gray-50, #f9fafb); }
.ortu-tagihan-chev { flex-shrink: 0; color: var(--gray-400); transition: transform .2s; }
.ortu-tagihan-header.open .ortu-tagihan-chev { transform: rotate(180deg); }
.ortu-tagihan-body { display: none; border-top: 1px solid var(--gray-100); padding: 4px 16px; }
.ortu-tagihan-body.open { display: block; }
.ortu-tagihan-kosong { padding: 12px 0; font-size: 12.5px; color: var(--gray-400); }
.ortu-tagihan-bayar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--gray-100); }
.ortu-tagihan-bayar-row:last-child { border-bottom: none; }
.ortu-tagihan-bayar-jumlah { font-weight: 700; font-size: 13.5px; color: var(--gray-900); }
.ortu-tagihan-bayar-meta { font-size: 11.5px; color: var(--gray-500); margin-top: 2px; }

/* Badge angka kecil di nav-subitem (mis. jumlah Pengajuan Izin menunggu) */
.nav-badge { margin-left: auto; background: #ef4444; color: #fff; font-size: 10.5px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }

/* Tab Prestasi Portal Ortu — kartu bergambar+gradasi per prestasi
   (bukan tabel polos) supaya lebih terasa "showcase". Warna gradasi
   ikon & badge tingkat mengikuti ORTU_PRESTASI_TINGKAT_GRAD di JS —
   makin tinggi tingkatnya, makin ramai gradasinya (Internasional
   dapat sentuhan emas). */
.ortu-prestasi-ringkasan { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.ortu-prestasi-ringkasan-total { font-size: 14px; color: var(--gray-700); }
.ortu-prestasi-ringkasan-total strong { font-size: 20px; color: var(--gray-900); margin-right: 4px; }
.ortu-prestasi-ringkasan-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ortu-prestasi-ringkasan-badge { color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.12); }

.ortu-prestasi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ortu-prestasi-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 16px; display: flex; gap: 14px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.ortu-prestasi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ortu-prestasi-icon { flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.16); }
.ortu-prestasi-body { min-width: 0; flex: 1; }
.ortu-prestasi-tingkat { display: inline-block; color: #fff; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding: 2px 9px; border-radius: 999px; margin-bottom: 6px; }
.ortu-prestasi-nama { font-size: 14.5px; font-weight: 700; color: var(--gray-900); line-height: 1.35; margin-bottom: 8px; }
.ortu-prestasi-meta { display: flex; flex-direction: column; gap: 5px; }
.ortu-prestasi-meta-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray-500); }
.ortu-prestasi-meta-item svg { flex-shrink: 0; color: var(--gray-300); }
.ortu-prestasi-empty-icon { color: var(--gray-300); margin-bottom: 10px; display: flex; justify-content: center; }
.ortu-prestasi-empty-icon svg { width: 40px; height: 40px; }

/* Tab Pelanggaran Portal Ortu — dulu tabel polos, sekarang timeline
   bergradasi per kelompok kategori (Ringan/Sedang/Berat), senada dengan
   bahasa visual tab Prestasi di atas (gradasi + badge + ikon di kartu),
   tapi bentuknya garis waktu vertikal karena datanya memang catatan
   kronologis, bukan koleksi untuk dipamerkan. */
.ortu-pelanggaran-ringkasan { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 18px; }
.ortu-pelanggaran-ringkasan-total { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--gray-200); border-radius: 14px; padding: 12px 18px; box-shadow: var(--shadow); }
.ortu-pelanggaran-ringkasan-total-icon { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; background: linear-gradient(135deg,#dc2626 0%,#7c2d12 100%); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(220,38,38,.28); }
.ortu-pelanggaran-ringkasan-total-value { font-size: 24px; font-weight: 800; color: var(--gray-900); line-height: 1.1; }
.ortu-pelanggaran-ringkasan-total-label { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.ortu-pelanggaran-ringkasan-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ortu-pelanggaran-ringkasan-badge { color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.12); }

.ortu-pelanggaran-timeline { position: relative; display: flex; flex-direction: column; gap: 16px; }
.ortu-pelanggaran-timeline::before { content: ''; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 2px; background: var(--gray-200); }
.ortu-pelanggaran-item { position: relative; display: flex; gap: 14px; }
.ortu-pelanggaran-item-dot { position: relative; z-index: 1; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; border: 3px solid var(--gray-50); box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.ortu-pelanggaran-item-card { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.ortu-pelanggaran-item-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ortu-pelanggaran-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ortu-pelanggaran-item-kelompok { display: inline-block; color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; margin-bottom: 4px; }
.ortu-pelanggaran-item-kategori { font-size: 14.5px; font-weight: 700; color: var(--gray-900); line-height: 1.3; }
.ortu-pelanggaran-item-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.ortu-pelanggaran-item-meta-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray-500); }
.ortu-pelanggaran-item-meta-item svg { flex-shrink: 0; color: var(--gray-300); }
.ortu-pelanggaran-item-poin { font-size: 12px; font-weight: 800; color: var(--red); background: var(--red-light); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.ortu-pelanggaran-item-sanksi { font-size: 12.5px; color: var(--gray-700); background: var(--gray-50); border-radius: 8px; padding: 8px 10px; margin-top: 6px; }
.ortu-pelanggaran-item-deskripsi { font-size: 12.5px; color: var(--gray-500); margin-top: 6px; line-height: 1.5; }
.ortu-pelanggaran-empty-icon { color: var(--green); margin-bottom: 10px; display: flex; justify-content: center; }
.ortu-pelanggaran-empty-icon svg { width: 40px; height: 40px; }
@media (max-width: 480px) {
  .ortu-pelanggaran-timeline::before { left: 16px; }
  .ortu-pelanggaran-item-dot { width: 34px; height: 34px; }
  .ortu-pelanggaran-item-dot svg { width: 15px; height: 15px; }
}

/* Tab Keuangan Portal Ortu — data ASLI dari SIMKEU (lihat action=keuangan
   di api/portal_ortu.php). .ortu-keuangan-simple dipakai utk kartu pesan
   fallback (siswa belum terdaftar/koneksi gagal/dll), sisanya kartu
   ringkasan tagihan beneran. */
.ortu-keuangan-simple { background: #fff; }
.ortu-keuangan-simple .card-body { text-align: center; padding: 40px 24px; }
.ortu-keuangan-simple-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 14px;
  background: var(--accent-light); color: var(--accent-deep); display: flex; align-items: center; justify-content: center; }
.ortu-keuangan-simple-title { font-size: 16px; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.ortu-keuangan-simple-desc { font-size: 13px; color: var(--gray-500); margin-bottom: 14px; }
.ortu-keuangan-simple-badge { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--accent-deep);
  background: var(--accent-light); padding: 4px 12px; border-radius: 999px; }

.ortu-keuangan-summary-card { background: #fff; }

.ortu-keuangan-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.ortu-keuangan-header-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--gray-500); }
.ortu-keuangan-header-label svg { color: var(--accent-deep); flex-shrink: 0; }

.ortu-keuangan-ringkasan-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.ortu-keuangan-ringkasan-grid > div { padding: 0 14px; }
.ortu-keuangan-ringkasan-grid > div:first-child { padding-left: 0; }
.ortu-keuangan-ringkasan-grid > div:last-child { padding-right: 0; }
.ortu-keuangan-ringkasan-grid > div + div { border-left: 1px solid var(--gray-100); }
.ortu-keuangan-ringkasan-label { font-size: 11px; font-weight: 600; color: var(--gray-500); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .03em; }
.ortu-keuangan-ringkasan-nilai { font-size: 18px; font-weight: 800; color: var(--gray-900); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
@media (max-width: 560px) {
  .ortu-keuangan-ringkasan-grid { grid-template-columns: 1fr; gap: 14px; }
  .ortu-keuangan-ringkasan-grid > div { padding: 0 !important; }
  .ortu-keuangan-ringkasan-grid > div + div { border-left: none; border-top: 1px solid var(--gray-100); padding-top: 14px !important; }
}

/* Progress "sudah dibayar" -- proporsi visual, bukan cuma angka. Warna
   fill ikut status (hijau lunas/dicicil, abu-abu kalau belum ada
   pembayaran sama sekali) supaya sejalan sama badge & aksen atas card. */
.ortu-keuangan-progress-wrap { margin-top: 18px; }
.ortu-keuangan-progress-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.ortu-keuangan-progress-top span:first-child { font-size: 11px; font-weight: 600; color: var(--gray-500); }
.ortu-keuangan-progress-top span:last-child { font-size: 12.5px; font-weight: 800; color: var(--gray-700); }
.ortu-keuangan-progress-track { height: 7px; border-radius: 999px; background: var(--gray-100); overflow: hidden; }
.ortu-keuangan-progress-fill { height: 100%; border-radius: 999px; background: var(--green); transition: width .4s ease; }
.ortu-keuangan-progress-fill.st-belum { background: var(--gray-300); }

/* ── Lonceng Notifikasi (topbar Portal Ortu) ─────────────────────── */
.ortu-notif-bell { position: relative; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--gray-100); color: var(--gray-600); cursor: pointer; transition: background .15s; }
.ortu-notif-bell:hover { background: var(--gray-200); }
.ortu-notif-badge { position: absolute; top: -2px; right: -2px; min-width: 17px; height: 17px; padding: 0 4px; background: var(--red); color: #fff; border-radius: 999px; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1; border: 2px solid #fff; }
.ortu-notif-panel { position: absolute; top: calc(100% + 8px); right: -6px; width: 320px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 300; overflow: hidden; display: none; cursor: default; }
.ortu-notif-bell.open .ortu-notif-panel { display: block; }
.ortu-notif-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--gray-100); font-size: 13px; font-weight: 700; color: var(--gray-900); }
.ortu-notif-panel-head button { border: none; background: none; color: var(--primary); font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 0; }
.ortu-notif-list { max-height: 360px; overflow-y: auto; }
.ortu-notif-item { display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%; border: none; background: none; padding: 11px 14px; border-bottom: 1px solid var(--gray-100); cursor: pointer; transition: background .12s; }
.ortu-notif-item:last-child { border-bottom: none; }
.ortu-notif-item:hover { background: var(--gray-50); }
.ortu-notif-item.unread { background: #f8fafc; }
.ortu-notif-item-icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--accent-light); color: var(--accent-deep); }
.ortu-notif-item-body { flex: 1; min-width: 0; }
.ortu-notif-item-judul { font-size: 12.5px; font-weight: 700; color: var(--gray-900); margin-bottom: 2px; }
.ortu-notif-item-pesan { font-size: 12px; color: var(--gray-600); line-height: 1.4; }
.ortu-notif-item-waktu { font-size: 10.5px; color: var(--gray-400); margin-top: 4px; }
.ortu-notif-empty { padding: 28px 14px; text-align: center; font-size: 12.5px; color: var(--gray-400); }
@media (max-width: 768px) {
  /* Di layar sempit, panel di-anchor ke LAYAR (bukan ke lonceng) supaya
     tidak nabrak tepi kiri -- lonceng gak selalu dekat tepi kanan layar
     (ada hamburger + judul halaman di kiri topbar yg makan tempat).
     Breakpoint disamakan dgn breakpoint mobile utama app (.sidebar/
     .hamburger). Ditaruh di SINI (bukan di blok media 768px yg di atas)
     supaya cascade-nya benar -- rule ini harus muncul SETELAH definisi
     dasar .ortu-notif-panel di atas, kalau tidak dia kalah urutan. */
  .ortu-notif-panel { position: fixed; top: 68px; left: 12px; right: 12px; width: auto; max-width: none; }
}
/* ══════════════════════════════════════════════════════════════════════
   WALI KELAS — Halaman Pengajuan Izin (redesain, lihat wkMuatListIzin()
   dkk di js/wali-kelas.js). Sebelumnya cuma 2 tombol filter polos + kartu
   putih generik; sekarang chip berwarna dgn angka real-time + kartu yang
   menonjolkan siapa & apa yang butuh keputusan wali kelas.
   ══════════════════════════════════════════════════════════════════════ */

.wk-izin-filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.wk-izin-chip { display: flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 12px;
  border: 1.5px solid var(--gray-200); background: #fff; cursor: pointer; transition: all .15s ease;
  font-family: inherit; }
.wk-izin-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.wk-izin-chip-count { font-size: 18px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.wk-izin-chip-label { font-size: 12.5px; font-weight: 600; color: var(--gray-500); }
.wk-izin-chip.active { border-color: transparent; box-shadow: 0 6px 16px -6px rgba(29,78,216,.25); }
.wk-izin-chip-amber.active { background: linear-gradient(135deg, var(--accent-light) 0%, #ffe2ae 100%); }
.wk-izin-chip-amber.active .wk-izin-chip-count { color: var(--accent-deep); }
.wk-izin-chip-green.active { background: linear-gradient(135deg, var(--green-light) 0%, #bdf3d0 100%); }
.wk-izin-chip-green.active .wk-izin-chip-count { color: var(--green); }
.wk-izin-chip-red.active { background: linear-gradient(135deg, var(--red-light) 0%, #fecaca 100%); }
.wk-izin-chip-red.active .wk-izin-chip-count { color: var(--red); }
.wk-izin-chip-blue.active { background: linear-gradient(135deg, #f1f5f9 0%, #c3ddfb 100%); }
.wk-izin-chip-blue.active .wk-izin-chip-count { color: var(--primary); }

.wk-izin-btn-setuju { background: var(--green); color: #fff; border: none; display: inline-flex; align-items: center; gap: 6px; }
.wk-izin-btn-setuju:hover { background: #128a3e; }

/* ══════════════════════════════════════════════════════════════════════
   PORTAL ORTU — Kartu "Jadwal Hari Ini" di Dashboard, lihat
   ortuRenderJadwalHariIniCard() di js/portal-ortu.js.
   ══════════════════════════════════════════════════════════════════════ */

.ortu-jadwal-tanggal { font-size: 12px; color: var(--gray-400); font-weight: 500; margin-top: 1px; }
.ortu-jadwal-header { display: flex; align-items: center; gap: 12px; justify-content: flex-start; }
.ortu-jadwal-header-icon { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center; background: linear-gradient(140deg, #fde68a 0%, #ea580c 100%);
  color: #fff; }

.ortu-jadwal-banner { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700;
  color: var(--accent-deep); background: var(--accent-light); border-radius: 10px; padding: 10px 13px;
  margin-bottom: 14px; }

.ortu-jadwal-kosong { text-align: center; padding: 20px 10px; color: var(--gray-400); font-size: 13px; }

/* Wrapper luar: 2 CARD TERPISAH berdampingan (bukan 1 card dibelah garis)
   -- kiri kartu Jadwal Hari Ini, kanan kartu Tren Kehadiran, masing-masing
   .card sendiri dgn shadow & radius sendiri, senada gaya 4 stat-card di
   atasnya. */
.ortu-dash-duacard-grid { display: grid; grid-template-columns: minmax(280px, 480px) 1fr; gap: 20px; align-items: start; margin-top: 20px; }
@media (max-width: 900px) {
  .ortu-dash-duacard-grid { grid-template-columns: 1fr; }
}

.ortu-jadwal-card { margin-top: 0; }
.ortu-tren-card { margin-top: 0; }

.ortu-jadwal-list { display: flex; flex-direction: column; }
.ortu-jadwal-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--gray-100); }
.ortu-jadwal-row:last-child { border-bottom: none; padding-bottom: 0; }
.ortu-jadwal-jam { flex-shrink: 0; width: 42px; text-align: center; font-size: 12px; font-weight: 800;
  color: var(--gray-500); background: var(--gray-50); border-radius: 8px; padding: 6px 4px; }
.ortu-jadwal-mapel { flex: 1; min-width: 0; }
.ortu-jadwal-mapel-nama { font-size: 13.5px; font-weight: 700; color: var(--gray-900); }
.ortu-jadwal-guru { font-size: 12px; color: var(--gray-400); margin-top: 1px; }

.ortu-jadwal-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700;
  padding: 5px 10px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }
.ortu-jadwal-status-green { background: var(--green-light); color: #14532d; }
.ortu-jadwal-status-blue { background: #f1f5f9; color: var(--primary); }
.ortu-jadwal-status-amber { background: var(--accent-light); color: var(--accent-deep); }
.ortu-jadwal-status-gray { background: var(--gray-100); color: var(--gray-500); }

@media (max-width: 640px) {
  .ortu-jadwal-row { flex-wrap: wrap; }
  .ortu-jadwal-status { margin-left: 56px; }
}

/* Mini bar chart Tren Kehadiran di kolom kanan kartu Jadwal Hari Ini,
   lihat ortuRenderTrenKehadiran() di js/portal-ortu.js. */
.ortu-tren-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.ortu-tren-icon { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; background: linear-gradient(140deg, #34d399 0%, #0d9488 100%); color: #fff; }
.ortu-tren-title { font-size: 13.5px; font-weight: 800; color: var(--gray-900); }
.ortu-tren-sub { font-size: 11.5px; color: var(--gray-400); font-weight: 500; margin-top: 1px; }

.ortu-tren-bars { display: flex; gap: 10px; align-items: flex-end; }
.ortu-tren-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.ortu-tren-bar-col-klik { cursor: pointer; border-radius: 8px; transition: transform .12s ease; }
.ortu-tren-bar-col-klik:hover { transform: translateY(-2px); }
.ortu-tren-bar-col-klik:hover .ortu-tren-bar-val { text-decoration: underline; text-decoration-style: dotted; }
.ortu-tren-bar-col-klik:focus-visible { outline: 2px solid var(--gray-400); outline-offset: 2px; }
.ortu-tren-bar-val { font-size: 10.5px; font-weight: 700; color: var(--gray-500); }
.ortu-tren-bar-track { width: 100%; max-width: 30px; height: 72px; background: var(--gray-100); border-radius: 7px;
  display: flex; align-items: flex-end; overflow: hidden; }
.ortu-tren-bar-track-kosong { background: transparent; border: 1.5px dashed var(--gray-200); }
.ortu-tren-bar-track-rendah { border: 1.5px dashed hsl(28, 85%, 70%); background: hsl(28, 90%, 97%); }
.ortu-tren-bar-fill { width: 100%; border-radius: 7px; transition: height .35s ease; }
.ortu-tren-bar-label { font-size: 10.5px; color: var(--gray-400); font-weight: 600; }
.ortu-tren-bar-ket { font-size: 8.5px; color: #ea580c; font-weight: 600; margin-top: 1px; white-space: nowrap; }
.ortu-tren-bar-flag { color: hsl(14, 85%, 50%); font-weight: 800; margin-left: 1px; }
.ortu-tren-ket { font-size: 10.5px; color: var(--gray-400); margin-top: 10px; font-style: italic; }
/* ── Jadwal Cuti Guru (js/jadwal-cuti-guru.js) ────────────────── */
.jcg-day-row { display: flex; gap: 6px; flex-wrap: wrap; }
.jcg-day-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--gray-200, #e2e8f0);
  background: #f8fafc; font-size: 12px; font-weight: 600; color: var(--gray-500, #64748b);
  cursor: pointer; user-select: none; transition: all .12s ease;
}
.jcg-day-chip:has(input:checked) {
  background: #eff6ff; border-color: #93c5fd; color: #1d4ed8;
}
.jcg-day-chip input { accent-color: #2563eb; margin: 0; cursor: pointer; }