:root {
  --bg: #0f1216; --panel: #181c22; --panel2: #20262e; --panel3: #2a313b; --line: #2b323c;
  --text: #e9edf2; --muted: #8a95a3; --accent: #4f8cff; --accent-2: #3a74e8; --accent-soft: rgba(79, 140, 255, .16);
  --green: #2ecc71; --red: #ff5a5f; --yellow: #f5c542; --radius: 16px; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --tile-min: 220px;
  color-scheme: dark;
}
/* light theme: chosen in the settings, or "as the system" */
:root[data-theme="light"] {
    --bg: #f3f5f8; --panel: #ffffff; --panel2: #eef1f5; --panel3: #e3e8ee; --line: #dde2e9;
    --text: #151a21; --muted: #6a7482; --accent-soft: rgba(79, 140, 255, .12); --shadow: 0 10px 30px rgba(20, 30, 50, .12);
    color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f5f8; --panel: #ffffff; --panel2: #eef1f5; --panel3: #e3e8ee; --line: #dde2e9;
    --text: #151a21; --muted: #6a7482; --accent-soft: rgba(79, 140, 255, .12); --shadow: 0 10px 30px rgba(20, 30, 50, .12);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.err { color: var(--red); min-height: 1.2em; margin: 8px 0 0; }
.spacer { flex: 1; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* icons */
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 16px; height: 16px; }
.ic.xl { width: 40px; height: 40px; stroke-width: 1.5; color: var(--muted); }
.logo { width: 26px; height: 26px; color: var(--accent); }
.logo-big { width: 56px; height: 56px; color: var(--accent); }

/* buttons */
button, .btn { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; text-decoration: none; }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 12px;
  background: var(--panel2); border: 1px solid var(--line); font-weight: 500; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:hover { background: var(--panel3); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn.wide { width: 100%; padding: 12px; margin-top: 10px; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px; border-radius: 12px; color: var(--text); transition: background .15s; }
.icon-btn:hover { background: var(--panel2); }
.icon-btn.danger { background: var(--red); color: #fff; }
.round-sm { width: 38px; height: 38px; justify-content: center; border-radius: 50%; background: var(--panel2); }
.round-sm.off { background: var(--red); color: #fff; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; color: inherit; }
.link-btn .chev { transition: transform .2s; color: var(--muted); }
.link-btn.open .chev { transform: rotate(180deg); }

input, select { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; }
input[type=range] { padding: 0; accent-color: var(--accent); background: none; border: 0; }
.field { display: grid; gap: 6px; margin: 12px 0; text-align: left; }
.field > span { font-size: 13px; color: var(--muted); }

/* screens */
.screen.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 28px; width: min(440px, 100%); text-align: center; box-shadow: var(--shadow); }
.card h1 { margin: 10px 0 6px; font-size: 26px; }
.card h2 { margin: 4px 0 14px; }

/* wall: top bar */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 20px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.online-count { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; padding-left: 8px; }
.online-count::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.pill { display: inline-flex; align-items: center; gap: 8px; max-width: 260px; padding: 7px 12px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); }
.pill:hover { background: var(--panel3); }

.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
/* virtual-office statuses */
.dot.open { background: var(--green); }
.dot.knock { background: var(--accent); }
.dot.focus { background: var(--red); }
.dot.away { background: var(--yellow); }
.dot.out, .dot.off { background: #6b7280; }

/* rooms strip */
.rooms { display: flex; gap: 10px; padding: 16px 20px 0; overflow-x: auto; scrollbar-width: none; }
.room-card { display: flex; align-items: center; gap: 12px; flex: none; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 14px; }
.room-card.live { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--panel); }
.room-card .r-text { display: grid; line-height: 1.25; }
.room-card .r-title { font-weight: 600; font-size: 14px; }
.room-card .r-sub { font-size: 12px; color: var(--muted); }
.faces { display: flex; padding-left: 6px; }
.faces > * { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; margin-left: -6px; border: 2px solid var(--panel);
  background: var(--panel3); display: grid; place-items: center; font-size: 11px; font-weight: 600; }

/* wall: sections and grid */
.wall-main { padding: 6px 20px 110px; }
.section-head { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.section-head h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.count { color: var(--text); opacity: .7; margin-left: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile-min), 1fr)); gap: 14px; }
.grid.offline .tile { opacity: .55; }
.grid.offline .tile:hover { opacity: .85; }
.grid.offline .photo { filter: grayscale(1); }

