:root{--nav:#0d3559;--nav2:#0b2c4b;--blue:#2d8fe3;--text:#103858;--muted:#7890a7;--bg:#f4f8fc;--line:#dce8f2;--card:#fff;--green:#20ad6b;--orange:#ea9813;--purple:#6658db;--red:#c84b4b;--shadow:0 10px 28px rgba(30,72,110,.07)}
*{box-sizing:border-box}html,body{margin:0;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}button{cursor:pointer}.app{min-height:100vh;display:flex}
.sidebar{width:243px;position:fixed;inset:0 auto 0 0;background:linear-gradient(180deg,var(--nav),var(--nav2));color:#fff;padding:18px 8px;overflow:auto}.brand{display:flex;align-items:center;gap:10px;padding:0 10px 20px}.brand img{width:58px;height:54px;object-fit:contain}.brand b{font-size:25px;line-height:1}.brand small{display:block;color:#a9c6dd;font-size:16px;margin-top:5px}
.menu{display:flex;flex-direction:column;gap:7px}.menu button{border:0;background:transparent;color:#fff;text-align:left;border-radius:10px;padding:14px 16px;font-size:16px;display:flex;gap:12px;align-items:center}.menu button:hover{background:rgba(255,255,255,.07)}.menu button.active{background:#2d8fe3}.icon{width:22px;text-align:center}.sub{padding-left:50px!important;font-size:14px!important;color:#c9dded!important;padding-top:8px!important;padding-bottom:8px!important}
.main{margin-left:243px;width:calc(100% - 243px);min-height:100vh;padding:24px 26px 50px}.top{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:20px}.title{font-size:34px;font-weight:850;letter-spacing:-.6px;margin:0}.subtitle{color:#8197ad;margin:4px 0 0}.unit{text-align:right;line-height:1.35}.unit b{display:block}.unit small{color:#547492}
.page{display:none}.page.active{display:block}.stats{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:12px;margin-bottom:18px}.stat{background:#fff;border:1px solid var(--line);border-radius:13px;padding:15px;box-shadow:var(--shadow)}.stat .row{display:flex;gap:10px;align-items:center}.bubble{width:45px;height:45px;border-radius:50%;display:grid;place-items:center;background:#e8f4ff;color:#1878c9;font-size:20px}.stat:nth-child(2) .bubble,.stat:nth-child(5) .bubble{background:#e8f8f0;color:var(--green)}.stat:nth-child(3) .bubble{background:#fff2df;color:var(--orange)}.stat:nth-child(4) .bubble{background:#eeeaff;color:var(--purple)}.value{font-size:28px;font-weight:850}.label{font-size:13px}
.panel{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:17px;margin-bottom:18px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.panel h2{font-size:21px;margin:0}.link{border:0;background:none;color:#1476cf;font-weight:700}.grid2{display:grid;grid-template-columns:1.2fr 1fr;gap:16px}.grid3{display:grid;grid-template-columns:1.1fr 1fr .9fr;gap:16px}
.table{overflow:auto;border:1px solid #e2ebf3;border-radius:10px}table{width:100%;border-collapse:collapse;min-width:760px}th{background:#edf4fa;text-align:left;color:#2d5476;padding:11px;font-size:13px}td{padding:11px;border-top:1px solid #e6eef5;font-size:13px;vertical-align:middle}.progress{height:10px;background:#e5edf5;border-radius:99px;overflow:hidden;min-width:130px}.fill{height:100%;border-radius:99px;background:#20b76a}.badge{display:inline-flex;border-radius:99px;padding:6px 10px;font-size:12px;font-weight:750;white-space:nowrap}.green{background:#e7f8ef;color:#168253}.blue{background:#e4f2ff;color:#176fc0}.orange{background:#fff1d6;color:#c87b00}.purple{background:#eeeaff;color:#574dcc}.gray{background:#eef2f6;color:#667a8d}
.btn{border:0;border-radius:9px;background:#1976d2;color:#fff;padding:10px 14px;font-weight:750}.btn.secondary{background:#eaf3fb;color:#156eb8}.btn.danger{background:#fee9e9;color:#be3f3f}.toolbar{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:14px}.toolbar>div{display:flex;gap:9px;flex-wrap:wrap}input,select,textarea{border:1px solid #cadbe8;border-radius:9px;padding:10px 11px;background:#fff;color:#173b5c;outline:none}input:focus,select:focus,textarea:focus{border-color:#3997e6;box-shadow:0 0 0 3px rgba(57,151,230,.12)}.toolbar input,.toolbar select{min-width:180px}.form{display:grid;grid-template-columns:1fr 1fr;gap:14px}.field{display:flex;flex-direction:column;gap:6px}.field.full{grid-column:1/-1}label{font-size:13px;font-weight:700}.tabs{display:flex;gap:8px;margin-bottom:14px}.tab{border:1px solid #d7e3ee;background:#fff;border-radius:9px;padding:9px 14px;font-weight:700;color:#416480}.tab.active{background:#e9f4ff;color:#1575c7}.empty{text-align:center;padding:24px;color:#8297aa}.notice{background:#e8f8f0;color:#177b51;padding:11px;border-radius:9px;margin-bottom:12px}.warn{background:#fff3dd;color:#9b6500;padding:11px;border-radius:9px;margin-bottom:12px}.timeline{display:grid;grid-template-columns:12px 1fr;gap:9px;margin:11px 0}.dot{width:8px;height:8px;border-radius:50%;background:#2d91e2;margin-top:5px}.timeline b{font-size:13px}.timeline small{display:block;color:#7f94a8;margin-top:3px}.toast{position:fixed;right:20px;bottom:20px;background:#103b61;color:#fff;padding:11px 15px;border-radius:9px;display:none;z-index:999}.toast.show{display:block}
@media(max-width:1100px){.stats{grid-template-columns:repeat(3,1fr)}.grid2,.grid3{grid-template-columns:1fr}}@media(max-width:760px){.sidebar{position:static;width:100%}.main{margin:0;width:100%;padding:16px}.menu{display:grid;grid-template-columns:1fr 1fr}.top{flex-direction:column}.unit{text-align:left}.stats{grid-template-columns:repeat(2,1fr)}.title{font-size:28px}.form{grid-template-columns:1fr}}
/* ===== MOBILE BROWSER V2 ===== */
.mobile-header,.mobile-bottom,.mobile-more,.mobile-more-backdrop{display:none}
.ui-icon{display:inline-grid;place-items:center;flex:0 0 auto}
.ui-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.bubble .ui-icon svg{width:21px;height:21px}
.mobile-branch{line-height:1.05}
.mobile-branch b,.mobile-branch span{display:block}

@media(max-width:760px){
  html{background:#f3f7fb}
  body{background:#f3f7fb;overflow-x:hidden;padding-bottom:68px}
  .app{display:block;min-height:100vh}
  .sidebar{display:none!important}
  .main{margin:0;width:100%;min-height:100vh;padding:0 11px 78px}
  .mobile-header{display:flex;position:sticky;top:0;z-index:35;align-items:center;justify-content:space-between;gap:10px;padding:8px 4px 7px;background:rgba(248,251,254,.94);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:1px solid rgba(201,218,232,.7)}
  .mobile-brand{display:flex;align-items:center;gap:8px;min-width:0}
  .mobile-logo{width:36px;height:31px;object-fit:contain;flex:none}
  .mobile-brand-copy{display:flex;align-items:center;gap:8px;min-width:0}
  .mobile-brand-copy strong{font-size:12.5px;line-height:1;font-weight:850;color:#103858;white-space:nowrap}
  .mobile-branch{padding-left:8px;border-left:1px solid #dbe6ef;color:#355f82;font-size:9.5px;font-weight:760;white-space:nowrap}
  .mobile-role{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:#1677d2;color:white;font-size:10px;font-weight:850;box-shadow:0 4px 12px rgba(22,119,210,.2)}
  .top{display:block;margin:10px 1px 10px;padding:0}
  .top .unit{display:none}
  .title{font-size:19px;line-height:1.12;letter-spacing:-.25px;margin:0}
  .subtitle{font-size:10.5px;line-height:1.35;margin-top:3px;color:#7890a7}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:10px}
  .stat{min-height:67px;padding:9px 9px;border-radius:11px;box-shadow:0 4px 14px rgba(30,72,110,.055)}
  .stat .row{gap:7px}
  .bubble{width:31px;height:31px;font-size:15px;border-radius:9px}
  .bubble .ui-icon svg{width:17px;height:17px}
  .label{font-size:9.5px;line-height:1.16}
  .value{font-size:21px;line-height:1.05;margin-top:2px}
  .panel{padding:11px;margin-bottom:9px;border-radius:12px;box-shadow:0 4px 14px rgba(30,72,110,.05)}
  .panel-head{gap:8px;margin-bottom:9px}
  .panel h2{font-size:14.5px;line-height:1.2}
  .link{font-size:10px;padding:3px 0}
  .grid2,.grid3{grid-template-columns:1fr;gap:8px}
  .notice,.warn{font-size:10.5px;line-height:1.35;padding:8px;border-radius:8px;margin-bottom:9px}
  .toolbar{gap:7px;margin-bottom:9px}
  .toolbar>div{width:100%;gap:6px;display:grid;grid-template-columns:minmax(0,1.4fr) minmax(100px,.6fr)}
  .toolbar input,.toolbar select{min-width:0;width:100%}
  input,select,textarea{font-size:12px;padding:8px 9px;border-radius:8px;min-height:36px}
  .btn{font-size:10.5px;padding:8px 10px;border-radius:8px}
  .toolbar>.btn{width:100%}
  .tabs{gap:6px;margin-bottom:10px}
  .tab{font-size:11px;padding:8px 10px;flex:1}
  .form{grid-template-columns:1fr;gap:9px}
  label{font-size:10.5px}
  .badge{font-size:9px;padding:4px 7px}
  .progress{height:6px;min-width:75px}
  .timeline{grid-template-columns:9px 1fr;gap:7px;margin:8px 0}
  .dot{width:6px;height:6px;margin-top:4px}
  .timeline b{font-size:10.5px}
  .timeline small{font-size:9.5px;margin-top:2px}

  .table{overflow:visible;border:0;border-radius:0;background:transparent}
  table{display:block;min-width:0;width:100%}
  thead{display:none}
  tbody{display:grid;gap:7px;width:100%}
  tr{display:block;width:100%;background:#fff;border:1px solid #e1ebf3;border-radius:11px;padding:7px 9px;box-shadow:0 3px 12px rgba(30,72,110,.045)}
  td{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;border:0;padding:4px 0;font-size:10.5px;line-height:1.25;min-width:0;text-align:right}
  td::before{content:attr(data-label);font-size:9px;font-weight:750;color:#8197aa;text-align:left;flex:0 0 auto;max-width:42%}
  td[data-label=""]::before{display:none}
  td .progress{flex:1}
  td .btn{white-space:nowrap}
  .empty{padding:16px 8px;font-size:10.5px}
  .modal{padding:16px;border-radius:14px}
  .modal h3{font-size:16px;margin-top:0}
  .modal p{font-size:11px}
  .actions{gap:7px;margin-top:12px}
  .actions .btn{flex:1}
  .toast{right:10px;left:10px;bottom:66px;font-size:11px;text-align:center;padding:9px 11px}

  .mobile-bottom{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:7px;right:7px;bottom:max(5px,env(safe-area-inset-bottom));z-index:50;height:54px;padding:4px 4px;background:rgba(255,255,255,.96);border:1px solid #dbe6ef;border-radius:15px;box-shadow:0 8px 28px rgba(15,53,89,.16);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
  .mobile-bottom button{border:0;background:transparent;color:#58738b;border-radius:10px;padding:2px 1px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:0}
  .mobile-nav-icon{width:29px;height:25px;display:grid;place-items:center;border-radius:8px;color:#52718e;transition:.15s ease}
  .mobile-nav-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .mobile-bottom small{font-size:8px;line-height:1;color:#58738b;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
  .mobile-bottom button.active .mobile-nav-icon{width:29px;height:25px;background:#1677e8;color:#fff;box-shadow:0 4px 10px rgba(22,119,232,.2)}
  .mobile-bottom button.active small{color:#1677e8;font-weight:800}

  .mobile-more-backdrop{position:fixed;inset:0;z-index:59;background:rgba(10,37,61,.28)}
  .mobile-more-backdrop.show{display:block}
  .mobile-more{position:fixed;display:none;left:9px;right:9px;bottom:65px;z-index:60;background:#fff;border:1px solid #dbe7f1;border-radius:15px;padding:7px;box-shadow:0 18px 45px rgba(13,53,89,.22)}
  .mobile-more.show{display:block}
  .mobile-more button{width:100%;border:0;background:#fff;color:#173b5c;padding:10px 9px;border-radius:9px;display:flex;align-items:center;gap:9px;text-align:left;font-size:11.5px}
  .mobile-more button+button{border-top:1px solid #edf2f7}
  .mobile-more button:active{background:#eef6fd}
  .mobile-more .ui-icon{color:#1878d0}
  .mobile-more .ui-icon svg{width:17px;height:17px}

  .preview{max-height:220px}
}

/* Attribution for SPK Tracker — Hublang & Teknik */
/* Keep credits in the footer only, understated but readable. */
.app-credit-byline{display:none}
.app-credits{margin-top:28px;padding:11px 0 3px;border:0;border-top:1px solid #dde6ed;border-radius:0;background:transparent;display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 18px;box-shadow:none;color:#8294a4;font-size:11px;line-height:1.45}
.app-credits>div>span:first-child{display:inline;font-size:11px;font-weight:500;color:#7d8f9d}
.app-credits strong{display:inline;margin:0;color:#607688;font-size:11px;font-weight:600;line-height:inherit;overflow-wrap:anywhere}
.app-credits .credits-meta{display:inline;margin:0;color:#98a7b4;font-size:10px}
@media(max-width:760px){.app-credits{margin-top:18px;padding:10px 0 2px;gap:5px 14px;font-size:10px}.app-credits strong{font-size:10px}.app-credits>div>span:first-child{font-size:10px}.app-credits .credits-meta{font-size:10px}}
