/* Copyright (c) 2026 Zion Nursery & Primary School, Kovaipudur
 * SPDX-License-Identifier: GPL-3.0-or-later
 * One stylesheet for every page; looks follow docs/design/ui-icons. */

:root {
    --accent: #4453d6; --accent-hover: #3a47bf; --accent-soft: #eef0fb;
    --text: #2d3748; --text-2: #4a5568; --muted: #5f6b7a;
    --border: #e2e8f0; --border-2: #cbd5e0; --bg-chat: #f7f8fb; --bg-pill: #e9edf3; --bg-soft: #edf2f7;
    --danger: #c53030; --success: #2f855a; --online: #38a169; --online-text: #2f7d4f;
    --dark: #11141c; --dark-2: #1d2230; --dark-3: #2a3040; --dark-text: #c9cedb;
    --shadow: 0 12px 32px rgba(20, 24, 40, .18), 0 2px 6px rgba(20, 24, 40, .08);
    font: 14px/1.45 'Segoe UI', system-ui, -apple-system, Tahoma, Verdana, sans-serif;
    color: var(--text);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ellipsis { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.subtle { color: var(--muted); }

/* ---- controls ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid transparent; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; white-space: nowrap; }
.btn:hover:not(:disabled) { filter: brightness(.93); }
.btn:disabled { opacity: .45; cursor: default; }
.btn .icon { width: 18px; height: 18px; }
.btn.outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn.outline .icon { color: var(--accent); }
.btn.outline:hover { background: var(--bg-chat); filter: none; }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.success { background: var(--success); }
.btn.danger { background: var(--danger); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.light { background: rgba(255, 255, 255, .16); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; padding: 0; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--text-2); }
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn.outline { border-color: var(--border); }
.icon-btn.small { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.small .icon { width: 14px; height: 14px; }
.icon-btn.filled { background: var(--bg-soft); }
.input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--border-2); border-radius: 10px; background: #fff; }
textarea.input { height: 72px; padding: 10px 12px; resize: vertical; font-family: Consolas, monospace; font-size: 13px; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(76, 82, 204, .25); }
.field { display: block; margin-bottom: 14px; }
.field-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.field-hint { font-weight: 400; color: var(--muted); }
.notice { padding: 10px 14px; margin-bottom: 14px; border-radius: 10px; font-weight: 500; background: var(--accent-soft); }
.notice.error { background: #fdecec; color: #8f1f1f; }
.notice.ok { background: #e6f4ea; color: #1e5c36; }

/* ---- avatars ---- */
.avatar { --size: 44px; position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--size); height: var(--size); flex-shrink: 0; border-radius: 50%; background: var(--avatar-bg, #4a5568); color: #fff; font-weight: 700; font-size: calc(var(--size) * .36); user-select: none; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.avatar.group { border-radius: 30%; }
.avatar.sm { --size: 32px; }
.avatar.md { --size: 48px; }
.avatar.xl { --size: 112px; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #a0aec0; }
.dot.online { background: var(--online); } .dot.busy { background: #e53e3e; } .dot.away { background: #eca024; }

/* ---- dialogs and toasts ---- */
dialog { width: min(400px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; box-shadow: var(--shadow); color: var(--text); }
dialog::backdrop { background: rgba(17, 20, 28, .45); }
.dialog-head { display: flex; align-items: center; gap: 10px; padding: 16px 12px 8px 20px; }
.dialog-head > .icon { color: var(--accent); }
.dialog-title { flex: 1; margin: 0; font-size: 17px; }
.dialog-body { padding: 8px 20px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 20px 20px; }
.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); }
.in-call .toasts { bottom: 120px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 12px; background: #1f2433; color: #fff; box-shadow: var(--shadow); }
.toast .icon-btn { color: var(--dark-text); }
.toast .icon-btn:hover { background: rgba(255, 255, 255, .12); }

/* ---- app layout ---- */
.app { display: flex; height: 100%; overflow: hidden; }
.sidebar { display: flex; flex-direction: column; width: 320px; flex-shrink: 0; border-right: 1px solid var(--border); background: #fff; }
.pane { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg-chat); }

.me { display: flex; align-items: center; gap: 12px; height: 76px; padding: 0 12px 0 16px; background: var(--accent); color: #fff; }
.me-avatar { position: relative; padding: 0; border: 0; border-radius: 50%; background: none; }
.me-avatar .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .6); }
.me-avatar-edit { position: absolute; right: -4px; bottom: -4px; display: flex; padding: 3px; border-radius: 50%; background: #fff; color: var(--accent); }
.me-avatar-edit .icon { width: 13px; height: 13px; }
.me-text { flex: 1; min-width: 0; }
.me-name { font-weight: 700; font-size: 16px; }
.me-user { font-size: 12.5px; opacity: .85; }
.on-accent { background: rgba(255, 255, 255, .14); color: #fff; }
.on-accent:hover { background: rgba(255, 255, 255, .26); }

.tabs { display: flex; border-bottom: 1px solid var(--border); }
.tab { flex: 1; height: 46px; border: 0; background: none; font-weight: 600; color: var(--text-2); }
.tab[aria-selected="true"] { color: var(--accent); box-shadow: inset 0 -2px var(--accent); }
.tab-count, .badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 700; }
.sidebar-tools { display: flex; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--bg-soft); }
.search { flex: 1; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 10px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); }
.search > .icon { width: 16px; height: 16px; }

.contact-list { flex: 1; overflow-y: auto; }
.contact { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid #f1f4f8; background: #fff; text-align: left; }
.contact:hover { background: var(--bg-chat); }
.contact.active { background: var(--accent-soft); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.row-name { flex: 1; font-weight: 600; font-size: 14.5px; }
.row-time { font-size: 11.5px; color: var(--muted); } .row-time.unread { color: var(--accent); font-weight: 600; }
.row-sub { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 12.5px; color: var(--text-2); }
.row-sub > .ellipsis { flex: 1; } .row-sub .badge { height: 18px; min-width: 18px; }
.row-sub .icon { width: 14px; height: 14px; }
.row-sub.missed { color: var(--danger); }
.row-sub.online { color: var(--online-text); }
.list-empty { padding: 24px; margin: 0; text-align: center; color: var(--muted); }

/* ---- conversation ---- */
.empty-state { margin: auto; text-align: center; color: var(--muted); padding: 24px; }
.empty-state h2 { margin: 16px 0 4px; color: var(--text); font-size: 20px; }
.empty-mark { display: inline-flex; padding: 18px; border-radius: 22px; background: var(--accent-soft); color: var(--accent); }
.empty-mark .icon { width: 36px; height: 36px; }
.conversation { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-header { display: flex; align-items: center; gap: 10px; height: 76px; padding: 0 20px; border-bottom: 1px solid var(--border); background: #fff; }
.back-btn { display: none; }
.chat-peer { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 0; border: 0; background: none; text-align: left; }
.chat-peer > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.chat-title { font-weight: 700; font-size: 17px; }
.chat-title .dot, .member .dot { display: inline-block; margin-right: 7px; vertical-align: 1px; }
.chat-sub { font-size: 13px; color: var(--muted); }
.chat-sub.online { color: var(--online-text); }
.chat-actions { display: flex; gap: 10px; }

.messages { flex: 1; overflow-y: auto; padding: 16px 32px; }
.message-list { display: flex; flex-direction: column; gap: 10px; max-width: 980px; margin: 0 auto; }
.row-center { align-self: center; max-width: 100%; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--bg-pill); font-size: 12px; font-weight: 600; color: var(--text-2); }
.bubble { max-width: min(560px, 80%); padding: 9px 14px 6px; border-radius: 4px 16px 16px; background: #fff; box-shadow: 0 1px 2px rgba(20, 24, 40, .08); font-size: 14.5px; overflow-wrap: anywhere; align-self: flex-start; }
.bubble.out { align-self: flex-end; border-radius: 16px 4px 16px 16px; background: var(--accent); color: #fff; }
.bubble.out a { color: #fff; }
.bubble.bare { padding: 0; background: none; box-shadow: none; }
.bubble.bare .meta, .bubble.bare.out .meta { color: var(--muted); }
.bubble.bare img { margin: 0; max-width: min(420px, 100%); box-shadow: 0 1px 3px rgba(20, 24, 40, .15); }
.sender { display: block; font-size: 12px; font-weight: 700; }
.bubble-body img { display: block; max-width: 100%; max-height: 400px; margin: 4px 0; border-radius: 10px; }
.bubble-body code { padding: 1px 5px; border-radius: 5px; background: rgba(0, 0, 0, .08); font-family: Consolas, monospace; font-size: 13px; }
.meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.out .meta { color: rgba(255, 255, 255, .8); }
.ticks .icon { width: 15px; height: 15px; }
.bubble.deleted { opacity: .75; }
.msg-more { display: none; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.msg-more .icon { width: 15px; height: 15px; }
.bubble:hover .msg-more, .msg-more:focus { display: inline-flex; }
.no-msg-menu .msg-more { display: none !important; }
.popup-menu { position: fixed; z-index: 50; min-width: 180px; padding: 6px; border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.popup-menu button { display: flex; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); text-align: left; }
.popup-menu button:hover:not(:disabled) { background: var(--bg-chat); }
.popup-menu button:disabled { color: var(--muted); }
.popup-menu .mark { width: 1em; color: var(--accent); }
.popup-menu .menu-heading { padding: 8px 10px 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.about { padding-top: 24px; text-align: center; }
.about h2 { margin: 8px 0 4px; }
.profile-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--border); text-align: left; overflow-wrap: anywhere; user-select: text; }
.profile-row .field-label { margin: 0; }
.unsaved-note, .edit-bar { display: flex; align-items: center; gap: 8px; padding: 6px 20px; font-size: 13px; color: var(--text-2); background: var(--accent-soft); }
.edit-bar { padding: 4px 4px 4px 10px; margin-bottom: 6px; border-radius: 10px; }
.edit-bar span { flex: 1; }
.read .ticks { color: #b8f0d0; }
.bare.read .ticks { color: var(--online); }
.call-pill { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; padding: 8px 14px; border-radius: 18px; background: var(--bg-pill); font-size: 13.5px; font-weight: 600; color: #3b4452; }
.call-pill .icon { width: 16px; height: 16px; }
.call-pill.missed { color: var(--danger); }
.call-pill .time { font-weight: 400; color: var(--muted); }
.call-pill[tabindex] { cursor: pointer; }
.call-more { font-weight: 400; color: var(--accent); }
.file-card { display: flex; align-items: center; gap: 12px; width: 320px; max-width: 100%; margin: 2px 0; padding: 10px; border: 1px solid #dfe3ea; border-radius: 12px; background: #fff; color: var(--text) !important; text-decoration: none; }
.file-icon { display: flex; padding: 10px; border-radius: 12px; background: #edf0f4; color: #4a5568; }
.file-icon.pdf { background: #fbeae8; color: #c0392b; } .file-icon.text { background: #e8effb; color: #1d5fbf; }
.file-icon.sheet { background: #e6f3ec; color: #1e7b45; } .file-icon.slides { background: #fbede3; color: #c05a12; }
.file-icon.image { background: #f0e9fb; color: #7a3fd1; } .file-icon.audio { background: #f9e8ef; color: #b8336a; }
.file-icon.video { background: #e3f2f5; color: #0e7490; } .file-icon.zip { background: #f6efdc; color: #8a6a10; }
.file-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-name { font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.file-size { font-size: 12.5px; color: var(--muted); }
.file-dl { display: flex; padding: 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.typing { display: flex; align-items: center; gap: 8px; padding: 0 32px 6px; font-size: 12.5px; color: var(--muted); }
.typing-dots span { display: inline-block; width: 5px; height: 5px; margin-right: 3px; border-radius: 50%; background: currentColor; animation: blink 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: .2s; } .typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }

.composer { padding: 8px 24px 16px; border-top: 1px solid var(--border); background: #fff; }
.format-bar { display: flex; align-items: center; gap: 2px; margin-bottom: 8px; }
.fmt-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font-size: 15px; }
.fmt-btn:hover { background: var(--bg-soft); }
.fmt-btn.on { background: #e1e5fb; color: var(--accent); box-shadow: inset 0 0 0 1px rgba(68, 83, 214, .5); }
.fmt-btn.on:hover { background: #d3d9f8; }
.fmt-btn .icon { width: 18px; height: 18px; }
.fmt-sep { width: 1px; height: 20px; margin: 0 6px; background: var(--border); }
.composer-row { display: flex; align-items: flex-end; gap: 10px; }
.attach-btn { width: 44px; height: 44px; border-radius: 12px; }
.editor { flex: 1; min-height: 44px; max-height: 160px; overflow-y: auto; padding: 10px 14px; border: 1px solid var(--border-2); border-radius: 12px; font-size: 14.5px; overflow-wrap: anywhere; }
.editor:focus { outline: none; border-color: var(--accent); }
.editor:empty::before { content: attr(data-placeholder); color: #718096; pointer-events: none; }
.editor img { max-width: 240px; max-height: 160px; vertical-align: middle; border-radius: 8px; }
.uploading { color: var(--muted); font-style: italic; }
.send-btn { height: 44px; border-radius: 12px; }
.drop-overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(76, 82, 204, .12); border: 3px dashed var(--accent); pointer-events: none; }
.dropping .drop-overlay { display: flex; }
.drop-card { display: flex; gap: 10px; padding: 14px 20px; border-radius: 12px; background: #fff; color: var(--accent); font-weight: 600; box-shadow: var(--shadow); }
.member { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f1f4f8; }
.member > span:nth-child(2) { flex: 1; font-weight: 600; }
.member[role=button] { cursor: pointer; }
.member-list { max-height: 50vh; overflow-y: auto; }

/* ---- calls ---- */
.call-layer { position: fixed; inset: 0; z-index: 20; display: flex; background: var(--dark); color: #fff; }
.call-stage { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 20px 24px 24px; }
.call-head { display: flex; align-items: center; gap: 12px; color: var(--dark-text); }
.call-head-text { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.call-head-title { font-weight: 700; font-size: 18px; color: #fff; }
.call-head-sub { font-size: 14px; color: #aab1c2; }
.peer-muted { display: flex; align-items: center; gap: 6px; margin-left: auto; padding: 4px 10px; border-radius: 10px; background: rgba(255, 138, 138, .15); color: #ff8a8a; font-size: 13px; }
.peer-muted .icon { width: 16px; height: 16px; }
.one-body { position: relative; flex: 1; min-height: 0; border-radius: 16px; background: var(--dark-2); overflow: hidden; }
.one-remote-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
#remoteVideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
#remoteVideo.shown { opacity: 1; }
#remoteVideo.controlling { cursor: crosshair; }
.pip { position: absolute; right: 16px; bottom: 16px; width: 22%; min-width: 140px; aspect-ratio: 16/10; border-radius: 12px; background: #000; object-fit: cover; box-shadow: var(--shadow); }
.share-note { position: absolute; top: 12px; left: 12px; padding: 6px 10px; border-radius: 10px; background: rgba(8, 10, 16, .7); font-size: 13px; font-weight: 600; }

.group-body { flex: 1; min-height: 0; display: flex; gap: 12px; }
.stage-main { flex: 1; display: grid; gap: 12px; }
.tiles { flex: 1; display: grid; gap: 12px; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); }
.tiles[data-n="2"], .tiles[data-n="3"], .tiles[data-n="4"] { --cols: 2; }
.tiles[data-n="5"], .tiles[data-n="6"], .tiles[data-n="7"], .tiles[data-n="8"], .tiles[data-n="9"] { --cols: 3; }
.staged .tiles { flex: 0 0 220px; --cols: 1; grid-auto-rows: 140px; overflow-y: auto; }
.tile { position: relative; min-height: 0; border-radius: 16px; background: var(--dark-2); overflow: hidden; }
.tile video { width: 100%; height: 100%; object-fit: cover; display: none; }
.tile.screen video { object-fit: contain; }
.tile.pickable { cursor: pointer; }
.net-banner { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 50; padding: 8px 16px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); }
.tile.pickable:hover { box-shadow: inset 0 0 0 3px var(--accent); }
.tile.has-video video { display: block; }
.tile-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.tile.has-video .tile-face { display: none; }
.staged .tiles .avatar.xl { --size: 64px; }
.tile.speaking { box-shadow: inset 0 0 0 3px #68d391; }
.tile-label { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 24px); padding: 5px 10px; border-radius: 10px; background: rgba(8, 10, 16, .7); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.badges { display: contents; color: #ff8a8a; }
.badges .icon { width: 16px; height: 16px; }

.call-controls { display: flex; justify-content: center; gap: 14px; }
.ctrl { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; padding: 0; border: 0; background: none; color: var(--dark-text); font-size: 12px; }
.ctrl .round { position: relative; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 28px; background: var(--dark-3); color: #fff; }
.ctrl .icon { width: 24px; height: 24px; }
.ctrl:hover .round { filter: brightness(1.2); }
.ctrl.off .round, .ctrl.chat.on .round { background: #fff; color: #1f2433; }
.ctrl.on .round { background: var(--accent); }
.ctrl.end .round { width: 76px; background: var(--danger); }
.ctrl.dot .round::after { content: ''; position: absolute; top: 10px; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: #f6ad55; box-shadow: 0 0 0 2px var(--dark-3); }

.call-chat { display: flex; flex-direction: column; width: 340px; flex-shrink: 0; background: #fff; color: var(--text); }
.call-chat-head { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--border); color: var(--accent); }
.call-chat-title { flex: 1; font-weight: 700; font-size: 16px; color: var(--text); }
.call-chat-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--bg-chat); }
.call-chat-list .bubble { max-width: 90%; font-size: 13.5px; }
.call-chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }

.incoming { position: fixed; top: 20px; right: 20px; z-index: 40; display: flex; align-items: center; gap: 14px; width: min(380px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 18px; background: #1f2433; color: #fff; box-shadow: var(--shadow); }
.incoming-text { flex: 1; min-width: 0; }
.incoming-kind { font-size: 12.5px; color: var(--dark-text); }
.incoming-name { font-weight: 700; font-size: 16px; }
.incoming-actions { display: flex; gap: 10px; }
.round-btn { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; border-radius: 50%; color: #fff; }
.round-btn.accept { background: var(--success); animation: pulse 1.4s infinite; }
.round-btn.decline { background: var(--danger); }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(47, 133, 90, .25); } }

.dial-display { display: block; min-height: 50px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-chat); text-align: center; font: 24px Consolas, monospace; }
.dial-status { min-height: 20px; margin: 4px 0 8px; text-align: center; font-size: 12.5px; color: var(--muted); }
.dial-pad, .dial-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.dial-pad button { height: 50px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 20px; }
.dial-pad button:active { background: var(--bg-soft); }
.dial-actions { margin-bottom: 20px; }

/* ---- narrow screens: one pane at a time ---- */
@media (max-width: 760px) {
    .sidebar { width: 100%; border: 0; }
    .app[data-view="chat"] .sidebar, .app[data-view="list"] .pane { display: none; }
    .back-btn { display: inline-flex; }
    .chat-header { padding: 0 8px; gap: 6px; }
    .chat-actions .label { display: none; }
    .chat-actions .btn { width: 40px; padding: 0; }
    .messages { padding: 12px; }
    .composer { padding: 6px 10px 10px; }
    .send-btn span { display: none; }
    .call-stage { padding: 12px; }
    .call-chat { position: absolute; inset: 0; width: auto; }
    .call-controls { gap: 4px; }
    .ctrl { width: 60px; }
    .ctrl .round { width: 48px; height: 48px; }
    .staged { flex-direction: column; }
    .staged .tiles { flex: 0 0 120px; grid-auto-flow: column; grid-auto-columns: 160px; grid-auto-rows: auto; overflow-x: auto; }
}
.secret-code { margin: 14px 0; padding: 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent);
    font: 700 28px/1.2 Consolas, monospace; letter-spacing: .15em; text-align: center; }
.check-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
