/* Yaftity UI v7. Design principles follow Apple's Human Interface Guidelines:
   clarity, deference to content, restrained color, generous spacing, 44px touch targets,
   subtle depth, smooth motion that respects reduced-motion, and AA contrast. */

@font-face { font-family: "Cairo"; src: url("../fonts/cairo-arabic.woff2") format("woff2"); font-weight: 200 1000; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC, U+200C-200E; }
@font-face { font-family: "Cairo"; src: url("../fonts/cairo-latin.woff2") format("woff2"); font-weight: 200 1000; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212; }

:root {
  /* Neutrals */
  --ink: #1d1d1f;
  --ink-2: #3a3a3c;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --line-soft: #f0f0f3;
  --bg: #f5f5f7;
  --fill: #f2f2f5;
  --card: #ffffff;
  /* Brand (from the logo) */
  --brand: #152d46;
  --brand-dark: #0e1f33;
  --brand-tint: #e9eef5;
  --accent: #fe891a;
  --accent-ink: #b05300;   /* orange for text on light backgrounds (AA) */
  --accent-tint: #fff3e6;
  --screen: #2f5d8f;
  /* Status */
  --ok: #1f7a3d;
  --ok-tint: #e3f5e8;
  --warn: #9a5b00;
  --warn-tint: #fff4d6;
  --bad: #c0282a;
  --bad-tint: #fde8e8;
  --info: #1a5dc9;
  --info-tint: #e5effd;
  /* Shape and depth */
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.04), 0 2px 10px rgba(0,0,0,.04);
  --shadow-2: 0 2px 6px rgba(0,0,0,.05), 0 12px 32px rgba(0,0,0,.08);
  --shadow-3: 0 10px 40px rgba(5,15,28,.22);
  --ring: 0 0 0 4px rgba(21,45,70,.18);
  --ease: cubic-bezier(.25,.1,.25,1);
  --tap: 44px;
  --header-h: 64px;
}

/* Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Cairo", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; font-size: 16px; background: var(--bg); color: var(--ink); line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--brand); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent-ink); }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; color: var(--ink); font-weight: 800; }
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 10px; }
::selection { background: rgba(254,137,26,.25); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Header: translucent material */
.topbar { background: rgba(255,255,255,.82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); color: var(--ink); position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid rgba(0,0,0,.07); }
.topbar .container { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.topbar .container { max-width: 1360px; }
.logo { display: flex; align-items: center; min-height: var(--tap); flex: none; }
.logo img { height: var(--logo-h, 38px); max-height: 56px; width: auto; max-width: none; flex: none; display: block; }
.nav { display: flex; gap: 2px; flex: 1; min-width: 0; }
.nav a { color: var(--ink-2); padding: 0 10px; white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; border-radius: 10px; font-weight: 600; font-size: .95rem; transition: background .2s var(--ease), color .2s var(--ease); }
.nav a:hover { background: var(--fill); color: var(--ink); }
.nav a.active { background: var(--brand-tint); color: var(--brand); }
.tools { display: flex; align-items: center; gap: 8px; }
.lang-btn { background: transparent; border: 0; border-radius: 10px; min-height: 40px; padding: 0 12px; font: inherit; font-weight: 700; font-size: .9rem; color: var(--brand); cursor: pointer; transition: background .2s var(--ease); }
.lang-btn:hover { background: var(--fill); }
.bell { position: relative; display: grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: 12px; color: var(--brand); transition: background .2s var(--ease); }
.bell:hover { background: var(--fill); color: var(--brand); }
.bell svg { width: 22px; height: 22px; }
.bell .count { position: absolute; top: 5px; inset-inline-end: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: var(--brand-dark); font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.user-chip .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; }
.user-chip a { color: var(--ink); font-weight: 600; }
.user-chip .chip-name { display: inline-block; vertical-align: middle; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .btn-light { background: transparent; color: var(--muted); border-color: transparent; }
.user-chip .btn-light:hover { background: var(--fill); color: var(--ink); }
.burger { display: none; width: var(--tap); height: var(--tap); border: 0; background: transparent; border-radius: 12px; color: var(--brand); place-items: center; cursor: pointer; padding: 0; }
.burger:hover { background: var(--fill); }
.burger svg { width: 22px; height: 22px; }

.demo-strip { background: var(--accent-tint); border-bottom: 1px solid #fde3c6; font-size: .85rem; }
.demo-strip .container { display: flex; gap: 10px; align-items: center; min-height: 36px; flex-wrap: wrap; }
.demo-strip a { font-weight: 700; color: var(--accent-ink); }
.verify-strip { background: var(--info-tint); border-bottom: 1px solid #d3e3fb; font-size: .9rem; }
.verify-strip .container { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 20px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2; cursor: pointer; background: var(--brand); color: #fff; text-align: center; transition: transform .15s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), filter .2s var(--ease); -webkit-tap-highlight-color: transparent; }
.btn:hover { color: #fff; filter: brightness(1.12); }
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--accent); color: var(--brand-dark); }
.btn-accent:hover { color: var(--brand-dark); filter: brightness(1.05); }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--fill); color: var(--ink); filter: none; }
.btn-light { background: var(--fill); color: var(--ink); }
.btn-light:hover { color: var(--ink); }
.btn-light-on-dark { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.28); }
.btn-danger { background: var(--card); color: var(--bad); border-color: #f2c4c4; }
.btn-danger:hover { background: var(--bad-tint); color: var(--bad); filter: none; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-xlsx { background: #1d6f42; }
.btn-pdf { background: #b3261e; }
.btn:disabled { opacity: .4; cursor: not-allowed; filter: none; transform: none; }

/* Cards and layout */
.card { background: var(--card); border: 0; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-1); }
.card h3:first-child { margin-bottom: 14px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); }
.section { padding: 64px 0; }
.section-alt { background: var(--card); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.link-more { font-weight: 700; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 36px 0 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .muted { margin-top: 4px; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty::before { content: ""; display: block; width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 14px; background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h18v12H3zM3 7l3-4h12l3 4M9 12h6'/%3E%3C/svg%3E") center/22px no-repeat; }

.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .label { color: var(--muted); font-size: .88rem; font-weight: 600; }
.kpi .value { font-size: 1.85rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.kpi .sub { font-size: .8rem; color: var(--muted); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; line-height: 1.5; }
.badge.billboard { background: var(--accent-tint); color: var(--accent-ink); }
.badge.screen { background: var(--info-tint); color: var(--screen); }
.badge.ok, .badge.live { background: var(--ok-tint); color: var(--ok); }
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
.badge.warn { background: var(--warn-tint); color: var(--warn); }
.badge.info { background: var(--info-tint); color: var(--info); }
.badge.bad { background: var(--bad-tint); color: var(--bad); }
.badge.muted { background: var(--fill); color: var(--muted); }
@keyframes pulse { 50% { opacity: .35; } }
.vtick { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); color: #fff; font-size: .68rem; font-weight: 800; flex: none; }
.count-pill { background: var(--accent); color: var(--brand-dark); border-radius: 99px; padding: 0 7px; font-size: .74rem; font-weight: 800; }

/* Messages */
.messages { margin-top: 16px; }
.msg { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 8px; background: var(--info-tint); color: #123a73; font-weight: 600; font-size: .92rem; }
.msg.success { background: var(--ok-tint); color: #15572c; }
.msg.warning { background: var(--warn-tint); color: #6b4000; }
.msg.error { background: var(--bad-tint); color: #8d1c1e; }

/* Forms */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink-2); }
input, select, textarea { width: 100%; font: inherit; font-size: 1rem; min-height: var(--tap); padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); color: var(--ink); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
textarea { min-height: 110px; line-height: 1.6; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--brand); }
input[type="file"] { padding: 8px; background: var(--fill); border-style: dashed; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 700; font-size: .85rem; border: 0; border-radius: 9px; background: var(--card); color: var(--brand); padding: 6px 14px; margin-inline-end: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.1); cursor: pointer; }
input[type="color"] { padding: 4px; width: 64px; }
select { appearance: none; -webkit-appearance: none; padding-inline-end: 38px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat; background-size: 16px; background-position: left 14px center; }
[dir="ltr"] select { background-position: right 14px center; }
input:hover, select:hover, textarea:hover { border-color: #d1d1d6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
::placeholder { color: #a1a1a6; }
.field { margin-bottom: 18px; }
.field .check { display: flex; gap: 10px; align-items: center; }
.field .check input { width: 20px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 20px; margin-top: 3px; flex: none; }
.errorlist { color: var(--bad); list-style: none; padding: 0; margin: 6px 0; font-size: .85rem; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.fieldset { margin-bottom: 20px; }
.fieldset h3 { margin-bottom: 4px; }
.fieldset > .muted { margin-bottom: 14px; }
.logo-preview { height: 52px; background: var(--fill); padding: 8px; border-radius: 10px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline-form select { min-height: 36px; padding-block: 4px; width: auto; font-size: .85rem; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { padding: 12px 10px; text-align: start; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; background: transparent; }
tbody tr, table tr { transition: background .15s var(--ease); }
tr:hover td { background: #fafafc; }
tr:last-child td { border-bottom: 0; }
table.kv th { width: 40%; color: var(--muted); font-weight: 500; font-size: .9rem; }
table.kv tr:hover td { background: transparent; }
.card > table { margin: 0 -10px; width: calc(100% + 20px); }
.table-wrap, .card:has(> table) { overflow-x: auto; }
.actions-inline { display: flex; gap: 6px; flex-wrap: wrap; }
.actions-inline form { margin: 0; }

/* Segmented controls (tabs) */
.tabs, .settings-tabs { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 18px; background: #e8e8ed; border-radius: 12px; flex-wrap: wrap; max-width: 100%; }
.tabs a, .settings-tabs a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 9px; color: var(--ink-2); font-size: .9rem; font-weight: 600; background: transparent; border: 0; transition: background .2s var(--ease), box-shadow .2s var(--ease); }
.tabs a:hover, .settings-tabs a:hover { color: var(--ink); background: rgba(255,255,255,.5); }
.tabs a.on, .settings-tabs a.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* Hero */
.hero { background: radial-gradient(900px 500px at 15% -10%, rgba(254,137,26,.14) 0%, transparent 60%), radial-gradient(900px 520px at 90% 0%, #24456b 0%, transparent 65%), var(--brand); color: #fff; padding: 72px 0 0; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent); mask-image: linear-gradient(to bottom, #000 30%, transparent); pointer-events: none; }
.hero > .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 700; color: var(--accent-ink); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: currentColor; }
.hero .eyebrow { color: var(--accent); }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; line-height: 1.25; margin-bottom: 18px; color: #fff; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 1.12rem; max-width: 600px; color: #c8d3e1; margin: 0; }
.hero-search { display: grid; grid-template-columns: 1fr 136px 136px auto; gap: 6px; background: var(--card); border-radius: 18px; padding: 6px; margin-top: 32px; box-shadow: var(--shadow-3); max-width: 680px; }
.hero-search .hs-field { border: 0; background-color: transparent; color: var(--ink); border-radius: 12px; margin: 0; font-weight: 600; box-shadow: none; }
.hero-search select.hs-field { background-color: var(--fill); }
.hero-search .hs-q { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 0 12px; min-height: var(--tap); }
.hero-search .hs-q svg { width: 20px; height: 20px; flex: none; }
.hero-search .hs-q input { border: 0; padding: 0; min-height: 0; background: transparent; box-shadow: none; font-weight: 500; }
.hero-search .btn { padding-inline: 24px; border-radius: 12px; }
.hero-roles { display: flex; gap: 24px; margin-top: 18px; flex-wrap: wrap; }
.hero-roles a { color: #fff; font-weight: 700; min-height: var(--tap); display: inline-flex; align-items: center; gap: 6px; }
.hero-roles a span:not(.arr) { border-bottom: 2px solid rgba(254,137,26,.6); }
.hero-roles a:hover { color: var(--accent); }
.arr { display: inline-block; transition: transform .25s var(--ease); }
[dir="ltr"] .arr { transform: scaleX(-1); }
a:hover .arr { transform: translateX(-3px); }
[dir="ltr"] a:hover .arr { transform: scaleX(-1) translateX(-3px); }

.hero-visual { position: relative; height: 340px; }
.hv-map { position: absolute; inset: 0 0 30px 40px; border-radius: 24px; background: #1c3a5c; border: 1px solid rgba(255,255,255,.12); overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.3); }
[dir="ltr"] .hv-map { inset: 0 40px 30px 0; }
.hv-roads { position: absolute; inset: 0; width: 100%; height: 100%; }
.hv-roads path { fill: none; stroke: rgba(255,255,255,.13); stroke-width: 7; stroke-linecap: round; }
.hv-roads path.nile { stroke: rgba(80,150,220,.35); stroke-width: 14; }
.hv-pin { position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.hv-pin.billboard { background: var(--accent); }
.hv-pin.screen { background: #5b8fd0; }
.hv-pin.pulse::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--accent); animation: ring 2s infinite var(--ease); }
@keyframes ring { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.hv-card { position: absolute; bottom: 0; inset-inline-end: 0; width: 290px; background: rgba(255,255,255,.96); color: var(--ink); border-radius: 18px; padding: 12px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow-3); }
.hv-card > div:last-child { display: grid; gap: 2px; min-width: 0; }
.hv-card b { font-size: .92rem; line-height: 1.4; }
.hv-card .badge { justify-self: start; }
.hv-thumb { width: 84px; height: 84px; border-radius: 14px; flex: none; display: grid; place-items: center; }
.hv-thumb.billboard { background: linear-gradient(135deg, #fe891a, #f05a1a); }
.hv-thumb.screen { background: linear-gradient(135deg, #152d46, #2f5d8f); }
.hv-thumb .unit-art { width: 64px; }
.hv-price { font-weight: 800; color: var(--brand); }
.hv-price small { color: var(--muted); font-weight: 500; }
.hv-toast { position: absolute; top: 22px; inset-inline-end: -6px; background: rgba(255,255,255,.96); color: var(--ink); border-radius: 14px; padding: 8px 12px; display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: .85rem; box-shadow: var(--shadow-3); }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 64px; border-top: 1px solid rgba(255,255,255,.12); }
.hero-stats > div { padding: 24px 0; display: flex; align-items: baseline; gap: 10px; }
.hero-stats > div + div { border-inline-start: 1px solid rgba(255,255,255,.12); padding-inline-start: 24px; }
.hero-stats b { font-size: 2rem; color: #fff; line-height: 1; }
.hero-stats span { color: #b4c2d4; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; position: relative; padding-top: 28px; }
.steps::before { content: ""; position: absolute; top: 56px; inset-inline: 12% 12%; border-top: 2px dashed #d1d1d6; }
.step { position: relative; background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-1); }
.step h3 { font-size: 1.05rem; margin-top: 14px; }
.step p { margin: 0; font-size: .93rem; }
.step-ico { position: relative; width: 56px; height: 56px; border-radius: 16px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; margin-top: -50px; border: 4px solid var(--bg); box-sizing: content-box; }
.step-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.step-ico::after { counter-increment: s; content: counter(s); position: absolute; top: -6px; inset-inline-end: -8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--brand-dark); font-size: .75rem; font-weight: 800; display: grid; place-items: center; }

/* Audience panels and CTA */
/* Coverage: rollout phases on the homepage */
.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.phase { background: var(--bg); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line-soft); }
.phase.is-live { border-color: var(--ok); box-shadow: var(--shadow-1); }
.phase-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.phase-head h3 { margin: 0; font-size: 1rem; line-height: 1.4; }
.gov-list { display: flex; flex-wrap: wrap; gap: 6px; }
.gov { padding: 4px 11px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: .84rem; color: var(--ink); }
.gov:hover { border-color: var(--brand); color: var(--brand); }
.gov .num { color: var(--muted); font-size: .76rem; margin-inline-start: 2px; }
.phase-when { margin: -6px 0 12px; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.gov.is-soon { border-style: dashed; }
.gov .soon { color: var(--brand); font-size: .72rem; margin-inline-start: 2px; }
.aud { border-radius: 24px; padding: 32px; display: flex; flex-direction: column; align-items: flex-start; }
.aud .btn { margin-top: auto; }
.aud-owner { background: var(--brand); color: #dbe4ef; }
.aud-owner .eyebrow { color: var(--accent); }
.aud-adv { background: var(--card); box-shadow: var(--shadow-1); }
.aud .eyebrow { font-size: 1.15rem; }
.checks { list-style: none; padding: 0; margin: 4px 0 28px; display: grid; gap: 12px; }
.checks li { position: relative; padding-inline-start: 32px; }
.checks li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--brand-dark); font-size: .7rem; font-weight: 800; display: grid; place-items: center; }
.aud-adv .checks li::before { background: var(--brand); color: #fff; }
.cta-band { border-radius: 28px; padding: 40px; background: linear-gradient(120deg, #fe891a, #ffa54d); color: var(--brand-dark); display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.14); inset-inline-end: -90px; top: -150px; }
.cta-band h2 { margin: 0 0 4px; font-size: 1.6rem; color: var(--brand-dark); }
.cta-band p { margin: 0; color: #3b2a14; }
.cta-band .btn-accent { background: var(--brand); color: #fff; }
.cta-band .btn-light-on-dark { background: rgba(255,255,255,.9); color: var(--brand-dark); border-color: transparent; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }

/* Unit cards */
.unit-art { display: block; }
.unit-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; color: inherit; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.unit-card:hover { box-shadow: var(--shadow-2); transform: translateY(-4px); color: inherit; }
.unit-card .thumb { height: 156px; position: relative; display: grid; place-items: center; color: #fff; }
.unit-card .thumb.billboard { background: radial-gradient(circle at 80% 0%, rgba(255,255,255,.22), transparent 55%), linear-gradient(135deg, #fe891a, #f05a1a); }
.unit-card .thumb.screen { background: radial-gradient(circle at 80% 0%, rgba(255,255,255,.12), transparent 55%), linear-gradient(135deg, #152d46, #2f5d8f); }
.unit-card .unit-art { width: 120px; }
.unit-card .thumb .badge { position: absolute; top: 12px; inset-inline-start: 12px; background: rgba(255,255,255,.95); }
.thumb-place { position: absolute; bottom: 10px; inset-inline-start: 12px; font-size: .8rem; font-weight: 700; background: rgba(14,31,51,.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: 2px 10px; border-radius: 99px; }
.unit-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.unit-card h3 { font-size: 1.02rem; margin: 0; }
.owner-line { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.meta-row { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); }
.meta-row span { display: inline-flex; align-items: center; gap: 5px; }
.meta-row svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.unit-card .price { font-weight: 800; font-size: 1.1rem; color: var(--brand-dark); margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); }

/* Explore */
.explore { display: grid; grid-template-columns: 420px 1fr; height: calc(100vh - var(--header-h)); }
.explore .side { overflow-y: auto; background: var(--bg); padding: 20px; border-inline-end: 1px solid var(--line); }
.explore #map { height: 100%; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; padding: 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.filters .full { grid-column: 1 / -1; }
.list-item { display: flex; gap: 14px; padding: 12px; border-radius: 16px; background: var(--card); margin-bottom: 10px; cursor: pointer; color: inherit; box-shadow: var(--shadow-1); border: 2px solid transparent; transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
.list-item:hover, .list-item.hl { border-color: var(--brand); color: inherit; box-shadow: var(--shadow-2); }
.list-item .sw { width: 64px; height: 64px; border-radius: 14px; flex: none; display: grid; place-items: center; color: #fff; font-size: 1.5rem; }
.list-item .sw.billboard { background: linear-gradient(135deg, #fe891a, #f05a1a); }
.list-item .sw.screen { background: linear-gradient(135deg, #152d46, #2f5d8f); }
.list-item .sw .unit-art { width: 48px; }
.list-item h4 { margin: 0 0 2px; font-size: .95rem; font-weight: 700; }
.pin { width: 32px; height: 32px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.pin span { transform: rotate(45deg); font-size: 13px; color: #fff; }
.pin.billboard { background: var(--accent); }
.pin.screen { background: var(--screen); }
.leaflet-container { font-family: inherit; }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--shadow-2); }
.leaflet-bar { border: 0 !important; box-shadow: var(--shadow-2) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-bar a { width: 36px !important; height: 36px !important; line-height: 36px !important; }

/* Unit detail */
.unit-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.book-card { position: sticky; top: calc(var(--header-h) + 20px); box-shadow: var(--shadow-2); }
.book-price { font-size: 2rem; font-weight: 800; line-height: 1.2; }
.book-price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.quote-box { background: var(--fill); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 14px; }
.crumbs { color: var(--muted); font-size: .88rem; margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.spec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.spec div { background: var(--fill); border-radius: 14px; padding: 14px; }
.spec b { display: block; font-size: 1.02rem; }
.spec span { color: var(--muted); font-size: .8rem; }

.bar { height: 8px; background: var(--fill); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #2f5d8f); border-radius: 99px; transition: width .6s var(--ease); }

/* Plans */
.plan { position: relative; display: flex; flex-direction: column; padding: 28px 24px; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.plan.hl { box-shadow: 0 0 0 2px var(--brand), var(--shadow-2); }
.plan .tag { position: absolute; top: -12px; inset-inline-start: 24px; background: var(--brand); color: #fff; font-size: .75rem; padding: 3px 12px; border-radius: 99px; font-weight: 700; }
.plan h3 { color: var(--muted); font-size: 1rem; }
.plan .price { font-size: 2.1rem; font-weight: 800; line-height: 1.2; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.plan .price small { font-size: .85rem !important; font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.plan li { position: relative; padding-inline-start: 26px; }
.plan li::before { content: ""; position: absolute; inset-inline-start: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--ok-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f7a3d' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center/10px no-repeat; }
.plans-group { margin-bottom: 48px; }
.plans-group h2 { margin-bottom: 20px; }

/* Auth */
.auth { max-width: 440px; margin: 0 auto; padding: 48px 24px 24px; }
.auth-logo { text-align: center; margin-bottom: 20px; }
.auth-logo img { height: 88px; }
.auth h1 { text-align: center; font-size: 1.6rem; margin-bottom: 20px; }
.auth .card { padding: 28px; }
.demo-accounts { display: grid; gap: 8px; margin-top: 12px; }
.demo-accounts .btn { justify-content: space-between; }

/* Notifications */
.notif { display: flex; gap: 14px; padding: 16px 8px; border-bottom: 1px solid var(--line-soft); color: inherit; border-radius: 12px; transition: background .15s var(--ease); }
.notif:last-child { border-bottom: 0; }
.notif:hover { background: #fafafc; color: inherit; }
.notif .ico { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--fill); font-size: 18px; }
.notif.unread .ico { background: var(--accent-tint); }
.notif.unread b::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-inline-start: 6px; vertical-align: middle; }

/* Reports */
.report-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.report-row:last-child { border-bottom: 0; }
.dl { display: flex; gap: 8px; }

/* Admin console: light sidebar like macOS */
.console { display: grid; grid-template-columns: 252px 1fr; min-height: calc(100vh - var(--header-h)); }
.console .sidebar { align-self: start; min-height: calc(100vh - var(--header-h)); background: #ececf0; border-inline-end: 1px solid var(--line); padding: 20px 12px; position: sticky; top: var(--header-h); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.console .sidebar a { display: flex; align-items: center; gap: 10px; color: var(--ink-2); min-height: 40px; padding: 0 12px; border-radius: 10px; font-weight: 600; font-size: .93rem; margin-bottom: 2px; transition: background .15s var(--ease), color .15s var(--ease); }
.console .sidebar a svg { width: 19px; height: 19px; flex: none; color: var(--brand); opacity: .8; }
.console .sidebar a:hover { background: rgba(0,0,0,.05); color: var(--ink); }
.console .sidebar a.active { background: var(--brand); color: #fff; }
.console .sidebar a.active svg { color: #fff; opacity: 1; }
.console .sidebar a .count-pill { margin-inline-start: auto; }
.console .sidebar .label { color: var(--muted); font-size: .75rem; font-weight: 700; padding: 16px 12px 6px; }
.console main { padding: 0 32px 48px; min-width: 0; }
.bars { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding-top: 12px; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.bars .b { width: 100%; max-width: 48px; background: var(--brand); border-radius: 8px 8px 2px 2px; position: relative; min-height: 4px; overflow: hidden; }
.bars .b i { position: absolute; bottom: 0; left: 0; right: 0; background: var(--accent); }
.bars .v { font-size: .74rem; font-weight: 700; color: var(--ink-2); }
.legend { display: flex; gap: 16px; font-size: .8rem; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; background: var(--brand); vertical-align: middle; }
.legend span.o::before { background: var(--accent); }

/* Company profiles and verification */
.company-title { display: flex; align-items: center; gap: 12px; }
.company-title img { height: 48px; width: 48px; object-fit: contain; border-radius: 12px; background: #fff; box-shadow: var(--shadow-1); }
.avatar { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #fff; font-weight: 800; font-size: 1.3rem; flex-shrink: 0; }
.avatar.big { width: 88px; height: 88px; font-size: 2.2rem; border-radius: 22px; }
.company-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 28px; }
.company-logo { width: 88px; height: 88px; object-fit: contain; border-radius: 22px; background: #fff; box-shadow: var(--shadow-1); }
.company-meta { display: grid; gap: 6px; text-align: end; }
.verify-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; padding: 16px 20px; }
.vstep { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); }
.vstep b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); flex-shrink: 0; }
.vstep.done { color: var(--ink); }
.vstep.done b { background: var(--ok); color: #fff; font-size: 0; }
.vstep.done b::after { content: "✓"; font-size: .9rem; }
.doc-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.doc-row:last-of-type { border-bottom: 0; }
.doc-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; }
.doc-icon { width: 56px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: var(--bad-tint); color: var(--bad); font-weight: 800; font-size: .8rem; flex-shrink: 0; }
.video-thumb { width: 120px; border-radius: 10px; background: #000; }

/* Policies */
.policy-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; padding-top: 32px; }
.policy-nav { display: grid; gap: 2px; padding: 10px; position: sticky; top: calc(var(--header-h) + 20px); }
.policy-nav a { padding: 0 12px; min-height: 40px; display: flex; align-items: center; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.policy-nav a:hover { background: var(--fill); }
.policy-nav a.active { background: var(--brand); color: #fff; }
.policy-body { padding: 36px 40px; max-width: 760px; }
.policy-body h1 { margin-bottom: 4px; }
.policy-body h3 { margin: 28px 0 8px; color: var(--brand); }
.policy-body p, .policy-body li { line-height: 1.95; color: var(--ink-2); }
.policy-links { display: flex; gap: 16px; flex-wrap: wrap; }
.policy-links a { color: #b4c2d4; }

/* Footer */
.footer { --footer-bg: var(--brand-dark); background: var(--footer-bg); color: #b4c2d4; font-size: .9rem; margin-top: 72px; }
.footer a { color: #e6edf5; }
.footer a:hover { color: var(--accent); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr 1.1fr; gap: 36px; padding-top: 56px; padding-bottom: 40px; }
.footer h4 { color: #fff; font-size: .95rem; margin: 0 0 16px; }
.footer-brand img { height: var(--logo-h, 48px); max-height: 96px; max-width: 100%; object-fit: contain; display: block; margin-bottom: 16px; }
.footer-brand p { margin: 0 0 18px; line-height: 1.8; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.footer-links a { display: inline-block; padding: 4px 0; }
.socials { display: flex; gap: 6px; flex-wrap: wrap; }
.social { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); color: #fff !important; transition: background .2s var(--ease), transform .2s var(--ease); }
.social svg { width: 17px; height: 17px; }
.social:hover { background: var(--accent); color: var(--brand-dark) !important; transform: translateY(-2px); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip { padding: 5px 12px; border-radius: 99px; background: rgba(255,255,255,.07); font-size: .82rem; color: #dbe4ef; transition: background .2s var(--ease); }
.tag-chip:hover { background: var(--accent); color: var(--brand-dark) !important; }
.muted-light { color: #8fa1b6; font-size: .85rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); font-size: .82rem; color: #8fa1b6; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }

/* Footer on a light background (chosen in the admin console) */
.footer-light { color: var(--muted); border-top: 1px solid var(--line); }
.footer-light a { color: var(--ink-2); }
.footer-light a:hover { color: var(--accent-ink); }
.footer-light h4 { color: var(--ink); }
.footer-light .social { background: rgba(0,0,0,.06); color: var(--brand) !important; }
.footer-light .tag-chip { background: rgba(0,0,0,.05); color: var(--ink-2); }
.footer-light .footer-bottom { border-top-color: var(--line); color: var(--muted); }
.footer-light .policy-links a, .footer-light .muted-light { color: var(--muted); }
.header-cta { white-space: nowrap; }
@media (max-width: 900px) { .header-cta { display: none; } }

/* Header and footer settings page */
.links-table input:not([type="checkbox"]) { min-height: 38px; padding: 6px 10px; font-size: .9rem; }
.links-table input[name$="order"] { width: 72px; }
.links-table td { vertical-align: top; }
.links-table .errorlist { margin: 4px 0 0; }
.color-field { display: flex; gap: 10px; align-items: center; }
.color-field input[type="color"] { width: 56px; height: 44px; padding: 4px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.swatches button { width: 32px; height: 32px; border-radius: 9px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.logo-on-dark { background: var(--brand-dark); padding: 8px; border-radius: 10px; height: 56px; }

/* Back to top */
.to-top { position: fixed; bottom: 24px; inset-inline-end: 24px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(21,45,70,.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; box-shadow: var(--shadow-2); cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s; z-index: 1200; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--brand); }
.to-top svg { width: 22px; height: 22px; }

/* Header too full for one row (many links, long company name): base.html adds .nav-compact
   and the links move into the burger menu, so the logo and the tools keep their size. */
.topbar.nav-compact .burger { display: grid; }
.topbar.nav-compact .nav { display: none; }
.topbar.nav-compact .tools { margin-inline-start: auto; }
.topbar.nav-compact.nav-open .nav { display: grid; position: absolute; top: var(--header-h); inset-inline: 0; background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: var(--shadow-2); }
.topbar.nav-compact.nav-open .nav a { min-height: 48px; font-size: 1rem; }

/* Responsive */
@media (max-width: 1080px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .container { padding: 0 20px; }
  .g3, .g4 { grid-template-columns: repeat(2, 1fr); }
  .g2, .form-grid, .unit-layout { grid-template-columns: 1fr; }
  .book-card { position: static; }
  .burger { display: grid; }
  .topbar .container { gap: 8px; }
  .logo img { height: min(var(--logo-h, 38px), 34px); }
  .nav { display: none; }
  .tools { margin-inline-start: auto; gap: 4px; }
  .user-chip .chip-name, .user-chip .vtick { display: none; }
  .user-chip .btn-sm { min-height: var(--tap); }
  .topbar.nav-open .nav { display: grid; position: absolute; top: var(--header-h); inset-inline: 0; background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: var(--shadow-2); animation: drop .25s var(--ease); }
  .topbar.nav-open .nav a { min-height: 48px; font-size: 1rem; }
  @keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
  .demo-strip .container { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
  .explore { grid-template-columns: 1fr; grid-template-rows: 46vh auto; height: auto; }
  .explore .side { order: 2; border: 0; }
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-search { grid-template-columns: 1fr 1fr; }
  .hero-search .hs-q, .hero-search .btn { grid-column: 1 / -1; }
  .hero-stats { margin-top: 36px; }
  .hero-stats > div { flex-direction: column; gap: 4px; padding: 16px 0; }
  .hero-stats > div + div { padding-inline-start: 12px; }
  .hero-stats b { font-size: 1.5rem; }
  .hero-stats span { font-size: .78rem; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 44px; }
  .phases { grid-template-columns: 1fr 1fr; }
  .steps::before { display: none; }
  .cta-band { padding: 28px 24px; }
  .console { grid-template-columns: 1fr; }
  .console .sidebar { display: flex; position: static; height: auto; min-height: 0; max-height: none; overflow-x: auto; padding: 8px; gap: 4px; border: 0; border-bottom: 1px solid var(--line); }
  .console .sidebar a { white-space: nowrap; margin: 0; }
  .console .sidebar .label { display: none; }
  .console main { padding: 0 20px 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .policy-layout { grid-template-columns: 1fr; }
  .policy-nav { position: static; }
  .policy-body { padding: 24px; }
  .verify-steps { grid-template-columns: 1fr 1fr; }
  .spec { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .card:has(table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .card table:not(.kv) { min-width: 620px; }
  .card table:not(.kv) th, .card table:not(.kv) td { white-space: nowrap; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .g3, .unit-grid { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .g4 > .card { padding: 16px; }
  .kpi .value { font-size: 1.3rem; }
  .g4.plans-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .phases { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  .card { padding: 18px; border-radius: 16px; }
  .page-head { padding: 24px 0 16px; }
  .page-head > .actions-inline, .page-head > div:last-child:not(:first-child) { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn-sm { min-height: 40px; }
  .lang-btn { padding: 0 8px; }
  .company-meta { text-align: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Onboarding (v12): first-steps checklist and guided tour */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.checklist { margin-bottom: 20px; display: grid; gap: 12px; }
.checklist-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.checklist-head h3 { margin: 0; }
.checklist-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.checklist-items li { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 6px 12px; border-radius: var(--radius-sm); background: var(--fill); font-weight: 600; font-size: .92rem; }
.checklist-items li a { color: var(--ink); flex: 1; }
.checklist-items li a:hover { color: var(--accent-ink); }
.checklist-items .tick { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--brand); font-size: .8rem; font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--line); }
.checklist-items li.done { background: var(--ok-tint); color: var(--ok); }
.checklist-items li.done .tick { background: var(--ok); color: #fff; box-shadow: none; }

.tour-root { position: fixed; inset: 0; z-index: 2000; }
.tour-shade { position: fixed; inset: 0; background: rgba(5,15,28,.55); }
.tour-root.has-target .tour-shade { background: transparent; }
.tour-hole { position: absolute; border-radius: var(--radius-sm); box-shadow: 0 0 0 4px var(--accent), 0 0 0 9999px rgba(5,15,28,.55); pointer-events: none; transition: top .3s var(--ease), left .3s var(--ease), width .3s var(--ease), height .3s var(--ease); }
.tour-pop { position: absolute; width: min(380px, calc(100vw - 32px)); background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-3); padding: 22px; display: grid; gap: 10px; animation: tour-in .25s var(--ease); }
.tour-pop.center { top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 32px)); text-align: center; }
.tour-pop.center .tour-actions { justify-content: center; }
.tour-pop .tour-count { color: var(--accent-ink); font-size: .8rem; font-weight: 800; }
.tour-pop h3 { margin: 0; font-size: 1.15rem; }
.tour-pop p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.tour-dots { display: flex; gap: 6px; justify-content: inherit; }
.tour-pop.center .tour-dots { justify-content: center; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.tour-dots i.on { background: var(--accent); width: 20px; border-radius: 99px; }
.tour-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.tour-actions .tour-skip { margin-inline-end: auto; background: transparent; border: 0; color: var(--muted); font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; min-height: var(--tap); padding: 0 4px; }
.tour-actions .tour-skip:hover { color: var(--ink); }
.tour-pop.center .tour-skip { margin-inline-end: 0; }
.tour-mark { width: 56px; height: 56px; margin: 0 auto 4px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-ink); }
@keyframes tour-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 640px) {
  .tour-pop:not(.center) { position: fixed; left: 16px !important; right: 16px; top: auto !important; bottom: 16px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { .tour-pop { animation: none; } .tour-hole { transition: none; } }

/* Ratings (v14) */
.stars { position: relative; display: inline-block; color: #d6d6dc; font-size: 1.05rem; letter-spacing: 1px; line-height: 1; white-space: nowrap; vertical-align: -1px; }
.stars.sm { font-size: .85rem; }
.stars-fill { position: absolute; inset-block: 0; inset-inline-start: 0; overflow: hidden; color: var(--accent); }
.rating-chip { display: inline-flex; align-items: center; gap: 3px; font-size: .78rem; font-weight: 700; color: var(--accent-ink); }
.rating-link { color: inherit; display: inline-flex; align-items: center; gap: 6px; }
.rating-summary { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin-bottom: 12px; }
.rating-big { text-align: center; min-width: 120px; }
.rating-big .value { font-size: 2.6rem; font-weight: 800; line-height: 1.1; }
.crit { display: grid; grid-template-columns: minmax(110px, 160px) 1fr 32px; gap: 10px; align-items: center; font-size: .86rem; padding: 3px 0; }
.crit .bar { margin: 0; height: 8px; }
.crit .bar i { background: var(--accent); }
.review { border-top: 1px solid var(--line-soft); padding: 14px 0; }
.review-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.review-crit { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.review p { margin: 8px 0 0; white-space: pre-line; }
.owner-reply { margin-top: 10px; padding: 10px 14px; border-inline-start: 3px solid var(--brand); background: var(--fill); border-radius: var(--radius-sm); font-size: .92rem; }
.stars-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-input label { font-size: 2rem; line-height: 1; color: #d6d6dc; cursor: pointer; min-width: 44px; min-height: 44px; display: grid; place-items: center; transition: color .15s var(--ease), transform .15s var(--ease); }
.stars-input input:checked ~ label, .stars-input label:hover, .stars-input label:hover ~ label { color: var(--accent); }
.stars-input input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 10px; }
.star-field { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.star-field .help { color: var(--muted); font-size: .84rem; }
@media (max-width: 640px) {
  .rating-summary { grid-template-columns: 1fr; gap: 12px; }
  .crit { grid-template-columns: 110px 1fr 28px; }
  .stars-input label { min-width: 40px; font-size: 1.8rem; }
}
.g5 .kpi .value { font-size: 1.5rem; }
.tabs a { gap: 6px; }


/* v15 sponsored ads: always labelled, never mixed into organic results */
.sp-tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 6px; font-size: .7rem; font-weight: 800; letter-spacing: .02em; background: var(--accent-tint); color: var(--accent-ink); border: 1px solid rgba(254,137,26,.35); vertical-align: middle; }
.sp-block { padding: 10px; margin-bottom: 14px; border-radius: 18px; background: var(--accent-tint); }
.sp-block .list-item { margin-bottom: 8px; }
.sp-block .list-item.sponsored:hover { border-color: var(--accent); }
.sp-note { padding: 0 4px; }
.pin.sponsored { box-shadow: 0 0 0 4px rgba(254,137,26,.45), 0 3px 10px rgba(0,0,0,.3); width: 38px; height: 38px; }
.featured-co { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 12px; border-radius: 16px; background: var(--card); color: inherit; box-shadow: var(--shadow-1); border: 1px solid rgba(254,137,26,.35); }
.featured-co:hover { color: inherit; box-shadow: var(--shadow-2); }
.featured-co > span { display: flex; flex-direction: column; gap: 2px; }
.featured-co .avatar, .featured-co .company-logo.sm { width: 44px; height: 44px; flex: none; }
.company-logo.sm { border-radius: 12px; object-fit: contain; background: #fff; }
.home-ads { padding: 28px 0 0; }
.home-banner { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 150px; padding: 22px 24px; border-radius: var(--radius); color: #fff; background: linear-gradient(135deg, var(--brand), var(--screen)); box-shadow: var(--shadow-1); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.home-banner.has-img { background: linear-gradient(0deg, rgba(14,31,51,.85), rgba(14,31,51,.2)), var(--banner-img) center / cover no-repeat; }
.home-banner:hover { color: #fff; box-shadow: var(--shadow-2); transform: translateY(-2px); }
.home-banner .sp-tag { position: absolute; top: 14px; inset-inline-start: 16px; background: rgba(255,255,255,.95); border-color: transparent; }
.home-banner .hb-body { display: flex; flex-direction: column; }
.home-banner .hb-body b { font-size: 1.25rem; font-weight: 800; }
.home-banner .hb-by { opacity: .85; }
.ad-thumb { width: 72px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--fill); }
.slot-card .price-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0 12px; }
@media (prefers-reduced-motion: reduce) { .home-banner:hover { transform: none; } }
.featured-co .fc-top { display: flex; gap: 8px; align-items: center; }
.field[hidden] { display: none !important; }

/* Contracts (v16) */
.contract-text { max-height: 460px; overflow-y: auto; padding: 28px 32px; max-width: none; margin-bottom: 14px; }
.contract-text h3:first-child { margin-top: 0; }
.sign-card { border: 1.5px solid var(--accent-tint); }
.sign-card .check-field label { font-weight: 700; }
.sig-status b { display: block; margin: 2px 0 6px; }
.diff { font-size: .88rem; line-height: 1.8; max-height: 420px; overflow-y: auto; }
.diff .d { padding: 1px 8px; border-radius: 4px; white-space: pre-wrap; color: var(--muted); }
.diff .d.add { background: var(--ok-tint); color: #15572c; }
.diff .d.del { background: var(--bad-tint); color: #8d1c1e; text-decoration: line-through; }
@media (max-width: 640px) { .contract-text { padding: 18px; max-height: 380px; } }

/* v17 staff roles, approvals, system log */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 14px; }
.perm-group { display: flex; flex-direction: column; gap: 8px; }
.perm-group > b { font-size: .92rem; color: var(--ink-2); }
.check.perm { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--fill); cursor: pointer; font-size: .9rem; margin-bottom: 6px; }
.check.perm input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.approval { margin-bottom: 12px; }
.approval-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.approval-summary { font-size: 1.02rem; font-weight: 600; margin: 10px 0 14px; }
.audit-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; align-items: end; }
.audit-filters .field { margin-bottom: 12px; }
.audit-filter-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.audit-table td { vertical-align: top; }
.audit-table .before, .before-cell { color: var(--bad); }
.audit-table .after, .after-cell { color: var(--ok); }
.before-cell, .after-cell { word-break: break-word; max-width: 280px; }
tr.row-alert td { background: var(--bad-tint); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.facts dt { color: var(--muted); font-size: .85rem; font-weight: 600; }
.facts dd { margin: 0; word-break: break-word; }
@media (max-width: 900px) {
  .audit-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 760px) {
  .grid[style*="grid-template-columns:minmax"] { grid-template-columns: 1fr !important; }
}

/* Error pages (400/403/404/500) */
.error-page { display: flex; justify-content: center; padding-block: 56px 72px; }
.error-card { width: 100%; max-width: 560px; text-align: center; padding: 40px 28px; }
.error-code { font-size: clamp(3.5rem, 14vw, 6rem); font-weight: 800; line-height: 1; color: var(--accent); letter-spacing: -.02em; margin-bottom: 12px; }
.error-card h1 { margin: 0 0 8px; }
.error-card h2 { margin: 20px 0 6px; font-size: 1.15rem; }
.error-search { display: flex; gap: 8px; margin: 24px 0 16px; }
.error-search input { flex: 1; min-width: 0; min-height: var(--tap); padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; background: var(--card); color: var(--ink); }
.error-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.error-logo { display: inline-flex; align-items: center; min-height: 56px; }

/* v21: list pager on the explore page */
.pager{display:flex;align-items:center;justify-content:center;gap:12px;padding:14px 0 6px}

/* Support tickets and the booking chat (v23) */
.thread { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.thread.chat { max-height: 62vh; overflow-y: auto; }
.bubble { max-width: 82%; padding: 12px 16px; border-radius: 16px; background: var(--fill); align-self: flex-start; }
.bubble.me { align-self: flex-end; background: var(--brand); color: #fff; }
.bubble.me .muted, .bubble.me a { color: rgba(255,255,255,.78); }
.bubble.me .attach { color: #fff; }
.bubble.internal { background: var(--warn-tint); border: 1px dashed var(--warn); max-width: 100%; align-self: stretch; }
.bubble-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; font-size: .9rem; }
.bubble-body { white-space: normal; overflow-wrap: anywhere; line-height: 1.6; }
.bubble .attach { display: inline-block; margin-top: 8px; font-weight: 600; font-size: .9rem; }
.bubble .attach img { max-width: 240px; max-height: 180px; border-radius: 10px; display: block; }
.chat-form textarea { min-height: 70px; margin-bottom: 8px; }
.attach-pick input { display: inline-block; width: auto; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.side-card { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.side-card h3 { margin: 0 0 4px; font-size: 1rem; }
.side-form { display: flex; gap: 6px; }
.side-form select { flex: 1; min-width: 0; }
.row-late td { background: #fff7f7; }
.help-topics .help-topic { display: flex; flex-direction: column; gap: 4px; color: inherit; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.help-topics .help-topic:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); color: inherit; }
.wa-btn { background: #1f9d55; border-color: #1f9d55; color: #fff; gap: 8px; }
.wa-btn:hover { background: #178046; color: #fff; }
.rate-card { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.rate-card input { flex: 1; min-width: 180px; }
.rate-faces { display: flex; gap: 4px; }
.saved-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.saved-row:last-child { border-bottom: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 900px) { .ticket-layout { grid-template-columns: 1fr; } .bubble { max-width: 100%; } }
.nav .nav-help { display: none; }
.topbar.nav-compact .nav .nav-help { display: inline-flex; }
@media (max-width: 900px) { .nav .nav-help { display: inline-flex; } }
@media (max-width: 520px) { .tools .help-btn, .tools .tour-btn, .user-chip .dot { display: none; } }
