/* ============================================================
   WasilahHub V1 — Design tokens & base styles
   Palet: navi jalan-malam (primary) + amber matahari (accent)
   Tipografi: Space Grotesk (heading) + IBM Plex Sans (body/UI)
   ============================================================ */

:root {
  /* Color */
  --navy-950: #0f1b33;
  --navy-900: #16264a;
  --navy-800: #1b2a4a;
  --navy-700: #24365f;
  --navy-100: #e8ecf5;
  --navy-50:  #f4f6fb;

  --amber-600: #c8801f;
  --amber-500: #e8a33d;
  --amber-100: #fbe8c8;

  --teal-700: #235e53;
  --teal-500: #2f7a6b;
  --teal-100: #dcefe9;

  --clay-700: #8a3f2d;
  --clay-500: #b5533c;
  --clay-100: #f5ded7;

  --paper-0: #ffffff;
  --paper-50: #f7f6f3;
  --paper-100: #efece5;
  --ink-900: #22262b;
  --ink-600: #565c66;
  --ink-400: #8b909a;
  --line: #dedad0;

  /* Type */
  --font-head: 'Space Grotesk', 'IBM Plex Sans', sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Scale */
  --step--1: 0.8rem;
  --step-0: 0.95rem;
  --step-1: 1.15rem;
  --step-2: 1.45rem;
  --step-3: 1.9rem;
  --step-4: 2.6rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --space-1: 0.4rem;
  --space-2: 0.8rem;
  --space-3: 1.2rem;
  --space-4: 2rem;
  --space-5: 3.2rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  color: var(--ink-900);
  background: var(--paper-50);
  line-height: 1.55;
}
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 var(--space-2); max-width: 68ch; }
a { color: var(--navy-800); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--amber-500);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-3); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: var(--step-0); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy-800); color: var(--paper-0); }
.btn-primary:hover { background: var(--navy-900); text-decoration: none; }
.btn-accent { background: var(--amber-500); color: var(--navy-950); }
.btn-accent:hover { background: var(--amber-600); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--navy-800); border-color: var(--line); }
.btn-ghost:hover { background: var(--navy-50); text-decoration: none; }
.btn-danger { background: var(--clay-500); color: var(--paper-0); }
.btn-danger:hover { background: var(--clay-700); text-decoration: none; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: var(--step--1); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---- Badges ---- */
.badge {
  display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px;
  font-size: var(--step--1); font-weight: 600; white-space: nowrap;
}
.badge-navy { background: var(--navy-100); color: var(--navy-800); }
.badge-amber { background: var(--amber-100); color: var(--amber-600); }
.badge-teal { background: var(--teal-100); color: var(--teal-700); }
.badge-clay { background: var(--clay-100); color: var(--clay-700); }
.badge-grey { background: var(--paper-100); color: var(--ink-600); }

/* ---- Cards (left accent bar instead of uniform shadow) ---- */
.card {
  background: var(--paper-0); border: 1px solid var(--line); border-left: 3px solid var(--navy-800);
  border-radius: var(--radius-sm); padding: var(--space-3);
}
.card.accent-amber { border-left-color: var(--amber-500); }
.card.accent-teal { border-left-color: var(--teal-500); }
.card.accent-clay { border-left-color: var(--clay-500); }
.card + .card { margin-top: var(--space-2); }

.grid { display: grid; gap: var(--space-3); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-2); }

.stat {
  background: var(--paper-0); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
}
.stat .num { font-family: var(--font-head); font-size: var(--step-3); font-weight: 700; display: block; }
.stat .label { color: var(--ink-600); font-size: var(--step--1); }

/* ---- Forms ---- */
.field { margin-bottom: var(--space-2); }
.field label { display: block; font-size: var(--step--1); font-weight: 600; margin-bottom: 0.3rem; color: var(--ink-600); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: var(--step-0); background: var(--paper-0); color: var(--ink-900);
}
.field textarea { resize: vertical; min-height: 5rem; }
.field-hint { font-size: var(--step--1); color: var(--ink-400); margin-top: 0.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
th, td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { background: var(--paper-100); font-weight: 600; color: var(--ink-600); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--navy-50); }

/* ---- App shell (dashboards) ---- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0; background: var(--navy-950); color: var(--navy-100);
  padding: var(--space-3) var(--space-2); position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { font-family: var(--font-head); font-weight: 700; font-size: var(--step-1); color: var(--paper-0); margin-bottom: var(--space-4); display: block; }
.sidebar nav a {
  display: block; padding: 0.55rem 0.7rem; border-radius: var(--radius-sm); color: var(--navy-100);
  font-size: var(--step--1); margin-bottom: 0.15rem;
}
.sidebar nav a:hover { background: var(--navy-900); text-decoration: none; }
.sidebar nav a.active { background: var(--amber-500); color: var(--navy-950); font-weight: 600; }
.sidebar .role-tag { font-size: var(--step--1); color: var(--navy-100); opacity: 0.7; margin-bottom: var(--space-3); display: block; }
.main-area { flex: 1; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: var(--space-2) var(--space-4); background: var(--paper-0); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.content { padding: var(--space-4); max-width: 1100px; }

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 0.3rem; }
  .content { padding: var(--space-3); }
  .topbar { padding: var(--space-2); }
}

/* ---- Public site header ---- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}
.site-header .brand { font-family: var(--font-head); font-weight: 700; font-size: var(--step-2); color: var(--navy-900); }
.site-header nav { display: flex; gap: var(--space-2); align-items: center; }

.hero { padding: var(--space-5) 0 var(--space-4); }
.hero h1 { max-width: 16ch; }
.hero .lede { max-width: 52ch; color: var(--ink-600); font-size: var(--step-1); }

.search-bar { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); background: var(--paper-0); border: 1px solid var(--line); padding: var(--space-2); border-radius: var(--radius-md); }
.search-bar input, .search-bar select { flex: 1; min-width: 140px; }

.asset-card { background: var(--paper-0); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column; }
.asset-card .thumb { aspect-ratio: 4/3; background: var(--navy-100); display: flex; align-items: center; justify-content: center; color: var(--navy-700); font-family: var(--font-head); font-size: var(--step-2); }
.asset-card .body { padding: var(--space-2) var(--space-3); flex: 1; display: flex; flex-direction: column; gap: 0.3rem; }
.asset-card .price { font-family: var(--font-head); font-weight: 700; font-size: var(--step-1); color: var(--navy-900); }
.asset-card .meta { color: var(--ink-600); font-size: var(--step--1); }

.rating-stars { color: var(--amber-500); font-size: var(--step-0); }

/* ---- Utility ---- */
.muted { color: var(--ink-600); }
.small { font-size: var(--step--1); }
.flex { display: flex; align-items: center; gap: var(--space-2); }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.stack { display: flex; flex-direction: column; gap: var(--space-2); }
.mt-1 { margin-top: var(--space-1); } .mt-2 { margin-top: var(--space-2); } .mt-3 { margin-top: var(--space-3); } .mt-4 { margin-top: var(--space-4); }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.empty-state { text-align: center; padding: var(--space-5) var(--space-3); color: var(--ink-600); }

