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

:root{
  --malam:#12182B;
  --kertas:#F6EFE0;
  --kertas-2:#EFE4CC;
  --marigold:#F5A524;
  --vermillion:#E4572E;
  --teal:#0F6B5C;
  --ink:#1C1C1C;
  --ink-soft:#4A4536;
  --paper-line:#DED2AE;
  --radius-md:18px;
}

*{box-sizing:border-box;}
body{
  margin:0;
  font-family:'Plus Jakarta Sans', sans-serif;
  background:var(--kertas);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3{
  font-family:'Big Shoulders Display', sans-serif;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:0.01em;
  margin:0;
}
a{color:inherit;}
:focus-visible{outline:3px solid var(--marigold); outline-offset:3px;}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 24px; border-radius:100px; border:none; cursor:pointer;
  font-weight:700; font-size:14.5px; font-family:'Plus Jakarta Sans';
  transition:transform .18s ease, box-shadow .18s ease;
}
.btn-primary{background:var(--vermillion); color:#fff; box-shadow:0 6px 0 0 #a83e1f;}
.btn-primary:hover{transform:translateY(-2px);}
.btn-block{width:100%;}

/* ---------- Auth pages ---------- */
.auth-wrap{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  padding:24px; background:
    radial-gradient(circle at 15% 15%, rgba(245,165,36,0.10), transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(228,87,46,0.10), transparent 40%),
    var(--malam);
}
.auth-card{
  width:100%; max-width:420px; background:var(--kertas); border-radius:24px;
  padding:36px 32px; box-shadow:0 30px 60px -20px rgba(0,0,0,0.5);
}
.auth-logo{display:flex; align-items:center; gap:10px; margin-bottom:26px;}
.auth-logo .mark{
  width:34px; height:34px; border-radius:9px; background:var(--malam);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.auth-logo .text{font-size:20px; font-weight:900;}
.auth-logo .text span{color:var(--vermillion);}
.auth-card h1{font-size:26px; text-transform:none; letter-spacing:0;}
.auth-sub{margin-top:6px; font-size:14px; color:var(--ink-soft); font-weight:600;}

.form-group{margin-top:20px;}
.form-group label{display:block; font-size:13px; font-weight:700; margin-bottom:7px; color:var(--ink-soft);}
.form-group input{
  width:100%; padding:12px 14px; border-radius:12px; border:1.5px solid var(--paper-line);
  font-size:14.5px; font-family:inherit; background:#fff; color:var(--ink);
}
.form-group input:focus{border-color:var(--vermillion); outline:none;}

.alert{
  margin-top:18px; padding:12px 14px; border-radius:12px; font-size:13.5px; font-weight:600;
}
.alert-error{background:#FDE8E1; color:#9c2c10; border:1px solid #f3b79f;}
.alert-success{background:#E7F2EF; color:#0a453b; border:1px solid #a9d8cd;}

.auth-footer{margin-top:24px; text-align:center; font-size:13px; color:var(--ink-soft); font-weight:600;}
.auth-footer a{color:var(--vermillion); font-weight:700;}

/* ---------- Error pages ---------- */
.error-page{min-height:100vh; display:flex; align-items:center; justify-content:center; background:var(--malam);}
.error-card{text-align:center; color:var(--kertas); max-width:360px; padding:24px;}
.error-code{font-family:'Big Shoulders Display'; font-size:96px; font-weight:900; color:var(--marigold); line-height:1;}
.error-card h1{font-size:22px; text-transform:none; margin-top:10px; color:var(--kertas);}
.error-card p{margin-top:10px; font-size:14.5px; color:#B9BFD6; font-weight:500;}
.error-card .btn{margin-top:22px;}

/* ---------- Admin dashboard ---------- */
.admin-shell{min-height:100vh; display:flex; flex-direction:column;}
.admin-body-row{display:flex; flex:1; min-height:0;}

.admin-sidebar{
  width:264px; flex-shrink:0; background:#fff; border-right:1px solid var(--paper-line);
  overflow-y:auto; padding:10px 0 40px; max-height:calc(100vh - 60px); position:sticky; top:60px;
}
.admin-sidebar-group{border-bottom:1px solid #F3EFE4;}
.admin-sidebar-group > summary{
  padding:11px 20px; font-weight:800; font-size:12.5px; color:var(--malam); cursor:pointer;
  list-style:none; display:flex; align-items:center; justify-content:space-between; user-select:none;
}
.admin-sidebar-group > summary::-webkit-details-marker{display:none;}
.admin-sidebar-group > summary::after{content:'▸'; font-size:10px; color:var(--ink-soft); transition:transform .15s;}
.admin-sidebar-group[open] > summary::after{transform:rotate(90deg);}
.admin-sidebar-sub-title{font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.03em; color:#B8B2A0; padding:10px 20px 3px;}
.admin-sidebar a{display:block; padding:6px 20px 6px 26px; font-size:12.8px; font-weight:600; color:var(--ink-soft); text-decoration:none; border-radius:0 20px 20px 0; margin-right:10px;}
.admin-sidebar a:hover{background:var(--kertas-2); color:var(--malam);}
.admin-sidebar a.active{background:var(--malam); color:#fff;}
.admin-sidebar-single{padding:11px 20px; font-weight:800; font-size:12.5px;}
.admin-sidebar-single a{padding:0; display:inline; border-radius:0; margin:0; font-weight:800; font-size:12.5px; color:var(--malam);}

.admin-content{flex:1; min-width:0; padding:28px 28px 60px; overflow-y:auto;}
.admin-menu-toggle{display:none; background:none; border:1.5px solid var(--paper-line); border-radius:10px; padding:7px 10px; cursor:pointer;}

@media (max-width: 900px) {
  .admin-body-row{position:relative;}
  .admin-sidebar{
    position:fixed; left:-280px; top:60px; bottom:0; z-index:50; box-shadow:2px 0 20px rgba(0,0,0,.12);
    transition:left .2s; max-height:none;
  }
  .admin-shell.sidebar-open .admin-sidebar{left:0;}
  .admin-shell.sidebar-open::after{content:''; position:fixed; inset:60px 0 0 0; background:rgba(18,24,43,.35); z-index:40;}
  .admin-menu-toggle{display:inline-flex;}
  .admin-content{padding:20px 16px 60px;}
}

.admin-page-title{font-family:'Big Shoulders Display'; font-size:28px; font-weight:800; color:var(--malam); margin-bottom:4px;}
.admin-breadcrumb{font-size:12px; color:var(--ink-soft); font-weight:700; margin-bottom:18px;}
.admin-filter-tabs{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:18px;}
.admin-filter-tab{padding:7px 14px; border-radius:20px; background:#fff; border:1.5px solid var(--paper-line); font-size:12.5px; font-weight:700; color:var(--ink-soft); text-decoration:none;}
.admin-filter-tab.active{background:var(--malam); color:#fff; border-color:var(--malam);}
.admin-table{width:100%; border-collapse:collapse; background:#fff; border-radius:14px; overflow:hidden; box-shadow:0 1px 3px rgba(0,0,0,.05);}
.admin-table th{background:var(--kertas-2); text-align:left; padding:10px 14px; font-size:11.5px; font-weight:800; text-transform:uppercase; color:var(--ink-soft); letter-spacing:.02em;}
.admin-table td{padding:11px 14px; font-size:13px; color:var(--malam); border-top:1px solid #F3EFE4;}
.admin-table tr:hover td{background:#FCFAF4;}
.admin-empty-row td{text-align:center; color:var(--ink-soft); font-weight:600; padding:30px;}
.admin-placeholder-box{background:#fff; border:1.5px dashed var(--paper-line); border-radius:16px; padding:40px 24px; text-align:center; color:var(--ink-soft); font-weight:600; font-size:13.5px;}
.admin-badge{display:inline-block; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:800;}
.admin-badge-verified{background:#E1F2EC; color:#0F6B5C;}
.admin-badge-pending{background:#FDF0D9; color:#95650a;}
.admin-badge-rejected{background:#FDE8E1; color:#9c2c10;}
.admin-badge-suspended{background:#2A2A2A; color:#fff;}
.admin-topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 28px; background:var(--malam); color:var(--kertas);
}
.admin-topbar .brand{display:flex; align-items:center; gap:10px; font-weight:900; font-size:18px;}
.admin-topbar .brand span{color:var(--marigold);}
.admin-user{display:flex; align-items:center; gap:14px; font-size:13.5px; font-weight:600;}
.logout-form{display:inline;}
.logout-btn{
  background:transparent; border:1.5px solid #3a4368; color:var(--kertas);
  padding:9px 16px; border-radius:100px; font-weight:700; font-size:13px; cursor:pointer;
}
.logout-btn:hover{border-color:var(--vermillion); color:var(--vermillion);}

.admin-main{flex:1; padding:36px 28px; max-width:1100px; margin:0 auto; width:100%;}
.admin-welcome h1{font-size:clamp(26px,4vw,36px); text-transform:none; color:var(--malam);}
.admin-welcome p{margin-top:8px; color:var(--ink-soft); font-weight:600; font-size:14.5px;}

.role-badges{display:flex; gap:8px; flex-wrap:wrap; margin-top:14px;}
.role-badge{
  font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:0.04em;
  background:var(--kertas-2); color:var(--ink-soft); padding:6px 12px; border-radius:100px;
}

.stat-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(220px,1fr)); gap:2px; margin-top:32px; background:var(--paper-line); border-radius:16px; overflow:hidden;}
.stat-card{background:#fff; padding:24px;}
.stat-card .num{font-family:'Big Shoulders Display'; font-size:36px; font-weight:900; color:var(--malam);}
.stat-card .label{font-size:13px; font-weight:700; color:var(--ink-soft); margin-top:4px;}

.notice-box{
  margin-top:32px; background:var(--kertas-2); border-radius:16px; padding:22px;
  font-size:14px; font-weight:600; color:var(--ink-soft); line-height:1.6;
}

/* ---------- Customer PWA Shell ---------- */
.cust-shell{min-height:100vh; display:flex; flex-direction:column; max-width:480px; margin:0 auto; background:var(--kertas); position:relative;}
.cust-topbar{background:var(--marigold); padding:22px 20px 26px; display:flex; align-items:center; justify-content:space-between;}
.cust-greet-label{font-size:12px; font-weight:700; color:#5b3c05; opacity:.8; margin:0;}
.cust-greet-name{font-size:18px; font-weight:800; color:var(--malam); margin:2px 0 0;}
.cust-avatar{
  width:42px; height:42px; border-radius:12px; background:var(--malam); color:var(--marigold);
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:16px; flex-shrink:0;
}
.cust-main{flex:1; padding:20px 20px 24px; overflow-y:auto;}

.cust-search{
  background:#fff; border:1.5px solid var(--paper-line); border-radius:14px; padding:13px 16px;
  display:flex; align-items:center; gap:10px; font-size:13.5px; font-weight:600; color:var(--ink-soft);
  margin-top:-14px; position:relative; z-index:2;
}

.cust-section-title{font-size:15px; font-weight:800; color:var(--malam); margin:24px 0 12px;}

.cust-category-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:12px;}
.cust-category-tile{
  background:#fff; border:1px solid var(--paper-line); border-radius:16px; padding:16px 10px;
  display:flex; flex-direction:column; align-items:center; text-align:center; gap:8px;
  text-decoration:none; color:inherit;
}
.cust-category-tile .cci{width:40px; height:40px; border-radius:12px; display:flex; align-items:center; justify-content:center;}
.cust-category-tile span{font-size:12px; font-weight:700; color:var(--ink);}
.cust-category-tile em{
  font-style:normal; font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:0.03em;
  color:var(--vermillion); background:#FDE8E1; padding:2px 6px; border-radius:100px;
}

.cust-promo-strip{
  margin-top:26px; background:var(--kertas-2); border-radius:14px; padding:14px 16px;
  font-size:13px; font-weight:600; color:var(--ink-soft); line-height:1.5;
}

.cust-empty-state{
  margin-top:40px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:14px; padding:0 12px;
}
.cust-empty-icon{width:64px; height:64px; border-radius:20px; background:var(--kertas-2); display:flex; align-items:center; justify-content:center;}
.cust-empty-state h3{font-size:17px; text-transform:none; font-family:'Plus Jakarta Sans'; font-weight:800; letter-spacing:0; color:var(--malam);}
.cust-empty-state p{font-size:13.5px; color:var(--ink-soft); font-weight:500; line-height:1.6; max-width:300px;}

.cust-wallet-card{background:var(--malam); border-radius:18px; padding:24px; color:var(--kertas);}
.cwc-label{font-size:12.5px; font-weight:700; color:#B9BFD6; margin:0;}
.cwc-amount{font-family:'Big Shoulders Display'; font-size:34px; font-weight:900; margin:4px 0 16px; color:var(--marigold);}
.cwc-actions{display:flex; gap:10px;}
.cwc-btn{flex:1; padding:11px; border-radius:100px; border:1.5px solid #3a4368; background:transparent; color:#7C84A6; font-weight:700; font-size:13px;}

.cust-card{background:#fff; border:1px solid var(--paper-line); border-radius:16px; padding:20px; margin-top:18px;}
.cust-card:first-of-type{margin-top:4px;}
.cust-card h3{font-size:15px; text-transform:none; font-family:'Plus Jakarta Sans'; font-weight:800; letter-spacing:0; margin-bottom:14px; color:var(--malam);}

.cust-bottomnav{
  position:sticky; bottom:0; left:0; right:0; background:#fff; border-top:1px solid var(--paper-line);
  display:flex; justify-content:space-around; padding:10px 6px calc(10px + env(safe-area-inset-bottom));
}
.cbn-item{display:flex; flex-direction:column; align-items:center; gap:4px; font-size:10.5px; font-weight:700; color:var(--ink-soft); flex:1;}
.cbn-item svg{opacity:.7;}
.cbn-item.active{color:var(--vermillion);}
.cbn-item.active svg{opacity:1;}

.account-type-toggle{display:flex; flex-wrap:wrap; gap:10px;}
.att-option{
  flex:1 1 calc(50% - 5px); min-width:110px; position:relative; border:1.5px solid var(--paper-line); border-radius:12px; padding:12px;
  text-align:center; font-weight:700; font-size:13.5px; color:var(--ink-soft); cursor:pointer;
}
.att-option input{position:absolute; opacity:0; inset:0; cursor:pointer; margin:0;}
.att-option:has(input:checked){border-color:var(--vermillion); background:#FDE8E1; color:#9c2c10;}

/* ---------- Transportasi: pilih kendaraan ---------- */
.vehicle-type-list{display:flex; flex-direction:column; gap:8px;}
.vt-option{
  position:relative; display:flex; justify-content:space-between; align-items:center;
  background:#fff; border:1.5px solid var(--paper-line); border-radius:14px; padding:14px 16px; cursor:pointer;
}
.vt-option input{position:absolute; opacity:0; inset:0; cursor:pointer; margin:0;}
.vt-option:has(input:checked){border-color:var(--vermillion); background:#FDE8E1;}
.vt-name{font-weight:700; font-size:14px; color:var(--ink);}
.vt-price{font-weight:700; font-size:12.5px; color:var(--ink-soft);}

/* ---------- Transportasi: peta ---------- */
.map-toggle-row{display:flex; gap:8px; margin-bottom:10px;}
.map-toggle-btn{
  flex:1; padding:10px; border-radius:10px; border:1.5px solid var(--paper-line); background:#fff;
  font-weight:700; font-size:12.5px; color:var(--ink-soft);
}
.map-toggle-btn.active{border-color:var(--vermillion); background:#FDE8E1; color:#9c2c10;}
.map-locate-btn{
  width:100%; padding:10px; border-radius:10px; border:1.5px dashed var(--paper-line); background:transparent;
  font-weight:700; font-size:12.5px; color:var(--ink-soft); margin-bottom:12px;
}
.order-map{width:100%; height:260px; border-radius:16px; overflow:hidden; margin-bottom:16px; border:1px solid var(--paper-line);}
.map-pin{width:22px; height:22px; border-radius:50% 50% 50% 0; transform:rotate(-45deg); border:3px solid #fff; box-shadow:0 2px 6px rgba(0,0,0,0.3);}
.pin-pickup{background:#0F6B5C;}
.pin-dropoff{background:#E4572E;}

.fare-estimate-box{background:var(--malam); border-radius:16px; padding:18px; margin-top:18px; text-align:center;}
.feb-label{font-size:12px; font-weight:700; color:#B9BFD6; margin:0;}
.feb-amount{font-family:'Big Shoulders Display'; font-size:32px; font-weight:900; color:var(--marigold); margin:4px 0;}
.feb-detail{font-size:12px; font-weight:600; color:#B9BFD6; margin:0;}

/* ---------- Kartu riwayat order ---------- */
.order-row-card{
  display:block; background:#fff; border:1px solid var(--paper-line); border-radius:16px; padding:16px;
  margin-top:12px; text-decoration:none; color:inherit;
}
.order-row-card:first-of-type{margin-top:4px;}
.orc-top{display:flex; justify-content:space-between; align-items:center;}
.orc-code{font-weight:800; font-size:13px; color:var(--malam);}
.orc-status{font-size:10.5px; font-weight:800; text-transform:uppercase; padding:4px 9px; border-radius:100px; letter-spacing:0.02em;}
.orc-vehicle{font-size:13.5px; font-weight:700; color:var(--ink); margin-top:8px;}
.orc-route{font-size:12.5px; color:var(--ink-soft); font-weight:500; margin-top:4px;}
.orc-bottom{display:flex; justify-content:space-between; align-items:center; margin-top:10px; font-size:12px; color:var(--ink-soft); font-weight:600;}
.orc-fare{font-weight:800; color:var(--vermillion);}

.status-pending{background:#FDF0D9; color:#95650a;}
.status-confirmed, .status-accepted{background:#E1F0FB; color:#1E6FA8;}
.status-processing, .status-on_the_way{background:#F1E8FB; color:#6B3FA0;}
.status-completed{background:#E7F2EF; color:#0a453b;}
.status-cancelled, .status-failed{background:#FDE8E1; color:#9c2c10;}
.status-refunded{background:var(--kertas-2); color:var(--ink-soft);}

/* ---------- Rating bintang ---------- */
.rating-stars{display:flex; gap:8px; font-size:32px; margin-bottom:14px;}
.rating-star{background:none; border:none; color:var(--paper-line); cursor:pointer; padding:0; line-height:1;}
.rating-star.filled{color:var(--marigold);}

/* ---------- Panel Driver ---------- */
.driver-status-card{display:flex; justify-content:space-between; align-items:center; gap:12px;}
.driver-status-value{font-family:'Big Shoulders Display'; font-size:22px; font-weight:900; text-transform:uppercase; margin:2px 0;}
.driver-status-value.status-online{color:#0F6B5C;}
.driver-status-value.status-offline{color:var(--ink-soft);}
.driver-status-value.status-busy{color:var(--vermillion);}

/* ---------- Tracking Paket ---------- */
.tracking-list{display:flex; flex-direction:column;}
.tracking-item{display:flex; gap:12px; position:relative; padding-bottom:20px;}
.tracking-item:last-child{padding-bottom:0;}
.tracking-item::before{
  content:''; position:absolute; left:5px; top:14px; bottom:-6px; width:2px; background:var(--paper-line);
}
.tracking-item:last-child::before{display:none;}
.tracking-dot{width:12px; height:12px; border-radius:50%; background:var(--vermillion); flex-shrink:0; margin-top:3px; z-index:1;}
.tracking-status{font-size:13px; font-weight:800; color:var(--malam); text-transform:uppercase; letter-spacing:0.02em;}
.tracking-note{font-size:12.5px; color:var(--ink-soft); font-weight:500; margin-top:2px;}
.tracking-time{font-size:11.5px; color:var(--ink-soft); font-weight:600; margin-top:3px; opacity:.8;}
