/* ============================================================
   Pock-IT design system — from prototype scratchpad spec
   ============================================================ */
:root {
  --bg: #15130e;
  --bg-deep: #0c0b08;
  --card: #1a1711;
  --card-2: #1d1913;
  --ink: #100e0a;
  --line: #241f17;
  --line-2: #2a261d;
  --line-3: #3a2c19;
  --orange: #e0832f;
  --green: #7d9b4e;
  --red: #c05b4d;
  --text: #e9e3d5;
  --text-2: #a59d8a;
  --text-3: #8a8270;
  --text-4: #6f6856;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Archivo', -apple-system, sans-serif;
  --r-card: 16px;
  --r-btn: 12px;
  --r-chip: 999px;
  --tabbar-h: 76px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font-family: inherit; color: var(--text); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 0; height: 0; }

/* mono label — uppercase eyebrows/data */
.mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.eyebrow { font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--text-3); }

/* diamond motif */
.diamond {
  width: 13px; height: 13px; border: 2.5px solid var(--ink);
  border-radius: 3px; transform: rotate(45deg);
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 7px; background: var(--orange);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.logo-word { font-weight: 900; font-size: 20px; letter-spacing: -0.5px; }
.logo-word em { color: var(--orange); font-style: normal; }

/* hatch motif */
.hatch {
  background-image: repeating-linear-gradient(135deg,
    transparent 0 6px, rgba(224, 131, 47, .07) 6px 7px);
}

/* ============ layout shell ============ */
#app { display: flex; min-height: 100dvh; background: var(--bg); max-width: 1400px; margin: 0 auto; }

.shell-side { display: none; }
.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; }
.screen { flex: 1; padding-bottom: calc(var(--tabbar-h) + 16px); }

/* mobile bottom tab bar */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  height: var(--tabbar-h);
  background: rgba(21, 19, 14, .96); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: flex; align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--text-4); font-size: 10px; font-family: var(--mono);
  text-transform: uppercase; letter-spacing: .06em; position: relative;
}
.tabbar button.active { color: var(--orange); }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar .fab {
  flex: 0 0 64px; align-self: center;
}
.tabbar .fab > span {
  width: 48px; height: 48px; border-radius: 14px; background: var(--orange);
  display: flex; align-items: center; justify-content: center; color: var(--ink);
  box-shadow: 0 6px 18px rgba(224, 131, 47, .35);
}

/* desktop */
@media (min-width: 900px) {
  body { background: var(--bg-deep); }
  #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .tabbar { display: none; }
  .screen { padding-bottom: 24px; }
  .shell-side {
    display: flex; flex-direction: column; flex: 0 0 232px;
    border-right: 1px solid var(--line); padding: 22px 14px;
    position: sticky; top: 0; height: 100dvh; gap: 4px;
  }
  .shell-side .nav-item {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px;
    border-radius: 12px; color: var(--text-2); font-weight: 600; font-size: 14.5px;
    transition: background .16s ease; position: relative; text-align: left; width: 100%;
  }
  .shell-side .nav-item:hover { background: var(--card-2); }
  .shell-side .nav-item.active { color: var(--text); background: var(--card-2); }
  .shell-side .nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
    border-radius: 2px; background: var(--orange);
  }
  .shell-side .nav-item svg { width: 20px; height: 20px; flex: 0 0 auto; }
  .feed-wrap { max-width: 680px; margin: 0 auto; width: 100%; }
  .content-cols { display: flex; gap: 0; align-items: flex-start; }
  .col-main { flex: 1; min-width: 0; }
  .col-rail { flex: 0 0 300px; border-left: 1px solid var(--line); position: sticky; top: 0; max-height: 100dvh; overflow-y: auto; }
}

/* ============ header ============ */
.hdr {
  position: sticky; top: 0; z-index: 30;
  padding: 14px 18px 12px;
  background: rgba(21, 19, 14, .95); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
@supports (padding: max(0px)) {
  .hdr { padding-top: max(14px, env(safe-area-inset-top)); }
}
.hdr .title { font-weight: 900; font-size: 20px; letter-spacing: -.5px; flex: 1; }
.hdr .icon-btn {
  width: 38px; height: 38px; border-radius: 11px; color: #c7c0ae;
  display: flex; align-items: center; justify-content: center; position: relative;
  transition: background .16s ease, transform .12s ease;
}
.hdr .icon-btn:hover { background: var(--card-2); }
.hdr .icon-btn:active { background: #241d12; transform: scale(.94); }
.hdr .icon-btn svg { width: 21px; height: 21px; }
.badge-dot {
  position: absolute; top: 7px; right: 7px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--orange); border: 2px solid var(--bg);
}
.back-btn { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; font-size: 14px; padding: 6px 8px 6px 0; }
.back-btn svg { width: 22px; height: 22px; flex: 0 0 auto; }

/* ============ components ============ */
.card {
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-card);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 18px; border-radius: var(--r-btn); font-weight: 700; font-size: 14.5px;
  transition: transform .12s ease, filter .16s ease; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--orange); color: var(--ink); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: var(--card-2); color: var(--text); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: #241f17; }
.btn-danger { background: rgba(192, 91, 77, .14); color: #d98a7d; border: 1px solid rgba(192, 91, 77, .35); }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 10px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--r-chip); font-size: 13px; font-weight: 600;
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--text-2);
  transition: all .14s ease; white-space: nowrap;
}
.chip.active, .chip:hover { border-color: var(--orange); color: var(--orange); background: rgba(224, 131, 47, .08); }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 12px 18px; }

