/* CEO Appointment Desk - styled to match trisaphilip.com (Nov 2026 redesign):
   charcoal, slate and coral on warm off-white, Fraunces + Inter. */
:root {
  --m: #25282F;          /* charcoal: primary */
  --r: #5D5F6B;          /* slate: secondary text, italics */
  --y: #E0533E;          /* coral: accent */
  --y-dark: #C2412E;     /* coral for text on light backgrounds */
  --y-soft: #FBE7E3;
  --c: #F9F8F6;          /* page background */
  --s: #E9E5E2;          /* soft lines */
  --paper: #FFFFFF;
  --ink: #18181B;
  --muted: #5F5F61;
  --line: #E9E5E2;
  --green: #2F6B4F;
  --green-bg: #E6F1EA;
  --amber: #8A5A12;
  --amber-bg: #F8EFDD;
  --red: #B3261E;
  --red-bg: #FCEBE8;
  --blue: #2F5E8C;
  --blue-bg: #E7EEF6;
  --radius: 22px;
  --e: cubic-bezier(.22, 1, .36, 1);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: var(--sans);
  --shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 8px 24px rgba(17, 17, 17, .05);
  --shadow-hover: 0 2px 4px rgba(17, 17, 17, .05), 0 18px 40px rgba(17, 17, 17, .09);
  /* old names kept so every page keeps working */
  --cream: var(--c);
  --maroon: var(--m);
  --bronze: var(--y-dark);
  --olive: var(--r);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body { background: var(--c); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--y-dark); text-decoration: none; transition: color .3s var(--e); }
