@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;900&family=Barlow:wght@400;500;600;700&display=swap');

/* ============================================================
   BERTUKANG — Design System v1.0
   ============================================================ */
:root {
  --navy:         #1a2744;
  --navy-dark:    #111b33;
  --navy-mid:     #243358;
  --navy-light:   #2f4270;
  --navy-bg:      #eef1f7;
  --teal:         #1e7a5e;
  --teal-mid:     #2a9970;
  --teal-light:   #4db890;
  --teal-bg:      #e6f4ef;
  --teal-border:  #9fdeca;
  --silver:       #b0bec5;
  --silver-light: #e8ecee;
  --gold:         #e8a020;
  --gold-bg:      #fef3d8;
  --danger:       #dc3545;
  --danger-bg:    #fde8ea;
  --text:         #1a2744;
  --text-sub:     #4a5568;
  --text-muted:   #8a9ab0;
  --border:       #dde4ed;
  --bg:           #f4f6f9;
  --card:         #ffffff;
  --input-bg:     #ffffff;
  --r-sm:         8px;
  --r:            12px;
  --r-lg:         18px;
  --r-pill:       999px;
  --shadow-sm:    0 1px 4px rgba(26,39,68,.08);
  --shadow:       0 2px 8px rgba(26,39,68,.10);
  --shadow-md:    0 4px 16px rgba(26,39,68,.14);
  --shadow-lg:    0 8px 32px rgba(26,39,68,.18);
  --fd:           'Barlow Condensed', sans-serif;
  --f:            'Barlow', sans-serif;
  --grad-brand:   linear-gradient(135deg, #111b33 0%, #2f4270 100%);
  --grad-teal:    linear-gradient(135deg, #1e7a5e 0%, #4db890 100%);
  --grad-hero:    linear-gradient(160deg, #111b33 0%, #243358 50%, #1e7a5e 100%);
  --bottom-nav-h: 64px;
  --header-h:     56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text:      #e8ecf4;
    --text-sub:  #b0bec5;
    --text-muted:#6a7a90;
    --border:    #243358;
    --bg:        #0d1526;
    --card:      #111b33;
    --input-bg:  #1a2744;
    --navy-bg:   #1a2744;
  }
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}
a { color: var(--teal); text-decoration: none; }
a:hover { opacity: .85; }
img { max-width: 100%; display: block; }

/* ---- Typography ---- */
.fd { font-family: var(--fd); }
h1, .h1 { font-family: var(--fd); font-size: 28px; font-weight: 900; color: var(--navy); line-height: 1.15; letter-spacing: .02em; margin: 0 0 8px; }
h2, .h2 { font-family: var(--fd); font-size: 22px; font-weight: 700; color: var(--navy); line-height: 1.2; margin: 0 0 8px; }
h3, .h3 { font-size: 16px; font-weight: 700; color: var(--navy); margin: 0 0 6px; }
p { margin: 0 0 8px; color: var(--text-sub); font-size: 14px; }
.label { font-size: 11px; font-weight: 700; color: var(--text-sub); text-transform: uppercase; letter-spacing: .06em; }
.muted { color: var(--text-muted); font-size: 12px; }

/* ---- Layout ---- */
.page-wrap { padding-top: var(--header-h); padding-bottom: calc(var(--bottom-nav-h) + 16px); min-height: 100vh; }
.container  { max-width: 480px; margin: 0 auto; padding: 0 16px; }
.section    { margin-bottom: 20px; }
.card       { background: var(--card); border-radius: var(--r); border: 1px solid var(--border); box-shadow: var(--shadow); }
.card-body  { padding: 16px; }
.card-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-header .title { font-weight: 700; color: var(--navy); font-size: 14px; }

/* ---- Header ---- */
.bk-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: var(--navy);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  box-shadow: var(--shadow-md);
}
.bk-header .brand {
  font-family: var(--fd); font-size: 22px; font-weight: 900;
  color: #fff; letter-spacing: .05em;
}
.bk-header .brand span { color: var(--teal-light); }
.bk-header .header-action { color: var(--teal-light); font-size: 22px; cursor: pointer; background: none; border: none; padding: 4px; }
.bk-header .notif-dot { position: relative; }
.bk-header .notif-dot::after { content: ''; position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid var(--navy); }

/* ---- Bottom Navigation ---- */
.bk-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--bottom-nav-h);
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex; align-items: center;
  box-shadow: 0 -2px 12px rgba(26,39,68,.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bk-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 8px 4px; cursor: pointer;
  text-decoration: none; transition: all .15s;
  color: var(--text-muted);
}
.bk-nav-item .nav-ico { font-size: 22px; line-height: 1; }
.bk-nav-item .nav-lbl { font-size: 10px; font-weight: 700; letter-spacing: .03em; line-height: 1; }
.bk-nav-item.active   { color: var(--navy); }
.bk-nav-item:hover    { color: var(--teal); }
.bk-nav-item .nav-badge {
  position: absolute; top: 6px;
  background: var(--danger); color: #fff;
  border-radius: var(--r-pill); font-size: 9px; font-weight: 700;
  padding: 1px 5px; border: 2px solid var(--card);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 11px 22px;
  border-radius: var(--r-sm); font-family: var(--f);
  font-size: 14px; font-weight: 700; cursor: pointer;
  border: none; text-decoration: none;
  transition: all .18s; letter-spacing: .02em;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn-primary  { background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover  { background: var(--navy-dark); box-shadow: var(--shadow-md); }
.btn-teal     { background: var(--grad-teal); color: #fff; box-shadow: 0 2px 8px rgba(30,122,94,.25); }
.btn-teal:hover     { box-shadow: 0 4px 14px rgba(30,122,94,.35); }
.btn-outline  { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover  { background: var(--navy); color: #fff; }
.btn-ghost    { background: var(--teal-bg); color: var(--teal); border: 1px solid var(--teal-border); }
.btn-ghost:hover    { background: var(--teal); color: #fff; }
.btn-danger   { background: var(--danger-bg); color: var(--danger); border: 1px solid #fca5a5; }
.btn-danger:hover   { background: var(--danger); color: #fff; }
.btn-sm   { padding: 7px 14px; font-size: 12px; }
.btn-lg   { padding: 14px 28px; font-size: 16px; border-radius: var(--r); }
.btn-full { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---- Forms ---- */
.form-group  { margin-bottom: 16px; }
.form-label  { display: block; font-size: 11px; font-weight: 700; color: var(--text-sub); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 14px;
  border-radius: var(--r-sm); border: 1.5px solid var(--border);
  background: var(--input-bg); color: var(--text);
  font-family: var(--f); font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
  outline: none; -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--teal-mid);
  box-shadow: 0 0 0 3px rgba(42,153,112,.15);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 88px; }
.form-input-icon { position: relative; }
.form-input-icon .form-input { padding-left: 40px; }
.form-input-icon .input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 18px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ---- Upload area ---- */
.upload-area {
  border: 2px dashed var(--border); border-radius: var(--r);
  padding: 24px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
  background: var(--bg);
}
.upload-area:hover { border-color: var(--teal); background: var(--teal-bg); }
.upload-area input[type=file] { display: none; }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
}
.badge-navy    { background: var(--navy); color: #fff; }
.badge-teal    { background: var(--teal-bg); color: var(--teal); border: 1px solid var(--teal-border); }
.badge-success { background: var(--teal-bg); color: var(--teal); }
.badge-warning { background: var(--gold-bg); color: #92400e; }
.badge-danger  { background: var(--danger-bg); color: var(--danger); }
.badge-info    { background: var(--navy-bg); color: var(--navy-light); }
.badge-gray    { background: var(--silver-light); color: var(--text-sub); }
.badge-amber   { background: var(--gold-bg); color: #92400e; }

/* ---- Alert boxes ---- */
.alert { padding: 12px 14px; border-radius: var(--r-sm); font-size: 13px; margin-bottom: 12px; }
.alert-success { background: var(--teal-bg); border: 1px solid var(--teal-border); color: var(--teal); }
.alert-warning { background: var(--gold-bg); border: 1px solid #fcd34d; color: #92400e; }
.alert-danger  { background: var(--danger-bg); border: 1px solid #fca5a5; color: var(--danger); }
.alert-info    { background: var(--navy-bg); border: 1px solid #c0cce0; color: var(--navy); }

/* ---- Hero / Splash style sections ---- */
.hero-block {
  background: var(--grad-hero);
  padding: 24px 16px 20px;
  color: #fff;
}
.hero-block .greeting { font-size: 13px; color: var(--teal-light); margin-bottom: 4px; }
.hero-block h2 { color: #fff; font-family: var(--fd); font-size: 20px; font-weight: 700; margin: 0; }

/* ---- Category grid ---- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px 0;
}
.cat-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cat-icon {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--navy); display: flex; align-items: center;
  justify-content: center; font-size: 24px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.cat-item:hover .cat-icon { transform: scale(1.08); box-shadow: var(--shadow-md); }
.cat-item:active .cat-icon { transform: scale(.95); }
.cat-label { font-size: 10px; font-weight: 700; color: var(--text-sub); text-align: center; line-height: 1.3; }

/* ---- SP Card ---- */
.sp-card {
  background: var(--card); border-radius: var(--r); border: 1px solid var(--border);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
  text-decoration: none; color: var(--text);
}
.sp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.sp-card .sp-cover { height: 80px; background: var(--grad-brand); position: relative; overflow: hidden; }
.sp-card .sp-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid var(--card); overflow: hidden;
  position: absolute; bottom: -16px; left: 14px;
  background: var(--navy-bg);
}
.sp-card .sp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sp-card .sp-body { padding: 22px 14px 14px; }
.sp-card .sp-name { font-weight: 700; font-size: 14px; color: var(--navy); margin-bottom: 2px; }
.sp-card .sp-cats { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.sp-card .sp-meta { display: flex; gap: 12px; font-size: 11px; color: var(--text-muted); }
.sp-card .sp-rating { color: var(--gold); font-weight: 700; }

/* ---- Listing card ---- */
.listing-card {
  background: var(--card); border-radius: var(--r); border: 1px solid var(--border);
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; gap: 12px; padding: 12px;
  text-decoration: none; color: var(--text);
  transition: box-shadow .15s;
}
.listing-card:hover { box-shadow: var(--shadow-md); }
.listing-card .lc-img { width: 72px; height: 72px; border-radius: var(--r-sm); object-fit: cover; flex-shrink: 0; background: var(--bg); }
.listing-card .lc-body { flex: 1; min-width: 0; }
.listing-card .lc-title { font-weight: 700; font-size: 14px; color: var(--navy); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing-card .lc-sp { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.listing-card .lc-price { font-weight: 700; font-size: 14px; color: var(--teal); }
.listing-card .lc-price-note { font-size: 11px; color: var(--text-muted); }

/* ---- Order status track ---- */
.order-track {
  display: flex; align-items: flex-start; gap: 0;
  padding: 16px 0; overflow-x: auto;
}
.track-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 64px; position: relative; }
.track-dot {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  position: relative; z-index: 1;
}
.track-step.done .track-dot  { background: var(--navy); border-color: var(--navy); color: #fff; }
.track-step.active .track-dot { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 0 0 4px rgba(42,153,112,.2); }
.track-label { font-size: 9px; font-weight: 700; color: var(--text-muted); text-align: center; line-height: 1.3; }
.track-step.done .track-label   { color: var(--navy); }
.track-step.active .track-label { color: var(--teal); }
.track-line { flex: 1; height: 2px; background: var(--border); margin: 14px -1px 0; position: relative; z-index: 0; }
.track-step.done + .track-step .track-line { background: var(--navy); }

/* ---- BAST input ---- */
.bast-input {
  font-family: var(--fd); font-size: 32px; font-weight: 900;
  text-align: center; letter-spacing: .3em;
  border: 2px solid var(--teal-border); border-radius: var(--r);
  background: var(--teal-bg); color: var(--teal);
  width: 100%; padding: 16px;
}
.bast-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(42,153,112,.2); }

/* ---- Wallet ---- */
.wallet-balance {
  background: var(--grad-brand); border-radius: var(--r-lg);
  padding: 20px; color: #fff; margin-bottom: 16px;
}
.wallet-balance .wb-label { font-size: 12px; opacity: .7; margin-bottom: 4px; }
.wallet-balance .wb-amount { font-family: var(--fd); font-size: 32px; font-weight: 900; color: #fff; letter-spacing: .02em; }
.wallet-balance .wb-sub { font-size: 11px; color: var(--teal-light); margin-top: 4px; }

/* ---- Search bar ---- */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.15); border-radius: var(--r-pill);
  padding: 10px 16px; border: 1px solid rgba(255,255,255,.2);
  cursor: pointer;
}
.search-bar .sb-icon { color: rgba(255,255,255,.7); font-size: 18px; }
.search-bar .sb-text { color: rgba(255,255,255,.6); font-size: 14px; flex: 1; }

/* ---- Divider ---- */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.divider-text { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--text-muted); font-size: 12px; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---- Utilities ---- */
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-sm { gap: 8px; }
.flex-gap    { gap: 12px; }
.gap-lg  { gap: 16px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.p-2  { padding: 16px; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-teal   { color: var(--teal); }
.text-navy   { color: var(--navy); }
.text-danger { color: var(--danger); }
.text-muted  { color: var(--text-muted); }
.font-bold   { font-weight: 700; }
.font-fd     { font-family: var(--fd); }
.w-full      { width: 100%; }
.rounded     { border-radius: var(--r); }
.overflow-hidden { overflow: hidden; }
.relative    { position: relative; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
