/* Paragon Phone — the CRM's glass look (same tokens as Forms Studio and Projects & Playbooks). */
:root {
  --hub: var(--p);
  --hub-2: var(--p-lite);
  --hub-10: color-mix(in srgb, var(--p) 10%, transparent);
  --hub-20: color-mix(in srgb, var(--p) 20%, transparent);
  --grad: linear-gradient(120deg, var(--p-lite) 0%, var(--p) 100%);
  --text: #101828;
  --text-2: #344054;
  --muted: #5d6679;
  --faint: #8a93a6;
  --success: #067647;
  --danger: #d92d20;
  --danger-bg: rgba(254, 228, 226, 0.85);
  --alert: #9a5b00;
  --violet: #7c3aed;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --glass-line: rgba(255, 255, 255, 0.9);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset, 0 1px 3px rgba(16, 24, 40, 0.05), 0 12px 32px -20px rgba(16, 24, 40, 0.22);
  --blur: blur(18px) saturate(160%);
  --hair: rgba(16, 24, 40, 0.08);
  --radius: 18px;
  --tabbar: calc(64px + env(safe-area-inset-bottom));
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font); color: var(--text); font-size: 15px; line-height: 1.4;
  background:
    radial-gradient(700px 500px at 0% 0%, color-mix(in srgb, var(--p) 16%, transparent), transparent 60%),
    radial-gradient(600px 460px at 100% 10%, rgba(124, 58, 237, 0.09), transparent 60%),
    radial-gradient(700px 520px at 60% 100%, color-mix(in srgb, var(--p) 13%, transparent), transparent 60%),
    #f3f5f8;
  background-attachment: fixed;
  padding-top: env(safe-area-inset-top);
  overscroll-behavior-y: none;
}
button, input, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.ms { font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal; font-size: 22px; line-height: 1; display: inline-block; vertical-align: middle; white-space: nowrap; font-variation-settings: "FILL" 0, "wght" 400; }
.ms.fill { font-variation-settings: "FILL" 1, "wght" 500; }
.ms.inline { font-size: 18px; color: var(--hub); }
.glass { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); border-radius: var(--radius); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.error { color: var(--danger); font-size: 14px; }