a:hover { color: var(--m); }
::selection { background: var(--y); color: #fff; }
:focus-visible { outline: 3px solid var(--y); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0 0 .4em; letter-spacing: -.02em; color: var(--m); }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--r); }
.label { display: inline-flex; align-items: center; gap: 10px; font-size: .68rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--r); }
.label b, .label i { font-style: normal; font-family: var(--serif); font-weight: 400; font-size: .85rem; letter-spacing: 0; color: var(--m); border: 1px solid currentColor; border-radius: 30px; padding: 0 9px; margin: 0; }
.page-head .label::after, .dash-head .label::after { content: ""; width: 34px; height: 1px; background: var(--y); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.mark, .spark { color: var(--y); }
hr.divider, .divider { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(249, 248, 246, .86); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; padding-top: env(safe-area-inset-top); }
.topbar.scrolled { border-color: var(--line); box-shadow: 0 6px 24px rgba(17, 17, 17, .04); }
.topbar .in { max-width: 1200px; margin: 0 auto; padding: 14px max(22px, env(safe-area-inset-right)) 14px max(22px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.45rem; color: var(--m); white-space: nowrap; }
.brand:hover { color: var(--m); }
.brand em { font-style: italic; color: var(--r); }
.brand .mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--y); font-size: .9rem; transition: transform .6s var(--e), background .4s; }
.brand:hover .mark { transform: rotate(90deg); background: var(--y); color: #fff; }
.nav { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: flex-end; }
.nl { position: relative; display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 500; color: var(--m); padding: 8px 13px; border-radius: 999px; cursor: pointer; list-style: none; transition: background .3s var(--e), color .3s; }
.nl::-webkit-details-marker { display: none; }
.nl:hover { background: var(--s); color: var(--m); }
.nl.on, .dd.on > .nl { color: var(--m); }
.nl.on::after, .dd.on > .nl::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--y); }
.nl.out { margin-left: 8px; border: 1px solid var(--m); }
.nl.out:hover { background: var(--m); color: var(--c); }
.nbadge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--y); color: #fff; font-size: .7rem; font-weight: 600; }
.dd { position: relative; }
.dd > summary.nl::before { content: ""; order: 2; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .3s var(--e); }
.dd[open] > summary.nl::before { transform: rotate(-135deg) translateY(-1px); }
.dd-menu { position: absolute; top: calc(100% + 10px); left: 50%; min-width: 260px; transform: translateX(-50%); background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 8px; box-shadow: var(--shadow-hover); animation: ddIn .35s var(--e); z-index: 50; }
.dd-menu a { display: block; padding: 10px 14px; border-radius: 12px; color: var(--m); font-size: .88rem; transition: background .25s var(--e); }
.dd-menu a:hover, .dd-menu a.on { background: var(--c); }
.dd-menu a strong { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.dd-menu a small { display: block; color: var(--muted); font-size: .76rem; }
.dd-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 8px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot.int { background: var(--r); }
.dot.ext { background: var(--y); }
.dd > summary { list-style: none; }
.dd > summary::-webkit-details-marker { display: none; }
.dd-menu.right { left: auto; right: 0; transform: none; animation-name: ddInR; }
@keyframes ddInR { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.msg-box.busy { color: var(--muted); font-style: italic; }
@keyframes ddIn { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
.nav-toggle { display: none; margin-left: auto; align-items: center; gap: 10px; font: inherit; font-size: .86rem; font-weight: 600; color: var(--c); background: var(--m); border: 0; border-radius: 999px; padding: 8px 8px 8px 16px; cursor: pointer; }
.nav-toggle i { position: relative; width: 26px; height: 26px; border-radius: 50%; background: var(--y); }
.nav-toggle i::before, .nav-toggle i::after { content: ""; position: absolute; left: 8px; right: 8px; height: 1.5px; background: var(--m); transition: transform .35s var(--e), top .35s var(--e); }
.nav-toggle i::before { top: 10px; }
.nav-toggle i::after { top: 15px; }
.nav-toggle[aria-expanded="true"] i::before { top: 12.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] i::after { top: 12.5px; transform: rotate(-45deg); }

/* ---------- Layout ---------- */
main { max-width: 1200px; margin: 0 auto; padding: 30px max(22px, env(safe-area-inset-right)) 70px max(22px, env(safe-area-inset-left)); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 30px; }
.page-head h1 { margin: 12px 0 8px; }
.page-head p { margin: 0; color: var(--muted); max-width: 620px; }
.grid { display: grid; gap: 22px; align-items: start; }
.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)); }
.span2 { grid-column: span 2; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow); transition: box-shadow .45s var(--e), transform .45s var(--e); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-link { font-size: .82rem; font-weight: 600; color: var(--m); display: inline-flex; align-items: center; gap: 6px; }
.card-link::after { content: "→"; transition: transform .35s var(--e); }
.card-link:hover::after { transform: translateX(4px); }
.stat { padding: 20px 22px; }
.stat .num { font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: var(--m); }
.stat .num em { color: var(--y); font-style: italic; }
.stat .label { display: block; margin-top: 8px; }
.count-chip { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 10px; border-radius: 999px; background: var(--c); border: 1px solid var(--line); font-family: var(--serif); font-size: 1rem; }

