/* A.N.Y Glass. Tokens from the design system. Public catalog (light, photos first, masonry) and a mobile-first admin. */
:root {
  --brand-navy: #2F3B4A;
  --brand-navy-hover: #232D39;
  --brand-cyan: #29ABE2;
  --brand-cyan-soft: #E3F4FC;
  --surface: #FFFFFF;
  --surface-alt: #F4F6F8;
  --surface-sunken: #E9EDF1;
  --glass: rgba(255,255,255,0.78);
  --ink: #2F3B4A;
  --ink-muted: #5B6878;
  --on-navy: #FFFFFF;
  --on-navy-muted: #C5CDD6;
  --line: #D9DFE5;
  --line-strong: #8996A4;
  --focus: #0E7FB0;
  --whatsapp: #25D366;
  --on-whatsapp: #0F2A1B;
  --status-draft: #8A5A00;
  --status-draft-soft: #FFF4DB;
  --status-live: #1D6B45;
  --status-live-soft: #E3F5EB;
  --danger: #B42318;
  --shadow-header: 0 1px 0 rgba(47,59,74,0.08);
  --shadow-sheet: 0 -8px 24px rgba(47,59,74,0.12);
  --font-sans: "IBM Plex Sans Arabic", "IBM Plex Sans Hebrew", system-ui, sans-serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px; --space-12: 48px;
  --radius-sm: 2px; --radius-md: 4px;
  --ease-out: cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--surface-alt); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 26px; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.inner { max-width: 1200px; margin-inline: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }
.muted { color: var(--ink-muted); }

/* App frame */
#app { background: var(--surface); min-height: 70vh; position: relative; }
.screen { animation: enter 280ms var(--ease-out) backwards; }
.screen.back { animation-name: enter-back; }
@keyframes enter { from { opacity: 0; transform: translateX(-20px); } }
@keyframes enter-back { from { opacity: 0; transform: translateX(20px); } }
@media (prefers-reduced-motion: reduce) { .screen, .screen.back { animation: fade 160ms linear backwards; } @keyframes fade { from { opacity: 0; } } }
.press { transition: transform 100ms ease-out, background-color 120ms ease-out, border-color 120ms ease-out; }
.press:active { transform: scale(.97); }

/* Header */
.hdr { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--glass); -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%); box-shadow: var(--shadow-header); border-bottom: 2px solid var(--brand-cyan); }
@media (prefers-reduced-transparency: reduce) { .hdr { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; } }
.hdr .inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); height: 56px; }
.wordmark { font-size: 18px; line-height: 24px; font-weight: 600; color: var(--ink); text-decoration: none; direction: ltr; background: none; border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; gap: var(--space-2); }
.wordmark b { color: var(--brand-cyan); font-weight: 600; }
.wordmark svg { width: 22px; height: 22px; }
.hdr-tools { display: flex; align-items: center; gap: var(--space-2); }
.lang { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-md); overflow: hidden; }
.lang button { font-size: 14px; line-height: 20px; font-weight: 500; padding: var(--space-1) var(--space-3); border: 0; background: var(--surface); color: var(--ink); cursor: pointer; min-height: 32px; }
.lang button[aria-pressed="true"] { background: var(--brand-navy); color: var(--on-navy); }

/* Buttons */
.btn { font-size: 15px; line-height: 20px; font-weight: 600; min-height: 44px; padding: 0 var(--space-6); border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); text-decoration: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--brand-navy); color: var(--on-navy); }
.btn-primary:hover { background: var(--brand-navy-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); padding: 0 var(--space-3); }
.btn-ghost:hover { background: var(--surface-alt); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.btn-wa { background: var(--whatsapp); color: var(--on-whatsapp); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 var(--space-3); font-size: 14px; }

/* Home */
.hero { padding-block: var(--space-8) var(--space-6); }
.hero h1 { font-size: 32px; line-height: 40px; font-weight: 600; }
.hero p { margin-top: var(--space-2); color: var(--ink-muted); max-width: 52ch; }
.chips-bar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 58px); z-index: 9; background: var(--surface); border-bottom: 1px solid var(--line); }
.chips { display: flex; gap: var(--space-2); overflow-x: auto; padding-block: var(--space-2); scrollbar-width: none; overscroll-behavior-x: contain; }
.chips::-webkit-scrollbar { display: none; }
.chip { text-decoration: none; font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--brand-cyan-soft); border-color: var(--brand-cyan-soft); box-shadow: inset 0 -2px 0 var(--brand-cyan); }
.cat-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-block: var(--space-4) var(--space-3); }
.cat-row h2 { font-size: 22px; line-height: 30px; font-weight: 600; }
.count { font-size: 14px; line-height: 22px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.link-btn { background: none; border: 0; color: var(--focus); font-size: 14px; line-height: 20px; font-weight: 600; cursor: pointer; display: inline-flex; gap: var(--space-1); align-items: center; padding: var(--space-1) 0; }
.link-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* Media placeholder + real media */
.ph { position: relative; display: block; width: 100%; max-width: 100%; background: var(--surface-sunken); overflow: hidden; }
.ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 38%, rgba(255,255,255,.6) 39%, rgba(255,255,255,.6) 45%, transparent 46%, transparent 52%, rgba(255,255,255,.35) 53%, rgba(255,255,255,.35) 55%, transparent 56%); pointer-events: none; }
.ph .glyph { position: absolute; inset: 0; display: grid; place-items: center; }
.ph .glyph svg { width: 34%; max-width: 72px; height: auto; stroke: var(--line-strong); fill: none; stroke-width: 1.5; stroke-linejoin: miter; }
.ph img, .ph video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph.has-media::after { display: none; }
.play { position: absolute; top: var(--space-2); inset-inline-end: var(--space-2); width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--glass); display: grid; place-items: center; z-index: 2; }
.play svg { width: 12px; height: 12px; fill: var(--ink); }

