/* قرار للاستثمار العقاري — website & dashboard styles (RTL first, mobile first). */
@font-face { font-family: "Plex Arabic"; src: url("../fonts/plex-arabic-regular.19cd56963b15.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("../fonts/plex-arabic-semibold.0ffdbaed8c80.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("../fonts/plex-arabic-bold.ef1e5b9fd44d.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --primary: #12355B; --primary-dark: #0B2340; --primary-soft: #EAF0F6; --primary-line: #C9D6E4;
  --ink: #10213A; --body: #3A4656; --muted: #5B6676; --border: #E3E7ED; --divider: #EEF1F5;
  --field: #F2F4F7; --bg: #FFFFFF; --page: #F7F8FA; --placeholder: #DCE4ED;
  --ok: #1E7A4C; --ok-soft: #E7F4EC; --ok-ink: #1E6B43;
  --warn: #B4540A; --warn-soft: #FFF4E8; --warn-ink: #7A3A0A;
  --bad: #B42318; --bad-soft: #FDECEA;
  --info-soft: #EAF0F6; --info-ink: #12355B;
  --radius: 12px; --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(16,33,58,.06), 0 4px 16px rgba(16,33,58,.06);
  --header-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; font-family: "Plex Arabic", "Segoe UI", Tahoma, sans-serif; font-size: 16px; line-height: 1.75;
  color: var(--ink); background: var(--page); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); }
h2 { font-size: clamp(1.2rem, 1rem + .8vw, 1.55rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid #5B8FD0; outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--primary); color: #fff; padding: 8px 14px;
  border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.4) blur(6px); }
.site-header .bar { height: var(--header-h); display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--primary); display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 22px; height: 22px; }
.brand small { display: block; font-weight: 400; font-size: .72rem; color: var(--muted); line-height: 1.2; }
.main-nav { display: none; gap: 4px; margin-inline-start: 12px; }
.main-nav a { color: var(--body); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .95rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.header-actions .btn { padding: 8px 14px; min-height: 40px; }
.icon-link { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--ink); }
.icon-link:hover { background: var(--field); }
.icon-link svg { width: 22px; height: 22px; }
.dot { position: absolute; top: 4px; inset-inline-end: 4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--bad);
  color: #fff; font-size: .7rem; line-height: 18px; text-align: center; padding: 0 4px; font-weight: 700; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); min-width: 220px; padding: 6px; z-index: 50; }
.menu-panel a, .menu-panel button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: var(--ink); font: inherit; background: none; border: 0; text-align: start; cursor: pointer; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--field); text-decoration: none; }
.menu-panel hr { border: 0; border-top: 1px solid var(--divider); margin: 6px 0; }
.only-desktop { display: none !important; }
@media (min-width: 900px) {
  .main-nav { display: flex; }
  .only-desktop { display: inline-flex !important; }
  .only-mobile { display: none !important; }
}

/* mobile bottom bar (like the app) */
.tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; color: var(--muted);
  font-size: .72rem; font-weight: 600; }