/* ---------- Buttons (fill-up hover like the portfolio) ---------- */
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--sans); font-weight: 600; font-size: .86rem; line-height: 1.2; padding: 11px 20px; min-height: 42px; border-radius: 999px; border: 1.5px solid var(--m); background: var(--m); color: var(--c); cursor: pointer; text-decoration: none; white-space: nowrap; -webkit-tap-highlight-color: transparent; transition: color .45s var(--e), border-color .45s var(--e), transform .2s; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--y); transform: translateY(101%); transition: transform .55s var(--e); }
.btn:hover::before { transform: none; }
.btn:hover { color: var(--m); border-color: var(--y); }
.btn:active { transform: scale(.97); }
.btn.maroon { background: var(--m); border-color: var(--m); }
.btn.ghost { background: transparent; color: var(--m); border-color: var(--m); }
.btn.ghost::before { background: var(--m); }
.btn.ghost:hover { color: var(--c); border-color: var(--m); }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.green::before { background: var(--m); }
.btn.green:hover { color: #fff; border-color: var(--m); }
.btn.danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn.danger::before { background: var(--red); }
.btn.danger:hover { color: #fff; border-color: var(--red); }
.btn.wa { background: #1F7A4D; border-color: #1F7A4D; color: #fff; }
.btn.wa::before { background: #15603b; }
.btn.wa:hover { color: #fff; border-color: #15603b; }
.btn.sm { padding: 7px 14px; min-height: 34px; font-size: .8rem; }
.btn.lg { padding: 15px 28px; min-height: 52px; font-size: .98rem; }
.btn .arr { display: grid; place-items: center; width: 24px; height: 24px; margin-right: -8px; border-radius: 50%; background: var(--y); color: var(--m); font-size: .8rem; transition: transform .45s var(--e), background .45s; }
.btn:hover .arr { transform: rotate(-45deg); background: var(--m); color: var(--y); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btns form { display: inline; margin: 0; }

/* ---------- Forms ---------- */
label { display: block; font-size: .8rem; font-weight: 600; color: var(--m); margin: 0 0 6px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=time], input[type=number], input[type=month], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; min-height: 46px; -webkit-appearance: none; appearance: none; transition: border-color .3s var(--e), box-shadow .3s var(--e);
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2325282F' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
input[type=date], input[type=time] { min-width: 0; }
textarea { min-height: 96px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #D6D0CB; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--m); box-shadow: 0 0 0 4px rgba(224, 83, 62, .14); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--y); margin: 0; flex: none; }
.field { margin-bottom: 16px; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row3 { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { margin: 0; min-width: 150px; flex: 1; }
.hp { position: absolute; left: -5000px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; flex-wrap: wrap; }
.seg label, .seg a { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 16px; border-radius: 999px; font-size: .86rem; font-weight: 500; color: var(--m); cursor: pointer; transition: background .3s var(--e), color .3s; }
.seg a:hover, .seg label:hover { background: var(--c); }
.seg a.on, .seg label:has(input:checked) { background: var(--m); color: var(--c); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.link-field { width: auto !important; min-width: 0; flex: 1; font-size: .82rem !important; min-height: 36px !important; padding: 6px 12px !important; border-radius: 999px !important; color: var(--muted) !important; }
dd .link-field { width: 100% !important; margin-bottom: 6px; }

/* ---------- Alerts and toast ---------- */
.alert { border-radius: 16px; padding: 14px 18px; margin-bottom: 16px; border: 1px solid; animation: fadeUp .6s var(--e); }
.alert.ok { background: var(--green-bg); border-color: #C9E0D1; color: var(--green); }
.alert.err, .alert.clash { background: var(--red-bg); border-color: #F3CBC5; color: var(--red); }
.alert.warn { background: var(--amber-bg); border-color: #EBD7AF; color: var(--amber); }
.alert.info { background: var(--paper); border-color: var(--line); color: var(--ink); }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert strong { font-weight: 600; }
.req-banner { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 200; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; max-width: min(92vw, 460px); background: var(--m); color: var(--c); padding: 13px 20px 13px 16px; border-radius: 999px; font-size: .88rem; font-weight: 500; box-shadow: 0 18px 40px rgba(17, 17, 17, .25); display: flex; align-items: center; gap: 10px; transition: opacity .4s var(--e), transform .5s var(--e); }
.toast::before { content: "✓"; display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--y); color: var(--m); font-size: .78rem; font-weight: 700; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; vertical-align: middle; line-height: 1.3; }
.st-requested { color: #6B4E9B; background: #F0EBF7; }
.st-waiting-for-ceo { color: var(--amber); background: var(--amber-bg); }
.st-approved { color: var(--blue); background: var(--blue-bg); }
.st-confirmed { color: var(--green); background: var(--green-bg); }
.st-rescheduled { color: var(--y-dark); background: var(--y-soft); }
.st-declined, .st-cancelled { color: var(--muted); background: #F0EEEC; }
.st-completed { color: var(--r); background: #EEEEF1; }
.pill.src { color: var(--muted); border-color: var(--line); background: transparent; }
.pill.type-internal { color: var(--m); background: #ECEDF0; }
.pill.type-internal::before, .pill.type-external::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--r); }
.pill.type-external { color: var(--y-dark); background: var(--y-soft); }
.pill.type-external::before { background: var(--y); }
.pill.locked { color: var(--m); border-color: var(--m); background: transparent; }
.pill.clash { color: #fff; background: var(--red); }

/* ---------- Tables and lists ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--r); padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr, table tr { transition: background .25s; }
table tr:hover td { background: #FCFBFA; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 84px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .t { font-family: var(--serif); font-size: 1.05rem; white-space: nowrap; color: var(--m); padding-top: 2px; }
.timeline .ev, .timeline .ap { position: relative; padding: 2px 0 2px 16px; border-left: 2px solid var(--r); }
.timeline .ap { border-left-color: var(--y); }
.timeline .is-clash { background: var(--red-bg); border-radius: 12px; padding: 10px 14px; border-left-color: var(--red); }
.timeline a strong { color: var(--m); }
.history { list-style: none; padding: 0; margin: 0; }
.history li { padding: 0 0 18px 24px; position: relative; }
.history li::before { content: "✦"; position: absolute; left: 0; top: 1px; color: var(--y); font-size: .78rem; }
.empty { color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 1.05rem; padding: 10px 0; margin: 0; }
dl.facts { display: grid; grid-template-columns: 130px 1fr; gap: 10px 16px; margin: 0; }
dl.facts dt { font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--r); padding-top: 4px; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.req-list { list-style: none; margin: 0; padding: 0; }
.req { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.req:last-child { border-bottom: 0; }
.req-main { flex: 1; min-width: 220px; }
.req-text { margin: 6px 0 0; }

/* ---------- Collapsible sections ---------- */
details.fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2, details.fold > summary h3 { margin: 0; }
details.fold > summary .count-chip { margin-left: auto; }
details.fold > summary::after { content: "+"; display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); font-size: 1.1rem; color: var(--m); transition: transform .45s var(--e), background .3s, color .3s; }
details.fold > summary:hover::after { background: var(--m); color: var(--c); border-color: var(--m); }
details.fold[open] > summary::after { transform: rotate(45deg); }
details.fold[open] > summary { margin-bottom: 14px; }
details.fold > :not(summary) { animation: fadeUp .5s var(--e); }
.sum-meta { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* ---------- Dashboard ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin: 6px 0 22px; }
.dash-head h1 { margin: 12px 0 0; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.chip { display: inline-flex; align-items: baseline; gap: 10px; padding: 10px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; color: var(--m); font-size: .84rem; transition: border-color .35s var(--e), transform .35s var(--e), box-shadow .35s var(--e); }
.chip b { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; line-height: 1; }
.chip.hot b { color: var(--y); }
.chip:hover { color: var(--m); border-color: var(--m); transform: translateY(-2px); box-shadow: var(--shadow); }
.dash { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.dash-side { display: grid; gap: 16px; }
.hero-card { padding: 30px 32px; }
.side-card { padding: 18px 22px; }
.side-card h3 { font-size: 1.1rem; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list a { color: var(--m); font-weight: 600; }
.mini-list .when { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.calm { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .88rem; margin: 0; }
.calm::before { content: "✦"; color: var(--y); }
.new-btn { position: relative; }

/* ---------- Slots ---------- */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.slot { position: relative; margin: 0; }
.slot input { position: absolute; opacity: 0; }
.slot span { display: block; text-align: center; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); padding: 12px 8px; cursor: pointer; font-size: .9rem; font-weight: 500; transition: border-color .3s var(--e), transform .3s var(--e), background .3s; }
.slot span:hover { border-color: var(--m); transform: translateY(-2px); }
.slot span small { display: block; font-size: .72rem; color: var(--muted); letter-spacing: .06em; }
.slot input:checked + span { background: var(--m); border-color: var(--m); color: var(--c); }
.slot input:checked + span small { color: #F6C9C1; }
.slot input:focus-visible + span { outline: 3px solid var(--y); outline-offset: 2px; }
.day-group { margin-bottom: 18px; }
.day-group h4 { font-family: var(--sans); font-weight: 600; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--r); margin: 0 0 10px; }

/* ---------- Message writer ---------- */
.msg-box { display: block; width: 100%; resize: vertical; font-family: inherit; color: inherit; line-height: 1.6; white-space: pre-wrap; background: var(--c); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; min-height: 150px; font-size: 16px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { font: inherit; font-size: .84rem; font-weight: 500; border: 1px solid var(--line); background: var(--paper); color: var(--m); border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: background .3s var(--e), border-color .3s; }
.tabs button:hover { border-color: var(--m); }
.tabs button.on { background: var(--m); color: var(--c); border-color: var(--m); }
.ai-tag { font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--y-dark); }

/* ---------- Charts (report) ---------- */
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: 140px 1fr 36px; gap: 12px; align-items: center; font-size: .86rem; }
.bar .track { background: var(--c); border-radius: 999px; height: 10px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--m); border-radius: 999px; transform-origin: left; animation: grow 1.1s var(--e); }
.bar .fill.b { background: var(--y); }
.bar .fill.o { background: var(--r); }
.bar .v { font-family: var(--serif); font-size: 1rem; text-align: right; }
.weekchart { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 10px; }
.weekchart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.weekchart .colbar { width: 100%; max-width: 40px; background: var(--m); border-radius: 10px 10px 4px 4px; min-height: 2px; transform-origin: bottom; animation: growY 1.1s var(--e); }
.weekchart .cl { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.weekchart .cv { font-family: var(--serif); }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes growY { from { transform: scaleY(0); } }

/* ---------- Public pages ---------- */
body.pub { --glow: rgba(224, 83, 62, .10); background: radial-gradient(1200px 500px at 85% -10%, var(--glow), transparent 60%), var(--c); min-height: 100vh; }
.public { max-width: 760px; margin: 0 auto; padding: calc(44px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 60px max(20px, env(safe-area-inset-left)); }
.public .hero { text-align: center; margin-bottom: 30px; }
.public .hero h1 { font-size: clamp(2.1rem, 6vw, 3.2rem); margin-top: 14px; }
.public-top { text-align: center; padding: 22px 0 0; }
.summary-card .lead-sm { color: var(--muted); margin: 0 0 16px; }
.choice-list { display: grid; gap: 12px; }
details.choice { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); transition: border-color .35s var(--e), box-shadow .35s var(--e); }
details.choice:hover { border-color: #D6D0CB; box-shadow: var(--shadow-hover); }
details.choice > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 18px 20px; cursor: pointer; }
details.choice > summary::-webkit-details-marker { display: none; }
details.choice > summary::after { content: "→"; margin-left: auto; color: var(--m); transition: transform .4s var(--e); }
details.choice[open] > summary::after { transform: rotate(90deg); }
details.choice summary strong { display: block; color: var(--m); font-weight: 600; }
details.choice summary small { display: block; color: var(--muted); font-size: .82rem; }
details.choice .ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--c); color: var(--m); font-size: 1rem; transition: background .35s, color .35s; }
details.choice:hover .ic, details.choice[open] .ic { background: var(--m); color: var(--c); }
details.choice.danger .ic { color: var(--red); }
details.choice.danger:hover .ic, details.choice.danger[open] .ic { background: var(--red); color: #fff; }
details.choice > form { padding: 0 20px 20px; animation: fadeUp .5s var(--e); }
.ceo-actions { display: grid; gap: 10px; }
.ceo-actions .btn { justify-content: center; }
.foot { text-align: center; font-size: .68rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding: 26px 20px calc(30px + env(safe-area-inset-bottom)); }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--y-dark); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 22px; }
.login-card { width: 100%; max-width: 420px; }
.demo-note { font-size: .78rem; background: var(--amber-bg); border: 1px dashed #D9C08E; border-radius: 12px; padding: 10px 12px; margin-top: 14px; }

/* ---------- Agenda sheet ---------- */
.agenda-sheet { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 38px; box-shadow: var(--shadow); }
.agenda-sheet table td { padding: 12px 10px; }

/* ---------- Password show / hide ---------- */
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 70px; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: inherit; font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--y-dark); background: none; border: 0; padding: 8px 10px; cursor: pointer; border-radius: 999px; }
.pw-eye:hover { background: var(--c); }

/* ---------- Motion ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal > * { animation: fadeUp .8s var(--e) both; }
.reveal > *:nth-child(2) { animation-delay: .06s; }
.reveal > *:nth-child(3) { animation-delay: .12s; }
.reveal > *:nth-child(4) { animation-delay: .18s; }
.reveal > *:nth-child(n+5) { animation-delay: .24s; }
@media (hover: hover) {
  a.card:hover, .card.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .topbar, .no-print, .foot, .toast { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
  .agenda-sheet { border: 0; padding: 0; box-shadow: none; }
  .reveal > * { animation: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1020px) {
  .dash { grid-template-columns: 1fr; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g2 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .nav-toggle { display: inline-flex; }
  .topbar .in { flex-wrap: wrap; }
  .nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 0 6px; max-height: calc(100dvh - 80px); overflow-y: auto; }
  .nav.open { display: flex; animation: fadeUp .4s var(--e); }
  .nl { padding: 13px 14px; font-size: 1rem; border-radius: 14px; }
  .nl.on::after, .dd.on > .nl::after { left: 0; right: auto; top: 12px; bottom: 12px; width: 3px; height: auto; }
  .nl.out { margin: 8px 0 0; justify-content: center; }
  .dd > summary.nl { justify-content: space-between; }
  .dd-menu { position: static; transform: none; min-width: 0; box-shadow: none; border: 0; background: transparent; padding: 0 0 6px 12px; animation: fadeUp .35s var(--e); }
  .dd-menu a { padding: 11px 14px; font-size: .95rem; }
}
/* ---------- Phones (Android and iPhone) ---------- */
@media (max-width: 720px) {
  body { font-size: 15px; }
  main { padding-top: 20px; }
  .card { padding: 20px 18px; border-radius: 18px; }
  .hero-card { padding: 22px 18px; }
  .row, .row3 { grid-template-columns: 1fr; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head { margin-bottom: 22px; }
  .page-head > .btn, .page-head > .btns { width: 100%; }
  .page-head > .btns .btn { flex: 1; }
  .bar { grid-template-columns: 96px 1fr 30px; }
  dl.facts { grid-template-columns: 1fr; gap: 2px; }
  dl.facts dd { margin-bottom: 10px; }
  .timeline li { grid-template-columns: 70px 1fr; gap: 12px; }
  .timeline .t { font-size: .92rem; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .slot span { padding: 10px 6px; font-size: .86rem; }
  .dash-head .new-btn, .dash-head .new-btn > summary { width: 100%; }
  .mini-list li { flex-wrap: wrap; }
  .chips { gap: 8px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-right: -22px; padding-right: 22px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .agenda-sheet { padding: 22px 18px; }
  /* tables become stacked cards */
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap tr:first-child:has(th) { display: none; }
  .table-wrap tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .table-wrap tr:last-child { border-bottom: 0; }
  .table-wrap td { border: 0; padding: 3px 0; }
  .table-wrap td:empty { display: none; }
  .btns .btn { min-height: 44px; }
  .req-actions { width: 100%; }
  .req-actions form, .req-actions .btn { flex: 1; }
  .req-actions .btn { width: 100%; }
  .filters .field { min-width: calc(50% - 6px); }
  .seg { width: 100%; }
  .seg a, .seg label { flex: 1; justify-content: center; }
}

/* ---------- NIFT booking: NIFT red is the shared brand colour; Team and Guest get a subtle tint ---------- */
body.theme-landing, body.theme-team, body.theme-guest { --y: #D7182A; --y-dark: #B51322; --y-soft: #FCE8EA; --glow: rgba(215, 24, 42, .07); }
body.theme-team  { --tint: #2F7D5B; --tint-soft: #E6F2EB; --glow: rgba(47, 125, 91, .10); }
body.theme-guest { --tint: #26344D; --tint-soft: #E8ECF3; --glow: rgba(38, 52, 77, .09); }
body.theme-landing .btn.maroon, body.theme-team .btn.maroon, body.theme-guest .btn.maroon { background: var(--y); border-color: var(--y); color: #fff; }
body.theme-landing .btn.maroon::before, body.theme-team .btn.maroon::before, body.theme-guest .btn.maroon::before { background: var(--m); }
body.theme-landing .btn.maroon:hover, body.theme-team .btn.maroon:hover, body.theme-guest .btn.maroon:hover { color: #fff; border-color: var(--m); }
body.theme-team .slot input:checked + span, body.theme-guest .slot input:checked + span { background: var(--y); border-color: var(--y); color: #fff; }
body.theme-team .slot input:checked + span small, body.theme-guest .slot input:checked + span small { color: rgba(255, 255, 255, .85); }
body.theme-team .card, body.theme-guest .card { border-top: 4px solid var(--tint); }
body.theme-team .day-group h4, body.theme-guest .day-group h4 { color: var(--tint); }
.org { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; }
.org-logo-img { height: 64px; width: auto; display: block; }
.org-logo { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--y); color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .08em; }
.org-name { font-size: .66rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--r); }
.org:has(img) .org-name { display: none; }
.hero h1 em { color: var(--r); }
.who-tag { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 6px 14px; border-radius: 999px; background: var(--tint-soft); color: var(--tint); font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.who-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tint); }
.who-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.who-card { --ac: #2F7D5B; --ac-soft: #E6F2EB; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 30px 26px 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; color: var(--m); box-shadow: var(--shadow); transition: transform .5s var(--e), box-shadow .5s var(--e), border-color .5s var(--e); -webkit-tap-highlight-color: transparent; }
.who-card.guest { --ac: #26344D; --ac-soft: #E8ECF3; }
.who-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--ac); }
.who-card:hover { color: var(--m); transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--ac); }
.who-card:active { transform: scale(.98); }
.who-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--ac-soft); color: var(--ac); font-size: 1.2rem; margin-bottom: 10px; transition: background .4s, color .4s; }
.who-card:hover .who-ic { background: var(--ac); color: #fff; }
.who-card strong { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; line-height: 1.1; }
.who-card small { color: var(--muted); font-size: .9rem; }
.who-go { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--y); }
.who-go i { font-style: normal; transition: transform .4s var(--e); }
.who-card:hover .who-go i { transform: translateX(5px); }
@media (max-width: 560px) {
  .who-grid { grid-template-columns: 1fr; }
  .who-card { padding: 20px 46px 20px 18px; display: grid; grid-template-columns: 46px 1fr; column-gap: 14px; row-gap: 0; align-items: center; }
  .who-ic { margin: 0; width: 46px; height: 46px; grid-row: span 2; }
  .who-card strong { font-size: 1.35rem; }
  .who-go { display: none; }
  .who-card::after { content: "→"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--y); font-weight: 600; }
  .org-logo-img { height: 54px; }
}
.hero .org { display: flex; width: max-content; margin: 0 auto; }
.hero .who-tag { display: flex; width: max-content; max-width: 100%; margin: 16px auto 0; }

/* ---------- Booking page v3: hero bands per audience ---------- */
.bk-hero { position: relative; overflow: hidden; color: #fff; text-align: center; padding: calc(34px + env(safe-area-inset-top)) 20px 92px; background: linear-gradient(135deg, #D7182A 0%, #A80F1E 100%); }
.bk-hero::before, .bk-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.bk-hero::before { width: 420px; height: 420px; right: -120px; top: -160px; background: rgba(255,255,255,.08); }
.bk-hero::after { width: 260px; height: 260px; left: -90px; bottom: -120px; background: rgba(255,255,255,.06); }
.bk-hero-in { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; animation: bkUp .8s var(--e) both; }
.bk-logo { display: inline-block; background: #fff; padding: 10px 18px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.bk-logo img { display: block; height: 46px; width: auto; }
.bk-kicker { margin-top: 22px; font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.bk-hero h1 { color: #fff; font-size: clamp(2rem, 6vw, 3.1rem); margin: 10px 0 12px; line-height: 1.08; }
.bk-hero h1 em { font-style: italic; color: #fff; opacity: .92; }
.bk-hero p { margin: 0 auto; max-width: 500px; color: rgba(255,255,255,.88); font-size: 1rem; }
body.theme-team .bk-hero { background: linear-gradient(135deg, #2F7D5B 0%, #1D5A40 100%); }
body.theme-team .bk-hero h1 em { color: #CFEBDD; }
body.theme-guest .bk-hero { background: linear-gradient(160deg, #26344D 0%, #141C2B 100%); border-bottom: 6px solid #D7182A; }
body.theme-guest .bk-hero h1 em { color: #FF8A94; }
body.theme-guest .bk-hero::before { background: rgba(215,24,42,.16); }
.bk-body.public { position: relative; z-index: 2; margin-top: -64px; padding-top: 0; }
.bk-body .card { border-radius: 24px; box-shadow: 0 18px 50px rgba(37,40,47,.10); }
body.theme-team .bk-body .card, body.theme-guest .bk-body .card { border-top: 0; }
body.theme-team .bk-form { border-left: 6px solid #2F7D5B; }
body.theme-guest .bk-form { background: #fff; border: 1px solid #DCE1EA; }
.bk-body .who-card { box-shadow: 0 18px 50px rgba(37,40,47,.12); }
.bk-steps { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 26px; margin: 30px 0 0; padding: 0; color: var(--muted); font-size: .9rem; }
.bk-steps li { display: flex; align-items: center; gap: 10px; }
.bk-steps b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--y-soft); color: var(--y); font-size: .8rem; }
.bk-sec { display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; font-family: var(--serif); font-size: 1.3rem; color: var(--m); }
.bk-sec + .row, .bk-sec + .field { margin-top: 0; }
.bk-form .bk-sec ~ .bk-sec { margin-top: 28px; padding-top: 24px; border-top: 1px dashed var(--line); }
.bk-sec span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--tint, var(--y)); color: #fff; font-family: var(--sans); font-size: .85rem; font-weight: 600; }
body.theme-guest .bk-sec span { background: #D7182A; }
.bk-form select:disabled { opacity: .55; cursor: not-allowed; }
.bk-form select, .bk-form input[type=date] { min-height: 48px; }
.bk-hint { margin: 2px 0 20px; }
.bk-hint.ok { color: var(--tint, var(--y)); font-weight: 600; }
.bk-hint.none { color: #B51322; font-weight: 600; }
.bk-send { width: 100%; justify-content: center; margin: 8px 0 14px; }
.bk-send .arr { display: inline-block; transition: transform .4s var(--e); }
.bk-send:hover .arr { transform: translateX(5px); }
.bk-done { padding: 44px 26px; }
.bk-check { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; background: var(--tint, var(--y)); color: #fff; font-size: 2rem; animation: bkPop .6s var(--e) both; }
@keyframes bkUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bkPop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@media (max-width: 640px) {
  .bk-hero { padding-bottom: 80px; }
  .bk-logo img { height: 38px; }
  .bk-hero p { font-size: .94rem; }
  .bk-steps { flex-direction: column; align-items: flex-start; margin-left: 8px; }
  body.theme-team .bk-form { border-left-width: 4px; }
}
@media (prefers-reduced-motion: reduce) { .bk-hero-in, .bk-check { animation: none; } }

/* Booking v3 round 3: professional type and maroon staff theme */
.bk-hero h1, .bk-body h2, .bk-sec, .bk-body .who-card strong { font-family: var(--sans); font-style: normal; letter-spacing: -.01em; }
.bk-hero h1 { font-weight: 700; font-size: clamp(1.8rem, 5vw, 2.6rem); }
.bk-body h2 { font-weight: 700; }
.bk-sec { font-weight: 600; font-size: 1.1rem; }
.bk-body .who-card strong { font-weight: 700; font-size: 1.45rem; }
body.theme-team { --tint: #7A0F1A; --tint-soft: #F6E7E9; }
body.theme-team .bk-hero { background: linear-gradient(135deg, #7A0F1A 0%, #4A0810 100%); border-bottom: 6px solid #D7182A; }
body.theme-team .bk-form { border-left: 0; border-top: 5px solid #7A0F1A; }
.who-card.team { --ac: #7A0F1A; --ac-soft: #F6E7E9; }
@media (max-width: 640px) { .bk-body .who-card strong { font-size: 1.2rem; } }