.tile { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--panel2); cursor: pointer;
  box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line); transition: transform .15s, box-shadow .15s; isolation: isolate; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.tile .media, .tile .photo, .tile .initials, .tile video { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile .photo { object-fit: cover; display: block; transition: filter .3s; }
.tile .initials { display: grid; place-items: center; font-size: calc(var(--tile-min) / 5); font-weight: 650; letter-spacing: .02em; color: rgba(255, 255, 255, .92);
  background: radial-gradient(circle at 25% 15%, hsl(var(--h, 215) 55% 52%), hsl(calc(var(--h, 215) + 35) 50% 28%)); }
.tile video { object-fit: cover; transform: scaleX(-1); opacity: 0; transition: opacity .2s; }
.tile.live video { opacity: 1; }
.tile .count-big { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; font-weight: 800; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); pointer-events: none; }
.tile.stale .photo { filter: grayscale(.6) brightness(.85); }
.tile .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72)); pointer-events: none; }
.tile .line1 { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.tile .line1 .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.tile .line2 { display: flex; gap: 8px; font-size: 12px; opacity: .85; margin-top: 1px; }
.tile .line2 .note { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .line2 .ago { flex: none; opacity: .8; }
.tile .dot { box-shadow: 0 0 0 2px rgba(0, 0, 0, .35); }
.tile .badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 20px);
  background: rgba(0, 0, 0, .6); color: #fff; backdrop-filter: blur(6px); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 500; }
.tile .badge.call { background: var(--accent); }
.tile .badge.meet { background: rgba(176, 72, 52, .85); }
.tile .badge.ringing { animation: pulse 1.2s infinite; }
.tile .badge .ic { width: 14px; height: 14px; }
.tile .hover { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .15s; background: rgba(0, 0, 0, .25); }
.tile:hover .hover, .tile:focus-visible .hover { opacity: 1; }
.tile .act { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--accent); color: #fff;
  font-weight: 600; font-size: 14px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.tile .act.warn { background: var(--red); }
.tile .act.open { background: var(--green); }
.tile .act.soft { background: rgba(0, 0, 0, .65); }
.tile .act.muted-act { background: rgba(0, 0, 0, .65); }
.tile .fresh { position: absolute; inset: 0; pointer-events: none; animation: flash .7s ease-out; z-index: 3; }
@keyframes flash { from { background: rgba(255, 255, 255, .55); } to { background: transparent; } }
@keyframes pulse { 50% { opacity: .55; } }

/* self tile */
.tile.self { cursor: default; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); }
.tile.self:hover { transform: none; }
.tile.self .badge { display: none; }
.tile.self:hover .self-timer, .tile.self:focus-within .self-timer { opacity: 0; }
.self-timer { transition: opacity .15s; }
.self-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; z-index: 2; }
.tile.self:hover .self-tools, .tile.self:focus-within .self-tools { opacity: 1; }
.self-tools button { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(6px); }
.self-tools button:hover { background: rgba(0, 0, 0, .8); }
.self-tools button.active { background: var(--accent); }
.self-tools .ic { width: 17px; height: 17px; }
.self-timer { position: absolute; top: 10px; left: 10px; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(6px); }
.self-timer.warn { background: var(--red); }

.empty { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 14px; padding: 18px 20px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--panel); }
.empty > div { flex: 1; min-width: 200px; }