.tabbar a:hover { text-decoration: none; }
.tabbar a[aria-current="page"] { color: var(--primary); }
.tabbar svg { width: 22px; height: 22px; }
.tabbar .add span.plus { width: 40px; height: 40px; margin-top: -18px; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(18,53,91,.35); }
body.has-tabbar { padding-bottom: 72px; }
@media (min-width: 900px) { .tabbar { display: none; } body.has-tabbar { padding-bottom: 0; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px;
  border-radius: var(--radius); border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--primary); color: #fff; text-align: center; line-height: 1.3; }
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn[disabled], .btn.is-busy { opacity: .6; cursor: not-allowed; }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary-line); }
.btn-outline:hover { background: var(--primary-soft); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-ok { background: var(--ok); } .btn-ok:hover { background: #17633d; }
.btn-danger { background: var(--bad); } .btn-danger:hover { background: #8f1c13; }
.btn-danger-outline { background: #fff; color: var(--bad); border-color: #F1B8B2; }
.btn-danger-outline:hover { background: var(--bad-soft); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---------- cards & surfaces ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-title { font-size: 1.05rem; margin-bottom: 12px; }
.section { padding: 32px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.page-head { padding: 24px 0 8px; }
.page-head p { color: var(--muted); margin: 0; }
.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span[aria-hidden] { margin: 0 6px; }

.listings-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.prop-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex;
  flex-direction: column; color: inherit; transition: box-shadow .15s, transform .15s; position: relative; }
.prop-card:hover { box-shadow: var(--shadow); text-decoration: none; transform: translateY(-1px); }
.prop-card .thumb { aspect-ratio: 4 / 3; background: var(--placeholder); position: relative; overflow: hidden; }
.prop-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-empty { width: 100%; height: 100%; display: grid; place-items: center; color: #8696AA; }
.thumb-empty svg { width: 48px; height: 48px; }
.prop-card .tag { position: absolute; top: 10px; inset-inline-start: 10px; }
.prop-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.prop-card .price { font-weight: 700; font-size: 1.12rem; color: var(--primary); }
.prop-card .title { font-weight: 600; color: var(--ink); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.prop-card .place { color: var(--muted); font-size: .88rem; display: flex; gap: 4px; align-items: center; }
.prop-card .facts { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--body); font-size: .85rem; margin-top: auto; padding-top: 8px;
  border-top: 1px solid var(--divider); }
.facts span { display: inline-flex; gap: 4px; align-items: center; }
.facts svg, .place svg { width: 16px; height: 16px; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  line-height: 1.8; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok-ink); }
.badge-warn { background: var(--warn-soft); color: var(--warn-ink); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-info { background: var(--info-soft); color: var(--info-ink); }
.badge-muted { background: var(--field); color: var(--body); }
.badge-sale { background: var(--primary); color: #fff; }
.badge-rent { background: #fff; color: var(--primary); border: 1px solid var(--primary-line); }

.alert { border-radius: var(--radius); padding: 12px 16px; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.alert + .alert { margin-top: 8px; }
.alert-success { background: var(--ok-soft); border-color: #BFE3CD; color: var(--ok-ink); }
.alert-error { background: var(--bad-soft); border-color: #F5C2BC; color: #8f1c13; }
.alert-warning { background: var(--warn-soft); border-color: #F6D3AF; color: var(--warn-ink); }
.alert-info { background: var(--info-soft); border-color: var(--primary-line); color: var(--info-ink); }
.alert p:last-child { margin-bottom: 0; }
.messages { margin: 16px auto 0; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg { width: 56px; height: 56px; color: #9AA8B9; margin: 0 auto 12px; }
.empty h3 { color: var(--ink); }

/* ---------- hero & search ---------- */
.hero { background: linear-gradient(160deg, var(--primary) 0%, #1C4A7A 100%); color: #fff; padding: 40px 0 56px; }
.hero h1 { color: #fff; margin-bottom: 8px; }
.hero p.lead { color: #D6E2EF; font-size: 1.05rem; max-width: 640px; }
.searchbox { background: #fff; border-radius: var(--radius-lg); padding: 16px; box-shadow: 0 10px 30px rgba(11,35,64,.25);
  margin-top: 24px; color: var(--ink); }
.seg { display: inline-flex; background: var(--field); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 12px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 6px 18px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--body); }
.seg input:checked + label { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(16,33,58,.12); }
.seg input:focus-visible + label { outline: 3px solid #5B8FD0; }
.searchbox .fields { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .searchbox .fields { grid-template-columns: 2fr 1fr 1fr auto; } }
.stats-strip { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 20px; color: #D6E2EF; font-size: .92rem; }
.stats-strip strong { color: #fff; font-size: 1.1rem; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: #fff;
  border: 1px solid var(--border); color: var(--ink); font-weight: 600; font-size: .9rem; }
.chip:hover { border-color: var(--primary-line); background: var(--primary-soft); text-decoration: none; }
.chip .count { color: var(--muted); font-weight: 400; }

.steps-how { display: grid; gap: 16px; grid-template-columns: 1fr; counter-reset: how; }
@media (min-width: 720px) { .steps-how { grid-template-columns: repeat(4, 1fr); } }
.steps-how li { list-style: none; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
.steps-how li::before { counter-increment: how; content: counter(how); display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; margin-bottom: 10px; }
.steps-how { padding: 0; margin: 0; }

/* search layout */
.search-layout { display: grid; gap: 20px; grid-template-columns: 1fr; padding-bottom: 32px; }
@media (min-width: 1000px) { .search-layout { grid-template-columns: 300px 1fr; align-items: start; }
  .filters { position: sticky; top: calc(var(--header-h) + 16px); } }
.filters .card { padding: 16px; }
.filters-toggle > summary { list-style: none; }
.filters-toggle > summary::-webkit-details-marker { display: none; }
@media (min-width: 1000px) { .filters-toggle > summary { display: none; } }
.results-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.results-bar .count { color: var(--muted); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-weight: 600; font-size: .93rem; color: var(--ink); }
.field .hint { font-size: .82rem; color: var(--muted); }
.req { color: var(--bad); margin-inline-start: 2px; }
.input, select.input, textarea.input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid #D5DBE3; border-radius: var(--radius);
  font: inherit; color: var(--ink); background: #fff; }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.7; }
.input:focus { border-color: var(--primary); outline: 2px solid rgba(18,53,91,.15); outline-offset: 0; }
.input[aria-invalid="true"], .has-error .input { border-color: var(--bad); }
.errorlist, .field-error { color: var(--bad); font-size: .85rem; margin: 0; padding: 0; list-style: none; }
.input-ltr { direction: ltr; text-align: right; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; background: var(--field); border: 1px solid #D5DBE3;
  border-inline-start: 0; border-start-end-radius: var(--radius); border-end-end-radius: var(--radius); color: var(--muted); font-size: .9rem; white-space: nowrap; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 6px 0; }
.check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--primary); flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice label { display: flex; flex-direction: column; gap: 2px; border: 1px solid #D5DBE3; border-radius: var(--radius); padding: 12px 14px;
  cursor: pointer; background: #fff; height: 100%; }
.choice label small { color: var(--muted); font-weight: 400; }
.choice input:checked + label { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.choice input:focus-visible + label { outline: 3px solid #5B8FD0; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
legend { font-weight: 600; font-size: .93rem; margin-bottom: 6px; padding: 0; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-top: 20px;
  padding-top: 16px; border-top: 1px solid var(--divider); }
.form-actions .grow { flex: 1; }
.auth-wrap { max-width: 460px; margin: 32px auto; }
.auth-wrap .card { padding: 24px; }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 18px 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.code-input { letter-spacing: .5em; font-size: 1.4rem; text-align: center; direction: ltr; font-weight: 700; }

/* stepper */
.stepper { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 12px; margin-bottom: 8px; scrollbar-width: thin; }
.stepper a, .stepper span { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 14px; border-radius: 999px;
  font-size: .85rem; font-weight: 600; color: var(--muted); background: #fff; border: 1px solid var(--border); }
.stepper .n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--field); font-size: .75rem; }
.stepper .current { color: var(--primary); border-color: var(--primary); }
.stepper .current .n { background: var(--primary); color: #fff; }
.stepper .done .n { background: var(--ok); color: #fff; }
.stepper a:hover { text-decoration: none; border-color: var(--primary-line); }
.progress-line { height: 6px; background: var(--field); border-radius: 3px; overflow: hidden; margin-bottom: 18px; }
progress.progress-line { -webkit-appearance: none; appearance: none; width: 100%; border: 0; display: block; }
progress.progress-line::-webkit-progress-bar { background: var(--field); border-radius: 3px; }
progress.progress-line::-webkit-progress-value { background: var(--primary); border-radius: 3px; }
progress.progress-line::-moz-progress-bar { background: var(--primary); border-radius: 3px; }

/* timeline (payment) */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
.timeline li { text-align: center; font-size: .82rem; color: var(--muted); position: relative; padding-top: 34px; }
.timeline li::before { content: ""; position: absolute; top: 6px; inset-inline-start: 50%; transform: translateX(50%); width: 22px; height: 22px;
  border-radius: 50%; background: #fff; border: 2px solid var(--border); }
.timeline li.done::before { background: var(--ok); border-color: var(--ok); }
.timeline li.current::before { border-color: var(--primary); background: var(--primary-soft); }
.timeline li.current { color: var(--primary); font-weight: 600; }
.timeline li.done { color: var(--ok-ink); }

/* definition lists */
.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 0; margin: 0; }
.kv dt, .kv dd { padding: 10px 0; border-bottom: 1px solid var(--divider); margin: 0; }
.kv dt { color: var(--muted); font-size: .92rem; }
.kv dd { font-weight: 600; }
.kv > :nth-last-child(-n+2) { border-bottom: 0; }
.copy-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copy-btn { font-size: .8rem; }

/* ---------- property detail ---------- */
.detail-layout { display: grid; gap: 24px; grid-template-columns: 1fr; padding-bottom: 40px; }
@media (min-width: 1000px) { .detail-layout { grid-template-columns: 1fr 360px; align-items: start; }
  .detail-aside { position: sticky; top: calc(var(--header-h) + 16px); } }
.gallery { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.gallery-main { aspect-ratio: 16 / 10; background: var(--placeholder); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; scroll-snap-type: x mandatory; }
.gallery-thumbs button { flex: none; width: 88px; height: 66px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden;
  cursor: pointer; background: var(--placeholder); scroll-snap-align: start; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--primary); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.price-big { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 700; color: var(--primary); line-height: 1.3; }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.fact { background: var(--field); border-radius: var(--radius); padding: 10px 12px; }
.fact .k { display: block; font-size: .8rem; color: var(--muted); }
.fact .v { font-weight: 700; }
.features { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.features li { background: var(--ok-soft); color: var(--ok-ink); border-radius: 999px; padding: 4px 12px; font-size: .88rem; font-weight: 600; }
.contact-card .btn { width: 100%; }
.contact-card .btn + .btn { margin-top: 8px; }
.btn-whatsapp { background: #1E7A4C; } .btn-whatsapp:hover { background: #17633d; }
.map-frame { width: 100%; aspect-ratio: 16 / 10; max-height: 340px; border: 0; border-radius: var(--radius); background: var(--placeholder); }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.notice-box { background: var(--warn-soft); border: 1px solid #F6D3AF; color: var(--warn-ink); border-radius: var(--radius); padding: 12px 14px; font-size: .9rem; }
.table-simple { width: 100%; border-collapse: collapse; }
.table-simple th, .table-simple td { text-align: start; padding: 8px 0; border-bottom: 1px solid var(--divider); }
.description { white-space: pre-line; color: var(--body); }

/* ---------- account ---------- */
.account-layout { display: grid; gap: 20px; grid-template-columns: 1fr; padding-block: 24px 40px; }
@media (min-width: 900px) { .account-layout { grid-template-columns: 240px 1fr; align-items: start; } }
.side-nav { display: flex; gap: 6px; overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 6px; }
@media (min-width: 900px) { .side-nav { flex-direction: column; position: sticky; top: calc(var(--header-h) + 16px); } }
.side-nav a { flex: none; padding: 10px 14px; border-radius: 10px; color: var(--body); font-weight: 600; white-space: nowrap; }
.side-nav a:hover { background: var(--field); text-decoration: none; }
.side-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
.list-item { display: grid; gap: 12px; grid-template-columns: 96px 1fr; align-items: start; padding: 14px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-lg); }
.list-item + .list-item { margin-top: 12px; }
.list-item .thumb { width: 96px; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: var(--placeholder); }
.list-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-item .actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--divider); padding-top: 12px; }
@media (min-width: 720px) { .list-item { grid-template-columns: 128px 1fr auto; } .list-item .thumb { width: 128px; }
  .list-item .actions { grid-column: auto; border: 0; padding: 0; flex-direction: column; align-items: stretch; min-width: 150px; } }
.notif { padding: 14px 16px; border-bottom: 1px solid var(--divider); }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: #F5F8FC; }
.notif .when { font-size: .8rem; color: var(--muted); }
.inline-confirm > summary { list-style: none; cursor: pointer; }
.inline-confirm > summary::-webkit-details-marker { display: none; }
.inline-confirm[open] > summary { margin-bottom: 8px; }
.confirm-box { border: 1px solid #F5C2BC; background: var(--bad-soft); border-radius: var(--radius); padding: 12px; }

/* photos manager */
.photo-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.photo { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.photo.primary { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.photo .img { aspect-ratio: 4 / 3; background: var(--placeholder); position: relative; }
.photo .img img { width: 100%; height: 100%; object-fit: cover; }
.photo .img .badge { position: absolute; top: 8px; inset-inline-start: 8px; }
.photo .tools { display: flex; gap: 4px; padding: 8px; flex-wrap: wrap; }
.photo .tools form { display: contents; }
.dropzone { border: 2px dashed var(--primary-line); border-radius: var(--radius-lg); padding: 24px; text-align: center; background: #FAFCFE; }
.dropzone.drag { background: var(--primary-soft); border-color: var(--primary); }
.previews { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.previews img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; }

.floor-rows .floor-row { display: grid; gap: 8px; grid-template-columns: 90px 1fr 1fr; align-items: end; margin-bottom: 8px; }
.review-list { list-style: none; padding: 0; margin: 0; }
.review-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--divider); }

/* pagination */
.pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 24px 0 8px; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 10px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff; color: var(--ink); font-weight: 600; }
.pagination a:hover { border-color: var(--primary-line); text-decoration: none; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .gap { border: 0; background: none; }

/* footer */
.site-footer { background: var(--primary-dark); color: #C2CFDE; padding: 32px 0 24px; margin-top: 24px; font-size: .92rem; }
.site-footer a { color: #E4ECF5; }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .site-footer .cols { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 24px; padding-top: 16px; font-size: .82rem; }

/* text pages */
.prose { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 32px); }
.prose p { color: var(--body); }

/* loading indicator for slow networks */
.top-loader { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 60; background: var(--primary); transform-origin: right;
  transform: scaleX(0); transition: transform .4s ease; }
.top-loader.on { transform: scaleX(.8); transition: transform 8s cubic-bezier(.1,.6,.2,1); }
.offline-banner { position: fixed; bottom: 80px; inset-inline: 16px; z-index: 70; background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: 10px 14px; text-align: center; font-size: .9rem; display: none; }
.offline-banner.show { display: block; }
@media (min-width: 900px) { .offline-banner { bottom: 16px; inset-inline: auto 16px; } }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - var(--header-h)); }
@media (min-width: 1000px) { .dash { grid-template-columns: 240px 1fr; } }
.dash-nav { background: var(--primary-dark); padding: 12px; display: flex; gap: 4px; overflow-x: auto; }
@media (min-width: 1000px) { .dash-nav { flex-direction: column; overflow: visible; padding: 16px 12px; } }
.dash-nav a { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #C9D6E4; padding: 10px 12px;
  border-radius: 10px; font-weight: 600; font-size: .93rem; white-space: nowrap; }
.dash-nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.dash-nav a[aria-current="page"] { background: rgba(255,255,255,.14); color: #fff; }
.dash-nav .pill { background: #F4B740; color: var(--primary-dark); border-radius: 999px; font-size: .72rem; padding: 0 8px; line-height: 20px; }
.dash-main { padding: 20px 16px 40px; min-width: 0; }
@media (min-width: 1000px) { .dash-main { padding: 28px 32px 48px; } }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.kpi .k { color: var(--muted); font-size: .85rem; }
.kpi .v { font-size: 1.6rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.kpi a.v:hover { text-decoration: none; color: var(--primary); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 720px; }
.table th { text-align: start; font-weight: 600; color: var(--muted); background: #FAFBFC; padding: 10px 12px; border-bottom: 1px solid var(--border);
  white-space: nowrap; font-size: .82rem; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--divider); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #FAFCFE; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filter-bar .field { margin: 0; min-width: 150px; flex: 1; }
.filter-bar .field.grow { flex: 3; min-width: 220px; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 56px; gap: 10px; align-items: center; font-size: .9rem; }
.bar-row meter { width: 100%; height: 14px; }
meter::-webkit-meter-bar { background: var(--field); border: 0; border-radius: 7px; height: 14px; }
meter::-webkit-meter-optimum-value { background: var(--primary); border-radius: 7px; }
meter:-moz-meter-optimum::-moz-meter-bar { background: var(--primary); border-radius: 7px; }
.receipt-frame { width: 100%; min-height: 420px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--field); }
.receipt-img { max-height: 640px; object-fit: contain; width: 100%; background: var(--field); border-radius: var(--radius); }
.flags { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.flags li { background: var(--warn-soft); color: var(--warn-ink); border-radius: 10px; padding: 8px 12px; font-size: .9rem; font-weight: 600; }
.trail { list-style: none; padding: 0; margin: 0; }
.trail li { padding: 8px 0; border-bottom: 1px solid var(--divider); font-size: .9rem; }
.trail li:last-child { border-bottom: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--body); font-weight: 600; font-size: .9rem; }
.tabs a[aria-current="page"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.tabs a:hover { text-decoration: none; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; direction: ltr; unicode-bidi: isolate; font-size: .88rem; }
details.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); }
details.panel > summary { padding: 14px 18px; cursor: pointer; font-weight: 700; }
details.panel > div { padding: 0 18px 18px; }
.secret-once { background: var(--warn-soft); border: 1px dashed var(--warn); border-radius: var(--radius); padding: 14px; }

@media print {
  .site-header, .tabbar, .site-footer, .dash-nav, .btn, form { display: none !important; }
  body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.menu-name { padding: 6px 12px; }
.card-flush { padding: 0; overflow: hidden; }
.kpi .k, .kpi .v { display: block; } a.kpi { color: inherit; } a.kpi:hover { border-color: var(--primary-line); text-decoration: none; }
.mt-20 { margin-top: 20px; }
.ok-icon { color: var(--ok) !important; } .row.center { justify-content: center; }
/* vertical rhythm in single-column pages */
.narrow > .card, .narrow > .alert, .narrow > ol, .narrow > form, .narrow > details, .narrow > .photo-grid, .narrow > .row,
.dash-main .stack > form.card { margin-bottom: 16px; }
.narrow > .card + .card { margin-top: 0; }
.account-layout .card, .account-layout .alert, .account-layout .kpis { margin-bottom: 16px; }
.account-layout .card + .card { margin-top: 0; }
.narrow { padding-bottom: 32px; }
.results-bar form { flex-wrap: nowrap; gap: 8px; }
.results-bar select.input { width: auto; min-height: 38px; padding-block: 4px; }
[hidden] { display: none !important; }
main > .container.narrow:first-child > .card:first-child { margin-top: 28px; }
.quick-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
@media (min-width: 900px) { .quick-contact { display: none !important; } }
