/* Built by build.mjs from src/styles/admin/ — edit the section files, not this one. */
/* The type, served from this site. Google's servers are not on the path any more, so the
   faces arrive with the page, and font-display: block means a fallback face is never painted
   in their place. The subsets carry unicode-range, so the Arabic files load only for Arabic. */
@font-face { font-family: "Amiri"; font-style: normal; font-weight: 400; font-display: block; src: url("fonts/amiri-400-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "Amiri"; font-style: normal; font-weight: 400; font-display: block; src: url("fonts/amiri-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: block; src: url("fonts/plex-arabic-400-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: block; src: url("fonts/plex-arabic-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 500; font-display: block; src: url("fonts/plex-arabic-500-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 500; font-display: block; src: url("fonts/plex-arabic-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 400 500; font-display: block; src: url("fonts/libre-franklin-400-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Marcellus"; font-style: normal; font-weight: 400; font-display: block; src: url("fonts/marcellus-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* =====================================================================
   Cedar Hills — admin panel
   The same type and hairline system as the public site, at working density.
   Every section is a bordered card with its own header strip; every input
   is a box with a border on all four sides; English and Arabic sit side by
   side with a rule between them. Monochrome, one bronze accent, radius 0.
   ===================================================================== */

:root {
  /* the same linen as the site; cards and fields sit lighter on it, like paper on a desk */
  --ground: #ebe4d6;
  --field: #f7f3ec;
  --surface: #dfd6c4;
  --surface-2: #d7ccb8;
  --ink: #141414;
  --ink-muted: #5c5750;
  --hairline: #cdc3b0;
  --line: #bdb19c;
  --accent: #74561f;
  --danger: #8c2f2a;

  --font-display: "Marcellus", "Trajan Pro", "Cochin", Georgia, serif;
  --font-sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Noto Sans Arabic", sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --gutter: clamp(16px, 2.5vw, 32px);
  --bar-h: 60px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); color: var(--ink); -webkit-text-size-adjust: 100%; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
/* the page behind an open drawer, picker or dialog stays where it is; the gutter is kept so nothing shifts */
html.locked { overflow: hidden; }
@media (pointer: fine) { html { scrollbar-gutter: stable; } }
body { margin: 0; min-height: 100vh; font-family: var(--font-sans); font-size: 15px; line-height: 1.5; background: var(--ground); color: var(--ink); font-variant-ligatures: no-common-ligatures no-discretionary-ligatures no-contextual; font-feature-settings: "liga" 0, "clig" 0, "dlig" 0, "calt" 0; }
/* Arabic keeps its joined forms */
.f.ar > label, .f.ar input, .f.ar textarea, .f.ar .hint, [dir="rtl"], [lang="ar"] { font-variant-ligatures: normal; font-feature-settings: normal; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 0; }
p, h1, h2, h3, h4, figure, ul, ol, dl, dd, fieldset { margin: 0; }
h1, h2, h3, h4 { font-weight: 400; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
svg { display: block; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.display { font-family: var(--font-display); font-weight: 400; }
.label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; }
.muted { color: var(--ink-muted); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.wrap { width: min(100% - 2 * var(--gutter), 1280px); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 var(--s5); background: var(--ink); color: #fff; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; transition: background-color 180ms ease, opacity 180ms ease; }
.btn:hover { background: #2b2b2b; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px currentColor; }
.btn-danger:hover { background: transparent; color: #6f241f; }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #6f241f; }
.btn-sm { min-height: 32px; padding: 0 var(--s3); font-size: 11px; }
.link { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-color: var(--hairline); padding-block: 4px; }
.link:hover { text-decoration-color: currentColor; }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 30; background: var(--ground); border-bottom: 1px solid var(--line); }
.bar-inner { height: var(--bar-h); display: flex; align-items: center; gap: var(--s5); }
.bar .mark { font-family: var(--font-display); font-size: 18px; letter-spacing: 0.16em; white-space: nowrap; }
.bar .mark span { color: var(--ink-muted); letter-spacing: 0.08em; font-family: var(--font-sans); font-size: 11px; text-transform: uppercase; margin-inline-start: 10px; }
.tabs { display: flex; gap: var(--s5); margin-inline-start: var(--s5); }
.tabs button { position: relative; padding-block: 20px; font-size: 13px; color: var(--ink-muted); }
.tabs button::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 2px; background: var(--ink); transform: scaleX(0); transition: transform 220ms var(--ease); }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.tabs .dot { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; margin-inline-start: 6px; padding: 0 5px; background: var(--accent); color: #fff; font-size: 11px; text-align: center; font-variant-numeric: tabular-nums; }
/* a bronze square on a tab means it holds edits that are not published yet */
.tabs .unsaved { display: inline-block; width: 7px; height: 7px; margin-inline-start: 7px; background: var(--accent); vertical-align: middle; }
.bar-end { margin-inline-start: auto; display: flex; align-items: center; gap: var(--s4); }

/* ---------- views ---------- */
.view { padding-block: var(--s7) var(--s8); }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4) var(--s6); flex-wrap: wrap; padding-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.view-head h2 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); line-height: 1.1; }
.view-head .sub { color: var(--ink-muted); font-size: 14px; margin-top: 6px; max-width: 70ch; }
.view-actions { display: flex; gap: var(--s3); flex-wrap: wrap; }

/* ---------- cards ----------
   Each section sits in its own box: a tinted header strip that names it and says what it
   is for, then the body. Two cards never run into each other. */
.card { margin-top: var(--s6); border: 1px solid var(--line); background: var(--field); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4) var(--s6); padding: var(--s4) var(--s5); background: var(--surface); border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; line-height: 1.4; }
.card-head .sub { font-size: 13px; color: var(--ink-muted); margin-top: 4px; max-width: 70ch; line-height: 1.5; }
.card-actions { display: flex; gap: var(--s2); flex-wrap: wrap; flex: 0 0 auto; }
.card-body { padding: var(--s5); }
.card-body.flush { padding: 0; }
.card-body > .f:last-child, .card-body > .grid-2:last-child > .f { margin-bottom: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); margin-top: var(--s6); }
.two-col .card { margin-top: 0; }
.note { font-size: 13px; line-height: 1.6; }
.note.pad { padding: var(--s4) var(--s5); }
.gap { margin-top: 6px; }
.push { margin-inline-start: auto; }

/* ---------- sign in ---------- */
.signin { min-height: 100vh; display: grid; place-items: center; padding: var(--s6); }
.signin-inner { width: min(100%, 360px); }
.signin .mark { font-family: var(--font-display); font-size: 26px; letter-spacing: 0.18em; text-align: center; }
.signin .sub { text-align: center; color: var(--ink-muted); font-size: 13px; margin-top: var(--s2); }
.signin form { margin-top: var(--s7); }
.signin .btn { width: 100%; margin-top: var(--s5); min-height: 46px; }
.notice { margin-top: var(--s5); padding: var(--s4); background: var(--surface); font-size: 13px; line-height: 1.6; border-inline-start: 2px solid var(--accent); }
.notice code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--ground); padding: 1px 5px; }
.err { color: var(--danger); font-size: 13px; margin-top: var(--s3); min-height: 1.2em; }

/* ---------- fields ----------
   A box with a border on all four sides, its name above, a hint below. Arabic fields are
   right-to-left in the Arabic face. */
.f { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s5); min-width: 0; }
.f > label, .f > .lab { font-size: 12px; color: var(--ink-muted); letter-spacing: 0.04em; }
.f input, .f select, .f textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 0; padding: 10px 12px; min-height: 44px; width: 100%; -webkit-appearance: none; appearance: none; transition: border-color 180ms ease, box-shadow 180ms ease; }
.f input:hover, .f select:hover, .f textarea:hover { border-color: #b9b2a3; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.f input::placeholder, .f textarea::placeholder { color: #a8a195; }
.f textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.f select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23141414' stroke-width='1.5'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 11px; padding-inline-end: 34px; cursor: pointer; }
.f .hint { font-size: 12px; color: var(--ink-muted); line-height: 1.5; }
.f.ar > label, .f.ar .hint { direction: rtl; text-align: right; font-family: var(--font-arabic); }
.f.ar input, .f.ar textarea { font-family: var(--font-arabic); direction: rtl; text-align: right; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 var(--s5); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 var(--s5); }
/* an English / Arabic pair: a rule down the middle */
.pair { gap: 0; }
.pair > .f:first-child { padding-inline-end: var(--s5); border-inline-end: 1px solid var(--hairline); }
.pair > .f:last-child { padding-inline-start: var(--s5); }
.f-check { margin-bottom: var(--s5); }
.check { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; color: var(--ink); padding: 10px 14px; border: 1px solid var(--line); background: var(--field); transition: border-color 180ms ease; }
.check:hover { border-color: #b9b2a3; }
.check input { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }
.check:has(input:checked) { border-color: var(--ink); }

/* ---------- overview ---------- */
.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: var(--s6); background: var(--line); border: 1px solid var(--line); }
.figure { background: var(--field); padding: var(--s5); }
.figure .k { font-size: 12px; color: var(--ink-muted); letter-spacing: 0.04em; }
.figure .v { font-family: var(--font-display); font-size: 40px; line-height: 1.05; margin-top: var(--s3); font-variant-numeric: tabular-nums; }
.figure .n { font-size: 12px; color: var(--ink-muted); margin-top: 4px; }
.figure.hot .v { color: var(--accent); }
.chart svg { width: 100%; height: 160px; overflow: visible; }
.chart .bar { fill: var(--ink); transition: fill 150ms ease; }
.chart .bar:hover { fill: var(--accent); }
.chart .zero { fill: var(--hairline); }
.chart-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-muted); margin-top: var(--s2); font-variant-numeric: tabular-nums; }
.rank li { display: flex; align-items: baseline; gap: var(--s4); padding: 11px var(--s5); border-bottom: 1px solid var(--hairline); font-size: 14px; }
.rank li:last-child { border-bottom: 0; }
.rank .n { margin-inline-start: auto; font-variant-numeric: tabular-nums; color: var(--ink-muted); white-space: nowrap; }
.rank .track { position: relative; flex: 1 1 auto; height: 1px; background: var(--hairline); }
.rank .track i { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--ink); height: 1px; }