/* popovers */
.popover { position: fixed; z-index: 40; min-width: 260px; max-width: calc(100vw - 24px); background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 16px; padding: 8px; box-shadow: var(--shadow); animation: pop .14s ease-out; }
.popover.wide { width: 340px; padding: 14px 16px; max-height: calc(100vh - 80px); overflow-y: auto; }
.pop-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 8px 8px; }
.popover.wide .pop-title { padding: 0 0 4px; }
.pop-sep { height: 1px; background: var(--line); margin: 8px 0; }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 10px; }
.opt:hover { background: var(--panel2); }
.opt .tick { margin-left: auto; color: var(--accent); visibility: hidden; }
.opt.sel .tick { visibility: visible; }
.opt .opt-sub { display: block; font-size: 12px; color: var(--muted); }
#note-input { margin: 4px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px 4px; }
.chip { padding: 5px 10px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); font-size: 12.5px; }
.chip:hover { background: var(--panel3); }
.seg { display: flex; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { flex: 1; padding: 6px 4px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.seg button.sel { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); font-weight: 600; }
.switch { display: flex; align-items: center; gap: 10px; margin: 10px 0; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--panel3); transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.ob-link { margin-top: 14px; }
.ob-link .link-btn { text-decoration: underline; text-underline-offset: 3px; }
.link-code { text-align: center; background: var(--panel2); border-radius: 12px; padding: 12px; margin: 6px 0; }
.link-code b { display: block; font-size: 30px; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; }

/* minimised call bar */
.minibar { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 15; display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 16px; border-radius: 999px; background: #151a20; color: #e9edf2; border: 1px solid #2b323c; box-shadow: var(--shadow); max-width: calc(100% - 24px); }
.mini-info { display: grid; line-height: 1.2; min-width: 0; }
.mini-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.minibar .round-sm { background: #2a313b; color: #e9edf2; }
.minibar .round-sm.off, .minibar .round-sm.danger { background: var(--red); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255, 90, 95, .6); animation: live 1.6s infinite; flex: none; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(255, 90, 95, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 95, 0); } }

/* pre-join */
.prejoin-card { width: min(520px, 100%); }
.pj-preview { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 16 / 10; }
#pj-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.pj-off { position: absolute; inset: 0; display: grid; place-items: center; color: #aab3bf; background: #12161b; }
.pj-tools { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 12px; }
.pj-who { margin: 12px 0 0; min-height: 1.2em; }
.round-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(40, 46, 56, .85); color: #fff; backdrop-filter: blur(6px); }
.round-btn.off { background: var(--red); }
.round-btn.lg { width: 64px; height: 64px; }
.round-btn.lg .ic { width: 26px; height: 26px; }
.round-btn.ok { background: var(--green); }
.round-btn.danger { background: var(--red); }

/* call (always dark) */
#call { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; background: #0b0d10; color: #e9edf2; color-scheme: dark;
  --panel: #181c22; --panel2: #20262e; --panel3: #2a313b; --line: #2b323c; --text: #e9edf2; --muted: #8a95a3; }
.call-head { display: flex; align-items: center; gap: 14px; padding: 10px 16px; }
.call-title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
#call-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage { position: relative; flex: 1; min-height: 0; display: flex; gap: 8px; padding: 0 10px; }
.stage-main { flex: 1; min-width: 0; min-height: 0; display: grid; gap: 8px; }
.stage-side { display: none; width: 230px; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: thin; }
.stage.focus .stage-side { display: flex; }
.stage.focus .stage-main { grid-template-columns: 1fr !important; grid-template-rows: 1fr !important; }
.stage-side .ptile { flex: none; aspect-ratio: 16 / 9; }
.ptile { position: relative; background: #171b21; border-radius: 14px; overflow: hidden; min-height: 0; min-width: 0; }
.ptile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 3px transparent; transition: box-shadow .15s; pointer-events: none; }
.ptile.speaking::after { box-shadow: inset 0 0 0 3px var(--green); }
.ptile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.ptile.screen video, .stage.focus .stage-main .ptile video { object-fit: contain; }
.ptile.local:not(.screen) video { transform: scaleX(-1); }
.ptile .avatar { position: absolute; inset: 0; display: grid; place-items: center; }
.ptile .avatar span { width: 34%; max-width: 120px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(18px, 4vw, 40px); font-weight: 600;
  background: linear-gradient(135deg, #3a4656, #262d37); color: #cfd6df; }
.ptile .avatar img { width: 34%; max-width: 140px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
.ptile .label { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 16px);
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); border-radius: 8px; padding: 4px 9px; font-size: 13px; }
.ptile .label .ic { width: 14px; height: 14px; color: var(--red); }
.ptile .label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptile .q { position: absolute; top: 10px; right: 10px; display: flex; align-items: flex-end; gap: 2px; height: 14px; padding: 3px 5px; border-radius: 6px; background: rgba(0, 0, 0, .45); box-sizing: content-box; }
.ptile .q i { width: 3px; background: rgba(255, 255, 255, .3); border-radius: 1px; }
.ptile .q i:nth-child(1) { height: 5px; } .ptile .q i:nth-child(2) { height: 9px; } .ptile .q i:nth-child(3) { height: 14px; }
.ptile .q.excellent i { background: var(--green); }
.ptile .q.good i:nth-child(-n+2) { background: var(--yellow); }
.ptile .q.poor i:nth-child(1) { background: var(--red); }
.ptile .pin { position: absolute; top: 8px; left: 8px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; opacity: 0; transition: opacity .15s; }
.ptile:hover .pin, .ptile.pinned .pin { opacity: 1; }
.ptile.pinned .pin { background: var(--accent); }
.ptile .pin .ic { width: 16px; height: 16px; }
.stage-wait { position: absolute; top: 10px; left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; z-index: 2; padding: 0 56px; }
.wait-bar { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 6px 6px 6px 14px; border-radius: 999px;
  background: rgba(20, 24, 30, .78); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .08); box-shadow: var(--shadow); animation: pop .2s ease-out; }
.wait-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.wait-bar .btn.sm { padding: 5px 10px; }
.wait-x { padding: 6px; border-radius: 50%; color: #cfd6df; }
.wait-x:hover { background: rgba(255, 255, 255, .1); }
.wait-faces { display: flex; gap: 4px; flex: none; }
.wait-faces > * { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #2a313b; display: grid; place-items: center; font-size: 11px; font-weight: 600; animation: pulse 1.4s infinite; }

.controls { display: flex; gap: 10px; justify-content: center; align-items: flex-start; padding: 12px; padding-bottom: max(14px, env(safe-area-inset-bottom)); flex-wrap: wrap; }
.ctl-group { display: flex; align-items: flex-start; }
.ctl { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 66px; padding: 0; color: #cfd6df; font-size: 11.5px; }
.ctl .ic { box-sizing: content-box; padding: 13px; border-radius: 50%; background: #232a33; color: #fff; transition: background .15s; }
.ctl:hover .ic { background: #2f3843; }
.ctl.off .ic { background: var(--red); }
.ctl.active .ic { background: var(--accent); }
.ctl.leave .ic { background: var(--red); }
.ctl.leave:hover .ic { background: #e04a4f; }
.ctl-more { margin: 10px 0 0 -14px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #3a4350; color: #fff; border: 2px solid #0b0d10; z-index: 1; }
.ctl-more:hover { background: #4a5462; }
.invite-panel { animation: none; bottom: 104px; left: 50%; transform: translateX(-50%); position: absolute; width: min(400px, calc(100% - 24px)); max-height: 55vh; overflow-y: auto; }
.inv { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: 12px; text-align: left; }
.inv:hover { background: var(--panel2); }
.inv img, .inv .av { width: 48px; height: 36px; border-radius: 8px; object-fit: cover; background: var(--panel3); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.inv .inv-name { flex: 1; min-width: 0; }
.inv .inv-name b { display: block; font-weight: 600; }
.inv .inv-state { font-size: 12px; color: var(--muted); }
.inv.disabled { opacity: .5; cursor: default; }
.floating { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); z-index: 3; }

/* knock modal + toast */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(5, 8, 12, .6); backdrop-filter: blur(4px); padding: 16px; }
.knock-card { width: min(360px, 100%); animation: pop .25s ease-out; }
.knock-photo { position: relative; width: 150px; height: 150px; margin: 0 auto 14px; }
.knock-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--panel2); position: relative; z-index: 1; }
.ring-pulse { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(46, 204, 113, .55); animation: ringp 1.5s infinite; }
@keyframes ringp { 70% { box-shadow: 0 0 0 26px rgba(46, 204, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); } }
.knock-actions { display: flex; justify-content: center; gap: 56px; margin-top: 18px; }
.knock-labels { display: flex; justify-content: center; gap: 52px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.knock-labels span { width: 72px; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.toast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%); z-index: 60; background: #1d232b; color: #e9edf2; border: 1px solid #2f3843;
  padding: 10px 18px; border-radius: 12px; max-width: calc(100% - 32px); box-shadow: var(--shadow); animation: pop .15s ease-out; overflow-wrap: anywhere; }

/* statistics */
.seg button { white-space: nowrap; }
:root { --bar: #4f8cff; }
:root[data-theme="light"] { --bar: #3a74e8; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --bar: #3a74e8; } }
.stats-title { margin: 0; font-size: 18px; }
.seg.period button { padding: 6px 12px; }
.stats-tabs { display: flex; gap: 4px; padding: 12px 20px 0; border-bottom: 1px solid var(--line); }
.stats-tabs button { padding: 9px 14px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; margin-bottom: -1px; }
.stats-tabs button.sel { color: var(--text); border-bottom-color: var(--accent); }
.stats-main { padding: 18px 20px 60px; max-width: 1280px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.kpi .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .l { color: var(--muted); font-size: 13px; }
.st-table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; margin-bottom: 10px; }

.st-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.st-table th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.st-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.st-table tr:last-child td { border-bottom: 0; }
.st-table td.num, .st-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-user { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.st-user img, .st-user .av { width: 40px; height: 30px; border-radius: 7px; object-fit: cover; background: var(--panel3); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.st-user b { font-weight: 600; }
.st-now { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.st-sub { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 34px; min-width: 70px; border-bottom: 1px solid var(--line); padding: 0 1px; }
.bars i { flex: 1; min-width: 3px; max-width: 14px; background: var(--bar); border-radius: 4px 4px 0 0; position: relative; }
.bars i.zero { background: var(--line); height: 2px !important; border-radius: 1px; }
.bars i::after { content: ""; position: absolute; left: -1px; right: -1px; bottom: 0; height: 34px; } /* hit target taller than the bar */
.bars i:hover { filter: brightness(1.25); }
.st-tip { position: fixed; z-index: 70; pointer-events: none; background: #1d232b; color: #e9edf2; border: 1px solid #2f3843; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; box-shadow: var(--shadow); white-space: nowrap; }
.st-h { margin: 6px 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.st-h-row { display: flex; align-items: center; gap: 12px; margin-top: 26px; }
.st-h-row .st-h { margin: 0; }
.st-h-row select { width: auto; margin-left: auto; padding: 6px 10px; }
.off-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.off-card { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.off-card img, .off-card .av { width: 56px; height: 42px; border-radius: 8px; object-fit: cover; filter: grayscale(1); background: var(--panel3); display: grid; place-items: center; font-weight: 600; flex: none; }
.off-card .t { min-width: 0; }
.off-card b { display: block; }
.off-card .meta { font-size: 12.5px; color: var(--muted); }
.st-log { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-top: 12px; overflow: hidden; }
.log-day { padding: 8px 14px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--panel2); border-bottom: 1px solid var(--line); }
.log-row { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.log-row:last-child { border-bottom: 0; }
.log-time { font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.log-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.log-who .av, .log-who img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--panel3); display: grid; place-items: center; font-size: 10px; font-weight: 600; flex: none; }
.log-who .what { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-who .what .muted { margin-left: 6px; }
.log-who .ic { width: 15px; height: 15px; color: var(--muted); flex: none; }
.log-row.call .log-who .ic { color: var(--accent); }
.log-dur { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-weight: 600; }
.live-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
/* below desktop width each person becomes a card instead of a wide row */
@media (max-width: 1080px) {
  .st-table thead { display: none; }
  .st-table, .st-table tbody { display: block; }
  .st-table tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; padding: 12px; border-bottom: 1px solid var(--line); }
  .st-table tr:last-child { border-bottom: 0; }
  .st-table td { padding: 0; border: 0; text-align: left !important; }
  .st-table td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--muted); }
  .st-table td.c-user { grid-column: 1 / span 3; }
  .st-table td.c-now { grid-column: 4; }
  .st-table td.c-last { grid-column: span 3; order: 1; }
  .st-table td.c-bars { grid-column: 1 / -1; order: 2; }
}
@media (max-width: 560px) {
  .st-table tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-table td.c-last { grid-column: 1 / -1; }
  .st-table td.c-user { grid-column: 1 / -1; }
  .st-table td.c-now { grid-column: auto; }
}
#st-more { margin: 12px auto 0; display: flex; }
#st-more.hidden { display: none; }
.st-empty { padding: 18px; color: var(--muted); text-align: center; }

@media (max-width: 720px) {
  .stats-tabs { padding: 8px 12px 0; }
  .stats-main { padding: 14px 12px 60px; }
  .stats-title { font-size: 16px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi .v { font-size: 20px; }
  .seg.period button { padding: 6px 8px; }
  .log-row { grid-template-columns: 1fr auto; }
  .log-time { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
  .off-list { grid-template-columns: 1fr; }

  .topbar { padding: 8px 12px; gap: 8px; }
  .brand span, .online-count { display: none; }
  #btn-new span { display: none; }
  #btn-new { padding: 9px 11px; }
  .pill { max-width: 46vw; }
  .rooms { padding: 12px 12px 0; }
  .wall-main { padding: 4px 12px 110px; }
  .grid { --tile-min: 140px !important; gap: 10px; }
  .tile .info { padding: 20px 9px 7px; }
  .tile .line2 .ago { display: none; }
  .tile .hover { display: none; }
  .hide-sm { display: none; }
  .stage { flex-direction: column; padding: 0 6px; }
  .stage-side { width: auto; height: 96px; flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .stage-side .ptile { height: 100%; }
  .ctl { min-width: 52px; font-size: 0; gap: 0; }
  .ctl .ic { padding: 12px; }
  .ctl-more { margin: 8px 0 0 -12px; }
  #c-screen { display: none; }
  .toast { bottom: 100px; }
  .minibar { left: 12px; right: 12px; transform: none; }
}

/* accounts: Google button, team name in the top bar */
.btn.google { background: #fff; color: #1f1f1f; border-color: #747775; font-weight: 600; }
.btn.google:hover { background: #f2f2f2; }
.btn.google .ic { width: 20px; height: 20px; }
a.brand { color: inherit; text-decoration: none; border-radius: 12px; padding: 4px 8px 4px 4px; margin-left: -4px; min-width: 0; }
a.brand:hover { background: var(--panel2); }
.org-name { font-weight: 600; max-width: 220px; color: var(--muted); }
.org-name::before { content: "·"; margin: 0 6px 0 0; }
@media (max-width: 560px) {
  a.brand { gap: 6px; flex-shrink: 0; }
  a.brand > .ic.sm { display: none; }
  .org-name { max-width: 30vw; color: var(--text); }
  .org-name::before { display: none; }
  #status-btn { min-width: 0; flex-shrink: 1; }
}

/* cabinet */
.cab { max-width: 1080px; margin: 0 auto; padding: 20px; display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
.cab > * { min-width: 0; }
.panel { overflow-x: auto; }
.cab-side { display: grid; gap: 8px; position: sticky; top: 76px; }
.cab-h { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 4px 2px; }
.org-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left; border: 1px solid transparent; }
.org-item:hover { background: var(--panel2); }
.org-item.sel { background: var(--panel); border-color: var(--line); box-shadow: var(--shadow); }
.org-item .org-badge { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; flex: none; }
.org-item .org-meta { display: grid; min-width: 0; line-height: 1.25; }
.org-item .org-meta small { color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin-bottom: 20px; }
.panel h2 { margin: 0; font-size: 20px; }
.panel h3 { margin: 0 0 12px; font-size: 16px; }
.panel-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.plan-chip { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.people { width: 100%; border-collapse: collapse; }
.people td, .people th { padding: 10px 8px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.people th { border-top: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.people select { width: auto; padding: 6px 8px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--panel3); font-size: 13px; font-weight: 600; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person .who { display: grid; min-width: 0; line-height: 1.25; }
.inv-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.inv-form .field { margin: 0; flex: 1; min-width: 140px; }
.inv-result { display: flex; gap: 8px; align-items: center; margin-top: 12px; background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; }
.inv-result input { background: transparent; border: 0; padding: 0; }
.inv-list { display: grid; gap: 6px; margin-top: 14px; }
.inv-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--panel2); font-size: 13.5px; }
.inv-row code { font-size: 12.5px; color: var(--muted); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.btn.danger-text { color: var(--red); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin: 16px 0 4px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 180px; margin: 0; }
@media (max-width: 820px) {
  .cab { grid-template-columns: 1fr; padding: 12px; }
  .cab-side { position: static; }
  .people .hide-m { display: none; }
  .panel { padding: 16px 14px; }
  .people td, .people th { padding: 8px 4px; }
  .people select { max-width: 130px; }
  .inv-row { flex-wrap: wrap; }
}

/* statuses popover, requests to get in touch, instant connect */
.status-pop { width: 350px; }
.status-pop .opt { align-items: flex-start; }
.status-pop .opt .dot { margin-top: 5px; }
.opt-text { display: flex; flex-direction: column; min-width: 0; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.pings-btn { position: relative; color: var(--yellow); }
.pings-n { position: absolute; top: 1px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.pings-pop { width: 360px; }
.ping-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.ping-row > img, .ping-row > span:first-child { width: 48px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; background: var(--panel3);
  display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.ping-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.instant { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 12px;
  width: min(440px, calc(100vw - 32px)); padding: 10px 12px; background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-left: 4px solid var(--green); border-radius: 16px; box-shadow: var(--shadow); animation: drop .3s ease-out; }
.instant img { width: 60px; height: 45px; border-radius: 9px; object-fit: cover; flex: none; }
.in-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
@keyframes drop { from { transform: translate(-50%, -20px); opacity: 0; } }

/* Google Chat */
.chat-btn { position: relative; }
.chat-pop { width: 380px; }
.chat-pop .pad { padding: 0 8px; margin: 4px 0 10px; }
.chat-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: inherit; text-decoration: none; }
.chat-row:hover { background: var(--panel2); }
.chat-ic { width: 34px; height: 34px; border-radius: 50%; background: var(--panel3); display: grid; place-items: center; flex: none; color: var(--muted); }
.chat-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-row b { font-weight: 500; }
.chat-row.unread b { font-weight: 700; }
.chat-row.unread .chat-ic { background: var(--accent-soft); color: var(--accent); }
.chat-time { color: var(--muted); flex: none; }
.chat-row.unread .chat-time { color: var(--accent); font-weight: 600; }
.chat-open { margin-top: 8px; justify-content: center; }

/* Google Calendar day view */
.cal { --gut: 58px; margin: 22px 0 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--line); }
.cal-logo { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #1a73e8; color: #fff; flex: none; }
.cal-logo .ic { width: 18px; height: 18px; }
.cal-nav { display: flex; }
.cal-nav .icon-btn { padding: 6px; border-radius: 50%; }
.cal-nav .icon-btn:disabled, #cal-today:disabled { opacity: .35; cursor: default; }
.cal-date { margin: 0; font-size: 17px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cal-date::first-letter { text-transform: uppercase; }
.cal-sum { white-space: nowrap; }
.cal-allday { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 10px 6px var(--gut); border-bottom: 1px solid var(--line); }
.cal-chip { background: var(--c); color: #fff; border-radius: 6px; padding: 3px 8px; font-size: 12.5px; font-weight: 500; text-decoration: none; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-body { max-height: 440px; overflow-y: auto; position: relative; scrollbar-width: thin; }
.cal-grid { position: relative; margin: 8px 0 10px; }
.cal-hour { position: absolute; left: var(--gut); right: 0; height: 0; border-top: 1px solid var(--line); }
.cal-hour span { position: absolute; left: calc(-1 * var(--gut)); width: calc(var(--gut) - 10px); top: -8px; text-align: right; font-size: 11px; color: var(--muted);
  font-variant-numeric: tabular-nums; }
.cal-hour:first-child span { visibility: hidden; }
.cal-ev { position: absolute; z-index: 1; overflow: hidden; border-radius: 6px; padding: 4px 8px; background: var(--c); color: #fff; cursor: pointer;
  font-size: 12.5px; line-height: 1.3; box-shadow: 0 0 0 1px var(--panel); transition: filter .15s, box-shadow .15s; }
.cal-ev:hover { filter: brightness(1.08); box-shadow: 0 0 0 1px var(--panel), 0 4px 14px rgba(0, 0, 0, .3); z-index: 2; }
.cal-ev.short { padding-top: 2px; display: flex; align-items: center; gap: 6px; }
.cal-ev.short .cal-ev-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev-t { font-weight: 600; overflow-wrap: anywhere; }
.cal-ev-time { opacity: .9; font-weight: 400; }
.cal-ev-loc { display: flex; align-items: center; gap: 4px; opacity: .85; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.past { opacity: .62; filter: saturate(.6); }
.cal-ev.now { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--c); }
.cal-ev.tentative { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 78%, transparent) 0 6px, var(--c) 6px 12px);
  outline: 1px dashed rgba(255, 255, 255, .6); outline-offset: -3px; }
.cal-meet { position: absolute; right: 6px; top: 5px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  background: #fff; color: #1a73e8; font-size: 12px; font-weight: 600; text-decoration: none; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.cal-ev.short .cal-meet { position: static; padding: 1px 6px; }
.cal-ev:not(.short) .cal-ev-t { padding-right: 66px; }
.cal-ev.narrow:not(.short) .cal-ev-t { padding-right: 30px; }
.cal-meet:hover { background: #e8f0fe; }
.ic.xs { width: 13px; height: 13px; }
.cal-now { position: absolute; left: calc(var(--gut) - 6px); right: 0; height: 2px; background: #ea4335; z-index: 3; pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -6px; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: #ea4335; }
.cal-free { position: absolute; left: var(--gut); right: 0; top: 50%; text-align: center; color: var(--muted); font-size: 13.5px; }
.cal.off .cal-body { max-height: none; }
.cal.off #cal-today, .cal.off .cal-nav { display: none; }
.cal-connect { display: flex; align-items: center; gap: 16px; padding: 18px 20px; flex-wrap: wrap; }
.cal-connect > div { flex: 1; min-width: 220px; }
.cal-connect p { margin: 4px 0 0; }
.cal-connect .ic.xl { color: #1a73e8; }
@media (max-width: 560px) {
  .cal { --gut: 46px; }
  .cal-head { flex-wrap: wrap; }
  .cal-date { order: 5; flex-basis: 100%; font-size: 15px; }
  .cal-head .spacer { display: none; }
  .cal-sum { margin-left: auto; }
}

/* Google Chat @mentions */
.mentions { position: fixed; top: 72px; right: 16px; z-index: 65; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.mention { pointer-events: auto; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-left: 4px solid #1e8e3e; border-radius: 14px;
  box-shadow: var(--shadow); padding: 10px 12px 12px; animation: slidein .25s ease-out; transition: opacity .2s, transform .2s; }
.mention.out { opacity: 0; transform: translateX(20px); }
.mn-head { display: flex; align-items: center; gap: 8px; }
.mn-head .ic { color: #1e8e3e; }
.mn-head b { flex: 1; min-width: 0; }
.mn-x { padding: 4px; margin: -4px -4px -4px 0; }
.mn-space { margin: 2px 0 6px 24px; }
.mn-text { margin: 0 0 10px 24px; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.mention .btn { margin-left: 24px; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }

/* ---------- status ring around a tile: green = walk in, red = do not disturb / meeting, yellow = away ---------- */
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  box-shadow: inset 0 0 0 2.5px var(--ring, transparent); transition: box-shadow .2s; }
.tile[data-st="open"] { --ring: color-mix(in srgb, var(--green) 85%, transparent); }
.tile[data-st="focus"], .tile[data-st="meeting"] { --ring: color-mix(in srgb, var(--red) 75%, transparent); }
.tile[data-st="away"] { --ring: color-mix(in srgb, var(--yellow) 75%, transparent); }
.tile[data-st="call"] { --ring: var(--accent); }
.tile[data-st="away"] .photo { filter: saturate(.55) brightness(.8); }
.tile.self::after { display: none; }
.tile .ltime { flex: none; display: inline-flex; align-items: center; gap: 3px; opacity: .9; font-variant-numeric: tabular-nums; }
.tile .ltime .ic { width: 12px; height: 12px; }
.tile .ltime.night { color: #cdbcff; }
/* favourite colleagues: star on hover, always visible when set */
.tile .fav { position: absolute; top: 8px; right: 8px; z-index: 3; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .45); color: #fff; backdrop-filter: blur(6px); opacity: 0; transition: opacity .15s, background .15s; }
.tile:hover .fav, .tile:focus-within .fav, .tile .fav.on { opacity: 1; }
.tile .fav .ic { width: 16px; height: 16px; }
.tile .fav.on { color: #ffd34d; }
.tile .fav.on .ic { fill: currentColor; }
.tile .fav:hover { background: rgba(0, 0, 0, .7); }
.tile .hover .act { transform: translateY(4px); transition: transform .15s; }
.tile:hover .hover .act { transform: none; }

/* ---------- quick finder (Ctrl+K) ---------- */
kbd { font: 600 11px/1 system-ui, sans-serif; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel2); color: var(--muted); }
.find-btn { color: var(--muted); padding: 7px 10px; border: 1px solid var(--line); border-radius: 12px; }
.find-btn:hover { color: var(--text); }
.finder { place-items: start center; padding-top: min(16vh, 140px); }
.finder-card { width: min(560px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; animation: pop .14s ease-out; }
.finder-in { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.finder-in input { border: 0; background: none; padding: 6px 0; font-size: 17px; }
.finder-in input:focus-visible { outline: none; }
.finder-list { max-height: min(52vh, 420px); overflow-y: auto; padding: 6px; }
.f-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 12px; text-align: left; }
.f-row.sel { background: var(--accent-soft); }
.f-row img, .f-row .av { width: 52px; height: 39px; border-radius: 8px; object-fit: cover; flex: none; display: grid; place-items: center; font-weight: 650; font-size: 14px; color: #fff;
  background: radial-gradient(circle at 25% 15%, hsl(var(--h, 215) 55% 52%), hsl(calc(var(--h, 215) + 35) 50% 28%)); }
.f-row.off img { filter: grayscale(1); opacity: .7; }
.f-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.f-text b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-sub { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.f-sub .dot { width: 8px; height: 8px; }
.f-act { flex: none; font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.f-row.sel .f-act { color: var(--accent); font-weight: 600; }
.finder-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.finder-foot kbd { margin-right: 3px; }
.f-empty { padding: 18px; text-align: center; color: var(--muted); }

/* ---------- timed statuses ---------- */
.dur-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 10px; }
.dur-head b { flex: 1; }
.dur-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 6px 6px; }
.dur-chips .chip { padding: 9px 10px; text-align: center; font-size: 13.5px; }
.dur-chips .chip.wide { grid-column: 1 / -1; }

/* ---------- reactions in a call ---------- */
.react-bar { position: absolute; left: 50%; bottom: 104px; transform: translateX(-50%); z-index: 4; display: flex; gap: 4px; padding: 6px; border-radius: 999px;
  background: rgba(24, 28, 34, .94); border: 1px solid #2b323c; box-shadow: var(--shadow); animation: pop .14s ease-out; }
.react-bar button { width: 44px; height: 44px; border-radius: 50%; font-size: 24px; display: grid; place-items: center; transition: transform .1s, background .15s; }
.react-bar button:hover { background: #2a313b; transform: scale(1.15); }
.react-bar button.on { background: var(--accent); }
.react-bar .sep { width: 1px; background: #2b323c; margin: 6px 2px; }
.reactions { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.fly { position: absolute; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; animation: fly 3.2s ease-out forwards; }
.fly .e { font-size: 44px; line-height: 1; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4)); }
.fly .n { font-size: 12px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
@keyframes fly { 0% { transform: translateY(0) scale(.6); opacity: 0; } 12% { opacity: 1; transform: translateY(-40px) scale(1.05); }
  80% { opacity: 1; } 100% { transform: translateY(-62vh) scale(1); opacity: 0; } }
.ptile .hand { position: absolute; top: 8px; right: 8px; font-size: 26px; animation: wave 1.2s ease-in-out infinite; transform-origin: 70% 90%; z-index: 1; }
@keyframes wave { 50% { transform: rotate(14deg); } }

/* ---------- call in a picture-in-picture window (Chrome, Edge) ---------- */
body.in-pip { margin: 0; background: #0b0d10; }
body.in-pip .call-head { padding: 6px 10px; }
body.in-pip #c-pip, body.in-pip #c-min, body.in-pip .ctl-more, body.in-pip #c-link, body.in-pip #c-invite, body.in-pip #c-screen { display: none; }
body.in-pip .controls { padding: 8px; gap: 6px; }
body.in-pip .ctl { min-width: 0; font-size: 0; gap: 0; }
body.in-pip .ctl .ic { padding: 10px; }
body.in-pip .react-bar { bottom: 64px; }
body.in-pip .react-bar button { width: 34px; height: 34px; font-size: 19px; }
body.in-pip .stage { flex-direction: column; padding: 0 6px; }
body.in-pip .stage-side { width: auto; height: 72px; flex-direction: row; overflow-x: auto; overflow-y: hidden; }
body.in-pip .stage-side .ptile { height: 100%; }
body.in-pip .ptile .label { font-size: 11.5px; padding: 3px 7px; }
body.in-pip .stage-wait { display: none; }
.status-pop:not(.dur-mode) #status-dur, .status-pop.dur-mode > :not(#status-dur) { display: none; }
.faces > span, .wait-faces > span { color: #fff; background: radial-gradient(circle at 25% 15%, hsl(var(--h, 215) 55% 52%), hsl(calc(var(--h, 215) + 35) 50% 28%)); }
/* camera off in a call: a big coloured circle in the middle (the cabinet's .avatar rule must not shrink it) */
.ptile .avatar { width: auto; height: auto; border-radius: 0; background: none; overflow: visible; font-size: inherit; }
.ptile .avatar span { color: #fff; background: radial-gradient(circle at 25% 15%, hsl(var(--h, 215) 55% 52%), hsl(calc(var(--h, 215) + 35) 50% 28%)); }
