:root {
  --orange: #f7941d; --orange-d: #d97a08; --orange-l: #fff3e4;
  --ink: #2c2c2e; --ink-2: #3b3b3d; --muted: #77777c; --line: #e7e4df;
  --bg: #f7f5f2; --card: #fff; --green: #1f9d55; --green-l: #e6f6ec; --red: #c0392b; --red-l: #fdecea;
  --blue: #2f6fd0; --blue-l: #e9f1fc; --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 14px rgba(0,0,0,.04);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 Archivo, system-ui, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--orange-d); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.25; }
h3 { font-size: 16px; }
.serif { font-family: 'Playfair Display', Georgia, serif; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.pre { white-space: pre-wrap; }
.mt { margin-top: 14px; display: block; }
code { background: #f1efeb; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
[hidden] { display: none !important; }

/* ----- forms ----- */
label { display: block; font-weight: 600; font-size: 14px; }
label > input, label > select, label > textarea { margin-top: 5px; }
input, select, textarea {
  width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: #fff;
  border: 1px solid #d9d5cf; border-radius: 8px; padding: 9px 11px; min-height: 42px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: var(--orange); }
input[type=radio], input[type=checkbox] { width: auto; min-height: 0; accent-color: var(--orange); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.stack > * + * { margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.inline { display: inline-block; }
.inline label { display: flex; align-items: center; gap: 8px; }
.inline select { margin: 0; width: auto; min-width: 180px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.code { font: 13px/1.5 ui-monospace, Consolas, monospace; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 600 14px Archivo, sans-serif; padding: 9px 16px; min-height: 40px; border-radius: 8px;
  border: 1px solid #d9d5cf; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none !important;
}
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primary:hover { background: var(--orange-d); border-color: var(--orange-d); }
.btn.ghost { background: transparent; }
.btn.wa { background: #1faa53; border-color: #1faa53; color: #fff; }
.btn.big { min-height: 48px; font-size: 16px; padding: 12px 22px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.linkbtn { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--orange-d); cursor: pointer; }
.linkbtn.danger { color: var(--red); }
.x { background: none; border: 0; font-size: 20px; line-height: 1; color: #aaa; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.x:hover { color: var(--red); background: var(--red-l); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label, .seg a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; padding: 7px 12px; border: 1px solid #d9d5cf; border-radius: 999px; cursor: pointer; background: #fff; color: var(--ink); }
.seg label:has(input:checked), .seg a.on { border-color: var(--orange); background: var(--orange-l); }
.seg.small a { padding: 4px 10px; font-size: 13px; }

/* ----- flash, pills ----- */
.flash { background: var(--blue-l); color: #1d4a8f; padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; }
.flash.ok { background: var(--green-l); color: #146c3b; }
.flash.err { background: var(--red-l); color: var(--red); }
.main > .flash { margin: 14px 24px 0; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #eee; color: #444; white-space: nowrap; }
.st-enquiry { background: #fff1de; color: #a05a00; }
.st-q_sent, .st-q_received { background: #f1eafd; color: #6a3fb5; }
.st-site_visit { background: #e7f4fb; color: #1d6f97; }
.st-quote_sent { background: var(--blue-l); color: #1d4a8f; }
.st-confirmed, .st-planning { background: var(--green-l); color: #146c3b; }
.st-event_day { background: #ffe8d1; color: #b45200; }
.st-closed { background: #eee; color: #555; }
.st-lost { background: var(--red-l); color: var(--red); }
.qs-draft { background: #eee; color: #555; } .qs-sent { background: var(--blue-l); color: #1d4a8f; }
.qs-changes { background: var(--red-l); color: var(--red); } .qs-approved { background: var(--green-l); color: #146c3b; }
.badge { margin-left: auto; background: var(--orange); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 999px; }
.dot-new { font-size: 10px; font-weight: 700; color: #fff; background: var(--orange); padding: 1px 5px; border-radius: 4px; vertical-align: 2px; }

/* ----- cards & tables ----- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card.flush { padding: 0; overflow-x: auto; }
.card .pad { padding: 18px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid #f0eeea; vertical-align: top; }
.table tr[data-href] { cursor: pointer; }
.table tr[data-href]:hover td { background: #fcfaf7; }
.table tr.is-new td:first-child { box-shadow: inset 3px 0 var(--orange); }
.table tr.faded td { opacity: .5; }
.table.compact td { padding: 7px 8px; }
.num { text-align: right !important; white-space: nowrap; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid #f0eeea; }
.list li:last-child { border: 0; }
.list li a, .list li { display: flex; flex-direction: column; padding: 8px 0; color: var(--ink); }
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; margin: 0; }
.dl dt { color: var(--muted); font-size: 14px; }
.dl dd { margin: 0; }
.dl.qa { grid-template-columns: minmax(160px, 38%) 1fr; }
.dl.qa dt { color: var(--ink-2); font-weight: 500; }
h3.sec { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--orange-d); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.cols.wide-left { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.cols > * { min-width: 0; }

/* ----- admin shell ----- */
body.admin { display: flex; min-height: 100vh; }
.side { width: 230px; flex: none; background: var(--ink); color: #ddd; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: block; padding: 22px 22px 16px; }
.brand img { width: 110px; display: block; }
.side nav { flex: 1; padding: 8px 10px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: #d6d6d6; font-weight: 500; text-decoration: none; }
.side nav a svg { width: 19px; height: 19px; fill: currentColor; opacity: .8; }
.side nav a:hover { background: rgba(255,255,255,.06); }
.side nav a.on { background: var(--orange); color: #fff; }
.side-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-foot .me { color: #eee; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.side-foot .linkbtn { color: #aaa; font-size: 13px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.avatar.big { width: 46px; height: 46px; font-size: 20px; }
.main { flex: 1; min-width: 0; }
.top { display: flex; align-items: center; gap: 14px; padding: 16px 24px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top h1 { font-size: 20px; margin: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; }
.content { padding: 22px 24px 40px; max-width: 1280px; }
.scrim { display: none; }

/* dashboard */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); box-shadow: var(--shadow); text-decoration: none !important; border-top: 3px solid var(--orange); }
.kpi b { display: block; font-size: 30px; line-height: 1.1; }
.kpi span { color: var(--muted); font-size: 14px; }
.pipe-row { display: grid; grid-template-columns: 170px 1fr 34px; gap: 10px; align-items: center; padding: 5px 0; color: var(--ink); text-decoration: none !important; }
.pipe-row:hover .pipe-label { color: var(--orange-d); }
.pipe-label { font-size: 14px; }
.pipe-bar { height: 10px; background: #f2efea; border-radius: 99px; overflow: hidden; }
.pipe-bar i { display: block; height: 100%; border-radius: 99px; background: var(--orange); }
.pipe-row b { text-align: right; }

/* filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input[type=search] { max-width: 320px; }
.filters select { width: auto; }

/* enquiry form */
.form-card { max-width: 720px; }
.form-card.wide { max-width: 860px; }
.datebox .dm { display: none; gap: 14px; margin-top: 10px; }
.datebox[data-mode=single] .dm-single, .datebox[data-mode=range] .dm-range { display: grid; grid-template-columns: 1fr 1fr; }
.datebox[data-mode=options] .dm-options { display: block; }
.datebox[data-mode=single] .dm-range-only { display: none; }
.datebox[data-mode=range] .dm-single-only { display: none; }
.date-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.date-opts input { width: auto; }

/* event page */
.ev-title { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ev-title h2 { font-size: 22px; margin-bottom: 6px; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); font-size: 14px; }
.ev-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.ev-controls { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin: 16px 0 6px; }
.progress { display: flex; list-style: none; padding: 0; margin: 14px 0 0; counter-reset: s; overflow-x: auto; }
.progress li { flex: 1; min-width: 92px; position: relative; text-align: center; font-size: 12px; color: var(--muted); padding-top: 22px; }
.progress li::before { content: ''; position: absolute; top: 5px; left: 0; right: 0; height: 3px; background: #ebe7e1; }
.progress li::after { content: ''; position: absolute; top: 0; left: 50%; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: #fff; border: 2px solid #d5d0c8; }
.progress li.done { color: var(--ink-2); }
.progress li.done::before, .progress li.now::before { background: var(--orange); }
.progress li.done::after { background: var(--orange); border-color: var(--orange); }
.progress li.now { color: var(--orange-d); font-weight: 700; }
.progress li.now::after { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-l); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.tabs a.on { color: var(--ink); border-color: var(--orange); }
.addrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.addrow input, .addrow select { flex: 1 1 130px; width: auto; }
.addrow input:first-of-type { flex: 2 1 180px; }
.tasks { list-style: none; margin: 0; padding: 0; }
.tasks li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f0eeea; }
.tasks li.done .t-title { text-decoration: line-through; color: var(--muted); }
.tasks .t-title { flex: 1; }
.check { width: 22px; height: 22px; border: 2px solid #ccc; border-radius: 6px; background: #fff; cursor: pointer; color: #fff; font-size: 13px; line-height: 1; padding: 0; }
.tasks li.done .check { background: var(--green); border-color: var(--green); }
.late { color: var(--red); font-weight: 600; }
.comment-box { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 10px 12px; border-radius: 8px; margin-bottom: 8px; background: #faf8f5; font-size: 14px; }
.feed li.comment { background: var(--orange-l); }
.feed-head { margin-bottom: 2px; }
.client-msg { color: var(--red); margin-top: 4px; }
.danger-zone { margin-top: 10px; text-align: right; }

/* send dialog */
.dlg { border: 0; border-radius: 14px; padding: 22px; width: min(560px, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dlg::backdrop { background: rgba(30,30,30,.45); }
.dlg form { position: relative; }
.dlg-x { position: absolute; top: -12px; right: -10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.dlg-x:hover { background: #f1eee9; color: inherit; }
.linkline { display: flex; gap: 8px; }
.linkline input { font-size: 13px; color: var(--muted); }

/* quote builder */
.qb-sec { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 14px; background: #fcfbf9; }
.qb-sec-h { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.qb-title { font-weight: 700; }
.qb-sec-total { font-weight: 700; white-space: nowrap; }
.qb-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 64px 64px 104px 30px; gap: 6px; align-items: center; margin-bottom: 6px; }
.qb-head { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.qb-head span:nth-child(n+2) { text-align: right; }
.qb-row input { min-height: 36px; padding: 6px 9px; }
.f-qty, .f-rate { text-align: right; }
.f-amt { text-align: right; font-weight: 600; white-space: nowrap; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0 0 14px; align-items: center; }
.totals dd { margin: 0; text-align: right; white-space: nowrap; }
.totals .grand { font-weight: 700; font-size: 18px; border-top: 1px solid var(--line); padding-top: 8px; }
.pct { width: 70px; min-height: 32px; padding: 4px 6px; display: inline-block; text-align: right; }
.sticky { position: sticky; top: 84px; }

/* settings */
.embed-preview { border: 1px dashed #ccc; border-radius: 10px; padding: 12px; background: #f3f1ed; }
.big-code { font-size: 18px; padding: 3px 8px; }

/* ----- public pages ----- */
body.public { min-height: 100vh; display: flex; flex-direction: column; }
.pub-head { text-align: center; padding: 22px 16px 6px; }
.pub-head img { height: 64px; }
.pub { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 16px; }
.pub .card { margin-left: auto; margin-right: auto; }
.pub-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 18px; }
.card.narrow { max-width: 420px; margin-top: 30px; }
body.embed { background: transparent; }
body.embed .pub { padding: 0; max-width: none; }
body.embed .card { box-shadow: none; border: 0; padding: 4px; background: transparent; max-width: none; }
.tick { width: 60px; height: 60px; margin: 6px auto 14px; border-radius: 50%; background: var(--green-l); color: var(--green); font-size: 32px; line-height: 60px; }
.back { display: inline-block; margin-bottom: 10px; font-size: 14px; }

/* questionnaire */
.steps-head { display: flex; justify-content: space-between; font-weight: 600; margin-top: 10px; }
.stepbar { height: 5px; background: #eee9e2; border-radius: 99px; margin: 6px 0 18px; overflow: hidden; }
.stepbar i { display: block; height: 100%; background: var(--orange); transition: width .3s; }
.qq { margin-bottom: 18px; }
.ql { margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-weight: 500; cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 8px 14px; border: 1px solid #d9d5cf; border-radius: 999px; background: #fff; }
.chip input:checked + span { background: var(--orange); border-color: var(--orange); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.qnav { margin-top: 10px; }
[data-review] h4 { color: var(--orange-d); margin: 16px 0 6px; }

/* portal */
.portal .hello { text-align: center; background: linear-gradient(160deg, #fff 0%, var(--orange-l) 100%); }
.portal .hello h2 { font-size: 26px; margin-bottom: 4px; }
.countdown { display: inline-flex; flex-direction: column; margin-top: 8px; }
.countdown b { font-size: 42px; color: var(--orange-d); line-height: 1; font-family: 'Playfair Display', serif; }
.planner { display: flex; align-items: center; gap: 12px; }
.planner > div { flex: 1; }
.todo { display: grid; grid-template-columns: 1fr auto; padding: 12px 14px; border: 1px solid var(--orange); background: var(--orange-l); border-radius: 10px; margin-bottom: 8px; color: var(--ink); text-decoration: none !important; }
.todo span { grid-column: 1; }
.todo i { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-size: 24px; color: var(--orange-d); }
.vprogress { list-style: none; margin: 0; padding: 0 0 0 6px; }
.vprogress li { position: relative; padding: 0 0 14px 24px; color: var(--muted); }
.vprogress li::before { content: ''; position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #d5d0c8; background: #fff; }
.vprogress li::after { content: ''; position: absolute; left: 6px; top: 19px; bottom: 0; width: 2px; background: #ebe7e1; }
.vprogress li:last-child::after { display: none; }
.vprogress li.done { color: var(--ink); font-weight: 600; }
.vprogress li.done::before { background: var(--orange); border-color: var(--orange); }
.pnav { display: flex; gap: 10px; }
.pnav a { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; font-size: 22px; color: var(--ink); text-decoration: none; }
.pnav span { display: block; font-size: 14px; font-weight: 600; }
.pq-sec { border-top: 1px solid var(--line); padding: 10px 0; }
.pq-h, .pq-item { display: flex; justify-content: space-between; gap: 12px; }
.pq-item { padding: 5px 0 5px 10px; font-size: 14px; }
.pq-item small { display: block; }
details summary { list-style: none; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }

/* ----- responsive ----- */
@media (max-width: 980px) {
  .cols, .cols.wide-left { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .sticky { position: static; }
}
@media (max-width: 760px) {
  .side { position: fixed; left: 0; top: 0; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  body.side-open .side { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 20; }
  .menu-btn { display: block; }
  .top { padding: 12px 16px; }
  .top .btn { padding: 8px 10px; }
  .content { padding: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .datebox[data-mode=range] .dm-range { grid-template-columns: 1fr; }
  .dl, .dl.qa { grid-template-columns: 1fr; }
  .dl dd { margin-bottom: 8px; }
  .qb-row { grid-template-columns: 1fr 76px 48px 48px 30px; }
  .qb-row .f-amt { display: none; }
  .qb-head span:nth-child(5) { display: none; }
  .pipe-row { grid-template-columns: 130px 1fr 28px; }
  .card { padding: 16px; }
  .main > .flash { margin: 12px 16px 0; }
}

/* ===== phase 2: roles, events, calendar, reports, files, guests, feedback, alerts ===== */
.optbox { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; cursor: pointer; }
.optbox input { margin-top: 4px; accent-color: var(--orange); width: 16px; height: 16px; flex: none; }
.checks { display: grid; gap: 8px; }
.checks .check { width: auto; height: auto; border: 0; background: none; color: inherit; font-size: 14px; display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.checks .check input { margin-top: 4px; accent-color: var(--orange); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.pad { padding: 16px 18px; }
.center { text-align: center; }
.faded { opacity: .55; }
.star { color: var(--orange); }
.inline { display: inline-flex; align-items: center; gap: 8px; }

/* bell */
.bell { position: relative; display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 50%; color: var(--ink-2); }
.bell:hover { background: #f2efea; }
.bell svg { width: 22px; height: 22px; fill: currentColor; }
.bell .badge { position: absolute; top: 2px; right: 0; margin: 0; }
.alerts { list-style: none; margin: 0; padding: 0; }
.alerts li a { display: grid; gap: 2px; padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.alerts li.unread a { background: var(--orange-l); box-shadow: inset 3px 0 var(--orange); }
.alerts li a:hover { background: #faf8f5; }

/* enquiries stage chips */
.stage-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.stage-chips a { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.stage-chips a b { opacity: .7; margin-left: 4px; }
.stage-chips a.on { outline: 2px solid var(--orange); outline-offset: 1px; }

/* dashboard */
.stage-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stage-card { border-radius: var(--radius); padding: 14px; text-decoration: none !important; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.stage-card b { font-size: 28px; line-height: 1; }
.stage-card span { font-size: 13px; font-weight: 600; }
.stage-card.empty { opacity: .55; }
.att { list-style: none; margin: 0; padding: 0; }
.att li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.att li:last-child { border: 0; }
.att-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.att-txt { flex: 1; display: flex; flex-direction: column; color: var(--ink); text-decoration: none !important; min-width: 0; }

/* event page: comments panel on the right */
.ev-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.ev-main > section + section, .ev-main > div > section + section { margin-top: 0; }
.ev-side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.mood { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.mood figure { margin: 0; border-radius: 10px; overflow: hidden; background: #f2efea; }
.mood img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.mood figcaption { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; font-size: 12px; color: var(--muted); }
.upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.upload input[type=file] { flex: 1 1 200px; font-size: 14px; }
.drop { display: block; border: 2px dashed var(--orange); border-radius: 12px; background: var(--orange-l); text-align: center; padding: 22px; cursor: pointer; font-weight: 600; color: var(--orange-d); width: 100%; }
.drop input { display: none; }
.rsvp-sum { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.rs { padding: 4px 10px; border-radius: 999px; font-size: 13px; background: #f2efea; }
.rs-yes { background: var(--green-l); color: #146c3b; }
.rs-no { background: var(--red-l); color: var(--red); }
.rs-maybe { background: #fff1de; color: #a05a00; }
.rs-sel { padding: 4px 8px; font-size: 13px; border-radius: 999px; }
.kpis.three { grid-template-columns: repeat(3, 1fr); }

/* events list */
.event-cards { display: grid; gap: 12px; }
.ev-card { display: flex; gap: 16px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: var(--radius); padding: 14px 16px; color: var(--ink); text-decoration: none !important; box-shadow: var(--shadow); }
.ev-card:hover { border-color: var(--c); }
.ev-date { width: 64px; flex: none; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.ev-date b { font-size: 28px; line-height: 1; color: var(--c); font-family: 'Playfair Display', serif; }
.ev-date span { font-size: 12px; color: var(--muted); }
.ev-body { flex: 1; min-width: 0; }
.ev-card .ev-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #f2efea; font-size: 12px; }
.tag.warn { background: #fff1de; color: #a05a00; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 14px; }

/* calendar */
.cal-title { margin: 0 6px; min-width: 190px; text-align: center; font-size: 22px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 0 0 10px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend i.tent { border: 2px dashed #999; }
.legend i.b1 { background: #f8c88d; } .legend i.b2 { background: var(--orange-d); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: hidden; }
.cal-h { padding: 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; border-bottom: 1px solid var(--line); background: #faf8f5; }
.cal-d { min-height: 108px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.cal-d:nth-child(7n) { border-right: 0; }
.cal-d.out { background: #faf8f5; }
.cal-d.today .cal-n { background: var(--orange); color: #fff; }
.cal-n { font-size: 12px; font-weight: 600; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal-ev { display: block; font-size: 12px; font-weight: 600; padding: 3px 6px; border-radius: 5px; background: var(--c); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none !important; }
.cal-ev small { display: block; font-weight: 400; opacity: .9; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.tent { background: #fff; color: var(--ink); border: 1.5px dashed var(--c); }

/* reports & feedback bars */
.mchart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; height: 200px; align-items: end; }
.mcol { display: flex; flex-direction: column; align-items: center; height: 100%; }
.mbars { flex: 1; width: 100%; display: flex; gap: 3px; align-items: flex-end; justify-content: center; }
.mbars i { width: 40%; max-width: 22px; border-radius: 4px 4px 0 0; min-height: 2px; }
.mbars .b1 { background: #f8c88d; } .mbars .b2 { background: var(--orange-d); }
.mcol span { font-size: 12px; color: var(--muted); margin-top: 4px; }
.hbar { height: 8px; background: #f2efea; border-radius: 99px; overflow: hidden; display: inline-block; width: 90px; vertical-align: middle; margin-right: 8px; }
.hbar i { display: block; height: 100%; background: var(--orange); border-radius: 99px; }
.hbar.big { display: block; width: 100%; height: 10px; margin: 6px 0 4px; }
.srow { display: grid; grid-template-columns: minmax(0, 1fr) 120px 36px; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.srow .hbar { width: 100%; margin: 0; }
.srow b { text-align: right; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }

/* settings add-ons, portal add-ons */
.addons { border-top: 1px solid var(--line); padding-top: 12px; }
.addon { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.addon:has(input:checked) { border-color: var(--orange); background: var(--orange-l); }
.addon input { margin-top: 4px; accent-color: var(--orange); width: 18px; height: 18px; }
.addon small { display: block; }
.addon em { font-style: normal; font-weight: 700; white-space: nowrap; }

/* portal */
.pub.has-pnav { padding-bottom: 96px; }
.hero { background: radial-gradient(circle at 85% 10%, rgba(247,148,29,.45), transparent 55%), var(--ink-2); color: #fff; border-radius: 18px; padding: 28px 22px; text-align: center; margin-bottom: 16px; box-shadow: var(--shadow); }
.hero h2 { font-size: 30px; margin: 0 0 6px; color: #fff; }
.hero-hi { margin: 0 0 4px; color: #f8c88d; font-weight: 600; }
.hero-sub { margin: 0; color: #ddd; }
.hero .countdown { display: inline-flex; flex-direction: row; gap: 12px; margin-top: 18px; }
.hero .countdown div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 12px; padding: 10px 14px; min-width: 76px; }
.hero .countdown b { display: block; font-size: 32px; color: var(--orange); }
.hero .countdown span { font-size: 12px; color: #ccc; }
.hero-today { margin-top: 14px; font-size: 20px; color: var(--orange); font-weight: 700; }
.todo { grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.todo > span { grid-column: auto !important; display: flex; flex-direction: column; }
.todo i { grid-row: auto !important; grid-column: auto !important; }
.todo-ic { font-size: 22px; }
.pnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 0; background: var(--ink-2); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 18px rgba(0,0,0,.12); justify-content: center; }
.pnav a { flex: 1; max-width: 140px; background: none; border: 0; border-radius: 10px; padding: 6px 4px; text-align: center; color: #bbb; font-size: 12px; text-decoration: none !important; }
.pnav a svg { width: 22px; height: 22px; fill: currentColor; display: block; margin: 0 auto 2px; }
.pnav a span { font-size: 12px; font-weight: 600; }
.pnav a.on { color: var(--orange); }
.glist { list-style: none; margin: 0; padding: 0; }
.glist li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.glist li > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fb-q { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.stars input { position: absolute; opacity: 0; width: 0; }
.stars label { font-size: 32px; line-height: 1; color: #ddd; cursor: pointer; transition: color .1s; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: var(--orange); }
.stars input:focus-visible + label { outline: 2px solid var(--orange); border-radius: 4px; }
.review-ask { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--orange); background: var(--orange-l); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.review-ask p { margin: 0; }

@media (max-width: 1100px) { .ev-layout { grid-template-columns: 1fr; } .ev-side { position: static; max-height: none; } }
@media (max-width: 760px) {
  .cal-d { min-height: 64px; }
  .cal-ev { font-size: 10px; padding: 2px 3px; }
  .cal-ev small { display: none; }
  .kpis.three { grid-template-columns: 1fr 1fr 1fr; }
  .srow { grid-template-columns: minmax(0, 1fr) 70px 30px; }
  .top .bell { width: 32px; }
}

/* BillPro-style quotation */
.qb-row textarea.f-item { min-height: 36px; padding: 6px 9px; resize: none; overflow: hidden; line-height: 1.4; }
.gst-box { margin: 8px 0; display: grid; gap: 8px; }
.gst-box .row { gap: 12px; flex-wrap: wrap; }
.gst-box .pct, .totals .pct { width: 64px; }
.addon-sec { background: var(--orange-l); }
.pq-item small { display: block; }
.qb { container-type: inline-size; }
@container (max-width: 620px) {
  .qb-row { grid-template-columns: 1fr 1fr 1fr 30px; }
  .qb-row .f-item { grid-column: 1 / -1; }
  .qb-row .f-amt { display: block; grid-column: 1 / 4; text-align: right; font-weight: 600; }
  .qb-row.qb-head { display: none; }
  .qb-row[data-ii] { border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
  .qb-row[data-ii] .x { grid-row: 2; grid-column: 4; }
}

/* global search in the top bar */
.top-search { position: relative; display: flex; align-items: center; }
.top-search svg { position: absolute; left: 10px; width: 16px; height: 16px; fill: var(--ink-2); pointer-events: none; }
.top-search input { width: 260px; padding: 8px 12px 8px 32px; border-radius: 999px; background: #f6f3ee; border-color: transparent; }
.top-search input:focus { background: #fff; border-color: var(--orange); }
@media (max-width: 900px) { .top-search input { width: 160px; } }
@media (max-width: 600px) { .top-search input { width: 38px; padding-right: 0; color: transparent; cursor: pointer; } .top-search input:focus { width: 60vw; color: inherit; cursor: text; position: relative; z-index: 2; } .top-search input::placeholder { color: transparent; } .top-search input:focus::placeholder { color: var(--ink-2); } }
/* dashboard greeting */
.greet { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.greet h2 { margin: 0; font-family: 'Playfair Display', serif; font-size: 26px; }
/* next-stage button */
.ev-controls .next-stage { margin: 0; }
/* feedback groups */
.fb-group { border: 0; padding: 0; margin: 0 0 8px; display: grid; gap: 14px; }
.fb-group legend { font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); margin-bottom: 4px; padding: 0; }
.guest-left { font-size: 13px; margin: 6px 0 0; }
.embed-mode { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0 10px; }

/* web push on the account page */
.push-box { background: #faf7f2; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.push-box p { margin: 0; }

/* Kriti Calendar link */
.cal-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--green); background: #e9f6ee; border-radius: 999px; padding: 5px 12px; }
.cal-link.wait { color: #8a5a00; background: #fff3d6; }
.cal-state.ok { color: var(--green); font-size: 15px; margin: 6px 0; }

/* ---- Team: the phone app inside the website ---- */
.side nav .nav-sep { margin: 10px 12px; border-top: 1px solid rgba(255,255,255,.12); }
.content:has(> .team-frame-wrap) { max-width: none; padding: 0; }
.team-frame-wrap { display: flex; flex-direction: column; height: calc(100vh - 64px); }
.team-hint { margin: 8px 24px; }
.team-frame { flex: 1; width: 100%; border: 0; background: #fff; }
.side nav { overflow-y: auto; min-height: 0; }
.side nav a { padding-top: 8px; padding-bottom: 8px; }