/* ---------- requests ---------- */
.filters { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; margin-top: var(--s5); }
.chip { min-height: 34px; padding: 0 var(--s4); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); box-shadow: inset 0 0 0 1px var(--line); transition: background-color 150ms ease, color 150ms ease; }
.chip:hover { color: var(--ink); background: var(--surface); }
.chip[aria-pressed="true"] { color: var(--ground); background: var(--ink); box-shadow: none; }
.search { margin-inline-start: auto; min-width: 240px; }
.search input { font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--field); padding: 8px 12px; min-height: 36px; width: 100%; -webkit-appearance: none; appearance: none; border-radius: 0; }
.search input:focus { outline: none; border-color: var(--ink); }

.tbl { font-size: 14px; }
.tbl th { text-align: start; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: var(--s4); border-bottom: 1px solid var(--hairline); vertical-align: top; }
.tbl th:first-child, .tbl td:first-child { padding-inline-start: var(--s5); }
.tbl th:last-child, .tbl td:last-child { padding-inline-end: var(--s5); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.is-new td { background: #e9dfcb; }
.tbl tr.is-deleted td { opacity: 0.6; }
.tbl .who { font-family: var(--font-display); font-size: 18px; }
.tbl .tel { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .msg { color: var(--ink-muted); max-width: 34ch; }
.tbl .when { color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .row-actions { display: flex; gap: var(--s2); justify-content: flex-end; flex-wrap: wrap; }
.state { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.state.new { color: var(--accent); }
.state.contacted { color: var(--ink); }
.state.done { color: var(--ink-muted); }
.state.deleted { color: var(--danger); }
.empty { padding: var(--s7) var(--s5); text-align: center; color: var(--ink-muted); }

/* ---------- villas ---------- */
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); padding: 9px var(--s5); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); background: var(--surface-2); border-block: 1px solid var(--hairline); }
.group-head:first-child { border-top: 0; }
.group-head .n { color: var(--ink-muted); letter-spacing: 0.04em; text-transform: none; font-size: 12px; }
.group-head.warn { color: var(--danger); background: #fbf1f0; }
.villa-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: var(--s5); align-items: center; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--hairline); }
.villa-row:last-child { border-bottom: 0; }
.villa-row:hover { background: var(--surface); }
.villa-row .thumb { width: 96px; aspect-ratio: 3 / 2; background: var(--surface); position: relative; overflow: hidden; outline: 1px solid var(--hairline); }
.villa-row .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.villa-row h4 { font-family: var(--font-display); font-size: 20px; }
.villa-row .meta { font-size: 13px; color: var(--ink-muted); margin-top: 3px; }
.villa-row .price { font-variant-numeric: tabular-nums; font-size: 14px; margin-top: 4px; }
.villa-row .acts { display: flex; gap: var(--s2); align-items: center; }
.villa-row.is-off .thumb, .villa-row.is-off h4, .villa-row.is-off .meta, .villa-row.is-off .price { opacity: 0.45; }
.contact-block { padding: var(--s4) 0 0; border-top: 1px solid var(--hairline); }
.contact-block:first-child { border-top: 0; padding-top: 0; }
.contact-block .acts { display: flex; gap: var(--s2); padding-top: 6px; }
.contacts > .btn { margin: var(--s2) 0 var(--s5); }
.one-pic .lab .muted { font-size: 11px; }

/* ---------- on the home page: the chosen list, and the search that adds to it ---------- */
.chosen { border: 1px solid var(--line); }
.chosen-row { display: grid; grid-template-columns: 26px 72px minmax(0, 1fr) auto; gap: var(--s4); align-items: center; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--hairline); }
.chosen-row:last-child { border-bottom: 0; }
.chosen-row .thumb { width: 72px; aspect-ratio: 3 / 2; background: var(--surface); position: relative; overflow: hidden; outline: 1px solid var(--hairline); }
.chosen-row .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chosen-row h4 { font-family: var(--font-display); font-size: 18px; }
.chosen-row .meta { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.chosen-row .acts { display: flex; gap: var(--s2); }
.ord-n { width: 22px; height: 22px; line-height: 22px; text-align: center; background: var(--ink); color: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
.find { position: relative; margin-top: var(--s4); display: flex; align-items: center; border: 1px dashed var(--line); background: var(--field); transition: border-color 180ms ease; }
.find:focus-within { border-style: solid; border-color: var(--ink); }
.find-icon { width: 44px; text-align: center; font-size: 22px; line-height: 1; color: var(--ink-muted); }
.find-input { flex: 1 1 auto; font: inherit; font-size: 15px; border: 0; background: transparent; min-height: 46px; padding: 0 12px 0 0; min-width: 0; -webkit-appearance: none; appearance: none; border-radius: 0; }
.find-input:focus { outline: none; }
.find-input:disabled { color: var(--ink-muted); }
.find-list { position: absolute; top: calc(100% + 1px); left: -1px; right: -1px; z-index: 15; background: var(--field); border: 1px solid var(--ink); max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.find-list button { display: flex; align-items: center; gap: var(--s4); width: 100%; padding: 8px 12px; text-align: start; border-bottom: 1px solid var(--hairline); }
.find-list li:last-child button { border-bottom: 0; }
.find-list button:hover, .find-list button:focus-visible { background: var(--surface); outline: none; }
.find-list .thumb { width: 56px; aspect-ratio: 3 / 2; background: var(--surface); position: relative; overflow: hidden; flex: 0 0 auto; }
.find-list .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.find-list .grow { flex: 1 1 auto; display: grid; gap: 1px; min-width: 0; }
.find-list .meta { font-size: 12px; color: var(--ink-muted); }
.find-list .add { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.find-empty { padding: var(--s4); color: var(--ink-muted); font-size: 13px; }
.pick-list { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.pick { display: inline-flex; align-items: center; gap: 8px; padding: 8px var(--s4); border: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.pick.is-on { border-color: var(--ink); background: var(--surface); }
.pick input { margin: 0; accent-color: var(--ink); }

/* ---------- the texts tab ---------- */
.text-item + .text-item { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--hairline); }
.text-label { font-size: 13px; margin-bottom: var(--s2); }
.text-label .muted { font-size: 12px; }
.text-item .f { margin-bottom: 0; }
.f input::placeholder, .f textarea::placeholder { color: #a39c8e; }

/* ---------- the announcement preview ---------- */
.preview .note { margin-bottom: var(--s4); }
.band { display: flex; align-items: baseline; gap: 8px 20px; flex-wrap: wrap; padding: 14px 20px; background: var(--surface); border: 1px solid var(--hairline); font-size: 15px; line-height: 1.55; transition: opacity 200ms ease; }
.band + .band { margin-top: var(--s3); }
.band[dir="rtl"] { font-family: var(--font-arabic); }
.band-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 500; white-space: nowrap; }
.band[dir="rtl"] .band-label { letter-spacing: 0; text-transform: none; font-size: 13px; }
.band-text { flex: 1 1 18rem; }
.band-text.is-empty { color: #a8a195; }
.band-more { text-decoration: underline; text-underline-offset: 0.28em; text-decoration-color: var(--line); white-space: nowrap; }
.preview.is-off .band { opacity: 0.4; }

/* ---------- payment plan ---------- */
.pay-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: var(--s4); align-items: start; padding: var(--s4) 0; border-bottom: 1px solid var(--hairline); }
.pay-row:first-child { padding-top: 0; }
.pay-row .f { margin-bottom: 0; }
.pay-n { font-family: var(--font-display); font-size: 18px; color: var(--accent); padding-top: 30px; }
.pay-acts { display: flex; gap: var(--s2); padding-top: 26px; }
.steps > .btn { margin-top: var(--s4); margin-bottom: var(--s5); }
.note-pair { padding-top: var(--s4); border-top: 1px solid var(--hairline); }
.hint.gap-b { margin-bottom: var(--s4); font-size: 12px; color: var(--ink-muted); line-height: 1.5; }
.editor-body .pay-row:first-child { padding-top: 0; }
.phase-row { align-items: end; }
.one-pic { display: flex; align-items: center; gap: var(--s5); padding-block: var(--s3); border-bottom: 1px solid var(--hairline); }
.one-pic:last-child { border-bottom: 0; }
.one-pic .lab { font-size: 12px; color: var(--ink-muted); flex: 0 0 120px; }

/* ---------- passkeys ---------- */
.pk-gate { margin-top: var(--s7); }
.pk-gate .btn { width: 100%; min-height: 48px; }
.pk-gate .hint { font-size: 13px; color: var(--ink-muted); margin-top: var(--s4); text-align: center; line-height: 1.6; }
.pk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s5); align-items: center; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--hairline); }
.pk-row:last-child { border-bottom: 0; }
.pk-row h4 { font-family: var(--font-display); font-size: 20px; }
.pk-row .meta { font-size: 13px; color: var(--ink-muted); margin-top: 3px; }

/* ---------- editors (the drawer) ---------- */
.editor { position: fixed; inset: 0; z-index: 60; background: rgba(20, 20, 20, 0.32); display: grid; justify-items: end; opacity: 0; transition: opacity 240ms ease; }
.editor.open { opacity: 1; }
.editor-panel { width: min(760px, 100%); height: 100%; background: var(--surface); overflow-y: auto; overscroll-behavior: contain; transform: translateX(24px); transition: transform 320ms var(--ease); }
.editor.open .editor-panel { transform: none; }
.editor-bar { position: sticky; top: 0; z-index: 2; background: var(--ground); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: var(--s4); padding: 0 var(--s6); height: var(--bar-h); }
.editor-bar h3 { font-family: var(--font-display); font-size: 22px; margin-inline-end: auto; }
.editor-body { padding: var(--s5) var(--s6) var(--s8); }
/* each group of fields is its own box, named in the border */
.editor-body fieldset { border: 1px solid var(--line); background: var(--field); padding: var(--s4) var(--s5) var(--s2); }
.editor-body fieldset + fieldset { margin-top: var(--s5); }
.editor-body legend { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); font-weight: 500; padding: 0 8px; margin-inline-start: -8px; }
.editor-body .f { margin-bottom: var(--s4); }
.editor-body .hint + .pics { margin-top: var(--s3); }

.pics { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s3); margin-bottom: var(--s3); }
.pic { position: relative; width: 104px; }
.pic .shot { width: 104px; aspect-ratio: 3 / 2; background: var(--surface); position: relative; overflow: hidden; outline: 1px solid var(--line); }
.pic .shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pic .x { position: absolute; top: 2px; inset-inline-end: 2px; width: 22px; height: 22px; background: var(--field); color: var(--ink); display: grid; place-items: center; font-size: 14px; line-height: 1; outline: 1px solid var(--line); }
.pic .x:hover { background: var(--ink); color: var(--ground); }
.pic .ord { display: flex; justify-content: space-between; margin-top: 3px; }
.pic .ord button { font-size: 14px; color: var(--ink-muted); padding: 2px 6px; }
.pic .ord button:hover { color: var(--ink); }
.pic-add { width: 104px; aspect-ratio: 3 / 2; display: grid; place-items: center; border: 1px dashed var(--line); color: var(--ink-muted); font-size: 12px; text-align: center; line-height: 1.3; }
.pic-add:hover { background: var(--surface); color: var(--ink); border-style: solid; }

