/* ===========================================================
   Second Spot — premium white marketplace design system
   =========================================================== */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #fbfcfd;
  --surface-3: #f5f7f9;
  --border: #edeff3;
  --border-strong: #e2e5ea;
  --text: #0e1016;
  --text-soft: #565a63;
  --text-mute: #969aa4;

  --brand: #0f7a5c;
  --brand-dark: #0b5a44;
  --brand-soft: #edf8f4;
  --brand-ring: rgba(15, 122, 92, .14);

  --accent: #c08f2c;
  --accent-soft: #fdf7ea;

  --ok: #128550;
  --ok-soft: #eefaf3;
  --bad: #cf3b30;
  --bad-soft: #fef1ef;
  --warn: #b3730c;
  --warn-soft: #fef7ea;
  --dim-soft: #f5f7f9;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .03);
  --shadow-sm: 0 2px 10px rgba(16, 24, 40, .045);
  --shadow-md: 0 10px 28px rgba(16, 24, 40, .06);
  --shadow-lg: 0 24px 56px rgba(16, 24, 40, .09);

  --header-h: 68px;
  --tabbar-h: 62px;
  --maxw: 1240px;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: 15px; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0; color: var(--text-soft); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.muted { color: var(--text-mute); }
.center { text-align: center; align-items: center; }
.hide-sm { display: inline; }
::selection { background: var(--brand-ring); }

/* icons (Lucide) */
.ic { width: 18px; height: 18px; stroke-width: 2px; display: inline-block; vertical-align: -3px; flex-shrink: 0; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 24px; height: 24px; }
.ic-xl { width: 30px; height: 30px; }

/* layout helpers */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap- { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .grid2 { grid-template-columns: 1fr; } }

/* surfaces */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.pad { padding: 20px; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x; overscroll-behavior-x: contain; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 11px 18px; font-weight: 700; font-size: 14.5px;
  background: var(--surface-2); color: var(--text);
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(15,122,92,.18); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { background: var(--surface); border-color: var(--border-strong); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.danger:hover { background: #fde3df; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-sm); color: var(--text-soft);
  border: 1px solid transparent;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.badge-dot {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-style: normal;
}

/* badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700; background: var(--dim-soft); color: var(--text-soft);
  text-transform: capitalize;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.brand { background: var(--brand-soft); color: var(--brand-dark); }
.badge.dim { background: var(--dim-soft); color: var(--text-mute); }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-soft); }
.in {
  width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 11px 13px; background: var(--surface); font-weight: 500; color: var(--text);
}
.in:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
textarea.in { min-height: 110px; resize: vertical; }
.searchbar {
  display: flex; align-items: center; gap: 8px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill); padding: 0 14px; height: 44px;
}
.searchbar .ic { color: var(--text-mute); }
.searchbar input { flex: 1; background: transparent; border: none; outline: none; height: 100%; }
.searchrow { display: flex; gap: 10px; flex-wrap: wrap; }
.searchrow .searchbar { flex: 1; min-width: 200px; }

/* ---------------- header / nav ---------------- */
.top { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.top .bar { max-width: var(--maxw); margin: 0 auto; height: var(--header-h); display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo .wordmark {
  font-family: 'Sora', 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 21px; letter-spacing: -.035em; line-height: 1;
  color: var(--brand-dark); white-space: nowrap;
}
.logo:hover .wordmark { color: var(--brand); }
@media (max-width: 520px) { .logo .wordmark { font-size: 18px; } }
.megalinks { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.megalinks a { padding: 9px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--text-soft); display: flex; align-items: center; gap: 6px; }
.megalinks a:hover, .megalinks a.on { background: var(--surface-2); color: var(--text); }
.top .bar > .searchbar { flex: 1; max-width: 420px; }
.nav-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.avatar {
  width: 34px; height: 34px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark);
  display: grid; place-items: center; font-weight: 800; font-size: 13px; overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.tabbar { display: none; }
main { min-height: calc(100vh - var(--header-h) - 60px); }

@media (max-width: 980px) {
  .megalinks { display: none; }
  .top .bar > .searchbar { display: none; }
}
@media (max-width: 720px) {
  .hide-sm { display: none; }
  main { padding-bottom: calc(var(--tabbar-h) + 10px); }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: rgba(255,255,255,.98); border-top: 1px solid var(--border); backdrop-filter: blur(10px);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar .items { display: flex; width: 100%; height: var(--tabbar-h); }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--text-mute); font-size: 11px; font-weight: 700; position: relative;
  }
  .tabbar a.on { color: var(--brand); }
  .tabbar a .ic { width: 21px; height: 21px; }
}

/* ---------------- footer ---------------- */
.sitefooter { background: var(--bg); border-top: 1px solid var(--border); margin-top: 56px; }
.sitefooter .wrap { padding: 44px 20px 26px; }
.footgrid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 900px) { .footgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footgrid { grid-template-columns: 1fr; } }
.footgrid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mute); margin: 0 0 12px; }
.footgrid a, .footgrid p { display: block; color: var(--text-soft); font-size: 14px; margin-bottom: 9px; }
.footgrid a:hover { color: var(--brand); }
.footbottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-mute); font-size: 13px; }
.footbottom .row { gap: 14px; }

