/* Layout: full-bleed photo storytelling for travelers; ink sidebar console for staff; phone card stack for guides. */
:root {
  --ink: #10222b;        /* Wadi Rum night */
  --ink-2: #1b3540;
  --paper: #f5f7f6;      /* cool limestone */
  --card: #ffffff;
  --line: #e1e8e6;
  --muted: #5d6f75;
  --gold: #e0a43a;       /* saffron / desert sun */
  --gold-soft: #fff4dd;
  --rose: #c0664f;       /* Petra sandstone, used sparingly */
  --ok: #2f8f63; --ok-soft: #e3f4ec;
  --warn: #c98a12; --warn-soft: #fdf2d9;
  --bad: #c2453a; --bad-soft: #fbe6e3;
  --info: #2a6f97; --info-soft: #e2eff7;
  --f-display: 'Marcellus', 'Reem Kufi', Georgia, serif;
  --f-body: 'Figtree', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --r: 14px;
  --shadow: 0 1px 2px rgba(16,34,43,.06), 0 8px 24px rgba(16,34,43,.07);
}
[lang="ar"] { --f-display: 'Reem Kufi', 'Marcellus', serif; --f-body: 'IBM Plex Sans Arabic', 'Figtree', system-ui, sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; text-wrap: balance; margin: 0; letter-spacing: .01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; color: var(--rose); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* buttons + inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; border-radius: 999px; padding: 12px 22px; font-weight: 700; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 6px 18px rgba(224,164,58,.35); }
.btn-gold:hover { box-shadow: 0 8px 24px rgba(224,164,58,.5); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.input { width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 11px 13px; outline: none; transition: border-color .15s; }
.input:focus { border-color: var(--gold); }
textarea.input { resize: vertical; min-height: 84px; }

/* chips + pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.p-ok { background: var(--ok-soft); color: var(--ok); }
.p-warn { background: var(--warn-soft); color: var(--warn); }
.p-bad { background: var(--bad-soft); color: var(--bad); }
.p-info { background: var(--info-soft); color: var(--info); }
.p-gold { background: var(--gold-soft); color: #8a5a00; }
.p-mute { background: #edf1f0; color: var(--muted); }
.stars { color: var(--gold); letter-spacing: 1px; }

/* ================= CUSTOMER SITE ================= */
.topbar { position: sticky; top: 0; z-index: 30; transition: background .25s, box-shadow .25s; }
.topbar.solid, .topbar.scrolled { background: rgba(255,255,255,.94); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.logo { font-family: 'Marcellus', serif; font-size: 22px; letter-spacing: .22em; text-decoration: none; display: flex; align-items: baseline; gap: 10px; }
.logo small { font-family: 'Reem Kufi', serif; letter-spacing: 0; font-size: 18px; color: var(--gold); }
.topbar.clear { position: absolute; inset: 0 0 auto; color: #fff; }
.topbar nav { display: flex; gap: 4px; margin-inline-start: auto; align-items: center; }
.topbar nav a, .topbar nav button { text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; background: none; border: 0; cursor: pointer; }
.topbar nav a:hover { background: rgba(127,127,127,.12); }
.lang-btn { border: 1.5px solid currentColor !important; opacity: .9; }
.nav-staff { font-size: 13px; opacity: .8; }
@media (max-width: 760px) { .topbar nav .hide-sm { display: none; } }

.hero { position: relative; min-height: 640px; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 60%; transform: scale(1.06); animation: drift 22s ease-out forwards; }
@keyframes drift { to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hero-bg { animation: none; transform: none; } }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,34,43,.55) 0%, rgba(16,34,43,.05) 35%, rgba(16,34,43,.75) 100%); }
.hero .wrap { position: relative; z-index: 1; width: 100%; padding-top: 120px; padding-bottom: 56px; }
.hero .eyebrow { margin-bottom: 14px; }
.hero h1 { font-size: clamp(40px, 7vw, 84px); line-height: 1.02; max-width: 13ch; }
.hero p.lead { font-size: 19px; max-width: 46ch; opacity: .92; margin: 16px 0 30px; }
.search { background: #fff; color: var(--ink); border-radius: 22px; padding: 10px; display: grid; grid-template-columns: 1.3fr 1fr .8fr auto; gap: 6px; box-shadow: 0 20px 50px rgba(0,0,0,.25); max-width: 900px; }
.search .s-cell { padding: 8px 14px; border-radius: 14px; display: grid; gap: 2px; }
.search .s-cell:hover { background: var(--paper); }
.search label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.search select, .search input { border: 0; outline: 0; background: transparent; font-weight: 600; font-size: 15px; padding: 0; width: 100%; }
.search .btn { border-radius: 16px; padding: 0 28px; }
@media (max-width: 760px) { .search { grid-template-columns: 1fr 1fr; } .search .btn { grid-column: 1 / -1; padding: 14px; } .hero { min-height: 600px; } }

.trust { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 26px; font-size: 14px; font-weight: 600; opacity: .95; }
.trust span::before { content: '✓'; color: var(--gold); margin-inline-end: 7px; font-weight: 800; }

.section { padding-block: 72px; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(30px, 4vw, 44px); }

.grid-tours { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.tcard { background: var(--card); border-radius: 18px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.tcard:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(16,34,43,.14); }
.tcard .ph { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.tcard .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.tcard:hover .ph img { transform: scale(1.06); }
.tcard .ph .pill { position: absolute; top: 14px; inset-inline-start: 14px; background: rgba(255,255,255,.95); color: var(--ink); }
.tcard .ph .seats { inset-inline-start: auto; inset-inline-end: 14px; background: var(--ink); color: #fff; }
.tcard .body { padding: 18px 20px 20px; display: grid; gap: 8px; flex: 1; }
.tcard h3 { font-size: 21px; line-height: 1.2; }
.tcard .meta { display: flex; gap: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.tcard .foot { display: flex; justify-content: space-between; align-items: end; margin-top: auto; padding-top: 8px; }
.price { font-size: 24px; font-weight: 800; }
.price small { font-size: 13px; font-weight: 500; color: var(--muted); }

.dest-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.dest { position: relative; aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; color: #fff; text-decoration: none; }
.dest img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.dest:hover img { transform: scale(1.08); }
.dest span { position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(16,34,43,.85)); font-family: var(--f-display); font-size: 22px; }

.band { background: var(--ink); color: #fff; }
.band .muted { color: #a9bcc0; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stats-row b { display: block; font-family: var(--f-display); font-size: 44px; color: var(--gold); font-weight: 400; }
@media (max-width: 700px) { .stats-row { grid-template-columns: 1fr 1fr; } }

.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.rcard { background: var(--card); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); display: grid; gap: 10px; align-content: start; }
.rcard p { margin: 0; font-size: 15px; }
.rcard .who { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gold-soft); color: #8a5a00; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }

footer.site { background: #0b181e; color: #a9bcc0; padding-block: 48px 90px; font-size: 14px; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
footer.site h4 { color: #fff; margin: 0 0 10px; font-size: 14px; }
footer.site a { display: block; text-decoration: none; padding: 3px 0; }
@media (max-width: 700px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }

.wa-fab { position: fixed; bottom: calc(22px + env(safe-area-inset-bottom)); inset-inline-end: max(22px, env(safe-area-inset-right)); z-index: 40; width: 58px; height: 58px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 10px 28px rgba(37,211,102,.45); transition: transform .2s; }
.wa-fab:hover { transform: scale(1.08); }

/* tours list */
.page-head { padding-block: 40px 10px; }
.page-head h1 { font-size: clamp(34px, 5vw, 52px); }
.list-layout { display: grid; grid-template-columns: 260px 1fr; gap: 30px; align-items: start; padding-bottom: 80px; }
.filters { background: var(--card); border-radius: 16px; padding: 20px; display: grid; gap: 20px; position: sticky; top: 86px; box-shadow: var(--shadow); }
.filters h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.chk { display: flex; align-items: center; gap: 9px; padding: 4px 0; cursor: pointer; font-weight: 500; }
.chk input { accent-color: var(--ink); width: 17px; height: 17px; }
input[type=range] { width: 100%; accent-color: var(--gold); }
.seg { display: flex; background: var(--paper); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { flex: 1; border: 0; background: none; padding: 7px 10px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--ink); color: #fff; }
@media (max-width: 860px) { .list-layout { grid-template-columns: 1fr; } .filters { position: static; } }

/* tour detail */
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 230px 230px; gap: 10px; border-radius: 20px; overflow: hidden; margin-top: 24px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: filter .2s; }
.gallery img:hover { filter: brightness(1.08); }
.gallery img:first-child { grid-row: 1 / 3; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; grid-template-rows: 280px; } .gallery img:not(:first-child) { display: none; } .gallery img:first-child { grid-row: auto; } }
.detail { display: grid; grid-template-columns: 1fr 380px; gap: 44px; padding-block: 34px 90px; align-items: start; }
.detail > * { min-width: 0; }
@media (max-width: 960px) { .detail { grid-template-columns: 1fr; } }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 26px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.fact b { display: block; font-size: 15px; }
.block { padding-block: 26px; border-top: 1px solid var(--line); }
.block h2 { font-size: 28px; margin-bottom: 16px; }
.timeline { display: grid; gap: 0; position: relative; }
.tl { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding-bottom: 20px; position: relative; }
.tl::before { content: ''; position: absolute; inset-inline-start: 16px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--gold); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.tl h4 { margin: 4px 0 2px; font-size: 16px; }
.tl p { margin: 0; color: var(--muted); }
.incl { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.incl ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.incl li { display: flex; gap: 9px; }
.incl .yes li::before { content: '✓'; color: var(--ok); font-weight: 800; }
.incl .no li::before { content: '✕'; color: var(--bad); font-weight: 800; }
@media (max-width: 560px) { .incl { grid-template-columns: 1fr; } }
.map { width: 100%; height: 280px; border: 0; border-radius: 16px; background: var(--line); }

.bookbox { position: sticky; top: 86px; background: var(--card); border-radius: 20px; box-shadow: 0 20px 50px rgba(16,34,43,.13); padding: 22px; display: grid; gap: 16px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; }
.cal-head button { border: 0; background: var(--paper); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-weight: 800; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal .dow { font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal .d { aspect-ratio: 1; border-radius: 10px; display: grid; place-content: center; font-size: 13px; font-weight: 600; color: #b8c4c2; border: 0; background: none; padding: 0; }
.cal .d.av { color: var(--ink); background: var(--paper); cursor: pointer; }
.cal .d.av small { display: block; font-size: 9.5px; font-weight: 700; color: var(--ok); line-height: 1; }
.cal .d.av.low small { color: var(--warn); }
.cal .d.full { color: #c3cbc9; text-decoration: line-through; }
.cal .d.av:hover { background: var(--gold-soft); }
.cal .d.sel { background: var(--ink) !important; color: #fff; }
.cal .d.sel small { color: var(--gold) !important; }

/* booking flow */
.steps { display: flex; gap: 8px; margin: 26px 0 22px; flex-wrap: wrap; }
.steps span { padding: 6px 14px; border-radius: 999px; background: #e7ecea; font-size: 13px; font-weight: 700; color: var(--muted); }
.steps span.on { background: var(--ink); color: #fff; }
.steps span.done { background: var(--ok-soft); color: var(--ok); }
.flow { display: grid; grid-template-columns: 1fr 360px; gap: 30px; padding-bottom: 90px; align-items: start; }
.flow > * { min-width: 0; }
@media (max-width: 900px) { .flow { grid-template-columns: 1fr; } }
.panel { background: var(--card); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); display: grid; gap: 18px; }
.panel h2 { font-size: 26px; }
.counter { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.counter .ctl { display: flex; align-items: center; gap: 14px; }
.counter button { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 18px; font-weight: 700; }
.counter b { min-width: 22px; text-align: center; font-size: 18px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
.payopt { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.payopt label { border: 2px solid var(--line); border-radius: 14px; padding: 16px; cursor: pointer; display: grid; gap: 4px; }
.payopt input { display: none; }
.payopt label:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.card-mock { background: linear-gradient(135deg, var(--ink), var(--ink-2)); color: #fff; border-radius: 16px; padding: 20px; display: grid; gap: 12px; }
.card-mock .input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }
.summary { position: sticky; top: 86px; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.summary img { height: 170px; width: 100%; object-fit: cover; }
.summary .in { padding: 20px; display: grid; gap: 10px; }
.line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.line.total { font-size: 20px; font-weight: 800; padding-top: 10px; border-top: 1px solid var(--line); }

/* confirmation / ticket */
.ticket { background: var(--card); border-radius: 22px; overflow: hidden; box-shadow: 0 30px 70px rgba(16,34,43,.18); display: grid; grid-template-columns: 1fr 230px; max-width: 860px; margin: 0 auto; }
.ticket .main { padding: 30px; display: grid; gap: 14px; }
.ticket .stub { background: var(--ink); color: #fff; padding: 26px; display: grid; place-items: center; text-align: center; gap: 10px; border-inline-start: 2px dashed rgba(255,255,255,.3); }
.ticket .stub img { background: #fff; padding: 10px; border-radius: 12px; width: 170px; }
@media (max-width: 700px) { .ticket { grid-template-columns: 1fr; } .ticket .stub { border-inline-start: 0; border-top: 2px dashed rgba(255,255,255,.3); } }
.success-burst { width: 74px; height: 74px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 36px; margin: 0 auto 14px; animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.kv div { display: grid; gap: 2px; }
.kv small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.kv b { font-size: 15px; }

/* lightbox, toast, modal */
.lightbox { position: fixed; inset: 0; background: rgba(5,12,15,.92); z-index: 100; display: grid; place-items: center; padding: 30px; cursor: zoom-out; }
.lightbox img { max-height: 90vh; border-radius: 12px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 13px 20px; border-radius: 12px; z-index: 200; box-shadow: 0 12px 30px rgba(0,0,0,.25); font-weight: 600; animation: up .3s; max-width: calc(100% - 32px); }
.toast.ok { background: var(--ok); }
@keyframes up { from { transform: translate(-50%, 20px); opacity: 0; } }
.modal-bg { position: fixed; inset: 0; background: rgba(16,34,43,.5); z-index: 90; display: flex; justify-content: flex-end; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer { background: var(--paper); width: min(620px, 100%); height: 100%; overflow-y: auto; padding: 26px; display: grid; gap: 18px; align-content: start; animation: slide .25s; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.x { border: 0; background: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 18px; flex: none; }

/* ================= ADMIN ================= */
.admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #cfdcdf; padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.side .logo { color: #fff; padding: 4px 10px 22px; font-size: 19px; }
.side a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px; }
.side a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side a.on { background: rgba(224,164,58,.14); color: var(--gold); }
.side a .badge { margin-inline-start: auto; background: var(--gold); color: var(--ink); border-radius: 999px; font-size: 11px; padding: 1px 8px; font-weight: 800; }
.side .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #6f8a90; padding: 16px 12px 6px; }
.side svg { width: 18px; height: 18px; flex: none; }
.main { padding: 26px 30px 60px; min-width: 0; }
.main-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.main-head h1 { font-size: 32px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--card); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); display: grid; gap: 4px; }
.kpi small { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.kpi b { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.kpi .delta { font-size: 12.5px; font-weight: 700; color: var(--ok); }
.kpi .delta.down { color: var(--bad); }
.cols-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.cols-2 > * { min-width: 0; }
.box { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.box h3 { font-family: var(--f-body); font-weight: 800; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.box h3 a { font-size: 13px; font-weight: 700; color: var(--info); text-decoration: none; }
@media (max-width: 1100px) { .kpis { grid-template-columns: 1fr 1fr; } .cols-2 { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: sticky; height: auto; flex-direction: row; overflow-x: auto; padding: 10px; z-index: 20; }
  .side .logo, .side .grp, .side .side-foot { display: none; }
  .side a { white-space: nowrap; }
  .main { padding: 18px 16px 60px; }
}
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: start; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #f8faf9; }
.tbl tr.new td { background: #fffaf0; }
.fill { height: 7px; background: #e7ecea; border-radius: 9px; overflow: hidden; min-width: 70px; }
.fill i { display: block; height: 100%; border-radius: 9px; background: var(--ok); }
.fill.mid i { background: var(--gold); }
.fill.hi i { background: var(--rose); }
.deprow { display: grid; grid-template-columns: 54px 1fr 110px auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.deprow:last-child { border-bottom: 0; }
.deprow .time { font-weight: 800; font-size: 15px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input { width: auto; flex: 1; min-width: 200px; }
.toolbar select.input { flex: 0 1 180px; min-width: 140px; }

.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mcal .dow { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; padding: 4px; }
.mcal .cell { background: var(--card); border-radius: 10px; min-height: 118px; padding: 7px; display: grid; gap: 4px; align-content: start; box-shadow: 0 1px 2px rgba(16,34,43,.05); min-width: 0; }
.mcal .cell.out { opacity: .4; }
.mcal .cell.today { outline: 2px solid var(--gold); }
.mcal .cell .n { font-size: 12px; font-weight: 800; color: var(--muted); }
.chipdep { font-size: 11px; border-radius: 6px; padding: 3px 6px; cursor: pointer; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-inline-start: 3px solid; background: var(--ok-soft); border-color: var(--ok); }
.chipdep.mid { background: var(--warn-soft); border-color: var(--gold); }
.chipdep.hi { background: var(--bad-soft); border-color: var(--rose); }
.chipdep.nog::after { content: ' ⚠'; color: var(--bad); }
@media (max-width: 820px) { .mcal .cell { min-height: 70px; } .chipdep { font-size: 0; height: 8px; padding: 0; } }

.warnbox { background: var(--bad-soft); color: var(--bad); padding: 12px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.okbox { background: var(--ok-soft); color: var(--ok); padding: 12px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.person { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.person .top { display: flex; gap: 12px; align-items: center; }
.person .avatar { width: 46px; height: 46px; font-size: 15px; background: var(--ink); color: var(--gold); }
.mini-days { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; }
.mini-days i { height: 18px; border-radius: 4px; background: #edf1f0; }
.mini-days i.b { background: var(--ink); }
.auto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.auto { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.auto .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfd8d6; border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(18px); }
.chart-box { position: relative; height: 280px; }
.feed { display: grid; gap: 0; }
.feed > div { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.feed > div:last-child { border-bottom: 0; }
.feed .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; box-shadow: 0 0 0 0 rgba(47,143,99,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(47,143,99,0); } 100% { box-shadow: 0 0 0 0 rgba(47,143,99,0); } }

/* print manifest */
.manifest { background: #fff; max-width: 900px; margin: 0 auto; padding: 40px; }
.manifest h1 { font-size: 30px; }
@media print { .no-print { display: none !important; } body { background: #fff; } .manifest { padding: 0; } }

/* ================= GUIDE APP ================= */
.gapp { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--paper); padding-bottom: 40px; }
.ghead { background: var(--ink); color: #fff; padding: 20px max(18px, env(safe-area-inset-left)) 70px; position: relative; }
.ghead select { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: 10px; padding: 8px 10px; }
.ghead select option { color: var(--ink); }
.gbody { padding: 0 16px; margin-top: -50px; display: grid; gap: 14px; position: relative; }
.gcard { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.gcard .ph { height: 120px; position: relative; }
.gcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.gcard .ph .pill { position: absolute; top: 12px; inset-inline-start: 12px; }
.gcard .in { padding: 16px; display: grid; gap: 8px; }
.pax { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.pax .chkbtn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: #fff; cursor: pointer; font-size: 20px; color: transparent; flex: none; transition: .15s; }
.pax .chkbtn.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.pax .nm { flex: 1; min-width: 0; }
.pax .nm small { display: block; color: var(--muted); }
.note { background: var(--warn-soft); color: #7a5300; padding: 4px 9px; border-radius: 7px; font-size: 12px; font-weight: 700; display: inline-block; margin-top: 3px; }
.progress-ring { font-size: 30px; font-weight: 800; }
.notif { background: var(--gold-soft); border-radius: 14px; padding: 12px 14px; font-size: 14px; display: flex; gap: 10px; align-items: center; }