/* ---------- header ---------- */
.top { position: sticky; top: calc(env(safe-area-inset-top) + 8px); z-index: 20; margin: 8px 12px 0; padding: 10px 12px; display: flex; align-items: center; gap: 10px; border-radius: 16px; }
.logo, .logo-img { width: 36px; height: 36px; border-radius: 11px; flex: none; }
.logo { display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--p) 90%, transparent); }
.logo .ms { font-size: 20px; }
.logo-img { object-fit: contain; background: #fff; border: 1px solid var(--hair); }
.brand { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.brand span { font-weight: 800; letter-spacing: -0.01em; }
.brand small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #f59e0b, #7c3aed); flex: none; }

main { max-width: 560px; margin: 0 auto; padding: 14px 14px 24px; }
.screen { display: flex; flex-direction: column; gap: 12px; }
.tabs-screen { padding-bottom: calc(var(--tabbar) + 8px); }

/* ---------- cards, hero, forms ---------- */
.card { padding: 18px; }
.card h2 { margin: 0 0 4px; font-size: 17px; }
.card p { margin: 4px 0 0; }
.hero { border-radius: 20px; padding: 20px; color: #fff; background: var(--grad); display: flex; gap: 14px; align-items: center; box-shadow: 0 16px 36px -18px color-mix(in srgb, var(--p) 80%, transparent); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -90px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.hero h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.hero p { margin: 4px 0 0; font-size: 13px; opacity: 0.92; }
.hero-ico { width: 50px; height: 50px; border-radius: 15px; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.3); display: grid; place-items: center; flex: none; }
.hero-ico .ms { font-size: 28px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 14px 0 10px; }
input { height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--hair); background: rgba(255, 255, 255, 0.9); font-size: 16px; outline: none; }
input:focus, textarea:focus { border-color: var(--hub); box-shadow: 0 0 0 3px var(--hub-20); }
#pair-code { font-size: 22px; font-weight: 800; letter-spacing: 0.12em; text-align: center; }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--hair); background: rgba(255, 255, 255, 0.9); color: var(--text-2); font-weight: 650; font-size: 14px; text-decoration: none; }
.btn .ms { font-size: 19px; }
.btn.primary { background: var(--grad); color: #fff; border: 0; box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--p) 90%, transparent); font-weight: 750; }
.btn.danger { color: var(--danger); }
.btn.link { background: none; border: 0; color: var(--hub); }
.btn.wide { width: 100%; margin-top: 8px; }
.btn:disabled { opacity: 0.55; }
.bigcode { font-size: 34px; font-weight: 800; letter-spacing: 0.14em; text-align: center; margin: 16px 0 8px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.howto { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.howto li { display: flex; gap: 12px; align-items: flex-start; }
.num { width: 26px; height: 26px; border-radius: 50%; background: var(--hub-10); color: var(--hub); font-weight: 800; font-size: 13px; display: grid; place-items: center; flex: none; }

/* ---------- setup ---------- */
.pane { display: flex; flex-direction: column; gap: 12px; animation: rise 0.22s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pane-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 0; }
.pane-head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--hair); background: rgba(255, 255, 255, 0.8); display: grid; place-items: center; color: var(--text-2); flex: none; }
.icon-btn.accent { background: var(--grad); color: #fff; border: 0; box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--p) 90%, transparent); }
.status { display: flex; align-items: center; gap: 14px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: #12b76a; box-shadow: 0 0 0 6px rgba(18, 183, 106, 0.16); }
.dot.off { background: #98a2b3; box-shadow: 0 0 0 6px rgba(152, 162, 179, 0.18); }
.online-tog { margin-top: 14px; }
.top.online .logo, .top.online .logo-img { outline: 2.5px solid #12b76a; outline-offset: 2px; }
.top.offline .logo, .top.offline .logo-img { outline: 2.5px solid #98a2b3; outline-offset: 2px; filter: grayscale(0.6); }
.dot.warn { background: #f79009; box-shadow: 0 0 0 6px rgba(247, 144, 9, 0.16); }
.steps { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 12px; }
.steps p { margin: 2px 0 8px; font-size: 13px; }
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--hair); display: grid; place-items: center; flex: none; color: transparent; }
.check .ms { font-size: 16px; }
.steps li.done .check { background: var(--grad); border-color: transparent; color: #fff; }
.steps li.done .btn { display: none; }
.me-card { display: flex; align-items: center; gap: 12px; }
.av { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--p-lite), #7c3aed); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 800; flex: none; }

/* ---------- keypad ---------- */
.dial-top { text-align: center; padding: 8px 0 0; min-height: 86px; }
.dial-input { width: 100%; border: 0; background: transparent; text-align: center; font-size: 32px; font-weight: 700; letter-spacing: 0.02em; height: 52px; box-shadow: none !important; }
.dial-input::placeholder { font-size: 20px; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.dial-match { margin: 0; min-height: 20px; color: var(--hub); font-weight: 650; font-size: 14px; }
.dialpad { display: grid; grid-template-columns: repeat(3, 76px); gap: 16px 26px; justify-content: center; margin: 4px 0 6px; }
.key { width: 76px; height: 76px; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--glass-shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 30px; font-weight: 500; line-height: 1; transition: transform 0.08s, background 0.15s; }
.key small { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; color: var(--muted); margin-top: 3px; min-height: 12px; }
.key:active { transform: scale(0.94); background: var(--hub-20); }
.dial-actions { display: grid; grid-template-columns: repeat(3, 76px); gap: 26px; justify-content: center; align-items: center; margin-top: 4px; }
.round { width: 64px; height: 64px; border-radius: 50%; border: 0; display: grid; place-items: center; justify-self: center; transition: transform 0.08s; }
.round:active { transform: scale(0.94); }
.round .ms { font-size: 28px; }
.round.big { width: 76px; height: 76px; }
.round.big .ms { font-size: 34px; }
.round.go { width: 76px; height: 76px; background: linear-gradient(135deg, #22c55e, var(--p)); color: #fff; box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--p) 90%, transparent); }
.round.go .ms { font-size: 34px; }
.round.decline { background: linear-gradient(135deg, #f97066, #d92d20); color: #fff; box-shadow: 0 14px 28px -12px rgba(217, 45, 32, 0.8); }
.round.ghost { width: 54px; height: 54px; background: transparent; color: var(--muted); }
.results { padding: 4px; max-height: 260px; overflow: auto; }
.result { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; width: 100%; border: 0; background: none; text-align: left; }
.result:active, .result:hover { background: var(--hub-10); }
.result .av { width: 34px; height: 34px; font-size: 12px; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--hub-10); color: var(--hub); }

/* ---------- lists ---------- */
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 14px; }
.seg button { flex: 1; height: 34px; border: 0; border-radius: 10px; background: transparent; font-weight: 650; font-size: 13px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--hub); box-shadow: 0 2px 8px -4px rgba(16, 24, 40, 0.25); }
.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 14px; color: var(--faint); }
.search input { flex: 1; border: 0; background: transparent; height: 44px; padding: 0; box-shadow: none !important; }
.list { padding: 4px 0; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; border: 0; background: none; text-align: left; position: relative; }
.row + .row::before { content: ""; position: absolute; left: 66px; right: 0; top: 0; border-top: 1px solid var(--hair); }
.row:active { background: var(--hub-10); }
.row .av { width: 42px; height: 42px; }
.row .av.in { background: linear-gradient(135deg, var(--p-lite), var(--p)); }
.row .av.out { background: linear-gradient(135deg, #7c3aed, #6366f1); }
.row .av.miss { background: linear-gradient(135deg, #f97066, #d92d20); }
.row-title { font-weight: 700; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-title.miss { color: var(--danger); }
.row-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.row-sub .ms { font-size: 15px; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; color: var(--faint); font-size: 12px; }
.row-act { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--hub-10); color: var(--hub); display: grid; place-items: center; flex: none; }
.row-act .ms { font-size: 19px; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--hub); }
.row.unread .row-title { font-weight: 800; }
.row.unread .row-sub { color: var(--text-2); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; margin: 0; }
.detail { padding: 2px 14px 14px 68px; font-size: 13px; color: var(--text-2); display: flex; flex-direction: column; gap: 8px; }
.detail .vm { background: rgba(255, 255, 255, 0.7); border: 1px solid var(--hair); border-radius: 12px; padding: 10px 12px; }
.detail .acts { display: flex; gap: 8px; }

/* ---------- conversation ---------- */
.thread { position: fixed; inset: 0; z-index: 30; padding: calc(env(safe-area-inset-top) + 8px) 12px calc(env(safe-area-inset-bottom) + 10px); gap: 8px; max-width: 560px; margin: 0 auto;
  background: radial-gradient(700px 500px at 0% 0%, color-mix(in srgb, var(--p) 14%, transparent), transparent 60%), radial-gradient(700px 520px at 60% 100%, color-mix(in srgb, var(--p) 12%, transparent), transparent 60%), #f3f5f8; }
.thread-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; }
.thread-head .icon-btn:first-child { border: 0; background: transparent; color: var(--hub); }
.to-row { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 14px; }
.to-row input { flex: 1; border: 0; background: transparent; box-shadow: none !important; padding: 0; }
.bubbles { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 8px 2px; -webkit-overflow-scrolling: touch; }
.day { align-self: center; font-size: 12px; color: var(--faint); font-weight: 600; margin: 10px 0 4px; }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 20px; font-size: 15px; line-height: 1.35; white-space: pre-wrap; word-wrap: break-word; }
.bubble.in { align-self: flex-start; background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); border-bottom-left-radius: 6px; }
.bubble.out { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 8px 18px -12px color-mix(in srgb, var(--p) 90%, transparent); }
.bubble img { display: block; max-width: 100%; border-radius: 12px; margin-bottom: 4px; }
.meta { font-size: 11px; color: var(--faint); margin: 0 6px 6px; }
.meta.out { align-self: flex-end; }
.meta.err { color: var(--danger); }
.event { align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); background: rgba(255, 255, 255, 0.7); border: 1px solid var(--hair); padding: 5px 11px; border-radius: 999px; margin: 6px 0; max-width: 90%; }
.event .ms { font-size: 15px; }
.event.miss { color: var(--danger); }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 24px; }
.composer textarea { flex: 1; border: 0; background: transparent; resize: none; outline: none; padding: 9px 0; max-height: 120px; font-size: 16px; line-height: 1.35; box-shadow: none !important; }
.send { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; flex: none; }
.send:disabled { background: #d0d5dd; }
.note { margin: 0; font-size: 13px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 240, 205, 0.9); color: var(--alert); }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; z-index: 25; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 8px); max-width: 536px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border-radius: 22px; }
.tabbar button { position: relative; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 16px; font-size: 11px; font-weight: 650; color: var(--muted); }
.tabbar button .ms { font-size: 24px; }
.tabbar button.on { color: var(--hub); background: var(--hub-10); }
.tabbar button.on .ms { font-variation-settings: "FILL" 1, "wght" 500; }
.badge { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #f04438; color: #fff; font-size: 11px; font-style: normal; font-weight: 800; display: grid; place-items: center; }
.badge.warn { background: #f79009; min-width: 10px; width: 10px; height: 10px; padding: 0; top: 6px; }

/* ---------- ringing and in-call ---------- */
.screen.ring, .screen.call { position: fixed; inset: 0; z-index: 40; padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 16px);
  background: radial-gradient(600px 420px at 10% 0%, color-mix(in srgb, var(--p) 55%, transparent), transparent 60%), radial-gradient(600px 460px at 100% 100%, rgba(124, 58, 237, 0.45), transparent 60%), linear-gradient(160deg, #0f2a33, #101828 60%, #1d1537); color: #fff; }
.callcard { flex: 1; max-width: 460px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 18px 16px 24px; border-radius: 28px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
.cc-top { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.pill { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; opacity: 0.9; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #32d583; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.avatar { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; font-size: 36px; font-weight: 800; background: linear-gradient(135deg, var(--p-lite), var(--p) 55%, #7c3aed); box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--p) 90%, transparent); margin-top: 24px; }
.pulse { position: relative; margin-top: 24px; }
.pulse .avatar { margin: 0; position: relative; z-index: 1; }
.pulse::before, .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(45, 212, 191, 0.35); animation: ripple 2s infinite; }
.pulse::after { animation-delay: 1s; }
@keyframes ripple { from { transform: scale(1); opacity: 0.8; } to { transform: scale(1.9); opacity: 0; } }
.callcard h1 { margin: 14px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }
.sub { margin: 0; color: rgba(255, 255, 255, 0.72); }
.sub.small { font-size: 13px; }
.timer { margin: 4px 0 0; font-size: 17px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.85); }
.callcard .note { background: rgba(255, 255, 255, 0.12); color: #fff; }
.ring-actions { margin-top: auto; width: 100%; display: flex; justify-content: space-around; align-items: center; padding: 10px 0; }
.ring-actions > div { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.ring-actions .round { width: 76px; height: 76px; }
.ring-actions .round .ms { font-size: 34px; }
.tiles { margin-top: auto; display: flex; gap: 14px; justify-content: center; padding: 12px 0 18px; }
.tile { width: 66px; height: 66px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.12); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tile .lbl { font-size: 11px; font-weight: 650; }
.tile.on { background: #fff; color: var(--text); }
.keypad { width: 100%; }
.kp-sent { min-height: 30px; font-size: 24px; font-weight: 600; letter-spacing: 0.1em; }
.kp-grid { display: grid; grid-template-columns: repeat(3, 64px); gap: 12px 22px; justify-content: center; }
.kp-grid button { width: 64px; height: 64px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 26px; }
.kp-grid button:active { background: rgba(255, 255, 255, 0.3); }

.toast { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + 20px); background: rgba(16, 24, 40, 0.88); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; max-width: 90%; text-align: center; backdrop-filter: blur(10px); }

@media (max-height: 700px) {
  .dialpad { gap: 10px 24px; }
  .key { width: 68px; height: 68px; font-size: 27px; }
  .dial-top { min-height: 70px; }
}

/* Contact matches float over the keypad so the call button never moves. */
#pane-keypad { position: relative; }
#dial-results { position: absolute; z-index: 6; left: 0; right: 0; top: 92px; max-height: 300px; box-shadow: 0 24px 48px -20px rgba(16, 24, 40, 0.35); background: var(--glass-strong); }

/* Alerts from Max */
.alerts h2 { margin-bottom: 2px; }
/* A row, not the stacked form-label layout: the switch sits beside the title. */
.tog { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; margin: 0; padding: 12px 0; border-top: 1px solid var(--hair); cursor: pointer; text-align: left; }
.tog > span b { font-size: 15px; color: var(--text); }
.alerts .small + .tog { margin-top: 10px; }
.tog > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tog small { color: var(--muted); font-size: 12.5px; font-weight: 500; line-height: 1.35; }
.tog input { position: absolute; opacity: 0; pointer-events: none; }
.tog i { margin-top: -3px; width: 46px; height: 28px; border-radius: 99px; background: var(--hair); position: relative; flex: none; transition: background 0.2s; }
.tog i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s; }
.tog input:checked + i { background: var(--grad); }
.tog input:checked + i::after { transform: translateX(18px); }
.tog input:focus-visible + i { outline: 2px solid var(--hub); outline-offset: 2px; }

/* transfers from a live call */
.xfer { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.xfer-mode { background: rgba(255, 255, 255, 0.12); }
.xfer-mode button { color: rgba(255, 255, 255, 0.85); }
.xfer-list { max-height: 34vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.xfer-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.1); color: #fff; text-align: left; font-size: 15px; font-weight: 650; }
.xfer-list button small { display: block; font-size: 12px; font-weight: 500; opacity: 0.75; }
.xfer-list button .ms { font-size: 22px; }
.xfer-list button:disabled { opacity: 0.5; }
.xfer-list .empty { font-size: 13px; opacity: 0.75; text-align: center; padding: 8px; }
.xfer-status { width: 100%; margin-top: 10px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.12); text-align: center; }
.xfer-status p { margin: 0 0 10px; font-size: 14px; }
.xfer-actions { display: flex; gap: 8px; justify-content: center; }

/* ---------- glass dock (matches the CRM's Main Hotbar dock) ---------- */
:root { --dock-b: 114, 81, 181; --dock-glass: linear-gradient(160deg, rgba(255, 255, 255, 0.82), color-mix(in srgb, var(--bgb) 64%, transparent)); --dock-blur: blur(24px) saturate(180%); --dock-shadow: 0 14px 40px -12px color-mix(in srgb, var(--deep) 32%, transparent), 0 0 0 1px color-mix(in srgb, var(--p) 8%, transparent); }
.top.glass, .tabbar.glass { background: var(--dock-glass); backdrop-filter: var(--dock-blur); -webkit-backdrop-filter: var(--dock-blur); border: 1px solid rgba(255, 255, 255, 0.75); box-shadow: var(--dock-shadow); }
.top { margin: 8px 10px 0; min-height: 58px; padding: 6px 6px 6px 7px; border-radius: 999px; gap: 10px; max-width: 560px; }
@media (min-width: 580px) { .top { margin: 8px auto 0; } }
.top .logo, .top .logo-img { width: 44px; height: 44px; border-radius: 50%; }
.top .logo-img { border: 1px solid rgba(255, 255, 255, 0.85); box-shadow: 0 4px 12px -6px color-mix(in srgb, var(--deep) 35%, transparent); padding: 3px; }
.top .brand span { color: var(--hd); font-size: 16px; line-height: 1.15; }
.top .brand small { color: var(--faint); font-weight: 550; }
.who { position: relative; width: 44px; height: 44px; border: 0; padding: 0; font-size: 14px; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--p) 55%, transparent); transition: transform 0.12s, box-shadow 0.15s; }
.who:active { transform: scale(0.94); }
.who-dot { position: absolute; right: -1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.95); background: #22c55e; }
.who-dot.off { background: #f59e0b; }
.tabbar { border-radius: 999px; padding: 5px; gap: 4px; }
.tabbar button { border-radius: 999px; color: var(--faint); transition: background 0.15s, box-shadow 0.15s, transform 0.12s; }
.tabbar button.on { background: #fff; color: var(--p); box-shadow: 0 0 0 1px color-mix(in srgb, var(--p) 20%, transparent), 0 6px 16px color-mix(in srgb, var(--p) 18%, transparent); transform: translateY(-1px); }

/* ---------- dock: share the school's links (the Call Center's Quick Links, in your pocket) ---------- */
.top { gap: 8px; }
.dock-chips { flex: 1; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); padding: 2px 14px 2px 0; }
.dock-chips::-webkit-scrollbar { display: none; }
.dock-chips button { flex: none; height: 40px; display: inline-flex; align-items: center; gap: 5px; padding: 0 12px 0 9px; border: 0; border-radius: 999px; background: none; color: var(--text-2); font-size: 13px; font-weight: 700; transition: background 0.15s, box-shadow 0.15s, transform 0.12s; }
.dock-chips button .ms { font-size: 20px; color: var(--p); }
.dock-chips button:active, .dock-chips button.on { background: #fff; box-shadow: 0 0 0 1px color-mix(in srgb, var(--p) 20%, transparent), 0 6px 16px color-mix(in srgb, var(--p) 18%, transparent); }
.dock-plus { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--p); color: #fff; box-shadow: 0 6px 16px -4px color-mix(in srgb, var(--p) 55%, transparent); }
.dock-plus .ms { font-size: 28px; transition: transform 0.18s; }
.dock-plus.open .ms { transform: rotate(45deg); }

.lp { position: fixed; inset: 0; z-index: 55; background: color-mix(in srgb, var(--hd) 18%, transparent); animation: lpFade 0.2s ease; }
@keyframes lpFade { from { opacity: 0; } }
.lp-sheet { position: absolute; left: 10px; right: 10px; top: calc(env(safe-area-inset-top) + 74px); max-width: 560px; margin: 0 auto; max-height: calc(100% - env(safe-area-inset-top) - 92px); display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 26px; color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), color-mix(in srgb, var(--bgb) 86%, transparent)); backdrop-filter: var(--dock-blur); -webkit-backdrop-filter: var(--dock-blur); border: 1px solid rgba(255, 255, 255, 0.8); box-shadow: 0 24px 60px -18px color-mix(in srgb, var(--deep) 45%, transparent); animation: lpDrop 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
.lp.from-call .lp-sheet, .lp.from-thread .lp-sheet { top: auto; bottom: calc(env(safe-area-inset-bottom) + 10px); animation-name: lpRise; }
@keyframes lpDrop { from { transform: translateY(-40px); opacity: 0.4; } }
@keyframes lpRise { from { transform: translateY(40px); opacity: 0.4; } }
.lp-head { display: flex; align-items: center; gap: 8px; padding: 2px 2px 0 6px; }
.lp-head b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.lp-head small { display: block; color: var(--faint); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-head .icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--p) 8%, transparent); color: var(--text-2); }
.lp-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lp-tiles button { height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.65); box-shadow: 0 1px 2px color-mix(in srgb, var(--hd) 6%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.9); font-size: 12.5px; font-weight: 650; color: var(--hd); }
.lp-tiles button .ms { font-size: 26px; color: var(--p); }
.lp-tiles button:active { background: #fff; box-shadow: 0 0 0 1px color-mix(in srgb, var(--p) 25%, transparent), 0 6px 16px color-mix(in srgb, var(--p) 18%, transparent); }
.lp-cats { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--p) 7%, transparent); flex: none; }
.lp-cats::-webkit-scrollbar { display: none; }
.lp-cats button { flex: none; height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: none; font-size: 13px; font-weight: 700; color: var(--faint); }
.lp-cats button.on { background: #fff; color: var(--p); box-shadow: 0 2px 8px -4px color-mix(in srgb, var(--deep) 35%, transparent); }
.lp-cats button i { font-style: normal; font-weight: 600; opacity: 0.7; margin-left: 3px; }
.lp-search { flex-direction: row; align-items: center; gap: 8px; margin: 0; height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.75); border: 1px solid rgba(255, 255, 255, 0.85); color: var(--faint); flex: none; }
.lp-search input { flex: 1; height: 38px; border: 0; padding: 0; background: transparent; box-shadow: none !important; font-size: 15px; }
.lp-list { overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 6px; min-height: 80px; -webkit-overflow-scrolling: touch; }
.lp-item { border-radius: 16px; background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(255, 255, 255, 0.85); }
.lp-row { display: flex; align-items: center; }
.lp-row > button[data-act="toggle"] { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; background: none; text-align: left; }
.lp-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, var(--p), var(--p-lite)); }
.lp-ico.checkout { background: linear-gradient(135deg, #0891b2, #0d9488); }
.lp-ico.booking { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.lp-ico.waivers { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.lp-ico.forms { background: linear-gradient(135deg, #64748b, #334155); }
.lp-ico.store { background: linear-gradient(135deg, var(--s), #8b5cf6); }
.lp-ico .ms { font-size: 21px; }
.lp-item b { display: block; font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-item small { display: flex; align-items: center; gap: 4px; color: var(--faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-item small .tag { color: #2563eb; font-weight: 700; }
.lp-item .chev { color: #c4bdd6; font-size: 20px; margin-left: auto; transition: transform 0.15s; }
.lp-item.open .chev { transform: rotate(90deg); }
.lp-acts { display: none; grid-template-columns: 2fr 1fr 1fr; gap: 6px; padding: 0 10px 10px; }
.lp-item.open .lp-acts { display: grid; }
.lp-acts button { height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--p) 8%, transparent); color: var(--text-2); font-size: 11.5px; font-weight: 700; }
.lp-acts button .ms { font-size: 20px; color: var(--p); }
.lp-acts button.main { background: var(--p); color: #fff; }
.lp-acts button.main .ms { color: #fff; }
.lp-acts button:disabled { opacity: 0.5; }
.lp .empty { font-size: 13.5px; padding: 22px 12px; }
.lp-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 6px 4px 10px; overflow-y: auto; }
.lp-qr #lp-qr-img { width: min(72vw, 260px); aspect-ratio: 1; padding: 12px; background: #fff; border-radius: 20px; box-shadow: 0 10px 30px -16px color-mix(in srgb, var(--deep) 50%, transparent); }
.lp-qr #lp-qr-img svg, .lp-qr #lp-qr-img img { width: 100%; height: 100%; display: block; }
.lp-qr b { font-size: 16px; margin-top: 8px; }
.lp-qr p { margin: 0; word-break: break-all; }

/* a link riding along with a text */
.attach { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 16px; background: color-mix(in srgb, var(--p) 9%, transparent); border: 1px solid color-mix(in srgb, var(--p) 18%, transparent); color: var(--text-2); }
.attach > .ms { color: var(--p); }
.attach b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach small { display: block; font-size: 12px; color: var(--faint); }
.attach button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.8); display: grid; place-items: center; color: var(--text-2); }
.attach button .ms { font-size: 18px; }
.clip { width: 38px; height: 38px; margin-left: -8px; border-radius: 50%; border: 0; background: none; color: var(--p); display: grid; place-items: center; flex: none; }
.clip .ms { font-size: 24px; }
.tiles { gap: 10px; }
.tile { width: 62px; height: 62px; }

/* one-tap text to the caller, and sharing the QR picture */
.lp-quick { flex: none; display: flex; align-items: center; gap: 4px; height: 36px; margin-right: 10px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--p); color: #fff; font-size: 13.5px; font-weight: 700; box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--p) 70%, transparent); }
.lp-quick .ms { font-size: 18px; }
.lp-quick:disabled { opacity: 0.5; }
.lp-qr-acts { width: 100%; display: grid; grid-template-columns: 2fr 1fr; gap: 6px; margin-top: 10px; }
.lp-qr-acts button { height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--p) 8%, transparent); color: var(--text-2); font-size: 11.5px; font-weight: 700; }
.lp-qr-acts button .ms { font-size: 20px; color: var(--p); }
.lp-qr-acts button.main { background: var(--p); color: #fff; }
.lp-qr-acts button.main .ms { color: #fff; }
.lp-qr-acts button:disabled { opacity: 0.5; }

/* ---------- On this call (the dock +): do things for the caller right now ---------- */
.op-body { overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; padding: 0 2px 4px; min-height: 120px; }
.op-note { margin: 0; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--p) 8%, transparent); color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.op-results { max-height: 50vh; }
.op-results .result { border-radius: 14px; background: rgba(255, 255, 255, 0.7); }
.op-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, 0.75); border: 1px solid rgba(255, 255, 255, 0.9); }
.op-card b { display: block; font-size: 17px; font-weight: 800; }
.op-card small { display: block; color: var(--faint); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-card .grow { min-width: 0; }
.op-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--p), var(--p-lite)); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--p) 60%, transparent); }
.op-change { border: 0; background: color-mix(in srgb, var(--p) 8%, transparent); color: var(--p); font-weight: 700; font-size: 13px; height: 32px; padding: 0 12px; border-radius: 999px; flex: none; }
.op-fam { display: flex; flex-wrap: wrap; gap: 6px; }
.op-kid { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.75); font-size: 13.5px; font-weight: 700; color: var(--hd); }
.op-kid i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10.5px; color: #fff; background: linear-gradient(135deg, var(--p-lite), var(--p)); }
.op-kid small { color: var(--faint); font-weight: 600; }
.op-trials { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.op-trials li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-2); padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--p) 8%, transparent); }
.op-trials li .ms { font-size: 18px; color: var(--hub); }
.op-trials small { display: block; color: #5d6679; font-weight: 600; }
.op-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.op-acts button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; min-height: 92px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.7); text-align: left; color: var(--hd); box-shadow: 0 1px 2px color-mix(in srgb, var(--hd) 6%, transparent); }
.op-acts button .ms { font-size: 26px; color: var(--p); margin-bottom: 4px; }
.op-acts button b { font-size: 14px; font-weight: 750; }
.op-acts button small { font-size: 11.5px; color: var(--faint); font-weight: 600; }
.op-acts button.hero { grid-column: 1 / -1; min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 10px; background: linear-gradient(135deg, var(--p), var(--p-lite)); color: #fff; border: 0; box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--p) 80%, transparent); }
.op-acts button.hero .ms { color: #fff; margin: 0; }
.op-acts button.hero small { color: rgba(255, 255, 255, 0.8); width: 100%; padding-left: 36px; margin-top: -4px; }
.op-acts button:active { transform: scale(0.98); }
.op-sec { display: flex; flex-direction: column; gap: 8px; }
.op-sec > b { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); padding-left: 4px; }
.op-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.op-chips button { height: 36px; display: inline-flex; align-items: center; gap: 4px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.7); font-size: 14px; font-weight: 700; color: var(--text-2); }
.op-chips button .ms { font-size: 18px; }
.op-chips button.on, .op-days button.on, .op-slots button.on { background: var(--p); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--p) 70%, transparent); }
.op-name { margin-top: 2px; }
.op-days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.op-days::-webkit-scrollbar { display: none; }
.op-days button { flex: none; width: 56px; height: 68px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.7); color: var(--hd); }
.op-days button small { font-size: 11px; font-weight: 700; opacity: 0.75; }
.op-days button b { font-size: 20px; font-weight: 800; line-height: 1.1; }
.op-days button i { font-style: normal; font-size: 10.5px; font-weight: 700; opacity: 0.7; }
.op-slots { display: flex; flex-direction: column; gap: 6px; }
.op-slots button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.72); text-align: left; color: var(--hd); }
.op-slots button .grow { min-width: 0; }
.op-slots button b { display: block; font-size: 14.5px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-slots button small { display: block; font-size: 12px; font-weight: 600; color: var(--faint); }
.op-slots button.on small { color: rgba(255, 255, 255, 0.8); }
.op-slots button.dim:not(.on) { opacity: 0.55; }
.op-slots button:disabled { opacity: 0.4; }
.op-time { flex: none; min-width: 64px; font-weight: 800; font-size: 14px; }
.op-left { flex: none; font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(6, 118, 71, 0.12); color: var(--success); }
.op-slots button.on .op-left { background: rgba(255, 255, 255, 0.22); color: #fff; }
.op-left.none { background: rgba(217, 45, 32, 0.1); color: var(--danger); }
.btn.primary.op-book { width: 100%; min-height: 50px; border-radius: 16px; font-size: 15px; position: sticky; bottom: 0; background: var(--p); box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--p) 90%, transparent); }
.btn.primary.op-book:disabled { opacity: 0.55; }
.op-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 14px 6px 6px; }
.op-done > .ms { font-size: 56px; color: var(--success); }
.op-done b { font-size: 19px; font-weight: 800; }
.op-done p { margin: 0; color: var(--text-2); font-weight: 650; }
.op-done small { color: var(--faint); font-size: 12.5px; font-weight: 600; max-width: 320px; }
.op-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 10px; }
/* Call desk: card entry for taking a payment on the call (desk.js). */
.dk-cf { height: 46px; padding: 0 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(255, 255, 255, 0.95); display: flex; align-items: center; }
.dk-cf iframe { border: 0; width: 100%; height: 26px; }
.dk-cf.grow { flex: 1; min-width: 0; }
.dk-row { display: flex; gap: 8px; }
.dk-row select { height: 46px; padding: 0 10px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.95); background: rgba(255, 255, 255, 0.8); font-weight: 650; color: var(--hd); }
.dk-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 650; color: var(--text-2); padding-left: 4px; }
.op-card small + small { margin-top: 1px; }

