/* Market Watch — dark, data-dashboard look (datoshoy-inspired):
   near-black with a green glow, Bebas Neue display type, WhatsApp green for
   alerts/actions, Facebook blue for everything Marketplace. */
:root {
  --bg: #050706;
  --panel: #0c100e;
  --card: #101513;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f2f4f3;
  --muted: rgba(242, 244, 243, .66);
  --faint: rgba(242, 244, 243, .42);
  --wa: #25d366;
  --wa-ink: #04160b;
  --wa-soft: rgba(37, 211, 102, .12);
  --wa-line: rgba(37, 211, 102, .35);
  --mint: #8ef4d8;
  --fb: #1877f2;
  --fb-2: #5b9dff;
  --fb-soft: rgba(24, 119, 242, .16);
  --fb-line: rgba(91, 157, 255, .40);
  --danger: #ff5c6c;
  --danger-soft: rgba(255, 92, 108, .12);
  --land: #10302a;
  --land-hover: #17473b;
  --land-dim: #0b1d19;
  --border-map: rgba(142, 244, 216, .26);
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 40px rgba(0, 0, 0, .45);
  --display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(37, 211, 102, .13), transparent 60%),
    radial-gradient(900px 480px at 100% 0%, rgba(24, 119, 242, .10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--wa); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(37, 211, 102, .3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- type ---- */
.kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--wa); }
.kicker.fb { color: var(--fb-2); }
.display { font-family: var(--display); font-weight: 400; letter-spacing: .01em; line-height: .95; text-transform: uppercase; margin: 0; }
h1.display { font-size: clamp(46px, 7vw, 86px); }
h2.display { font-size: 30px; }
.lead { color: var(--muted); font-size: 16px; font-weight: 500; max-width: 760px; margin: 12px 0 0; }