/* ---------------- hero / home ---------------- */
.hero { background: var(--bg); padding: 54px 0 30px; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: clamp(28px, 4.4vw, 44px); max-width: 720px; }
.hero p { font-size: 16px; max-width: 560px; margin-top: 10px; }
.hero .searchrow { margin-top: 22px; max-width: 720px; }
.hero .btn.primary { height: 44px; padding: 0 22px; }

.announce {
  background: var(--accent-soft); color: var(--warn); text-align: center; padding: 10px 16px; font-size: 13.5px; font-weight: 700;
}

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 34px 0 16px; }
.link.small { font-size: 13.5px; font-weight: 700; color: var(--brand); display: inline-flex; align-items: center; gap: 4px; }

.catrail { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; }
.cattile {
  display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 16px 8px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer;
  transition: box-shadow .15s ease, border-color .15s ease, transform .1s ease;
  text-align: center;
}
.cattile:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); transform: translateY(-2px); }
.cattile .icwrap { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; overflow: hidden; }
.cattile .icwrap img { width: 100%; height: 100%; object-fit: cover; }
.cattile .nm { font-size: 13px; font-weight: 700; }

.subtile {
  display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px;
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); cursor: pointer;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.subtile:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.subtile .thumb { width: 30px; height: 30px; border-radius: 999px; overflow: hidden; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; flex-shrink: 0; }
.subtile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.subtile .nm { font-size: 13.5px; font-weight: 700; }

/* category grid page (thumbnail cards) */
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.catcard {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface);
  transition: box-shadow .15s ease, transform .1s ease; display: flex; flex-direction: column;
}
.catcard:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.catcard .thumb { aspect-ratio: 16/10; background: var(--surface-2); position: relative; overflow: hidden; }
.catcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.catcard .thumb .fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); }
.catcard .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.catcard .body h3 { font-size: 15px; }
.catcard .body .cnt { font-size: 12.5px; color: var(--text-mute); }

