/* ================================================
   GoApp — Design System CSS
   Putih bersih, aksen hijau #00AA5B
================================================ */
:root {
  --green:      #00AA5B;
  --green-dark: #008A49;
  --green-light:#E8F8F0;
  --red:        #FF4757;
  --orange:     #FF8C00;
  --blue:       #2196F3;
  --text:       #1a1a1a;
  --text2:      #666;
  --text3:      #aaa;
  --bg:         #f5f5f5;
  --white:      #ffffff;
  --border:     #eee;
  --shadow:     0 2px 12px rgba(0,0,0,.08);
  --radius:     12px;
  --radius-lg:  18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body { font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
input, textarea, select, button { font-family: inherit; }

/* ── TYPOGRAPHY ─────────────────────────────── */
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
h4 { font-size: 15px; font-weight: 600; }
p  { line-height: 1.6; }

/* ── LAYOUT ─────────────────────────────────── */
.container   { max-width: 480px; margin: 0 auto; padding: 0 16px; }
.container-lg{ max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.page-wrap   { min-height: 100vh; display: flex; flex-direction: column; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }

/* ── CARD ────────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius);
  padding: 16px; border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.card-flat { background: var(--white); border-radius: var(--radius); padding: 16px; border: 1px solid var(--border); }

/* ── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; border: none; border-radius: var(--radius);
  padding: 12px 20px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .15s; width: 100%;
}
.btn:active { transform: scale(.97); }
.btn-primary   { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline   { background: #fff; color: var(--green); border: 1.5px solid var(--green); }
.btn-outline:hover { background: var(--green-light); }
.btn-red       { background: var(--red); color: #fff; }
.btn-gray      { background: #f5f5f5; color: var(--text2); border: 1px solid var(--border); }
.btn-sm        { padding: 8px 14px; font-size: 13px; border-radius: 8px; width: auto; }

/* ── FORM ────────────────────────────────────── */
.form-group    { margin-bottom: 16px; }
.form-label    { display: block; font-size: 12px; font-weight: 700; color: var(--text2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.form-control  {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 15px; color: var(--text);
  background: #f8f8f8; outline: none; transition: border-color .2s;
}
.form-control:focus { border-color: var(--green); background: #fff; }
.form-control::placeholder { color: #bbb; }
.form-select  { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-hint    { font-size: 12px; color: var(--text3); margin-top: 4px; }
.form-error   { font-size: 12px; color: var(--red); margin-top: 4px; }

/* Upload area */
.upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 24px 16px; text-align: center; cursor: pointer;
  transition: all .2s; background: #fafafa;
}
.upload-area:hover { border-color: var(--green); background: var(--green-light); }
.upload-area.has-file { border-color: var(--green); background: var(--green-light); }
.upload-icon  { font-size: 32px; margin-bottom: 8px; }
.upload-label { font-size: 13px; color: var(--text2); }
.upload-hint  { font-size: 11px; color: var(--text3); margin-top: 4px; }

/* OTP Input */
.otp-wrap { display: flex; gap: 10px; justify-content: center; margin: 16px 0; }
.otp-input {
  width: 46px; height: 56px; text-align: center;
  font-size: 22px; font-weight: 700; border: 2px solid var(--border);
  border-radius: 10px; background: #f8f8f8; outline: none;
  transition: border-color .2s;
}
.otp-input:focus { border-color: var(--green); background: #fff; }

/* ── HEADER ──────────────────────────────────── */
.app-header {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 14px 16px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.header-logo { font-size: 20px; font-weight: 800; color: var(--green); }

/* ── BOTTOM NAV ──────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--border);
  display: flex; padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  z-index: 100; box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 3px; cursor: pointer; padding: 4px 0;
}
.nav-icon  { font-size: 22px; }
.nav-label { font-size: 10px; font-weight: 600; color: var(--text3); }
.nav-item.active .nav-label { color: var(--green); }
.nav-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── SERVICE GRID ────────────────────────────── */
.service-card {
  background: #fff; border-radius: var(--radius);
  padding: 14px 8px; text-align: center;
  border: 1px solid var(--border); cursor: pointer;
  transition: all .15s; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.service-card:active { transform: scale(.94); }
.service-icon  { font-size: 28px; margin-bottom: 6px; }
.service-name  { font-size: 11px; font-weight: 700; color: var(--text); line-height: 1.2; }

/* ── BADGE ───────────────────────────────────── */
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.badge-green  { background: var(--green-light); color: var(--green); }
.badge-red    { background: #FFE8EC; color: var(--red); }
.badge-orange { background: #FFF3E0; color: var(--orange); }
.badge-gray   { background: #f5f5f5; color: var(--text2); }
.badge-blue   { background: #E3F2FD; color: var(--blue); }

/* ── ALERT ───────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 14px; font-size: 13px; line-height: 1.5; }
.alert-success { background: var(--green-light); color: #27500A; border: 1px solid #c8ecd8; }
.alert-error   { background: #FCEBEB; color: #A32D2D; border: 1px solid #f5c1c1; }
.alert-warning { background: #FAEEDA; color: #633806; border: 1px solid #f5d18d; }
.alert-info    { background: #E3F2FD; color: #0C447C; border: 1px solid #b5d4f4; }

/* ── TOAST ───────────────────────────────────── */
.toast-container { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1a1a1a; color: #fff; padding: 11px 20px; border-radius: 24px; font-size: 13px; font-weight: 500; white-space: nowrap; animation: toastIn .3s ease; }
@keyframes toastIn { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }

/* ── MODAL ───────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 500; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; border-radius: 20px 20px 0 0; padding: 20px 20px max(20px,env(safe-area-inset-bottom)); width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.modal-handle { width: 36px; height: 4px; background: #eee; border-radius: 2px; margin: 0 auto 16px; }
.modal-title  { font-size: 18px; font-weight: 700; margin-bottom: 16px; }

/* ── GPS OVERLAY ─────────────────────────────── */
.gps-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.85);
  z-index: 9000; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 32px;
  text-align: center;
}
.gps-overlay.hidden { display: none; }
.gps-icon    { font-size: 72px; margin-bottom: 20px; animation: gpsAnim 1.5s infinite; }
.gps-title   { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.gps-desc    { font-size: 14px; color: rgba(255,255,255,.75); line-height: 1.6; margin-bottom: 24px; }
.gps-btn     { background: var(--green); color: #fff; border: none; border-radius: 14px; padding: 14px 32px; font-size: 16px; font-weight: 700; cursor: pointer; }
@keyframes gpsAnim { 0%,100%{transform:scale(1)} 50%{transform:scale(1.1)} }

/* ── LOADING ─────────────────────────────────── */
.spinner { width: 32px; height: 32px; border: 3px solid #eee; border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; }
.spinner-sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.8); z-index: 8000; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; }
.loading-text { font-size: 13px; color: var(--text2); }

/* ── DIVIDER ─────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.divider-text { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--text3); font-size: 13px; }
.divider-text::before, .divider-text::after { content:''; flex:1; height:1px; background: var(--border); }

/* ── MAP ─────────────────────────────────────── */
.map-container { width: 100%; height: 280px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.leaflet-container { background: #e8e0d8; }
.leaflet-control-zoom a { background: #fff!important; color: #333!important; }
.leaflet-control-attribution { font-size: 9px!important; }

/* ── UTILS ───────────────────────────────────── */
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--text2); }
.text-center { text-align: center; }
.text-sm     { font-size: 13px; }
.text-xs     { font-size: 11px; }
.fw-700      { font-weight: 700; }
.fw-800      { font-weight: 800; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.p-16  { padding: 16px; }
.hidden { display: none !important; }

/* ── RESPONSIVE ──────────────────────────────── */
@media (min-width: 768px) {
  .container { max-width: 600px; }
  .grid-4 { grid-template-columns: repeat(4,1fr); }
  .bottom-nav { max-width: 600px; left: 50%; transform: translateX(-50%); }
}
