/* =========================================================
   PMarket — Pangeia Market design system
   ========================================================= */

:root {
  --green-950: #0b2e22;
  --green-900: #103a2b;
  --green-800: #12452f;
  --green-700: #0e6b3f;
  --green-600: #16824c;
  --green-500: #229960;
  --green-400: #3dab74;
  --green-100: #e7f3ec;
  --green-50: #f3f9f5;

  --ink: #0b2e22;
  --body: #2e3b36;
  --muted: #6b7a74;
  --muted-2: #94a19c;

  --bg: #f6f8f7;
  --white: #ffffff;
  --border: #e6e9e6;
  --border-strong: #d7dbd7;

  --amber-bg: #fef3c7;
  --amber-text: #92620a;
  --blue-bg: #dbeafe;
  --blue-text: #1d4ed8;
  --badge-green-bg: #e3f5ea;
  --badge-green-text: #0e6b3f;
  --red-bg: #fee2e2;
  --red-text: #b91c1c;
  --purple-bg: #ede9fe;
  --purple-text: #6d28d9;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(11, 46, 34, 0.06), 0 1px 1px rgba(11, 46, 34, 0.04);
  --shadow-md: 0 4px 16px rgba(11, 46, 34, 0.08);
  --shadow-lg: 0 12px 32px rgba(11, 46, 34, 0.14);

  --header-h: 64px;
  --bottomnav-h: 64px;
  --sidebar-w: 264px;
  --rightrail-w: 320px;

  --font-display: "Poppins", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
input, select, textarea { font-family: inherit; font-size: 14px; }

.container { max-width: 1440px; margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; border: none; font-weight: 600; font-size: 14px;
  padding: 12px 22px; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--green-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-600); }