/* ---------------- product grid / card ---------------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.pcard {
  position: relative; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); transition: box-shadow .15s ease, transform .1s ease; display: flex; flex-direction: column;
}
.pcard:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.pcard .thumb { aspect-ratio: 1/1; background: var(--surface-2); overflow: hidden; }
.pcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pcard .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.pcard .price { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.pcard .title { font-size: 13.5px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .loc { font-size: 12px; color: var(--text-mute); display: flex; align-items: center; gap: 4px; }
.pcard .ribbon { position: absolute; top: 10px; left: 10px; z-index: 2; }
.fav {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 32px; height: 32px; border-radius: 999px;
  background: rgba(255,255,255,.92); border: 1px solid var(--border); display: grid; place-items: center;
  color: var(--text-mute); box-shadow: var(--shadow-xs);
}
.fav .ic { width: 16px; height: 16px; }
.fav.on { color: var(--bad); }
.fav.on .ic { fill: var(--bad); stroke: var(--bad); }

.sk { background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 45%, var(--surface-2) 60%); background-size: 200% 100%; border-radius: var(--radius); animation: shimmer 1.3s infinite; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

.empty { text-align: center; padding: 54px 20px; color: var(--text-soft); }
.empty .ic-xl { color: var(--text-mute); margin-bottom: 10px; }
.empty h3 { margin-bottom: 6px; }

/* ---------------- product detail ---------------- */
.pd { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 880px) { .pd { grid-template-columns: 1fr; } }
.gallery .main { aspect-ratio: 4/3; background: var(--surface-2); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.gallery .thumbs img { width: 64px; height: 56px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; opacity: .65; }
.gallery .thumbs img.on { border-color: var(--brand); opacity: 1; }

/* ---------------- plans ---------------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.plan {
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; background: var(--surface);
  display: flex; flex-direction: column; gap: 10px; position: relative;
}
.plan.hot { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.plan .icwrap { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; }
.plan .amt { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.plan ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; }
.plan ul li { display: flex; align-items: center; gap: 7px; color: var(--text-soft); }
.plan ul li .ic { color: var(--brand); }

/* ---------------- dashboard ---------------- */
.dash { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: start; }
@media (max-width: 780px) { .dash { grid-template-columns: 1fr; } }
.side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--header-h) + 14px); }
.side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--text-soft); }
.side a:hover { background: var(--surface-2); }
.side a.on { background: var(--brand-soft); color: var(--brand-dark); }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: var(--surface); }
.stat .n { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.stat .l { font-size: 12px; color: var(--text-mute); font-weight: 600; margin-top: 2px; }
.meter { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

/* ---------------- chat ---------------- */
.chatwrap { display: grid; grid-template-columns: 320px 1fr; gap: 14px; min-height: 520px; }
@media (max-width: 860px) { .chatwrap { grid-template-columns: 1fr; } .chatwrap.on-thread .convlist { display: none; } }
@media (min-width: 861px) { .thread #back { display: none; } }

.convlist { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden auto; max-height: 620px; background: var(--surface); }
.conv { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s ease; }
.conv:last-child { border-bottom: none; }
.conv:hover { background: var(--surface-2); }
.conv.on { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.conv .pic { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--surface-3); flex-shrink: 0; }
.conv .small { color: var(--text-soft); }

.thread { border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; height: 620px; background: var(--surface); overflow: hidden; }
.thread .msgs {
  flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.thread .msgs.dropping { outline: 2px dashed var(--brand); outline-offset: -8px; }

.bubble {
  position: relative; max-width: 74%; padding: 9px 13px 6px; border-radius: 16px 16px 16px 6px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs);
  font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; animation: bubble-in .18s ease;
}
.bubble.me { background: var(--brand); border-color: var(--brand); color: #fff; border-radius: 16px 16px 6px 16px; }
.bubble .t { font-size: 10.5px; opacity: .6; margin-top: 3px; text-align: right; }
.bubble img { display: block; border-radius: 10px; margin-bottom: 6px; max-width: 240px; width: 100%; cursor: zoom-in; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.composer { border-top: 1px solid var(--border); padding: 10px 12px; background: var(--surface); }
.composer .crow { display: flex; align-items: center; gap: 8px; }
.composer .ctext {
  flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); background: var(--surface-2); outline: none; font: inherit; font-size: 14.5px;
}
.composer .ctext:focus { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-ring); }
.attach-btn, .send-btn {
  width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; flex-shrink: 0;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-soft); cursor: pointer; transition: .15s ease;
}
.attach-btn:hover { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand-soft); }
.send-btn { background: var(--brand); border-color: var(--brand); color: #fff; }
.send-btn:hover { background: var(--brand-dark); }
.send-btn:disabled { opacity: .55; cursor: not-allowed; }

.attachbar { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 2px 10px; }
.apv-item { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.apv-item img { width: 100%; height: 100%; object-fit: cover; }
.apv-x {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 999px; border: none;
  background: rgba(20,21,26,.72); color: #fff; font-size: 14px; line-height: 1; cursor: pointer;
}

/* ---------------- tables ---------------- */
.tbl { width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th {
  text-align: left; padding: 12px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-mute); border-bottom: 1px solid var(--border); background: var(--surface-2);
  white-space: nowrap;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.tbl td.wrap { white-space: normal; min-width: 220px; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl tr:last-child td { border-bottom: none; }
.tbl th:first-child, .tbl td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; box-shadow: 1px 0 0 var(--border); }
.tbl th:first-child { background: var(--surface-2); z-index: 2; }
.tbl tbody tr:hover td:first-child { background: var(--surface-2); }

/* horizontal swipe area for admin tables */
.tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; overscroll-behavior-x: contain; border-radius: var(--radius); }
.tblwrap::-webkit-scrollbar { height: 8px; }
.tblwrap::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.tblwrap::-webkit-scrollbar-track { background: transparent; }
.swipe-hint { display: none; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-mute); padding: 2px 2px 0; }
@media (max-width: 860px) { .swipe-hint { display: flex; } }

/* ---------------- modal / toast ---------------- */
.overlay { position: fixed; inset: 0; background: rgba(15,16,20,.5); display: grid; place-items: center; z-index: 80; padding: 16px; backdrop-filter: blur(2px); }
.modal { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
#toasts { position: fixed; top: 16px; right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--text); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-md); animation: toastin .18s ease;
}
.toast.ok { background: var(--ok); }
.toast.bad { background: var(--bad); }
@keyframes toastin { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------------- static / content pages ---------------- */
.content-hero { background: var(--bg); border-bottom: 1px solid var(--border); padding: 40px 0; }
.content-hero h1 { font-size: clamp(24px, 3.4vw, 34px); }
.content-hero p { margin-top: 8px; max-width: 640px; }
.prose { max-width: 760px; }
.prose h2 { margin: 26px 0 10px; font-size: 18px; }
.prose p { margin-bottom: 12px; }
.prose ul { padding-left: 20px; color: var(--text-soft); }
.prose li { margin-bottom: 6px; }
.trustgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.trustcard { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.trustcard .icwrap { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; margin-bottom: 12px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.step { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: relative; }
.step .num { font-size: 12px; font-weight: 800; color: var(--brand); letter-spacing: .06em; margin-bottom: 8px; }

.faq-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-item + .faq-item { margin-top: 10px; }
.faq-q { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; cursor: pointer; font-weight: 700; font-size: 14.5px; }
.faq-a { padding: 0 18px 16px; color: var(--text-soft); font-size: 14px; display: none; }
.faq-item.on .faq-a { display: block; }
.faq-item.on .chev { transform: rotate(180deg); }
.chev { transition: transform .15s ease; }

.breadcrumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-mute); margin-bottom: 14px; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--brand); }

/* ---------------- admin shell ---------------- */
.admin-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; background: var(--surface-2); }
.admin-side {
  background: var(--bg); color: var(--text-soft); padding: 18px 12px; display: flex; flex-direction: column; gap: 10px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--border);
}
.admin-side .brand {
  color: var(--text); font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 9px;
  padding: 8px 10px 6px; letter-spacing: -.01em;
}
.admin-side .brand .ic { color: var(--brand); }

