@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;500;600;700;800;900&display=swap');

:root{--primary:#2563eb;--primary-dark:#1d4ed8;--bg:#f3f6fb;--surface:#fff;--text:#0f172a;--muted:#64748b;--border:#e2e8f0;--danger:#dc2626;--shadow:0 10px 30px rgba(15,23,42,.08)}*{box-sizing:border-box}body{margin:0;font-family:"Nunito Sans",Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}a{text-decoration:none;color:inherit}.app{display:flex;min-height:100vh}.sidebar{width:264px;position:fixed;inset:0 auto 0 0;background:#0f172a;color:#e5e7eb;padding:18px;transition:.2s ease;overflow-y:auto}.brand{display:flex;gap:12px;align-items:center;margin-bottom:22px}.logo{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,#60a5fa,#2563eb);display:grid;place-items:center;font-weight:900;color:#fff}.brand span{display:block;color:#94a3b8;font-size:12px}nav{display:flex;flex-direction:column;gap:5px}nav a{padding:11px 12px;border-radius:12px;color:#cbd5e1;font-weight:700;font-size:14px}nav a:hover,nav a.active{background:#1e293b;color:#fff}.main{margin-left:264px;width:calc(100% - 264px)}.topbar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 24px;background:#fff;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:10}.topbar h1{font-size:22px;margin:0}.topbar p{margin:4px 0 0;color:var(--muted);font-size:13px}.hamburger{display:none;border:0;background:#e2e8f0;border-radius:10px;padding:9px 12px}.userbox{text-align:right;font-size:13px}.userbox span{display:block;color:var(--muted)}.userbox a{color:var(--primary);font-weight:700}.content{padding:22px}.grid{display:grid;gap:18px}.grid.two{grid-template-columns:1fr 1.4fr}.grid.stats{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}.stat,.card{background:var(--surface);border:1px solid var(--border);border-radius:20px;box-shadow:var(--shadow);padding:18px}.stat span{display:block;color:var(--muted);font-size:13px}.stat strong{display:block;font-size:34px;margin-top:8px}.card.narrow{max-width:820px}.card h2{margin:0 0 8px;font-size:20px}.card p{margin:0 0 14px;color:var(--muted)}.card-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.span-all{grid-column:1/-1}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse}th,td{border-bottom:1px solid var(--border);padding:11px 10px;text-align:left;vertical-align:top;font-size:14px}th{background:#f8fafc;color:#334155;font-size:12px;text-transform:uppercase;letter-spacing:.04em}small{color:var(--muted)}label{display:block;font-weight:700;font-size:13px;margin:11px 0 6px}input,select,textarea{width:100%;border:1px solid var(--border);background:#fff;border-radius:11px;padding:10px 12px;font:inherit;color:var(--text)}textarea{resize:vertical}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px}.span-2{grid-column:1/-1}.form-actions{display:flex;gap:8px;margin-top:16px}.filter-form{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:8px;align-items:end;margin:12px 0}.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:11px;padding:9px 12px;font-weight:800;font-size:13px;cursor:pointer;white-space:nowrap}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{background:var(--primary-dark)}.btn-light{background:#eef2ff;color:#1e3a8a}.btn-danger{background:#fee2e2;color:#991b1b}.btn.full{width:100%;margin-top:14px}.actions{display:flex;gap:6px;flex-wrap:wrap}.inline{display:inline}.inline-edit{display:grid;grid-template-columns:repeat(5,minmax(100px,1fr));gap:6px;min-width:520px}.stack-form{display:grid;gap:7px;min-width:260px;margin:8px 0}.checks{display:grid;gap:5px;grid-template-columns:repeat(2,minmax(0,1fr))}.checks label{margin:0;font-weight:500}.badge{display:inline-block;border-radius:999px;background:#e5e7eb;color:#374151;padding:4px 8px;font-size:12px;font-weight:800}.badge.ringan{background:#dcfce7;color:#166534}.badge.sedang{background:#fef3c7;color:#92400e}.badge.berat{background:#fee2e2;color:#991b1b}.badge.risk.safe{background:#dcfce7;color:#166534}.badge.risk.watch{background:#dbeafe;color:#1e40af}.badge.risk.medium{background:#fef3c7;color:#92400e}.badge.risk.high{background:#ffedd5;color:#9a3412}.badge.risk.critical{background:#fee2e2;color:#991b1b}.alert{border-radius:14px;padding:12px 14px;margin-bottom:16px}.alert.success{background:#dcfce7;color:#166534}.alert.error{background:#fee2e2;color:#991b1b}.login-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#dbeafe,#f8fafc)}.login-card{width:min(420px,92vw);background:#fff;padding:28px;border-radius:24px;box-shadow:var(--shadow)}.login-card h1{margin:0}.hint{margin-top:16px;color:var(--muted);font-size:13px;text-align:center}.profile-box{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;background:#f8fafc;border:1px solid var(--border);border-radius:16px;padding:14px;margin-top:10px}.mt8{margin-top:8px}.mt16{margin-top:16px}summary{cursor:pointer;margin-bottom:8px}
@media(max-width:1100px){.grid.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.two{grid-template-columns:1fr}.filter-form{grid-template-columns:1fr 1fr}.profile-box{grid-template-columns:1fr 1fr}.form-grid{grid-template-columns:1fr}.span-2{grid-column:auto}}
@media(max-width:760px){.sidebar{transform:translateX(-105%);z-index:1000}.sidebar.open{transform:translateX(0)}.main{margin-left:0;width:100%}.hamburger{display:block}.topbar{align-items:flex-start}.userbox{text-align:right}.content{padding:14px}.grid.stats{grid-template-columns:1fr}.filter-form{grid-template-columns:1fr}.profile-box{grid-template-columns:1fr}.card-header{align-items:flex-start;flex-direction:column}.inline-edit{grid-template-columns:1fr;min-width:220px}.checks{grid-template-columns:1fr}th,td{font-size:13px}.login-card{padding:22px}}
@media print{.sidebar,.topbar,.no-print,.btn,.filter-form{display:none!important}.main{margin:0;width:100%}.content{padding:0}.card{box-shadow:none;border:0}body{background:#fff}th,td{border:1px solid #999}.table-wrap{overflow:visible}}
.badge.hadir,.badge.disetujui,.badge.dibaca{background:#dcfce7;color:#166534}.badge.izin,.badge.sakit,.badge.menunggu{background:#dbeafe;color:#1e40af}.badge.terlambat,.badge.perlu_revisi{background:#fef3c7;color:#92400e}.badge.alpa,.badge.ditolak{background:#fee2e2;color:#991b1b}.badge.pulang_awal,.badge.selesai{background:#ede9fe;color:#5b21b6}
.help{display:block;color:var(--muted);font-size:12px;margin-top:4px}.badge.info{background:#e0f2fe;color:#075985}
.info-panel{background:#f8fafc;border:1px solid var(--border);border-radius:16px;padding:14px;margin:14px 0}.info-panel h3{margin:0 0 10px;font-size:16px}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.detail-grid>div{background:#fff;border:1px solid var(--border);border-radius:12px;padding:10px}.detail-grid strong{font-size:12px;color:#334155;text-transform:uppercase;letter-spacing:.03em}@media(max-width:700px){.detail-grid{grid-template-columns:1fr}.span-2{grid-column:auto}}
.pwa-install-btn{width:100%;border:0;border-radius:12px;padding:11px 12px;background:#2563eb;color:#fff;font-weight:800;font-size:14px;cursor:pointer;text-align:left;align-items:center;justify-content:flex-start}.pwa-install-btn:hover{background:#1d4ed8}.login-card .btn-light.full{margin-top:12px}
.pwa-push-card{border-left:5px solid var(--primary)}.help-text{color:var(--muted);font-size:13px}.muted{color:var(--muted)}

/* ===== Parent Android-like UI ===== */
.role-parent{
  --primary:#4f46e5;
  --primary-dark:#4338ca;
  --bg:#eef2ff;
  --surface:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e5e7eb;
  background:
    radial-gradient(circle at top left, rgba(99,102,241,.16), transparent 35%),
    radial-gradient(circle at top right, rgba(56,189,248,.16), transparent 30%),
    linear-gradient(180deg,#f5f7ff 0%,#edf4ff 100%);
}
.role-parent .app{display:block;min-height:100vh}
.role-parent .sidebar{width:min(86vw,320px);transform:translateX(-110%);background:rgba(255,255,255,.96);backdrop-filter:blur(14px);color:var(--text);box-shadow:0 18px 55px rgba(15,23,42,.18);padding:18px 16px 110px;border-right:1px solid rgba(226,232,240,.9);z-index:1100}
.role-parent .sidebar.open{transform:translateX(0)}
.role-parent .brand{margin-bottom:18px;padding:10px 6px}
.role-parent .parent-brand .logo{background:linear-gradient(135deg,#4f46e5,#7c3aed,#06b6d4);width:46px;height:46px;border-radius:16px;box-shadow:0 12px 20px rgba(79,70,229,.28)}
.role-parent .brand strong{font-size:16px;color:var(--text)}
.role-parent .brand span{color:var(--muted)}
.role-parent nav{gap:8px}
.role-parent nav a,.role-parent .pwa-install-btn{display:flex;align-items:center;gap:12px;padding:13px 14px;border-radius:18px;background:#f8fafc;color:#334155;font-size:14px;font-weight:800;box-shadow:inset 0 0 0 1px rgba(226,232,240,.9)}
.role-parent nav a.active,.role-parent nav a:hover{background:linear-gradient(135deg,#4f46e5,#6366f1);color:#fff;box-shadow:0 12px 22px rgba(79,70,229,.22)}
.role-parent nav a.active .nav-icon,.role-parent nav a:hover .nav-icon{background:rgba(255,255,255,.22);color:#fff}
.role-parent .nav-icon{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:12px;background:#e9edff;color:#4338ca;font-size:16px;flex:0 0 30px}
.role-parent .pwa-install-btn{width:100%;justify-content:flex-start;background:linear-gradient(135deg,#06b6d4,#3b82f6);color:#fff;box-shadow:none}
.role-parent .main{margin-left:0;width:100%;padding-bottom:92px}
.role-parent .topbar{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:12px;padding:16px 14px 18px;background:linear-gradient(135deg,#4f46e5,#4338ca 65%,#06b6d4);color:#fff;border-bottom:0;border-radius:0 0 28px 28px;box-shadow:0 10px 30px rgba(67,56,202,.24)}
.role-parent .topbar h1{font-size:20px;color:#fff;margin:0}
.role-parent .topbar p{color:rgba(255,255,255,.84);font-size:12px;line-height:1.45;margin:3px 0 0}
.role-parent .hamburger{display:inline-flex;border:0;background:rgba(255,255,255,.18);color:#fff;border-radius:14px;padding:10px 12px;backdrop-filter:blur(6px)}
.role-parent .topbar-title{flex:1;min-width:0}
.role-parent .parent-userbox{display:flex;align-items:center;gap:10px;text-align:left;min-width:0}
.role-parent .avatar-chip{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:14px;background:rgba(255,255,255,.18);color:#fff;font-weight:900;box-shadow:inset 0 0 0 1px rgba(255,255,255,.16)}
.role-parent .parent-userbox strong{display:block;color:#fff;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:110px}
.role-parent .parent-userbox span{display:block;color:rgba(255,255,255,.82);font-size:12px}
.role-parent .content{padding:16px 14px 96px}
.role-parent .card{border-radius:24px;border:1px solid rgba(226,232,240,.8);box-shadow:0 14px 36px rgba(15,23,42,.08);padding:18px;background:rgba(255,255,255,.96)}
.role-parent .card h2{font-size:18px}
.role-parent .card p{font-size:13px}
.role-parent .alert{border-radius:18px}
.role-parent .btn{border-radius:14px;padding:11px 14px;font-weight:800}
.role-parent .btn-light{background:#eef2ff;color:#4338ca}
.role-parent .btn-primary{background:linear-gradient(135deg,#4f46e5,#6366f1)}
.role-parent .filter-form,.role-parent .parent-filter-form{grid-template-columns:1fr auto;gap:10px;align-items:end}
.role-parent .parent-filter-field{display:grid;gap:6px}
.role-parent .form-grid{grid-template-columns:1fr}
.role-parent .grid.stats.parent-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.role-parent .stat-parent{position:relative;overflow:hidden;border-radius:22px;padding:16px 16px 18px;border:0;box-shadow:none}
.role-parent .stat-parent strong{font-size:28px}
.role-parent .stat-parent:before{content:"";position:absolute;right:-24px;top:-24px;width:90px;height:90px;border-radius:50%;background:rgba(255,255,255,.18)}
.role-parent .stat-blue{background:linear-gradient(135deg,#dbeafe,#eff6ff)}
.role-parent .stat-amber{background:linear-gradient(135deg,#fef3c7,#fffbeb)}
.role-parent .stat-red{background:linear-gradient(135deg,#fee2e2,#fff1f2)}
.role-parent .stat-green{background:linear-gradient(135deg,#dcfce7,#f0fdf4)}
.role-parent .parent-hero{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;background:linear-gradient(135deg,#4f46e5,#6366f1 62%,#06b6d4);color:#fff;border:0}
.role-parent .parent-hero h2{color:#fff;font-size:22px;margin:6px 0 8px}
.role-parent .parent-hero p{color:rgba(255,255,255,.88);margin:0}
.role-parent .eyebrow{font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;opacity:.9}
.role-parent .hero-pill{display:inline-flex;align-items:center;gap:8px;background:rgba(255,255,255,.16);padding:10px 12px;border-radius:16px;color:#fff;font-weight:800;white-space:nowrap}
.role-parent .parent-selector-card{margin-top:14px}
.role-parent .parent-profile-card{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;background:linear-gradient(135deg,#ffffff,#f8fbff)}
.role-parent .parent-profile-main{display:flex;align-items:center;gap:14px}
.role-parent .student-avatar{width:56px;height:56px;display:flex;align-items:center;justify-content:center;border-radius:20px;background:linear-gradient(135deg,#4f46e5,#06b6d4);color:#fff;font-weight:900;font-size:24px;box-shadow:0 10px 24px rgba(79,70,229,.22)}
.role-parent .parent-profile-card h3{margin:4px 0 4px;font-size:20px}
.role-parent .parent-profile-card p{margin:0}
.role-parent .profile-risk-wrap{display:grid;gap:6px;justify-items:flex-end;text-align:right}
.role-parent .parent-app-card{margin-top:14px}
.role-parent .parent-card-header{margin-bottom:14px}
.role-parent .parent-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.role-parent .quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.role-parent .quick-link{display:grid;gap:8px;align-content:start;background:linear-gradient(180deg,#ffffff,#f8fbff);border:1px solid rgba(226,232,240,.9);border-radius:20px;padding:14px;box-shadow:0 8px 18px rgba(15,23,42,.04)}
.role-parent .quick-link strong{font-size:14px}
.role-parent .quick-link small{color:var(--muted);line-height:1.4}
.role-parent .quick-icon{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:15px;background:#eef2ff;color:#4338ca;font-size:20px}
.role-parent .mini-list{display:grid;gap:10px}
.role-parent .mini-item{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:#f8fafc;border-radius:16px;border:1px solid rgba(226,232,240,.8)}
.role-parent .mini-item span{color:var(--muted);font-size:13px}
.role-parent .mini-item strong{font-size:18px}
.role-parent .profile-box-parent{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;background:transparent;padding:0;border:0}
.role-parent .profile-box-parent>div{background:#f8fafc;border-radius:16px;padding:12px;border:1px solid rgba(226,232,240,.8)}
.role-parent .parent-list{display:grid;gap:10px}
.role-parent .parent-list-item{padding:14px;border-radius:18px;background:#f8fafc;border:1px solid rgba(226,232,240,.8)}
.role-parent .parent-list-item.positive{background:linear-gradient(180deg,#f0fdf4,#ffffff)}
.role-parent .parent-list-top{display:flex;justify-content:space-between;gap:10px;margin-bottom:6px}
.role-parent .parent-list-top span{font-size:12px;color:var(--muted)}
.role-parent .parent-list-item p{margin:0 0 6px;color:var(--text)}
.role-parent .empty-state{padding:16px;border-radius:18px;background:#f8fafc;color:var(--muted);text-align:center;border:1px dashed rgba(203,213,225,.9)}
.role-parent .table-wrap{overflow:visible}
.role-parent table{width:100%}
.role-parent th,.role-parent td{padding:12px 10px}
.role-parent .parent-bottom-nav{position:fixed;left:12px;right:12px;bottom:max(12px, env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;background:rgba(255,255,255,.94);backdrop-filter:blur(18px);padding:8px;border-radius:24px;box-shadow:0 16px 40px rgba(15,23,42,.14);z-index:1000;border:1px solid rgba(226,232,240,.9)}
.role-parent .parent-bottom-link{display:grid;justify-items:center;gap:4px;padding:8px 4px;border-radius:18px;color:#475569;font-size:11px;font-weight:800}
.role-parent .parent-bottom-icon{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:13px;background:#f1f5f9;color:#4338ca;font-size:16px}
.role-parent .parent-bottom-link.active{background:#eef2ff;color:#312e81}
.role-parent .parent-bottom-link.active .parent-bottom-icon{background:linear-gradient(135deg,#4f46e5,#6366f1);color:#fff;box-shadow:0 8px 16px rgba(79,70,229,.22)}
.role-parent .actions{gap:8px}
.role-parent .badge{border-radius:999px;padding:6px 10px}
.role-parent .stack-form{min-width:0}
.role-parent .topbar + .content .card:first-child{margin-top:-8px}
@media (min-width: 761px){
  .role-parent .sidebar{position:fixed}
}
@media(max-width:760px){
  .role-parent .content{padding:14px 12px 96px}
  .role-parent .topbar{padding:14px 12px 18px;border-radius:0 0 24px 24px}
  .role-parent .grid.stats.parent-stats,.role-parent .quick-grid,.role-parent .parent-action-grid,.role-parent .parent-grid-two{grid-template-columns:repeat(2,minmax(0,1fr))}
  .role-parent .parent-profile-card{display:grid;justify-content:stretch}
  .role-parent .profile-risk-wrap{justify-items:flex-start;text-align:left}
  .role-parent .card-header{align-items:flex-start;flex-direction:column}
  .role-parent .parent-bottom-nav{left:8px;right:8px;bottom:max(8px, env(safe-area-inset-bottom))}
}
@media(max-width:520px){
  .role-parent .grid.stats.parent-stats,.role-parent .quick-grid,.role-parent .parent-action-grid,.role-parent .parent-grid-two,.role-parent .filter-form,.role-parent .parent-filter-form{grid-template-columns:1fr}
  .role-parent .parent-bottom-link{font-size:10px}
  .role-parent .parent-bottom-icon{width:30px;height:30px;border-radius:11px}
  .role-parent .hero-pill{font-size:12px}
  .role-parent .parent-hero{display:grid}
}

/* ===== Parent UI Improvements v2 ===== */
.role-parent .card,
.role-parent .quick-link,
.role-parent .mobile-data-card,
.role-parent .notification-mobile-card,
.role-parent .account-mobile-card{animation:parentFadeUp .45s ease both}
@keyframes parentFadeUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes splashPulse{0%,100%{transform:scale(1);opacity:.9}50%{transform:scale(1.08);opacity:1}}
@keyframes dotBounce{0%,80%,100%{transform:translateY(0);opacity:.45}40%{transform:translateY(-7px);opacity:1}}
.role-parent .table-wrap{overflow:hidden}
.role-parent .mobile-card-list{display:grid;gap:12px}
.role-parent .mobile-data-card{background:linear-gradient(180deg,#fff,#fbfdff);border:1px solid rgba(226,232,240,.9);border-radius:22px;padding:14px 14px 15px;box-shadow:0 10px 24px rgba(15,23,42,.05)}
.role-parent .mobile-data-head{display:flex;align-items:flex-start;gap:12px;margin-bottom:10px}
.role-parent .soft-icon{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:15px;background:#eef2ff;color:#4338ca;font-size:18px;flex:0 0 42px}
.role-parent .soft-icon.danger{background:#fee2e2;color:#b91c1c}
.role-parent .mobile-data-head strong{display:block;font-size:15px;line-height:1.35}
.role-parent .mobile-data-head small{display:block;margin-top:2px;color:var(--muted)}
.role-parent .mobile-data-head .badge{margin-left:auto}
.role-parent .mobile-data-meta{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;background:#f8fafc;border-radius:14px;padding:10px 12px;margin-bottom:10px;color:#475569;font-size:12px;font-weight:700}
.role-parent .mobile-data-meta.wrap span{display:inline-flex;align-items:center;gap:5px}
.role-parent .mobile-data-card p{margin:0 0 8px;line-height:1.55;color:#1f2937}
.role-parent .mobile-data-card small{display:block;color:var(--muted);line-height:1.5}
.role-parent .mobile-data-card .actions{margin-top:10px;display:flex;flex-wrap:wrap;gap:8px}
.role-parent .reply-bubble{background:#eef2ff;border-radius:16px;padding:10px 12px;margin:8px 0 0;color:#312e81}
.role-parent .reply-bubble strong{display:block;font-size:12px;margin-bottom:3px}
.role-parent .reply-bubble p{margin:0;color:#312e81}
.role-parent .full-width-form{width:100%}
.role-parent .full-width-form textarea{min-height:84px}
.role-parent .info-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.role-parent .message-card,.role-parent .positive-card,.role-parent .violation-card{position:relative;overflow:hidden}
.role-parent .message-card:after,.role-parent .positive-card:after,.role-parent .violation-card:after{content:"";position:absolute;top:-32px;right:-32px;width:88px;height:88px;border-radius:50%;background:rgba(79,70,229,.05)}
.role-parent .notification-mobile-list{display:grid;gap:12px}
.role-parent .notification-mobile-card{display:flex;gap:12px;align-items:flex-start;border-radius:22px;padding:14px;background:linear-gradient(180deg,#ffffff,#fbfdff);border:1px solid rgba(226,232,240,.9);box-shadow:0 10px 24px rgba(15,23,42,.05)}
.role-parent .notification-mobile-card.unread{border-color:#c7d2fe;background:linear-gradient(180deg,#eef2ff,#ffffff)}
.role-parent .notification-mobile-icon{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:16px;background:#eef2ff;color:#4338ca;font-size:18px;flex:0 0 42px}
.role-parent .notification-mobile-body{min-width:0;flex:1}
.role-parent .notification-mobile-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:4px}
.role-parent .notification-mobile-top strong{font-size:15px}
.role-parent .notification-mobile-top span{font-size:11px;color:var(--muted);white-space:nowrap}
.role-parent .notification-mobile-body small{display:block;color:var(--muted);margin-bottom:6px}
.role-parent .notification-mobile-body p{margin:0 0 10px;line-height:1.5}
.role-parent .account-mobile-card{display:grid;justify-items:center;text-align:center;gap:10px;padding:8px 0 2px}
.role-parent .account-mobile-avatar{display:flex;align-items:center;justify-content:center;width:74px;height:74px;border-radius:24px;background:linear-gradient(135deg,#4f46e5,#06b6d4);color:#fff;font-weight:900;font-size:30px;box-shadow:0 12px 24px rgba(79,70,229,.26)}
.role-parent .account-mobile-card h3{margin:4px 0 0;font-size:22px}
.role-parent .account-mobile-card p{margin:0;color:var(--muted)}
.role-parent .account-mobile-meta{display:grid;gap:10px;width:100%;margin-top:8px}
.role-parent .account-mobile-meta>div{background:#f8fafc;border:1px solid rgba(226,232,240,.8);border-radius:18px;padding:12px}
.role-parent .account-mobile-meta small{display:block;color:var(--muted);margin-bottom:4px}
.role-parent .account-mobile-meta strong{display:block;word-break:break-word}
.role-parent .mobile-form{display:grid;gap:8px}
.role-parent .mobile-form input,.role-parent .mobile-form select,.role-parent .mobile-form textarea{border-radius:14px;padding:12px 14px}
.role-parent .mobile-toast{animation:toastDrop .38s ease both}
@keyframes toastDrop{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
.role-parent .parent-splash-screen{position:fixed;inset:0;z-index:1500;display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg,#4f46e5,#4338ca 58%,#06b6d4);transition:opacity .35s ease,visibility .35s ease}
.role-parent .parent-splash-screen.hide{opacity:0;visibility:hidden;pointer-events:none}
.role-parent .parent-splash-card{text-align:center;color:#fff;padding:26px}
.role-parent .parent-splash-logo{width:88px;height:88px;margin:0 auto 18px;border-radius:30px;display:flex;align-items:center;justify-content:center;font-size:34px;font-weight:900;background:rgba(255,255,255,.18);box-shadow:inset 0 0 0 1px rgba(255,255,255,.16),0 18px 30px rgba(15,23,42,.18);animation:splashPulse 1.8s ease-in-out infinite}
.role-parent .parent-splash-card h2{margin:0 0 6px;font-size:24px;color:#fff}
.role-parent .parent-splash-card p{margin:0;color:rgba(255,255,255,.85)}
.role-parent .parent-splash-dots{display:flex;justify-content:center;gap:8px;margin-top:18px}
.role-parent .parent-splash-dots span{width:10px;height:10px;border-radius:50%;background:#fff;display:block;animation:dotBounce 1.2s infinite}
.role-parent .parent-splash-dots span:nth-child(2){animation-delay:.15s}
.role-parent .parent-splash-dots span:nth-child(3){animation-delay:.3s}
.role-parent .parent-section-card{position:relative;overflow:hidden}
.role-parent .parent-section-card:before{content:"";position:absolute;inset:auto -40px -50px auto;width:120px;height:120px;border-radius:50%;background:rgba(79,70,229,.05)}
.role-parent .parent-card-header{position:relative;z-index:1}
@media(max-width:760px){
  .role-parent .notification-mobile-card{padding:13px}
  .role-parent .notification-mobile-top{display:grid}
  .role-parent .mobile-data-head .badge{margin-left:0}
}

/* Parent UI v3 fixes */
html.parent-splash-seen .parent-splash-screen{display:none!important}
.role-parent .topbar-title p{display:none}


/* ===== PWA unread badge count ===== */
.role-parent .simpes-unread-badge{
  position:absolute;
  top:-6px;
  right:-7px;
  min-width:19px;
  height:19px;
  padding:0 5px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:10px;
  font-weight:900;
  line-height:1;
  border:2px solid #fff;
  box-shadow:0 8px 16px rgba(239,68,68,.35);
  z-index:5;
}
.role-parent .parent-bottom-icon .simpes-unread-badge,
.role-parent .nav-icon .simpes-unread-badge{
  top:-8px;
  right:-8px;
}
.role-parent a[href*="notifications"]{
  position:relative;
}
@media(max-width:520px){
  .role-parent .simpes-unread-badge{
    min-width:18px;
    height:18px;
    font-size:9px;
  }
}

/* ===== Usability and benefit improvements ===== */
.grid.stats.six-stats{grid-template-columns:repeat(6,minmax(0,1fr))}
.compact-filter{grid-template-columns:repeat(2,minmax(160px,1fr));max-width:560px}
.empty-state{padding:16px;border-radius:16px;background:#f8fafc;color:var(--muted);text-align:center;border:1px dashed var(--border)}
.priority-list{display:grid;gap:10px}.priority-item{display:grid;gap:4px;padding:12px;border:1px solid var(--border);border-radius:16px;background:#f8fafc}.priority-item:hover{background:#eef2ff}.priority-item strong{font-size:15px}.mini-list{display:grid;gap:10px}.mini-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--border);border-radius:15px;background:#f8fafc}.mini-item span{color:var(--muted);font-weight:700}.mini-item strong{font-size:18px}.score-pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:800;background:#e5e7eb;color:#374151}.score-1{background:#fee2e2;color:#991b1b}.score-2{background:#fef3c7;color:#92400e}.score-3{background:#dcfce7;color:#166534}.score-4{background:#dbeafe;color:#1e40af}.badge.safe-soft{background:#dcfce7;color:#166534}.attention-card{border-left:5px solid #f59e0b}.info-panel.compact{padding:10px 12px}.stat small{display:block;margin-top:4px;color:var(--muted);line-height:1.35}.btn.full{width:100%;text-align:center}.profile-risk-wrap{display:grid;justify-items:end;gap:6px;text-align:right}.parent-hero h2{font-size:22px!important}.parent-hero p{margin:6px 0 0;color:rgba(255,255,255,.86)}
@media(max-width:1300px){.grid.stats.six-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.grid.stats.six-stats{grid-template-columns:1fr}.compact-filter{grid-template-columns:1fr}.profile-risk-wrap{justify-items:start;text-align:left}}

/* ===== Parent Account typography: GoPay Merchant-like =====
   Typeface approach: rounded modern sans-serif similar to GoPay Merchant UI.
   Size hierarchy follows mobile financial-app typography: clear section titles,
   compact helper text, readable field labels, and bold CTA text.
*/
.role-parent .parent-section-card,
.role-parent .parent-section-card *{
  font-family:"Nunito Sans",Arial,Helvetica,sans-serif;
}
.role-parent .parent-section-card{
  letter-spacing:-.01em;
}
.role-parent .parent-section-card .parent-card-header h2{
  margin:0 0 6px;
  font-size:18px;
  line-height:1.28;
  font-weight:800;
  letter-spacing:-.02em;
}
.role-parent .parent-section-card .parent-card-header p{
  margin:0;
  font-size:13px;
  line-height:1.46;
  font-weight:400;
  letter-spacing:0;
}
.role-parent .account-mobile-card{
  gap:8px;
}
.role-parent .account-mobile-avatar{
  font-size:28px;
  font-weight:800;
  letter-spacing:-.02em;
}
.role-parent .account-mobile-card h3{
  margin:4px 0 0;
  font-size:18px;
  line-height:1.28;
  font-weight:800;
  letter-spacing:-.02em;
}
.role-parent .account-mobile-card p{
  margin:0;
  font-size:13px;
  line-height:1.42;
  font-weight:500;
  letter-spacing:0;
}
.role-parent .account-mobile-meta small{
  display:block;
  margin-bottom:5px;
  font-size:12px;
  line-height:1.35;
  font-weight:600;
  letter-spacing:0;
}
.role-parent .account-mobile-meta strong{
  display:block;
  font-size:14px;
  line-height:1.38;
  font-weight:700;
  letter-spacing:-.01em;
  word-break:break-word;
}
.role-parent .mobile-form label{
  margin:10px 0 4px;
  font-size:13px;
  line-height:1.35;
  font-weight:700;
  letter-spacing:0;
}
.role-parent .mobile-form input,
.role-parent .mobile-form select,
.role-parent .mobile-form textarea{
  font-size:14px;
  line-height:1.42;
  font-weight:500;
  letter-spacing:0;
}
.role-parent .parent-section-card .btn{
  font-size:15px;
  line-height:1.35;
  font-weight:800;
  letter-spacing:-.01em;
}
@media(max-width:520px){
  .role-parent .parent-section-card .parent-card-header h2{font-size:17px}
  .role-parent .account-mobile-card h3{font-size:17px}
  .role-parent .account-mobile-meta strong{font-size:13.5px}
  .role-parent .parent-section-card .btn{font-size:14px}
}

/* ===== Android mobile shell untuk wali kelas dan guru ===== */
.role-mobile-staff .topbar-title span{display:block;color:rgba(255,255,255,.86);font-size:12px;line-height:1.4;margin-top:2px}
.role-mobile-staff .content{padding-bottom:100px}
.role-mobile-staff .table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch}
.role-mobile-staff table{min-width:720px}
.role-mobile-staff .card{margin-bottom:14px}
.role-mobile-staff .card-header{gap:10px}
.role-mobile-staff .filter-form{grid-template-columns:1fr!important}
.role-mobile-staff .form-actions{flex-wrap:wrap}
.role-mobile-staff .form-actions .btn,.role-mobile-staff .actions .btn{flex:1 1 auto}
.role-mobile-staff .btn{min-height:42px}
.role-mobile-staff .parent-bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr))}
.role-mobile-staff .parent-bottom-link span:last-child{line-height:1.1;text-align:center}
.role-mobile-staff .sidebar nav a{min-height:48px}
.role-mobile-staff .topbar + .content .alert:first-child{margin-top:0}
@media(max-width:520px){
  .role-mobile-staff table{min-width:680px}
  .role-mobile-staff .content{padding-left:12px;padding-right:12px}
}

/* Revisi SIPANDU: sidebar hanya teks, bottom menu memakai gaya ikon Menu Cepat, dan pagination data. */
.sidebar nav > a .nav-icon{display:none!important}
.sidebar nav > a{display:block;padding-left:14px}
.role-parent .parent-bottom-icon{background:transparent!important;box-shadow:none!important;width:36px;height:36px;border-radius:14px;overflow:visible;color:inherit}
.parent-bottom-icon .bottom-icon-box{width:34px;height:34px;border-radius:14px;display:flex;align-items:center;justify-content:center;box-shadow:0 5px 12px rgba(15,23,42,.14)}
.parent-bottom-icon .bottom-icon-box svg{width:18px;height:18px;stroke:#fff;stroke-width:2.2;fill:none;stroke-linecap:round;stroke-linejoin:round}
.parent-bottom-icon .bg-blue{background:linear-gradient(135deg,#3B82F6,#1D4ED8)}
.parent-bottom-icon .bg-green{background:linear-gradient(135deg,#22C55E,#15803D)}
.parent-bottom-icon .bg-red{background:linear-gradient(135deg,#EF4444,#B91C1C)}
.parent-bottom-icon .bg-orange{background:linear-gradient(135deg,#F97316,#C2410C)}
.parent-bottom-icon .bg-purple{background:linear-gradient(135deg,#8B5CF6,#6D28D9)}
.parent-bottom-icon .bg-teal{background:linear-gradient(135deg,#14B8A6,#0F766E)}
.role-parent .parent-bottom-link.active .parent-bottom-icon{background:transparent!important;box-shadow:none!important}
.role-parent .parent-bottom-link.active .bottom-icon-box{box-shadow:0 8px 18px rgba(79,70,229,.24);transform:translateY(-1px)}
.sipandu-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:12px;padding:10px 12px;border:1px solid var(--border);border-radius:14px;background:#f8fafc;font-size:13px}
.sipandu-pagination label{display:flex;align-items:center;gap:7px;margin:0;font-size:13px;color:#334155}
.sipandu-pagination select{width:auto;min-width:132px;padding:7px 10px;border-radius:10px;background:#fff}
.sipandu-pagination-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sipandu-page-btn{border:0;border-radius:10px;padding:7px 10px;background:#eef2ff;color:#1e3a8a;font-weight:800;cursor:pointer}
.sipandu-page-btn:disabled{opacity:.45;cursor:not-allowed}
.sipandu-page-info{font-weight:800;color:#334155}
.sipandu-pagination-summary{color:#475569;font-weight:700}
@media (max-width:720px){.sipandu-pagination{align-items:stretch}.sipandu-pagination,.sipandu-pagination-nav{flex-direction:column}.sipandu-pagination label,.sipandu-pagination select,.sipandu-page-btn{width:100%}.sipandu-page-info{text-align:center}}

/* ===== Server-side pagination for large school data ===== */
.server-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:14px 0 2px;padding:12px;border:1px solid var(--border);border-radius:16px;background:#f8fafc;color:var(--muted)}
.server-pagination-info{font-size:13px;font-weight:700;color:#475569}
.server-pagination-size{display:flex;align-items:center;gap:8px;margin:0;font-size:13px;color:#475569}
.server-pagination-size select{min-width:76px;padding:8px 10px;border-radius:12px}
.server-pagination-nav{display:flex;align-items:center;gap:8px;font-size:13px;color:#475569}
.server-pagination .btn.disabled{opacity:.45;pointer-events:none;cursor:not-allowed}
@media(max-width:760px){.server-pagination{display:grid}.server-pagination-size,.server-pagination-nav{justify-content:space-between;width:100%}.server-pagination-nav span{text-align:center;flex:1}}

/* ===== SIPANDU Chat Module ===== */
.chat-page{display:grid;gap:16px}
.chat-start-card .filter-form{align-items:end}
.chat-layout{display:grid;grid-template-columns:320px minmax(0,1fr);min-height:620px;padding:0;overflow:hidden}
.chat-list-panel{border-right:1px solid rgba(226,232,240,.9);background:#f8fafc;display:flex;flex-direction:column;min-height:0}
.chat-panel-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;border-bottom:1px solid rgba(226,232,240,.9);background:#fff}
.chat-panel-title small{color:var(--muted);font-weight:700}
.chat-thread-list{display:grid;gap:8px;padding:12px;overflow:auto;max-height:680px}
.chat-thread-item{display:flex;gap:10px;align-items:center;text-decoration:none;color:var(--text);background:#fff;border:1px solid rgba(226,232,240,.9);border-radius:18px;padding:11px;transition:.2s ease;position:relative}
.chat-thread-item:hover,.chat-thread-item.active{border-color:#c7d2fe;background:#eef2ff;box-shadow:0 8px 20px rgba(79,70,229,.08)}
.chat-avatar{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:15px;background:linear-gradient(135deg,#4f46e5,#06b6d4);color:#fff;font-weight:900;flex:0 0 40px}
.chat-avatar.big{width:48px;height:48px;border-radius:18px;font-size:18px;flex-basis:48px}
.chat-thread-body{display:grid;gap:2px;min-width:0;flex:1}
.chat-thread-body strong,.chat-thread-body small,.chat-thread-body em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-thread-body small{color:var(--muted);font-size:12px}
.chat-thread-body em{font-style:normal;color:#64748b;font-size:12px}
.chat-unread-badge{min-width:22px;height:22px;border-radius:999px;background:#ef4444;color:#fff;font-size:12px;font-weight:900;display:inline-flex;align-items:center;justify-content:center;padding:0 6px}
.chat-room-panel{display:flex;flex-direction:column;min-width:0;background:linear-gradient(180deg,#ffffff,#f8fafc);min-height:620px}
.chat-room-header{display:flex;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid rgba(226,232,240,.9);background:#fff}
.chat-room-header h3{margin:0;font-size:18px}
.chat-room-header p{margin:2px 0 0;color:var(--muted);font-size:13px}
.chat-messages{flex:1;padding:18px;overflow:auto;display:flex;flex-direction:column;gap:10px;background:linear-gradient(180deg,#f8fafc,#eef2ff)}
.chat-date-note{align-self:center;background:rgba(255,255,255,.85);border:1px solid rgba(226,232,240,.9);border-radius:999px;padding:7px 12px;color:#64748b;font-size:12px;font-weight:700}
.chat-bubble-row{display:flex;width:100%}
.chat-bubble-row.me{justify-content:flex-end}
.chat-bubble-row.other{justify-content:flex-start}
.chat-bubble{max-width:min(72%,620px);border-radius:20px;padding:10px 12px;box-shadow:0 8px 20px rgba(15,23,42,.06);border:1px solid rgba(226,232,240,.85);background:#fff;color:#111827}
.chat-bubble-row.me .chat-bubble{background:#4f46e5;color:#fff;border-color:#4f46e5;border-bottom-right-radius:7px}
.chat-bubble-row.other .chat-bubble{border-bottom-left-radius:7px}
.chat-bubble-meta{font-size:11px;font-weight:800;opacity:.72;margin-bottom:4px}
.chat-text{font-size:14px;line-height:1.55;word-break:break-word}
.chat-image{display:block;max-width:260px;max-height:260px;width:auto;height:auto;border-radius:14px;margin:4px 0 7px;object-fit:cover;background:#e5e7eb}
.chat-send-form{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:end;padding:12px;border-top:1px solid rgba(226,232,240,.9);background:#fff;position:relative}
.chat-send-form textarea{min-height:44px;max-height:140px;resize:none;border-radius:18px;padding:12px 14px;line-height:1.4}
.chat-file-btn{width:44px;height:44px;border-radius:16px;background:#eef2ff;color:#4338ca;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:24px;cursor:pointer;border:1px solid #c7d2fe}
.chat-file-btn input{display:none}
.chat-file-name{grid-column:2/4;color:#64748b;font-size:12px;margin-top:-4px}
.chat-empty-room{min-height:520px;display:grid;place-content:center;text-align:center;color:#64748b;padding:24px}
.chat-empty-room h3{margin:8px 0 4px;color:#111827}
.chat-empty-room p{margin:0}
.chat-empty-icon{width:74px;height:74px;border-radius:28px;background:#eef2ff;color:#4338ca;display:flex;align-items:center;justify-content:center;font-size:34px;margin:0 auto}
.role-parent .parent-bottom-nav{grid-template-columns:repeat(auto-fit,minmax(48px,1fr))}
.role-parent .parent-bottom-link{min-width:0}
.role-parent .parent-bottom-link span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
@media(max-width:900px){
  .chat-layout{grid-template-columns:1fr;min-height:0}
  .chat-list-panel{border-right:0;border-bottom:1px solid rgba(226,232,240,.9);max-height:260px}
  .chat-thread-list{max-height:210px}
  .chat-room-panel{min-height:560px}
}
@media(max-width:560px){
  .chat-layout{border-radius:20px}
  .chat-start-card .filter-form{grid-template-columns:1fr}
  .chat-room-header{padding:13px}
  .chat-room-header h3{font-size:16px}
  .chat-messages{padding:12px;min-height:390px}
  .chat-bubble{max-width:86%;padding:9px 11px}
  .chat-image{max-width:210px;max-height:210px}
  .chat-send-form{grid-template-columns:40px minmax(0,1fr) auto;padding:9px;gap:7px}
  .chat-file-btn{width:40px;height:40px;border-radius:14px}
  .chat-send-form .btn{padding:10px 12px}
}
.chat-start-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.chat-start-grid h3{margin:0 0 10px;font-size:16px;color:#0f172a}
.chat-help-text{margin:8px 0 0;color:#64748b;font-size:13px;line-height:1.5}
.chat-avatar.group{background:linear-gradient(135deg,#16a34a,#0ea5e9)}
@media(max-width:760px){.chat-start-grid{grid-template-columns:1fr}}

/* ===== Revisi Chat Akun Orang Tua: pilihan chat dulu, ruang chat full-screen ===== */
.chat-mobile-topbar{display:flex;align-items:center;gap:12px;padding:12px 14px;background:#fff;border:1px solid rgba(226,232,240,.9);border-radius:22px;box-shadow:0 10px 24px rgba(15,23,42,.07);position:sticky;top:8px;z-index:60}
.chat-back-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:15px;background:#eef2ff;color:#4338ca;font-size:32px;line-height:1;font-weight:900;text-decoration:none;flex:0 0 40px}
.chat-mobile-title{display:grid;gap:2px;min-width:0}
.chat-mobile-title strong{font-size:17px;color:#0f172a}
.chat-mobile-title small{font-size:12px;color:#64748b;font-weight:700}
.chat-choice-shell{display:grid;gap:14px}
.chat-choice-intro{margin:0}
.chat-choice-intro h2{margin:0 0 6px;font-size:20px}
.chat-choice-intro p{margin:0;color:#64748b;line-height:1.5}
.chat-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.chat-choice-form{min-width:0}
.chat-choice-card{height:100%;display:grid;grid-template-rows:auto 1fr auto;gap:12px;background:#fff;border:1px solid rgba(226,232,240,.95);border-radius:24px;padding:16px;box-shadow:0 12px 28px rgba(15,23,42,.07)}
.chat-choice-card.group{background:linear-gradient(180deg,#f0fdf4,#ffffff)}
.chat-choice-card.disabled{opacity:.72;background:#f8fafc;box-shadow:none}
.chat-choice-icon{width:48px;height:48px;border-radius:18px;display:flex;align-items:center;justify-content:center;font-weight:900;color:#fff;background:linear-gradient(135deg,#4f46e5,#06b6d4);box-shadow:0 10px 20px rgba(79,70,229,.18)}
.chat-choice-icon.bk{background:linear-gradient(135deg,#f97316,#dc2626)}
.chat-choice-icon.group{background:linear-gradient(135deg,#16a34a,#0ea5e9)}
.chat-choice-body{display:grid;gap:7px;align-content:start}
.chat-choice-body h3{margin:0;font-size:17px;color:#0f172a}
.chat-choice-body p{margin:0;color:#64748b;font-size:13px;line-height:1.5}
.chat-choice-body label{margin:4px 0 0}
.chat-choice-body small{display:block;color:#475569;font-weight:700;line-height:1.45}
.chat-choice-button{width:100%;min-height:42px}
.chat-layout-room-only{grid-template-columns:1fr;width:100%;min-width:0}
.chat-layout-room-only .chat-room-panel{width:100%;min-width:0}
.role-parent.parent-chat-room-open .topbar,
.role-parent.parent-chat-room-open .parent-bottom-nav{display:none!important}
.role-parent.parent-chat-room-open .main{padding-bottom:0!important}
.role-parent.parent-chat-room-open .content{padding:0!important}
.role-parent.parent-chat-room-open .chat-page{height:100dvh;min-height:100vh;gap:0;background:#f8fafc;overflow:hidden}
.role-parent.parent-chat-room-open .chat-mobile-topbar{position:fixed;top:0;left:0;right:0;border-radius:0;border-left:0;border-right:0;border-top:0;height:58px;padding:9px 12px;z-index:90}
.role-parent.parent-chat-room-open .chat-back-btn{width:38px;height:38px;flex-basis:38px;border-radius:14px}
.role-parent.parent-chat-room-open .chat-layout-room-only{height:calc(100dvh - 58px);min-height:0;margin-top:58px;border:0;border-radius:0;box-shadow:none;padding:0;overflow:hidden;background:#fff}
.role-parent.parent-chat-room-open .chat-room-panel{height:100%;min-height:0;background:#fff;display:flex;flex-direction:column}
.role-parent.parent-chat-room-open .chat-room-header{flex:0 0 auto;position:relative;z-index:20;padding:12px 14px;background:#fff}
.role-parent.parent-chat-room-open .chat-messages{flex:1 1 auto;min-height:0;height:auto;overflow-y:auto;overflow-x:hidden;padding:14px;background:linear-gradient(180deg,#f8fafc,#eef2ff);-webkit-overflow-scrolling:touch}
.role-parent.parent-chat-room-open .chat-send-form{flex:0 0 auto;position:sticky;bottom:0;z-index:35;background:#fff;border-top:1px solid rgba(226,232,240,.95);padding:10px 12px calc(10px + env(safe-area-inset-bottom));grid-template-columns:44px minmax(0,1fr) auto;box-shadow:0 -8px 22px rgba(15,23,42,.07)}
.role-parent.parent-chat-room-open .chat-send-form textarea{min-height:44px;max-height:120px}
.role-parent.parent-chat-room-open .chat-file-name{grid-column:2/4;margin-top:-2px}
@media(max-width:980px){.chat-choice-grid{grid-template-columns:1fr}}
@media(max-width:560px){.chat-mobile-topbar{border-radius:18px}.chat-choice-card{border-radius:22px;padding:14px}.chat-choice-body h3{font-size:16px}.role-parent.parent-chat-room-open .chat-room-header h3{font-size:15px}.role-parent.parent-chat-room-open .chat-room-header p{font-size:12px}.role-parent.parent-chat-room-open .chat-bubble{max-width:88%}.role-parent.parent-chat-room-open .chat-send-form{grid-template-columns:40px minmax(0,1fr) auto;gap:7px}.role-parent.parent-chat-room-open .chat-file-btn{width:40px;height:40px}.role-parent.parent-chat-room-open .chat-send-form .btn{padding:10px 12px}}

/* ===== Revisi 2 Chat Orang Tua: footer chat statis, hanya isi pesan yang scroll ===== */
body.role-parent.parent-chat-room-open{
  height:100dvh!important;
  min-height:100dvh!important;
  overflow:hidden!important;
  overscroll-behavior:none;
  position:fixed;
  inset:0;
  width:100%;
}
.role-parent.parent-chat-room-open .app,
.role-parent.parent-chat-room-open .main,
.role-parent.parent-chat-room-open .content{
  height:100dvh!important;
  min-height:0!important;
  overflow:hidden!important;
}
.role-parent.parent-chat-room-open .chat-page{
  position:fixed;
  inset:0;
  height:100dvh!important;
  min-height:0!important;
  overflow:hidden!important;
  display:block;
  background:#f8fafc;
}
.role-parent.parent-chat-room-open .chat-mobile-topbar{
  position:absolute!important;
  top:0;
  left:0;
  right:0;
  height:58px;
  margin:0;
}
.role-parent.parent-chat-room-open .chat-layout-room-only{
  position:absolute;
  top:58px;
  right:0;
  bottom:0;
  left:0;
  height:auto!important;
  min-height:0!important;
  margin:0!important;
  display:flex!important;
  flex-direction:column;
  overflow:hidden!important;
}
.role-parent.parent-chat-room-open .chat-room-panel{
  flex:1 1 auto;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
}
.role-parent.parent-chat-room-open .chat-room-header{
  flex:0 0 auto!important;
  position:relative!important;
  top:auto!important;
  bottom:auto!important;
}
.role-parent.parent-chat-room-open .chat-messages{
  flex:1 1 auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
}
.role-parent.parent-chat-room-open .chat-send-form{
  flex:0 0 auto!important;
  position:relative!important;
  left:auto!important;
  right:auto!important;
  bottom:auto!important;
  width:100%!important;
  margin:0!important;
  transform:none!important;
  z-index:40;
  background:#fff;
}
.role-parent.parent-chat-room-open .chat-file-btn,
.role-parent.parent-chat-room-open .chat-send-form textarea,
.role-parent.parent-chat-room-open .chat-send-form .btn{
  flex-shrink:0;
}


/* ===== Revisi 3 Chat Orang Tua: header dan composer benar-benar fixed, hanya isi chat yang scroll ===== */
body.role-parent.parent-chat-room-open{
  --chat-topbar-height:58px;
  --chat-composer-height:76px;
  width:100%!important;
  height:100dvh!important;
  min-height:100dvh!important;
  overflow:hidden!important;
  position:fixed!important;
  inset:0!important;
  overscroll-behavior:none!important;
  touch-action:manipulation;
}
.role-parent.parent-chat-room-open .app,
.role-parent.parent-chat-room-open .main,
.role-parent.parent-chat-room-open .content,
.role-parent.parent-chat-room-open .chat-page{
  width:100%!important;
  height:100dvh!important;
  min-height:0!important;
  max-height:100dvh!important;
  overflow:hidden!important;
}
.role-parent.parent-chat-room-open .chat-page{
  position:fixed!important;
  inset:0!important;
  display:block!important;
  background:#f8fafc!important;
}
.role-parent.parent-chat-room-open .chat-mobile-topbar{
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:0!important;
  height:var(--chat-topbar-height)!important;
  min-height:var(--chat-topbar-height)!important;
  margin:0!important;
  border-radius:0!important;
  z-index:1000!important;
  box-sizing:border-box!important;
}
.role-parent.parent-chat-room-open .chat-layout-room-only{
  position:fixed!important;
  top:var(--chat-topbar-height)!important;
  left:0!important;
  right:0!important;
  bottom:var(--chat-composer-height)!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  display:block!important;
  overflow:hidden!important;
  background:#fff!important;
}
.role-parent.parent-chat-room-open .chat-room-panel{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  background:#fff!important;
}
.role-parent.parent-chat-room-open .chat-room-header{
  flex:0 0 auto!important;
  position:relative!important;
  z-index:20!important;
  margin:0!important;
  background:#fff!important;
  border-bottom:1px solid rgba(226,232,240,.95)!important;
}
.role-parent.parent-chat-room-open .chat-messages{
  flex:1 1 auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior:contain!important;
  padding-bottom:18px!important;
}
.role-parent.parent-chat-room-open .chat-send-form{
  position:fixed!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:100%!important;
  min-height:var(--chat-composer-height)!important;
  margin:0!important;
  z-index:1001!important;
  box-sizing:border-box!important;
  background:#fff!important;
  border-top:1px solid rgba(226,232,240,.95)!important;
  box-shadow:0 -10px 26px rgba(15,23,42,.10)!important;
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr) auto!important;
  gap:8px!important;
  align-items:end!important;
  padding:10px 12px calc(10px + env(safe-area-inset-bottom))!important;
  transform:none!important;
}
.role-parent.parent-chat-room-open .chat-file-btn{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  align-self:end!important;
}
.role-parent.parent-chat-room-open .chat-send-form textarea{
  width:100%!important;
  min-height:44px!important;
  max-height:96px!important;
  overflow-y:auto!important;
  align-self:end!important;
}
.role-parent.parent-chat-room-open .chat-send-form .btn{
  min-height:44px!important;
  align-self:end!important;
  white-space:nowrap!important;
}
.role-parent.parent-chat-room-open .chat-file-name{
  grid-column:2 / 4!important;
  margin:0!important;
  min-height:0!important;
  line-height:1.25!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
@media(max-width:560px){
  body.role-parent.parent-chat-room-open{
    --chat-topbar-height:58px;
    --chat-composer-height:74px;
  }
  .role-parent.parent-chat-room-open .chat-send-form{
    grid-template-columns:40px minmax(0,1fr) auto!important;
    gap:7px!important;
    padding:9px 10px calc(9px + env(safe-area-inset-bottom))!important;
  }
  .role-parent.parent-chat-room-open .chat-file-btn{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
  }
  .role-parent.parent-chat-room-open .chat-send-form textarea,
  .role-parent.parent-chat-room-open .chat-send-form .btn{
    min-height:40px!important;
  }
}


/* ===== Revisi 4 Chat Orang Tua: composer seperti footer beranda, pesan terakhir tidak tertutup ===== */
body.role-parent.parent-chat-room-open{
  --chat-topbar-height:58px;
  --chat-composer-height:78px;
  height:100dvh!important;
  min-height:100dvh!important;
  max-height:100dvh!important;
  width:100%!important;
  overflow:hidden!important;
  position:fixed!important;
  inset:0!important;
}
.role-parent.parent-chat-room-open .topbar,
.role-parent.parent-chat-room-open .parent-bottom-nav{
  display:none!important;
}
.role-parent.parent-chat-room-open .app,
.role-parent.parent-chat-room-open .main,
.role-parent.parent-chat-room-open .content,
.role-parent.parent-chat-room-open .chat-page{
  width:100%!important;
  height:100dvh!important;
  min-height:0!important;
  max-height:100dvh!important;
  overflow:hidden!important;
  padding:0!important;
  margin:0!important;
}
.role-parent.parent-chat-room-open .chat-page{
  position:fixed!important;
  inset:0!important;
  display:block!important;
  background:#f8fafc!important;
}
.role-parent.parent-chat-room-open .chat-mobile-topbar{
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:0!important;
  height:var(--chat-topbar-height)!important;
  min-height:var(--chat-topbar-height)!important;
  margin:0!important;
  padding:9px 12px!important;
  border-radius:0!important;
  border-left:0!important;
  border-right:0!important;
  border-top:0!important;
  z-index:1200!important;
  box-sizing:border-box!important;
}
.role-parent.parent-chat-room-open .chat-layout-room-only{
  position:fixed!important;
  top:var(--chat-topbar-height)!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  display:block!important;
  overflow:hidden!important;
  background:#fff!important;
}
.role-parent.parent-chat-room-open .chat-room-panel{
  position:relative!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  background:#fff!important;
  padding-bottom:var(--chat-composer-height)!important;
  box-sizing:border-box!important;
}
.role-parent.parent-chat-room-open .chat-room-header{
  flex:0 0 auto!important;
  position:relative!important;
  z-index:30!important;
  margin:0!important;
  background:#fff!important;
  border-bottom:1px solid rgba(226,232,240,.95)!important;
}
.role-parent.parent-chat-room-open .chat-messages{
  flex:1 1 auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior:contain!important;
  padding:14px 14px calc(var(--chat-composer-height) + 22px)!important;
  scroll-padding-bottom:calc(var(--chat-composer-height) + 22px)!important;
  box-sizing:border-box!important;
}
.role-parent.parent-chat-room-open .chat-messages::after{
  content:"";
  display:block;
  flex:0 0 calc(var(--chat-composer-height) + 10px);
  height:calc(var(--chat-composer-height) + 10px);
}
.role-parent.parent-chat-room-open .chat-send-form{
  position:fixed!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:100%!important;
  min-height:var(--chat-composer-height)!important;
  margin:0!important;
  z-index:1201!important;
  box-sizing:border-box!important;
  background:#fff!important;
  border-top:1px solid rgba(226,232,240,.95)!important;
  border-radius:0!important;
  box-shadow:0 -10px 28px rgba(15,23,42,.12)!important;
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr) auto!important;
  gap:8px!important;
  align-items:end!important;
  padding:10px 12px calc(10px + env(safe-area-inset-bottom))!important;
  transform:none!important;
}
.role-parent.parent-chat-room-open .chat-file-btn{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  align-self:end!important;
  margin:0!important;
}
.role-parent.parent-chat-room-open .chat-send-form textarea{
  width:100%!important;
  min-height:44px!important;
  max-height:96px!important;
  overflow-y:auto!important;
  align-self:end!important;
  margin:0!important;
}
.role-parent.parent-chat-room-open .chat-send-form .btn{
  min-height:44px!important;
  align-self:end!important;
  white-space:nowrap!important;
  margin:0!important;
}
.role-parent.parent-chat-room-open .chat-file-name{
  grid-column:2 / 4!important;
  min-height:0!important;
  max-height:18px!important;
  margin:0!important;
  line-height:1.25!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
@media(max-width:560px){
  body.role-parent.parent-chat-room-open{
    --chat-topbar-height:58px;
    --chat-composer-height:76px;
  }
  .role-parent.parent-chat-room-open .chat-send-form{
    grid-template-columns:40px minmax(0,1fr) auto!important;
    gap:7px!important;
    padding:9px 10px calc(9px + env(safe-area-inset-bottom))!important;
  }
  .role-parent.parent-chat-room-open .chat-file-btn{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
  }
  .role-parent.parent-chat-room-open .chat-send-form textarea,
  .role-parent.parent-chat-room-open .chat-send-form .btn{
    min-height:40px!important;
  }
}

/* ===== Revisi 5 Chat Orang Tua: composer bawah dipaksa terlihat dan pesan saja yang scroll ===== */
body.role-parent.parent-chat-room-open{
  --chat-topbar-height:58px;
  --chat-room-header-height:72px;
  --chat-composer-height:76px;
  --chat-composer-bottom:8px;
  height:100vh!important;
  height:100dvh!important;
  min-height:100vh!important;
  min-height:100dvh!important;
  max-height:100vh!important;
  max-height:100dvh!important;
  width:100%!important;
  overflow:hidden!important;
  position:static!important;
}
.role-parent.parent-chat-room-open .topbar,
.role-parent.parent-chat-room-open .parent-bottom-nav{
  display:none!important;
}
.role-parent.parent-chat-room-open .app,
.role-parent.parent-chat-room-open .main,
.role-parent.parent-chat-room-open .content,
.role-parent.parent-chat-room-open .chat-page{
  width:100%!important;
  height:100vh!important;
  height:100dvh!important;
  min-height:0!important;
  max-height:100vh!important;
  max-height:100dvh!important;
  padding:0!important;
  margin:0!important;
  overflow:hidden!important;
}
.role-parent.parent-chat-room-open .chat-page{
  position:fixed!important;
  inset:0!important;
  display:block!important;
  background:#fff!important;
  z-index:1000!important;
}
.role-parent.parent-chat-room-open .chat-mobile-topbar{
  position:absolute!important;
  top:0!important;
  left:0!important;
  right:0!important;
  height:var(--chat-topbar-height)!important;
  min-height:var(--chat-topbar-height)!important;
  margin:0!important;
  padding:9px 12px!important;
  border-radius:0!important;
  border:0!important;
  border-bottom:1px solid rgba(226,232,240,.95)!important;
  box-shadow:0 8px 18px rgba(15,23,42,.06)!important;
  z-index:30!important;
  box-sizing:border-box!important;
}
.role-parent.parent-chat-room-open .chat-back-btn{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  flex-basis:38px!important;
  border-radius:14px!important;
}
.role-parent.parent-chat-room-open .chat-layout-room-only{
  position:absolute!important;
  top:var(--chat-topbar-height)!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:hidden!important;
  background:#fff!important;
  display:block!important;
}
.role-parent.parent-chat-room-open .chat-room-panel{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  display:block!important;
  overflow:hidden!important;
  background:#fff!important;
  padding:0!important;
  box-sizing:border-box!important;
}
.role-parent.parent-chat-room-open .chat-room-header{
  position:absolute!important;
  top:0!important;
  left:0!important;
  right:0!important;
  height:var(--chat-room-header-height)!important;
  min-height:var(--chat-room-header-height)!important;
  max-height:var(--chat-room-header-height)!important;
  margin:0!important;
  padding:12px 14px!important;
  z-index:20!important;
  background:#fff!important;
  border-bottom:1px solid rgba(226,232,240,.95)!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
.role-parent.parent-chat-room-open .chat-room-header .chat-avatar.big{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  flex-basis:42px!important;
  border-radius:15px!important;
}
.role-parent.parent-chat-room-open .chat-room-header h3{
  font-size:15px!important;
  line-height:1.2!important;
  margin:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.role-parent.parent-chat-room-open .chat-room-header p{
  font-size:12px!important;
  line-height:1.25!important;
  margin:2px 0 0!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.role-parent.parent-chat-room-open .chat-messages{
  position:absolute!important;
  top:var(--chat-room-header-height)!important;
  left:0!important;
  right:0!important;
  bottom:calc(var(--chat-composer-height) + 22px)!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior:contain!important;
  background:linear-gradient(180deg,#f8fafc,#eef2ff)!important;
  padding:14px 14px 24px!important;
  scroll-padding-bottom:24px!important;
  box-sizing:border-box!important;
}
.role-parent.parent-chat-room-open .chat-messages::after{
  content:""!important;
  display:block!important;
  flex:0 0 22px!important;
  height:22px!important;
}
.role-parent.parent-chat-room-open .chat-send-form{
  position:absolute!important;
  left:8px!important;
  right:8px!important;
  bottom:max(8px, env(safe-area-inset-bottom))!important;
  width:auto!important;
  min-height:var(--chat-composer-height)!important;
  max-height:calc(var(--chat-composer-height) + 42px)!important;
  margin:0!important;
  z-index:50!important;
  box-sizing:border-box!important;
  background:#fff!important;
  border:1px solid rgba(226,232,240,.98)!important;
  border-radius:24px!important;
  box-shadow:0 -10px 30px rgba(15,23,42,.16)!important;
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr) auto!important;
  gap:8px!important;
  align-items:end!important;
  padding:10px 10px!important;
  transform:none!important;
}
.role-parent.parent-chat-room-open .chat-file-btn{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  align-self:end!important;
  margin:0!important;
  border-radius:16px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  visibility:visible!important;
  opacity:1!important;
}
.role-parent.parent-chat-room-open .chat-send-form textarea{
  width:100%!important;
  min-height:44px!important;
  max-height:92px!important;
  overflow-y:auto!important;
  align-self:end!important;
  margin:0!important;
  resize:none!important;
  visibility:visible!important;
  opacity:1!important;
}
.role-parent.parent-chat-room-open .chat-send-form .btn{
  min-height:44px!important;
  align-self:end!important;
  white-space:nowrap!important;
  margin:0!important;
  visibility:visible!important;
  opacity:1!important;
}
.role-parent.parent-chat-room-open .chat-file-name{
  grid-column:2 / 4!important;
  min-height:0!important;
  max-height:18px!important;
  margin:0!important;
  line-height:1.25!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

.sidebar-submenu {
    margin: 4px 0;
}

.sidebar-submenu summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 14px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: #475569;
}

.sidebar-submenu summary::-webkit-details-marker {
    display: none;
}

.sidebar-submenu summary::after {
    content: "⌄";
    margin-left: auto;
    font-size: 13px;
    transition: transform .2s ease;
}

.sidebar-submenu[open] summary::after {
    transform: rotate(180deg);
}

.sidebar-submenu summary.active,
.sidebar-submenu summary:hover {
    background: rgba(79, 70, 229, 0.10);
    color: #4f46e5;
}

.sidebar-submenu-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 5px;
    margin-left: 38px;
    padding-left: 10px;
    border-left: 2px solid rgba(79, 70, 229, 0.15);
}

.sidebar-submenu-items a {
    padding: 9px 12px !important;
    border-radius: 12px;
    font-size: 13px !important;
    color: #64748b;
}

.sidebar-submenu-items a.active,
.sidebar-submenu-items a:hover {
    background: rgba(79, 70, 229, 0.10);
    color: #4f46e5;
    font-weight: 700;
}

@media(max-width:560px){
  body.role-parent.parent-chat-room-open{
    --chat-topbar-height:58px;
    --chat-room-header-height:68px;
    --chat-composer-height:74px;
  }
  .role-parent.parent-chat-room-open .chat-send-form{
    left:8px!important;
    right:8px!important;
    grid-template-columns:40px minmax(0,1fr) auto!important;
    gap:7px!important;
    padding:9px 9px!important;
    border-radius:22px!important;
  }
  .role-parent.parent-chat-room-open .chat-file-btn{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
  }
  .role-parent.parent-chat-room-open .chat-send-form textarea,
  .role-parent.parent-chat-room-open .chat-send-form .btn{
    min-height:40px!important;
  }
  .role-parent.parent-chat-room-open .chat-send-form .btn{
    padding:10px 11px!important;
  }
}


/* ===== Revisi 6 Chat Orang Tua: hapus header ruang chat + composer naik sedikit ===== */
body.role-parent.parent-chat-room-open{
  --chat-room-header-height:0px!important;
  --chat-composer-safe-bottom:24px;
}
.role-parent.parent-chat-room-open .chat-room-header{
  display:none!important;
  height:0!important;
  min-height:0!important;
  max-height:0!important;
  padding:0!important;
  border:0!important;
  overflow:hidden!important;
}
.role-parent.parent-chat-room-open .chat-messages{
  top:0!important;
  bottom:calc(var(--chat-composer-height) + var(--chat-composer-safe-bottom) + 18px)!important;
  padding-bottom:42px!important;
  scroll-padding-bottom:42px!important;
}
.role-parent.parent-chat-room-open .chat-messages::after{
  flex-basis:34px!important;
  height:34px!important;
}
.role-parent.parent-chat-room-open .chat-send-form{
  bottom:calc(max(14px, env(safe-area-inset-bottom)) + 10px)!important;
}

.role-parent .grid.stats.parent-violations-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* Supaya di HP tetap 2 kolom */
@media (max-width: 520px) {
    .role-parent .grid.stats.parent-violations-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .role-parent .parent-violations-stats .stat-parent {
        padding: 12px;
        border-radius: 16px;
    }

    .role-parent .parent-violations-stats .stat-parent strong {
        font-size: 22px;
    }

    .role-parent .parent-violations-stats .stat-parent span,
    .role-parent .parent-violations-stats .stat-parent small {
        font-size: 11px;
    }
}
@media(max-width:560px){
  body.role-parent.parent-chat-room-open{
    --chat-room-header-height:0px!important;
    --chat-composer-safe-bottom:30px;
  }
  .role-parent.parent-chat-room-open .chat-send-form{
    bottom:calc(max(16px, env(safe-area-inset-bottom)) + 12px)!important;
  }
  .role-parent.parent-chat-room-open .chat-messages{
    bottom:calc(var(--chat-composer-height) + var(--chat-composer-safe-bottom) + 18px)!important;
    padding-bottom:48px!important;
  }
}

/* =========================================================
   SIPANDU FONT FIX - Semua huruf menggunakan Nunito Sans
   Tujuan: menyamakan tampilan font di Chrome PC Mobile Viewer,
   Chrome Android, dan browser mobile lain.
   Letakkan blok ini tetap di PALING BAWAH file CSS.
   ========================================================= */

:root{
  --sipandu-font:"Nunito Sans", Arial, Helvetica, sans-serif;
}

html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  font-family:var(--sipandu-font);
}

body{
  font-family:var(--sipandu-font) !important;
  font-size:15px;
  line-height:1.5;
  letter-spacing:-.005em;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}

body *,
body *::before,
body *::after{
  font-family:var(--sipandu-font) !important;
}

button,
input,
select,
textarea,
table,
th,
td,
.btn,
.badge,
.pwa-install-btn{
  font-family:var(--sipandu-font) !important;
}

button,
input,
select,
textarea{
  font-size:14px;
  line-height:1.45;
}

nav a,
label,
.btn,
.badge,
.pwa-install-btn,
.parent-bottom-link{
  font-weight:700 !important;
}

strong,
b,
.logo,
.topbar h1,
.card h2,
.stat strong,
.parent-hero h2,
.role-parent .account-mobile-avatar,
.role-parent .account-mobile-card h3,
.role-parent .parent-card-header h2{
  font-weight:800 !important;
}

.role-parent,
.role-staff,
.role-mobile-staff,
.role-parent *,
.role-staff *,
.role-mobile-staff *{
  font-family:var(--sipandu-font) !important;
}

.topbar h1{
  line-height:1.18;
  letter-spacing:-.02em;
}

.topbar p,
.card p,
small,
.help,
.help-text{
  line-height:1.45;
  letter-spacing:0;
}

.role-parent .topbar h1{
  font-size:20px;
  font-weight:800 !important;
}

.role-parent .topbar p{
  font-size:12px;
  font-weight:600;
}

.role-parent .parent-hero h2{
  font-size:22px !important;
  line-height:1.15;
  letter-spacing:-.025em;
  font-weight:800 !important;
}

.role-parent .parent-hero p,
.role-parent .hero-pill,
.role-parent .stat span,
.role-parent .stat small{
  font-weight:600;
}

.role-parent .stat strong{
  line-height:1.1;
  letter-spacing:-.025em;
  font-weight:800 !important;
}

.role-parent .parent-bottom-link{
  font-size:11px;
  line-height:1.15;
  font-weight:700 !important;
  letter-spacing:-.005em;
}

.role-parent .parent-bottom-link span:last-child{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.role-parent .parent-section-card,
.role-parent .parent-section-card *,
.role-parent .account-mobile-card,
.role-parent .account-mobile-card *{
  font-family:var(--sipandu-font) !important;
}

.role-parent .account-mobile-card h3{
  font-size:18px;
  line-height:1.25;
  font-weight:800 !important;
}

.role-parent .account-mobile-meta strong{
  font-size:14px;
  line-height:1.38;
  font-weight:700 !important;
}

.role-mobile-staff .topbar-title span{
  font-size:12px;
  line-height:1.4;
  font-weight:600;
}

.role-mobile-staff .card h2{
  font-size:18px;
  line-height:1.25;
  font-weight:800 !important;
}

.role-mobile-staff th,
.role-mobile-staff td{
  font-size:13px;
  line-height:1.45;
}

@media(max-width:520px){
  body{
    font-size:14px;
  }

  .topbar h1{
    font-size:20px;
  }

  .card h2{
    font-size:18px;
  }

  .stat strong{
    font-size:32px;
  }

  .role-parent .parent-hero h2{
    font-size:21px !important;
  }

  .role-parent .parent-bottom-link{
    font-size:10.5px;
  }
}
