/* =====================================================================
   MAU AFRICA SAFARIS — APP UI
   ===================================================================== */
:root {
  --rust: #8f3b1b; --rust-2: #b4532a; --rust-3: #d97a45; --rust-soft: #f6e6dc;
  --ink: #23170f; --ink-2: #3a2a1f; --muted: #7d6c5d; --muted-2: #a5968a;
  --sand: #efe4d6; --cream: #faf6f0; --paper: #ffffff; --line: #eadfd1; --line-2: #f2eadf;
  --olive: #5c6b3a; --olive-soft: #e9eddc; --gold: #c99a3b; --gold-soft: #f7edd5;
  --red: #b42318; --red-soft: #fde8e6; --blue: #2c5d8a; --blue-soft: #e4eef7;
  --serif: 'Fraunces', 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --r: 16px; --r-sm: 10px; --r-lg: 24px;
  --sh-1: 0 1px 2px rgba(35, 23, 15, .05), 0 2px 8px rgba(35, 23, 15, .05);
  --sh-2: 0 6px 24px rgba(35, 23, 15, .09), 0 2px 6px rgba(35, 23, 15, .05);
  --sh-3: 0 24px 60px rgba(35, 23, 15, .22);
  --ease: cubic-bezier(.22, .8, .25, 1);
  --side: 264px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); color: var(--ink); background: var(--cream); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--rust); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -.01em; color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--rust); color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow: auto; color: #f3e9de;
  background: linear-gradient(180deg, rgba(35, 23, 15, .93), rgba(35, 23, 15, .98)), var(--side-img, none) center/cover;
  display: flex; flex-direction: column; padding: 22px 16px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 14px; }