.btn-outline { background: transparent; color: var(--green-700); border: 1.5px solid var(--green-700); }
.btn-outline:hover { background: var(--green-50); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--green-50); }
.btn-light { background: #fff; color: var(--green-700); }
.btn-dark { background: var(--green-950); color: #fff; }
.btn-danger { background: var(--red-text); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 15px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: var(--green-50); color: var(--green-800); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Header (mobile) ---------- */
.mobile-header {
  position: sticky; top: 0; z-index: 40; background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 16px 10px;
}
.mobile-header__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { width: 40px; height: 40px; border-radius: 11px; overflow: hidden; flex-shrink: 0; }
.brand__mark img { width: 100%; height: 100%; object-fit: cover; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--green-900); letter-spacing: -.2px; }
.brand__sub { font-size: 9.5px; font-weight: 700; letter-spacing: 1.4px; color: var(--green-600); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--ink); background: transparent; border: none; font-size: 19px;
}
.icon-btn:hover { background: var(--green-50); }
.icon-btn .badge-dot {
  position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; border-radius: 999px;
  background: var(--green-700); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 3px; border: 2px solid #fff;
}
.search-bar {
  display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 11px 16px; margin-top: 12px; color: var(--muted-2);
}
.search-bar input { border: none; background: transparent; outline: none; width: 100%; font-size: 14px; color: var(--ink); }
.search-bar i { font-size: 16px; }

/* ---------- Desktop topbar ---------- */
.desktop-topbar {
  display: none;
  position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--border);
  padding: 14px 32px;
}
.desktop-topbar__inner { display: flex; align-items: center; gap: 28px; }
.desktop-search {
  flex: 1; display: flex; align-items: center; background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 4px 4px 18px; gap: 10px; max-width: 640px; color: var(--muted-2);
}
.desktop-search input { flex: 1; border: none; background: transparent; outline: none; font-size: 14px; color: var(--ink); }
.desktop-search .cat-select {
  border-left: 1px solid var(--border-strong); padding: 9px 14px; font-size: 13px; color: var(--body);
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.desktop-search button.go {
  background: var(--green-700); color: #fff; width: 38px; height: 38px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.topbar-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.account-chip { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 999px; }
.account-chip:hover { background: var(--green-50); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--green-600); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; object-fit: cover; }
.account-chip__text { line-height: 1.15; }
.account-chip__hi { font-size: 12px; color: var(--muted); }
.account-chip__name { font-size: 13.5px; font-weight: 600; color: var(--ink); }

/* ---------- App shell / grid ---------- */
.app-shell { display: block; }
.shell-grid { display: block; padding: 0; }
.main-col { min-width: 0; }
.sidebar { display: none; }
.right-rail { display: none; }
.bottom-nav { display: flex; }

@media (min-width: 992px) {
  .mobile-header { display: none; }
  .bottom-nav { max-width: 640px; left: 50%; right: auto; transform: translateX(-50%); border-radius: 999px 999px 0 0; box-shadow: var(--shadow-lg); padding: 10px 24px calc(10px + env(safe-area-inset-bottom)); }
  .desktop-topbar { display: block; }
  .app-shell { display: flex; }
  .sidebar { display: flex; }
  .shell-grid {
    flex: 1; display: grid; grid-template-columns: minmax(0,1fr) var(--rightrail-w);
    gap: 24px; padding: 24px 32px; align-items: start; min-width: 0;
  }
  .shell-grid.no-rail { grid-template-columns: minmax(0,1fr); }
  .shell-grid.centered { grid-template-columns: minmax(0,1fr); max-width: 1100px; }
  .sidebar { position: sticky; top: 90px; flex-direction: column; gap: 20px; height: fit-content; }
  .right-rail { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 18px; }
}

/* ---------- Sidebar (desktop) ---------- */
.side-nav { background: transparent; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  font-size: 14.5px; font-weight: 500; color: var(--body); margin-bottom: 2px; position: relative;
}
.side-nav a i { font-size: 17px; width: 20px; text-align: center; color: var(--muted); }
.side-nav a:hover { background: var(--green-50); }
.side-nav a.active { background: var(--green-100); color: var(--green-800); font-weight: 600; }
.side-nav a.active i { color: var(--green-700); }
.side-nav a .mini-badge {
  margin-left: auto; background: var(--green-700); color: #fff; font-size: 10.5px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
}
.side-promo { background: var(--green-50); border-radius: var(--radius-md); padding: 18px; }
.side-promo h4 { font-size: 14.5px; margin-bottom: 6px; }
.side-promo p { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
.side-promo.gray { background: var(--bg); }
.side-promo.dark { background: var(--green-950); color: #fff; }
.side-promo.dark h4 { color: #fff; }
.side-promo.dark p { color: rgba(255,255,255,.72); }
.side-promo a.link { font-size: 12.5px; font-weight: 700; color: var(--green-700); display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: #fff; border-top: 1px solid var(--border);
  align-items: center; justify-content: space-around; padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted-2);
  font-size: 10.5px; font-weight: 600; flex: 1; padding: 4px 0; position: relative;
}
.bottom-nav a i { font-size: 21px; }
.bottom-nav a.active { color: var(--green-700); }
.bottom-nav a .badge-dot { position: absolute; top: -2px; right: 20%; }
.bottom-nav a.fab-link { margin-top: -30px; }
.bottom-nav .fab {
  width: 52px; height: 52px; border-radius: 50%; background: var(--green-700); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 8px 18px rgba(14,107,63,.4);
  border: 4px solid #fff;
}
.bottom-nav a.fab-link span { display: none; }

/* page padding to clear fixed bottom nav */
.page-pad-bottom { padding-bottom: 88px; }
@media (min-width: 992px) { .page-pad-bottom { padding-bottom: 40px; } }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--green-950), #0f4432 70%);
  border-radius: var(--radius-lg); color: #fff; padding: 28px 22px; position: relative; overflow: hidden;
  margin: 16px;
}
@media (min-width: 992px) { .hero { margin: 0; padding: 36px 40px; } }
.hero__grid { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.hero__title { font-size: 24px; font-weight: 700; max-width: 420px; line-height: 1.25; color: #fff; }
@media (min-width: 992px) { .hero__title { font-size: 30px; } }
.hero__desc { color: rgba(255,255,255,.78); font-size: 14px; margin-top: 10px; max-width: 380px; line-height: 1.5; }
.hero__cta { display: flex; align-items: center; gap: 18px; margin-top: 20px; flex-wrap: wrap; }
.hero__cta .link-white { color: #fff; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.hero__art { flex-shrink: 0; }
.hero__feats { display: none; }
@media (min-width: 992px) {
  .hero__feats { display: flex; gap: 26px; margin-top: 26px; flex-wrap: wrap; }
  .hero__feats span { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255,255,255,.85); }
  .hero__feats i { color: var(--green-400); font-size: 15px; }
}

.phone-mock {
  width: 148px; height: 220px; background: #fff; border-radius: 22px; border: 5px solid #0d3c2c;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; position: relative;
  box-shadow: var(--shadow-lg);
}
.phone-mock .pix-label { font-size: 11px; font-weight: 700; color: var(--green-800); display: flex; align-items: center; gap: 4px; }
.qr {
  width: 84px; height: 84px; border-radius: 8px; flex-shrink: 0;
  background-image: repeating-linear-gradient(45deg, #0b2e22 0 4px, transparent 4px 8px),
    repeating-linear-gradient(-45deg, #0b2e22 0 4px, transparent 4px 8px);
  background-blend-mode: multiply; background-color: #fff; border: 1px solid #eee;
}
.phone-mock .scan-btn { background: var(--green-700); color: #fff; font-size: 9.5px; font-weight: 700; padding: 5px 14px; border-radius: 999px; }
.hero__art-wrap { display: flex; align-items: flex-end; gap: -10px; position: relative; }
.parcel-box { width: 76px; height: 62px; background: linear-gradient(135deg,#c88a4d,#a9692b); border-radius: 6px; margin-left: -18px; position: relative; box-shadow: var(--shadow-md); }
.parcel-box::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 46%, rgba(255,255,255,.35) 46% 54%, transparent 54%); }
.parcel-box::after { content: "✚"; position: absolute; top: 4px; right: 6px; color: #2563eb; font-size: 12px; font-weight: 900; }

/* ---------- Quick actions ---------- */
.quick-actions { display: flex; gap: 14px; overflow-x: auto; padding: 18px 16px 6px; scrollbar-width: none; }
.quick-actions::-webkit-scrollbar { display: none; }
@media (min-width: 992px) { .quick-actions { padding: 0; display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; } }
.quick-action { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; width: 78px; text-align: center; }
.quick-action__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.quick-action span { font-size: 11.5px; font-weight: 600; color: var(--body); line-height: 1.25; }

.tools-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; }
.tools-card h4 { font-size: 14px; margin-bottom: 14px; }
.tools-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.tool-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 6px; border-radius: 12px; }
.tool-tile:hover { background: var(--green-50); }
.tool-tile__icon { width: 46px; height: 46px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.tool-tile span { font-size: 11.5px; font-weight: 600; color: var(--body); }

/* ---------- Section header ---------- */
.section { padding: 22px 16px; }
@media (min-width: 992px) { .section { padding: 0; } }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-head h3 { font-size: 17px; }
.section-head .see-all { font-size: 13px; font-weight: 700; color: var(--green-700); display: flex; align-items: center; gap: 4px; }

/* ---------- Product card / grid ---------- */
.product-scroll { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 6px; }
.product-scroll::-webkit-scrollbar { display: none; }
@media (min-width: 992px) {
  .product-scroll { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
  .product-scroll .product-card { width: auto; }
}
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
@media (min-width: 700px) { .product-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (min-width: 992px) { .product-grid { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 16px; } }
.product-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden;
  flex-shrink: 0; width: 168px; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s;
}
.product-grid .product-card { width: auto; }
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card__img { position: relative; aspect-ratio: 1/1; background: var(--bg); }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; }
.product-card__fav {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.92);
  display: flex; align-items: center; justify-content: center; color: var(--red-text); font-size: 14px; box-shadow: var(--shadow-sm); border: none;
}
.product-card__fav.is-fav i::before { font-weight: 900; }
.product-card__body { padding: 10px 12px 13px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-card__title { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; min-height: 2.6em; }
.product-card__price { font-size: 15.5px; font-weight: 700; color: var(--green-700); font-family: var(--font-display); }
.product-card__ship { font-size: 11px; color: var(--muted); }
.product-card__loc { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-top: 2px; }

/* ---------- How it works ---------- */
.how-it-works { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px 16px; margin: 6px 16px 24px; }
@media (min-width: 992px) { .how-it-works { margin: 0; padding: 26px; } }
.how-it-works h3 { margin-bottom: 18px; font-size: 16px; }
.how-steps { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; overflow-x: auto; }
.how-step { display: flex; flex-direction: column; align-items: center; text-align: center; width: 130px; flex-shrink: 0; gap: 8px; }
.how-step__icon { width: 52px; height: 52px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: flex; align-items: center; justify-content: center; font-size: 21px; }
.how-step b { font-size: 12.5px; color: var(--ink); }
.how-step p { font-size: 11px; color: var(--muted); line-height: 1.4; }
.how-arrow { color: var(--border-strong); font-size: 18px; margin-top: 16px; flex-shrink: 0; }

/* ---------- Cards & lists ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); }
.card-pad { padding: 18px; }
.list-card__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 4px; }
.list-card__head h4 { font-size: 14.5px; }
.list-card__head a { font-size: 12.5px; font-weight: 700; color: var(--green-700); }
.order-row { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--border); }
.order-row__thumb { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--bg); }
.order-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-row__info { flex: 1; min-width: 0; }
.order-row__title { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-row__meta { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-green { background: var(--badge-green-bg); color: var(--badge-green-text); }
.badge-blue { background: var(--blue-bg); color: var(--blue-text); }
.badge-amber { background: var(--amber-bg); color: var(--amber-text); }
.badge-red { background: var(--red-bg); color: var(--red-text); }
.badge-purple { background: var(--purple-bg); color: var(--purple-text); }
.badge-gray { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }

/* ---------- Help / support card ---------- */
.support-card { background: var(--green-950); border-radius: var(--radius-md); padding: 18px; color: #fff; display: flex; gap: 14px; align-items: center; }
.support-card__avatar { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.support-card h5 { color: #fff; font-size: 13.5px; margin-bottom: 4px; }
.support-card p { font-size: 11.5px; color: rgba(255,255,255,.72); line-height: 1.4; margin-bottom: 10px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field .hint { font-size: 11px; color: var(--muted); margin-top: 5px; }
.input, select.input, textarea.input {
  width: 100%; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); padding: 11px 14px;
  font-size: 14px; color: var(--ink); background: #fff; outline: none; transition: border-color .12s;
}
.input:focus { border-color: var(--green-600); }
.input-group { display: flex; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .input-suffix { border: 1.5px solid var(--border-strong); border-left: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 11px 14px; background: var(--bg); font-size: 13px; color: var(--muted); display: flex; align-items: center; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row-2, .row-3 { grid-template-columns: 1fr; } }
.upload-box {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-md); padding: 26px; text-align: center;
  color: var(--muted); font-size: 12.5px; background: var(--green-50);
}
.upload-box i { font-size: 26px; color: var(--green-600); margin-bottom: 8px; display: block; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px; transition: .2s; }
.switch .slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--green-600); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* ---------- Page header (generic inner pages) ---------- */
.page-head { padding: 18px 16px 4px; }
@media (min-width: 992px) { .page-head { padding: 0 0 4px; } }
.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--green-700); }
.page-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.page-title-row h1, .page-title-row h2 { font-size: 20px; }
.page-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.back-btn { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); padding: 0 16px; overflow-x: auto; }
@media (min-width: 992px) { .tabs { padding: 0; } }
.tabs a { padding: 12px 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); border-bottom: 2.5px solid transparent; white-space: nowrap; margin-right: 18px; }
.tabs a.active { color: var(--green-700); border-color: var(--green-700); }

/* ---------- Stat tiles ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
@media (min-width: 700px) { .stat-grid { grid-template-columns: repeat(4,1fr); } }
.stat-tile { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; }
.stat-tile__label { font-size: 11.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat-tile__value { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--ink); margin-top: 8px; }
.stat-tile__delta { font-size: 11px; font-weight: 700; margin-top: 4px; }
.stat-tile__delta.up { color: var(--green-700); }
.stat-tile__delta.down { color: var(--red-text); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.data-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg); white-space: nowrap; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--green-50); }
.cell-main { display: flex; align-items: center; gap: 10px; }
.cell-thumb { width: 36px; height: 36px; border-radius: 8px; background: var(--bg); overflow: hidden; flex-shrink: 0; }
.cell-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Timeline (tracking) ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -21px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--border-strong); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--border-strong); }
.timeline-item::after { content: ""; position: absolute; left: -16px; top: 14px; bottom: -8px; width: 1.5px; background: var(--border); }
.timeline-item:last-child::after { display: none; }
.timeline-item.done::before { background: var(--green-600); box-shadow: 0 0 0 1px var(--green-600); }
.timeline-item.current::before { background: var(--green-700); box-shadow: 0 0 0 4px var(--green-100); }
.timeline-item b { font-size: 13px; color: var(--ink); display: block; }
.timeline-item span { font-size: 11.5px; color: var(--muted); }

/* ---------- Chat ---------- */
.chat-list-item { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); align-items: center; }
.chat-list-item:hover { background: var(--green-50); }
.chat-list-item__name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.chat-list-item__msg { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.chat-list-item__meta { text-align: right; flex-shrink: 0; }
.chat-list-item__time { font-size: 10.5px; color: var(--muted-2); }
.chat-window { display: flex; flex-direction: column; gap: 10px; padding: 18px; min-height: 340px; }
.bubble { max-width: 72%; padding: 10px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.4; }
.bubble.in { background: var(--bg); border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble.out { background: var(--green-700); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-input-bar { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(11,46,34,.55); z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius-lg); max-width: 420px; width: 100%; padding: 26px; position: relative; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.modal-box.modal-lg { max-width: 640px; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; border: none; color: var(--ink); }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--green-950); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 13px; font-weight: 600; z-index: 300; opacity: 0; pointer-events: none; transition: .25s; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 992px) { .toast { bottom: 30px; } }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state i { font-size: 40px; color: var(--border-strong); margin-bottom: 14px; display: block; }
.empty-state h4 { color: var(--ink); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ---------- Login page ---------- */
.login-page { min-height: 100dvh; display: flex; align-items: center; justify-content: center; background: var(--green-950); padding: 20px; position: relative; overflow: hidden; }
.login-page::before, .login-page::after { content: ""; position: absolute; border-radius: 50%; background: rgba(34,153,96,.25); filter: blur(60px); }
.login-page::before { width: 380px; height: 380px; top: -120px; left: -100px; }
.login-page::after { width: 420px; height: 420px; bottom: -160px; right: -120px; background: rgba(61,171,116,.2); }
.login-card { background: #fff; border-radius: var(--radius-xl); padding: 38px 30px; max-width: 380px; width: 100%; position: relative; z-index: 1; box-shadow: var(--shadow-lg); }
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 24px; }
.login-logo img { width: 60px; height: 60px; border-radius: 16px; }
.login-title { font-size: 19px; text-align: center; }
.login-desc { font-size: 13px; color: var(--muted); text-align: center; margin-top: 6px; line-height: 1.5; }
.pangeia-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--green-950);
  color: #fff; border-radius: 999px; padding: 14px; font-weight: 700; font-size: 14px; margin-top: 22px; border: none;
}
.pangeia-btn img { width: 20px; height: 20px; border-radius: 5px; }
.login-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0; color: var(--muted-2); font-size: 11.5px; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.role-pick { display: flex; flex-direction: column; gap: 8px; }
.role-pick button { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: #fff; font-size: 13px; font-weight: 600; color: var(--ink); }
.role-pick button:hover { border-color: var(--green-600); background: var(--green-50); }
.role-pick button i { color: var(--green-700); font-size: 16px; }
.login-foot { text-align: center; font-size: 11px; color: var(--muted-2); margin-top: 18px; line-height: 1.6; }

/* pangeia-id modal (simulated SDK) */
.pid-modal .pid-brand { display: flex; align-items: center; gap: 8px; justify-content: center; margin-bottom: 18px; }
.pid-modal .pid-brand b { font-family: var(--font-display); font-size: 15px; }
.pid-modal .pid-brand img { width: 26px; height: 26px; border-radius: 6px; }
.pid-step { display: none; }
.pid-step.active { display: block; }
.pid-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 30px 0; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--green-700); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 992px) { .hide-desktop { display: none !important; } }
@media (max-width: 991.98px) { .hide-mobile { display: none !important; } }

/* ---------- Misc utils ---------- */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.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-12{margin-bottom:12px;} .mb-16{margin-bottom:16px;}
.muted { color: var(--muted); }
.text-sm { font-size: 12.5px; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.pill-check { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--border-strong); border-radius: 12px; }
.pill-check.selected { border-color: var(--green-600); background: var(--green-50); }
.copy-field { display: flex; gap: 8px; background: var(--bg); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 11.5px; word-break: break-all; align-items: center; }
.doc-preview { background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 24px; font-size: 12.5px; line-height: 1.7; }
.doc-preview h4 { text-align: center; font-size: 14px; margin-bottom: 4px; }
.doc-preview .doc-sub { text-align: center; font-size: 11px; color: var(--muted); margin-bottom: 16px; }
.label-preview { background: #fff; border: 2px solid var(--ink); border-radius: 6px; padding: 14px; font-size: 11px; }
