/* Reflovate front desk — warm theme (phase 2). */
:root {
  --ink:#1d2433; --muted:#5b6475; --line:#e6e1d8; --bg:#f7f3ec; --card:#ffffff;
  --brand:#16324f; --brand-2:#1f4d6b; --teal:#0f766e; --teal-soft:#e0f2ef;
  --amber:#d97706; --amber-soft:#fff4e0; --coral:#e2553f; --coral-soft:#fdecea;
  --green:#15803d; --green-soft:#e7f6ec; --violet:#6d4fc2; --violet-soft:#efeafd;
  --radius:16px; --shadow:0 1px 2px rgba(22,50,79,.06), 0 6px 18px rgba(22,50,79,.07);
  --nav-h:64px;
}
* { box-sizing:border-box; }
html, body { height:100%; }
body {
  margin:0; font:16px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color:var(--ink);
  background-color:var(--bg);
  background-image:
    radial-gradient(circle at 12% -10%, rgba(217,119,6,.05), transparent 40%),
    radial-gradient(circle at 110% 10%, rgba(15,118,110,.05), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.05 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment:fixed;
}
a { color:var(--teal); }
:focus-visible { outline:3px solid #f59e0b; outline-offset:2px; border-radius:8px; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
svg.i { width:20px; height:20px; flex:none; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; vertical-align:-4px; }

/* ---------- shell ---------- */
.shell { display:flex; min-height:100vh; }
.side { width:248px; flex:none; position:sticky; top:0; height:100vh; padding:20px 14px; color:#e8eef5;
  background:linear-gradient(165deg, #16324f 0%, #1f4d6b 55%, #0f5f62 100%); display:flex; flex-direction:column; gap:6px; }
.side .logo { display:flex; align-items:center; gap:10px; font-weight:800; font-size:1.15rem; padding:4px 10px 16px; letter-spacing:.2px; }
.logo .mark { width:36px; height:36px; border-radius:11px; display:grid; place-items:center; background:linear-gradient(135deg,#f59e0b,#e2553f); color:#fff; font-weight:800; box-shadow:0 4px 12px rgba(226,85,63,.35); }
.side .tenant { font-size:.8rem; color:#b9cadb; padding:0 10px 10px; }
.navlink { display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:12px; color:#d3dfeb; text-decoration:none; font-weight:500; transition:background .15s, color .15s, transform .15s; }
.navlink:hover { background:rgba(255,255,255,.08); color:#fff; }
.navlink.on { background:rgba(255,255,255,.16); color:#fff; box-shadow:inset 3px 0 0 #f59e0b; }
.navlink .badge { margin-left:auto; background:#e2553f; color:#fff; font-size:.72rem; font-weight:700; border-radius:99px; padding:1px 7px; }
.side .spacer { flex:1; }
.content { flex:1; min-width:0; }
.topbar { display:none; }
main { max-width:1080px; margin:0 auto; padding:24px 24px 120px; animation:fade .25s ease; }
@keyframes fade { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
.bottom { display:none; }

/* ---------- type & bits ---------- */
h1 { font-size:1.6rem; line-height:1.2; margin:0 0 4px; letter-spacing:-.3px; }
h2 { font-size:1.05rem; margin:26px 0 10px; display:flex; align-items:center; gap:8px; }
.sub { color:var(--muted); margin:0 0 16px; }
.muted { color:var(--muted); } .small { font-size:.86rem; } .tiny { font-size:.76rem; }
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; } .grow { flex:1; min-width:0; }
.stack > * + * { margin-top:10px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px; box-shadow:var(--shadow); }
.card + .card { margin-top:10px; }
.card.click { cursor:pointer; transition:transform .12s, box-shadow .12s; } .card.click:hover { transform:translateY(-1px); box-shadow:0 10px 26px rgba(22,50,79,.12); }
.urgent { border-left:5px solid var(--coral); background:linear-gradient(90deg, var(--coral-soft), #fff 40%); }
.pill { display:inline-flex; align-items:center; gap:4px; font-size:.74rem; font-weight:600; padding:2px 9px; border-radius:99px; background:#f1ede6; color:#4a5263; white-space:nowrap; }
.pill.red { background:var(--coral-soft); color:#b4321f; } .pill.amber { background:var(--amber-soft); color:#9a5304; }
.pill.green { background:var(--green-soft); color:var(--green); } .pill.teal { background:var(--teal-soft); color:var(--teal); } .pill.violet { background:var(--violet-soft); color:var(--violet); }
.hero { border-radius:22px; padding:22px; color:#fff; position:relative; overflow:hidden;
  background:linear-gradient(135deg, #16324f 0%, #1f4d6b 50%, #0f766e 100%); box-shadow:0 12px 30px rgba(22,50,79,.25); }
.hero::after { content:""; position:absolute; right:-40px; top:-40px; width:220px; height:220px; border-radius:50%; background:radial-gradient(circle, rgba(245,158,11,.45), transparent 65%); }
.hero h1 { color:#fff; } .hero .sub { color:#cfe0ee; margin:0; }
.stats { display:grid; grid-template-columns:repeat(4, 1fr); gap:12px; margin-top:16px; }
.stat { border-radius:16px; padding:14px; display:flex; flex-direction:column; gap:2px; text-decoration:none; color:var(--ink); border:1px solid var(--line); background:#fff; box-shadow:var(--shadow); transition:transform .12s; }
.stat:hover { transform:translateY(-2px); }
.stat b { font-size:1.7rem; line-height:1.1; } .stat span { font-size:.82rem; color:var(--muted); }
.stat .ic { width:34px; height:34px; border-radius:10px; display:grid; place-items:center; margin-bottom:6px; }
.stat.c1 .ic { background:var(--teal-soft); color:var(--teal); } .stat.c2 .ic { background:var(--coral-soft); color:var(--coral); }
.stat.c3 .ic { background:var(--amber-soft); color:var(--amber); } .stat.c4 .ic { background:var(--violet-soft); color:var(--violet); }
.quick { display:flex; gap:10px; overflow-x:auto; padding:4px 2px 8px; margin-top:6px; scrollbar-width:none; }
.quick button { flex:none; }
.empty { text-align:center; padding:26px 14px; color:var(--muted); border:2px dashed var(--line); border-radius:var(--radius); background:rgba(255,255,255,.6); }
.empty svg.i { width:34px; height:34px; color:#b8ae9c; display:block; margin:0 auto 8px; }
.timeline .when { font-weight:700; min-width:64px; color:var(--brand); }

/* ---------- forms & buttons ---------- */
input, select, textarea, button { font:inherit; }
input, select, textarea { width:100%; padding:11px 12px; border:1.5px solid #ddd5c8; border-radius:12px; background:#fffdfa; color:var(--ink); transition:border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color:var(--teal); box-shadow:0 0 0 4px rgba(15,118,110,.12); outline:none; }
label { display:block; font-size:.84rem; font-weight:600; color:#3f4757; margin:10px 0 5px; }
.btn, button { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:10px 16px; border-radius:12px; border:0; cursor:pointer; font-weight:600;
  background:linear-gradient(135deg, #1f4d6b, #16324f); color:#fff; box-shadow:0 2px 6px rgba(22,50,79,.25); transition:transform .1s, box-shadow .15s, opacity .15s; text-decoration:none; }
.btn:hover, button:hover { box-shadow:0 6px 16px rgba(22,50,79,.25); } .btn:active, button:active { transform:scale(.98); }
button.accent, .btn.accent { background:linear-gradient(135deg, #f59e0b, #e2553f); box-shadow:0 2px 8px rgba(226,85,63,.3); }
button.ghost, .btn.ghost { background:#fff; color:var(--brand); border:1.5px solid #d9d1c4; box-shadow:none; }
button.soft, .btn.soft { background:var(--teal-soft); color:var(--teal); box-shadow:none; }
button.danger { background:#fff; color:#b4321f; border:1.5px solid #f2c4bc; box-shadow:none; }
button.sm, .btn.sm { padding:7px 12px; font-size:.86rem; border-radius:10px; }
button:disabled { opacity:.55; cursor:default; }
.call { background:linear-gradient(135deg,#16a34a,#15803d); } .text { background:linear-gradient(135deg,#2563eb,#1d4ed8); }
.err { color:#b4321f; } .ok { color:var(--green); }
.tabs { display:flex; gap:6px; background:#efe9df; padding:4px; border-radius:14px; width:max-content; max-width:100%; overflow-x:auto; margin-bottom:14px; }
.tabs button { background:transparent; color:#4a5263; box-shadow:none; padding:8px 14px; border-radius:10px; white-space:nowrap; }
.tabs button.on { background:#fff; color:var(--brand); box-shadow:0 1px 4px rgba(0,0,0,.08); }
.switch { display:inline-flex; align-items:center; gap:8px; cursor:pointer; font-size:.88rem; font-weight:500; margin:0; color:var(--ink); }
.switch input { appearance:none; width:40px; height:22px; border-radius:99px; background:#d6cfc3; position:relative; padding:0; border:0; transition:background .15s; cursor:pointer; flex:none; }
.switch input::after { content:""; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:#fff; transition:left .15s; box-shadow:0 1px 3px rgba(0,0,0,.2); }
.switch input:checked { background:var(--teal); } .switch input:checked::after { left:21px; }
.drop { border:2px dashed #cfc5b4; border-radius:var(--radius); padding:26px; text-align:center; background:rgba(255,255,255,.7); cursor:pointer; transition:background .15s, border .15s; }
.drop.over, .drop:hover { background:var(--teal-soft); border-color:var(--teal); }
.skel { border-radius:12px; height:64px; background:linear-gradient(90deg,#efe9df 25%,#f8f4ee 37%,#efe9df 63%); background-size:400% 100%; animation:sh 1.2s infinite; margin-bottom:10px; }
@keyframes sh { 0% { background-position:100% 50%; } 100% { background-position:0 50%; } }
.toast { position:fixed; left:50%; bottom:96px; transform:translateX(-50%); background:#16324f; color:#fff; padding:10px 16px; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.25); z-index:60; animation:fade .2s; font-size:.92rem; }
.viewas { background:linear-gradient(90deg,#fff4e0,#fde9d9); color:#8a4a06; padding:8px 16px; text-align:center; border-bottom:1px solid #f4d2a8; font-size:.9rem; }
.viewas button { margin-left:8px; }

/* ---------- sign in ---------- */
.signin-wrap { min-height:100vh; display:grid; place-items:center; padding:20px; }
.signin { width:100%; max-width:410px; }
.signin .hero { margin-bottom:-18px; padding-bottom:36px; }
.signin .card { position:relative; }

/* ---------- calendar ---------- */
.cal-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.grid { display:grid; grid-template-columns:52px repeat(7, minmax(92px, 1fr)); background:#fff; border:1px solid var(--line); border-radius:var(--radius); overflow:auto; box-shadow:var(--shadow); max-height:70vh; }
.grid .dh:first-child { left:0; z-index:4; }
.grid .dh { position:sticky; top:0; z-index:3; background:#fbf8f3; border-bottom:1px solid var(--line); padding:8px 6px; text-align:center; font-size:.82rem; font-weight:700; }
.grid .dh.today { color:var(--teal); background:var(--teal-soft); }
.grid .dh small { display:block; font-weight:500; color:var(--muted); }
.grid .hours { position:sticky; left:0; z-index:2; background:#fbf8f3; border-right:1px solid var(--line); }
.grid .hl { height:48px; font-size:.72rem; color:var(--muted); text-align:right; padding:2px 6px 0 0; }
.grid .col { position:relative; border-left:1px solid #f0ebe3; background-image:repeating-linear-gradient(#fff 0 47px, #f0ebe3 47px 48px); }
.grid .col.today { background-image:repeating-linear-gradient(#f4fbfa 0 47px, #e3efed 47px 48px); }
.ev { position:absolute; left:4px; right:4px; border-radius:10px; padding:4px 7px; font-size:.76rem; line-height:1.25; overflow:hidden; cursor:pointer; border:0; text-align:left; display:block; color:#0b3b37;
  background:linear-gradient(135deg,#ccfbef,#a7f3e0); box-shadow:0 1px 3px rgba(0,0,0,.12); font-weight:500; }
.ev b { display:block; font-size:.74rem; }
.ev.block { background:repeating-linear-gradient(45deg,#eceae6,#eceae6 6px,#e1ddd6 6px,#e1ddd6 12px); color:#4a5263; }
.ev.web { background:linear-gradient(135deg,#ffedd5,#fed7aa); color:#7a3e05; }
.now-line { position:absolute; left:0; right:0; height:2px; background:var(--coral); z-index:2; }
.now-line::before { content:""; position:absolute; left:-4px; top:-3px; width:8px; height:8px; border-radius:50%; background:var(--coral); }
.legend { display:flex; gap:12px; font-size:.8rem; color:var(--muted); margin-top:8px; flex-wrap:wrap; }
.legend i { display:inline-block; width:12px; height:12px; border-radius:4px; margin-right:5px; vertical-align:-1px; }

/* ---------- sheet / modal ---------- */
.overlay { position:fixed; inset:0; background:rgba(16,24,40,.35); z-index:40; animation:fadeo .2s; }
@keyframes fadeo { from { opacity:0; } to { opacity:1; } }
.sheet { position:fixed; z-index:50; background:#fffdf9; display:flex; flex-direction:column; box-shadow:0 20px 60px rgba(0,0,0,.25);
  right:20px; bottom:20px; width:420px; height:min(640px, calc(100vh - 40px)); border-radius:22px; overflow:hidden; animation:up .22s ease; }
@keyframes up { from { transform:translateY(24px); opacity:0; } to { transform:none; opacity:1; } }
.sheet header { padding:14px 16px; color:#fff; background:linear-gradient(135deg,#16324f,#0f766e); display:flex; align-items:center; gap:10px; }
.sheet header .x { margin-left:auto; background:rgba(255,255,255,.15); box-shadow:none; padding:6px; border-radius:10px; }
.sheet .body { flex:1; overflow:auto; padding:14px; display:flex; flex-direction:column; gap:8px; }
.sheet .modes { padding:8px 12px 0; }
.sheet form { display:flex; gap:8px; padding:12px; border-top:1px solid var(--line); background:#fff; }
.modal { position:fixed; z-index:50; left:50%; top:50%; transform:translate(-50%,-50%); width:min(560px, calc(100vw - 24px)); max-height:calc(100vh - 40px); overflow:auto; background:#fffdf9; border-radius:22px; padding:20px; box-shadow:0 20px 60px rgba(0,0,0,.25); animation:fadeo .2s; }
.msg { max-width:86%; padding:9px 13px; border-radius:16px; white-space:pre-wrap; font-size:.94rem; animation:fade .2s; }
.msg.owner { align-self:flex-end; background:linear-gradient(135deg,#1f4d6b,#16324f); color:#fff; border-bottom-right-radius:5px; }
.msg.amy { align-self:flex-start; background:#fff; border:1px solid var(--line); border-bottom-left-radius:5px; }
.msg time { display:block; font-size:.7rem; opacity:.65; margin-top:3px; }
.msg .src { margin-top:6px; font-size:.78rem; color:var(--muted); border-top:1px dashed var(--line); padding-top:6px; }
.chips { display:flex; gap:6px; flex-wrap:wrap; } .chips button { padding:5px 11px; font-size:.82rem; border-radius:99px; }
.fab { position:fixed; right:24px; bottom:24px; z-index:30; width:62px; height:62px; border-radius:20px; padding:0;
  background:linear-gradient(135deg,#f59e0b,#e2553f); box-shadow:0 10px 26px rgba(226,85,63,.45); }
.fab svg.i { width:28px; height:28px; }
.fab .dot { position:absolute; top:-4px; right:-4px; background:#16324f; color:#fff; font-size:.65rem; padding:2px 6px; border-radius:99px; }
.steps { display:flex; gap:6px; margin-bottom:14px; } .steps span { flex:1; height:6px; border-radius:99px; background:#e8e1d5; } .steps span.on { background:linear-gradient(90deg,#f59e0b,#e2553f); }

table { width:100%; border-collapse:collapse; } td, th { text-align:left; padding:8px; border-bottom:1px solid var(--line); font-size:.88rem; vertical-align:top; }


/* ---------- p2b: tappable items, flags, categories, contact sheet ---------- */
button.card.item { display:flex; flex-direction:column; align-items:stretch; gap:6px; width:100%; text-align:left; font:inherit; font-weight:400; color:var(--ink);
  background:var(--card); border:1px solid var(--line); box-shadow:var(--shadow); padding:14px 16px; margin:0 0 10px; border-radius:var(--radius); cursor:pointer; }
button.card.item.row { flex-direction:row; align-items:center; }
button.card.item.urgent { border-left:5px solid var(--coral); background:linear-gradient(90deg, var(--coral-soft), #fff 40%); }
button.card.item:hover { box-shadow:0 10px 26px rgba(22,50,79,.12); transform:translateY(-1px); }
button.card.item.done { opacity:.7; }
button.card.item svg.i { color:#a69c8b; }
.item .sum { color:#3f4757; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.chips.flags { display:flex; flex-wrap:wrap; gap:5px; }
.pill svg.i { width:13px; height:13px; vertical-align:-2px; }
.catbar { display:flex; flex-wrap:wrap; gap:8px; padding:2px 2px 10px; }
.catbar .cat { flex:none; background:#fff; color:var(--ink); border:1.5px solid var(--line); box-shadow:none; border-radius:99px; padding:7px 13px; font-size:.88rem; }
.catbar .cat .n { display:inline-block; min-width:22px; padding:0 6px; border-radius:99px; background:#f1ede6; font-size:.76rem; margin-left:2px; }
.catbar .cat.on { color:#fff; border-color:transparent; background:linear-gradient(135deg,#1f4d6b,#16324f); }
.catbar .cat.on .n { background:rgba(255,255,255,.22); }
.catbar .cat.emergency.on { background:linear-gradient(135deg,#e2553f,#b4321f); } .catbar .cat.urgent.on { background:linear-gradient(135deg,#f59e0b,#d97706); }
.catbar .cat.booked.on { background:linear-gradient(135deg,#16a34a,#15803d); } .catbar .cat.missed.on { background:linear-gradient(135deg,#e2553f,#c2410c); }
.catbar .cat.spam.on { background:linear-gradient(135deg,#7c5cd6,#6d4fc2); } .catbar .cat.routine.on { background:linear-gradient(135deg,#14b8a6,#0f766e); }
.facts { display:grid; grid-template-columns:auto 1fr; gap:6px 14px; margin:8px 0 12px; }
.facts dt { color:var(--muted); font-size:.85rem; } .facts dd { margin:0; font-weight:600; }
.sum-card { background:#fbf8f3; box-shadow:none; white-space:pre-wrap; }
.contact { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:14px; }
.btn.big, button.big { padding:15px 16px; font-size:1.08rem; border-radius:14px; }
.btn.big svg.i, button.big svg.i { width:22px; height:22px; }
.contact button:disabled { background:#e6e1d8; color:#6b7385; box-shadow:none; }
@media (max-width: 899px) {
  .modal.detail { left:0; right:0; top:auto; bottom:0; transform:none; width:auto; max-height:88vh; border-radius:22px 22px 0 0; padding:18px 18px calc(18px + env(safe-area-inset-bottom)); animation:up .22s ease; }
  .modal.detail::before { content:""; display:block; width:44px; height:5px; border-radius:99px; background:#d9d1c4; margin:-6px auto 10px; }
}


/* ---------- p3: calm, minimal structure ---------- */
main { max-width:760px; }
.page { margin:4px 0 18px; } .page h1 { margin:0; } .page .sub { margin:2px 0 0; }
.block { margin-top:22px; } .block h2 { font-size:.8rem; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); margin:0 0 8px; }
.mini { display:grid; grid-template-columns:repeat(4,1fr); background:#fff; border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.mini a { padding:12px 10px; text-align:center; text-decoration:none; color:var(--ink); }
.mini a + a { border-left:1px solid var(--line); }
.mini b { display:block; font-size:1.4rem; line-height:1.1; } .mini span { font-size:.78rem; color:var(--muted); }
button.item { display:block; width:100%; text-align:left; font:inherit; font-weight:400; color:var(--ink); background:#fff; border:1px solid var(--line);
  border-radius:12px; padding:12px 14px; margin:0 0 8px; box-shadow:none; cursor:pointer; transition:border-color .15s, background .15s; }
button.item:hover { box-shadow:none; border-color:#cfc5b4; background:#fffdfa; } button.item:active { transform:none; background:#faf6ef; }
button.item .top { display:flex; align-items:center; gap:10px; } button.item .top b { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
button.item .meta { display:block; font-size:.84rem; color:var(--muted); margin-top:2px; }
button.item .when { font-weight:700; color:var(--brand); white-space:nowrap; font-size:.92rem; }
button.item.act { border-left:4px solid var(--amber); } button.item.act.emergency, button.item.act.missed { border-left-color:var(--coral); }
button.item.done { opacity:.6; }
.tag { flex:none; font-size:.74rem; font-weight:600; padding:2px 9px; border-radius:99px; background:#f1ede6; color:#4a5263; white-space:nowrap; }
.tag.red { background:var(--coral-soft); color:#b4321f; } .tag.amber { background:var(--amber-soft); color:#9a5304; } .tag.green { background:var(--green-soft); color:var(--green); }
.more { display:inline-block; font-size:.88rem; font-weight:600; text-decoration:none; margin:2px 0 0; }
.seg { display:flex; gap:4px; background:#efe9df; padding:4px; border-radius:12px; margin-bottom:14px; overflow-x:auto; scrollbar-width:none; }
.seg button { flex:1 0 auto; background:transparent; color:#4a5263; box-shadow:none; padding:7px 10px; border-radius:9px; font-size:.86rem; gap:6px; }
.seg button.on { background:#fff; color:var(--brand); box-shadow:0 1px 3px rgba(0,0,0,.08); }
.seg .n { font-size:.72rem; color:var(--muted); font-weight:600; }
.foot { margin:14px 0 0; }
.banner { display:flex; align-items:center; gap:10px; flex-wrap:wrap; background:#fff8ec; border:1px solid #f4d9a8; border-radius:12px; padding:10px 12px; margin:0 0 14px; font-size:.9rem; }
button.icon { padding:8px; }
section.card { margin-bottom:12px; }
.empty { padding:18px 12px; border-width:1.5px; }
.empty svg.i { width:26px; height:26px; }
/* voice notes */
.mic { background:#fff; color:var(--brand); border:1.5px solid #d9d1c4; box-shadow:none; padding:10px; flex:none; touch-action:none; -webkit-user-select:none; user-select:none; }
.mic.rec { background:var(--coral); color:#fff; border-color:var(--coral); animation:pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow:0 0 0 0 rgba(226,85,63,.45); } 50% { box-shadow:0 0 0 8px rgba(226,85,63,0); } }
.recbar { display:flex; align-items:center; gap:8px; padding:6px 12px; font-size:.86rem; color:#b4321f; }
.recbar .dot { width:9px; height:9px; border-radius:50%; background:var(--coral); }
.msg .vn { display:block; font-size:.7rem; opacity:.75; margin-bottom:2px; }

/* ---------- mobile ---------- */
@media (max-width: 899px) {
  .side { display:none; }
  .topbar { display:flex; align-items:center; gap:10px; position:sticky; top:0; z-index:20; padding:12px 16px; color:#fff;
    background:linear-gradient(135deg,#16324f,#1f4d6b 60%,#0f5f62); box-shadow:0 2px 10px rgba(0,0,0,.12); }
  .topbar .logo { display:flex; align-items:center; gap:8px; font-weight:800; } .topbar .logo .mark { width:30px; height:30px; border-radius:9px; font-size:.9rem; }
  .topbar .t { font-size:.8rem; color:#c5d6e6; margin-left:auto; text-align:right; max-width:55%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  main { padding:16px 14px calc(var(--nav-h) + 96px); }
  .bottom { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:25; height:calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom:env(safe-area-inset-bottom);
    background:rgba(255,253,249,.96); backdrop-filter:blur(10px); border-top:1px solid var(--line); box-shadow:0 -4px 18px rgba(22,50,79,.08); }
  .bottom a { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; font-size:.7rem; font-weight:600; color:#6b7385; text-decoration:none; position:relative; }
  .bottom a.on { color:var(--brand); } .bottom a.on::before { content:""; position:absolute; top:0; width:34px; height:3px; border-radius:0 0 4px 4px; background:linear-gradient(90deg,#f59e0b,#e2553f); }
  .bottom a .badge { position:absolute; top:6px; left:calc(50% + 6px); background:#e2553f; color:#fff; font-size:.62rem; border-radius:99px; padding:0 5px; }
  .fab { right:16px; bottom:calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); width:56px; height:56px; border-radius:18px; }
  .sheet { left:0; right:0; bottom:0; width:auto; height:88vh; border-radius:22px 22px 0 0; }
  .stats { grid-template-columns:repeat(2, 1fr); }
  .grid { grid-template-columns:44px repeat(7, minmax(84px, 1fr)); }
  h1 { font-size:1.35rem; }
  .toast { bottom:calc(var(--nav-h) + 90px); }
}
@media (prefers-reduced-motion: reduce) { * { animation:none !important; transition:none !important; } }
@media (max-width: 560px) {
  .seg { display:grid; grid-template-columns:repeat(5, 1fr); overflow:visible; }
  .seg button { flex-direction:column; gap:0; padding:6px 2px; font-size:.74rem; line-height:1.2; white-space:normal; }
  .seg .n { font-size:.82rem; color:inherit; }
}
main:focus, main:focus-visible { outline:none; }
/* p3b: context lines on rows, flag accents */
button.item .ctx { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:.9rem; color:#2f3747; margin-top:3px; }
button.item .why { color:#7a4a0a; }
button.item.flag-emergency { border-left:4px solid var(--coral); } button.item.flag-urgent { border-left:4px solid var(--amber); }
button.item.flag-routine { border-left:4px solid #5fb3a8; }
.tag.teal { background:var(--teal-soft); color:var(--teal); } .tag.violet { background:var(--violet-soft); color:var(--violet); }
@media (max-width: 560px) { .seg { grid-template-columns:repeat(7, 1fr); } .seg button { font-size:.68rem; } }
/* p3c: Call back flag, alerts warning, onboarding */
.tag.blue { background:#e3eefc; color:#1f5fae; } .pill.blue { background:#e3eefc; color:#1f5fae; }
button.item.flag-callback { border-left:4px solid #3b82f6; }
.banner.warn { background:#fff1ee; border-color:#f3b8a8; color:#7a2414; }
.steps-list { padding-left:1.2em; margin:8px 0; } .steps-list li { margin:6px 0; }
@media (max-width: 560px) { .seg { grid-template-columns:repeat(4, 1fr); } .seg button { font-size:.72rem; } }
/* p4b: Call back is a badge on top of any category; missed calls are low-signal */
.tag.cbtag, .pill.blue { display:inline-flex; align-items:center; gap:4px; } .tag.cbtag svg, .pill.blue svg { width:12px; height:12px; }
button.item.flagged { box-shadow:inset 0 0 0 1.5px #b9d3f5, 0 1px 2px rgba(0,0,0,.04); }
button.item.flag-missed { opacity:.82; } button.item.flag-missed .top b { font-weight:500; }
.cbrow { display:flex; align-items:center; gap:10px; margin:-4px 0 12px; }
.cbfilter { flex:none; background:#fff; color:#1f5fae; border:1.5px solid #b9d3f5; box-shadow:none; padding:6px 12px; border-radius:99px; font-size:.84rem; gap:6px; }
.cbfilter svg { width:14px; height:14px; } .cbfilter .n { font-size:.74rem; font-weight:700; background:#e3eefc; border-radius:99px; padding:0 7px; }
.cbfilter.on { background:#1f5fae; color:#fff; border-color:#1f5fae; } .cbfilter.on .n { background:rgba(255,255,255,.25); color:#fff; }
/* p5: customer replies */
.replies-h { display:flex; align-items:center; gap:6px; font-size:.9rem; margin:12px 0 6px; } .replies-h svg { width:16px; height:16px; }
.replies { display:flex; flex-direction:column; gap:6px; }
.bubble { align-self:flex-start; max-width:88%; background:#e3eefc; color:#173a63; border-radius:14px 14px 14px 4px; padding:8px 12px; font-size:.92rem; }
.bubble time { display:block; font-size:.72rem; color:#4d6a8e; margin-top:3px; }
.bubble.opt { background:#fde8e4; color:#7a2414; } .bubble.opt time { color:#9a4a3a; }
.pill.red svg, .pill.blue svg { width:12px; height:12px; }
.linkbtn{background:none;border:0;padding:0;margin:0;color:var(--blue,#2563eb);font:inherit;text-decoration:underline;cursor:pointer;min-height:0;box-shadow:none;width:auto}
.prow{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:6px 0;border-bottom:1px solid rgba(0,0,0,.06)}
.prow .pj{flex:1 1 180px;min-width:0}.prow .pn{flex:1 1 140px;min-width:0}
.prow .pm{display:inline-flex;align-items:center;gap:4px;font-size:.9rem}.prow .pm input{width:72px}
.pprev{white-space:pre-wrap;font:inherit;font-size:.85rem;margin:6px 0 0;color:inherit}

/* Booked badge (p11): solid green, white bold text. #15803d on white text = 5.0:1 contrast (WCAG AA). */
.tag.bookedtag, .pill.bookedtag { display:inline-flex; align-items:center; gap:5px; background:#15803d; color:#fff; font-weight:800; font-size:.8rem; padding:4px 11px; border-radius:99px; letter-spacing:.01em; white-space:nowrap; box-shadow:0 1px 2px rgba(21,128,61,.35); }
.tag.bookedtag svg, .pill.bookedtag svg { width:14px; height:14px; stroke:#fff; stroke-width:3; }
.bookedrow { display:flex; margin:6px 0 2px; }
.bookedrow .tag.bookedtag { font-size:.86rem; padding:5px 12px; }
/* Out of area (p11): neutral grey pill beside the category; owner decides on a call back. #374151 on #e5e7eb = 8.6:1. */
.tag.ooatag, .pill.ooatag { background:#e5e7eb; color:#374151; font-weight:700; border:1px solid #cbd0d8; }
@media (max-width:560px) { .mini { grid-template-columns:repeat(2,1fr); } .mini a + a { border-left:0; } .mini a:nth-child(even) { border-left:1px solid var(--line); } .mini a:nth-child(n+3) { border-top:1px solid var(--line); } }

/* Today stat tiles (Amit, 22 Nov 16:13): colourful gradients + texture + count-up + staggered entrance.
   White text on every gradient is >= 4.5:1 at the darkest-used stop for the labels; numbers are large and bold. */
.mini.stats { background:none; border:0; overflow:visible; gap:10px; grid-template-columns:repeat(4,1fr); }
.mini.stats a.stat { position:relative; overflow:hidden; border:0 !important; border-radius:16px; padding:14px 12px 12px; text-align:left; color:#fff;
  box-shadow:0 6px 16px -8px var(--sh, rgba(0,0,0,.35)), inset 0 1px 0 rgba(255,255,255,.25); isolation:isolate;
  animation:statIn .5s cubic-bezier(.2,.8,.2,1) both; animation-delay:calc(var(--i) * 80ms); transition:transform .15s ease, box-shadow .15s ease; -webkit-tap-highlight-color:transparent; }
.mini.stats a.stat::before { content:''; position:absolute; inset:0; z-index:-1; opacity:.22;
  background-image:radial-gradient(rgba(255,255,255,.9) 1px, transparent 1.4px), repeating-linear-gradient(135deg, rgba(255,255,255,.18) 0 2px, transparent 2px 9px);
  background-size:12px 12px, auto; }
.mini.stats a.stat::after { content:''; position:absolute; right:-28px; top:-28px; width:96px; height:96px; border-radius:50%; background:radial-gradient(circle, rgba(255,255,255,.28), transparent 70%); z-index:-1; }
.mini.stats a.stat b { font-size:2rem; font-weight:800; line-height:1; letter-spacing:-.02em; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.25); font-variant-numeric:tabular-nums; margin-top:6px; }
.mini.stats a.stat > span:last-child { display:block; margin-top:4px; font-size:.8rem; font-weight:600; color:#fff; opacity:.95; }
.mini.stats .si { display:inline-grid; place-items:center; width:30px; height:30px; border-radius:10px; background:rgba(255,255,255,.22); }
.mini.stats .si svg { width:17px; height:17px; stroke:#fff; }
.mini.stats .s-action { background:linear-gradient(135deg,#ea580c 0%,#b91c1c 100%); --sh:rgba(220,38,38,.55); }
.mini.stats .s-new { background:linear-gradient(135deg,#16a34a 0%,#14532d 100%); --sh:rgba(21,128,61,.55); }
.mini.stats .s-today { background:linear-gradient(135deg,#0369a1 0%,#0f766e 100%); --sh:rgba(15,118,110,.55); }
.mini.stats .s-week { background:linear-gradient(135deg,#7c3aed 0%,#3730a3 100%); --sh:rgba(67,56,202,.55); }
.mini.stats a.stat:hover { transform:translateY(-2px); }
.mini.stats a.stat:active { transform:scale(.96); box-shadow:0 2px 6px -4px var(--sh); }
.mini.stats a.stat:focus-visible { outline:3px solid #1f2937; outline-offset:2px; }
@keyframes statIn { from { opacity:0; transform:translateY(10px) scale(.97); } to { opacity:1; transform:none; } }
@media (max-width:560px) { .mini.stats { grid-template-columns:repeat(2,1fr); } .mini.stats a.stat { border-top:0 !important; } }
@media (prefers-reduced-motion: reduce) { .mini.stats a.stat { animation:none; transition:none; } .mini.stats a.stat:hover, .mini.stats a.stat:active { transform:none; } }
/* Address link in the detail sheet (p12). */
.maplink { display:inline-flex; align-items:center; gap:5px; color:#1f5fae; font-weight:600; text-decoration:underline; text-underline-offset:2px; }
.maplink svg { width:15px; height:15px; flex:none; }

/* Saved by Amy (p11): wide gold tile. Dark text on gold for contrast (#3b2a05 on #fbbf24 = 9:1). */
a.saved { position:relative; display:flex; gap:12px; align-items:center; overflow:hidden; isolation:isolate; text-decoration:none; color:#3b2a05; margin:0 0 10px;
  padding:16px; border-radius:18px; background:linear-gradient(120deg,#fde68a 0%,#fbbf24 45%,#f59e0b 100%); box-shadow:0 8px 20px -10px rgba(217,119,6,.7), inset 0 1px 0 rgba(255,255,255,.5);
  animation:statIn .5s cubic-bezier(.2,.8,.2,1) both; transition:transform .15s ease; -webkit-tap-highlight-color:transparent; }
a.saved::before { content:''; position:absolute; inset:0; z-index:-1; opacity:.35; background-image:radial-gradient(rgba(255,255,255,.9) 1px, transparent 1.5px); background-size:11px 11px; }
a.saved::after { content:''; position:absolute; top:0; bottom:0; width:40%; left:-50%; z-index:-1; background:linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); animation:shine 3.2s ease-in-out 1s infinite; }
a.saved:active { transform:scale(.98); }
a.saved .sv-ic { flex:none; display:grid; place-items:center; width:46px; height:46px; border-radius:14px; background:rgba(255,255,255,.45); }
a.saved .sv-ic svg { width:26px; height:26px; stroke:#7c4a03; }
a.saved .sv-k { display:block; font-size:.78rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:#7c4a03; }
a.saved .sv-big { display:inline-block; font-size:2.1rem; font-weight:900; line-height:1.05; letter-spacing:-.02em; font-variant-numeric:tabular-nums; margin-right:6px; }
a.saved .sv-lbl { font-weight:700; font-size:.9rem; }
a.saved .sv-sub { display:block; margin-top:3px; font-size:.78rem; font-weight:600; color:#5b3d06; }
@keyframes shine { 0%, 60% { left:-50%; } 100% { left:130%; } }
@media (prefers-reduced-motion: reduce) { a.saved, a.saved::after { animation:none; } a.saved:active { transform:none; } }
.item.static { cursor:default; }

/* Owner category change (p11). */
.catpick { margin-top:12px; } .catbtns { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 4px; }
.catbtns button { border:1px solid var(--line); background:#fff; color:var(--ink); border-radius:99px; padding:7px 12px; font-weight:600; font-size:.85rem; min-height:36px; }
.catbtns button.on { color:#fff; border-color:transparent; }
.catbtns .cb-emergency.on { background:#b91c1c; } .catbtns .cb-urgent.on { background:#b45309; } .catbtns .cb-routine.on { background:#0f766e; }
.catbtns .cb-spam.on { background:#6d28d9; } .catbtns .cb-unknown.on { background:#374151; }
.tag.edtag { background:#eef2ff; color:#3730a3; font-weight:700; }

/* p13: skeletons inside a detail sheet while the full record loads */
.contact .btnskel { height:52px; margin:0; border-radius:14px; }
.lineskel { display:inline-block; width:9em; height:1em; margin:0; border-radius:6px; vertical-align:middle; }

/* p29: Your receptionist */
.rc-hear { margin-top:10px; background:#f7f3ec; border-radius:12px; padding:10px 12px; font-size:.86rem; }
.rc-list { display:flex; flex-direction:column; gap:8px; }
.rc-row { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:14px; background:#fff; cursor:pointer; }
.rc-row.on { border-color:var(--teal); box-shadow:0 0 0 2px var(--teal-soft) inset; }
.rc-row:focus-visible { outline:2px solid var(--teal); outline-offset:2px; }
.rc-dot { width:20px; height:20px; border-radius:50%; border:2px solid #b9c2cf; flex:none; display:grid; place-items:center; }
.rc-row.on .rc-dot { border-color:var(--teal); } .rc-row.on .rc-dot::after { content:''; width:10px; height:10px; border-radius:50%; background:var(--teal); }
.rc-nm { font-weight:700; } .rc-ds { font-size:.8rem; color:var(--muted); margin-top:2px; }
.pill.rc-f { background:#fdebf3; color:#a3245f; } .pill.rc-m { background:#e6effb; color:#1f4d8b; }
.rc-play.playing { background:var(--teal); color:#fff; }
.rc-ok { color:var(--green); font-weight:600; }
#pron { margin-bottom:8px; }

/* p30: Your receptionist card on Today (Amit 27 Nov t675u). Teal on white, AA contrast. */
.rcard { background:linear-gradient(135deg,#ffffff 0%,#effaf8 100%); border:1.5px solid #b9e3dc; border-radius:var(--radius); padding:14px 16px; box-shadow:var(--shadow); margin:0 0 14px; }
.rc-top { display:flex; align-items:center; gap:12px; }
.rc-av { width:46px; height:46px; border-radius:14px; display:grid; place-items:center; flex:none; font-weight:800; font-size:1.3rem; color:#fff; background:linear-gradient(135deg,#f59e0b,#e2553f); }
.rc-k { display:block; font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; color:var(--teal); font-weight:700; }
.rc-name { display:block; font-size:1.35rem; line-height:1.15; }
.rc-meta { display:block; font-size:.82rem; color:var(--muted); }
.rc-change { flex:none; background:var(--teal); color:#fff; text-decoration:none; font-weight:700; font-size:.9rem; padding:9px 16px; border-radius:99px; min-height:40px; display:inline-flex; align-items:center; }
.rc-say { margin:10px 0 0; background:#fff; border:1px solid var(--line); border-radius:12px; padding:9px 12px; font-size:.86rem; color:var(--ink); }
.rc-sayk { display:block; font-size:.72rem; color:var(--muted); font-weight:600; margin-bottom:2px; }
.rc-acts { display:flex; align-items:center; gap:10px; margin-top:10px; flex-wrap:wrap; }
.rc-link { font-size:.84rem; color:var(--teal); font-weight:600; text-decoration:none; }