/* ---- layout ---- */
.boot { display: grid; place-items: center; height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(5, 7, 6, .78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1240px; margin: 0 auto; height: 64px; padding: 0 22px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand img { width: 30px; height: 30px; }
.brand span { font-family: var(--display); font-size: 25px; letter-spacing: .03em; line-height: 1; padding-top: 3px; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: 13.5px; letter-spacing: .02em; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav a.on { color: var(--wa-ink); background: var(--wa); }
.spacer { flex: 1; }
.page { max-width: 1240px; margin: 0 auto; padding: 38px 22px 90px; }
.hero { margin-bottom: 26px; }
.hero .kicker { margin-bottom: 10px; }
.hero-row { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.hero-row .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: 6px; }

/* ---- stat cards ---- */
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; }
.stat .k { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12.5px; color: var(--faint); font-weight: 600; margin-top: 2px; }
.stat.wa .v { color: var(--wa); }
.stat.fb .v { color: var(--fb-2); }

/* ---- section panel ---- */
.section { background: rgba(12, 16, 14, .82); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.section-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- buttons / inputs ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .03); color: var(--text); font-weight: 700; font-size: 13.5px;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
}
.btn:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .22); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--wa); border-color: var(--wa); color: var(--wa-ink); }
.btn.primary:hover { box-shadow: 0 0 24px rgba(37, 211, 102, .35); background: #2fe073; }
.btn.fb { background: var(--fb); border-color: var(--fb); color: #fff; }
.btn.fb:hover { background: #2a86ff; box-shadow: 0 0 24px rgba(24, 119, 242, .35); }
.btn.fb-outline { border-color: var(--fb-line); color: var(--fb-2); background: var(--fb-soft); }
.btn.fb-outline:hover { background: rgba(24, 119, 242, .26); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(255, 255, 255, .06); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: rgba(255, 92, 108, .4); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 12.5px; }
.btn.icon { width: 40px; padding: 0; }
.btn.sm.icon { width: 34px; }
.btn svg { width: 16px; height: 16px; flex: none; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field + .field { margin-top: 18px; }
.label { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: baseline; gap: 8px; }
.label .opt { color: var(--faint); font-weight: 700; letter-spacing: .08em; }
.hint { font-size: 12.5px; color: var(--faint); font-weight: 500; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .35); border-radius: var(--radius-sm);
  padding: 10px 13px; outline: none; transition: border-color .15s, box-shadow .15s; font-weight: 500;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input { height: 44px; }
.textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--wa); box-shadow: 0 0 0 4px rgba(37, 211, 102, .14); }
.input.big { height: 54px; font-size: 18px; font-weight: 700; }
.select option { background: #101513; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.money { position: relative; }
.money span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; font-weight: 700; }
.money .input { padding-left: 26px; font-variant-numeric: tabular-nums; }
.err { color: var(--danger); font-size: 13px; font-weight: 600; }

/* ---- chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 27px; padding: 0 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; max-width: 100%;
}
.chip svg { width: 13px; height: 13px; flex: none; }
.chip.wa { background: var(--wa-soft); border-color: var(--wa-line); color: var(--wa); }
.chip.fb { background: var(--fb-soft); border-color: var(--fb-line); color: var(--fb-2); }
.chip.mint { background: rgba(142, 244, 216, .08); border-color: rgba(142, 244, 216, .3); color: var(--mint); }
.chip.danger { background: var(--danger-soft); border-color: rgba(255, 92, 108, .35); color: var(--danger); }
.chip.add { cursor: pointer; background: transparent; border-style: dashed; border-color: var(--line-2); }
.chip.add:hover { border-color: var(--wa-line); color: var(--wa); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- search cards ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0;
  transition: border-color .2s;
}
.card:hover { border-color: rgba(37, 211, 102, .28); }
.card-top { display: flex; align-items: flex-start; gap: 12px; }
.num { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--wa-soft); border: 1px solid var(--wa-line); color: var(--wa); display: grid; place-items: center; font-family: var(--display); font-size: 20px; padding-top: 2px; }
.card h3 { margin: 3px 0 0; font-size: 18px; font-weight: 800; letter-spacing: -.015em; line-height: 1.25; word-break: break-word; }
.card .desc { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .metrics { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.card .metric { background: rgba(0, 0, 0, .28); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; min-width: 0; }
.card .metric .k { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.card .metric .v { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.card .metric .v.wa { color: var(--wa); }
.card .metric .v.sm { font-size: 13px; font-weight: 700; margin-top: 6px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-actions { display: flex; gap: 6px; margin-top: auto; }
.card-actions .grow { flex: 1; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .6); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.empty { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 56px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--text); margin: 12px 0 6px; font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: .02em; }

/* ---- matches ---- */
.listings { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.listing { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; color: var(--text); transition: transform .15s, border-color .15s; }
.listing:hover { transform: translateY(-2px); border-color: var(--fb-line); }
.listing .ph { aspect-ratio: 1 / 1; background: radial-gradient(circle at 50% 40%, #16201d, #0b0f0d); display: grid; place-items: center; color: var(--faint); overflow: hidden; position: relative; }
.listing .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.listing .fbtag { position: absolute; left: 10px; top: 10px; background: var(--fb); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; }
.listing .bd { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 5px; }
.listing .price { font-weight: 800; font-size: 19px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.listing .title { font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing .where { font-size: 12.5px; color: var(--faint); font-weight: 600; }
.listing .why { font-size: 12.5px; color: var(--mint); background: rgba(142, 244, 216, .07); border: 1px solid rgba(142, 244, 216, .18); border-radius: 9px; padding: 6px 9px; margin-top: 4px; font-weight: 600; }
.summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

/* ---- modal / editor ---- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 18px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); width: min(1320px, 100%); height: min(860px, calc(100vh - 36px)); display: flex; flex-direction: column; overflow: hidden; animation: rise .2s ease; }
.sheet.narrow { width: min(470px, 100%); height: auto; max-height: calc(100vh - 36px); }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.sheet-head .display { font-size: 30px; padding-top: 3px; }
.sheet-body { overflow: auto; padding: 22px; flex: 1; min-height: 0; }
.sheet-foot { display: flex; gap: 10px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .25); }
.editor { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; }
.editor .map-col { padding: 18px; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.editor .form-col { overflow: auto; padding: 18px 20px 24px; min-height: 0; }
.form-block { padding: 18px 0; border-bottom: 1px solid var(--line); }
.form-block:first-child { padding-top: 4px; }
.form-block:last-child { border-bottom: 0; }

/* ---- map ---- */
.mapbox { flex: 1; min-height: 0; display: flex; flex-direction: column; background: radial-gradient(120% 90% at 50% 20%, #0d1b17 0%, #070b0a 70%); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.map-tools { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 24px; letter-spacing: .03em; line-height: 1; padding-top: 3px; min-width: 0; }
.crumbs a { color: var(--faint); cursor: pointer; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { color: var(--faint); font-size: 18px; }
.map-wrap { position: relative; flex: 1; min-height: 360px; touch-action: none; }
.map-canvas { position: absolute; inset: 0; }
.map-wrap svg { width: 100%; height: 100%; display: block; cursor: grab; }
.map-wrap svg:active { cursor: grabbing; }
.prov { fill: var(--land); stroke: var(--border-map); stroke-width: .9; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .15s; }
.prov:hover { fill: var(--land-hover); }
.prov.dim, .prov.dim:hover { fill: var(--land-dim); stroke: rgba(142, 244, 216, .12); }
.prov.cur, .prov.cur:hover { fill: var(--land); stroke: rgba(142, 244, 216, .55); stroke-width: 1.4; cursor: default; }
.prov.has-sel { fill: #18503f; stroke: var(--wa); stroke-width: 1.4; }
.barrio { fill: var(--land); stroke: rgba(142, 244, 216, .35); stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .15s; }
.barrio:hover { fill: var(--land-hover); }
.barrio.sel { fill: rgba(37, 211, 102, .55); stroke: var(--wa); stroke-width: 1.8; }
.barrio.none { cursor: not-allowed; fill: var(--land-dim); }
.pts { filter: drop-shadow(0 0 2.5px rgba(37, 211, 102, .55)); }
.pt { fill: var(--wa); stroke: #04120b; vector-effect: non-scaling-stroke; cursor: pointer; }
.pt.b { fill: var(--fb-2); }
.pt:hover { fill: #fff; }
.pt.sel { fill: #fff; stroke: var(--wa); }
.blabel { font-size: 10px; fill: rgba(242, 244, 243, .72); pointer-events: none; text-anchor: middle; font-weight: 700; paint-order: stroke; stroke: #0a1714; stroke-width: 3px; }
.tip { position: absolute; pointer-events: none; background: #f2f4f3; color: #050706; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); opacity: 0; transition: opacity .1s; z-index: 3; }
.tip.on { opacity: 1; }
.map-legend { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 12px; font-size: 11.5px; font-weight: 700; color: var(--muted); background: rgba(5, 7, 6, .75); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.map-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--wa); box-shadow: 0 0 6px var(--wa); }
.map-legend i.b { background: var(--fb-2); box-shadow: 0 0 6px var(--fb-2); }
.map-hint { position: absolute; left: 12px; top: 12px; font-size: 11.5px; font-weight: 700; color: var(--faint); background: rgba(5, 7, 6, .7); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; }
.zoom { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.zoom .btn { background: rgba(5, 7, 6, .8); }
.caba-btn { position: absolute; right: 12px; top: 12px; }
.picked { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); background: linear-gradient(90deg, rgba(37, 211, 102, .12), transparent); }
.picked .pin { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--wa); color: var(--wa-ink); flex: none; }
.picked .t { font-weight: 800; font-size: 15px; }
.picked .s { color: var(--muted); font-size: 12.5px; font-weight: 600; }

.combo { position: relative; flex: 1; min-width: 200px; max-width: 360px; margin-left: auto; }
.combo .input { height: 40px; padding-left: 36px; border-radius: 999px; }
.combo > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
.menu { position: absolute; z-index: 10; top: calc(100% + 6px); left: 0; right: 0; background: #111816; border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); padding: 6px; max-height: 320px; overflow: auto; }
.menu button { display: flex; width: 100%; align-items: center; gap: 9px; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; font-weight: 600; }
.menu button:hover, .menu button.on { background: rgba(255, 255, 255, .06); }
.menu .sm { color: var(--faint); font-size: 12px; margin-left: auto; font-weight: 700; }
.menu .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); flex: none; }
.menu .dot.b { background: var(--fb-2); }

/* ---- rules builder ---- */
.rule-input { display: flex; gap: 6px; }
.rule-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.rule { display: flex; align-items: center; gap: 9px; padding: 7px 7px 7px 10px; border: 1px solid var(--line); border-radius: 11px; font-size: 14px; font-weight: 600; background: rgba(0, 0, 0, .25); }
.rule .kind { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .08em; flex: none; }
.rule .kind.must { background: var(--wa-soft); color: var(--wa); }
.rule .kind.never { background: var(--danger-soft); color: var(--danger); }
.rule .kind.note { background: rgba(255, 255, 255, .06); color: var(--muted); }
.rule .txt { flex: 1; min-width: 0; }
.seg { display: inline-flex; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { white-space: nowrap; border: 0; background: none; padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 800; color: var(--muted); cursor: pointer; }
.seg button.on.must { background: var(--wa); color: var(--wa-ink); }
.seg button.on.never { background: var(--danger); color: #1a0306; }

/* ---- login ---- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.login-side { padding: 56px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: radial-gradient(900px 600px at 0% 0%, rgba(37, 211, 102, .16), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(24, 119, 242, .14), transparent 60%); }
.login-side h1 { font-size: clamp(54px, 7vw, 104px); margin-top: 18px; }
.login-points { display: grid; gap: 12px; max-width: 460px; }
.login-points div { display: flex; gap: 12px; align-items: center; color: var(--muted); font-weight: 600; }
.login-points b { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.login-main { display: grid; place-items: center; padding: 28px; }
.login-card { width: min(410px, 100%); }
.login-card h2 { margin: 6px 0 8px; font-size: 44px; }
.login-card p { color: var(--muted); margin: 0 0 24px; font-size: 15px; font-weight: 500; }
.otp { display: flex; gap: 8px; }
.otp input { width: 100%; height: 60px; text-align: center; font-size: 26px; font-weight: 800; border: 1px solid var(--line-2); border-radius: 13px; background: rgba(0, 0, 0, .35); outline: none; font-variant-numeric: tabular-nums; }
.otp input:focus { border-color: var(--wa); box-shadow: 0 0 0 4px rgba(37, 211, 102, .15); }
.wa-ic { display: inline-flex; width: 18px; height: 18px; flex: none; }

/* ---- users ---- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); font-weight: 800; padding: 0 14px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(255, 255, 255, .02); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--wa-soft); border: 1px solid var(--wa-line); color: var(--wa); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.who { display: flex; align-items: center; gap: 11px; }
.mono { font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; width: 100px; }
.bar i { display: block; height: 100%; background: var(--wa); border-radius: 999px; box-shadow: 0 0 10px var(--wa); }
.role { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.role.admin { background: var(--wa-soft); color: var(--wa); border: 1px solid var(--wa-line); }
.role.user { background: var(--fb-soft); color: var(--fb-2); border: 1px solid var(--fb-line); }
.roles-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.roles-info > div { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: rgba(0, 0, 0, .2); }
.roles-info p { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; font-weight: 500; }

/* ---- user chip / menu / toast ---- */
.userchip { display: flex; align-items: center; gap: 10px; padding: 4px 5px 4px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .03); cursor: pointer; }
.userchip:hover { border-color: var(--line-2); }
.userchip .nm { font-weight: 700; font-size: 13.5px; line-height: 1.15; text-align: right; }
.userchip .rl { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--wa); text-align: right; }
.usermenu { position: relative; }
.pop { position: absolute; right: 0; top: calc(100% + 8px); background: #111816; border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); padding: 8px; width: 270px; z-index: 30; }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.pop button { width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.pop button:hover { background: rgba(255, 255, 255, .06); }
.toasts { position: fixed; z-index: 80; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #f2f4f3; color: #050706; padding: 11px 17px; border-radius: 12px; font-size: 14px; font-weight: 700; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); animation: rise .2s ease; }
.toast.bad { background: var(--danger); color: #1a0306; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .12); border-top-color: var(--wa); animation: spin .8s linear infinite; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.center { display: grid; place-items: center; padding: 60px 0; }

/* ---- responsive ---- */
@media (max-width: 1000px) {
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor { display: block; overflow: auto; }
  .editor .map-col { border-right: 0; border-bottom: 1px solid var(--line); height: 70vh; min-height: 460px; }
  .editor .form-col { overflow: visible; }
  .login { grid-template-columns: 1fr; }
  .login-side { display: none; }
}
@media (max-width: 640px) {
  .topbar-in { padding: 0 14px; gap: 10px; height: 58px; }
  .brand span, .userchip .nm, .userchip .rl { display: none; }
  .userchip { padding: 3px; }
  .nav a { padding: 7px 11px; font-size: 12.5px; }
  .page { padding: 26px 14px 90px; }
  .section { padding: 16px; border-radius: 16px; }
  .stat { padding: 14px; }
  .stat .v { font-size: 28px; }
  .hero-row .actions { width: 100%; margin-left: 0; }
  .hero-row .actions .btn { flex: 1; }
  .overlay { padding: 0; place-items: end stretch; }
  .sheet { border-radius: 20px 20px 0 0; height: 96vh; }
  .editor .map-col { padding: 10px; height: 62vh; min-height: 400px; }
  .editor .form-col { padding: 6px 16px 20px; }
  .grid { grid-template-columns: 1fr; }
  .listings { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .table .hide-m { display: none; }
  .roles-info { grid-template-columns: 1fr; }
  .hide-mobile { display: none; }
  .grow-m { flex: 1; }
  .sheet-foot .spacer { display: none; }
  .combo { max-width: none; }
}