/* Masonry */
.masonry { columns: 2; column-gap: var(--space-2); padding-bottom: var(--space-12); }
.masonry .card { margin-bottom: var(--space-3); }
@media (min-width: 640px) { .masonry { columns: 3; column-gap: var(--space-3); } }
@media (min-width: 1024px) { .masonry { columns: 4; } }
.card { display: block; width: 100%; break-inside: avoid; text-align: start; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.card:hover .ph { filter: brightness(.97); }
.card-body { padding-top: var(--space-2); }
.card-title { font-size: 15px; line-height: 22px; font-weight: 600; }
.card-meta { font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.empty { padding-block: var(--space-12); text-align: center; color: var(--ink-muted); }

/* Project page */
.topline { display: flex; align-items: center; justify-content: space-between; padding-block: var(--space-2); }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; background: var(--surface-sunken); }
.gallery::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; }
.slide .ph { aspect-ratio: 4/5; max-height: 72vh; }
.slide + .slide { border-inline-start: 2px solid var(--surface); }
.gal-count { display: flex; justify-content: center; gap: 6px; padding-block: var(--space-3); }
.gal-count i { width: 6px; height: 6px; background: var(--line); display: block; transition: background-color 160ms, width 200ms var(--ease-out); }
.gal-count i.on { background: var(--brand-navy); width: 18px; }
.proj-head { display: flex; flex-direction: column; gap: var(--space-1); padding-block: var(--space-2) var(--space-6); }
.proj-head h1 { font-size: 28px; line-height: 36px; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.tag { font-size: 13px; line-height: 20px; font-weight: 500; padding: 2px var(--space-2); border-radius: var(--radius-sm); background: var(--brand-cyan-soft); color: var(--ink); border: 0; cursor: pointer; }
.proj-desc { max-width: 60ch; margin-bottom: var(--space-6); }
.specs { background: var(--surface-alt); border-radius: var(--radius-md); padding: var(--space-4); display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4) var(--space-6); margin: 0 0 var(--space-8); max-width: 640px; }
.specs dt { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }
.specs dd { margin: var(--space-1) 0 0; font-size: 15px; line-height: 22px; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: var(--space-2); }
.swatch { width: 14px; height: 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); flex: none; display: inline-block; }
.section-title { font-size: 22px; line-height: 30px; font-weight: 600; margin-bottom: var(--space-3); }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-bottom: var(--space-8); max-width: 640px; }
.ba figure { margin: 0; }
.ba .ph { aspect-ratio: 3/4; }
.ba figcaption { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--ink-muted); padding-top: var(--space-1); }
.sheet { position: sticky; bottom: 0; z-index: 8; background: var(--surface); box-shadow: var(--shadow-sheet); padding-block: var(--space-3) calc(var(--space-3) + env(safe-area-inset-bottom, 0px)); }
.sheet .inner { display: flex; gap: var(--space-2); }
.sheet .btn-wa { flex: 1; }