.nav-search {
  display: flex; align-items: center; gap: 8px; padding: 8px 11px; margin: 0 2px;
  border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2);
  transition: border-color .15s ease, background .15s ease;
}
.nav-search:focus-within { border-color: var(--brand); background: var(--surface); }
.nav-search .ic { color: var(--text-mute); flex-shrink: 0; }
.nav-search input { border: 0; background: transparent; outline: none; font: inherit; font-size: 13px; width: 100%; color: var(--text); }

.admin-side-links { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-mute); padding: 2px 12px 6px;
}
.nav-empty { font-size: 12.5px; color: var(--text-mute); padding: 6px 12px; }

.admin-side a { color: var(--text-soft); }
.admin-side .nav-item {
  position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) 16px; align-items: center; gap: 10px;
  padding: 9px 10px; border: 1px solid transparent; border-radius: 12px;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .08s ease;
}
.nav-item .nav-ic {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border); transition: all .15s ease;
}
.nav-item .nav-ic .ic { color: var(--text-mute); transition: color .15s ease; }
.nav-item .nav-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nav-item .nav-txt b { font-size: 13.5px; font-weight: 650; letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item .nav-txt em {
  font-style: normal; font-size: 11.5px; color: var(--text-mute); line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-item .nav-chev { display: grid; place-items: center; opacity: 0; transform: translateX(-3px); transition: all .15s ease; }
.nav-item .nav-chev .ic { color: var(--text-mute); }
.admin-side .nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item:hover .nav-ic { background: var(--surface); border-color: var(--border-strong, var(--border)); }
.nav-item:hover .nav-ic .ic { color: var(--text); }
.nav-item:hover .nav-chev { opacity: 1; transform: translateX(0); }
.admin-side .nav-item:active { transform: translateY(1px); }
.admin-side .nav-item.on {
  background: var(--brand-soft); color: var(--brand-dark); border-color: rgba(15,107,82,.16);
}
.nav-item.on .nav-ic { background: var(--brand); border-color: var(--brand); }
.nav-item.on .nav-ic .ic { color: #fff; }
.nav-item.on .nav-txt em { color: var(--brand-dark); opacity: .75; }
.nav-item.on .nav-chev { opacity: 1; transform: translateX(0); }
.nav-item.on .nav-chev .ic { color: var(--brand); }
.nav-item.on::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.admin-side-foot { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border); }
.admin-side-foot a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px; font-size: 13px; font-weight: 600; }
.admin-side-foot a:hover { background: var(--surface-2); }
.admin-side #out { color: var(--bad); cursor: pointer; }
.admin-side #out:hover { background: var(--bad-soft); color: var(--bad); }

.admin-main { padding: 26px 30px 60px; max-width: 1160px; background: var(--surface-2); min-width: 0; overflow-x: hidden; }
.admin-main .stack, .admin-main .stack > * { min-width: 0; max-width: 100%; }
.admin-main > .stack > h1 { letter-spacing: -.02em; }
.admin-main .card { box-shadow: var(--shadow-sm); }

@media (max-width: 860px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-side {
    position: sticky; top: 0; z-index: 30; height: auto; flex-direction: column;
    padding: 10px 0 0; border-right: none; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-xs); gap: 0; background: var(--bg);
  }
  .admin-side .brand { padding: 2px 14px 8px; font-size: 14.5px; }
  .nav-search { margin: 0 14px 10px; }
  .admin-side-links {
    flex-direction: row; align-items: center; overflow-x: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x;
    scroll-snap-type: x proximity; overscroll-behavior-x: contain;
    gap: 14px; padding: 2px 14px 12px; scrollbar-width: none;
  }
  .admin-side-links::-webkit-scrollbar { display: none; }
  .nav-group { flex-direction: row; align-items: center; gap: 8px; flex-shrink: 0; }
  .nav-group + .nav-group { border-left: 1px solid var(--border); padding-left: 14px; }
  .nav-group-label { padding: 0 2px 0 0; font-size: 9.5px; writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .12em; }
  .admin-side .nav-item {
    display: flex; white-space: nowrap; flex-shrink: 0; scroll-snap-align: start;
    padding: 7px 14px 7px 7px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--surface); gap: 8px;
  }
  .nav-item .nav-ic { width: 26px; height: 26px; border-radius: 999px; }
  .nav-item .nav-txt b { font-size: 12.5px; }
  .nav-item .nav-txt em, .nav-item .nav-chev { display: none; }
  .admin-side .nav-item.on { background: var(--brand); color: #fff; border-color: var(--brand); }
  .nav-item.on .nav-ic { background: rgba(255,255,255,.18); border-color: transparent; }
  .nav-item.on::before { display: none; }
  .admin-side-foot { flex-direction: row; gap: 8px; padding: 10px 14px 12px; margin-top: 0; border-top: 1px solid var(--border); }
  .admin-side-foot a { flex-shrink: 0; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; }
  .admin-main { padding: 18px 14px 60px; }
  .tbl { font-size: 13px; }
}