/* ---------- CRM glass in the school's Brand Kit ----------
   app.js sets --p, --s, --bgb, --tx, --hd, --bt, --font and --hfont from the school's Brand Kit (like the Team app);
   the defaults below are Paragon's own. */
:root {
  --p: #7251B5; --s: #EC4899; --bgb: #F6F3FF; --tx: #3F3A52; --hd: #1F1A2E; --bt: #FFFFFF; --font: "Inter"; --hfont: var(--font);
  --p-lite: color-mix(in srgb, var(--p) 62%, #fff);
  --deep: color-mix(in srgb, var(--p) 62%, #0b0820);
  --hub: var(--p); --hub-2: var(--p-lite); --hub-10: color-mix(in srgb, var(--p) 10%, transparent); --hub-20: color-mix(in srgb, var(--p) 22%, transparent);
  --grad: linear-gradient(135deg, var(--p-lite) 0%, var(--p) 100%);
  --text: var(--hd); --text-2: color-mix(in srgb, var(--p) 30%, var(--hd)); --muted: color-mix(in srgb, var(--tx) 82%, #fff); --faint: color-mix(in srgb, var(--tx) 55%, #fff);
  --glass: rgba(255, 255, 255, 0.62); --glass-strong: rgba(255, 255, 255, 0.9); --glass-line: rgba(255, 255, 255, 0.85);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px color-mix(in srgb, var(--hd) 5%, transparent), 0 8px 24px -12px color-mix(in srgb, var(--deep) 18%, transparent);
  --blur: blur(24px) saturate(180%); --hair: color-mix(in srgb, var(--tx) 10%, transparent); --radius: 22px;
  --palette: linear-gradient(160deg, rgba(255, 255, 255, 0.92), color-mix(in srgb, var(--bgb) 80%, transparent));
}
body, .thread {
  background:
    radial-gradient(700px 500px at 0% 0%, color-mix(in srgb, var(--p) 24%, transparent), transparent 60%),
    radial-gradient(600px 460px at 100% 15%, color-mix(in srgb, var(--s) 6%, transparent), transparent 60%),
    radial-gradient(700px 520px at 60% 100%, color-mix(in srgb, var(--p) 14%, transparent), transparent 60%),
    var(--bgb);
  background-attachment: fixed;
}
.logo { box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--p) 60%, transparent); }
.icon-btn { border-radius: 50%; border: 1px solid var(--glass-line); background: rgba(255, 255, 255, 0.7); }
.icon-btn.accent { box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--p) 70%, transparent); }
.btn { border-radius: 999px; border: 1px solid var(--glass-line); background: rgba(255, 255, 255, 0.75); }
.btn.primary { background: var(--p); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--p) 80%, transparent); }
input { border-radius: 14px; border-color: var(--glass-line); background: rgba(255, 255, 255, 0.8); }
input:focus, textarea:focus { border-color: color-mix(in srgb, var(--p) 50%, transparent); box-shadow: 0 0 0 3px var(--hub-20); }