.foot { background: var(--surface-alt); padding-block: var(--space-8); font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.foot .inner { display: flex; flex-direction: column; gap: var(--space-1); }
.foot strong { color: var(--ink); font-weight: 600; direction: ltr; unicode-bidi: isolate; }
.example-note { font-size: 13px; line-height: 20px; color: var(--ink-muted); padding-block: var(--space-2) 0; display: flex; gap: var(--space-2); align-items: flex-start; }
.example-note i { width: 6px; height: 6px; background: var(--brand-cyan); flex: none; margin-top: 7px; }

/* Admin */
.admin { background: var(--surface-alt); min-height: 760px; }
.admin-hdr { background: var(--surface); border-bottom: 1px solid var(--line); }
.admin-hdr .inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 56px; }
.admin-hdr .who { display: flex; align-items: center; gap: var(--space-2); font-size: 14px; line-height: 20px; }
.role { font-size: 12px; line-height: 18px; font-weight: 600; padding: 0 var(--space-2); border-radius: var(--radius-sm); background: var(--brand-navy); color: var(--on-navy); }
.role.worker { background: var(--surface-sunken); color: var(--ink); }
.admin-body { padding-block: var(--space-6) var(--space-12); max-width: 720px; margin-inline: auto; }
.admin-title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.admin-title h1 { font-size: 22px; line-height: 30px; font-weight: 600; }
.alert { background: var(--status-draft-soft); color: var(--status-draft); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font-size: 14px; line-height: 22px; font-weight: 500; margin-bottom: var(--space-4); }
.tabs { display: flex; gap: var(--space-1); margin-bottom: var(--space-3); border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: var(--space-2) var(--space-3); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--brand-navy); }
.tabs .n { font-variant-numeric: tabular-nums; color: var(--ink-muted); font-weight: 400; }
.rows { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.row { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; gap: var(--space-3); align-items: center; padding: var(--space-3); background: var(--surface); }
.row .ph { aspect-ratio: 1; }
.row-title { font-size: 15px; line-height: 22px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { font-size: 13px; line-height: 20px; color: var(--ink-muted); display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.row-actions { display: flex; gap: var(--space-1); }
.q-row { grid-template-columns: minmax(0,1fr) auto; padding: 0; }
.q-link { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: var(--space-3); align-items: center; padding: var(--space-3); text-decoration: none; color: inherit; min-width: 0; }
.q-trash { width: 44px; height: 44px; margin-inline-end: var(--space-2); display: grid; place-items: center; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-muted); cursor: pointer; }
.q-trash svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .q-trash:hover { color: var(--danger); background: var(--surface-2, rgba(0,0,0,.04)); } }
.q-del { grid-template-columns: 1fr; }
.q-del .confirm { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 12px; line-height: 20px; font-weight: 500; padding: 0 var(--space-2); border-radius: var(--radius-sm); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: currentColor; }
.badge.draft { background: var(--status-draft-soft); color: var(--status-draft); }
.badge.live { background: var(--status-live-soft); color: var(--status-live); }

.form { display: flex; flex-direction: column; gap: var(--space-6); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.field > label, .field > .lbl { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }
.input { font-size: 16px; min-height: 44px; padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); width: 100%; }
textarea.input { padding: var(--space-2) var(--space-3); min-height: 88px; resize: vertical; line-height: 24px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(-45deg, transparent 50%, var(--ink) 50%); background-position: left 16px center, left 11px center; background-size: 5px 5px; background-repeat: no-repeat; padding-left: 32px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.hint { font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.translation { border-inline-start: 2px solid var(--brand-cyan); padding-inline-start: var(--space-3); display: flex; flex-direction: column; gap: var(--space-1); }
.upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); min-height: 132px; padding: var(--space-4); border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--brand-cyan-soft); color: var(--ink); cursor: pointer; text-align: center; font-weight: 600; font-size: 15px; line-height: 22px; }
.upload svg { width: 28px; height: 28px; stroke: var(--ink); fill: none; stroke-width: 1.5; }
.upload small { font-weight: 400; font-size: 13px; color: var(--ink-muted); }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--space-1); }
.thumb { position: relative; padding: 0; border: 0; background: none; cursor: pointer; }
.thumb .ph { aspect-ratio: 1; }
.thumb.cover::before { content: ""; position: absolute; inset: 0; border: 2px solid var(--brand-navy); z-index: 3; pointer-events: none; }
.thumb .cv { position: absolute; bottom: 0; inset-inline-start: 0; z-index: 3; background: var(--brand-navy); color: var(--on-navy); font-size: 11px; line-height: 18px; font-weight: 600; padding: 0 6px; }
.pick-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.check { display: flex; gap: var(--space-2); align-items: center; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand-navy); }
.metal { display: inline-flex; align-items: center; gap: var(--space-2); }
.actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.actions .grow { margin-inline-end: auto; }
.confirm { background: var(--surface); border: 1px solid var(--danger); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.confirm p { margin-inline-end: auto; font-size: 14px; color: var(--danger); font-weight: 500; }

.login { max-width: 400px; margin-inline: auto; padding-block: var(--space-12); display: flex; flex-direction: column; gap: var(--space-4); }
.login h1 { font-size: 22px; line-height: 30px; font-weight: 600; }
.login-note { font-size: 13px; line-height: 20px; color: var(--status-draft); background: var(--status-draft-soft); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.role-pick button { min-height: 52px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius-md); cursor: pointer; font-weight: 600; font-size: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 20px; }
.role-pick button small { font-weight: 400; font-size: 12px; color: var(--ink-muted); }
.role-pick button[aria-pressed="true"] { border-color: var(--brand-navy); box-shadow: inset 0 0 0 1px var(--brand-navy); background: var(--brand-cyan-soft); }
.cat-list .row { grid-template-columns: minmax(0,1fr) auto; }

/* Toast */
.toast { position: fixed; z-index: 50; bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px) + 64px); left: 50%; transform: translate(-50%, 12px); background: var(--brand-navy); color: var(--on-navy); padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); font-size: 14px; line-height: 22px; max-width: min(92vw, 420px); text-align: center; opacity: 0; pointer-events: none; transition: opacity 180ms ease-out, transform 240ms var(--ease-out); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: opacity 160ms linear; transform: translate(-50%, 0); } }

/* Real-site additions */
#app { min-height: 100vh; }
.boot { display: grid; place-items: center; min-height: 60vh; color: var(--ink-muted); }
.err { color: var(--danger); font-size: 14px; line-height: 22px; }
.slide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--brand-navy); }
.slide .ph.has-media img { object-fit: contain; background: var(--surface-sunken); }
.mgrid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--space-2); }
@media (min-width: 560px) { .mgrid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.mitem { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.mitem .thumb { width: 100%; }
.mitem select { font-size: 13px; min-height: 32px; padding: 0 var(--space-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); width: 100%; }
.mrow { display: flex; gap: var(--space-1); }
.mrow button { flex: 1; min-height: 32px; font-size: 12px; line-height: 16px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); cursor: pointer; padding: 0 4px; }
.mrow button.del { color: var(--danger); }
.progress { display: flex; flex-direction: column; gap: var(--space-1); font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.bar { height: 4px; background: var(--surface-sunken); }
.bar i { display: block; height: 100%; width: 0; background: var(--brand-navy); transition: width 160ms linear; }
.nav-admin { display: flex; gap: var(--space-1); overflow-x: auto; scrollbar-width: none; padding-bottom: var(--space-2); }
.nav-admin a { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-muted); text-decoration: none; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); white-space: nowrap; }
.nav-admin a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 -2px 0 var(--brand-navy); }
.cat-edit { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: var(--space-2); align-items: end; padding: var(--space-3); background: var(--surface); }
@media (max-width: 520px) { .cat-edit { grid-template-columns: 1fr 1fr; } .cat-edit .actions { grid-column: 1 / -1; } }
.slug { font-size: 12px; line-height: 18px; color: var(--ink-muted); direction: ltr; text-align: start; unicode-bidi: isolate; }
a.card { text-decoration: none; }

