/* ============================================================
   KulinerKu — Complete Stylesheet v1.1
   ============================================================ */

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  --primary      : #FF6B35;
  --primary-dark : #E8521C;
  --primary-light: #FFF0EB;
  --secondary    : #2D3250;
  --success      : #27AE60;
  --warning      : #F39C12;
  --danger       : #E74C3C;
  --info         : #2980B9;
  --text         : #1A1A2E;
  --text-muted   : #6B7280;
  --border       : #E5E7EB;
  --bg           : #F9FAFB;
  --white        : #FFFFFF;
  --shadow       : 0 2px 12px rgba(0,0,0,.08);
  --shadow-lg    : 0 8px 32px rgba(0,0,0,.12);
  --r            : 14px;
  --r-sm         : 8px;
  --nav-h        : 68px;
  --sidebar-w    : 240px;
  --font         : 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; object-fit: cover; }
input, textarea, select, button { font-family: var(--font); font-size: 14px; }
button { cursor: pointer; }

/* ── TOAST ──────────────────────────────────────────────────── */
.toast {
  position: fixed; top: 16px; right: 16px; z-index: 9999;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg); max-width: 360px; width: calc(100vw - 32px);
  animation: toastIn .3s ease; font-size: 13px; font-weight: 500;
}
.toast-success { background:#d1fae5; color:#065f46; border-left:4px solid var(--success); }
.toast-error   { background:#fee2e2; color:#991b1b; border-left:4px solid var(--danger);  }
.toast-info    { background:#dbeafe; color:#1e40af; border-left:4px solid var(--info);    }
.toast-warning { background:#fef3c7; color:#92400e; border-left:4px solid var(--warning); }
.toast button  { margin-left:auto; background:none; border:none; opacity:.6; padding:0 4px; }
@keyframes toastIn { from{transform:translateX(100px);opacity:0} to{transform:translateX(0);opacity:1} }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:10px 20px; border-radius:var(--r-sm);
  font-size:13px; font-weight:700; border:none;
  transition:all .18s; white-space:nowrap; cursor:pointer;
}
.btn-primary   { background:var(--primary);   color:#fff; }
.btn-primary:hover   { background:var(--primary-dark); transform:translateY(-1px); }
.btn-secondary { background:#F3F4F6; color:var(--text); border:1.5px solid var(--border); }
.btn-secondary:hover { background:#E5E7EB; }
.btn-danger    { background:var(--danger); color:#fff; }
.btn-danger:hover    { background:#c0392b; }
.btn-success   { background:var(--success); color:#fff; }
.btn-full      { width:100%; }
.btn-sm        { padding:7px 14px; font-size:12px; }

/* ── FORMS ──────────────────────────────────────────────────── */
.form-group { display:flex; flex-direction:column; gap:5px; margin-bottom:14px; }
.form-group label { font-size:12px; font-weight:700; color:var(--text-muted); letter-spacing:.3px; text-transform:uppercase; }
.form-group input,
.form-group textarea,
.form-group select {
  padding:10px 14px; border:1.5px solid var(--border); border-radius:var(--r-sm);
  background:#fff; outline:none; transition:border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus  { border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-light); }
.form-group input:disabled { background:#f3f4f6; color:var(--text-muted); }
.form-group textarea { resize:vertical; }
.form-row  { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.input-hint { font-size:11px; color:var(--text-muted); margin-top:2px; }
.input-password { position:relative; }
.input-password input  { width:100%; padding-right:44px; }
.input-password button {
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  background:none; border:none; color:var(--text-muted); padding:4px;
}
.section-divider  { border:none; border-top:1.5px solid var(--border); margin:20px 0; }
.section-label    { font-size:13px; font-weight:700; color:var(--primary); margin-bottom:12px; display:flex; align-items:center; gap:6px; }
.checkbox-label   { display:flex; align-items:center; gap:8px; cursor:pointer; font-weight:500; font-size:14px; }
.checkbox-label input { width:16px; height:16px; accent-color:var(--primary); }
.form-actions     { display:flex; gap:10px; justify-content:flex-end; margin-top:16px; }
.form-card        { background:#fff; border-radius:var(--r); box-shadow:var(--shadow); padding:24px; margin-bottom:20px; }
.form-section-title { font-size:15px; font-weight:800; color:var(--secondary); margin-bottom:16px; padding-bottom:10px; border-bottom:2px solid var(--border); }

/* ── BADGES ─────────────────────────────────────────────────── */
.badge         { display:inline-flex; align-items:center; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:700; }
.badge-warning { background:#fef3c7; color:#92400e; }
.badge-info    { background:#dbeafe; color:#1e40af; }
.badge-primary { background:#ede9fe; color:#6d28d9; }
.badge-success { background:#d1fae5; color:#065f46; }
.badge-secondary{background:#f3f4f6; color:#374151; }
.badge-danger  { background:#fee2e2; color:#991b1b; }

/* ── AUTH ───────────────────────────────────────────────────── */
.auth-page {
  background: linear-gradient(135deg, #FF6B35 0%, #2D3250 100%);
  min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px;
}
.auth-container { width:100%; max-width:440px; }
.auth-card-wide  { max-width:600px; }
.auth-card {
  background:#fff; border-radius:20px; padding:36px 32px;
  box-shadow:0 24px 64px rgba(0,0,0,.2);
}
.auth-brand { text-align:center; margin-bottom:28px; }
.auth-logo  { font-size:48px; display:block; margin-bottom:8px; }
.auth-brand h1  { font-size:26px; font-weight:800; color:var(--secondary); }
.auth-brand p   { color:var(--text-muted); font-size:13px; margin-top:4px; }
.role-tabs { display:flex; gap:6px; margin-bottom:22px; background:#f3f4f6; border-radius:var(--r-sm); padding:4px; }
.role-tab  {
  flex:1; padding:9px; text-align:center; border-radius:6px; border:none;
  background:none; cursor:pointer; font-size:13px; font-weight:600; color:var(--text-muted);
  transition:all .18s; display:flex; align-items:center; justify-content:center; gap:5px;
}
.role-tab.active { background:#fff; color:var(--primary); box-shadow:var(--shadow); }
.form-footer  { display:flex; justify-content:flex-end; margin-bottom:10px; }
.forgot-link  { font-size:12px; color:var(--primary); font-weight:600; }
.auth-switch  { text-align:center; margin-top:18px; font-size:13px; color:var(--text-muted); }
.auth-switch a { color:var(--primary); font-weight:700; }
.auth-demo {
  background:var(--primary-light); border-radius:var(--r-sm); padding:10px 14px;
  margin:14px 0; font-size:11px; color:var(--text-muted); border-left:3px solid var(--primary);
}
.auth-demo p { margin:2px 0; }

/* ── APP LAYOUT (BUYER) ─────────────────────────────────────── */
.buyer-page { background:var(--bg); }
.app-wrapper {
  max-width:480px; margin:0 auto; min-height:100vh;
  padding-bottom:var(--nav-h); background:#fff;
  box-shadow:0 0 40px rgba(0,0,0,.08);
}

/* Header */
.app-header {
  position:sticky; top:0; z-index:200; background:#fff;
  padding:12px 16px; display:flex; align-items:center;
  justify-content:space-between; border-bottom:1px solid var(--border);
}
.app-header-simple h2 { font-size:16px; font-weight:800; color:var(--secondary); }
.header-greet { display:flex; align-items:center; gap:10px; }
.header-emoji { font-size:22px; }
.header-hi    { font-size:15px; font-weight:800; color:var(--secondary); }
.header-sub   { font-size:11px; color:var(--text-muted); }
.header-right { display:flex; align-items:center; gap:8px; }
.header-icon  {
  position:relative; width:36px; height:36px; display:flex;
  align-items:center; justify-content:center;
  background:var(--bg); border-radius:50%; color:var(--text); font-size:15px;
}
.header-avatar { width:36px; height:36px; border-radius:50%; border:2px solid var(--primary-light); }
.badge-dot {
  position:absolute; top:-2px; right:-2px; background:var(--danger); color:#fff;
  font-size:9px; font-weight:700; min-width:16px; height:16px;
  border-radius:10px; display:flex; align-items:center; justify-content:center;
  border:2px solid #fff; padding:0 3px;
}
.back-link { color:var(--primary); font-size:16px; padding:4px; }

/* Page content */
.page-content { padding:16px; animation:fadeUp .25s ease; }
@keyframes fadeUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ── SEARCH ─────────────────────────────────────────────────── */
.search-bar { display:flex; gap:8px; margin-bottom:14px; }
.search-input-wrap { flex:1; position:relative; }
.search-input-wrap i  { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--text-muted); font-size:13px; }
.search-input-wrap input {
  width:100%; padding:10px 36px; border:1.5px solid var(--border);
  border-radius:var(--r-sm); background:var(--bg); outline:none;
}
.search-input-wrap input:focus { border-color:var(--primary); background:#fff; }
.search-clear { position:absolute; right:10px; top:50%; transform:translateY(-50%); color:var(--text-muted); font-size:13px; }

/* Category chips */
.cat-scroll { display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; margin-bottom:14px; scrollbar-width:none; }
.cat-scroll::-webkit-scrollbar { display:none; }
.cat-chip {
  white-space:nowrap; padding:6px 14px; border-radius:20px;
  background:#f3f4f6; color:var(--text-muted); font-size:12px; font-weight:600;
  flex-shrink:0; border:1.5px solid transparent; transition:all .18s;
}
.cat-chip.active { background:var(--primary-light); color:var(--primary); border-color:var(--primary); }

/* ── PROMO BANNER ───────────────────────────────────────────── */
/* Local CSS pattern instead of a hot-linked external image — faster, */
/* always available even without access to pinimg.com, and matches */
/* the brand palette exactly. */
.promo-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, var(--secondary) 100%);
  border-radius: var(--r);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.promo-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.14) 2px, transparent 2.5px);
  background-size: 18px 18px;
  opacity: .6;
  pointer-events: none;
}
.promo-banner::after {
  content: '🍲';
  position: absolute;
  right: -10px;
  bottom: -22px;
  font-size: 86px;
  opacity: .18;
  transform: rotate(-12deg);
  pointer-events: none;
}

.promo-text { position: relative; z-index: 1; }
.promo-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.promo-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.promo-icon { position: relative; z-index: 1; }
.promo-icon i{
  font-size:28px;
  color:#fff;
}

/* ── UMKM GRID ──────────────────────────────────────────────── */
.section-title { font-size:15px; font-weight:800; color:var(--secondary); margin-bottom:12px; }
.icon-populer {
  font-size: 15px;
  font-weight: 800;
  color: #333; /* warna teks */
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-populer i {
  color: #FFD700; /* warna bintang */
  font-size: 16px;
}
.umkm-grid     { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.umkm-card {
  background:#fff; border-radius:var(--r); box-shadow:var(--shadow);
  overflow:hidden; border:1.5px solid var(--border);
  transition:transform .18s, box-shadow .18s;
}
.umkm-card:active { transform:scale(.97); }
.umkm-card-img   { position:relative; height:100px; background:#f3f4f6; overflow:hidden; }
.umkm-card-img img { width:100%; height:100%; }
.umkm-card-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:36px; }
.umkm-status { position:absolute; top:6px; right:6px; padding:2px 8px; border-radius:10px; font-size:9px; font-weight:700; }
.umkm-status.open   { background:rgba(39,174,96,.9);  color:#fff; }
.umkm-status.closed { background:rgba(231,76,60,.9);  color:#fff; }
.umkm-card-body  { padding:10px; }
.umkm-card-name  { font-size:13px; font-weight:700; color:var(--secondary); margin-bottom:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.umkm-card-cat   { font-size:10px; color:var(--primary); font-weight:600; margin-bottom:4px; }
.umkm-card-meta  { display:flex; align-items:center; gap:4px; font-size:11px; color:var(--text-muted); margin-bottom:3px; }
.umkm-card-meta .rating { color:var(--warning); font-weight:700; }
.umkm-card-addr  { font-size:10px; color:var(--text-muted); }

/* ── SHOP HEADER ────────────────────────────────────────────── */
.shop-header  { position:relative; }
.shop-banner  { height:180px; background:#e5e7eb; overflow:hidden; }
.shop-banner img { width:100%; height:100%; }
.shop-banner-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:64px; }
.back-btn, .cart-btn {
  position:absolute; top:12px; background:rgba(255,255,255,.9); backdrop-filter:blur(4px);
  border-radius:50%; width:38px; height:38px; display:flex; align-items:center; justify-content:center;
  color:var(--text); box-shadow:var(--shadow); border:none;
}
.back-btn { left:12px; }
.cart-btn  { right:12px; }
.badge-cart-btn {
  position:absolute; top:-4px; right:-4px; background:var(--danger); color:#fff;
  font-size:9px; font-weight:700; min-width:16px; height:16px;
  border-radius:10px; display:flex; align-items:center; justify-content:center; padding:0 3px;
}
.shop-info-card {
  background:#fff; border-radius:var(--r) var(--r) 0 0;
  margin-top:-20px; padding:16px 16px 8px;
  box-shadow:0 -4px 20px rgba(0,0,0,.06);
}
.shop-info-top   { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:6px; }
.shop-name       { font-size:18px; font-weight:800; color:var(--secondary); }
.shop-cat-badge  { display:inline-block; background:var(--primary-light); color:var(--primary); font-size:10px; font-weight:700; padding:2px 10px; border-radius:10px; margin-top:4px; }
.shop-open-badge { font-size:11px; font-weight:700; padding:4px 10px; border-radius:10px; white-space:nowrap; }
.shop-open-badge.open   { background:#d1fae5; color:#065f46; }
.shop-open-badge.closed { background:#fee2e2; color:#991b1b; }
.shop-desc      { font-size:12px; color:var(--text-muted); margin-bottom:8px; }
.shop-meta-row  { display:flex; gap:14px; font-size:11px; color:var(--text-muted); flex-wrap:wrap; }
.gold           { color:var(--warning); }

/* ── MENU LIST ──────────────────────────────────────────────── */
.menu-page-content    { padding-top:4px; }
.menu-category-section{ margin-bottom:16px; }
.menu-cat-title {
  font-size:13px; font-weight:800; color:var(--secondary);
  padding:10px 0 8px; border-bottom:2px solid var(--border); margin-bottom:8px;
  text-transform:uppercase; letter-spacing:.4px;
}
.menu-list { display:flex; flex-direction:column; gap:0; }
.menu-item-card {
  display:flex; align-items:center; gap:12px;
  background:#fff; padding:10px 16px;
  border-bottom:1px solid var(--border);
  transition:background .15s;
}
.menu-item-card:last-child { border-bottom:none; }
.menu-item-card:active { background:var(--bg); }
.menu-item-img { width:72px; height:72px; border-radius:var(--r-sm); overflow:hidden; flex-shrink:0; background:#f3f4f6; }
.menu-item-img img { width:100%; height:100%; }
.menu-img-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:28px; }
.menu-item-info  { flex:1; min-width:0; }
.menu-item-name  { font-size:13px; font-weight:700; color:var(--secondary); margin-bottom:2px; }
.menu-item-desc  { font-size:11px; color:var(--text-muted); margin-bottom:4px; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.menu-item-price { font-size:14px; font-weight:800; color:var(--primary); }
.menu-item-action{ flex-shrink:0; }

/* QTY CONTROL */
.qty-control { display:flex; align-items:center; gap:6px; }
.qty-btn {
  width:30px; height:30px; border-radius:50%; border:2px solid var(--primary);
  background:#fff; color:var(--primary); font-size:18px; font-weight:700;
  display:flex; align-items:center; justify-content:center; transition:all .15s; line-height:1;
}
.qty-btn:hover { background:var(--primary); color:#fff; }
.qty-val   { font-size:15px; font-weight:800; min-width:22px; text-align:center; }
.add-btn {
  width:34px; height:34px; border-radius:50%; border:none;
  background:var(--primary); color:#fff; font-size:16px;
  display:flex; align-items:center; justify-content:center; transition:background .15s;
}
.add-btn:hover     { background:var(--primary-dark); }
.add-btn:disabled  { background:#d1d5db; cursor:not-allowed; }

/* FLOATING CART BAR */
.cart-float-bar {
  position:fixed; bottom:calc(var(--nav-h) + 10px); left:50%; transform:translateX(-50%);
  background:var(--secondary); color:#fff; border-radius:30px; padding:14px 24px;
  z-index:200; box-shadow:var(--shadow-lg); width:calc(100% - 32px); max-width:440px;
}
.cart-float-link  { display:flex; justify-content:space-between; align-items:center; width:100%; font-size:13px; font-weight:700; color:#fff; }
.cart-float-count { background:var(--primary); padding:3px 12px; border-radius:12px; font-size:12px; }

/* ── CART PAGE ──────────────────────────────────────────────── */
.cart-section      { margin-bottom:16px; }
.cart-shop-name    { font-size:14px; font-weight:700; color:var(--secondary); margin-bottom:10px; display:flex; align-items:center; gap:6px; padding:0 0 8px; border-bottom:2px solid var(--primary-light); }
.cart-item {
  display:flex; align-items:center; gap:10px; padding:12px;
  background:#fff; border-radius:var(--r-sm); border:1.5px solid var(--border); margin-bottom:8px;
}
.cart-item-img { width:60px; height:60px; border-radius:var(--r-sm); overflow:hidden; flex-shrink:0; background:#f3f4f6; }
.cart-item-img img { width:100%; height:100%; }
.cart-img-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:24px; }
.cart-item-info  { flex:1; min-width:0; }
.cart-item-name  { font-size:13px; font-weight:700; margin-bottom:2px; }
.cart-item-price { font-size:11px; color:var(--text-muted); }
.cart-item-sub   { font-size:13px; font-weight:800; color:var(--primary); margin-top:2px; }
.cart-order-form { background:#fff; border-radius:var(--r); padding:20px; border:1.5px solid var(--border); margin-top:16px; }
.cart-order-form h3 { font-size:15px; font-weight:800; color:var(--secondary); margin-bottom:16px; display:flex; align-items:center; gap:6px; }
.cart-summary    { background:var(--bg); border-radius:var(--r-sm); padding:14px; margin:14px 0; }
.summary-row     { display:flex; justify-content:space-between; font-size:13px; margin-bottom:6px; color:var(--text-muted); }
.summary-total   { font-weight:800; font-size:15px; color:var(--secondary); border-top:1.5px solid var(--border); padding-top:10px; margin-top:6px; margin-bottom:0; }
.summary-total span:last-child { color:var(--primary); }
.btn-order       { padding:14px; font-size:15px; }

/* ── ORDERS LIST ────────────────────────────────────────────── */
.orders-list     { display:flex; flex-direction:column; gap:10px; }
.order-card {
  background:#fff; border-radius:var(--r); padding:14px;
  border:1.5px solid var(--border); display:block; transition:border-color .15s;
}
.order-card:hover { border-color:var(--primary); }
.order-card-head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:10px; }
.order-code      { font-size:11px; font-weight:700; color:var(--primary); margin-bottom:2px; }
.order-shop      { font-size:14px; font-weight:800; color:var(--secondary); }
.order-card-body { display:flex; justify-content:space-between; align-items:center; }
.order-amount    { font-size:14px; font-weight:800; color:var(--secondary); }
.order-date      { font-size:11px; color:var(--text-muted); }

/* ORDER DETAIL */
.order-detail-card  { background:#fff; border-radius:var(--r); border:1.5px solid var(--border); overflow:hidden; }
.order-detail-head  { padding:16px; display:flex; justify-content:space-between; align-items:flex-start; border-bottom:1.5px solid var(--border); background:var(--bg); }
.order-detail-code  { font-size:14px; font-weight:800; color:var(--primary); }
.order-detail-date  { font-size:11px; color:var(--text-muted); margin-top:2px; }
.detail-section     { padding:12px 16px; border-bottom:1px solid var(--border); }
.detail-section:last-child { border-bottom:none; }
.detail-section-title { font-size:10px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; margin-bottom:4px; display:flex; align-items:center; gap:4px; }
.detail-value       { font-size:13px; font-weight:600; color:var(--secondary); }
.detail-sub         { font-size:12px; color:var(--text-muted); margin-top:2px; }
.order-items-list   { display:flex; flex-direction:column; gap:8px; margin-top:8px; }
.order-item-row     { display:flex; align-items:center; gap:8px; font-size:13px; }
.order-item-qty     { background:var(--primary-light); color:var(--primary); font-weight:700; padding:2px 8px; border-radius:6px; font-size:11px; flex-shrink:0; }
.order-item-name    { flex:1; color:var(--text); }
.order-item-price   { font-weight:700; color:var(--secondary); flex-shrink:0; }
.order-total-row    { padding:14px 16px; display:flex; justify-content:space-between; align-items:center; background:var(--bg); }
.order-total-amount { font-size:16px; font-weight:800; color:var(--primary); }

/* ORDER TIMELINE */
.order-timeline { display:flex; align-items:flex-start; padding:14px 16px; border-bottom:1.5px solid var(--border); overflow-x:auto; gap:0; }
.timeline-step  { display:flex; flex-direction:column; align-items:center; flex:1; position:relative; min-width:52px; }
.timeline-step:not(:last-child)::after {
  content:''; position:absolute; top:7px; left:calc(50% + 8px);
  width:calc(100% - 16px); height:2px; background:var(--border); z-index:0;
}
.timeline-step.done::after  { background:var(--primary); }
.timeline-step.active::after { background:linear-gradient(to right, var(--primary), var(--border)); }
.timeline-dot {
  width:16px; height:16px; border-radius:50%; background:var(--border);
  border:2px solid var(--border); position:relative; z-index:1; flex-shrink:0;
}
.timeline-step.done   .timeline-dot { background:var(--primary); border-color:var(--primary); }
.timeline-step.active .timeline-dot { background:#fff; border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-light); }
.timeline-label { font-size:9px; font-weight:600; color:var(--text-muted); margin-top:5px; text-align:center; line-height:1.2; }
.timeline-step.done   .timeline-label { color:var(--primary); }
.timeline-step.active .timeline-label { color:var(--primary); font-weight:800; }
.timeline-step.cancelled .timeline-dot  { background:var(--danger); border-color:var(--danger); }
.timeline-step.cancelled .timeline-label{ color:var(--danger); }

/* ── PROFILE ────────────────────────────────────────────────── */
.profile-hero       { text-align:center; padding:24px 16px 16px; background:linear-gradient(180deg,#fff6f3 0%,#fff 100%); }
.profile-avatar-wrap{ position:relative; display:inline-block; margin-bottom:10px; }
.profile-avatar     { width:90px; height:90px; border-radius:50%; border:3px solid var(--primary); }
.avatar-edit-btn {
  position:absolute; bottom:0; right:0; width:28px; height:28px;
  background:var(--primary); color:#fff; border-radius:50%;
  display:flex; align-items:center; justify-content:center; font-size:11px; cursor:pointer;
}
.profile-name       { font-size:18px; font-weight:800; color:var(--secondary); margin-bottom:2px; }
.profile-email      { font-size:13px; color:var(--text-muted); }
.profile-role-badge { display:inline-block; background:var(--primary-light); color:var(--primary); font-size:11px; font-weight:700; padding:3px 12px; border-radius:12px; margin-top:8px; }
.profile-stats      { display:flex; gap:0; margin-top:16px; border-top:1px solid var(--border); }
.profile-stat       { flex:1; text-align:center; padding:12px 0; border-right:1px solid var(--border); }
.profile-stat:last-child { border-right:none; }
.profile-stat-val   { font-size:18px; font-weight:800; color:var(--primary); }
.profile-stat-lbl   { font-size:10px; color:var(--text-muted); font-weight:600; }
.profile-card       { background:#fff; border-radius:var(--r); padding:20px; margin-bottom:12px; border:1.5px solid var(--border); }
.profile-card-title { font-size:14px; font-weight:800; color:var(--secondary); margin-bottom:16px; display:flex; align-items:center; gap:6px; }

/* ── MAP ────────────────────────────────────────────────────── */
.map-container { height:calc(100vh - 56px - var(--nav-h)); display:flex; flex-direction:column; }
#map           { flex:1; }
.map-legend    { background:#fff; padding:10px 16px; max-height:180px; overflow-y:auto; border-top:1.5px solid var(--border); }
.legend-title  { font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; margin-bottom:8px; }
.map-list-item { display:flex; align-items:center; gap:8px; padding:7px 0; border-bottom:1px solid var(--border); cursor:pointer; }
.map-list-item:last-child { border-bottom:none; }
.map-list-name { flex:1; font-size:13px; font-weight:600; }
.map-list-cat  { font-size:11px; color:var(--text-muted); white-space:nowrap; }
.map-list-order{ font-size:11px; font-weight:700; color:var(--primary); white-space:nowrap; }
.map-marker    { font-size:28px; filter:drop-shadow(0 2px 4px rgba(0,0,0,.3)); cursor:pointer; }
.map-popup     { font-family:var(--font); font-size:12px; min-width:150px; }
.map-popup strong { font-size:13px; display:block; margin-bottom:3px; }
.popup-link    { display:inline-block; margin-top:6px; color:var(--primary); font-weight:700; font-size:12px; }

/* ── NOTIFICATIONS ──────────────────────────────────────────── */
.notif-list   { display:flex; flex-direction:column; gap:8px; }
.notif-item   { display:flex; align-items:flex-start; gap:12px; background:#fff; border-radius:var(--r-sm); padding:12px; border:1.5px solid var(--border); }
.notif-item.unread { background:var(--primary-light); border-color:rgba(255,107,53,.3); }
.notif-icon   { font-size:22px; flex-shrink:0; margin-top:2px; }
.notif-content{ flex:1; min-width:0; }
.notif-title  { font-size:13px; font-weight:700; color:var(--secondary); }
.notif-msg    { font-size:12px; color:var(--text-muted); margin-top:2px; }
.notif-time   { font-size:10px; color:var(--text-muted); margin-top:4px; }
.notif-link   { color:var(--primary); font-size:14px; padding:4px; flex-shrink:0; }

/* ── REVIEW ─────────────────────────────────────────────────── */
.review-card        { background:#fff; border-radius:var(--r); border:1.5px solid var(--border); padding:20px; margin-top:14px; }
.review-card-title  { font-size:15px; font-weight:800; color:var(--secondary); margin-bottom:4px; display:flex; align-items:center; gap:6px; }
.review-card-sub    { font-size:12px; color:var(--text-muted); margin-bottom:14px; }
.star-rating        { display:flex; flex-direction:row-reverse; justify-content:flex-end; gap:6px; margin-bottom:4px; }
.star-rating input  { display:none; }
.star-rating label  { font-size:34px; color:#d1d5db; cursor:pointer; transition:color .15s; line-height:1; }
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label { color:var(--warning); }
.review-done        { display:flex; align-items:center; gap:12px; padding:8px 0; }
.review-done-icon   { font-size:32px; }
.review-done-title  { font-size:14px; font-weight:700; color:var(--secondary); }
.review-done-sub    { font-size:12px; color:var(--text-muted); }

/* ── BOTTOM NAV ─────────────────────────────────────────────── */
.bottom-nav {
  position:fixed; bottom:0; left:50%; transform:translateX(-50%);
  width:100%; max-width:480px; height:var(--nav-h);
  background:#fff; display:flex; align-items:stretch;
  border-top:1.5px solid var(--border); z-index:300;
  box-shadow:0 -4px 20px rgba(0,0,0,.07);
}
.nav-item {
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:3px; font-size:10px; font-weight:600; color:var(--text-muted);
  padding:8px 0; position:relative; transition:color .18s;
}
.nav-item.active { color:var(--primary); }
.nav-item.active i::before { /* dot indicator */ }
.nav-item i    { font-size:20px; }
.cart-nav      { position:relative; }
.badge-cart {
  position:absolute; top:6px; right:calc(50% - 14px); background:var(--danger); color:#fff;
  font-size:9px; font-weight:700; min-width:16px; height:16px;
  border-radius:10px; display:flex; align-items:center; justify-content:center; padding:0 4px;
}

/* ── UMKM LAYOUT ────────────────────────────────────────────── */
.umkm-page   { background:var(--bg); }
.umkm-layout { display:flex; min-height:100vh; }

/* Sidebar */
.sidebar {
  width:var(--sidebar-w); background:var(--secondary); color:#fff;
  flex-shrink:0; display:flex; flex-direction:column;
  position:sticky; top:0; height:100vh; overflow-y:auto;
}
.sidebar-brand { display:flex; align-items:center; gap:10px; padding:20px 16px; border-bottom:1px solid rgba(255,255,255,.1); }
.brand-icon    { font-size:28px; }
.brand-name    { font-size:15px; font-weight:800; }
.brand-role    { font-size:10px; color:rgba(255,255,255,.5); }
.sidebar-user  { display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid rgba(255,255,255,.1); }
.sidebar-avatar   { width:38px; height:38px; border-radius:50%; border:2px solid rgba(255,255,255,.3); flex-shrink:0; }
.sidebar-username { font-size:13px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-tag      { font-size:10px; color:rgba(255,255,255,.5); }
.sidebar-nav      { padding:8px 0; flex:1; }
.sidebar-nav a {
  display:flex; align-items:center; gap:10px; padding:11px 16px;
  font-size:13px; font-weight:600; color:rgba(255,255,255,.65); transition:all .18s; position:relative;
}
.sidebar-nav a:hover { background:rgba(255,255,255,.08); color:#fff; }
.sidebar-nav a.active { background:rgba(255,107,53,.2); color:#fff; border-left:3px solid var(--primary); }
.sidebar-nav a i      { width:18px; text-align:center; font-size:14px; }
.sidebar-nav .logout-link { color:rgba(231,76,60,.8); margin-top:auto; }
.sidebar-nav .logout-link:hover { color:var(--danger); background:rgba(231,76,60,.1); }
.badge-nav {
  background:var(--danger); color:#fff; font-size:9px; font-weight:700;
  padding:1px 6px; border-radius:10px; margin-left:auto;
}

/* UMKM Main */
.umkm-main      { flex:1; padding:24px; min-width:0; overflow:auto; }
.umkm-topbar    { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:24px; gap:16px; flex-wrap:wrap; }
.umkm-page-title{ font-size:22px; font-weight:800; color:var(--secondary); }
.umkm-page-sub  { font-size:13px; color:var(--text-muted); margin-top:2px; }
.topbar-shop-status { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.shop-status-badge  { padding:6px 14px; border-radius:20px; font-size:12px; font-weight:700; }
.shop-status-badge.open   { background:#d1fae5; color:#065f46; }
.shop-status-badge.closed { background:#fee2e2; color:#991b1b; }

/* Stats */
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:24px; }
.stat-card  { background:#fff; border-radius:var(--r); padding:18px; box-shadow:var(--shadow); border-top:4px solid var(--border); }
.stat-card-orange { border-top-color:var(--primary); }
.stat-card-green  { border-top-color:var(--success); }
.stat-card-yellow { border-top-color:var(--warning); }
.stat-card-blue   { border-top-color:var(--info); }
.stat-icon  { font-size:22px; margin-bottom:6px; }
.stat-value { font-size:19px; font-weight:800; color:var(--secondary); line-height:1.2; }
.stat-value-currency { font-size:14px; }
.stat-label { font-size:11px; color:var(--text-muted); font-weight:600; margin-top:3px; }

/* UMKM Section */
.umkm-section       { background:#fff; border-radius:var(--r); padding:20px; box-shadow:var(--shadow); margin-bottom:20px; }
.umkm-section-head  { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.umkm-section-head h2 { font-size:15px; font-weight:800; color:var(--secondary); }
.link-more          { font-size:12px; color:var(--primary); font-weight:700; }
.shop-info-grid     { display:flex; flex-direction:column; }
.shop-info-row      { display:flex; justify-content:space-between; font-size:13px; padding:9px 0; border-bottom:1px solid var(--border); }
.shop-info-row:last-child { border-bottom:none; }
.shop-info-row span { color:var(--text-muted); flex-shrink:0; margin-right:12px; }
.shop-info-row strong { text-align:right; }
.empty-state-small  { text-align:center; padding:30px 0; color:var(--text-muted); font-size:13px; }

/* Quick Actions */
.quick-actions { display:flex; gap:10px; margin-bottom:24px; flex-wrap:wrap; }
.quick-action-btn {
  display:inline-flex; align-items:center; gap:6px; padding:9px 16px;
  background:#fff; border:1.5px solid var(--border); border-radius:var(--r-sm);
  font-size:13px; font-weight:600; color:var(--secondary); cursor:pointer;
  transition:all .18s; position:relative;
}
.quick-action-btn:hover { background:var(--primary-light); border-color:var(--primary); color:var(--primary); }
.qa-badge { background:var(--danger); color:#fff; font-size:10px; font-weight:700; padding:1px 6px; border-radius:10px; }

/* Tables */
.orders-table-wrap { overflow-x:auto; }
.orders-table      { width:100%; border-collapse:collapse; font-size:13px; min-width:500px; }
.orders-table th   { padding:10px 12px; background:var(--bg); text-align:left; font-size:10px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.4px; border-bottom:2px solid var(--border); }
.orders-table td   { padding:10px 12px; border-bottom:1px solid var(--border); vertical-align:middle; }
.orders-table tr:last-child td { border-bottom:none; }
.orders-table tr:hover td { background:var(--bg); }
.btn-table { padding:5px 12px; background:var(--primary-light); color:var(--primary); border-radius:6px; font-size:12px; font-weight:700; border:1px solid rgba(255,107,53,.3); white-space:nowrap; }

/* Filter tabs */
.filter-tabs { display:flex; gap:6px; margin-bottom:18px; flex-wrap:wrap; }
.filter-tab  { padding:6px 14px; border-radius:20px; font-size:12px; font-weight:600; background:#f3f4f6; color:var(--text-muted); border:1.5px solid transparent; transition:all .15s; }
.filter-tab.active { background:var(--primary-light); color:var(--primary); border-color:var(--primary); }

/* Menu Admin */
.menu-cat-header { font-size:13px; font-weight:800; color:var(--secondary); margin-bottom:12px; display:flex; align-items:center; gap:8px; text-transform:uppercase; letter-spacing:.4px; }
.cat-count       { background:var(--primary-light); color:var(--primary); font-size:11px; font-weight:700; padding:2px 8px; border-radius:10px; }
.menu-admin-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:12px; margin-bottom:24px; }
.menu-admin-card { background:#fff; border-radius:var(--r-sm); border:1.5px solid var(--border); overflow:hidden; }
.menu-admin-card.unavailable { opacity:.55; }
.menu-admin-img  { height:100px; background:#f3f4f6; overflow:hidden; position:relative; }
.menu-admin-img img { width:100%; height:100%; }
.menu-admin-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:32px; }
.unavail-overlay { position:absolute; inset:0; background:rgba(0,0,0,.5); color:#fff; display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:700; }
.menu-admin-info  { padding:10px; }
.menu-admin-name  { font-size:13px; font-weight:700; color:var(--secondary); margin-bottom:2px; }
.menu-admin-desc  { font-size:11px; color:var(--text-muted); margin-bottom:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.menu-admin-price { font-size:13px; font-weight:800; color:var(--primary); }
.menu-admin-actions { display:flex; gap:6px; padding:8px 10px; border-top:1px solid var(--border); background:var(--bg); }
.btn-icon { width:30px; height:30px; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:12px; border:1.5px solid; }
.btn-edit { color:var(--info); border-color:rgba(41,128,185,.4); background:#dbeafe; }
.btn-del  { color:var(--danger); border-color:rgba(231,76,60,.4); background:#fee2e2; }

/* Order action */
.order-action-row { padding:14px 16px; display:flex; gap:10px; flex-wrap:wrap; border-top:1.5px solid var(--border); }
.btn-status-update { flex:1; justify-content:center; min-width:140px; }
.detail-grid       { display:grid; grid-template-columns:1fr 1fr; }
.order-detail-umkm { max-width:700px; }

/* UMKM Profile */
.profile-avatar-row { display:flex; align-items:center; gap:14px; margin-bottom:18px; }
.form-avatar   { width:68px; height:68px; border-radius:50%; border:2px solid var(--primary); flex-shrink:0; }
.banner-row    { display:flex; align-items:center; gap:14px; margin-bottom:18px; }
.form-banner   { height:64px; width:160px; border-radius:var(--r-sm); border:1.5px solid var(--border); flex-shrink:0; }
.form-banner-placeholder { height:64px; width:160px; background:#f3f4f6; border-radius:var(--r-sm); display:flex; align-items:center; justify-content:center; font-size:11px; color:var(--text-muted); border:1.5px dashed var(--border); text-align:center; padding:8px; }

/* Modal */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:500; display:flex; align-items:center; justify-content:center; padding:20px; }
.modal         { background:#fff; border-radius:var(--r); width:100%; max-width:540px; max-height:90vh; overflow-y:auto; box-shadow:var(--shadow-lg); }
.modal-head    { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1.5px solid var(--border); position:sticky; top:0; background:#fff; z-index:1; }
.modal-head h3 { font-size:16px; font-weight:800; color:var(--secondary); }
.modal-head button { background:none; border:none; color:var(--text-muted); font-size:18px; padding:4px; }
.modal-form    { padding:20px; }
.modal-footer  { display:flex; justify-content:flex-end; gap:10px; margin-top:8px; }

/* Empty state */
.empty-state   { text-align:center; padding:48px 20px; }
.empty-icon    { font-size:56px; margin-bottom:12px; }
.empty-title   { font-size:16px; font-weight:700; color:var(--secondary); }
.empty-sub     { font-size:13px; color:var(--text-muted); margin-top:4px; }

/* Leaflet overrides */
.leaflet-popup-content-wrapper { border-radius:var(--r-sm)!important; box-shadow:var(--shadow)!important; font-family:var(--font)!important; }
.leaflet-popup-content { margin:10px 14px!important; }

/* ── UTILITIES (replaces scattered inline styles) ───────────── */
.is-hidden { display: none !important; }
.mt-sm  { margin-top: 12px; }
.mt-md  { margin-top: 16px; }
.mt-lg  { margin-top: 40px; }
.mt-xl  { margin-top: 60px; }
.mt-xxl { margin-top: 80px; }
.mb-md  { margin-bottom: 16px; }
.no-pad { padding: 0; }
.p-16   { padding: 16px; }
.text-success  { color: var(--success); }
.text-danger   { color: var(--danger); }
.text-muted-sm { color: var(--text-muted); font-weight: 400; font-size: 12px; }
.icon-primary  { color: var(--primary); }
.icon-warning  { color: var(--warning); }
.cursor-pointer{ cursor: pointer; }
.img-preview-sm { height: 60px; border-radius: 8px; }
.placeholder-icon-sm { font-size: 20px; display: block; margin-bottom: 4px; }
.empty-icon-muted { font-size: 32px; color: var(--border); display: block; margin-bottom: 8px; }

/* Status message (order completed / cancelled, etc.) */
.status-message { padding: 10px; font-weight: 700; }

/* Star rating display (read-only, e.g. dashboard / profile reviews) */
.star-icon        { color: var(--border); }
.star-icon.filled { color: var(--warning); }

/* Review list item (used in buyer & UMKM profile pages) */
.review-item            { padding: 10px 0; border-bottom: 1px solid var(--border); }
.review-item:last-child { border-bottom: none; }
.review-item-head   { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.review-item-name   { font-size: 13px; }
.review-item-stars   { color: var(--warning); }
.review-item-time   { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.review-item-comment{ font-size: 12px; color: var(--text-muted); }

/* Error pages (404, etc.) */
.error-card  { text-align: center; padding: 60px 40px; }
.error-emoji { font-size: 72px; }
.error-code  { font-size: 48px; color: var(--primary); margin: 8px 0; }
.error-msg   { color: var(--text-muted); margin-bottom: 24px; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width:1024px) {
  .stats-grid { grid-template-columns:repeat(2,1fr); }
}

@media (max-width:768px) {
  /* Sidebar → horizontal top nav on mobile */
  .umkm-layout { flex-direction:column; }
  .sidebar {
    width:100%; height:auto; position:sticky; top:0; z-index:200;
    flex-direction:column; overflow:visible;
  }
  .sidebar-brand { padding:10px 16px; }
  .sidebar-brand .brand-role { display:none; }
  .sidebar-user  { display:none; }
  .sidebar-nav {
    display:flex; flex-direction:row; overflow-x:auto; padding:0;
    scrollbar-width:none; border-top:1px solid rgba(255,255,255,.1);
  }
  .sidebar-nav::-webkit-scrollbar { display:none; }
  .sidebar-nav a {
    flex-direction:column; gap:2px; padding:8px 12px;
    font-size:9px; white-space:nowrap; flex-shrink:0; border-left:none!important;
    border-bottom:3px solid transparent;
  }
  .sidebar-nav a.active { border-bottom-color:var(--primary); border-left:none; background:rgba(255,107,53,.15); }
  .sidebar-nav a i { font-size:16px; width:auto; }
  .sidebar-nav .logout-link { margin-top:0; }
  .badge-nav { position:absolute; top:4px; right:4px; }
  .umkm-main { padding:14px; }
  .stats-grid { grid-template-columns:1fr 1fr; gap:10px; }
  .detail-grid { grid-template-columns:1fr; }
  .form-row   { grid-template-columns:1fr; }
  .orders-table { font-size:12px; }
}

@media (max-width:480px) {
  .auth-card { padding:24px 18px; }
  .umkm-grid { grid-template-columns:1fr; }
  .menu-admin-grid { grid-template-columns:1fr 1fr; }
  .stat-value { font-size:15px; }
  .stat-value.stat-value-currency { font-size:12px; }
  .error-card { padding:40px 20px; }
  .error-emoji { font-size:56px; }
  .error-code { font-size:36px; }
}

/* ── PRINT ──────────────────────────────────────────────────── */
@media print {
  .bottom-nav, .back-btn, .cart-btn, .cart-float-bar,
  .sidebar, .btn-status-update, .review-card, .btn-order,
  .quick-actions, .header-right { display:none!important; }
  .app-wrapper, .umkm-main { max-width:100%; box-shadow:none; }
}