/* thumbnail upload widget (admin) */
.thumb-upload {
  width: 100%; aspect-ratio: 16/9; border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  background: var(--surface-2); color: var(--text-mute); overflow: hidden; position: relative;
}
.thumb-upload img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb-upload .hint { font-size: 12.5px; font-weight: 600; z-index: 1; background: rgba(255,255,255,.85); padding: 4px 10px; border-radius: 999px; }
.thumb-upload.sm { width: 64px; height: 64px; aspect-ratio: auto; border-radius: 10px; flex-shrink: 0; }

@media (max-width: 620px) {
  h1 { font-size: 24px; }
  .wrap { padding: 0 14px; }
  .pgrid, .catgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
}

/* ===========================================================
   Chat 2.0 — live threads, glass header, day dividers
   =========================================================== */
.notice-bar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 14px;
  border-radius: var(--radius); border: 1px solid var(--brand-soft);
  background: linear-gradient(120deg, var(--brand-soft), var(--surface));
  box-shadow: var(--shadow-xs);
}
.notice-bar .ic { color: var(--brand); }
.notice-bar b { font-size: 14px; }
.notice-bar .tiny { color: var(--text-soft); }

.chatwrap { grid-template-columns: 330px 1fr; gap: 16px; }
.convlist { display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-sm); }
.convhead { padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.convhead b { font-size: 15px; letter-spacing: -.01em; }
.convscroll { flex: 1; overflow-y: auto; max-height: 560px; }
.csearch { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 0 12px; height: 38px; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--border); }
.csearch .ic { color: var(--text-mute); }
.csearch input { flex: 1; min-width: 0; border: none; background: none; outline: none; font: inherit; font-size: 13.5px; }

.live-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--radius-pill);
  background: var(--ok-soft); color: var(--ok); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
}
.live-pill .ic { width: 12px; height: 12px; animation: live-pulse 1.6s ease-in-out infinite; }
.live-pill.off { background: var(--dim-soft); color: var(--text-mute); }
.live-pill.off .ic { animation: none; }
.live-pill.sm { padding: 2px 7px; font-size: 9.5px; vertical-align: middle; margin-left: 6px; }
@keyframes live-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.conv { gap: 11px; padding: 12px 14px; position: relative; }
.conv-av {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; font-weight: 800; font-size: 16px;
}
.conv-av img { width: 100%; height: 100%; object-fit: cover; }
.conv-av.lg { width: 40px; height: 40px; font-size: 15px; }
.conv-thumb { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; background: var(--surface-3); flex-shrink: 0; }
.conv .strong { color: var(--text); font-weight: 700; }
.conv-unread {
  position: absolute; top: 10px; right: 10px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center;
}

.thread { box-shadow: var(--shadow-sm); position: relative; }
.thread-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.94); backdrop-filter: saturate(180%) blur(12px); position: sticky; top: 0; z-index: 3;
}
.thread-head b { font-size: 14.5px; }
.ico-btn {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-soft); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; transition: .15s ease;
}
.ico-btn:hover { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand-dark); }
@media (min-width: 861px) { .thread #back { display: none; } }

.thread-product {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border);
  background: var(--surface-2); color: inherit; text-decoration: none;
}
.thread-product img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.thread-product:hover { background: var(--brand-soft); }

.thread .msgs {
  gap: 5px; padding: 18px 16px 8px;
  background:
    radial-gradient(900px 320px at 15% -10%, var(--brand-soft), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  scroll-behavior: smooth;
}
.thread-blank { flex: 1; display: grid; place-items: center; align-content: center; gap: 6px; padding: 40px 24px; text-align: center; color: var(--text-mute); }
.thread-blank .ic { color: var(--brand); opacity: .5; }

.day-sep { align-self: center; margin: 12px 0 6px; }
.day-sep span {
  padding: 3px 12px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--border);
  font-size: 11px; font-weight: 700; color: var(--text-mute); box-shadow: var(--shadow-xs);
}

