/* Lendo theme — extracted from approved prototype */

:root{
  --orange:#F59503; --orange-dk:#D97E00; --orange-tint:#FFF3E0;
  --ink:#0C0C0C; --ink-2:#17181B; --ink-3:#23252A;
  --teal:#1E8A7B; --teal-dk:#166B5F; --teal-tint:#E4F2EF;
  --indigo:#3D509C;
  --paper:#F1F4F9; --card:#FFFFFF; --panel:#EAEAEA; --line:#E3E6EC;
  --text:#16181D; --muted:#6A7280; --white:#fff;
  --ok:#2E9E5B; --warn:#E0A21C; --bad:#D2452B;
  --shadow:0 1px 2px rgba(16,18,24,.04),0 8px 24px rgba(16,18,24,.06);
  --shadow-lg:0 20px 60px rgba(16,18,24,.18);
  --r:14px; --r-sm:10px; --r-lg:22px;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:Inter,system-ui,sans-serif;color:var(--text);background:var(--paper);line-height:1.5;-webkit-font-smoothing:antialiased}
h1,h2,h3,h4,.dsp{font-family:Archivo,sans-serif;letter-spacing:-.02em}
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer;border:none;background:none}
input,select,textarea{font-family:inherit;font-size:15px}
.tnum{font-variant-numeric:tabular-nums}
img{max-width:100%;display:block}
::-webkit-scrollbar{height:8px;width:8px}
::-webkit-scrollbar-thumb{background:#c9ced8;border-radius:8px}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;gap:8px;font-weight:600;font-size:15px;padding:11px 20px;border-radius:999px;transition:.15s;white-space:nowrap}
.btn-pri{background:var(--orange);color:#ffffff}
.btn-pri:hover{background:var(--orange-dk)}
.btn-ink{background:var(--ink);color:#fff}
.btn-ink:hover{background:var(--ink-3)}
.btn-teal{background:var(--teal);color:#fff}
.btn-teal:hover{background:var(--teal-dk)}
.btn-ghost{background:transparent;border:1.5px solid rgba(255,255,255,.5);color:#fff}
.btn-ghost:hover{background:rgba(255,255,255,.12)}
.btn-line{background:#fff;border:1.5px solid var(--line);color:var(--text)}
.btn-line:hover{border-color:#bfc6d2}
.btn-sm{padding:7px 14px;font-size:13.5px}
.btn-block{width:100%;justify-content:center}
.btn:disabled{opacity:.5;cursor:not-allowed}

/* ---------- public header ---------- */
.topbar{position:fixed;inset:0 0 auto 0;z-index:50;display:flex;align-items:center;justify-content:space-between;padding:16px 28px;transition:.25s}
.topbar.solid{background:#fff;box-shadow:var(--shadow)}
.brand{display:flex;align-items:center;gap:9px;font-family:Archivo;font-weight:900;font-size:25px;letter-spacing:-.04em}
.brand .tag{color:#fff}
.topbar.solid .brand .tag{color:var(--ink)}
.brand-mark{width:34px;height:34px;flex:none}
.nav-links{display:flex;align-items:center;gap:26px}
.nav-links a{font-size:14.5px;font-weight:600;color:#fff;opacity:.92}
.topbar.solid .nav-links a{color:var(--text)}
.nav-links a:hover{opacity:1;color:var(--orange)}
.nav-cta{display:flex;align-items:center;gap:10px}
@media(max-width:900px){.nav-links{display:none}}

/* ---------- hero ---------- */
.hero{position:relative;min-height:660px;padding:140px 28px 70px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;
  background:linear-gradient(180deg,rgba(12,12,12,.62),rgba(12,12,12,.38) 40%,rgba(12,12,12,.66)),var(--hero) center/cover no-repeat}
.hero-kicker{display:inline-flex;align-items:center;gap:8px;background:rgba(245,149,3,.16);border:1px solid rgba(245,149,3,.55);color:#ffd99a;padding:6px 14px;border-radius:999px;font-size:13px;font-weight:600;margin-bottom:22px;backdrop-filter:blur(4px)}
.hero h1{color:#fff;font-size:clamp(38px,6vw,68px);font-weight:900;line-height:1.02;text-shadow:0 4px 30px rgba(0,0,0,.4)}
.hero h1 em{font-style:normal;color:var(--orange)}
.hero p.sub{color:rgba(255,255,255,.92);font-size:clamp(16px,2vw,20px);margin-top:16px;font-weight:500}
.searchwrap{margin-top:34px;width:100%;max-width:720px}
.searchbar{display:flex;align-items:center;gap:8px;background:#fff;border-radius:999px;padding:8px 8px 8px 22px;box-shadow:0 18px 50px rgba(0,0,0,.35)}
.searchbar svg{flex:none;color:var(--muted)}
.searchbar input{flex:1;border:none;outline:none;font-size:16px;padding:10px 4px;background:transparent}
.searchbar .btn{padding:13px 28px}
.searchmeta{display:flex;gap:22px;justify-content:center;margin-top:16px;color:#fff;font-size:14px;font-weight:500;flex-wrap:wrap}
.searchmeta span{display:inline-flex;align-items:center;gap:7px;opacity:.95}
.searchmeta b{color:var(--orange)}
.chips{display:flex;flex-wrap:wrap;gap:9px;justify-content:center;margin-top:26px;max-width:760px}
.chip{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.35);color:#fff;padding:8px 15px;border-radius:999px;font-size:13.5px;font-weight:600;cursor:pointer;transition:.15s;backdrop-filter:blur(3px)}
.chip:hover{background:var(--orange);border-color:var(--orange);color:#1c1300}

/* ---------- public sections ---------- */
.section{max-width:1240px;margin:0 auto;padding:64px 28px}
.sec-head{display:flex;align-items:end;justify-content:space-between;margin-bottom:26px;gap:16px;flex-wrap:wrap}
.sec-head h2{font-size:clamp(24px,3vw,34px);font-weight:800}
.sec-head .eyebrow{color:var(--teal);font-weight:700;font-size:13px;letter-spacing:.08em;text-transform:uppercase;margin-bottom:6px}
.rail{display:flex;gap:18px;overflow-x:auto;padding:6px 2px 16px;scroll-snap-type:x mandatory}
.icard{flex:0 0 252px;scroll-snap-align:start;background:#fff;border:1px solid var(--line);border-radius:var(--r);overflow:hidden;box-shadow:var(--shadow);transition:.18s;cursor:pointer}
.icard:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);border-color:#d4dae3}
.icard .ph{position:relative;height:168px;background:var(--panel) center/cover}
.badge{position:absolute;top:10px;left:10px;background:var(--orange);color:#1c1300;font-size:11px;font-weight:800;padding:4px 9px;border-radius:7px;letter-spacing:.02em;text-transform:uppercase}
.badge.teal{background:var(--teal);color:#fff}
.icard .body{padding:13px 15px 16px}
.icard h4{font-family:Inter;font-weight:600;font-size:14.5px;line-height:1.3;margin-bottom:6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:38px}
.price{color:var(--orange-dk);font-weight:800;font-size:15px}
.price small{color:var(--muted);font-weight:600}
.row-between{display:flex;align-items:center;justify-content:space-between}
.hearts{color:var(--bad);font-size:12px;letter-spacing:1px}
.cat-tag{font-size:11.5px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.04em}

.lovewrap{background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.love-rail{display:flex;gap:16px;overflow-x:auto;padding:8px 2px 18px}
.love-card{flex:0 0 320px;background:var(--paper);border:1px solid var(--line);border-radius:var(--r);padding:18px}
.love-card .top{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.love-card .top time{font-size:12px;color:var(--muted)}
.love-card p{font-size:14.5px}
.love-card .who{margin-top:12px;font-size:13px;color:var(--muted)}
.love-card .who b{color:var(--text)}
.love-card .who a{color:var(--teal);font-weight:600}

.why-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:54px}
.why-card{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);padding:30px 26px;text-align:center;box-shadow:var(--shadow)}
.why-card .ic{width:74px;height:74px;border-radius:50%;background:var(--ink);display:grid;place-items:center;margin:0 auto 16px}
.why-card .ic.alt{background:var(--teal)}
.why-card h3{font-size:18px;margin-bottom:8px}
.why-card p{font-size:14px;color:var(--muted)}
.feature-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:46px 60px}
.feat{text-align:center}
.feat .ic{width:64px;height:64px;border-radius:50%;background:var(--orange);display:grid;place-items:center;margin:0 auto 14px;color:#1c1300}
.feat .ic.teal{background:var(--teal);color:#fff}
.feat h3{font-size:18px;margin-bottom:6px}
.feat p{font-size:14px;color:var(--muted);max-width:340px;margin:0 auto}
@media(max-width:860px){.why-cards{grid-template-columns:1fr}.feature-grid{grid-template-columns:1fr;gap:38px}}

.cta-band{background:var(--ink);color:#fff;text-align:center;padding:64px 28px}
.cta-band h2{font-size:clamp(26px,4vw,40px);font-weight:900;margin-bottom:12px}
.cta-band h2 em{font-style:normal;color:var(--orange)}
.cta-band p{color:rgba(255,255,255,.7);margin-bottom:24px;font-size:16px}

/* ---------- footer ---------- */
.foot{background:var(--ink);color:rgba(255,255,255,.75);padding:54px 28px 30px}
.foot-in{max-width:1240px;margin:0 auto;display:grid;grid-template-columns:1.4fr 1fr 1fr 1.3fr;gap:40px}
.foot h5{color:#fff;font-family:Archivo;font-weight:700;font-size:15px;margin-bottom:16px}
.foot .brand{margin-bottom:14px}
.foot ul{list-style:none}
.foot li{margin-bottom:10px;font-size:14px}
.foot li a:hover{color:var(--orange)}
.store{display:flex;gap:10px;margin-top:6px;flex-wrap:wrap}
.store .b{display:flex;align-items:center;gap:8px;background:#fff;color:#000;border-radius:9px;padding:8px 14px;font-size:12px;font-weight:600}
.store .b small{display:block;font-size:9px;opacity:.6;font-weight:500}
.foot-base{max-width:1240px;margin:30px auto 0;padding-top:22px;border-top:1px solid rgba(255,255,255,.12);display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;font-size:13px}
@media(max-width:860px){.foot-in{grid-template-columns:1fr 1fr}}

/* ---------- auth ---------- */
.auth{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr}
.auth-side{background:linear-gradient(160deg,rgba(12,12,12,.72),rgba(245,149,3,.28)),var(--hero) center/cover;padding:50px;display:flex;flex-direction:column;justify-content:space-between;color:#fff}
.auth-side .pts{display:flex;flex-direction:column;gap:18px}
.auth-side .pt{display:flex;gap:13px;align-items:flex-start}
.auth-side .pt .d{width:34px;height:34px;border-radius:9px;background:rgba(255,255,255,.16);display:grid;place-items:center;flex:none}
.auth-side .pt b{display:block;font-family:Archivo;font-size:15px}
.auth-side .pt span{font-size:13px;opacity:.82}
.auth-main{display:flex;align-items:center;justify-content:center;padding:40px 28px;overflow:auto}
.auth-box{width:100%;max-width:400px}
.auth-box h2{font-size:27px;font-weight:800;margin-bottom:6px}
.auth-box .lede{color:var(--muted);margin-bottom:26px;font-size:14.5px}
.field{margin-bottom:15px}
.field label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;color:#3a3f47}
.field input,.field select,.field textarea{width:100%;padding:12px 14px;border:1.5px solid var(--line);border-radius:var(--r-sm);outline:none;transition:.15s;background:#fff}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--orange);box-shadow:0 0 0 3px rgba(245,149,3,.16)}
.field .hint{font-size:12px;color:var(--muted);margin-top:5px}
.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.auth-foot{margin-top:18px;text-align:center;font-size:14px;color:var(--muted)}
.auth-foot a{color:var(--teal);font-weight:600}
.divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px;margin:18px 0}
.divider::before,.divider::after{content:"";height:1px;background:var(--line);flex:1}
.demo{background:var(--orange-tint);border:1px solid #f5cd8a;border-radius:var(--r-sm);padding:14px;margin-bottom:20px}
.demo p{font-size:12.5px;color:#8a5a00;margin-bottom:9px;font-weight:600}
.demo .row{display:flex;gap:8px;flex-wrap:wrap}
.otp{display:flex;gap:10px;justify-content:center;margin:8px 0 4px}
.otp input{width:50px;height:58px;text-align:center;font-size:24px;font-weight:700;border:1.5px solid var(--line);border-radius:12px;outline:none}
.otp input:focus{border-color:var(--orange);box-shadow:0 0 0 3px rgba(245,149,3,.16)}
@media(max-width:820px){.auth{grid-template-columns:1fr}.auth-side{display:none}}

/* ---------- app shell (orange topbar + black sidebar) ---------- */
.app{min-height:100vh;background:var(--paper)}
.app-top{position:fixed;top:0;left:0;right:0;height:62px;background:var(--orange);display:flex;align-items:center;justify-content:space-between;padding:0 22px;z-index:40;box-shadow:0 2px 10px rgba(0,0,0,.08)}
.app-top .l{display:flex;align-items:center;gap:14px}
.app-top .ttl{font-family:Archivo;font-weight:800;color:#1c1300;font-size:17px}
.app-top .ttl small{font-weight:600;opacity:.7}
.burger{display:none;color:#1c1300}
.usermenu{display:flex;align-items:center;gap:10px;background:rgba(0,0,0,.08);padding:5px 12px 5px 6px;border-radius:999px;cursor:pointer}
.usermenu img,.usermenu .av{width:32px;height:32px;border-radius:50%;object-fit:cover;background:var(--ink);color:#fff;display:grid;place-items:center;font-weight:700;font-size:13px}
.usermenu b{color:#1c1300;font-size:14px}
.app-side{position:fixed;top:62px;bottom:0;left:0;width:240px;background:var(--ink);padding:18px 14px;z-index:35;overflow-y:auto;transition:.25s}
.side-cap{color:#5d6068;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;margin:16px 10px 8px}
.side-item{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:10px;color:#c4c7cf;font-weight:600;font-size:14.5px;margin-bottom:3px;transition:.13s}
.side-item:hover{background:var(--ink-3);color:#fff}
.side-item.on{background:var(--orange);color:#1c1300}
.side-item .ct{margin-left:auto;background:rgba(255,255,255,.16);font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px}
.side-item.on .ct{background:rgba(0,0,0,.18)}
.app-main{margin-left:240px;padding:88px 30px 50px;min-height:100vh}
.page-h{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:24px;flex-wrap:wrap}
.page-h h1{font-size:26px;font-weight:800;display:flex;align-items:center;gap:11px}
.page-h .pico{width:38px;height:38px;border-radius:11px;background:var(--teal);display:grid;place-items:center;color:#fff}
@media(max-width:860px){
  .app-side{transform:translateX(-100%)}
  .app-side.open{transform:translateX(0)}
  .app-main{margin-left:0;padding:84px 18px 40px}
  .burger{display:grid;place-items:center}
}

/* ---------- stat cards (dashboard like screenshot) ---------- */
.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:26px}
.stat{background:var(--panel);border-radius:14px;padding:18px;min-height:130px;display:flex;gap:16px;position:relative;border:1px solid #dcdee2}
.stat .si{width:58px;height:58px;border-radius:12px;background:#fff;display:grid;place-items:center;color:var(--teal);flex:none}
.stat .meta{flex:1;text-align:right}
.stat .meta .lbl{color:var(--indigo);font-size:13.5px;font-weight:600;margin-bottom:4px}
.stat .meta .num{color:var(--indigo);font-family:Archivo;font-weight:800;font-size:30px}
.stat .meta .sub{font-size:12px;color:var(--muted);margin-top:4px}
.stat.accent{background:var(--teal);border-color:var(--teal)}
.stat.accent .si{background:rgba(255,255,255,.18);color:#fff}
.stat.accent .meta .lbl,.stat.accent .meta .num{color:#fff}
.stat.accent .meta .sub{color:rgba(255,255,255,.6)}
@media(max-width:860px){.stat-grid{grid-template-columns:1fr}}

/* ---------- generic cards / tables ---------- */
.panel{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}
.panel-h{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--line)}
.panel-h h3{font-size:16px;font-weight:700}
.panel-b{padding:6px 0}
table{width:100%;border-collapse:collapse}
th{text-align:left;font-size:11.5px;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);font-weight:700;padding:12px 20px}
td{padding:14px 20px;border-top:1px solid var(--line);font-size:14px;vertical-align:middle}
tbody tr:hover{background:#fafbfc}
.tu{display:flex;align-items:center;gap:10px}
.tu .av{width:34px;height:34px;border-radius:50%;background:var(--teal);color:#fff;display:grid;place-items:center;font-weight:700;font-size:13px;flex:none}
.tu b{font-size:14px}.tu span{font-size:12px;color:var(--muted)}
.pill{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:700;padding:4px 11px;border-radius:999px}
.pill.ok{background:#e3f4ea;color:#1d7a44}
.pill.warn{background:#fdf2da;color:#9a6c08}
.pill.bad{background:#fbe5e1;color:#b13620}
.pill.info{background:#e7ebfb;color:#3445a0}
.pill.mut{background:#eef0f3;color:#5a6069}
.acts{display:flex;gap:7px}
.tier-badge{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;padding:5px 11px;border-radius:8px;background:var(--teal-tint);color:var(--teal-dk)}

.grid-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:18px}
.mi-card{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:var(--shadow)}
.mi-card .ph{height:140px;background:var(--panel) center/cover;position:relative}
.mi-card .body{padding:13px 14px}
.mi-card h4{font-family:Inter;font-size:14.5px;font-weight:600;margin-bottom:5px}

.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px}
.toolbar select,.toolbar input{padding:9px 13px;border:1.5px solid var(--line);border-radius:10px;background:#fff;outline:none;font-size:14px}
.toolbar input{flex:1;min-width:160px}

.empty{text-align:center;padding:46px 20px;color:var(--muted)}
.empty .ic{width:64px;height:64px;border-radius:50%;background:var(--paper);display:grid;place-items:center;margin:0 auto 14px;color:#aab0ba}
.empty h3{color:var(--text);font-size:17px;margin-bottom:6px}

.kgrid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
@media(max-width:860px){.kgrid{grid-template-columns:1fr}}
.set-row{display:flex;align-items:center;justify-content:space-between;padding:15px 0;border-bottom:1px solid var(--line)}
.set-row:last-child{border-bottom:none}
.set-row .lbl b{display:block;font-size:14.5px}
.set-row .lbl span{font-size:13px;color:var(--muted)}
.set-row input{width:120px;padding:9px 12px;border:1.5px solid var(--line);border-radius:9px;text-align:right;font-weight:700;outline:none}

.verifrow{display:flex;align-items:center;gap:16px;padding:16px;border:1.5px solid var(--line);border-radius:12px;margin-bottom:12px}
.verifrow .stepnum{width:36px;height:36px;border-radius:50%;background:var(--paper);display:grid;place-items:center;font-weight:800;color:var(--muted);flex:none}
.verifrow.done .stepnum{background:var(--ok);color:#fff}
.verifrow .info{flex:1}
.verifrow .info b{display:block;font-size:15px}
.verifrow .info span{font-size:13px;color:var(--muted)}

/* toast */
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(20px);background:var(--ink);color:#fff;padding:13px 22px;border-radius:12px;font-size:14px;font-weight:600;box-shadow:var(--shadow-lg);opacity:0;pointer-events:none;transition:.25s;z-index:90;display:flex;align-items:center;gap:10px}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.toast .dot{width:9px;height:9px;border-radius:50%;background:var(--orange)}

/* listing detail */
.detail{max-width:1000px;margin:0 auto}
.detail .hero-img{height:340px;border-radius:18px;background:var(--panel) center/cover;margin-bottom:24px;position:relative}
.detail-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:28px}
@media(max-width:760px){.detail-grid{grid-template-columns:1fr}}
.book-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:var(--shadow);position:sticky;top:90px}
.book-line{display:flex;justify-content:space-between;padding:9px 0;font-size:14px;border-bottom:1px solid var(--line)}
.book-line.total{border-bottom:none;border-top:2px solid var(--ink);margin-top:6px;padding-top:13px;font-weight:800;font-size:16px}
.spec{display:flex;justify-content:space-between;padding:11px 0;border-bottom:1px solid var(--line);font-size:14px}
.spec b{color:var(--muted);font-weight:600}
.back-link{display:inline-flex;align-items:center;gap:6px;color:var(--teal);font-weight:600;font-size:14px;margin-bottom:18px;cursor:pointer}

.hidden{display:none!important}

/* ---- Drag & drop uploader ---- */
.dropzone{position:relative;border:1.6px dashed var(--line);border-radius:14px;padding:26px 20px;
  text-align:center;cursor:pointer;transition:border-color .15s,background .15s;background:var(--paper)}
.dropzone:hover,.dropzone:focus{border-color:var(--orange);outline:none}
.dropzone.is-drag{border-color:var(--orange);background:rgba(245,149,3,.08)}
.dropzone .dz-ico{display:inline-grid;place-items:center;width:46px;height:46px;border-radius:12px;
  background:#fff;color:var(--teal);box-shadow:0 1px 3px rgba(12,12,12,.08);margin-bottom:10px}
.dropzone .dz-hint{font-weight:700;font-size:14.5px;color:var(--text)}
.dropzone .dz-sub{font-size:12.5px;color:var(--muted);margin-top:3px}
.dz-previews{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;margin-top:16px}
.dz-thumb{position:relative;background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden;text-align:left}
.dz-thumb img{width:100%;height:78px;object-fit:cover;display:block}
.dz-thumb .dz-doc{height:78px;display:grid;place-items:center;font-family:Archivo,sans-serif;font-weight:800;
  color:#fff;background:var(--indigo);font-size:15px;letter-spacing:.04em}
.dz-thumb .dz-meta{padding:7px 9px}
.dz-thumb .dz-meta b{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dz-thumb .dz-meta span{font-size:11px;color:var(--muted)}
.dz-rm{position:absolute;top:5px;right:5px;width:22px;height:22px;border-radius:50%;border:none;cursor:pointer;
  background:rgba(12,12,12,.65);color:#fff;font-size:15px;line-height:1;display:grid;place-items:center}
.dz-rm:hover{background:var(--bad)}

/* ============================================================
   Brand colour by surface
   - white bg (solid topbar): original logo + black text (default)
   - orange bar / hero image / dark panels: flat-white logo + white text
   ============================================================ */

/* text -> white on dark/orange surfaces */
.topbar:not(.solid) .brand,
.topbar:not(.solid) .brand .tag,
.foot .brand span { color: #fff; }
.app-top .ttl { color: #fff; }
.app-top .ttl small { color: rgba(255,255,255,.72); }

/* logo mark -> flat white on dark/orange surfaces */
.topbar:not(.solid) .brand-mark rect,
.app-top .brand-mark rect,
.auth-side .brand-mark rect,
.foot .brand-mark rect { fill: #fff; }

.topbar:not(.solid) .brand-mark circle,
.app-top .brand-mark circle,
.auth-side .brand-mark circle,
.foot .brand-mark circle { fill: rgba(12,12,12,.30); }

.topbar:not(.solid) .brand-mark path,
.app-top .brand-mark path,
.auth-side .brand-mark path,
.foot .brand-mark path { stroke: #fff; }

/* ---- Listing image slider ---- */
.lendo-slider{position:absolute;inset:0;overflow:hidden;z-index:1}
.lendo-slider .ls-track{display:flex;height:100%;transition:transform .32s ease}
.lendo-slider .ls-slide{flex:0 0 100%;height:100%;background:var(--panel) center/cover no-repeat}
.lendo-slider .ls-nav{position:absolute;top:50%;transform:translateY(-50%);width:30px;height:30px;border:none;border-radius:50%;
  background:rgba(12,12,12,.5);color:#fff;font-size:20px;line-height:1;display:grid;place-items:center;cursor:pointer;z-index:2;
  opacity:0;transition:opacity .15s,background .15s}
.lendo-slider .ls-prev{left:8px}.lendo-slider .ls-next{right:8px}
.lendo-slider .ls-nav:hover{background:var(--orange);color:#1c1300}
.icard:hover .lendo-slider .ls-nav,.mi-card:hover .lendo-slider .ls-nav,.hero-img .lendo-slider .ls-nav{opacity:1}
.lendo-slider .ls-dots{position:absolute;left:0;right:0;bottom:8px;display:flex;justify-content:center;gap:5px;z-index:2}
.lendo-slider .ls-dot{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.55);cursor:pointer;transition:background .15s}
.lendo-slider .ls-dot.on{background:#fff;width:7px;height:7px}
.ph .badge,.hero-img .badge{z-index:3}

/* ---- Manage photos grid ---- */
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:16px}
.photo-cell{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff}
.photo-cell .pimg{height:120px;background:var(--panel) center/cover;position:relative}
.photo-cell .pimg .cover-tag{position:absolute;top:8px;left:8px;background:var(--orange);color:#1c1300;font-size:11px;font-weight:800;
  padding:3px 8px;border-radius:20px;font-family:Archivo}
.photo-cell .prow{display:flex;align-items:center;justify-content:space-between;padding:9px 11px;gap:8px}
.photo-cell .cov{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--text);cursor:pointer;margin:0}
.photo-cell .cov input{accent-color:var(--orange)}
.dz-del{background:none;border:none;color:var(--bad);font-size:12.5px;font-weight:700;cursor:pointer;padding:0}
.dz-del:hover{text-decoration:underline}

/* cover radio inside upload previews */
.dz-cover-lbl{display:flex;align-items:center;gap:5px;padding:6px 9px 8px;font-size:12px;color:var(--text);cursor:pointer}
.dz-cover-lbl input{accent-color:var(--orange)}

/* ---- Map picker / embed ---- */
.lendo-map{height:300px;border-radius:14px;overflow:hidden;border:1px solid var(--line);background:var(--panel)}
.map-tools{display:flex;gap:10px;margin-bottom:10px;flex-wrap:wrap}
.map-search{flex:1;min-width:200px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;font:inherit;background:#fff}
.map-fallback{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:16px}
.map-embed{height:280px;width:100%;border:0;border-radius:14px}

/* ---- Profile avatar uploader ---- */
.avatar-edit{position:relative;width:118px;height:118px;cursor:pointer;display:block}
.avatar-edit .ae-img{display:grid;place-items:center;width:118px;height:118px;border-radius:50%;
  background:var(--panel) center/cover no-repeat;border:3px solid #fff;box-shadow:var(--shadow-lg);overflow:hidden}
.avatar-edit .ae-initials{font-family:Archivo,sans-serif;font-weight:800;font-size:34px;color:#fff;background:var(--indigo)}
.avatar-edit .ae-cam{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:42px;height:42px;border-radius:50%;
  background:rgba(12,12,12,.55);color:#fff;display:grid;place-items:center;opacity:0;transition:opacity .15s}
.avatar-edit:hover .ae-cam{opacity:1}
.avatar-edit:hover .ae-img{filter:brightness(.85)}
/* account-button avatar can show a photo */
.usermenu .av{background-size:cover;background-position:center;overflow:hidden}

/* ---- Booking detail (single source of truth) ---- */
.bk-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:18px}
.bk-head .pill{margin-right:6px}
.bk-actions{display:flex;gap:8px;flex-wrap:wrap}
.bk-actions form{margin:0}
.inline-edit{border-top:1px solid var(--line)}
.inline-edit>summary{cursor:pointer;padding:12px 22px;font-size:13px;font-weight:700;color:var(--orange);list-style:none}
.inline-edit>summary::-webkit-details-marker{display:none}
.inline-edit>summary::before{content:'⚙ ';opacity:.7}
.tool-thumb{position:relative;width:120px;height:90px;border-radius:10px;overflow:hidden;background:var(--panel);flex:0 0 auto}

/* timeline */
.timeline{position:relative;padding-left:6px}
.tl-item{position:relative;display:flex;gap:14px;padding:0 0 16px 18px;border-left:2px solid var(--line);margin-left:5px}
.tl-item:last-child{border-left-color:transparent;padding-bottom:0}
.tl-dot{position:absolute;left:-7px;top:2px;width:12px;height:12px;border-radius:50%;background:var(--orange);border:2px solid #fff;box-shadow:0 0 0 1px var(--line)}
.tl-body{display:flex;flex-direction:column}
.tl-body b{font-size:14px}
.tl-body span{font-size:13px;color:var(--muted)}
.tl-body time{font-size:12px;color:var(--muted);margin-top:1px}

/* notes */
.note{background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin-bottom:8px}
.note .note-meta{font-size:11.5px;color:var(--muted);margin-bottom:3px}
.note p{font-size:13.5px;margin:0;white-space:pre-wrap}

/* issues */
.issue{border:1px solid var(--line);border-radius:10px;margin-bottom:8px;overflow:hidden}
.issue>summary{cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 14px;font-size:13.5px;list-style:none}
.issue>summary::-webkit-details-marker{display:none}
.issue-body{padding:0 14px 14px}
.ib-block{margin-bottom:8px}
.ib-block .ib-l{display:block;font-size:11.5px;font-weight:700;color:var(--muted);margin-bottom:2px}
.ib-block p{margin:0;font-size:13.5px;white-space:pre-wrap}
select.mini{padding:7px 10px;border:1px solid var(--line);border-radius:8px;font:inherit}

/* attachments */
.att-group{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--line)}
.att-group:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}
.att-head{display:flex;align-items:center;gap:8px;margin-bottom:10px;font-size:14px}
.att-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;margin-bottom:10px}
.att-thumb{display:block;height:90px;border-radius:10px;background:var(--panel) center/cover;border:1px solid var(--line)}

/* activity */
.act-row{display:flex;gap:14px;padding:7px 0;border-bottom:1px dashed var(--line);font-size:13px}
.act-row:last-child{border-bottom:none}
.act-when{color:var(--muted);white-space:nowrap;min-width:104px}
.act-txt{text-transform:capitalize}

/* ---- Search & book flow ---- */
.book-hero{position:relative;height:200px;border-radius:14px;overflow:hidden;background:var(--panel)}
.book-summary{margin-top:18px;border-top:1px solid var(--line);padding-top:12px}

/* ============================================================
   Top bar fixes: scroll-aware buttons + mobile fit + sticky
   ============================================================ */
html, body { overflow-x: hidden; }           /* stop horizontal overflow breaking the fixed bar */
.topbar > * { min-width: 0; }
.brand { min-width: 0; white-space: nowrap; }

/* (1) nav buttons follow the bar's state instead of being frozen server-side */
.topbar .btn-nav{ background:transparent; border:1.5px solid rgba(255,255,255,.55); color:#fff; }
.topbar .btn-nav:hover{ background:rgba(255,255,255,.14); }
.topbar.solid .btn-nav{ background:#fff; border-color:var(--line); color:var(--text); }
.topbar.solid .btn-nav:hover{ border-color:#bfc6d2; }

.lbl-short{ display:none; }

/* (2)+(3) mobile: compact CTA so nothing overflows / covers the brand */
@media (max-width:560px){
  .topbar{ padding:10px 14px; gap:8px; }
  .brand{ font-size:20px; gap:7px; }
  .brand-mark{ width:28px; height:28px; }
  .nav-cta{ gap:7px; }
  .nav-cta .btn{ padding:7px 12px; font-size:13px; }
  .nav-cta .nav-create{ padding:0; width:36px; height:36px; justify-content:center; }
  .nav-create .lbl{ display:none; }      /* Create listing -> icon-only circle */
  .lbl-full{ display:none; }
  .lbl-short{ display:inline; }          /* "Log in / register" -> "Log in" */
  .hero{ padding-left:16px; padding-right:16px; }
  .searchbar{ padding:6px 6px 6px 16px; }
  .searchbar .btn{ padding:11px 16px; }
  .searchbar input{ min-width:0; font-size:15px; }
}

/* ---- Escrow & settlement ---- */
.escrow-hero{display:flex;align-items:center;gap:14px;background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin-bottom:14px}
.escrow-hero svg{width:30px;height:30px;color:var(--teal);flex:0 0 auto}
.escrow-hero b{display:block;font-size:20px;line-height:1.1}
.escrow-hero span{font-size:12.5px;color:var(--muted)}
.escrow-note{display:flex;gap:8px;align-items:flex-start;margin-top:14px;padding:10px 12px;border-radius:10px;font-size:13px;background:var(--paper);border:1px solid var(--line)}
.escrow-note svg{width:16px;height:16px;flex:0 0 auto;margin-top:1px}
.escrow-note.bad{background:#fff4f4;border-color:#f3c9c9;color:#9b2c2c}
.escrow-note.ok{background:#eefaf3;border-color:#bfe6cf;color:#1d6b46}

/* ============================================================
   App UI fixes: mobile topbar, drawer identity, upload UX,
   scrollable tables, My Items photo view
   ============================================================ */

/* (1) mobile topbar declutter: drop tagline + username (shown in drawer instead) */
@media (max-width:560px){
  .app-top .ttl small{ display:none; }
  .app-top .usermenu b{ display:none; }
}

/* (1) drawer user identity block */
.side-user{ display:flex; align-items:center; gap:10px; padding:14px 16px 14px; border-bottom:1px solid var(--line); margin-bottom:8px; }
.side-user .su-av{ width:38px; height:38px; border-radius:50%; background:var(--panel) center/cover; display:flex; align-items:center; justify-content:center; font-weight:700; color:var(--ink); flex:0 0 auto; }
.side-user .su-meta{ min-width:0; }
.side-user .su-meta b{ display:block; font-size:14px; line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.side-user .su-meta span{ display:block; font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* (2) disabled upload button + (3) preview warning */
.btn:disabled{ opacity:.45; cursor:not-allowed; }
.dz-warn{ margin-top:10px; padding:8px 11px; border-radius:9px; background:#fff4f4; border:1px solid #f3c9c9; color:#9b2c2c; font-size:12px; }

/* (4) tables scroll horizontally on small screens */
.table-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
@media (max-width:700px){
  .table-wrap table{ min-width:100%; }
  .table-wrap th, .table-wrap td{ white-space:nowrap; }
}

/* (5) My Items: tap to view the cover photo */
.mi-card .ph{ position:relative; }
.mi-view{ position:absolute; top:8px; right:8px; z-index:3; width:30px; height:30px; border-radius:8px; background:rgba(12,12,12,.6); display:flex; align-items:center; justify-content:center; color:#fff; }
.mi-view svg{ width:16px; height:16px; }
.mi-view:hover{ background:rgba(12,12,12,.8); }

/* drawer backdrop (mobile) + swipe-to-close support */
.side-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.42); opacity:0; pointer-events:none; transition:opacity .25s; z-index:34; }
.side-backdrop.show{ opacity:1; pointer-events:auto; }

/* HEIC conversion in progress */
.dz-thumb.dz-converting{ opacity:.75; }
.dz-thumb.dz-converting .dz-doc{ animation:dzpulse 1s ease-in-out infinite; }
@keyframes dzpulse{ 0%,100%{opacity:.4} 50%{opacity:1} }

/* hero: "Near <town>" picker */
.searchmeta .near-pick{ display:inline-flex; align-items:center; gap:7px; }
.searchmeta .near-pick select{ background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.4); color:#fff; font:inherit; font-weight:700; padding:5px 10px; border-radius:9px; cursor:pointer; max-width:60vw; }
.searchmeta .near-pick select:focus{ outline:2px solid var(--orange); }
.searchmeta .near-pick select option{ color:#0c0c0c; }

/* ---- Selfie liveness capture ---- */
.selfie{ margin-top:6px; }
.selfie-stage{ position:relative; width:100%; max-width:320px; aspect-ratio:1/1; border-radius:16px; overflow:hidden; background:#0c0c0c; display:flex; align-items:center; justify-content:center; }
.selfie-stage video{ width:100%; height:100%; object-fit:cover; transform:scaleX(-1); display:none; }
.selfie-stage video.live{ display:block; }
.selfie-guide{ position:absolute; left:0; right:0; bottom:0; padding:10px 12px; background:linear-gradient(transparent,rgba(0,0,0,.7)); color:#fff; font-size:13px; font-weight:600; text-align:center; }
.selfie-guide.on{ background:linear-gradient(transparent,rgba(245,149,3,.85)); color:#1c1300; }
.selfie-actions{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.selfie-thumbs{ display:flex; gap:8px; margin-top:10px; }
.selfie-thumb{ position:relative; width:64px; height:64px; border-radius:10px; background:#222 center/cover; border:1px solid var(--line); }
.selfie-thumb span{ position:absolute; left:0; right:0; bottom:0; font-size:9px; text-transform:uppercase; text-align:center; background:rgba(0,0,0,.55); color:#fff; padding:1px 0; border-radius:0 0 9px 9px; }

/* ---- Card images: show the whole item (no heavy cropping) ---- */
.icard .ph,.mi-card .ph{height:auto;aspect-ratio:4/3}
.icard .lendo-slider,.mi-card .lendo-slider{background:var(--panel)}
.icard .ls-slide,.mi-card .ls-slide{position:relative;overflow:hidden;background-color:transparent;background-size:0 0}
/* Blurred fill: a zoomed, blurred copy of the same photo fills the empty space behind,
   while the real photo sits fully visible (contain) on top. */
.icard .ls-slide::before,.mi-card .ls-slide::before{content:'';position:absolute;inset:-12%;background-image:inherit;background-size:cover;background-position:center;background-repeat:no-repeat;filter:blur(16px) brightness(.97);transform:scale(1.12);z-index:0}
.icard .ls-slide::after,.mi-card .ls-slide::after{content:'';position:absolute;inset:0;background-image:inherit;background-size:contain;background-position:center;background-repeat:no-repeat;z-index:1}
.icard .ls-nav,.mi-card .ls-nav,.icard .ls-dots,.mi-card .ls-dots{z-index:2}
/* category-image fallbacks still look good filling the frame */
.icard .ls-slide.ls-fallback,.mi-card .ls-slide.ls-fallback{background-size:cover}

/* ---- Admin category editor ---- */
.cat-edit{border:1px solid var(--line);border-radius:12px;margin-bottom:10px;overflow:hidden;background:#fff}
.cat-edit>summary{display:flex;align-items:center;gap:10px;padding:11px 14px;cursor:pointer;list-style:none;font-weight:600}
.cat-edit>summary::-webkit-details-marker{display:none}
.cat-edit>summary small{color:var(--ink-soft,#7b8190);font-weight:500;text-transform:uppercase;font-size:11px;letter-spacing:.04em}
.cat-swatch{width:22px;height:22px;border-radius:6px;border:1px solid rgba(0,0,0,.1);flex:0 0 auto;background-size:cover;background-position:center}
.cat-edit .cat-form{padding:6px 14px 16px;border-top:1px solid var(--line)}
.cat-edit .cat-grid{display:grid;grid-template-columns:1fr 150px;gap:10px}
.cat-edit input[type=color]{width:46px;height:38px;padding:2px;border:1px solid var(--line);border-radius:8px;background:#fff}
.cat-row-actions{display:flex;gap:8px;align-items:center;margin-top:12px;flex-wrap:wrap}

/* ---- Category drag-to-reorder ---- */
.cat-drag{display:inline-flex;align-items:center;justify-content:center;width:22px;height:26px;color:#9aa3b2;cursor:grab;flex:0 0 auto;border-radius:6px}
.cat-drag:hover{color:var(--ink);background:#eef1f6}
.cat-drag:active{cursor:grabbing}
#catSort .cat-edit{transition:box-shadow .15s,opacity .15s}
#catSort .cat-edit.dragging{opacity:.55;box-shadow:var(--shadow-lg);border-color:var(--orange)}
#catSort .cat-edit.drop-target{box-shadow:0 -3px 0 var(--orange)}

/* ---- Top-bar: avatar opens Profile, separate logout icon ---- */
.um-profile{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit}
.um-logout{background:none;border:0;cursor:pointer;display:grid;place-items:center;color:#1c1300;padding:5px;margin-left:2px;border-radius:50%;line-height:0}
.um-logout:hover{background:rgba(0,0,0,.14)}
/* ---- Drawer: make the user's name clearly visible (white) ---- */
.side-user .su-meta b{color:#fff}

/* ---- Trust / reliability card ---- */
.trust-card{border:1px solid var(--line);border-radius:14px;padding:14px 16px;background:#fff;margin:10px 0 18px}
.trust-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.trust-label{font-weight:800;font-size:13px;letter-spacing:.02em;padding:4px 12px;border-radius:999px}
.trust-label.ok{background:rgba(30,138,123,.14);color:#13715f}
.trust-label.warn{background:rgba(245,149,3,.16);color:#b06b00}
.trust-label.mut{background:var(--panel);color:var(--muted)}
.trust-rate{font-weight:700;color:var(--ink)}
.trust-rate small{color:var(--muted);font-weight:600}
.trust-rate.mut{color:var(--muted);font-weight:600}
.trust-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(78px,1fr));gap:10px 14px}
.trust-stats>div{display:flex;flex-direction:column}
.trust-stats b{font-size:17px;line-height:1.1}
.trust-stats span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}
.trust-badges{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.tbadge{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;background:var(--paper);border:1px solid var(--line);border-radius:999px;padding:4px 10px;color:var(--ink)}
.tbadge svg{width:14px;height:14px;color:var(--teal)}

/* ---- Item card: published time + distance ---- */
.icard-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:11.5px;color:var(--muted);margin:5px 0 9px}
.icard-meta .dot{opacity:.5}
.icard-meta .dist.near-you{color:var(--teal);font-weight:600}

/* ---- Messages: bell, inbox, thread ---- */
.bell{position:relative;display:grid;place-items:center;width:38px;height:38px;border-radius:50%;color:#1c1300;text-decoration:none;margin-right:4px}
.bell:hover{background:rgba(0,0,0,.12)}
.bell-dot{position:absolute;top:2px;right:0;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:var(--bad,#B13620);color:#fff;font-size:10px;font-weight:800;display:grid;place-items:center;line-height:1}
.msg-row{display:flex;align-items:center;gap:12px;padding:13px 18px;border-bottom:1px solid var(--line);text-decoration:none;color:inherit}
.msg-row:last-child{border-bottom:none}
.msg-row:hover{background:var(--paper)}
.msg-row .av{width:40px;height:40px;border-radius:50%;background:var(--teal);color:#fff;display:grid;place-items:center;font-weight:700;font-size:14px;flex:0 0 auto}
.msg-row.unread .av{background:var(--orange)}
.msg-main{flex:1;min-width:0}
.msg-top{display:flex;justify-content:space-between;gap:8px}
.msg-top b{font-size:14px}
.msg-top time{font-size:11px;color:var(--muted);flex:0 0 auto}
.msg-sub{display:block;font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msg-row.unread .msg-top b{font-weight:800}
.msg-dot{width:9px;height:9px;border-radius:50%;background:var(--orange);flex:0 0 auto}
.msg-context{font-size:13px;color:var(--muted);margin-bottom:12px}
.thread{display:flex;flex-direction:column;gap:8px;padding:18px;max-height:56vh;overflow-y:auto}
.bubble{max-width:78%;padding:9px 13px;border-radius:14px;font-size:14px;line-height:1.4}
.bubble p{margin:0;white-space:pre-wrap;word-wrap:break-word}
.bubble time{display:block;font-size:10px;color:var(--muted);margin-top:4px}
.bubble.mine{align-self:flex-end;background:var(--orange);color:#1c1300;border-bottom-right-radius:4px}
.bubble.mine time{color:#7a5600}
.bubble.theirs{align-self:flex-start;background:var(--panel);border-bottom-left-radius:4px}
.msg-compose{display:flex;gap:8px;padding:14px 18px;border-top:1px solid var(--line)}
.msg-compose textarea{flex:1;border:1px solid var(--line);border-radius:10px;padding:9px 12px;font:inherit;resize:vertical}
.enquire{margin:2px 0 16px}
.enquire textarea{width:100%;border:1px solid var(--line);border-radius:10px;padding:9px 12px;font:inherit;resize:vertical;margin-bottom:8px}

/* ---- Categorised reviews ---- */
.rev-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}
.rev-cats{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 2px}
.rev-cat{font-size:11.5px;color:var(--muted);background:var(--paper);border:1px solid var(--line);border-radius:999px;padding:2px 9px}
.rev-cat b{color:var(--ink)}

/* ---- Phase 3: deposits & risk ---- */
.trust-deposit{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--ink);margin:10px 0 2px}
.trust-deposit svg{width:14px;height:14px;color:var(--teal)}
.dep-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px}
.dep-stat{display:flex;flex-direction:column;background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:12px 14px}
.dep-stat b{font-size:19px;line-height:1.1}
.dep-stat span{font-size:11px;color:var(--muted);margin-top:3px}
.risk{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:700;border-radius:999px;padding:3px 9px}
.risk svg{width:12px;height:12px}
.risk-low{background:rgba(30,138,123,.14);color:#13715f}
.risk-medium{background:rgba(245,149,3,.18);color:#a86400}
.risk-high{background:rgba(177,54,32,.14);color:#9a2f20}

/* ---- Top-bar right cluster: bell sits close to the profile pill ---- */
.app-top-r{display:flex;align-items:center;gap:6px}
.app-top-r .bell{margin-right:0}

/* ---- Related items rails (more from owner / more in category) ---- */
.more-wrap{max-width:1200px;margin:8px auto 0;padding:0 18px}
.more-rail{margin:26px 0}
.more-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:14px}
.more-head h3{font-family:Archivo;font-size:20px;margin:0}
.more-link{font-size:13px;font-weight:600;color:var(--orange);text-decoration:none;flex:none}
.rail{display:flex;gap:16px;overflow-x:auto;padding-bottom:8px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}
.rail::-webkit-scrollbar{height:6px}
.rail::-webkit-scrollbar-thumb{background:var(--line);border-radius:3px}
.rail .icard{min-width:240px;width:240px;flex:0 0 auto;scroll-snap-align:start}
@media(max-width:560px){ .rail .icard{min-width:200px;width:200px} }

/* ---- Admin filter / search toolbar ---- */
.adminbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:14px}
.adminbar input[type=text]{flex:1;min-width:200px;padding:9px 13px;border:1px solid var(--line);border-radius:10px;font:inherit;background:#fff}
.adminbar select{padding:9px 11px;border:1px solid var(--line);border-radius:10px;font:inherit;background:#fff;cursor:pointer}
.adminbar .btn{flex:none}
.adminbar-count{font-size:12px;color:var(--muted);padding:10px 4px 0}
@media(max-width:680px){ .adminbar input[type=text]{min-width:100%} .adminbar select{flex:1} }

/* ---- Real-time messaging: presence, typing, seen ---- */
.msg-status{display:flex;align-items:center;gap:7px;font-size:12.5px;color:var(--muted);margin:-6px 0 12px}
.presence{width:9px;height:9px;border-radius:50%;background:#b9bfc9;flex:none}
.presence.on{background:var(--ok,#1E8A7B);box-shadow:0 0 0 3px rgba(30,138,123,.18)}
.seen-line{text-align:right;font-size:11px;color:var(--muted);padding:2px 18px 0;font-weight:600}
.typing-bubble{align-self:flex-start;display:inline-flex;gap:4px;align-items:center;background:var(--panel);border-radius:14px;border-bottom-left-radius:4px;padding:11px 14px;width:max-content}
.typing-bubble span{width:7px;height:7px;border-radius:50%;background:#9aa1ac;display:inline-block;animation:typingdot 1.2s infinite ease-in-out}
.typing-bubble span:nth-child(2){animation-delay:.2s}
.typing-bubble span:nth-child(3){animation-delay:.4s}
@keyframes typingdot{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}

/* ---- Top-bar right cluster: force single horizontal row (fixes desktop stacking) ---- */
.app-top-r{display:flex !important;flex-direction:row !important;align-items:center;gap:8px;flex:none}
.app-top-r .bell{flex:0 0 auto;margin-right:0}
.usermenu{display:flex !important;flex-direction:row !important;align-items:center;gap:8px;flex:none}
.um-profile{display:flex !important;flex-direction:row !important;align-items:center;gap:8px;white-space:nowrap;text-decoration:none;color:inherit}
.usermenu .av,.um-profile .av{flex:0 0 auto}
.usermenu b{white-space:nowrap}
.um-logout{flex:0 0 auto}

/* hide the bell badge when there are no unread messages ([hidden] was overridden by display:grid) */
.bell-dot[hidden]{display:none !important}

/* chat avatar in the page heading (circular, image or initials) */
.page-h .pico-av{border-radius:50%;background-size:cover;background-position:center;font-size:15px;font-weight:700}

/* ---- App top-bar brand is a home link ---- */
.app-top .brand-link{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit}
.app-top .brand-link:hover{opacity:.92}

/* ---- Flash messages ---- */
.flash{border-radius:10px;padding:11px 14px;margin:0 0 16px;font-size:13.5px;font-weight:600}
.flash.ok{background:rgba(30,138,123,.12);color:#13715f}
.flash.info{background:rgba(245,149,3,.14);color:#a86400}
.flash.err{background:rgba(177,54,32,.12);color:#9a2f20}

/* ---- Confirmation modal (logout) ---- */
.modal{position:fixed;inset:0;z-index:1000;display:none}
.modal.show{display:block}
.modal-overlay{position:absolute;inset:0;background:rgba(12,12,12,.5)}
.modal-card{position:relative;max-width:380px;margin:18vh auto 0;background:#fff;border-radius:16px;padding:24px;box-shadow:0 20px 60px rgba(0,0,0,.3);animation:modalPop .16s ease}
@keyframes modalPop{from{transform:translateY(8px) scale(.98);opacity:0}to{transform:none;opacity:1}}
.modal-card h3{font-family:Archivo;font-size:20px;margin:0 0 8px}
.modal-card p{color:var(--muted);margin:0 0 20px;font-size:14px;line-height:1.5}
.modal-actions{display:flex;gap:10px;justify-content:flex-end}
.modal-actions .btn{display:inline-flex;align-items:center;gap:6px}
.modal-actions .btn svg{width:15px;height:15px}
@media(max-width:480px){.modal-card{margin:0;position:absolute;left:0;right:0;bottom:0;max-width:none;border-radius:16px 16px 0 0}}

/* ---- Admin history / detail ---- */
.kv{display:flex;justify-content:space-between;gap:16px;padding:7px 0;border-bottom:1px solid var(--line);font-size:14px}
.kv:last-child{border-bottom:none}
.kv span{color:var(--muted);flex:0 0 auto}
.kv b{text-align:right}
.row-hl{background:rgba(245,149,3,.08)}
.hist-row{display:flex;gap:12px;padding:10px 22px;border-bottom:1px solid var(--line)}
.hist-row:last-child{border-bottom:none}
.hist-dot{width:9px;height:9px;border-radius:50%;background:var(--teal);margin-top:6px;flex:0 0 auto}
.hist-body{flex:1;min-width:0}
.hist-top{display:flex;justify-content:space-between;gap:10px;align-items:baseline}
.hist-top b{font-size:13.5px;text-transform:capitalize}
.hist-top time{font-size:11px;color:var(--muted);flex:0 0 auto}
.hist-meta{font-size:12px;color:var(--muted);margin-top:2px}
.hist-json{background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:8px 10px;font-size:11px;margin:6px 0 0;overflow-x:auto;white-space:pre-wrap;word-break:break-word}

/* ---- Admin "view history/details" link ---- */
.hist-link{font-size:12px;font-weight:600;color:var(--teal);text-decoration:none;white-space:nowrap}
.hist-link:hover{text-decoration:underline}

/* ---- Admin: selfie liveness gallery ---- */
.selfie-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}
.selfie-frame{margin:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--paper)}
.selfie-frame img{display:block;width:100%;height:auto;aspect-ratio:3/4;object-fit:cover}
.selfie-frame figcaption{padding:8px 10px;font-size:12px;font-weight:600;color:var(--muted);text-align:center}

/* ---- Admin listing: category pill + spacing ---- */
.cat-line{display:flex;align-items:center;gap:7px;margin-top:5px;flex-wrap:wrap}
.cat-pill{font-size:11px;font-weight:700;padding:2px 9px;border-radius:999px;white-space:nowrap;letter-spacing:.2px}
.cat-line .muted{font-size:12px;color:var(--muted)}

/* ---- Audit diff table ---- */
.diff{width:100%;border-collapse:collapse;margin:6px 0 0;font-size:12px}
.diff th{text-align:left;color:var(--muted);font-weight:600;padding:3px 8px;border-bottom:1px solid var(--line)}
.diff td{padding:3px 8px;border-bottom:1px solid var(--line);vertical-align:top;word-break:break-word}
.diff tr:last-child td{border-bottom:none}
.diff td:first-child{font-weight:600;white-space:nowrap}
.diff .was{color:#B13620;text-decoration:line-through;opacity:.85}
.diff .now{color:#13715f}
.diff-cap{font-size:11px;font-weight:600;color:var(--muted);margin:4px 0 2px}
.diff-transition{font-size:13px;margin-top:4px}
.diff-transition span{color:var(--muted);margin:0 5px}

/* ---- Admin action row + audit remarks ---- */
.action-row{display:flex;gap:10px;flex-wrap:wrap;padding:16px 22px}
.diff-note{margin-top:7px;font-size:12.5px;color:var(--ink);background:rgba(245,149,3,.10);border-left:3px solid var(--orange);padding:6px 10px;border-radius:0 6px 6px 0}
.diff-note b{color:var(--orange-dk,#D97E00)}

/* --- Horizontal rail scroll buttons (desktop) --- */
.rail-wrap{position:relative}
.rail-btn{position:absolute;top:50%;transform:translateY(-50%);z-index:6;width:42px;height:42px;border-radius:50%;border:1px solid var(--line);background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.14);cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--text,#1a1a1a);transition:opacity .15s ease,background .15s ease,transform .1s ease}
.rail-btn:hover{background:var(--panel2,#f4f4f6)}
.rail-btn:active{transform:translateY(-50%) scale(.94)}
.rail-btn svg{width:20px;height:20px;display:block}
.rail-btn.prev{left:-10px}
.rail-btn.next{right:-10px}
.rail-btn[disabled]{opacity:0;pointer-events:none}
.rail-wrap .rail,.rail-wrap .love-rail{scroll-behavior:smooth}
@media(max-width:768px){ .rail-btn{display:none} }

/* --- Avatar circle (photo or initials) --- */
.lavatar{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:50%;background-color:var(--panel2,#eef1f6);background-size:cover;background-position:center;color:#3D509C;font-weight:800;letter-spacing:.02em;overflow:hidden;border:1px solid var(--line,#e5e5ea);vertical-align:middle}
.lavatar-init{text-transform:uppercase}
.owner-line{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.owner-line .who{display:flex;flex-direction:column;line-height:1.2}
.owner-line .who small{color:var(--muted);font-size:12px;font-weight:600}

/* Stop Chrome/Android from using a horizontal edge-swipe for back/forward history
   navigation, so the left-edge swipe can open the drawer instead. */
html, body { overscroll-behavior-x: none; }