.picker { position: fixed; inset: 0; z-index: 70; background: rgba(20, 20, 20, 0.4); display: grid; place-items: center; padding: var(--s5); }
.picker-inner { background: var(--field); width: min(860px, 100%); max-height: 86vh; overflow-y: auto; overscroll-behavior: contain; padding: var(--s6); border: 1px solid var(--line); }
.picker h3 { font-family: var(--font-display); font-size: 24px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s4); margin-top: var(--s5); }
.picker-grid button { text-align: start; }
.picker-grid .shot { aspect-ratio: 3 / 2; background: var(--surface); position: relative; overflow: hidden; outline: 1px solid var(--line); transition: outline-color 150ms ease; }
.picker-grid .shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.picker-grid button:hover .shot { outline-color: var(--ink); }
.picker-grid .cap { font-size: 12px; color: var(--ink-muted); margin-top: 6px; }
.picker-foot { display: flex; gap: var(--s3); align-items: center; margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--hairline); flex-wrap: wrap; }

/* ---------- confirming again ---------- */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(20, 20, 20, 0.42); display: grid; place-items: center; padding: var(--s5); }
.modal-box { width: min(460px, 100%); background: var(--field); border: 1px solid var(--line); padding: var(--s6); }
.modal-box h3 { font-family: var(--font-display); font-size: 26px; line-height: 1.1; }
.modal-box .muted { margin-top: var(--s3); line-height: 1.6; }
.modal-why { margin-top: var(--s4); font-size: 13px; line-height: 1.6; padding: var(--s3) var(--s4); background: var(--surface); border-inline-start: 2px solid var(--accent); }
.modal-box .f { margin-top: var(--s5); margin-bottom: 0; }
.modal-box .err { margin-top: var(--s3); }
.modal-acts { display: flex; justify-content: flex-end; gap: var(--s3); margin-top: var(--s5); }