.brand-logo { width: 62px; height: 62px; border-radius: 50%; background: #fff; display: grid; place-items: center; padding: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); flex: none; }
.brand-logo img { width: 100%; }
.brand b { font-family: var(--serif); font-size: 18px; display: block; color: #fff; }
.brand small { color: #cdb9a6; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #a48f7c; margin: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #e9dccd; font-weight: 500; position: relative; transition: background .25s var(--ease), color .25s, transform .25s var(--ease); }
.nav a svg { width: 19px; height: 19px; opacity: .85; flex: none; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; transform: translateX(3px); }
.nav a.on { background: linear-gradient(135deg, var(--rust), var(--rust-2)); color: #fff; box-shadow: 0 8px 20px rgba(143, 59, 27, .45); }
.nav a .count { margin-left: auto; font-size: 11px; background: rgba(255, 255, 255, .14); padding: 1px 8px; border-radius: 99px; }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12px; color: #b9a491; }
.side-foot b { color: #fff; font-weight: 600; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 32px; background: rgba(250, 246, 240, .82); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line-2); }
.top h1 { font-size: 22px; }
.top .crumb { color: var(--muted); font-size: 13px; }
.top .grow { flex: 1; }
.menu-btn { display: none; }
.content { padding: 28px 32px 80px; max-width: 1480px; width: 100%; margin: 0 auto; }

/* ---------- Page transition ---------- */
.page { animation: pageIn .55s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--paper); padding: 9px 16px; border-radius: 12px; font-weight: 600; cursor: pointer; transition: transform .2s var(--ease), box-shadow .25s, background .2s, border-color .2s; white-space: nowrap; color: var(--ink); }
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-1); border-color: #dccbb8; }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: linear-gradient(135deg, var(--rust), var(--rust-2)); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(143, 59, 27, .28); }
.btn.primary:hover { box-shadow: 0 10px 24px rgba(143, 59, 27, .38); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--line-2); box-shadow: none; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.btn.icon { padding: 7px; width: 34px; height: 34px; }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: #f4c7c2; }
.btn.glass { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .28); backdrop-filter: blur(10px); }
.btn.glass:hover { background: rgba(255, 255, 255, .24); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Cards ---------- */
.card { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--sh-1); }
.card.pad { padding: 20px 22px; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-h h3 { font-size: 17px; }
.card-h .grow { flex: 1; }
.card-b { padding: 18px 20px; }
.lift { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.lift:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section-title { display: flex; align-items: end; gap: 12px; margin: 30px 0 14px; }
.section-title h2 { font-size: 22px; }
.section-title p { margin: 0; color: var(--muted); }
.section-title .grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tag.rust { background: var(--rust-soft); color: var(--rust); }
.tag.olive { background: var(--olive-soft); color: var(--olive); }
.tag.gold { background: var(--gold-soft); color: #8a6512; }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.dark { background: var(--ink); color: #fff; }

/* ---------- Hero (dashboard) ---------- */
.hero { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 360px; color: #fff; display: flex; align-items: flex-end; box-shadow: var(--sh-2); isolation: isolate; }
.hero .slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.08); transition: opacity 1.6s ease, transform 9s linear; z-index: -2; }
.hero .slide.on { opacity: 1; transform: scale(1); }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(20, 12, 6, .82) 0%, rgba(20, 12, 6, .45) 45%, rgba(20, 12, 6, .05) 80%), linear-gradient(0deg, rgba(20, 12, 6, .5), transparent 50%); }
.hero-in { padding: 38px 40px; max-width: 680px; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: 12px; color: #f2c9a8; font-weight: 600; }
.hero h2 { color: #fff; font-size: clamp(30px, 4vw, 46px); line-height: 1.05; margin: 10px 0 12px; }
.hero p { color: #ecdfd3; margin: 0 0 22px; font-size: 15.5px; max-width: 520px; }
.hero .dots { position: absolute; right: 26px; bottom: 24px; display: flex; gap: 6px; }
.hero .dots i { width: 8px; height: 8px; border-radius: 9px; background: rgba(255, 255, 255, .4); transition: width .4s var(--ease), background .4s; cursor: pointer; }
.hero .dots i.on { width: 26px; background: #fff; }

/* ---------- Stats ---------- */
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .lbl { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat .val { font-family: var(--serif); font-size: 30px; margin-top: 6px; }
.stat .sub { color: var(--muted); font-size: 12.5px; }
.stat .ico { position: absolute; right: 16px; top: 16px; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--rust-soft); color: var(--rust); }
.stat .ico svg { width: 21px; height: 21px; }

/* ---------- Action tiles ---------- */
.tile { position: relative; border-radius: var(--r); overflow: hidden; min-height: 170px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; cursor: pointer; isolation: isolate; box-shadow: var(--sh-1); }
.tile .bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 1.2s var(--ease); z-index: -2; }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20, 12, 6, .85), rgba(20, 12, 6, .1) 70%); z-index: -1; }
.tile:hover .bg { transform: scale(1.08); }
.tile h3 { color: #fff; font-size: 20px; }
.tile p { margin: 4px 0 0; color: #eadccf; font-size: 13px; }
.tile .arrow { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .18); backdrop-filter: blur(8px); display: grid; place-items: center; transition: transform .35s var(--ease), background .3s; }
.tile:hover .arrow { transform: rotate(-45deg); background: var(--rust); }

/* ---------- Tables ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fcfaf7; position: sticky; top: 0; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr { transition: background .2s; }
.tbl tbody tr:hover { background: #fdf8f3; }
.tbl .r { text-align: right; }
.tbl .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.tbl-wrap { overflow: auto; border-radius: var(--r); }
.tbl input, .tbl select { width: 100%; }

/* ---------- Forms ---------- */
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f > span, .f > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.f .hint { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.inp, select.inp, textarea.inp { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 9px 12px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.inp:hover { border-color: #dccbb8; }
.inp:focus { border-color: var(--rust-2); box-shadow: 0 0 0 4px rgba(180, 83, 42, .14); }
textarea.inp { resize: vertical; min-height: 90px; line-height: 1.55; }
.inp.sm { padding: 6px 9px; border-radius: 9px; font-size: 13px; }
.inp.num { text-align: right; font-variant-numeric: tabular-nums; }
.row { display: grid; gap: 14px; }
.row.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-weight: 500; }
.chk input { accent-color: var(--rust); width: 16px; height: 16px; }
.seg { display: inline-flex; background: var(--line-2); padding: 3px; border-radius: 12px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 13px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--muted); transition: background .25s, color .25s, box-shadow .25s; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #fff; }
.stepper button { border: 0; background: transparent; width: 32px; height: 36px; cursor: pointer; font-size: 17px; color: var(--rust); }
.stepper button:hover { background: var(--rust-soft); }
.stepper input { width: 40px; border: 0; text-align: center; outline: none; font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 12px; font-size: 13px; cursor: pointer; transition: all .2s var(--ease); font-weight: 500; }
.pill:hover { border-color: var(--rust-3); }
.pill.on { background: var(--rust); color: #fff; border-color: var(--rust); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 12px 16px; cursor: pointer; font-weight: 600; color: var(--muted); position: relative; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.tabs button::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px; background: var(--rust); transform: scaleX(0); transition: transform .35s var(--ease); }
.tabs button.on { color: var(--ink); }
.tabs button.on::after { transform: scaleX(1); }
.tabs .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line-2); font-size: 11.5px; }
.tabs button.on .n { background: var(--rust); color: #fff; }

/* ---------- Builder ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 24px; align-items: start; }
.cost-panel { position: sticky; top: 88px; }
.cost-head { padding: 22px; color: #fff; border-radius: var(--r) var(--r) 0 0; background: linear-gradient(135deg, #2b1a10, #5a2b14 60%, var(--rust)); position: relative; overflow: hidden; }
.cost-head::before { content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 70%); }
.cost-head .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: #f0cdb3; }
.cost-head .big { font-family: var(--serif); font-size: 40px; line-height: 1.1; margin: 4px 0 2px; }
.cost-head .pp { color: #f3e2d4; font-size: 13.5px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 13.5px; }
.kv b { font-variant-numeric: tabular-nums; }
.kv.total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; font-size: 15px; }
.bar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; transition: width .6s var(--ease); }
.legend { display: grid; gap: 4px; margin-top: 12px; }
.legend .kv { padding: 4px 0; font-size: 13px; }
.legend .dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 8px; }
.warn-box { background: var(--gold-soft); border: 1px solid #ecd9ab; color: #6d4f10; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; }
.warn-box ul { margin: 6px 0 0; padding-left: 18px; }
.mobile-cost { display: none; }

/* timeline days */
.days { position: relative; display: grid; gap: 16px; }
.day { position: relative; padding-left: 58px; }
.day::before { content: ''; position: absolute; left: 21px; top: 46px; bottom: -18px; width: 2px; background: repeating-linear-gradient(to bottom, var(--line) 0 6px, transparent 6px 11px); }
.day:last-child::before { display: none; }
.day .badge { position: absolute; left: 0; top: 6px; width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--rust), var(--rust-2)); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--serif); font-size: 17px; box-shadow: 0 6px 14px rgba(143, 59, 27, .3); }
.day .badge small { display: block; font-size: 9px; font-family: var(--sans); letter-spacing: .1em; opacity: .85; margin-bottom: -6px; }
.day-card { overflow: hidden; }
.day-top { display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; padding: 14px 16px; align-items: center; cursor: pointer; }
.day-top .thumb { width: 120px; height: 80px; border-radius: 12px; background: var(--sand) center/cover; }
.day-top h4 { font-family: var(--sans); font-size: 15px; font-weight: 700; }
.day-top .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.day-top .amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.day-body { border-top: 1px solid var(--line-2); padding: 16px; display: none; background: #fffdfa; }
.day.open .day-body { display: block; animation: rise .45s var(--ease); }
.day .chev { transition: transform .3s var(--ease); }
.day.open .chev { transform: rotate(180deg); }
.lodge-pick { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.lodge-pick:hover { border-color: var(--rust-3); box-shadow: var(--sh-1); }
.lodge-pick .ph { width: 70px; height: 54px; border-radius: 10px; background: var(--sand) center/cover; }
.add-day { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px; border: 2px dashed var(--line); border-radius: var(--r); background: #fffdf9; margin-left: 58px; }

/* ---------- Lodge gallery ---------- */
.lodges { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.lodge { overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.lodge .ph { height: 180px; background: var(--sand) center/cover; position: relative; overflow: hidden; }
.lodge .ph > div { position: absolute; inset: 0; background: inherit; background-size: cover; transition: transform 1.1s var(--ease); }
.lodge:hover .ph > div { transform: scale(1.07); }
.lodge .ph .tags { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; z-index: 1; flex-wrap: wrap; }
.lodge .ph .tags .tag { background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); }
.lodge .bd { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lodge h4 { font-size: 17px; }
.lodge .from { margin-top: auto; display: flex; justify-content: space-between; align-items: end; padding-top: 10px; border-top: 1px solid var(--line-2); }
.lodge .from b { font-family: var(--serif); font-size: 20px; color: var(--rust); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; color: var(--muted); }
.search input { padding-left: 38px; }

/* ---------- Modal / drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(25, 15, 8, .5); backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .3s ease both; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--cream); border-radius: var(--r-lg); width: min(980px, 100%); max-height: calc(100vh - 40px); overflow: auto; box-shadow: var(--sh-3); animation: pop .45s var(--ease) both; }
.modal.sm { width: min(560px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--cream); z-index: 2; }
.modal-h h3 { font-size: 20px; flex: 1; }
.modal-b { padding: 22px; }
.modal-f { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; background: var(--cream); }
.carousel { position: relative; height: 320px; border-radius: var(--r); overflow: hidden; background: var(--ink); }
.carousel .cs { position: absolute; inset: 0; background: center/cover; opacity: 0; transition: opacity .8s ease; }
.carousel .cs.on { opacity: 1; }
.carousel .nav-b { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); cursor: pointer; display: grid; place-items: center; }
.carousel .nav-b.l { left: 12px; } .carousel .nav-b.r { right: 12px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; }
.thumbs div { flex: none; width: 84px; height: 60px; border-radius: 10px; background: center/cover; cursor: pointer; opacity: .6; transition: opacity .2s, outline .2s; outline: 2px solid transparent; position: relative; }
.thumbs div.on, .thumbs div:hover { opacity: 1; outline-color: var(--rust); }
.thumbs div .x { position: absolute; right: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; display: grid; place-items: center; }
.img-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.img-pick div { height: 92px; border-radius: 10px; background: center/cover; cursor: pointer; outline: 3px solid transparent; transition: outline-color .2s, transform .25s var(--ease); }
.img-pick div:hover { transform: scale(1.03); }
.img-pick div.on { outline-color: var(--rust); }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--sh-3); display: flex; gap: 10px; align-items: center; min-width: 260px; animation: toastIn .45s var(--ease) both; font-weight: 500; }
.toast.error { background: var(--red); }
.toast.ok::before { content: '✓'; width: 22px; height: 22px; border-radius: 50%; background: var(--olive); display: grid; place-items: center; font-size: 13px; }
.toast.out { animation: toastOut .35s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ---------- Lists ---------- */
.list-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center; padding: 12px; border-radius: 14px; transition: background .2s; }
.list-item:hover { background: #fdf7f1; }
.list-item .ph { width: 84px; height: 60px; border-radius: 10px; background: var(--sand) center/cover; }
.list-item h4 { font-family: var(--sans); font-size: 15px; font-weight: 700; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .ill { width: 74px; height: 74px; border-radius: 50%; background: var(--rust-soft); color: var(--rust); display: grid; place-items: center; margin: 0 auto 12px; }
.empty .ill svg { width: 34px; height: 34px; }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* ---------- Quick calculator ---------- */
.calc-result { margin-top: 16px; padding: 16px; border-radius: 14px; background: linear-gradient(135deg, var(--rust-soft), #fbf0e7); border: 1px solid #f0d6c4; }
.calc-result .big { font-family: var(--serif); font-size: 30px; color: var(--rust); }

/* ---------- Doc preview wrapper ---------- */
.doc-wrap { background: #e9e2d8; border-radius: var(--r); padding: 30px 10px; overflow: auto; }
.doc-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.doc-scale { transform-origin: top center; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .builder { grid-template-columns: 1fr; }
  .cost-panel { display: none; }
  .mobile-cost { display: block; position: fixed; left: var(--side); right: 0; bottom: 0; z-index: 40; background: linear-gradient(135deg, #2b1a10, var(--rust)); color: #fff; padding: 12px 22px; box-shadow: 0 -8px 30px rgba(0, 0, 0, .18); }
  .mobile-cost .mc-row { display: flex; align-items: center; gap: 16px; }
  .mobile-cost .big { font-family: var(--serif); font-size: 24px; }
  .mobile-cost .panel { max-height: 0; overflow: hidden; transition: max-height .45s var(--ease); }
  .mobile-cost.open .panel { max-height: 70vh; overflow: auto; }
  .mobile-cost .panel .card { margin-top: 12px; color: var(--ink); }
  .content.has-mc { padding-bottom: 120px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --side: 0px; }
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-105%); transition: transform .4s var(--ease); box-shadow: var(--sh-3); }
  .app.nav-open .side { transform: none; }
  .app.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 25; }
  .menu-btn { display: inline-flex; }
  .top { padding: 12px 16px; }
  .top h1 { font-size: 18px; }
  .content { padding: 18px 14px 90px; }
  .g2, .g3, .row.c3, .row.c4, .row.c5 { grid-template-columns: 1fr 1fr; }
  .hero-in { padding: 26px 22px; }
  .day { padding-left: 0; }
  .day::before, .day .badge { display: none; }
  .day-top { grid-template-columns: 70px 1fr; }
  .day-top .thumb { width: 70px; height: 56px; }
  .day-top .amt { grid-column: 1 / -1; text-align: left; display: flex; justify-content: space-between; }
  .add-day { margin-left: 0; }
  .list-item { grid-template-columns: 60px 1fr; }
  .list-item .ph { width: 60px; height: 48px; }
  .list-item > :last-child { grid-column: 1 / -1; }
  .top .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .g2, .g3, .g4, .row.c2, .row.c3, .row.c4, .row.c5 { grid-template-columns: 1fr; }
  .hero { min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .side, .top, .doc-tools, .toasts, .mobile-cost, .no-print { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
  .doc-wrap { background: none; padding: 0; border-radius: 0; overflow: visible; }
  .doc-scale { transform: none !important; height: auto !important; }
  body { background: #fff; }
}

/* ---------- Login / accounts ---------- */
.auth { position: fixed; inset: 0; display: grid; grid-template-columns: 1fr minmax(360px, 460px); align-items: center; overflow: hidden; background: var(--ink); }
.auth-bg { position: absolute; inset: 0; background: center/cover; opacity: 0; transform: scale(1.08); transition: opacity 1.6s ease, transform 10s linear; }
.auth-bg.on { opacity: 1; transform: scale(1); }
.auth::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 12, 6, .2), rgba(20, 12, 6, .55) 60%, rgba(20, 12, 6, .75)); pointer-events: none; }
.auth-quote { position: relative; z-index: 1; color: #fff; padding: 0 60px; align-self: end; margin-bottom: 70px; animation: rise .9s var(--ease) both; }
.auth-quote .eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: 12px; color: #f2c9a8; font-weight: 600; }
.auth-quote h2 { color: #fff; font-size: clamp(34px, 5vw, 60px); line-height: 1.02; margin: 10px 0; text-shadow: 0 4px 30px rgba(0, 0, 0, .4); }
.auth-quote p { color: #f0e3d6; font-size: 16px; margin: 0; }
.auth-card { position: relative; z-index: 2; margin: 24px; background: rgba(250, 246, 240, .94); backdrop-filter: blur(18px) saturate(1.3); border-radius: var(--r-lg); padding: 34px 32px 28px; box-shadow: var(--sh-3); display: grid; gap: 12px; animation: pop .7s var(--ease) both; text-align: left; }
.auth-card h1 { font-size: 26px; text-align: center; }
.auth-card > p.muted { text-align: center; }
.auth-card.shake { animation: shake .45s ease; }
.auth-card.ok { transform: scale(.97); opacity: 0; transition: all .35s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.auth-err { color: var(--red); font-size: 13px; font-weight: 600; min-height: 18px; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--rust); font-weight: 600; font-size: 12px; cursor: pointer; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--rust), var(--rust-3)); color: #fff; font-weight: 700; flex: none; }
.side-foot .me { display: flex; gap: 10px; align-items: center; }
.side-foot .me span:not(.avatar) { color: #b9a491; }
.side-foot .btn.glass { padding: 5px 10px; font-size: 12px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; align-items: end; }
  .auth-quote { display: none; }
  .auth-card { margin: 16px; }
}