/* Quotes */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--space-2); }
.side-box { background: var(--surface-alt); border-color: var(--line); }
.piece-row { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) auto auto; gap: var(--space-2); align-items: center; margin-bottom: var(--space-2); }
.piece-row .check { font-size: 13px; white-space: nowrap; }
.cut-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 22px; font-variant-numeric: tabular-nums; }
.cut-table th, .cut-table td { text-align: start; padding: var(--space-1) var(--space-2); border-bottom: 1px solid var(--line); }
.cut-table th { font-size: 12px; color: var(--ink-muted); font-weight: 500; }
.cut-table td[dir="ltr"] { text-align: end; font-weight: 600; }
.g2-wrap { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.g2 { margin: 0; flex: 1 1 200px; min-width: 0; max-width: 360px; }
.g2 svg { width: 100%; height: auto; display: block; }
.g2 figcaption { font-size: 12px; color: var(--ink-muted); text-align: center; }
.g2-door { fill: var(--brand-cyan-soft); stroke: var(--brand-navy); stroke-width: 1.5; }
.g2-panel { fill: var(--surface-alt); stroke: var(--brand-navy); stroke-width: 1.5; }
.g2-t { font: 500 11px var(--font-sans); fill: var(--ink-muted); text-anchor: middle; }
.g2-n { font: 600 12px var(--font-sans); fill: var(--ink); text-anchor: middle; }
.g2-dim { stroke: var(--line-strong); stroke-width: 1; }
.view3d { width: 100%; aspect-ratio: 4/3; max-height: 420px; background: var(--surface-alt); border-radius: var(--radius-md); overflow: hidden; touch-action: none; }
.view3d.big { aspect-ratio: 1; max-height: 520px; margin-top: var(--space-4); }
.view3d canvas { display: block; }
.quote-doc { max-width: 640px; padding-bottom: var(--space-12); }
.totals { grid-template-columns: 1fr 1fr 1fr; }
.totals .grand dd { font-size: 20px; line-height: 28px; }
@media (max-width: 520px) { .piece-row { grid-template-columns: 1fr 1fr; } .totals { grid-template-columns: 1fr 1fr; } }

/* Quote wizard */
.wiz-head { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-4); }
.wiz-title { display: flex; flex-direction: column; align-items: center; text-align: center; }
.wiz-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.wiz-steps::before { content: ""; position: absolute; top: 16px; inset-inline: 10%; height: 2px; background: var(--line); }
.wiz-steps li { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); font-size: 11px; line-height: 14px; color: var(--ink-muted); text-align: center; position: relative; }
.wiz-dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--ink-muted); font-weight: 600; font-size: 14px; cursor: pointer; display: grid; place-items: center; }
.wiz-dot.on { border-color: var(--brand-navy); background: var(--brand-navy); color: var(--on-navy); }
.wiz-dot.done { border-color: var(--brand-navy); color: var(--brand-navy); }
.wiz-nav { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); padding-block: var(--space-3) calc(var(--space-3) + env(safe-area-inset-bottom, 0px)); background: var(--surface-alt); margin-top: var(--space-4); z-index: 5; }
.layout-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.layout-card { display: flex; align-items: center; gap: var(--space-2); min-height: 52px; padding: 0 var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 15px; }
.layout-card svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 1.5; }
.layout-card[aria-pressed="true"], .side-opt[aria-pressed="true"] { border-color: var(--brand-navy); box-shadow: inset 0 0 0 1px var(--brand-navy); background: var(--brand-cyan-soft); }
.side-opts { display: flex; flex-direction: column; gap: var(--space-1); }
.side-opt { min-height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 500; }
.shower-tabs { margin-bottom: var(--space-1); }
.thumb .cv { border: 0; cursor: pointer; }
.sketch { display: flex; justify-content: center; align-items: flex-start; gap: var(--space-2); overflow-x: auto; padding: var(--space-6) var(--space-2); background: var(--surface-alt); border-radius: var(--radius-md); }
.sk-side { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.is-corner .sk-right { transform: perspective(900px) rotateY(16deg); transform-origin: left center; }
.is-corner .sk-left { transform: perspective(900px) rotateY(-16deg); transform-origin: right center; }
.sk-corner { width: 2px; align-self: stretch; background: var(--ink); margin-block: 56px; }
.sk-label { font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.sk-total { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sk-total .hint { font-size: 11px; line-height: 14px; }
.sk-row { display: flex; gap: 0; }
.sk-piece { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); }
.sk-glass { position: relative; width: 120px; min-height: 190px; border: 2px solid var(--ink); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-2); }
.sk-piece + .sk-piece .sk-glass { border-inline-start-width: 1px; }
.sk-door { background: var(--brand-cyan-soft); }
.sk-folding { background: repeating-linear-gradient(90deg, var(--surface) 0 28px, var(--line) 28px 29px); }
.sk-type { font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.sk-h { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--status-live); }
.sk-handle { position: absolute; inset-inline-end: 10px; top: 45%; width: 4px; height: 44px; background: var(--ink); border-radius: 2px; }
.sk-in { width: 72px; min-height: 34px; padding: 0 6px; font-size: 15px; font-weight: 600; text-align: center; border: 1.5px solid var(--focus); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.sk-in::placeholder { font-size: 11px; font-weight: 400; color: var(--ink-muted); }
.sk-chk { font-size: 11px !important; }
.sk-manual { display: flex; flex-direction: column; gap: 4px; }
.mk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-block: var(--space-2); }
.mk-tool { display: inline-flex; align-items: center; gap: 6px; }
.mk-tool[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.mk-hint { flex-basis: 100%; font-size: 12px; }
.mk-ico { display: inline-block; border: 2px solid currentColor; }
.mk-ico.mk-circle { width: 14px; height: 14px; border-radius: 50%; }
.mk-ico.mk-oval, .mk-ico.mk-ovalr { width: 8px; height: 16px; }
.mk-ico.mk-oval { border-right: 0; border-radius: 8px 0 0 8px; }
.mk-ico.mk-ovalr { border-left: 0; border-radius: 0 8px 8px 0; }
.mk-ico.mk-square { width: 13px; height: 13px; }
.mk-ico.mk-rect { width: 18px; height: 11px; }
.mk-on .sk-glass { cursor: crosshair; }
.sk-mark { position: absolute; z-index: 3; transform: translate(-50%, -50%); border: 2px solid var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); touch-action: none; cursor: grab; }
.sk-mark::after { content: ''; position: absolute; inset: -10px; } /* bigger touch target */
.sk-mark.mk-circle { width: 16px; height: 16px; border-radius: 50%; }
.sk-mark.mk-oval, .sk-mark.mk-ovalr { width: 10px; height: 20px; background: transparent; }
.sk-mark.mk-oval { border-right: 0; border-radius: 10px 0 0 10px; }
.sk-mark.mk-ovalr { border-left: 0; border-radius: 0 10px 10px 0; }
.sk-mark.mk-square { width: 20px; height: 20px; }
.sk-mark.mk-rect { width: 26px; height: 14px; }
.extras-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-2) var(--space-3); }
.extra { display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 18px; color: var(--ink-muted); font-weight: 500; }
.rate-table .input { min-width: 76px; min-height: 36px; }
@media (max-width: 520px) { .sk-glass { width: 96px; min-height: 160px; } .sk-in { width: 60px; } .wiz-steps span { display: none; } }

