/* =======================================================================
   Data Mutasi PAA → PGM — stylesheet
   Tema: oranye → putih (gradasi hangat), gaya admin padat & efisien
   ======================================================================= */
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:'Plus Jakarta Sans',system-ui,-apple-system,Segoe UI,sans-serif;
  background:#FBF6F1;color:#2B2521;font-size:14px;line-height:1.45;
}
a{color:inherit;text-decoration:none;}
::-webkit-scrollbar{height:10px;width:10px;}
::-webkit-scrollbar-thumb{background:#E2D2C4;border-radius:99px;}
::-webkit-scrollbar-track{background:transparent;}
input,select,textarea,button{font-family:inherit;}
input:focus,select:focus,textarea:focus{outline:2px solid #FB923C;outline-offset:-1px;}

/* ---------- Topbar ---------- */
.topbar{
  background:linear-gradient(120deg,#FB923C 0%,#EA580C 58%,#C2410C 100%);
  color:#fff;height:64px;padding:0 22px;display:flex;align-items:center;
  justify-content:space-between;box-shadow:0 2px 12px rgba(194,65,12,.22);
}
.brand{display:flex;align-items:center;gap:13px;}
.brand-mark{
  width:40px;height:40px;border-radius:11px;background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.35);display:flex;align-items:center;
  justify-content:center;font-weight:800;font-size:15px;
}
.brand-title{font-size:16px;font-weight:800;letter-spacing:.2px;line-height:1.15;}
.brand-sub{font-size:11.5px;opacity:.85;font-weight:500;}
.topbar-user{display:flex;align-items:center;gap:12px;}
.user-meta{text-align:right;line-height:1.2;}
.user-name{font-size:13px;font-weight:700;}
.user-role{font-size:11px;opacity:.85;font-weight:500;}
.user-avatar{
  width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.2);
  border:1px solid rgba(255,255,255,.4);display:flex;align-items:center;
  justify-content:center;font-weight:800;font-size:15px;
}
.btn-logout{
  background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.34);
  color:#fff;font-weight:600;font-size:12.5px;padding:8px 13px;border-radius:8px;
}
.btn-logout:hover{background:rgba(255,255,255,.28);}

