:root{--bg:#f4f7fb;--card:#fff;--primary:#2563eb;--primary2:#7c3aed;--dark:#0f172a;--muted:#64748b;--border:#e2e8f0;--success:#16a34a;--danger:#dc2626;--warning:#f59e0b}
*{box-sizing:border-box} body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:#1e293b}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at top left,#dbeafe,transparent 35%),linear-gradient(135deg,#0f172a,#1d4ed8)}.login-card{width:390px;background:rgba(255,255,255,.96);padding:34px;border-radius:28px;box-shadow:0 25px 80px rgba(15,23,42,.35)}.brand{text-align:center}.brand .logo{width:68px;height:68px;border-radius:20px;background:linear-gradient(135deg,var(--primary),var(--primary2));color:white;display:inline-flex;align-items:center;justify-content:center;font-weight:800;font-size:26px}.brand h1{font-size:22px;margin:14px 0 4px}.brand p{color:var(--muted);margin:0 0 20px}.form-group{margin-bottom:14px}.form-label{display:block;font-weight:700;margin-bottom:7px}.form-control,.form-select{width:100%;padding:12px 13px;border:1px solid var(--border);border-radius:14px;background:white;font-size:14px;outline:none}.form-control:focus,.form-select:focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(37,99,235,.12)}.btn{border:0;border-radius:13px;padding:11px 16px;font-weight:800;cursor:pointer;text-decoration:none;display:inline-flex;gap:8px;align-items:center;justify-content:center}.btn-primary{background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff}.btn-light{background:#eef2ff;color:#1e40af}.btn-danger{background:#fee2e2;color:#991b1b}.btn-success{background:#dcfce7;color:#166534}.btn-warning{background:#fef3c7;color:#92400e}.w-100{width:100%}.app{display:flex;min-height:100vh}.sidebar{width:282px;background:#08111f;color:white;padding:22px 16px;position:fixed;inset:0 auto 0 0;overflow:auto}.side-brand{display:flex;gap:12px;align-items:center;padding:8px 10px 20px;border-bottom:1px solid rgba(255,255,255,.1);margin-bottom:12px}.side-logo{width:44px;height:44px;border-radius:14px;background:linear-gradient(135deg,#38bdf8,#8b5cf6);display:flex;align-items:center;justify-content:center;font-weight:900}.side-brand b{display:block}.side-brand small{color:#94a3b8}.nav a{display:flex;gap:10px;align-items:center;color:#cbd5e1;text-decoration:none;padding:11px 12px;border-radius:14px;margin:4px 0;font-weight:650}.nav a:hover,.nav a.active{background:linear-gradient(135deg,rgba(37,99,235,.9),rgba(124,58,237,.9));color:white}.main{margin-left:282px;width:calc(100% - 282px)}.topbar{height:72px;background:white;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 26px;position:sticky;top:0;z-index:5}.topbar h2{font-size:20px;margin:0}.content{padding:26px}.grid{display:grid;gap:18px}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.card{background:var(--card);border:1px solid var(--border);border-radius:22px;padding:22px;box-shadow:0 14px 36px rgba(15,23,42,.06)}.stat{display:flex;justify-content:space-between;align-items:center}.stat .icon{width:50px;height:50px;border-radius:16px;background:#eff6ff;color:var(--primary);display:flex;align-items:center;justify-content:center;font-size:24px}.stat h3{margin:0;font-size:28px}.stat p{margin:6px 0 0;color:var(--muted)}.table-wrap{overflow:auto;border-radius:18px;border:1px solid var(--border)}table{width:100%;border-collapse:collapse;background:white}th,td{padding:12px 14px;border-bottom:1px solid var(--border);text-align:left;vertical-align:middle}th{background:#f8fafc;color:#334155;font-size:13px;text-transform:uppercase;letter-spacing:.04em}tr:hover td{background:#f9fbff}.actions{display:flex;gap:8px}.alert{padding:13px 15px;border-radius:14px;margin-bottom:15px;font-weight:700}.alert-success{background:#dcfce7;color:#166534}.alert-danger{background:#fee2e2;color:#991b1b}.alert-warning{background:#fef3c7;color:#92400e}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.tab{padding:10px 14px;border-radius:999px;background:#e2e8f0;color:#334155;text-decoration:none;font-weight:800}.tab.active{background:linear-gradient(135deg,var(--primary),var(--primary2));color:white}.badge{display:inline-block;padding:5px 9px;border-radius:999px;font-weight:800;font-size:12px}.badge-success{background:#dcfce7;color:#166534}.badge-muted{background:#e2e8f0;color:#475569}.text-muted{color:var(--muted)}.mb-2{margin-bottom:12px}.mb-3{margin-bottom:18px}.d-flex{display:flex}.justify-between{justify-content:space-between}.align-center{align-items:center}.gap-2{gap:10px}.footer-note{color:#94a3b8;text-align:center;margin-top:16px;font-size:12px}@media(max-width:950px){.sidebar{position:relative;width:100%;height:auto}.app{display:block}.main{margin-left:0;width:100%}.grid-4,.grid-2{grid-template-columns:1fr}.topbar{position:relative}.content{padding:16px}}
.modal-open{overflow:hidden}.modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.62);display:none;align-items:center;justify-content:center;z-index:1000;padding:18px;backdrop-filter:blur(5px)}.modal-backdrop.show{display:flex}.modal-box{width:100%;max-width:560px;background:#fff;border-radius:24px;box-shadow:0 28px 90px rgba(15,23,42,.35);padding:22px;max-height:92vh;overflow:auto;animation:modalPop .18s ease-out}.modal-lg{max-width:760px}.modal-xl{max-width:920px}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid var(--border)}.modal-header h3{margin:0}.modal-close{border:0;background:#fee2e2;color:#991b1b;width:38px;height:38px;border-radius:12px;font-size:24px;font-weight:900;cursor:pointer;line-height:1}.modal-footer{display:flex;justify-content:flex-end;gap:10px;margin-top:10px;padding-top:16px;border-top:1px solid var(--border)}@keyframes modalPop{from{transform:translateY(10px) scale(.98);opacity:.6}to{transform:translateY(0) scale(1);opacity:1}}@media(max-width:700px){.modal-box,.modal-lg,.modal-xl{max-width:100%}.modal-footer{flex-direction:column}.modal-footer .btn{width:100%}}

/* Tabel input nilai lebih ringkas: header mapel memakai kode */
.table-nilai th.th-mapel{
  min-width:72px;
  max-width:90px;
  width:78px;
  text-align:center;
  white-space:nowrap;
  font-size:12px;
  letter-spacing:.5px;
}
.table-nilai td{
  vertical-align:middle;
}
.table-nilai td:nth-child(2),
.table-nilai th:nth-child(2){
  min-width:170px;
  position:sticky;
  left:0;
  z-index:2;
  background:#fff;
}
.table-nilai th:nth-child(2){
  z-index:3;
  background:#f8fafc;
}
.table-nilai input.form-control{
  width:76px;
  min-width:76px;
  padding:10px 8px;
  text-align:center;
}
.flex-wrap{flex-wrap:wrap}.search-form{max-width:720px;flex:1}.search-form .form-control{min-width:260px}.pagination-wrap{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:18px}.pagination{display:flex;gap:6px;flex-wrap:wrap}.page-link{padding:9px 12px;border-radius:12px;background:#eef2ff;color:#1e40af;text-decoration:none;font-weight:800;border:1px solid #dbeafe}.page-link.active{background:linear-gradient(135deg,var(--primary),var(--primary2));color:white}.page-link.disabled{opacity:.45;pointer-events:none}
.import-info{display:flex;gap:12px;align-items:flex-start;background:#eff6ff;color:#1e3a8a;border:1px solid #bfdbfe;border-radius:18px;padding:14px 16px;margin-bottom:16px;line-height:1.55}.import-info-icon{width:34px;height:34px;min-width:34px;border-radius:12px;background:#dbeafe;display:flex;align-items:center;justify-content:center}.chip{display:inline-flex;align-items:center;justify-content:center;background:#e0e7ff;color:#3730a3;border-radius:999px;padding:3px 8px;margin:2px;font-size:12px;font-weight:900}

/* Rekap NR, Praktikum, dan UM dibuat model list horizontal seperti input nilai */
.table-rekap-nilai .rekap-cell{
  min-width:92px;
  text-align:center;
  padding:8px;
}
.table-rekap-nilai .rekap-cell div{
  display:flex;
  justify-content:space-between;
  gap:6px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:10px;
  padding:4px 7px;
  margin:3px 0;
  font-size:12px;
}
.table-rekap-nilai .rekap-cell span{
  color:#64748b;
  font-weight:900;
}
.table-rekap-nilai .rekap-cell b{
  color:#0f172a;
}

/* Nilai akhir dibuat ringkas seperti rekap praktikum dan UM */
.nilai-akhir-cell .na-row{
  margin-top:6px;
  padding-top:6px;
  border-top:1px dashed #dbe5f3;
}
.nilai-akhir-cell .badge{
  display:inline-block;
  margin-top:6px;
  font-size:11px;
  padding:4px 8px;
}
.side-logo-img{background:#fff;overflow:hidden;padding:3px}.side-logo-img img{width:100%;height:100%;object-fit:contain;border-radius:11px}.logo-upload-box{display:flex;gap:14px;align-items:center}.logo-preview{width:76px;height:76px;border-radius:20px;background:#eef2ff;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;overflow:hidden;color:#4f46e5;font-weight:900;font-size:22px}.logo-preview img{width:100%;height:100%;object-fit:contain;padding:5px}.grid-full{grid-column:1/-1}@media(max-width:700px){.logo-upload-box{align-items:flex-start;flex-direction:column}.logo-preview{width:88px;height:88px}}

/* Pilihan tema lengkap dari menu Setting Profil */
body.theme-premium{--bg:#f4f7fb;--card:#fff;--primary:#2563eb;--primary2:#7c3aed;--dark:#0f172a;--muted:#64748b;--border:#e2e8f0}
body.theme-blue{--bg:#eff6ff;--card:#ffffff;--primary:#0ea5e9;--primary2:#1d4ed8;--dark:#082f49;--muted:#64748b;--border:#bfdbfe}
body.theme-green{--bg:#f0fdf4;--card:#ffffff;--primary:#16a34a;--primary2:#0f766e;--dark:#052e16;--muted:#64748b;--border:#bbf7d0}
body.theme-purple{--bg:#faf5ff;--card:#ffffff;--primary:#7c3aed;--primary2:#c026d3;--dark:#2e1065;--muted:#6b7280;--border:#e9d5ff}
body.theme-gold{--bg:#fffbeb;--card:#ffffff;--primary:#d97706;--primary2:#92400e;--dark:#1c1917;--muted:#78716c;--border:#fde68a}
body.theme-red{--bg:#fff1f2;--card:#ffffff;--primary:#e11d48;--primary2:#991b1b;--dark:#1f0a0a;--muted:#64748b;--border:#fecdd3}
body.theme-dark{--bg:#111827;--card:#1f2937;--primary:#38bdf8;--primary2:#8b5cf6;--dark:#020617;--muted:#cbd5e1;--border:#374151;color:#e5e7eb}
body.theme-light{--bg:#f8fafc;--card:#ffffff;--primary:#334155;--primary2:#64748b;--dark:#0f172a;--muted:#64748b;--border:#e2e8f0}
body.theme-dark .topbar,body.theme-dark .card,body.theme-dark table,body.theme-dark .modal-box{background:var(--card);color:#e5e7eb}
body.theme-dark th{background:#111827;color:#e5e7eb}body.theme-dark td{border-color:#374151}body.theme-dark tr:hover td{background:#263244}body.theme-dark .form-control,body.theme-dark .form-select{background:#111827;color:#e5e7eb;border-color:#4b5563}body.theme-dark .badge-muted,body.theme-dark .tab{background:#374151;color:#f8fafc}body.theme-dark .table-nilai td:nth-child(2){background:#1f2937}body.theme-dark .table-nilai th:nth-child(2){background:#111827}
.theme-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.theme-card{border:2px solid var(--border);border-radius:18px;padding:14px;background:#fff;cursor:pointer;display:flex;flex-direction:column;gap:8px;transition:.18s;min-height:112px}.theme-card input{display:none}.theme-card:hover,.theme-card.active{border-color:var(--primary);box-shadow:0 12px 30px rgba(15,23,42,.10);transform:translateY(-2px)}.theme-card b{color:#0f172a}.theme-card small{color:#64748b;font-weight:800}.theme-palette{display:flex;gap:6px}.theme-palette i{width:28px;height:28px;border-radius:999px;display:block;border:2px solid rgba(255,255,255,.8);box-shadow:0 4px 12px rgba(15,23,42,.12)}.theme-preview-premium .theme-palette i:nth-child(1){background:#2563eb}.theme-preview-premium .theme-palette i:nth-child(2){background:#7c3aed}.theme-preview-premium .theme-palette i:nth-child(3){background:#f4f7fb}.theme-preview-blue .theme-palette i:nth-child(1){background:#0ea5e9}.theme-preview-blue .theme-palette i:nth-child(2){background:#1d4ed8}.theme-preview-blue .theme-palette i:nth-child(3){background:#eff6ff}.theme-preview-green .theme-palette i:nth-child(1){background:#16a34a}.theme-preview-green .theme-palette i:nth-child(2){background:#0f766e}.theme-preview-green .theme-palette i:nth-child(3){background:#f0fdf4}.theme-preview-purple .theme-palette i:nth-child(1){background:#7c3aed}.theme-preview-purple .theme-palette i:nth-child(2){background:#c026d3}.theme-preview-purple .theme-palette i:nth-child(3){background:#faf5ff}.theme-preview-gold .theme-palette i:nth-child(1){background:#d97706}.theme-preview-gold .theme-palette i:nth-child(2){background:#92400e}.theme-preview-gold .theme-palette i:nth-child(3){background:#fffbeb}.theme-preview-red .theme-palette i:nth-child(1){background:#e11d48}.theme-preview-red .theme-palette i:nth-child(2){background:#991b1b}.theme-preview-red .theme-palette i:nth-child(3){background:#fff1f2}.theme-preview-dark{background:#1f2937}.theme-preview-dark b{color:#fff}.theme-preview-dark small{color:#cbd5e1}.theme-preview-dark .theme-palette i:nth-child(1){background:#38bdf8}.theme-preview-dark .theme-palette i:nth-child(2){background:#8b5cf6}.theme-preview-dark .theme-palette i:nth-child(3){background:#111827}.theme-preview-light .theme-palette i:nth-child(1){background:#334155}.theme-preview-light .theme-palette i:nth-child(2){background:#64748b}.theme-preview-light .theme-palette i:nth-child(3){background:#f8fafc}@media(max-width:1050px){.theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.theme-grid{grid-template-columns:1fr}}

/* Sidebar mengikuti tema yang dipilih di menu Setting */
.sidebar{
  background:linear-gradient(180deg,var(--sidebar1,#08111f),var(--sidebar2,#020617));
  border-right:1px solid var(--sidebar-border,rgba(255,255,255,.08));
}
.side-brand{border-bottom-color:var(--sidebar-border,rgba(255,255,255,.12));}
.side-brand small{color:var(--sidebar-muted,#cbd5e1);}
.nav a{color:var(--sidebar-text,#e2e8f0);}
.nav a:hover,.nav a.active{
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:#fff;
  box-shadow:0 10px 24px rgba(15,23,42,.18);
}
.side-logo:not(.side-logo-img){background:linear-gradient(135deg,var(--primary),var(--primary2));}

body.theme-premium{--sidebar1:#08111f;--sidebar2:#020617;--sidebar-text:#e2e8f0;--sidebar-muted:#94a3b8;--sidebar-border:rgba(255,255,255,.10)}
body.theme-blue{--sidebar1:#075985;--sidebar2:#082f49;--sidebar-text:#e0f2fe;--sidebar-muted:#bae6fd;--sidebar-border:rgba(186,230,253,.25)}
body.theme-green{--sidebar1:#14532d;--sidebar2:#052e16;--sidebar-text:#dcfce7;--sidebar-muted:#bbf7d0;--sidebar-border:rgba(187,247,208,.22)}
body.theme-purple{--sidebar1:#4c1d95;--sidebar2:#2e1065;--sidebar-text:#f3e8ff;--sidebar-muted:#d8b4fe;--sidebar-border:rgba(216,180,254,.22)}
body.theme-gold{--sidebar1:#78350f;--sidebar2:#1c1917;--sidebar-text:#fffbeb;--sidebar-muted:#fde68a;--sidebar-border:rgba(253,230,138,.28)}
body.theme-red{--sidebar1:#881337;--sidebar2:#450a0a;--sidebar-text:#ffe4e6;--sidebar-muted:#fecdd3;--sidebar-border:rgba(254,205,211,.25)}
body.theme-dark{--sidebar1:#020617;--sidebar2:#0f172a;--sidebar-text:#e5e7eb;--sidebar-muted:#cbd5e1;--sidebar-border:rgba(148,163,184,.20)}
body.theme-light{--sidebar1:#ffffff;--sidebar2:#f8fafc;--sidebar-text:#334155;--sidebar-muted:#64748b;--sidebar-border:#e2e8f0}
body.theme-light .sidebar{color:#0f172a;box-shadow:8px 0 30px rgba(15,23,42,.05)}
body.theme-light .nav a:hover,body.theme-light .nav a.active{color:#fff}


/* =========================================================
   PREMIUM UI FULL UPGRADE
   Tambahan aman: ditempel di bawah CSS lama
   ========================================================= */

/* GLOBAL SMOOTH */
html{
  scroll-behavior:smooth;
}
body{
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* PREMIUM CARD */
.card{
  transition:all .25s ease;
}
.card:hover{
  transform:translateY(-3px);
  box-shadow:0 22px 55px rgba(15,23,42,.12);
}

/* GLASS EFFECT OPTIONAL */
.glass{
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(14px);
  border:1px solid rgba(255,255,255,.45);
}
body.theme-dark .glass{
  background:rgba(31,41,55,.72);
  border-color:rgba(148,163,184,.18);
}

/* SIDEBAR PREMIUM ACTIVE INDICATOR */
.nav a{
  position:relative;
  overflow:hidden;
}
.nav a.active::before{
  content:'';
  position:absolute;
  left:0;
  top:50%;
  transform:translateY(-50%);
  width:4px;
  height:58%;
  border-radius:999px;
  background:#fff;
  box-shadow:0 0 12px rgba(255,255,255,.65);
}
body.theme-light .nav a.active::before{
  background:linear-gradient(180deg,var(--primary),var(--primary2));
}

/* SIDEBAR HOVER SHINE */
.nav a::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(120deg,transparent,rgba(255,255,255,.12),transparent);
  transform:translateX(-120%);
  transition:.45s;
}
.nav a:hover::after{
  transform:translateX(120%);
}
.nav a span{
  position:relative;
  z-index:1;
}
.nav a span:first-child{
  transition:.2s ease;
}
.nav a:hover span:first-child{
  transform:scale(1.16) rotate(-3deg);
}

/* SIDEBAR BRAND PREMIUM */
.side-brand{
  border-radius:18px;
  background:rgba(255,255,255,.04);
}
body.theme-light .side-brand{
  background:rgba(15,23,42,.035);
}

/* TOPBAR PREMIUM */
.topbar{
  backdrop-filter:blur(12px);
  background:rgba(255,255,255,.86);
  box-shadow:0 8px 28px rgba(15,23,42,.055);
}
body.theme-dark .topbar{
  background:rgba(31,41,55,.86);
  box-shadow:0 8px 28px rgba(0,0,0,.18);
}

/* CONTENT FADE */
.content{
  animation:premiumFadeIn .38s ease;
}
@keyframes premiumFadeIn{
  from{
    opacity:0;
    transform:translateY(8px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

/* BUTTON PREMIUM */
.btn{
  transition:all .2s ease;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
}
.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 26px rgba(15,23,42,.13);
}
.btn:active{
  transform:translateY(0);
}
.btn-primary{
  box-shadow:0 12px 28px rgba(37,99,235,.25);
}
.btn-success{
  box-shadow:0 12px 28px rgba(22,163,74,.14);
}
.btn-danger{
  box-shadow:0 12px 28px rgba(220,38,38,.14);
}
.btn-warning{
  box-shadow:0 12px 28px rgba(245,158,11,.16);
}

/* FORM PREMIUM */
.form-control,
.form-select{
  transition:all .2s ease;
}
.form-control:hover,
.form-select:hover{
  border-color:rgba(37,99,235,.45);
}
.form-control:focus,
.form-select:focus{
  transform:translateY(-1px);
}

/* TABLE PREMIUM */
.table-wrap{
  box-shadow:0 14px 34px rgba(15,23,42,.055);
}
table tr{
  transition:.16s ease;
}
table tr:hover td{
  background:linear-gradient(90deg,#f8fafc,#eef2ff);
}
body.theme-dark table tr:hover td{
  background:linear-gradient(90deg,#263244,#1f2937);
}
th{
  position:relative;
}

/* BADGE PREMIUM */
.badge{
  box-shadow:0 6px 16px rgba(15,23,42,.06);
}

/* MODAL PREMIUM */
.modal-backdrop{
  animation:backdropFade .18s ease;
}
@keyframes backdropFade{
  from{opacity:.2}
  to{opacity:1}
}
.modal-box{
  border:1px solid rgba(255,255,255,.4);
}
body.theme-dark .modal-box{
  border-color:rgba(148,163,184,.18);
}

/* ALERT PREMIUM */
.alert{
  border:1px solid rgba(255,255,255,.35);
  box-shadow:0 10px 24px rgba(15,23,42,.06);
}

/* DASHBOARD HERO OPTIONAL */
.dashboard-hero{
  background:linear-gradient(135deg,var(--sidebar1,#0f172a),var(--primary),var(--primary2));
  color:#fff;
  border-radius:26px;
  padding:28px;
  margin-bottom:22px;
  box-shadow:0 24px 60px rgba(37,99,235,.22);
  position:relative;
  overflow:hidden;
}
.dashboard-hero::after{
  content:'';
  position:absolute;
  right:-70px;
  top:-70px;
  width:190px;
  height:190px;
  border-radius:50%;
  background:rgba(255,255,255,.12);
}
.dashboard-hero h2,
.dashboard-hero p{
  position:relative;
  z-index:1;
}
.dashboard-hero h2{
  margin:0 0 8px;
  font-size:28px;
}
.dashboard-hero p{
  margin:0;
  color:rgba(255,255,255,.82);
}

/* STAT CARD PREMIUM */
.stat{
  position:relative;
  overflow:hidden;
}
.stat::after{
  content:'';
  position:absolute;
  right:-28px;
  bottom:-28px;
  width:90px;
  height:90px;
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  opacity:.08;
  border-radius:50%;
}
.stat .icon{
  box-shadow:0 12px 28px rgba(37,99,235,.16);
}

/* SEARCH & PAGINATION PREMIUM */
.search-form .form-control{
  box-shadow:0 8px 22px rgba(15,23,42,.04);
}
.page-link{
  transition:.18s ease;
}
.page-link:hover:not(.disabled){
  transform:translateY(-1px);
  box-shadow:0 8px 20px rgba(37,99,235,.14);
}

/* FOOTER WHITE-LABEL PREMIUM */
.footer-miasta{
  margin-top:34px;
  padding:18px 24px;
  border-top:1px solid var(--border);
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(12px);
  color:var(--muted);
}
.footer-miasta .footer-container{
  display:flex;
  justify-content:space-between;
  align-items:center;
  max-width:1280px;
  margin:auto;
  gap:18px;
}
.footer-miasta .footer-brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.footer-miasta .footer-brand img{
  width:44px;
  height:44px;
  object-fit:contain;
  border-radius:13px;
  background:#fff;
  border:1px solid var(--border);
  padding:4px;
}
.footer-miasta .footer-logo-placeholder{
  width:44px;
  height:44px;
  border-radius:13px;
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
}
.footer-miasta .footer-text strong{
  display:block;
  font-size:14px;
  color:#0f172a;
}
.footer-miasta .footer-text small{
  display:block;
  font-size:12px;
  color:var(--muted);
}
.footer-miasta .footer-info{
  text-align:right;
  font-size:13px;
}
.footer-miasta .footer-contact{
  margin-top:5px;
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.footer-miasta .footer-contact span,
.footer-miasta .footer-contact a{
  background:#f1f5f9;
  color:#334155;
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  text-decoration:none;
}
body.theme-dark .footer-miasta{
  background:rgba(17,24,39,.84);
}
body.theme-dark .footer-miasta .footer-text strong{
  color:#fff;
}
body.theme-dark .footer-miasta .footer-contact span,
body.theme-dark .footer-miasta .footer-contact a{
  background:#1f2937;
  color:#d1d5db;
}

/* CHART CARD PREMIUM */
.chart-box{
  position:relative;
  overflow:hidden;
}
.chart-box::before{
  content:'';
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg,var(--primary),var(--primary2));
}
.chart-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.chart-title h3{
  margin:0;
  font-size:18px;
}
.badge-soft{
  background:#eef2ff;
  color:#4f46e5;
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
}
body.theme-dark .badge-soft{
  background:#374151;
  color:#e5e7eb;
}

/* SCROLLBAR PREMIUM */
::-webkit-scrollbar{
  width:8px;
  height:8px;
}
::-webkit-scrollbar-thumb{
  background:linear-gradient(var(--primary),var(--primary2));
  border-radius:999px;
}
::-webkit-scrollbar-track{
  background:transparent;
}

/* RESPONSIVE EXTRA */
@media(max-width:950px){
  .sidebar{
    border-radius:0 0 26px 26px;
  }
  .topbar{
    border-radius:0;
  }
}
@media(max-width:768px){
  .footer-miasta .footer-container{
    flex-direction:column;
    text-align:center;
  }
  .footer-miasta .footer-info{
    text-align:center;
  }
  .footer-miasta .footer-contact{
    justify-content:center;
  }
  .dashboard-hero h2{
    font-size:22px;
  }
}
/* =========================
   FIX LOGO OVERFLOW
========================= */

/* logo sidebar */
.side-logo-img img{
  width:42px !important;
  height:42px !important;
  object-fit:contain;
}

/* logo global (biar tidak bocor ke dashboard) */
img{
  max-width:100%;
  height:auto;
}

/* kalau ada logo besar di content */
.logo-preview img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}

/* cegah gambar terlalu besar di card/dashboard */
.card img{
  max-width:120px;
  max-height:120px;
  object-fit:contain;
}
/* =========================
   FIX PAKSA LOGO BESAR / NUMPUK
========================= */

/* Batasi semua gambar upload logo di area aplikasi */
.main img[src*="uploads"],
.content img[src*="uploads"],
.topbar img[src*="uploads"],
.footer-miasta img[src*="uploads"]{
  max-width:70px !important;
  max-height:70px !important;
  width:auto !important;
  height:auto !important;
  object-fit:contain !important;
}

/* Logo sidebar tetap kecil */
.side-logo,
.side-logo-img{
  width:44px !important;
  height:44px !important;
  min-width:44px !important;
  max-width:44px !important;
  max-height:44px !important;
  overflow:hidden !important;
}

.side-logo-img img,
.side-brand img{
  width:100% !important;
  height:100% !important;
  max-width:44px !important;
  max-height:44px !important;
  object-fit:contain !important;
}

/* Cegah gambar apa pun melebar liar di dashboard */
.content > img,
.main > img,
.card > img{
  max-width:90px !important;
  max-height:90px !important;
  object-fit:contain !important;
}

/* Kalau logo footer */
.footer-miasta .footer-brand img{
  width:44px !important;
  height:44px !important;
  max-width:44px !important;
  max-height:44px !important;
  object-fit:contain !important;
}
/* FIX FOOTER WHITE LABEL BIAR TIDAK NAIK KE ATAS */
.footer-miasta{
  clear:both;
  width:100%;
  margin-top:40px;
  padding:18px 24px;
  border-top:1px solid var(--border);
  background:rgba(255,255,255,.9);
  position:relative;
  z-index:1;
}

.footer-container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.footer-brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.footer-brand img{
  width:42px !important;
  height:42px !important;
  max-width:42px !important;
  max-height:42px !important;
  object-fit:contain !important;
  border-radius:12px;
  background:#fff;
  padding:4px;
  border:1px solid var(--border);
}

.footer-logo-placeholder{
  width:42px;
  height:42px;
  border-radius:12px;
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:white;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
}

.footer-brand strong{
  display:block;
  font-size:14px;
}

.footer-brand small{
  display:block;
  font-size:12px;
  color:var(--muted);
}

.footer-info{
  text-align:right;
  font-size:13px;
  color:var(--muted);
}

.footer-contact{
  margin-top:4px;
  display:flex;
  gap:8px;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.footer-contact span{
  background:#f1f5f9;
  padding:4px 9px;
  border-radius:999px;
  font-size:12px;
}

.topbar img{
  display:none !important;
}

@media(max-width:768px){
  .footer-container{
    flex-direction:column;
    text-align:center;
  }

  .footer-info{
    text-align:center;
  }

  .footer-contact{
    justify-content:center;
  }
}
/* =========================================================
   TOPBAR USER DROPDOWN PREMIUM
   ========================================================= */
.top-right{display:flex;align-items:center;justify-content:flex-end;gap:12px}.user-menu{position:relative;z-index:1001}.user-trigger{border:1px solid rgba(22,163,74,.28);background:linear-gradient(135deg,rgba(240,253,244,.98),rgba(236,253,245,.92));color:#0f172a;border-radius:999px;padding:7px 12px 7px 7px;display:flex;align-items:center;gap:10px;cursor:pointer;min-width:168px;box-shadow:0 10px 26px rgba(15,23,42,.06);transition:.2s ease;font-family:inherit}.user-trigger:hover{transform:translateY(-1px);box-shadow:0 14px 32px rgba(15,23,42,.10);border-color:rgba(22,163,74,.45)}.user-avatar{width:34px;height:34px;min-width:34px;border-radius:50%;background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff;display:flex;align-items:center;justify-content:center;font-size:15px;box-shadow:0 8px 20px rgba(15,23,42,.15)}.user-info{display:flex;flex-direction:column;align-items:flex-start;line-height:1.15;flex:1}.user-info b{font-size:13px;font-weight:900;color:#0f172a}.user-info small{margin-top:2px;font-size:11px;color:#64748b}.user-arrow{font-size:11px;color:#64748b;transition:.2s ease}.user-menu.open .user-arrow{transform:rotate(180deg)}.user-dropdown{position:absolute;right:0;top:calc(100% + 10px);width:210px;background:#fff;border:1px solid var(--border);border-radius:18px;box-shadow:0 24px 60px rgba(15,23,42,.18);padding:8px;display:none;overflow:hidden;animation:userDrop .16s ease-out}.user-dropdown.show{display:block}.user-dropdown a{display:flex;align-items:center;gap:9px;color:#0f172a;text-decoration:none;padding:11px 12px;border-radius:13px;font-weight:800;font-size:13px;transition:.18s ease}.user-dropdown a:hover{background:#f1f5f9;transform:translateX(2px)}.user-dropdown a.logout{color:#dc2626}.user-dropdown a.logout:hover{background:#fee2e2}@keyframes userDrop{from{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}body.theme-dark .user-trigger{background:linear-gradient(135deg,#1f2937,#111827);color:#e5e7eb;border-color:#374151}body.theme-dark .user-info b{color:#f8fafc}body.theme-dark .user-info small,body.theme-dark .user-arrow{color:#cbd5e1}body.theme-dark .user-dropdown{background:#1f2937;border-color:#374151}body.theme-dark .user-dropdown a{color:#f8fafc}body.theme-dark .user-dropdown a:hover{background:#374151}@media(max-width:650px){.user-trigger{min-width:auto;padding-right:9px}.user-info{display:none}.user-dropdown{right:-4px;width:190px}}

/* =========================================================
   FINAL FIX FOOTER FIXED - SELALU TERLIHAT DI BAWAH LAYAR
   ditempatkan paling akhir agar menimpa rule footer sebelumnya
   ========================================================= */
.footer-miasta{
  position:fixed !important;
  left:282px !important;
  right:0 !important;
  bottom:0 !important;
  width:auto !important;
  margin:0 !important;
  padding:12px 22px !important;
  z-index:998 !important;
  background:rgba(255,255,255,.96) !important;
  backdrop-filter:blur(12px) !important;
  border-top:1px solid var(--border) !important;
  box-shadow:0 -10px 30px rgba(15,23,42,.08) !important;
}
.footer-miasta .footer-container,
.footer-container{
  max-width:none !important;
  min-height:44px !important;
}
.footer-miasta .footer-brand img,
.footer-brand img{
  width:38px !important;
  height:38px !important;
  max-width:38px !important;
  max-height:38px !important;
}
.footer-miasta .footer-logo-placeholder,
.footer-logo-placeholder{
  width:38px !important;
  height:38px !important;
}
.footer-miasta .footer-text strong,
.footer-brand strong{
  font-size:13px !important;
}
.footer-miasta .footer-text small,
.footer-brand small,
.footer-info,
.footer-contact span{
  font-size:11px !important;
}
.content{
  padding-bottom:105px !important;
}
body.theme-dark .footer-miasta{
  background:rgba(17,24,39,.96) !important;
}
@media(max-width:950px){
  .footer-miasta{
    left:0 !important;
    width:100% !important;
  }
  .content{
    padding-bottom:130px !important;
  }
}
@media(max-width:650px){
  .footer-miasta{
    padding:10px 14px !important;
  }
  .footer-miasta .footer-container,
  .footer-container{
    gap:8px !important;
  }
}


/* ===== FIX TOPBAR FINAL ===== */
.topbar{
  min-height:78px !important;
  height:auto !important;
  padding:16px 26px !important;
  display:flex;
  align-items:center;
  justify-content:space-between;
  overflow:visible !important;
  z-index:1000;
}

.user-menu,
.user-trigger{
  overflow:visible !important;
}

.user-trigger{
  min-height:48px !important;
  padding:8px 16px !important;
  display:flex;
  align-items:center;
}

/* ===== FIX FOOTER FIXED ===== */
.footer-miasta{
  position:fixed;
  bottom:0;
  left:260px;
  width:calc(100% - 260px);
  z-index:999;
}

.content{
  padding-bottom:90px !important;
}

@media(max-width:950px){
  .footer-miasta{
    left:0;
    width:100%;
  }
}
.rekap-ujian-row{
  background:#ecfdf5 !important;
  border-color:#bbf7d0 !important;
}
.rekap-ujian-row span{
  color:#15803d !important;
}
.rekap-ujian-row b{
  color:#14532d !important;
}
.nilai-akhir-cell div:nth-child(4){
  background:#ecfdf5 !important;
  border-color:#bbf7d0 !important;
}

.nilai-akhir-cell div:nth-child(4) span,
.nilai-akhir-cell div:nth-child(4) b{
  color:#15803d !important;
}

.nilai-akhir-cell .na-row{
  background:#eef2ff !important;
  border-color:#c7d2fe !important;
}

.nilai-akhir-cell .na-row span,
.nilai-akhir-cell .na-row b{
  color:#3730a3 !important;
}
/* LOGIN PREMIUM */
.login-wrapper{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#e0f2fe,#dcfce7);
}

.login-card{
  width:380px;
  background:#fff;
  border-radius:18px;
  padding:28px;
  box-shadow:0 15px 40px rgba(0,0,0,0.08);
}

.brand{
  text-align:center;
  margin-bottom:20px;
}

.logo-img{
  width:80px;
  height:80px;
  margin:0 auto 10px;
  border-radius:50%;
  overflow:hidden;
  background:#f1f5f9;
  display:flex;
  align-items:center;
  justify-content:center;
}

.logo-img img{
  width:100%;
  height:100%;
  object-fit:contain;
}

.brand h1{
  font-size:18px;
  margin:8px 0 4px;
}

.brand p{
  font-size:13px;
  color:#64748b;
}

.footer-note{
  margin-top:12px;
  font-size:12px;
  text-align:center;
  color:#94a3b8;
}

/* Export buttons premium */
.export-actions .btn{box-shadow:0 10px 24px rgba(31,111,229,.12);font-weight:800;}
.export-actions .btn-success{background:linear-gradient(135deg,#10b981,#059669);border-color:#10b981;color:#fff;}
.export-actions .btn-danger{background:linear-gradient(135deg,#ef4444,#dc2626);border-color:#ef4444;color:#fff;}
@media(max-width:768px){.export-actions{width:100%;}.export-actions .btn{flex:1;text-align:center;}}
.sort-link{
  color:inherit;
  text-decoration:none;
  font-weight:900;
}
.sort-link:hover{
  color:var(--primary);
}