﻿    :root{
      --bg:#0f1115;
      --panel:#171a21;
      --panel2:#1f232d;
      --line:#2c3240;
      --text:#eef1f6;
      --muted:#9aa4b2;
      --green:#3ddc84;
      --yellow:#ffd166;
      --red:#ff5c5c;
      --blue:#5aa9ff;
      --white:#fff;
      --shadow:0 16px 40px rgba(0,0,0,.35);
      --radius:18px;
    }
    *{box-sizing:border-box}
    body{
      margin:0;
      font-family:Inter,system-ui,Segoe UI,Arial,sans-serif;
      background:linear-gradient(135deg,#0c0e12,#151821);
      color:var(--text);
    }
    .app{display:flex;min-height:100vh}
    .sidebar{
      width:260px;
      background:#0b0d11;
      border-right:1px solid var(--line);
      padding:24px 18px;
      position:fixed;
      top:0;bottom:0;left:0;
    }
    .brand{
      display:flex;
      align-items:center;
      gap:12px;
      margin-bottom:32px;
    }
    .logo{
      width:42px;height:42px;
      border-radius:12px;
      background:linear-gradient(135deg,#d7d7d7,#555);
      display:flex;
      align-items:center;
      justify-content:center;
      color:#111;
      font-weight:900;
    }
    .brand h1{font-size:18px;margin:0}
    .brand span{font-size:12px;color:var(--muted)}
    .nav button{
      width:100%;
      display:flex;
      align-items:center;
      gap:10px;
      background:transparent;
      color:var(--muted);
      border:0;
      padding:14px 14px;
      border-radius:12px;
      cursor:pointer;
      font-size:14px;
      text-align:left;
    }
    .nav button:hover,.nav button.active{
      background:var(--panel2);
      color:var(--text);
    }
    .main{
      margin-left:260px;
      width:calc(100% - 260px);
      padding:28px;
    }
    .topbar{
      display:flex;
      justify-content:space-between;
      align-items:center;
      gap:16px;
      margin-bottom:24px;
    }
    .topbar h2{margin:0;font-size:26px}
    .topbar p{margin:5px 0 0;color:var(--muted)}
    .btn{
      border:0;
      border-radius:12px;
      padding:11px 16px;
      background:var(--blue);
      color:white;
      cursor:pointer;
      font-weight:700;
    }
    .btn.secondary{background:#313846}
    .btn.danger{background:var(--red)}
    .btn.good{background:#209f63}
    .grid{
      display:grid;
      grid-template-columns:repeat(4,1fr);
      gap:16px;
      margin-bottom:20px;
    }
    .card{
      background:rgba(23,26,33,.96);
      border:1px solid var(--line);
      border-radius:var(--radius);
      padding:18px;
      box-shadow:var(--shadow);
    }
    .metric{font-size:28px;font-weight:900;margin-top:8px}
    .label{color:var(--muted);font-size:13px}
    .row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
    .space{justify-content:space-between}
    .section{display:none}
    .section.active{display:block}
    table{
      width:100%;
      border-collapse:collapse;
      overflow:hidden;
      border-radius:14px;
    }
    th,td{
      padding:14px;
      border-bottom:1px solid var(--line);
      text-align:left;
      font-size:14px;
    }
    th{color:var(--muted);font-weight:600;background:#11141a}
    th.sortable{cursor:pointer;user-select:none}
    th.sortable:hover{color:var(--text)}
    .status{
      display:inline-flex;
      align-items:center;
      gap:6px;
      padding:6px 10px;
      border-radius:999px;
      font-size:12px;
      font-weight:800;
    }
    .status.green{background:rgba(61,220,132,.13);color:var(--green)}
    .status.yellow{background:rgba(255,209,102,.13);color:var(--yellow)}
    .status.red{background:rgba(255,92,92,.13);color:var(--red)}
    .form{
      display:grid;
      grid-template-columns:repeat(2,1fr);
      gap:14px;
    }
    .field label{display:block;color:var(--muted);font-size:12px;margin-bottom:8px}
    input,select,textarea{
      width:100%;
      background:#10131a;
      border:1px solid var(--line);
      color:var(--text);
      padding:12px 13px;
      border-radius:12px;
      outline:none;
    }
    textarea{min-height:90px;resize:vertical}
    .full{grid-column:1/-1}
    .qr{
      width:190px;height:190px;
      border-radius:16px;
      background:
        linear-gradient(90deg,#111 10px,transparent 10px) 0 0/24px 24px,
        linear-gradient(#111 10px,transparent 10px) 0 0/24px 24px,
        #f2f2f2;
      border:10px solid #fff;
      margin:auto;
      cursor:pointer;
      transition:transform .15s,box-shadow .15s;
    }
    .qr:hover{transform:scale(1.04);box-shadow:0 0 0 3px var(--blue);}
    .qr-lightbox{
      display:none;position:fixed;inset:0;z-index:10000;
      background:rgba(0,0,0,.82);
      align-items:center;justify-content:center;flex-direction:column;gap:18px;
    }
    .qr-lightbox.open{display:flex;}
    .qr-lightbox-inner{
      background:#fff;border-radius:20px;padding:20px;
      box-shadow:0 24px 60px rgba(0,0,0,.5);
    }
    .qr-lightbox-close{
      background:var(--panel);border:1px solid var(--line);
      color:var(--text);padding:10px 28px;border-radius:10px;
      font-size:15px;cursor:pointer;
    }
    .qr-lightbox-close:hover{background:var(--panel2);}
    .code{
      background:#0b0d11;
      border:1px solid var(--line);
      padding:14px;
      border-radius:12px;
      color:#cfe7ff;
      font-family:ui-monospace,Consolas,monospace;
      font-size:13px;
      overflow:auto;
      white-space:pre;
    }
    .jk{color:#7ec8e3}
    .js{color:#a8ff78}
    .jn{color:#ffd166}
    .jb{color:#ff9f43}
    .jz{color:#9aa4b2}
    .jp{color:#eef1f6}
    .split{
      display:grid;
      grid-template-columns:1.2fr .8fr;
      gap:16px;
    }
    .pill{
      background:#10131a;
      border:1px solid var(--line);
      border-radius:999px;
      padding:8px 12px;
      color:var(--muted);
      font-size:13px;
    }
    @keyframes fadeIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
    @media(max-width:900px){
      /* Kunci halaman: tidak boleh ada geser samping di HP */
      html,body{max-width:100%;overflow-x:hidden}
      .app{display:block;max-width:100%;overflow-x:hidden}

      /* Sidebar jadi bar atas yang ringkas; nav bisa di-scroll horizontal */
      .sidebar{
        position:relative;
        width:100%;
        height:auto;
        padding:14px 14px 8px;
        border-right:0;
        border-bottom:1px solid var(--line);
      }
      .brand{margin-bottom:14px}
      .nav{
        display:flex;
        flex-wrap:nowrap;
        gap:8px;
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
        padding-bottom:6px;
      }
      .nav button{
        width:auto;
        white-space:nowrap;
        padding:10px 14px;
      }

      .main{margin-left:0;width:100%;max-width:100%;min-width:0;padding:16px}
      .grid,.form,.split{grid-template-columns:1fr}

      /* Topbar menumpuk biar tombol tidak tumpang tindih */
      .topbar{flex-direction:column;align-items:flex-start}
      .topbar h2{font-size:22px}

      /* Tabel di-scroll di dalam card, bukan menjebol lebar halaman */
      .card{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
      .card > table{min-width:560px}

      /* Map GPS menyesuaikan tinggi layar HP (override inline style) */
      #gps .card{height:calc(100dvh - 220px)!important}
    }

    @media(max-width:600px){
      .main{padding:12px}
      .topbar h2{font-size:20px}
      .metric{font-size:24px}

      /* Input/elemen lebar tetap jadi fleksibel di layar kecil */
      .row > input,
      .row > select{width:100%!important;min-width:0!important;flex:1 1 100%}
      input[type=file]{max-width:100%!important}

      th,td{padding:10px;font-size:13px}
    }

    .login-screen{
      position:fixed;
      inset:0;
      background:linear-gradient(135deg,#0b0d11,#1b1f2a);
      display:flex;
      align-items:center;
      justify-content:center;
      z-index:9999;
      padding:24px;
    }
    .login-card{
      width:100%;
      max-width:420px;
      background:rgba(23,26,33,.98);
      border:1px solid var(--line);
      border-radius:24px;
      padding:30px;
      box-shadow:var(--shadow);
    }
    .login-card .logo{
      margin-bottom:16px;
    }
    .login-card h2{
      margin:0 0 6px;
      font-size:26px;
    }
    .login-card p{
      margin:0 0 22px;
      color:var(--muted);
    }
    .login-error{
      display:none;
      margin-top:12px;
      color:var(--red);
      font-size:13px;
    }
    .hidden{display:none!important}


    .brand-logo-img{
      width:190px;
      max-width:100%;
      height:auto;
      display:block;
      object-fit:contain;
    }
    .login-logo-img{
      width:220px;
      max-width:100%;
      height:auto;
      display:block;
      margin-bottom:18px;
    }
    .brand{
      align-items:flex-start;
    }