/* ---------- Tab nav ---------- */
.tabnav{display:flex;align-items:center;gap:2px;padding:0 18px;background:#fff;
  border-bottom:1px solid #ECE0D5;height:48px;}
.tab{display:flex;align-items:center;gap:7px;padding:0 16px;height:48px;
  font-size:13.5px;font-weight:600;color:#8A7A6C;border-bottom:3px solid transparent;}
.tab:hover{color:#C2410C;}
.tab.active{color:#C2410C;font-weight:700;border-bottom-color:#EA580C;}
.tab-ico{font-size:14px;}

/* ---------- Main ---------- */
.main{padding:20px 22px 36px;}
.appfoot{text-align:center;color:#A89788;font-size:11.5px;padding:18px;}

/* ---------- Flash ---------- */
.flash{padding:11px 16px;border-radius:10px;font-size:13px;font-weight:600;margin-bottom:16px;}
.flash-success{background:#DCFCE7;color:#15803D;border:1px solid #bbf7d0;}
.flash-error{background:#FEE2E2;color:#B91C1C;border:1px solid #fecaca;}
.flash-info{background:#FFF1E7;color:#C2410C;border:1px solid #fed7aa;}

/* ---------- Buttons ---------- */
.btn{display:inline-flex;align-items:center;gap:6px;padding:9px 15px;border-radius:9px;
  font-size:12.5px;font-weight:700;cursor:pointer;border:1px solid transparent;}
.btn-primary{background:linear-gradient(120deg,#FB923C,#EA580C);color:#fff;border:none;
  box-shadow:0 1px 6px rgba(234,88,12,.3);}
.btn-primary:hover{filter:brightness(1.05);}
.btn-ghost{background:#fff;border:1px solid #E2D2C4;color:#6B5F57;}
.btn-ghost:hover{background:#FBF6F1;}
.btn-soft{background:#FFF1E7;border:1px solid #fed7aa;color:#C2410C;}
.btn-danger{background:#fff;border:1px solid #F0D4D4;color:#C0392B;}
.btn-sm{padding:5px 10px;font-size:11.5px;border-radius:7px;}

/* ---------- Toolbar / filters ---------- */
.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px;}
.toolbar .spacer{flex:1;}
.field-search{position:relative;flex:1;min-width:220px;max-width:340px;}
.field-search input{width:100%;padding:9px 12px 9px 32px;border:1px solid #E2D2C4;
  border-radius:9px;font-size:13px;background:#fff;}
.field-search .ico{position:absolute;left:11px;top:50%;transform:translateY(-50%);
  color:#B7A695;font-size:13px;}
select.input,input.input{padding:8px 10px;border:1px solid #E2D2C4;border-radius:9px;
  font-size:12.5px;background:#fff;color:#2B2521;}
.muted{font-size:12px;color:#7A6A5E;font-weight:500;}
.muted b{color:#C2410C;}

/* ---------- Cards ---------- */
.card{background:#fff;border:1px solid #ECE0D5;border-radius:14px;padding:16px 18px;}
.card-title{font-size:13.5px;font-weight:700;margin-bottom:14px;}
.grid{display:grid;gap:14px;}

/* ---------- KPI ---------- */
.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px;}
.kpi{background:linear-gradient(135deg,#FFF6EF,#FFFFFF);border:1px solid #ECE0D5;
  border-radius:14px;padding:16px 17px;position:relative;overflow:hidden;}
.kpi::before{content:"";position:absolute;top:0;left:0;width:4px;height:100%;
  background:linear-gradient(#FB923C,#EA580C);}
.kpi-label{font-size:12px;color:#7A6A5E;font-weight:600;}
.kpi-value{font-size:30px;font-weight:800;color:#C2410C;letter-spacing:-.5px;
  margin-top:6px;font-variant-numeric:tabular-nums;}
.kpi-sub{font-size:11.5px;color:#A89788;font-weight:500;margin-top:2px;}

/* ---------- Bars ---------- */
.bar-row{margin-bottom:12px;}
.bar-head{display:flex;justify-content:space-between;font-size:12px;margin-bottom:5px;}
.bar-head .lbl{font-weight:600;color:#4A4039;}
.bar-head .val{color:#7A6A5E;font-variant-numeric:tabular-nums;}
.bar-track{height:9px;background:#F4EAE0;border-radius:99px;overflow:hidden;}
.bar-fill{height:100%;background:linear-gradient(90deg,#FB923C,#EA580C);border-radius:99px;}
.bar-fill.alt{background:linear-gradient(90deg,#FDBA74,#EA580C);}

.rank-row{display:flex;align-items:center;gap:10px;margin-bottom:10px;}
.rank-row .lbl{width:150px;font-size:12px;font-weight:600;color:#4A4039;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;flex:none;}
.rank-row .track{flex:1;height:18px;background:#F4EAE0;border-radius:6px;overflow:hidden;}
.rank-row .fill{height:100%;background:linear-gradient(90deg,#FB923C,#EA580C);border-radius:6px;}
.rank-row .num{width:26px;text-align:right;font-size:12px;font-weight:700;color:#C2410C;
  font-variant-numeric:tabular-nums;flex:none;}

/* ---------- Donut ---------- */
.donut-wrap{display:flex;align-items:center;gap:16px;}
.donut{width:96px;height:96px;border-radius:50%;flex:none;display:flex;
  align-items:center;justify-content:center;}
.donut-hole{width:56px;height:56px;border-radius:50%;background:#fff;display:flex;
  flex-direction:column;align-items:center;justify-content:center;}
.donut-hole .n{font-size:18px;font-weight:800;color:#2B2521;line-height:1;font-variant-numeric:tabular-nums;}
.donut-hole .u{font-size:9px;color:#A89788;font-weight:600;}
.legend{display:flex;flex-direction:column;gap:9px;font-size:12px;}
.legend .it{display:flex;align-items:center;gap:7px;}
.legend .dot{width:11px;height:11px;border-radius:3px;}
.legend .nm{color:#4A4039;font-weight:600;}
.legend .vl{color:#7A6A5E;font-variant-numeric:tabular-nums;}

/* ---------- Table ---------- */
.table-wrap{background:#fff;border:1px solid #ECE0D5;border-radius:12px;overflow:auto;}
table.data{border-collapse:separate;border-spacing:0;width:100%;font-size:12px;}
table.data thead th{position:sticky;top:0;background:#FBEFE5;text-align:left;
  padding:11px 12px;font-weight:700;color:#9A4A14;border-bottom:2px solid #EAD8C8;
  white-space:nowrap;font-size:11.5px;z-index:2;}
table.data td{padding:9px 12px;border-bottom:1px solid #F1E7DC;white-space:nowrap;}
table.data tbody tr:nth-child(even){background:#FDF9F5;}
.c-center{text-align:center;}
.no-col{text-align:center;color:#A89788;font-weight:600;font-variant-numeric:tabular-nums;}
.nm-col{font-weight:700;color:#2B2521;}
.sub-col{color:#6B5F57;}
.col-action{position:sticky;right:0;background:#fff;box-shadow:-6px 0 8px -6px rgba(0,0,0,.1);
  text-align:center;}
table.data thead th.col-action{background:#FBEFE5;}
.empty{padding:48px;text-align:center;color:#A89788;font-size:13px;}

/* ---------- Badges ---------- */
.badge{display:inline-block;padding:3px 9px;border-radius:99px;font-size:11px;font-weight:700;}
.b-jk-l{display:inline-block;width:22px;height:22px;line-height:22px;text-align:center;
  border-radius:6px;font-size:11px;font-weight:700;background:#FFE6D5;color:#C2410C;}
.b-jk-p{display:inline-block;width:22px;height:22px;line-height:22px;text-align:center;
  border-radius:6px;font-size:11px;font-weight:700;background:#FEF3C7;color:#B45309;}
.b-level{background:#FFF1E7;color:#C2410C;}
.b-aktif{background:#DCFCE7;color:#15803D;}
.b-pernah{background:#FEF3C7;color:#B45309;}
.b-belum{background:#FEE2E2;color:#B91C1C;}
.b-anak-y{background:#FFF1E7;color:#C2410C;}
.b-anak-t{background:#F0E9E2;color:#A89788;}

/* ---------- Form ---------- */
.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;}
.page-title{font-size:18px;font-weight:800;color:#2B2521;}
.page-desc{font-size:12.5px;color:#7A6A5E;margin-top:2px;}
.formwrap{max-width:1000px;}
.fsection{background:#fff;border:1px solid #ECE0D5;border-radius:14px;padding:18px 20px;margin-bottom:14px;}
.fsection-head{display:flex;align-items:center;gap:9px;margin-bottom:15px;}
.fsection-bar{width:7px;height:18px;border-radius:3px;background:linear-gradient(#FB923C,#EA580C);}
.fsection-title{font-size:14px;font-weight:700;color:#2B2521;}
.fgrid{display:grid;gap:14px;}
.fld label{display:block;font-size:11.5px;font-weight:600;color:#6B5F57;margin-bottom:5px;}
.fld .req{color:#EA580C;}
.fld input,.fld select,.fld textarea{width:100%;padding:9px 11px;border:1px solid #E2D2C4;
  border-radius:9px;font-size:13px;background:#fff;color:#2B2521;}
.fld input[readonly]{background:#F7F1EB;color:#8A7A6C;cursor:not-allowed;}
.fld textarea{resize:vertical;min-height:54px;}
.col-full{grid-column:1/-1;}
.form-actions{display:flex;align-items:center;gap:12px;justify-content:flex-end;margin-top:6px;padding-bottom:24px;}
.form-actions .err{flex:1;font-size:12.5px;color:#C0392B;font-weight:600;}

/* ---------- Login ---------- */
.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;
  background:
    radial-gradient(1200px 600px at 100% 0%,rgba(251,146,60,.16),transparent 60%),
    radial-gradient(900px 500px at 0% 100%,rgba(234,88,12,.12),transparent 55%),
    #FBF6F1;
  padding:24px;}
.login-card{width:100%;max-width:400px;background:#fff;border:1px solid #ECE0D5;
  border-radius:18px;padding:32px 30px;box-shadow:0 20px 50px -24px rgba(194,65,12,.4);}
.login-mark{width:54px;height:54px;border-radius:15px;margin:0 auto 16px;
  background:linear-gradient(135deg,#FB923C,#C2410C);display:flex;align-items:center;
  justify-content:center;color:#fff;font-weight:800;font-size:22px;
  box-shadow:0 8px 20px -6px rgba(234,88,12,.5);}
.login-title{text-align:center;font-size:19px;font-weight:800;color:#2B2521;}
.login-sub{text-align:center;font-size:12.5px;color:#7A6A5E;margin-top:3px;margin-bottom:22px;}
.login-card .fld{margin-bottom:14px;}
.login-card .btn-primary{width:100%;justify-content:center;padding:12px;font-size:14px;}
.login-hint{margin-top:18px;font-size:11.5px;color:#A89788;text-align:center;line-height:1.6;}
.login-err{background:#FEE2E2;color:#B91C1C;border:1px solid #fecaca;padding:10px 13px;
  border-radius:9px;font-size:12.5px;font-weight:600;margin-bottom:16px;}

/* ---------- Users table ---------- */
.role-chip{display:inline-block;padding:3px 10px;border-radius:99px;font-size:11px;font-weight:700;}
.role-superadmin{background:#EDE9FE;color:#6D28D9;}
.role-dpw{background:#FFE6D5;color:#C2410C;}
.role-dpd{background:#FEF3C7;color:#B45309;}
.role-upls{background:#E0F2FE;color:#0369A1;}
.status-on{color:#15803D;font-weight:700;}
.status-off{color:#B91C1C;font-weight:700;}

/* ---------- Print ---------- */
@media print{
  .no-print{display:none !important;}
  body{background:#fff;}
  .main{padding:0;}
  .table-wrap{border:none;max-height:none;overflow:visible;}
  table.data thead th{background:#f3f3f3 !important;color:#000 !important;}
  .card,.kpi{break-inside:avoid;}
}