/* ---------- the save bar ---------- */
.savebar { position: sticky; bottom: 0; z-index: 20; background: var(--ground); border-top: 1px solid var(--line); display: flex; align-items: center; gap: var(--s4); padding: var(--s4) 0; margin-top: var(--s6); }
.savebar .state { margin-inline-end: auto; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink-muted); }
.savebar.is-dirty { border-top-color: var(--accent); }
.savebar.is-dirty .state { color: var(--accent); }

.toast { position: fixed; inset-inline: 0; bottom: var(--s5); z-index: 100; display: grid; justify-items: center; pointer-events: none; }
.toast div { background: var(--ink); color: #fff; padding: 12px 20px; font-size: 13px; opacity: 0; transform: translateY(8px); transition: opacity 220ms ease, transform 220ms var(--ease); }
.toast.show div { opacity: 1; transform: none; }
.toast.bad div { background: var(--danger); }

/* ---------- the printed sheet ---------- */
.print-sheet { display: none; }
@media print {
  body.printing .bar, body.printing .view, body.printing .toast, body.printing .signin { display: none !important; }
  body.printing .print-sheet { display: block; }
  @page { margin: 16mm 14mm; }
  html, body { background: #fff; }
}
.print-sheet { color: #141414; font-size: 11pt; }
.p-head { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 12px; border-bottom: 1.5px solid #141414; }
.p-mark { width: 42px; height: auto; flex: 0 0 auto; }
.p-brand { flex: 1 1 auto; }
.p-word { font-family: var(--font-display); font-size: 20pt; letter-spacing: 0.16em; line-height: 1; }
.p-sub { font-size: 8pt; letter-spacing: 0.06em; color: #6b665e; margin-top: 4px; }
.p-meta { text-align: end; font-size: 9pt; color: #6b665e; line-height: 1.5; }
.p-meta .p-title { font-family: var(--font-display); font-size: 13pt; color: #141414; }
.p-row { display: grid; grid-template-columns: 26px 1fr 1.3fr; gap: 14px; padding: 9px 0; border-bottom: 0.5pt solid #d8d3c9; break-inside: avoid; page-break-inside: avoid; }
.p-n { font-family: var(--font-display); font-size: 12pt; color: #8a6a2e; }
.p-name { font-family: var(--font-display); font-size: 14pt; line-height: 1.2; }
.p-line { font-size: 8.5pt; color: #6b665e; margin-top: 3px; }
.p-facts p { display: flex; gap: 8px; font-size: 9.5pt; line-height: 1.5; }
.p-facts .k { flex: 0 0 52px; color: #6b665e; }
.p-facts .v { flex: 1 1 auto; }
.p-msg { margin-top: 2px; }
.p-empty { padding: 24px 0; color: #6b665e; }
.p-foot { margin-top: 14px; padding-top: 10px; border-top: 0.5pt solid #d8d3c9; font-size: 8.5pt; color: #6b665e; display: flex; justify-content: space-between; gap: 16px; }

@media (max-width: 899px) {
  .figures { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .pair > .f:first-child { padding-inline-end: 0; border-inline-end: 0; padding-bottom: var(--s4); border-bottom: 1px solid var(--hairline); }
  .pair > .f:last-child { padding-inline-start: 0; }
  .card-head { flex-direction: column; }
  .tbl thead { display: none; }
  .tbl tr { display: grid; gap: 4px; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--hairline); }
  .tbl td { border: 0; padding: 0; }
  .tbl .row-actions { justify-content: flex-start; margin-top: var(--s3); }
  .villa-row { grid-template-columns: 72px minmax(0, 1fr); }
  .villa-row .thumb { width: 72px; }
  .villa-row .acts { grid-column: 1 / -1; }
  .chosen-row { grid-template-columns: 26px 56px minmax(0, 1fr); }
  .chosen-row .thumb { width: 56px; }
  .chosen-row .acts { grid-column: 1 / -1; }
  .bar-inner { height: auto; padding-block: var(--s3); flex-wrap: wrap; gap: var(--s3); }
  .tabs { margin-inline-start: 0; order: 3; width: 100%; gap: var(--s4); overflow-x: auto; }
  .tabs button { padding-block: 10px; white-space: nowrap; }
  .bar-end { margin-inline-start: auto; }
  .search { margin-inline-start: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