.tag {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  padding: 4px 8px; border-radius: 6px; background: var(--card-2); color: var(--text-3);
  border: 1px solid var(--line-2); display: inline-block;
}
.tag-orange { background: rgba(224, 131, 47, .12); color: var(--orange); border-color: rgba(224, 131, 47, .3); }
.tag-green { background: rgba(125, 155, 78, .12); color: var(--green); border-color: rgba(125, 155, 78, .3); }
.tag-red { background: rgba(192, 91, 77, .12); color: #d98a7d; border-color: rgba(192, 91, 77, .3); }

.avatar {
  border-radius: 50%; background: var(--card-2); border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--orange); flex: 0 0 auto; overflow: hidden;
  font-size: .42em;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.input {
  width: 100%; padding: 13px 15px; border-radius: var(--r-btn);
  background: var(--ink); border: 1px solid var(--line-2);
  font-size: 15px; outline: none; transition: border-color .15s ease;
}
.input:focus { border-color: var(--orange); }
.input::placeholder { color: var(--text-4); }
label.field { display: block; }
label.field .lbl { display: block; margin-bottom: 7px; }

/* segmented control */
.seg { display: flex; background: var(--ink); border: 1px solid var(--line-2); border-radius: 12px; padding: 3px; }
.seg button {
  flex: 1; padding: 9px 6px; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--text-3);
}
.seg button.active { background: var(--card-2); color: var(--text); border: 1px solid var(--line-3); }

/* bottom sheet / modal */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .6);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadein .18s ease;
}
.sheet {
  width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line-2); border-bottom: none;
  border-radius: 22px 22px 0 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  animation: sheet-up .26s cubic-bezier(.32, .72, .27, 1);
}
.sheet .grabber { width: 40px; height: 4px; border-radius: 2px; background: var(--line-3); margin: 4px auto 16px; }
@media (min-width: 900px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 20px; border-bottom: 1px solid var(--line-2); animation: rise .2s ease; }
}

/* toast */
.toast {
  position: fixed; bottom: calc(var(--tabbar-h) + 18px); left: 50%; transform: translateX(-50%);
  z-index: 90; background: #262117; border: 1px solid var(--line-3); color: var(--text);
  padding: 12px 20px; border-radius: 13px; font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: toastup .22s ease;
  max-width: min(90vw, 420px); text-align: center;
}
@media (min-width: 900px) { .toast { bottom: 32px; } }

/* stat blocks */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 14px; text-align: center; }
.stat .num { font-weight: 900; font-size: 21px; letter-spacing: -.5px; }
.stat .lbl { margin-top: 4px; font-size: 10px; }

/* item / listing grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .grid-2 { grid-template-columns: repeat(4, 1fr); } }

.thumb {
  aspect-ratio: 1; border-radius: 13px; background: var(--card-2);
  border: 1px solid var(--line-2); overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center; color: var(--text-4);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* list rows */
.row {
  display: flex; align-items: center; gap: 13px; padding: 14px 18px;
  border-bottom: 1px solid var(--line); transition: background .14s ease; text-align: left; width: 100%;
}
.row:hover { background: var(--card-2); }

/* shimmer skeleton */
.shimmer {
  background: linear-gradient(90deg, var(--card) 0, var(--card-2) 40%, var(--card) 80%);
  background-size: 260px 100%; animation: shimmer 1.1s linear infinite;
  border-radius: 10px; color: transparent !important;
}

/* section headers */
.sect { display: flex; align-items: baseline; gap: 10px; padding: 22px 18px 12px; }
.sect h2 { font-weight: 900; font-size: 17px; letter-spacing: -.3px; flex: 1; }
.sect .see-all { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--orange); }

/* empty state */
.empty { text-align: center; padding: 48px 32px; color: var(--text-3); }
.empty .glyph {
  width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 16px;
  background: var(--card-2); border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center; color: var(--text-4);
}
.empty h3 { color: var(--text); font-size: 16px; margin-bottom: 6px; }
.empty p { font-size: 13.5px; line-height: 1.5; max-width: 300px; margin: 0 auto 18px; }

/* escrow / status steps */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 14px; position: relative; padding-bottom: 22px; }
.step::before {
  content: ''; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--line-2);
}
.step:last-child::before { display: none; }
.step .dot {
  width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto; z-index: 1;
  background: var(--card-2); border: 2px solid var(--line-3);
  display: flex; align-items: center; justify-content: center;
}
.step.done .dot { background: var(--green); border-color: var(--green); color: var(--ink); }
.step.now .dot { border-color: var(--orange); }
.step.now .dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }

/* onboarding overlay */
.ob-overlay {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; flex-direction: column; overflow-y: auto;
}
.ob-inner { width: 100%; max-width: 480px; margin: 0 auto; padding: 48px 26px 40px; flex: 1; display: flex; flex-direction: column; }

/* misc animations */
@keyframes sheet-up { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { from { background-position: -260px 0; } to { background-position: 260px 0; } }
@keyframes toastup { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes typedot { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.spin { animation: spin .8s linear infinite; }
.rise { animation: rise .24s ease; }

/* utility */
.px { padding-left: 18px; padding-right: 18px; }
.muted { color: var(--text-3); }
.dim { color: var(--text-4); }
.orange { color: var(--orange); }
.green { color: var(--green); }
.bold { font-weight: 800; }
.small { font-size: 12.5px; }
.divider { height: 1px; background: var(--line); }
.price { font-family: var(--mono); font-weight: 700; }