/* Sign-in and install heroes: the palette card with a purple badge */
div.hero { color: var(--text); background: var(--palette); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid rgba(255, 255, 255, 0.75); border-radius: 26px; box-shadow: 0 24px 50px -18px color-mix(in srgb, var(--deep) 35%, transparent); }
div.hero::after { background: radial-gradient(circle, color-mix(in srgb, var(--p) 22%, transparent), transparent 70%); }
div.hero p { color: var(--muted); opacity: 1; }
.hero-ico { background: color-mix(in srgb, var(--p) 12%, transparent); border: 0; color: var(--p); }

/* Segmented controls and search: the CRM's pill track with a white "on" pill */
.seg, .seg.glass { padding: 3px; gap: 2px; border-radius: 999px; background: color-mix(in srgb, var(--tx) 10%, transparent); border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.seg button { height: 32px; border-radius: 999px; color: color-mix(in srgb, var(--hd) 60%, transparent); font-weight: 600; }
.seg button.on { color: var(--text); box-shadow: 0 1px 3px color-mix(in srgb, var(--hd) 12%, transparent); }
.search, .to-row { border-radius: 999px; background: rgba(255, 255, 255, 0.75); border: 1px solid rgba(255, 255, 255, 0.9); }
.row:active, .result:active, .result:hover { background: color-mix(in srgb, var(--p) 8%, transparent); }
.row .av, .result .av, .av { background: linear-gradient(135deg, var(--p-lite), var(--p)); }
.row .av.in { background: color-mix(in srgb, var(--p) 12%, transparent); color: var(--p); }
.row .av.out { background: linear-gradient(135deg, var(--p-lite), var(--p)); }
.row .av.miss { background: rgba(217, 45, 32, 0.1); color: var(--danger); }
.bubble.out { box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--p) 70%, transparent); }
.online-tog input:checked + i { background: linear-gradient(180deg, #34d058, #16a34a); }

/* Keypad: search-style field, glass key tiles and a wide green Call button */
.dial-top { padding: 4px 0 0; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.dial-field { flex-direction: row; align-items: center; gap: 10px; margin: 0; height: 58px; padding: 0 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.78); border: 1px solid rgba(255, 255, 255, 0.95); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px color-mix(in srgb, var(--hd) 6%, transparent), 0 12px 28px -16px color-mix(in srgb, var(--deep) 30%, transparent); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); color: var(--faint); cursor: text; transition: box-shadow 0.15s; }
.dial-field:focus-within { box-shadow: 0 0 0 3px var(--hub-20), 0 12px 28px -16px color-mix(in srgb, var(--deep) 30%, transparent); }
.dial-field .ms { font-size: 24px; }
.dial-input { flex: 1; min-width: 0; height: 56px; padding: 0; border: 0; background: transparent; text-align: left; font-size: 24px; font-weight: 700; color: var(--text); }
.dial-input:focus { box-shadow: none; }
.dial-input::placeholder { font-size: 16px; font-weight: 500; color: color-mix(in srgb, var(--hd) 40%, transparent); }
.dial-match { min-height: 18px; padding: 0 20px; text-align: left; color: var(--p); font-weight: 700; font-size: 13px; }
#dial-results { top: 72px; border-radius: 22px; background: var(--palette); box-shadow: 0 30px 70px -10px color-mix(in srgb, var(--deep) 45%, transparent); }
.dialpad { grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 340px; width: 100%; margin: 2px auto 4px; }
.key { width: auto; height: 72px; border-radius: 22px; font-size: 28px; font-weight: 600; color: var(--text); }
.key small { color: var(--faint); }
.key:active { transform: scale(0.95); background: color-mix(in srgb, var(--p) 14%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--p) 20%, transparent), 0 8px 18px -8px color-mix(in srgb, var(--p) 35%, transparent); }
.dial-actions { grid-template-columns: 56px 1fr 56px; gap: 12px; max-width: 340px; width: 100%; margin: 4px auto 0; }
.round.ghost { width: 56px; height: 56px; background: rgba(255, 255, 255, 0.62); border: 1px solid rgba(255, 255, 255, 0.85); box-shadow: var(--glass-shadow); color: var(--muted); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.round.ghost .ms { font-size: 24px; }
#dial-call { width: 100%; height: 60px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 8px; }
#dial-call .ms { font-size: 26px; }
#dial-call .lbl { font-size: 17px; font-weight: 700; }
.round.go { background: linear-gradient(180deg, #34d058, #16a34a); box-shadow: 0 12px 26px -10px rgba(22, 163, 74, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.round.decline { background: linear-gradient(180deg, #f97066, #d92d20); }
@media (max-height: 700px) { .key { width: auto; height: 60px; font-size: 25px; border-radius: 18px; } .dialpad { gap: 10px; } }

/* Ringing and in-call: the same deep night glass, tinted CRM purple */
.screen.ring, .screen.call {
  background: radial-gradient(600px 420px at 10% 0%, color-mix(in srgb, var(--p) 60%, transparent), transparent 60%), radial-gradient(600px 460px at 100% 100%, color-mix(in srgb, var(--s) 22%, transparent), transparent 60%), linear-gradient(160deg, var(--deep), var(--hd) 60%, color-mix(in srgb, var(--deep) 80%, var(--s)));
}
.avatar { background: linear-gradient(135deg, var(--p-lite), var(--p) 60%, var(--s)); box-shadow: 0 18px 40px -16px color-mix(in srgb, var(--p) 90%, transparent); }
.pulse::before, .pulse::after { background: color-mix(in srgb, var(--p) 35%, transparent); }
.callcard { border-radius: 30px; }
.tile, .kp-grid button { border-radius: 22px; }

/* Brand Kit fonts, heading colour and button text */
body { font-family: var(--font), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
h1, h2, h3, .brand span, .pane-head h1 { font-family: var(--hfont), var(--font), -apple-system, sans-serif; color: var(--hd); }
.callcard h1 { color: #fff; }
.btn.primary, .icon-btn.accent, .send, .bubble.out, .dock-plus, .lp-quick, .lp-acts button.main, .lp-qr-acts button.main, .op-acts button.hero, .op-chips button.on, .op-days button.on, .op-slots button.on, .steps li.done .check { color: var(--bt); }

/* Round keys and a round Call button, like the iPhone keypad */
.dialpad { grid-template-columns: repeat(3, 78px); gap: 14px 26px; justify-content: center; max-width: none; width: auto; margin: 6px auto 8px; }
.key { width: 78px; height: 78px; border-radius: 50%; font-size: 32px; font-weight: 500; }
.key small { font-size: 9.5px; margin-top: 2px; }
.dial-actions { grid-template-columns: repeat(3, 78px); gap: 26px; justify-content: center; max-width: none; width: auto; }
#dial-call { width: 78px; height: 78px; border-radius: 50%; }
#dial-call .ms { font-size: 34px; }
#dial-call .lbl { display: none; }
@media (max-height: 700px) { .dialpad { grid-template-columns: repeat(3, 68px); gap: 10px 24px; } .key { width: 68px; height: 68px; border-radius: 50%; font-size: 28px; } .dial-actions { grid-template-columns: repeat(3, 68px); } #dial-call { width: 68px; height: 68px; } }

/* Post to families */
.op-acts button.wide { grid-column: 1 / -1; min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 10px; }
.op-acts button.wide .ms { margin: 0; }
.op-acts button.wide small { width: 100%; padding-left: 36px; margin-top: -2px; }
.pc-body { gap: 10px; }
.pc-mode { align-self: center; }
.pc-mode button { padding: 0 16px; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 32px; align-items: center; }
.pc-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 2px 0 4px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px color-mix(in srgb, var(--p) 18%, transparent); font-size: 13.5px; font-weight: 700; color: var(--hd); max-width: 100%; }
.pc-chip i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10.5px; color: #fff; background: linear-gradient(135deg, var(--p-lite), var(--p)); flex: none; }
.pc-chip > .ms { font-size: 18px; color: var(--p); margin-left: 6px; }
.pc-chip small { color: var(--faint); font-weight: 650; }
.pc-chip button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: var(--faint); display: grid; place-items: center; }
.pc-chip button .ms { font-size: 16px; }
.pc-none { color: var(--faint); font-size: 12.5px; font-weight: 600; padding-left: 4px; }
.pc-results { max-height: 34vh; min-height: 0; padding: 4px; border-radius: 16px; background: rgba(255, 255, 255, 0.75); }
.pc-results .av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
#pc-aud { display: flex; flex-direction: column; gap: 6px; }
.pc-lbl { font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); padding: 4px 0 0 4px; }
#pc-aud .op-chips button small { opacity: 0.7; font-weight: 650; margin-left: 2px; }
.pc-save { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--p) 10%, transparent); color: var(--p); font-size: 13px; font-weight: 750; }
.pc-save .ms, .pc-del .ms { font-size: 18px; }
.pc-del { align-self: flex-start; min-height: 30px; padding: 0 4px; font-size: 13px; color: var(--danger); }
.pc-head, .pc-text { width: 100%; box-sizing: border-box; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.8); font: inherit; font-size: 16px; color: var(--text); }
.pc-head { height: 44px; font-weight: 700; }
.pc-text { min-height: 104px; padding: 12px 14px; resize: vertical; outline: none; line-height: 1.4; }
.pc-media { display: flex; gap: 8px; flex-wrap: wrap; }
.pc-thumb { position: relative; width: 108px; height: 108px; border-radius: 16px; overflow: hidden; background: #111; box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--deep) 60%, transparent); }
.pc-thumb img, .pc-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-thumb > .ms { position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; font-size: 40px; color: rgba(255, 255, 255, 0.92); pointer-events: none; }
.pc-thumb > small { position: absolute; left: 6px; bottom: 6px; padding: 2px 6px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 11px; font-weight: 700; }
.pc-thumb button { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; display: grid; place-items: center; }
.pc-thumb button .ms { font-size: 16px; }
.pc-tools button[hidden] { display: none; }
.pc-foot { display: flex; flex-direction: column; gap: 6px; flex: none; }
.pc-foot .btn.wide { margin-top: 0; min-height: 48px; border-radius: 999px; font-size: 15px; }
.pc-bar { position: relative; height: 22px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--p) 10%, transparent); }
.pc-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--p), var(--p-lite)); transition: width 0.25s; }
.pc-bar small { position: relative; display: block; text-align: center; line-height: 22px; font-size: 11.5px; font-weight: 750; color: var(--hd); mix-blend-mode: normal; }

