/* Blu Marine backoffice. Navy glass, Inter, a rare gold accent. Phone first. Motion under 250 ms. */
@font-face { font-family: "Inter LE"; src: url(fonts/inter.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }

:root {
  --ink: #001a30;
  --navy: #003057;
  --royal: #1d4289;
  --sky: #0082c6;
  --gold: #ab9868;
  --text: #f4f7fa;
  --mute: #9fb2c4;
  --line: rgba(255, 255, 255, .1);
  --glass: rgba(255, 255, 255, .055);
  --glass2: rgba(255, 255, 255, .09);
  --bar: rgba(0, 32, 59, .78);
  --forsale: #35c97f;
  --check: #d9c48f;
  --onrequest: #8fa2b4;
  --reserved: #e6a54a;
  --sold: #e0675f;
  --r: 14px;
  --tap: 48px;
  --tabbar: 64px;
  --fast: 160ms;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overscroll-behavior: none; }
body {
  background: radial-gradient(900px 500px at 85% -10%, rgba(0, 130, 198, .2), transparent 60%), linear-gradient(180deg, #002a4d 0%, #001a30 70%) fixed;
  color: var(--text);
  font: 400 16px/1.42 "Inter LE", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.grow { flex: 1 1 auto; min-width: 0; }
.mute { color: var(--mute); }
.small { font-size: 13px; }
.center { text-align: center; }
.two { display: grid; gap: 1px; }
.two > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mark { display: block; height: 16px; width: auto; }
.boot { min-height: 100dvh; display: grid; place-items: center; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic.dim { width: 18px; height: 18px; color: var(--mute); }
.ic.big { width: 40px; height: 40px; color: var(--mute); stroke-width: 1.3; }

/* shell */
.shell { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.rail { display: none; }
.stage { position: relative; flex: 1 1 auto; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.appbar {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 8px) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  background: var(--bar); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.bar-mark { display: block; padding: 10px 0; }
.bar-back { display: grid; place-items: center; width: var(--tap); height: 40px; margin-left: -12px; }
.net { font-size: 12px; color: var(--reserved); }
.iconbtn { position: relative; display: grid; place-items: center; width: var(--tap); height: 40px; margin-right: -10px; background: none; border: 0; cursor: pointer; }
.badge {
  position: absolute; top: -2px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--sky); color: #fff; font: 600 11px/18px "Inter LE", sans-serif; text-align: center; font-style: normal;
}
.iconbtn .badge { top: 2px; right: 6px; }

.view {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
  padding: 16px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left));
  outline: none;
}
.view.in { animation: rise var(--fast) var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.pull { position: absolute; left: 50%; top: 60px; margin-left: -18px; width: 36px; height: 36px; border-radius: 50%; background: var(--bar); border: 1px solid var(--line); display: none; place-items: center; z-index: 3; }
.pull.show { display: grid; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--text); animation: turn .7s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }

.tabbar {
  flex: none; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 4px max(4px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 4px) max(4px, env(safe-area-inset-left));
  background: var(--bar); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-top: 1px solid var(--line);
}
.tab { position: relative; display: grid; justify-items: center; gap: 1px; padding: 6px 0 4px; min-height: 54px; color: var(--mute); text-decoration: none; transition: color var(--fast), transform var(--fast); }
.tab:active { transform: scale(.94); }
.tab.on { color: var(--text); }
.tab.on::before { content: ""; position: absolute; top: -5px; width: 22px; height: 2px; border-radius: 1px; background: var(--gold); }
.tab-ic { position: relative; display: block; height: 24px; }
.tab-l { font-size: 11px; font-weight: 500; letter-spacing: .01em; }

/* type */
.title { font-size: 28px; line-height: 1.15; font-weight: 300; letter-spacing: -.01em; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-height: 40px; }
.view > .title { margin-bottom: 14px; }
.sub { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--mute); margin: 24px 0 8px; }
.over { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }
.lead-in { margin: -6px 0 14px; font-size: 15px; }
.foot { margin-top: 24px; text-align: center; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 18px; border-radius: 12px;
  background: var(--glass2); border: 1px solid var(--line); color: var(--text); font-weight: 500; text-decoration: none; cursor: pointer;
  transition: transform var(--fast), background var(--fast);
}
.btn:active { transform: scale(.97); }
.btn:hover { background: rgba(255, 255, 255, .14); }
.btn.gold { background: var(--gold); border-color: transparent; color: var(--navy); font-weight: 600; }
.btn.gold:hover { filter: brightness(1.07); }
.btn.wide { width: 100%; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn.round { width: var(--tap); height: var(--tap); padding: 0; border-radius: 50%; }
.btn[disabled] { opacity: .5; }
.link { background: none; border: 0; padding: 8px 0; color: var(--mute); font-size: 14px; text-decoration: underline; cursor: pointer; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.row-actions .btn { flex: 1 1 120px; }

/* fields */
.stack { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; font-size: 13px; color: var(--mute); }
.input, .search {
  width: 100%; min-height: var(--tap); padding: 0 14px; border-radius: 12px; font-size: 16px; color: var(--text);
  background: rgba(0, 0, 0, .18); border: 1px solid var(--line); outline: none; transition: border-color var(--fast);
}
.input:focus, .search:focus { border-color: var(--sky); }
select.input { appearance: none; -webkit-appearance: none; }
select option { color: #001a30; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.err { color: #ffb4ae; font-size: 14px; }
.note { color: var(--reserved); font-size: 14px; margin: 6px 0 10px; }

/* gate and product */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 16px); overflow-y: auto; }
.gate-card { width: min(400px, 100%); }
.gate-card.wide { width: min(460px, 100%); }
.gate-card .mark { height: 19px; margin-bottom: 26px; }
.gate-card .over { margin-bottom: 18px; }
.gate-body { display: grid; gap: 12px; }
.qr { display: block; width: 188px; height: 188px; margin: 0 auto; border-radius: 12px; background: #fff; image-rendering: pixelated; }
.secret { margin: 0; padding: 14px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); font: 15px/1.6 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.big-list { gap: 10px; }
.bigbtn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 96px; padding: 16px 18px; text-align: left; cursor: pointer;
  background: var(--glass); border: 1px solid var(--line); border-radius: 18px; color: var(--text); transition: transform var(--fast), background var(--fast);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.bigbtn:active { transform: scale(.98); background: var(--glass2); }
.bigbtn[disabled] { opacity: .6; }
.bigbtn b { display: block; font-size: 28px; font-weight: 300; line-height: 1.15; }
.bigbtn small { display: block; font-size: 14px; color: var(--mute); margin-top: 2px; }
.product .row-actions { margin-top: 22px; }
.product .row-actions .btn { min-height: 44px; font-size: 14px; flex: 1 1 auto; padding: 0 12px; white-space: nowrap; }

/* home */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { display: grid; gap: 2px; text-align: left; padding: 14px 14px 12px; min-height: 96px; align-content: end; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); cursor: pointer; transition: transform var(--fast); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.tile:active { transform: scale(.98); }
.tile-n { font-size: 34px; font-weight: 300; line-height: 1.05; }
.tile-l { font-size: 13px; color: var(--mute); display: flex; align-items: center; gap: 6px; }
.tile.forsale .tile-l::before, .tile.reserved .tile-l::before, .tile.sold .tile-l::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.tile.forsale .tile-l::before { background: var(--forsale); }
.tile.reserved .tile-l::before { background: var(--reserved); }
.tile.sold .tile-l::before { background: var(--sold); }
.panel { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.towerbar { display: grid; gap: 8px; width: 100%; padding: 8px 0; background: none; border: 0; text-align: left; cursor: pointer; }
.towerbar-h { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.towerbar-h b { font-weight: 500; }
.segs { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: rgba(255, 255, 255, .06); }
.seg { flex: 0 0 0; min-width: 0; }
.bg-forsale { background: var(--forsale); }
.bg-check { background: var(--check); }
.bg-onrequest { background: var(--onrequest); }
.bg-reserved { background: var(--reserved); }
.bg-sold { background: var(--sold); }

/* lists */
.list { display: grid; gap: 1px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.list.gap { background: none; border: 0; gap: 10px; overflow: visible; }
.rowlink {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 9px 14px; text-align: left; text-decoration: none;
  background: #00294b; border: 0; color: var(--text); cursor: pointer; transition: background var(--fast);
}
.rowlink:active { background: #003560; }
.rowlink > .small, .lead > .small { flex: none; white-space: nowrap; }
.rowlink.static { cursor: default; }
.rowlink.static:active { background: #00294b; }
.view > .rowlink { margin-top: 12px; border-radius: var(--r); border: 1px solid var(--line); }
.two b { font-weight: 500; }
.dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: transparent; }
.dot.unread, .lead.unread .dot { background: var(--sky); }
.dot.bg-forsale { background: var(--forsale); }
.dot.bg-check { background: var(--check); }
.dot.bg-onrequest { background: var(--onrequest); }
.dot.bg-reserved { background: var(--reserved); }
.dot.bg-sold { background: var(--sold); }
[data-route="more"] .ic { stroke-width: 3; }

/* apartments */
.seg-ctl { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); flex: none; }
.seg-ctl button { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 11px; border: 0; border-radius: 8px; background: none; color: var(--mute); font-size: 14px; font-weight: 500; cursor: pointer; transition: background var(--fast), color var(--fast); }
.seg-ctl .ic { width: 16px; height: 16px; }
.seg-ctl button.on { background: var(--glass2); color: var(--text); }
.searchbox { position: relative; display: flex; align-items: center; margin-bottom: 10px; }
.searchbox .ic { position: absolute; left: 13px; width: 19px; height: 19px; color: var(--mute); pointer-events: none; }
.searchbox .search { padding-left: 40px; padding-right: 86px; }
.searchbox .search::-webkit-search-cancel-button { display: none; }
.searchbox .small { position: absolute; right: 13px; pointer-events: none; }
.chips { display: flex; gap: 7px; margin: 0 -16px 12px; padding: 2px 16px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 18px; white-space: nowrap;
  background: var(--glass); border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; transition: background var(--fast), border-color var(--fast), transform var(--fast);
}
.chip:active { transform: scale(.96); }
.chip.on { background: var(--glass2); border-color: rgba(255, 255, 255, .45); }
.chip[class*="st-"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--onrequest); }
.st-forsale::before { background: var(--forsale) !important; }
.st-check::before { background: var(--check) !important; }
.st-reserved::before { background: var(--reserved) !important; }
.st-sold::before { background: var(--sold) !important; }
.floor-pick { min-height: var(--tap); border-radius: 12px; background: var(--glass); border: 1px solid var(--line); color: var(--text); font-weight: 500; cursor: pointer; transition: background var(--fast); }
.floor-pick.on { background: var(--glass2); border-color: rgba(255, 255, 255, .45); }
.floor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 7px; }

.unit-list { display: grid; gap: 8px; }
.unit {
  display: grid; grid-template-columns: auto 1fr auto; column-gap: 12px; row-gap: 6px; align-items: center; padding: 11px 13px; border-radius: var(--r); cursor: pointer;
  background: var(--glass); border: 1px solid var(--line); transition: background var(--fast), transform var(--fast); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.unit:active { transform: scale(.99); background: var(--glass2); }
.unit-no { grid-row: 1 / 3; font-size: 22px; font-weight: 300; min-width: 54px; }
.unit-where { display: flex; gap: 8px; align-items: baseline; font-weight: 500; min-width: 0; white-space: nowrap; }
.unit-price { justify-self: end; font-weight: 500; white-space: nowrap; }
.unit-facts { grid-column: 2; grid-row: 2; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit .chip { grid-column: 3; grid-row: 2; justify-self: end; min-height: 34px; padding: 0 10px; font-size: 12px; }
.tag { justify-self: start; font-size: 11px; padding: 1px 7px; border-radius: 6px; background: rgba(0, 130, 198, .25); color: #bfe4f8; white-space: nowrap; }
.unit .tag { grid-column: 2; grid-row: 3; }

/* tower view */
.stacks { display: grid; gap: 10px; }
.stacks.n2 { grid-template-columns: 1fr 1fr; }
.stackview { min-width: 0; padding: 10px 8px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.stackview h3 { font-size: 14px; font-weight: 500; margin: 0 0 8px 2px; }
.floors { display: grid; gap: 3px; }
.floor { display: flex; align-items: stretch; gap: 4px; }
.fl-no { flex: none; width: 18px; text-align: right; font-size: 10px; color: var(--mute); align-self: center; }
.cells { flex: 1; display: flex; gap: 3px; min-width: 0; }
.cell { flex: 1 1 0; min-width: 0; height: 26px; padding: 0; border: 0; border-radius: 5px; color: rgba(0, 26, 48, .78); font-size: 10px; font-weight: 600; cursor: pointer; transition: transform var(--fast), opacity var(--fast); overflow: hidden; }
.cell:active { transform: scale(.92); }
.cell.off { opacity: .16; }
.cell.draft { box-shadow: inset 0 0 0 2px #fff; }
.stacks.n1 .cell { height: 34px; font-size: 12px; }
.stacks.n1 .fl-no { font-size: 12px; width: 22px; }

/* enquiries */
.lead-list { display: grid; gap: 8px; }
.lead { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 66px; padding: 10px 13px; text-align: left; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); color: var(--text); cursor: pointer; transition: background var(--fast); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.lead:active { background: var(--glass2); }
.lead.unread b { font-weight: 650; }
.kvs { display: grid; gap: 10px; margin-top: 16px; }
.kv { display: grid; gap: 1px; overflow-wrap: anywhere; white-space: pre-wrap; }
.kv .mute { font-size: 12px; }

/* publish */
.change-list { display: grid; gap: 8px; }
.change { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; padding: 13px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.change .grow { flex: 1 1 200px; }
.change h3 { font-size: 15px; font-weight: 500; margin-bottom: 3px; }
.change ul { margin: 0 0 3px; padding: 0; list-style: none; font-size: 15px; }
.change li { overflow-wrap: anywhere; }
.change b { font-weight: 600; }
.tick { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--gold); }
.cta { position: sticky; bottom: -24px; margin: 14px -16px -24px; padding: 12px 16px; background: linear-gradient(transparent, #001a30 40%); }

/* people */
.seats { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.seats b { font-weight: 500; font-size: 15px; }
.meter { height: 6px; margin-top: 7px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, .1); }
.meter i { display: block; height: 100%; background: var(--sky); transition: width var(--fast); }
.avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--glass2); font-size: 13px; font-weight: 600; }
.avatar.r-owner { background: var(--royal); }
.avatar.r-admin { background: rgba(0, 130, 198, .45); }

/* sheets */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0, 12, 24, .5); opacity: 0; transition: opacity 200ms; }
.scrim.on { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: min(88dvh, 720px); display: flex; flex-direction: column;
  background: #00294b; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; outline: none;
  transform: translateY(102%); transition: transform 220ms var(--ease); box-shadow: 0 -12px 40px rgba(0, 0, 0, .35);
}
.sheet.on { transform: none; }
.sheet.dragging { transition: none; }
.grab { flex: none; height: 26px; display: grid; place-items: center; touch-action: none; }
.grab::before { content: ""; width: 38px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .28); }
.sheet-body { overflow-y: auto; padding: 0 16px calc(env(safe-area-inset-bottom) + 18px); display: grid; gap: 10px; }
.sheet-title { font-size: 22px; font-weight: 300; line-height: 1.2; }
.choice { display: grid; gap: 1px; border-radius: var(--r); overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.choice-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 0 14px; text-align: left; background: #003057; border: 0; color: var(--text); cursor: pointer; transition: background var(--fast); }
.choice-row:active { background: #003e70; }
.choice-row.on { font-weight: 600; }
.choice-row.danger { color: #ffb4ae; }

/* switch */
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; margin: 0; border-radius: 14px; background: rgba(255, 255, 255, .16); position: relative; cursor: pointer; transition: background var(--fast); }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform var(--fast); }
.switch:checked { background: var(--sky); }
.switch:checked::after { transform: translateX(18px); }

/* offices */
.office { display: grid; gap: 10px; }

/* skeleton and empty */
.sk-list { display: grid; gap: 8px; }
.sk { border-radius: var(--r); background: linear-gradient(100deg, var(--glass) 30%, rgba(255, 255, 255, .11) 50%, var(--glass) 70%); background-size: 220% 100%; animation: shine 1.1s linear infinite; }
.sk-row { height: 70px; }
.sk-tile { height: 96px; }
.sk-tall { height: 240px; }
@keyframes shine { from { background-position: 120% 0; } to { background-position: -20% 0; } }
.empty { display: grid; justify-items: center; gap: 6px; padding: 52px 20px; text-align: center; }
.empty h3 { font-size: 18px; font-weight: 400; margin-top: 8px; }

/* toast and pop up */
.toast {
  position: fixed; z-index: 60; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + var(--tabbar) + 18px); display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: #fff1; background: rgba(0, 48, 87, .96); border: 1px solid rgba(255, 255, 255, .18); border-radius: 13px; font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity 180ms, transform 180ms var(--ease);
}
.toast.on { opacity: 1; transform: none; pointer-events: auto; }
.toast.bad { border-color: var(--sold); }
.toast > span { flex: 1; }
.toast-act { flex: none; min-height: 36px; padding: 0 6px; background: none; border: 0; color: var(--gold); font-weight: 600; cursor: pointer; }
.popup { position: fixed; z-index: 55; left: 12px; right: 12px; top: calc(env(safe-area-inset-top) + 8px); animation: drop 200ms var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
.popup-in { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; border-radius: 14px; background: rgba(0, 48, 87, .96); border: 1px solid rgba(255, 255, 255, .18); color: var(--text); cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }

@media (max-width: 380px) {
  .unit { column-gap: 8px; padding: 10px 11px; }
  .unit-no { min-width: 44px; font-size: 19px; }
  .unit-where small { font-size: 12px; }
  .unit-where { gap: 5px; font-size: 15px; }
}

/* a phone on its side: less bar, same tabs */
@media (max-height: 500px) and (orientation: landscape) {
  .appbar { padding-top: 4px; padding-bottom: 4px; }
  .tab { min-height: 44px; grid-auto-flow: column; align-items: center; justify-content: center; gap: 12px; padding: 2px 0; }
  .tabbar { padding-top: 2px; padding-bottom: 2px; }
  .unit-list, .lead-list { grid-template-columns: 1fr 1fr; }
  .sheet { left: 12%; right: 12%; max-height: 96dvh; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .gate { place-items: start center; }
  .toast { bottom: 62px; }
}

/* laptop: side rail, sheets from the side */
@media (min-width: 900px) {
  .shell { flex-direction: row; }
  .tabbar { display: none; }
  .rail { display: flex; flex: none; flex-direction: column; width: 228px; padding: 22px 14px 16px; border-right: 1px solid var(--line); background: rgba(0, 26, 48, .42); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .rail-mark { display: block; padding: 4px 10px 26px; }
  .rail-nav { display: grid; gap: 2px; }
  .rail-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border-radius: 10px; color: var(--mute); text-decoration: none; font-size: 15px; font-weight: 500; transition: background var(--fast), color var(--fast); }
  .rail-item:hover { background: var(--glass); color: var(--text); }
  .rail-item.on { background: var(--glass2); color: var(--text); box-shadow: inset 2px 0 0 var(--gold); }
  .rail-item .tab-ic { height: 24px; }
  .rail-item .ic { width: 21px; height: 21px; }
  .rail-foot { margin-top: auto; padding: 0 10px; font-size: 13px; color: var(--mute); }
  .appbar { position: absolute; top: 0; right: 0; z-index: 3; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 12px 24px; }
  .bar-mark { display: none; }
  .bar-back { margin: 0; background: var(--glass); border-radius: 10px; }
  .appbar:has(.bar-back:not([hidden])) { left: 0; right: auto; }
  .view { padding: 24px 32px 32px; }
  .view > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
  .chips { margin: 0 auto 14px; padding: 2px 0; flex-wrap: wrap; overflow: visible; }
  .title { font-size: 32px; }
  .title-row { padding-right: 56px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .tile { min-height: 120px; padding: 18px; }
  .tile-n { font-size: 42px; }
  .unit-list { gap: 0; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
  .unit { grid-template-columns: 76px 170px 1fr 130px 170px; grid-template-rows: auto; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 8px 16px; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .unit:last-child { border-bottom: 0; }
  .unit:hover { background: var(--glass2); }
  .unit-no { grid-row: auto; font-size: 18px; font-weight: 400; }
  .unit-where { grid-column: 2; }
  .unit-facts { grid-column: 3; grid-row: 1; font-size: 14px; }
  .unit-price { grid-column: 4; grid-row: 1; }
  .unit .chip { grid-column: 5; grid-row: 1; }
  .unit .tag { grid-column: 3; grid-row: 1; justify-self: end; }
  .stacks.n2 { gap: 16px; }
  .stackview { padding: 16px; }
  .cell { height: 30px; font-size: 11px; }
  .fl-no { font-size: 11px; width: 22px; }
  .lead-list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  .cta { position: static; margin: 14px auto 0; padding: 0; background: none; }
  .cta .btn { width: auto; min-width: 260px; }
  .sheet { left: auto; top: 0; right: 0; bottom: 0; width: 440px; max-height: none; border-radius: 0; border-top: 0; border-left: 1px solid var(--line); transform: translateX(102%); box-shadow: -12px 0 40px rgba(0, 0, 0, .3); }
  .sheet.on { transform: none; }
  .grab { height: 18px; }
  .grab::before { display: none; }
  .sheet-body { padding: 8px 22px 24px; }
  .toast { left: auto; right: 28px; bottom: 28px; width: min(440px, 50vw); }
  .popup { left: auto; right: 24px; top: 16px; width: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