.bubble { max-width: 76%; padding: 8px 12px 5px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.bubble.grouped { border-radius: 16px 16px 16px 8px; margin-top: -2px; }
.bubble.me.grouped { border-radius: 16px 16px 8px 16px; }
.bubble.me { background: linear-gradient(140deg, var(--brand), var(--brand-dark)); }
.bubble .t { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 10.5px; opacity: .65; margin-top: 2px; }
.bubble .tick { font-style: normal; letter-spacing: -1px; }
.bubble .tick.seen { color: #9be7c9; opacity: 1; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }

.jump-btn {
  position: absolute; right: 16px; bottom: 84px; width: 38px; height: 38px; border-radius: 999px; z-index: 4;
  border: 1px solid var(--border); background: var(--surface); color: var(--brand);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-md);
}
.composer { background: rgba(255,255,255,.96); backdrop-filter: saturate(180%) blur(10px); }
.send-btn { background: linear-gradient(140deg, var(--brand), var(--brand-dark)); }

/* ===========================================================
   Chat 3.0 — full-size chat surface + refined message cards
   =========================================================== */
.dash.dash-chat { align-items: stretch; }
.panel-chat { display: flex; flex-direction: column; min-height: 0; }

.chatwrap {
  height: calc(100dvh - var(--header-h) - 62px);
  min-height: 460px;
  min-width: 0;
}
.panel-chat .notice-bar + .chatwrap { height: calc(100dvh - var(--header-h) - 140px); }

.convlist { max-height: none; height: 100%; min-height: 0; }
.convscroll { max-height: none; min-height: 0; }
.thread { height: 100%; min-height: 0; }
.thread .msgs { min-height: 0; }

@media (max-width: 860px) {
  .chatwrap, .panel-chat .notice-bar + .chatwrap { height: calc(100dvh - var(--header-h) - 96px); }
}

/* message rows: avatar + card */
.msg-row { display: flex; align-items: flex-end; gap: 8px; max-width: 82%; }
.msg-row.me { align-self: flex-end; flex-direction: row-reverse; }
.msg-row.grouped { margin-top: -3px; }
.msg-av {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}
.msg-av img { width: 100%; height: 100%; object-fit: cover; }
.msg-av.ghost { visibility: hidden; }

.bubble { max-width: 100%; display: inline-block; }
.bubble .txt { display: block; }
.bubble.sending { opacity: .65; }
.bubble img { max-width: 260px; }
.msg-row:not(.me) .bubble { border-radius: 16px 16px 16px 6px; }
.msg-row:not(.me) .bubble.grouped { border-radius: 6px 16px 16px 6px; }
.msg-row.me .bubble.grouped { border-radius: 16px 6px 6px 16px; }

/* ===========================================================
   Chat 3.1 — larger message surface, content-sized bubbles, unsend
   =========================================================== */
.chatwrap { height: calc(100dvh - var(--header-h) - 24px); min-height: 560px; }
.panel-chat .notice-bar + .chatwrap { height: calc(100dvh - var(--header-h) - 104px); }
@media (max-width: 860px) {
  .chatwrap, .panel-chat .notice-bar + .chatwrap { height: calc(100dvh - var(--header-h) - 56px); }
}
.thread .msgs { padding: 22px 22px 10px; gap: 6px; font-size: 15px; }

/* rows/bubbles hug their content */
.msg-row { max-width: min(680px, 86%); width: fit-content; position: relative; }
.msg-row.me { margin-left: auto; }
.bubble {
  width: fit-content; max-width: 100%; min-width: 0;
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 10px;
  padding: 8px 12px 7px; font-size: 15px; line-height: 1.45;
}
.bubble .txt { flex: 0 1 auto; min-width: 0; white-space: pre-wrap; word-break: break-word; }
.bubble .t { margin-top: 0; flex: 0 0 auto; margin-left: auto; align-self: flex-end; font-size: 10.5px; }
.bubble img { flex: 1 0 100%; max-width: min(320px, 100%); }
.bubble.deleted { font-style: italic; opacity: .75; }

/* unsend control */
.msg-actions {
  position: absolute; top: 50%; transform: translateY(-50%);
  right: calc(100% + 6px); opacity: 0; pointer-events: none; transition: opacity .12s ease;
}
.msg-row.me:hover .msg-actions, .msg-actions:focus-within { opacity: 1; pointer-events: auto; }
.msg-del {
  width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-mute); display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow-xs);
}
.msg-del:hover { color: var(--bad, #d93025); border-color: currentColor; }
@media (hover: none) { .msg-actions { opacity: 1; pointer-events: auto; } }


/* ===========================================================
   Chat 4.0 — full-screen chat surface (header + tabbar only)
   =========================================================== */
body.chat-mode { overflow: hidden; }
main.main-bare { min-height: 0; padding: 0; }
.chatpage {
  width: 100%;
  max-width: 100vw;
  margin-inline: auto;
  padding-block: 10px;
  padding-inline: 14px;
  box-sizing: border-box;
}
.chatpage .panel-chat { display: flex; flex-direction: column; min-height: 0; }
.chatpage .chatwrap,
.chatpage .panel-chat .notice-bar + .chatwrap {
  width: 100%;
  margin-inline: 0;
  height: calc(100dvh - var(--header-h) - 20px);
  min-height: 0;
}
.chatpage .convscroll,
.chatpage .thread .msgs { scrollbar-gutter: stable both-edges; }
.chatpage .panel-chat .notice-bar + .chatwrap { height: calc(100dvh - var(--header-h) - 80px); }
@media (max-width: 900px) {
  main.main-bare { padding-bottom: 0; }
  .chatpage { padding-block: 6px; padding-inline: 8px; }
  .chatpage .chatwrap { height: calc(100dvh - var(--header-h) - var(--tabbar-h) - 12px); }
  .chatpage .panel-chat .notice-bar + .chatwrap { height: calc(100dvh - var(--header-h) - var(--tabbar-h) - 68px); }
}


/* ===========================================================
   Chat 4.1 — chat list layout, unread counts, read receipts
   =========================================================== */
/* no chat open: the list uses the full width instead of a narrow column */
.chatpage .chatwrap:not(.on-thread) { grid-template-columns: 1fr; }
.chatpage .chatwrap:not(.on-thread) .thread { display: none; }
.chatpage .chatwrap.on-thread { grid-template-columns: minmax(280px, 340px) 1fr; }
@media (max-width: 900px) {
  .chatpage .chatwrap.on-thread { grid-template-columns: 1fr; }
}

/* conversation row: content left, time + badge right, no dead space */
.conv { display: flex; align-items: center; gap: 12px; padding: 12px 14px; position: relative; }
.conv-main { flex: 1 1 auto; min-width: 0; }
.conv-line { display: flex; align-items: center; min-width: 0; }
.conv-prev { font-size: 13.5px; }
.conv-meta {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end;
  gap: 6px; margin-left: auto; text-align: right;
}
.conv .conv-unread {
  position: static; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 800;
  display: inline-grid; place-items: center; line-height: 1;
}
.conv.has-unread { background: var(--brand-soft); }
.conv.has-unread.on { background: var(--brand-soft); }
.conv-prev .tick { font-style: normal; letter-spacing: -1px; color: var(--text-mute); }
.conv-prev .tick.seen { color: var(--brand); }

/* ===========================================================
   v17 — Modern Premium Bright White theme layer
   Applies to every page (marketplace + admin) via shared tokens.
   =========================================================== */

:root {
  /* brighter, cleaner neutrals */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --surface-3: #f2f5f9;
  --border: #eef1f6;
  --border-strong: #e3e8ef;
  --text: #0b0d12;
  --text-soft: #4b5563;
  --text-mute: #98a1b0;

  /* refined emerald brand with luminous tints */
  --brand: #0d8a63;
  --brand-dark: #076b4c;
  --brand-soft: #f0fbf6;
  --brand-ring: rgba(13, 138, 99, .13);
  --accent: #b8862b;
  --accent-soft: #fdf8ec;

  /* softer, more premium radii */
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;

  /* airy layered shadows */
  --shadow-xs: 0 1px 2px rgba(11, 18, 33, .04);
  --shadow-sm: 0 4px 16px rgba(11, 18, 33, .05);
  --shadow-md: 0 14px 38px rgba(11, 18, 33, .07);
  --shadow-lg: 0 32px 70px rgba(11, 18, 33, .10);

  --header-h: 72px;
  --maxw: 1280px;

  --grad-brand: linear-gradient(135deg, #10a377 0%, #0d8a63 45%, #076b4c 100%);
  --grad-sheen: linear-gradient(180deg, #ffffff 0%, #fafcfe 100%);
}

body { letter-spacing: -.005em; background: var(--bg); }
h1, h2, h3 { letter-spacing: -.032em; }
h1 { font-weight: 800; }

/* --- surfaces --- */
.card {
  background: var(--grad-sheen);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, border-color .2s ease, transform .18s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.pad { padding: 22px; }

/* --- buttons --- */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 700;
  letter-spacing: -.01em;
  padding: 12px 20px;
  transition: transform .12s cubic-bezier(.2,.8,.3,1), box-shadow .2s ease, background .2s ease, border-color .2s ease, filter .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: var(--grad-brand);
  box-shadow: 0 10px 24px -8px rgba(13, 138, 99, .55), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn.primary:hover { background: var(--grad-brand); filter: saturate(1.08) brightness(1.04); box-shadow: 0 16px 30px -10px rgba(13,138,99,.55); }
.btn.ghost { background: #fff; border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn.ghost:hover { background: #fff; border-color: #d7dee8; box-shadow: var(--shadow-sm); }
.btn.soft { background: var(--brand-soft); color: var(--brand-dark); border-color: rgba(13,138,99,.14); }
.icon-btn { border-radius: 12px; }
.icon-btn:hover { background: var(--surface-3); }

/* --- inputs --- */
.in, .searchbar {
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.searchbar { height: 50px; border-radius: 999px; padding: 0 18px; }
.searchbar:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.in:focus { box-shadow: 0 0 0 4px var(--brand-ring); }
.field { font-weight: 650; }

/* --- header --- */
.top {
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(17,24,39,.05);
}
.top .bar { gap: 20px; }
.logo .wordmark {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -.04em;
}
.megalinks a { border-radius: 999px; font-weight: 650; }
.megalinks a:hover, .megalinks a.on { background: var(--surface-3); }
.avatar { background: var(--grad-brand); color: #fff; box-shadow: 0 6px 14px -6px rgba(13,138,99,.7); }

/* --- mobile tabbar --- */
@media (max-width: 720px) {
  .tabbar { background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(18px); border-top: 1px solid rgba(17,24,39,.06); }
  .tabbar a.on { color: var(--brand); }
}

/* --- hero --- */
.hero {
  position: relative;
  padding: 76px 0 52px;
  background:
    radial-gradient(1100px 460px at 12% -30%, rgba(13,138,99,.10), transparent 65%),
    radial-gradient(900px 420px at 92% -20%, rgba(184,134,43,.09), transparent 62%),
    #ffffff;
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.06; }
.hero p { font-size: 17px; margin-top: 14px; }
.hero .searchrow { margin-top: 28px; }
.hero .btn.primary { height: 50px; padding: 0 26px; border-radius: 999px; }

.announce { background: linear-gradient(90deg, var(--brand-soft), #fff 60%, var(--accent-soft)); color: var(--brand-dark); font-weight: 700; }

.section-head { margin: 44px 0 18px; }
.section-head h2 { font-size: 22px; }

/* --- tiles / cards --- */
.cattile, .subtile, .catcard, .pcard, .trustcard, .step, .stat, .plan, .faq-item {
  background: var(--grad-sheen);
  border-color: var(--border);
  border-radius: var(--radius);
}
.cattile:hover, .catcard:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #e6ebf2; }
.cattile .icwrap { background: var(--brand-soft); color: var(--brand-dark); border-radius: 14px; }
.pcard { border-radius: var(--radius); }
.pcard:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: #e6ebf2; }
.pcard .thumb { background: var(--surface-3); }
.pcard .price { font-size: 18px; letter-spacing: -.03em; }
.fav { background: rgba(255,255,255,.94); backdrop-filter: blur(6px); box-shadow: var(--shadow-sm); border-color: rgba(17,24,39,.06); }

.badge { font-weight: 700; border-radius: 999px; }
.badge.brand { background: var(--brand-soft); color: var(--brand-dark); }

/* --- plans --- */
.plan { padding: 28px; box-shadow: var(--shadow-sm); }
.plan.hot { border-color: rgba(13,138,99,.35); box-shadow: 0 24px 56px -24px rgba(13,138,99,.45); }
.plan .icwrap { background: var(--grad-brand); color: #fff; border-radius: 14px; }
.plan .amt { font-size: 30px; }

/* --- dashboard / side nav --- */
.side a { border-radius: 12px; font-weight: 650; }
.side a:hover { background: var(--surface-3); }
.side a.on { background: var(--brand-soft); color: var(--brand-dark); }
.stat { padding: 18px; box-shadow: var(--shadow-xs); }
.stat .n { font-size: 24px; }
.meter i { background: var(--grad-brand); }

/* --- gallery / detail --- */
.gallery .main { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); background: #fff; }
.gallery .thumbs img { border-radius: 12px; }

/* --- chat --- */
.convlist { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.bubble.me, .send-btn { background: var(--grad-brand); }
.send-btn { box-shadow: 0 10px 22px -10px rgba(13,138,99,.7); }

/* --- tables --- */
.tbl th { background: var(--surface-2); letter-spacing: .08em; }
.tblwrap { border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-xs); }

/* --- modal / toast --- */
.overlay { background: rgba(9, 14, 24, .42); backdrop-filter: blur(6px); }
.modal { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.toast { border-radius: 14px; box-shadow: var(--shadow-lg); }

/* --- footer --- */
.sitefooter { background: linear-gradient(180deg, #ffffff, #fafbfd); border-top: 1px solid var(--border); }

/* --- admin shell --- */
.admin-shell { background: #f7f9fc; }
.admin-side { background: rgba(255,255,255,.9); backdrop-filter: blur(14px); border-right: 1px solid var(--border); }
.admin-side .brand { font-weight: 800; }
.admin-main { background: transparent; }
.admin-main .card { box-shadow: var(--shadow-sm); }
.nav-item { border-radius: 14px; }
.nav-item .nav-ic { border-radius: 11px; }
.admin-side .nav-item.on { background: var(--brand-soft); border-color: rgba(13,138,99,.18); }
.nav-item.on .nav-ic { background: var(--grad-brand); border-color: transparent; }

/* --- content pages --- */
.content-hero {
  background:
    radial-gradient(800px 320px at 20% -40%, rgba(13,138,99,.09), transparent 65%),
    #ffffff;
  padding: 56px 0;
}
.trustcard, .step { padding: 24px; box-shadow: var(--shadow-xs); }
.trustcard .icwrap { background: var(--brand-soft); color: var(--brand-dark); border-radius: 12px; }
.faq-item { box-shadow: var(--shadow-xs); }
.faq-q { padding: 17px 20px; }

/* smooth entrance for grids */
@media (prefers-reduced-motion: no-preference) {
  .pgrid > *, .catgrid > *, .plans > * { animation: riseIn .38s cubic-bezier(.2,.8,.3,1) both; }
  @keyframes riseIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* crisp scrollbars */
* { scrollbar-color: #dfe5ee transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 999px; border: 3px solid #fff; }
::-webkit-scrollbar-track { background: transparent; }