/* Messages header: Post sits next to New message */
.head-acts { display: flex; align-items: center; gap: 10px; }
.head-post { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid var(--glass-line); background: rgba(255, 255, 255, 0.72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--p); font: 700 15px var(--font), -apple-system, sans-serif; box-shadow: 0 6px 16px -10px color-mix(in srgb, var(--p) 60%, transparent); }
.head-post .ms { font-size: 21px; }
.head-post.on { background: var(--grad); color: var(--bt); border-color: transparent; }
.pc-where { display: flex; flex-direction: column; margin-top: 4px; }
.pc-where .tog[hidden] { display: none; }
.pc-where .tog small.warn { color: var(--p); }
.tag.app { display: inline-flex; align-items: center; gap: 3px; }
.tag.app .ms { font-size: 13px; }
#msg-box { margin: 0 0 6px; }
#msg-box button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; position: relative; }
#msg-box .ms { font-size: 17px; }
.seg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bad, #e5484d); }
.lane-hint { margin: 0 4px 10px; font-size: 12px; color: color-mix(in srgb, var(--hd) 55%, transparent); }
.lane { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 12px 6px; font-size: 12px; font-weight: 650; color: #b45309; }
.lane.app { color: #15803d; }
.lane .ms { font-size: 16px; }

/* Student app messages: hold for reactions, Reply, Copy and Delete */
.bubble[data-i] { cursor: default; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .15s ease, filter .15s ease; }
.bubble.holding { transform: scale(.96); filter: brightness(.94); transition-duration: .35s; }
.bubble.flash { animation: msgflash 1.2s ease; }
@keyframes msgflash { 0%, 60% { filter: brightness(.85); transform: scale(1.02); } 100% { filter: none; transform: none; } }
.bubble.gone { font-style: italic; opacity: .7; background: transparent !important; color: var(--muted) !important; border: 1px dashed var(--glass-line); box-shadow: none !important; }
.bubble .quote { display: flex; flex-direction: column; gap: 1px; margin: -2px -5px 6px; padding: 6px 10px; border-radius: 12px; border-left: 3px solid var(--p); background: color-mix(in srgb, var(--p) 10%, transparent); font-size: 13px; line-height: 1.3; white-space: normal; cursor: pointer; }
.bubble .quote b { font-size: 12px; color: var(--p); }
.bubble .quote span { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bubble .quote.gone span { font-style: italic; }
.bubble.out .quote { background: rgba(255,255,255,.18); border-left-color: rgba(255,255,255,.85); }
.bubble.out .quote b, .bubble.out .quote span { color: rgba(255,255,255,.92); }
.rxs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -2px; padding: 0 4px; align-self: flex-start; }
.rxs.out { align-self: flex-end; }
.rx { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border: 1px solid var(--glass-line); border-radius: 999px; background: var(--glass-strong); font: inherit; font-size: 14px; line-height: 1.4; cursor: pointer; color: inherit; }
.rx b { font-size: 12px; font-weight: 650; color: var(--muted); }
.rx.on { border-color: var(--p); background: color-mix(in srgb, var(--p) 12%, var(--glass-strong)); }
.rx.on b { color: var(--p); }
.msg-menu { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; background: rgba(16, 24, 40, .35); animation: fadeIn .15s ease; }
.msg-sheet { width: 100%; max-width: 520px; display: grid; gap: 8px; margin: 10px; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); border-radius: 26px; color: var(--text); background: var(--glass-strong); }
.msg-sheet .btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.msg-sheet .btn.danger { color: var(--danger); background: var(--danger-bg); }
.msg-peek { margin: 0; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--text) 6%, transparent); font-size: 14px; color: var(--muted); white-space: pre-wrap; max-height: 90px; overflow: hidden; }
.rx-pick { display: flex; justify-content: space-between; gap: 6px; padding: 6px; border-radius: 999px; background: color-mix(in srgb, var(--text) 6%, transparent); }
.rx-pick button { flex: 1; height: 48px; border: 0; border-radius: 999px; background: transparent; font-size: 26px; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.rx-pick button:active { transform: scale(1.2); }
.rx-pick button.on { background: color-mix(in srgb, var(--p) 18%, transparent); }
.reply-bar { display: flex; align-items: center; gap: 8px; margin: 0 12px 6px; padding: 8px 10px; border-radius: 14px; border-left: 3px solid var(--p); background: var(--glass-strong); font-size: 13px; }
.reply-bar[hidden] { display: none; }
.reply-bar > .ms { color: var(--p); font-size: 20px; }
.reply-bar .grow { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.reply-bar b { font-size: 12px; color: var(--p); }
.reply-bar #replysnip { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-bar button { border: 0; background: transparent; color: var(--muted); padding: 4px; cursor: pointer; display: grid; place-items: center; }
.msg-sheet .btn.ghost { border: 0; background: transparent; color: var(--muted); }

/* "Someone is typing…" above the message box. */
.typing { display: flex; align-items: center; gap: 8px; margin: 0 14px 6px; font-size: 13px; font-weight: 600; color: var(--muted); animation: typing-in .18s ease-out; }
.typing[hidden] { display: none; }
.typing i { display: inline-flex; gap: 3px; padding: 9px 11px; border-radius: 16px; background: #fff; border: 1px solid var(--hair); }
.typing i b { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing-dot 1.2s infinite ease-in-out; }
.typing i b:nth-child(2) { animation-delay: .15s; }
.typing i b:nth-child(3) { animation-delay: .3s; }
@keyframes typing-dot { 0%, 60%, 100% { transform: none; opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes typing-in { from { opacity: 0; transform: translateY(4px); } }