/* Motion (see motion.js). Everything here is decoration; the page reads the same without it. */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero .inner { position: relative; z-index: 1; }
.light-rays { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.bt-word { display: inline-block; will-change: transform, filter, opacity; }
.star-border { position: relative; overflow: hidden; isolation: isolate; background: transparent !important; padding: 1.5px !important; border: 0 !important; }
.star-border .sb-inner { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); width: 100%; min-height: 41px; padding: 0 var(--space-6); border-radius: calc(var(--radius-md) - 1px); background: var(--whatsapp); color: var(--on-whatsapp); }
.star-border .sb-inner svg { width: 20px; height: 20px; flex: none; }
.star-border::before, .star-border::after { content: ""; position: absolute; width: 300%; height: 50%; border-radius: 50%; opacity: .75; z-index: 0; background: radial-gradient(circle, var(--brand-cyan), transparent 12%); }
.star-border::after { bottom: -12px; right: -250%; animation: star-bottom 6s linear infinite alternate; }
.star-border::before { top: -10px; left: -250%; animation: star-top 6s linear infinite alternate; }
@keyframes star-bottom { 0% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(-100%); opacity: 0; } }
@keyframes star-top { 0% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(100%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .star-border::before, .star-border::after { animation: none; display: none; } }

/* ===== Site styles: base looks + occasions (data-base / data-occasion on <html>, public pages only) ===== */
.occ-bar { display: none; }
.hero h1 { color: var(--hero-ink, var(--ink)); }
.hero p { color: var(--hero-muted, var(--ink-muted)); }

/* Glass base: frosted cards over a soft ambient wash */
[data-base="glass"] body {
  background:
    radial-gradient(60vw 50vh at 85% 0%, rgba(41,171,226,.18), transparent 70%),
    radial-gradient(50vw 50vh at 0% 40%, rgba(47,59,74,.10), transparent 70%),
    radial-gradient(60vw 40vh at 60% 100%, rgba(41,171,226,.12), transparent 70%),
    var(--surface-alt);
  background-attachment: fixed;
}
[data-base="glass"] #app { background: transparent; }
[data-base="glass"] .hdr { background: rgba(255,255,255,.55); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 8px 30px rgba(47,59,74,.08); }
[data-base="glass"] .chips-bar { background: rgba(255,255,255,.45); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); border-bottom-color: rgba(255,255,255,.6); }
[data-base="glass"] .chip { background: rgba(255,255,255,.55); border-color: rgba(255,255,255,.8); box-shadow: 0 2px 10px rgba(47,59,74,.06); }
[data-base="glass"] .card { position: relative; padding: 6px; background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.75); border-radius: var(--radius-md); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); box-shadow: 0 10px 30px rgba(47,59,74,.10); overflow: hidden; }
[data-base="glass"] .card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 35%); pointer-events: none; z-index: 2; }
[data-base="glass"] .card-body { padding: var(--space-2) var(--space-1) var(--space-1); }
[data-base="glass"] .specs, [data-base="glass"] .foot, [data-base="glass"] .quote-doc .panel { background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.75); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(47,59,74,.08); }
[data-base="glass"] .sheet { background: rgba(255,255,255,.6); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
[data-base="glass"] .gallery { background: rgba(255,255,255,.35); }
@media (prefers-reduced-transparency: reduce) { [data-base="glass"] .card, [data-base="glass"] .chips-bar, [data-base="glass"] .specs, [data-base="glass"] .foot { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* Occasions: a dark hero band, an accent, and a greeting bar */
[data-occasion] { --hero-ink: #FFFFFF; --hero-muted: rgba(255,255,255,.8); --brand-cyan: var(--occ-accent); }
[data-occasion="ramadan"] { --occ-bg: #1A2342; --occ-accent: #D4AF5A; }
[data-occasion="qadr"] { --occ-bg: #0D1330; --occ-accent: #E9D49A; }
[data-occasion="fitr"] { --occ-bg: #0F3B3C; --occ-accent: #E8C468; }
[data-occasion="adha"] { --occ-bg: #2E2620; --occ-accent: #D8B26A; }
[data-occasion="mawlid"] { --occ-bg: #0E3A2D; --occ-accent: #D9B65C; }
[data-occasion="newyear"] { --occ-bg: #121826; --occ-accent: #C9D3E0; }
[data-occasion] .hero { background: var(--occ-bg); }
[data-occasion] .occ-bar { display: block; background: var(--occ-bg); color: #FFFFFF; border-bottom: 1px solid rgba(255,255,255,.12); }
.occ-bar .inner { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-1) var(--space-3); padding-block: var(--space-2); text-align: center; font-size: 14px; line-height: 20px; }
.occ-bar strong { font-weight: 600; color: var(--occ-accent); }
.occ-bar .offer { color: rgba(255,255,255,.88); }
.occ-decor { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.occ-decor canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lantern { position: absolute; top: 0; transform-origin: 50% 0; animation: swing 5s ease-in-out infinite alternate; filter: drop-shadow(0 0 10px var(--occ-accent)); }
.lantern:nth-child(2) { animation-duration: 6.2s; animation-delay: -1.3s; }
.lantern:nth-child(3) { animation-duration: 5.6s; animation-delay: -2.4s; }
@keyframes swing { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.crescent { position: absolute; filter: drop-shadow(0 0 14px var(--occ-accent)); }
.rub { position: absolute; opacity: .18; }
@media (prefers-reduced-motion: reduce) { .lantern { animation: none; } }
/* The logo keeps its own cyan whatever the occasion accent is. */
:root { --logo-cyan: #29ABE2; }
.wordmark b { color: var(--logo-cyan); }

/* Logo (SVG from scripts/build-logo.mjs) */
.wordmark { gap: 0; }
.logo-img { display: block; height: 40px; width: auto; }
.admin-hdr .logo-img { height: 34px; }
.login .logo-img { height: 56px; }
.logo-foot { display: block; height: 80px; width: auto; margin-bottom: var(--space-2); }

/* Request form */
.hero-cta { margin-top: var(--space-4); }
.req-wrap { max-width: 640px; padding-block: var(--space-8) var(--space-12); }
.req-title { font-size: 28px; line-height: 36px; font-weight: 600; margin-bottom: var(--space-1); }
.req-wrap .form { margin-top: var(--space-6); }
.req-done { text-align: center; align-items: center; padding-block: var(--space-8); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sheet .btn-secondary { flex: 0 0 auto; }
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-inline-start: 6px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 600; line-height: 1; }
.thumb .cv { border: 0; cursor: pointer; }
.badge.new { background: #FDECEA; color: var(--danger); }
.rq-panel { border-color: var(--brand-cyan); background: var(--brand-cyan-soft); }

/* Reviews */
.stars { display: inline-flex; gap: 2px; font-size: 16px; line-height: 1; color: var(--line); }
.stars .on { color: #E0A82E; }
.rv-section { padding-block: var(--space-8) var(--space-4); }
.rv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-8); }
.rv-card { margin: 0; background: var(--surface-alt); border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.rv-card blockquote { margin: 0; font-size: 15px; line-height: 24px; }
.rv-card figcaption, .rv-admin .hint { font-size: 13px; color: var(--ink-muted); font-weight: 500; }
.rv-photo { width: 100%; max-width: 220px; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); }
.star-pick { display: flex; gap: var(--space-1); direction: ltr; justify-content: flex-end; }
.star-pick button { font-size: 30px; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--line); padding: 2px; }
.star-pick button.on { color: #E0A82E; }
[data-base="glass"] .rv-card { background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.75); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

/* Stats */
.sx-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-2); margin-bottom: var(--space-4); }
.sx-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); display: flex; flex-direction: column; gap: 2px; }
.sx-tile strong { font-size: 26px; line-height: 32px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: start; }
.sx-tile span { font-size: 13px; color: var(--ink-muted); }
.sx-src { display: grid; grid-template-columns: 120px 1fr 48px; gap: var(--space-2); align-items: center; font-size: 14px; }
.sx-bar { height: 8px; background: var(--surface-sunken); border-radius: var(--radius-sm); overflow: hidden; }
.sx-bar i { display: block; height: 100%; background: var(--brand-navy); }
.sx-src b { font-variant-numeric: tabular-nums; text-align: end; }

/* Quote PDF (browser print → Save as PDF) */
.print-only { display: none; }
.pdf-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-4); }
@media print {
  @page { size: A4; margin: 14mm; }
  html, body { background: #fff !important; }
  .hdr, .occ-bar, .sheet, .no-print, .toast, .view3d, .hint { display: none !important; }
  .print-only { display: block !important; }
  .print-logo { height: 70px; width: auto; margin-bottom: 8mm; }
  .print-3d { width: 100%; max-width: 120mm; margin: 0 auto 4mm; }
  .quote-doc { max-width: none; padding: 0; }
  .wrap { padding: 0 !important; }
  .panel, .specs { break-inside: avoid; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: #fff !important; border: 1px solid #D9DFE5 !important; }
  .screen { animation: none !important; }
  .print-contact { margin-top: 8mm; font-size: 12px; color: #5B6878; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .quote-doc, .quote-doc * { opacity: 1 !important; transform: none !important; }
}

/* Payments */
.pay-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--space-2); }
.pay-tile { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); display: flex; flex-direction: column; gap: 2px; }
.pay-tile span { font-size: 12px; color: var(--ink-muted); }
.pay-tile strong { font-size: 18px; line-height: 24px; font-variant-numeric: tabular-nums; text-align: start; }
.pay-tile.ok strong { color: var(--status-live); }
.pay-tile.wait strong { color: var(--status-draft); }
.pay-tile.bad strong, .pay-tile.left strong { color: var(--danger); }
.pay-table tr.bounced td { text-decoration: line-through; color: var(--ink-muted); }
.pay-table .row-actions { white-space: nowrap; }
.pay-add { display: flex; flex-direction: column; gap: var(--space-3); border-top: 1px solid var(--line); padding-top: var(--space-4); }

/* Agenda */
.agenda { gap: var(--space-3); margin-bottom: var(--space-4); border-color: var(--brand-cyan); }
.ag-group { display: flex; flex-direction: column; gap: var(--space-1); }
.ag-row { display: grid; grid-template-columns: 64px minmax(0,1fr) auto auto; gap: var(--space-2); align-items: center; font-size: 14px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.ag-row:last-child { border-bottom: 0; }
.ag-time { font-weight: 600; font-variant-numeric: tabular-nums; text-align: start; }
.ag-name { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .ag-row { grid-template-columns: 56px minmax(0,1fr) auto; } .ag-row .muted { display: none; } }

/* ===== Design upgrade ===== */
.screen.still { animation: none; }

/* Hero with a real photo or video */
.hero-media { color: #fff; min-height: min(78vh, 640px); display: flex; align-items: flex-end; padding-block: var(--space-12) var(--space-8); }
.hero-media .hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-media .hero-bg img, .hero-media .hero-bg video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media .hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18,24,33,.82) 0%, rgba(18,24,33,.35) 45%, rgba(18,24,33,.05) 75%); }
.hero-media .inner { width: 100%; }
.hero-media h1 { color: #fff; font-size: clamp(32px, 6vw, 56px); line-height: 1.1; }
.hero-media p { color: rgba(255,255,255,.88); }
.hero-media .light-rays { display: none; }

/* Trust bar */
.trust { background: var(--surface); border-bottom: 1px solid var(--line); }
.trust .inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: var(--space-3); padding-block: var(--space-4); }
.trust-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.trust-item strong { font-size: 26px; line-height: 32px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.trust-item span { font-size: 13px; line-height: 18px; color: var(--ink-muted); }

/* Category icons */
.chip { display: inline-flex; align-items: center; gap: 6px; }
.cat-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; opacity: .75; }

/* Footer */
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-6); align-items: start; }
.foot-brand { display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
.foot-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-4); margin: 0; }
.foot-info dt { font-size: 12px; color: var(--ink-muted); font-weight: 500; }
.foot-info dd { margin: 2px 0 0; font-size: 14px; color: var(--ink); font-weight: 500; }
.foot-info a { color: var(--ink); }
.foot-login { grid-column: 1 / -1; font-size: 12px; text-decoration: none; }
@media (max-width: 640px) { .foot-grid { grid-template-columns: 1fr; } }

/* Floating WhatsApp */
.wa-float { position: fixed; z-index: 30; inset-inline-start: calc(16px + env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; border-radius: 50%; background: var(--whatsapp); color: var(--on-whatsapp); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(15,42,27,.28); }
.wa-float svg { width: 28px; height: 28px; }

/* Skeletons */
.skel { display: block; background: linear-gradient(100deg, var(--surface-sunken) 30%, #F3F6F9 50%, var(--surface-sunken) 70%); background-size: 300% 100%; animation: skel 1.4s ease-in-out infinite; border-radius: var(--radius-sm); }
.sk-logo { width: 72px; height: 34px; } .sk-title { width: 60%; height: 36px; margin-bottom: 12px; } .sk-line { height: 12px; width: 80%; margin-top: 8px; } .sk-line.short { width: 45%; }
.sk-card .ph::after { display: none; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.boot { min-height: 120px; color: transparent !important; background: linear-gradient(100deg, var(--surface-sunken) 30%, #F3F6F9 50%, var(--surface-sunken) 70%); background-size: 300% 100%; animation: skel 1.4s ease-in-out infinite; border-radius: var(--radius-md); }
@media (prefers-reduced-motion: reduce) { .skel, .boot { animation: none; } }

/* Fullscreen gallery */
.slide[data-act="gal-open"] { cursor: zoom-in; }
html.lb-open, html.lb-open body { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 100; }
.lb-backdrop { position: absolute; inset: 0; background: #0B0F14; }
.lb-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: pan-x pinch-zoom; overscroll-behavior: contain; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: grid; place-items: center; padding: calc(56px + env(safe-area-inset-top, 0px)) 0 calc(24px + env(safe-area-inset-bottom, 0px)); }
.lb-slide img, .lb-slide video { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-bar { position: absolute; top: env(safe-area-inset-top, 0px); inset-inline: 0; display: flex; justify-content: space-between; align-items: center; padding: var(--space-3) max(16px, env(safe-area-inset-left, 0px)); color: #fff; pointer-events: none; }
.lb-count { font-size: 14px; font-variant-numeric: tabular-nums; opacity: .85; }
.lb-close { pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 18px; cursor: pointer; }

/* Card -> project page */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
::view-transition-group(*) { animation-duration: .38s; animation-timing-function: cubic-bezier(.2,.8,.2,1); }

/* Admin bottom tab bar (phones) */
.tabbar { display: none; }
@media (max-width: 720px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; inset-inline: 0; bottom: 0; background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; line-height: 14px; font-weight: 500; color: var(--ink-muted); text-decoration: none; background: none; border: 0; padding: 4px 0; cursor: pointer; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current="page"] { color: var(--brand-navy); }
  .tabbar .tb-new svg { width: 40px; height: 40px; padding: 8px; border-radius: 50%; background: var(--brand-navy); color: var(--on-navy); margin-top: -18px; box-shadow: 0 6px 16px rgba(47,59,74,.3); }
  .admin { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .wiz-nav { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* Customer quote page: a proper document */
.quote-doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-6) var(--space-6) var(--space-8); margin-block: var(--space-6) var(--space-12); box-shadow: 0 12px 40px rgba(47,59,74,.08); }
.quote-doc .cat-row { border-bottom: 2px solid var(--brand-navy); padding-bottom: var(--space-3); margin-bottom: var(--space-4); }
.quote-doc .totals { background: var(--surface-alt); border: 0; }
.quote-doc .totals .grand dd { color: var(--brand-navy); font-size: 24px; line-height: 30px; }
@media (max-width: 520px) { .quote-doc { padding: var(--space-4); border-radius: 0; border-inline: 0; margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); } }
.hero-prev { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius-md); }
/* Footer: icon-only social links */
.foot-social { grid-column: 1 / -1; display: flex; gap: var(--space-3); justify-content: flex-end; padding-bottom: var(--space-6); }
.soc { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; text-decoration: none; }
.soc svg { width: 22px; height: 22px; }
.soc-wa { background: var(--whatsapp); color: var(--on-whatsapp); }
.soc-ig { background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.rate-table .gc-name { min-width: 120px; }

/* Sketch marks on the cut drawing (SVG) */
.g2-mk { fill: color-mix(in srgb, var(--danger) 8%, transparent); stroke: var(--danger); stroke-width: 2; touch-action: none; cursor: grab; }
.g2-mk-oval, .g2-mk-ovalr { fill: none; stroke-linecap: round; }
.mk-on .g2 rect[data-p] { cursor: crosshair; }
.hw { margin-top: var(--space-3); display: flex; flex-direction: column; gap: var(--space-1); }

/* Supplier sheet: built off-screen at A4 width, snapshotted into a PDF, then removed */
#po-sheet { position: absolute; top: 0; left: 0; z-index: -1; width: 760px; padding: 0 12px; box-sizing: border-box; background: #fff; color: #111; font-family: var(--font-sans); direction: rtl; }
#po-sheet > * { padding: 8px 20px; background: #fff; }
#po-sheet .po-head { display: flex; align-items: center; gap: 28px; border-bottom: 1px solid #D9DFE5; padding-bottom: 14px; }
#po-sheet .po-logo { height: 80px; width: auto; }
#po-sheet h1 { font-size: 24px; margin: 0 0 4px; }
#po-sheet h2 { font-size: 18px; margin: 0 0 6px; }
#po-sheet p { margin: 4px 0; font-size: 15px; }
#po-sheet .po-spec { font-weight: 600; }
#po-sheet .cut-table { width: 100%; margin: 6px 0; font-size: 15px; }
#po-sheet .g2-wrap { justify-content: center; }
#po-sheet .g2 { max-width: 300px; }
#po-sheet .po-foot { font-size: 13px; color: #5B6878; }
.hw-row { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr) auto; }
.hw-head { grid-template-columns: repeat(3, minmax(0,1fr)) auto; }
@media (max-width: 520px) { .hw-head { grid-template-columns: 1fr 1fr; } }
.sup-row { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) auto auto auto; }
.st-row { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr) 90px auto; }
@media (max-width: 520px) { .sup-row, .st-row { grid-template-columns: 1fr 1fr; } }
#po-sheet .po-hw th { text-align: start; }