/* ---- Toast ---- */
#toast-region { position: fixed; bottom: var(--space-3); right: var(--space-3); z-index: 100; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  background: var(--navy-950); color: var(--paper-0); padding: 0.7rem 1rem; border-radius: var(--radius-sm);
  font-size: var(--step--1); box-shadow: 0 4px 16px rgba(15,27,51,0.25); max-width: 320px;
}
.toast.error { background: var(--clay-700); }
.toast.success { background: var(--teal-700); }

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,27,51,0.5); display: flex; align-items: center; justify-content: center;
  padding: var(--space-3); z-index: 50;
}
.modal { background: var(--paper-0); border-radius: var(--radius-md); padding: var(--space-4); max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; }

/* ---- Loading skeleton ---- */
.skeleton { background: linear-gradient(90deg, var(--paper-100) 25%, var(--line) 37%, var(--paper-100) 63%); background-size: 400% 100%; animation: skeleton-loading 1.4s ease infinite; border-radius: var(--radius-sm); height: 1rem; }
@keyframes skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---- Steps (booking status) ---- */
.status-track { display: flex; gap: 0.3rem; flex-wrap: wrap; margin: var(--space-2) 0; }
.status-track .step { padding: 0.3rem 0.7rem; border-radius: 999px; font-size: var(--step--1); background: var(--paper-100); color: var(--ink-400); }
.status-track .step.done { background: var(--teal-100); color: var(--teal-700); }
.status-track .step.current { background: var(--amber-500); color: var(--navy-950); font-weight: 600; }
.status-track .step.bad { background: var(--clay-100); color: var(--clay-700); }

/* ============================================================
   WasilahHub V1 Final Polish — marketplace / mobile-first pass
   ============================================================ */
:root {
  --shadow-soft: 0 10px 30px rgba(15,27,51,.08);
  --shadow-hover: 0 16px 38px rgba(15,27,51,.14);
}

body { background: linear-gradient(180deg, #fbfcfe 0%, var(--paper-0) 28rem); }
.site-header {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(15,27,51,.06);
}
.site-header .brand { letter-spacing: -.03em; }
.site-header nav a { font-weight: 500; }
.hero {
  position: relative; overflow: hidden; padding: clamp(3.5rem, 8vw, 6rem) 0 3rem;
}
.hero::before {
  content: ''; position: absolute; width: 22rem; height: 22rem; right: -8rem; top: -7rem;
  border-radius: 50%; background: var(--amber-100); opacity: .65; z-index: -1;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1.02; letter-spacing: -.045em; }
.hero .lede { line-height: 1.7; }
.search-bar { box-shadow: var(--shadow-soft); border-color: rgba(15,27,51,.10); }
.asset-card { box-shadow: 0 2px 0 rgba(15,27,51,.03); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.asset-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: rgba(15,27,51,.16); text-decoration: none; }
.asset-card .thumb { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--navy-100), var(--paper-100)); }
.asset-card .body { padding: 1rem 1.1rem 1.15rem; }
.asset-card .price { margin-top: .45rem; }
.card, .stat, .table-wrap, .modal { box-shadow: var(--shadow-soft); }
.stat { transition: transform .15s ease, box-shadow .15s ease; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn { min-height: 2.55rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(15,27,51,.08); outline: none; }
.sidebar { box-shadow: 8px 0 24px rgba(15,27,51,.06); }
.topbar { box-shadow: 0 1px 12px rgba(15,27,51,.04); }
.empty-state { border: 1px dashed var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.7); }

@media (max-width: 640px) {
  .site-header { padding: .8rem 1rem; gap: .75rem; }
  .site-header nav { gap: .45rem; }
  .site-header nav > a:not(.btn) { display: none; }
  .site-header .brand { font-size: 1.15rem; }
  .hero { padding-top: 3rem; }
  .search-bar { padding: .75rem; }
  .search-bar input, .search-bar select, .search-bar .btn { min-width: 100%; width: 100%; }
  .content { padding: 1rem; }
  .topbar { position: sticky; top: 0; }
  .sidebar nav { overflow-x: auto; flex-wrap: nowrap; padding-bottom: .25rem; }
  .sidebar nav a { flex: 0 0 auto; }
}
