:root {
  --bg: #f0f2f5;
  --card: #ffffff;
  --ink: #111b21;
  --muted: #667781;
  --line: #e2e6ea;
  --brand: #008069;
  --brand-dark: #0b6e5f;
  --brand-soft: #e7f6f2;
  --accent: #25d366;
  --tick: #53bdeb;
  --out: #d9fdd3;
  --chatbg: #efeae2;
  --ok: #059669;
  --ok-soft: #e7f8f1;
  --warn: #b45309;
  --warn-soft: #fff6e6;
  --bad: #e5484d;
  --bad-soft: #fdecec;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 20, 26, .06), 0 6px 20px rgba(11, 20, 26, .06);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { min-height: 100vh; min-height: 100dvh; }
.hidden { display: none !important; }
h2 { font-size: 1.05rem; margin: 0 0 .9rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: .85rem; }
.grow { flex: 1; min-width: 0; }
.error { color: var(--bad); min-height: 1.2em; margin: .6rem 0 0; font-size: .9rem; }
svg { width: 22px; height: 22px; fill: currentColor; }
svg .line, svg path[fill=none], svg circle[fill=none] { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- brand ---------- */
.brand { font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: .55rem; }
.brand.big { font-size: 1.6rem; justify-content: center; }
.logo-dot { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 50%, #fff 0 22%, transparent 23%), radial-gradient(circle at 65% 50%, #b9f5d0 0 22%, transparent 23%), var(--brand); display: inline-block; }
.logo-dot.big { width: 84px; height: 84px; }
.badge { font-size: .7rem; font-weight: 700; padding: .2rem .55rem; border-radius: 99px; background: var(--brand-soft); color: var(--brand); text-transform: uppercase; letter-spacing: .03em; }

/* ---------- forms & buttons ---------- */
label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .9rem; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
input, select, textarea { display: block; width: 100%; margin-top: .35rem; padding: .7rem .8rem; font: inherit; font-weight: 400; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.btn { font: inherit; font-weight: 600; font-size: .92rem; border: 1px solid transparent; border-radius: 10px; padding: .6rem 1rem; cursor: pointer; background: #fff; color: var(--ink); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ok { background: var(--brand); color: #fff; }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger-outline { color: var(--bad); border-color: #f3c2c2; background: #fff; }
.btn.small { padding: .4rem .7rem; font-size: .82rem; margin: -.4rem 0 .9rem; }
.btn.tiny { padding: .32rem .7rem; font-size: .8rem; border-radius: 99px; }
.btn.wide { width: 100%; margin-top: .3rem; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: #54656f; display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: rgba(0, 0, 0, .06); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--brand); font: inherit; font-size: .85rem; cursor: pointer; padding: .2rem .35rem; }
.linkbtn.bad { color: var(--bad); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(var(--brand) 0 220px, var(--bg) 220px); }
.login-card { width: 100%; max-width: 400px; }
.login-card > p.muted { margin: .3rem 0 1.5rem; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem; border: 1px solid var(--line); }

/* ---------- avatars ---------- */
.avatar { width: 42px; height: 42px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; font-size: .95rem; background: #8696a0; }
.avatar.huge { width: 112px; height: 112px; font-size: 2.6rem; }
.avatar.online { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }

/* ================= WhatsApp-style layout ================= */
.wa { display: flex; height: 100vh; height: 100dvh; max-width: 1500px; margin: 0 auto; background: #fff; box-shadow: var(--shadow); }
@media (min-width: 1500px) { body:has(.wa:not(.hidden)) { padding: 1.2rem 0; background: linear-gradient(var(--brand) 0 130px, #d1d7db 130px); } .wa { height: calc(100vh - 2.4rem); } }
.sidebar { width: 380px; flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #fff; min-height: 0; }
.side-head { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; background: var(--bg); min-height: 60px; }
.me-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-sub { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: .35rem; }
.conn { width: 8px; height: 8px; border-radius: 50%; background: #c5c8d6; display: inline-block; flex: none; }
.conn.on { background: var(--accent); }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 44px; background: #fff; border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .18); padding: .4rem 0; min-width: 190px; z-index: 20; }
.menu button { display: block; width: 100%; text-align: left; padding: .7rem 1.1rem; background: none; border: 0; font: inherit; cursor: pointer; }
.menu button:hover { background: var(--bg); }
.side-tabs { display: flex; padding: .5rem .8rem 0; gap: .4rem; }
.stab { flex: none; border: 0; background: var(--bg); color: var(--muted); font: inherit; font-weight: 600; font-size: .88rem; padding: .4rem .95rem; border-radius: 99px; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.stab.active { background: var(--brand-soft); color: var(--brand); }
.pill { background: var(--accent); color: #fff; font-size: .7rem; border-radius: 99px; padding: .05rem .45rem; min-width: 18px; text-align: center; }
.search { padding: .55rem .8rem; }
.search input { margin: 0; background: var(--bg); border: 0; border-radius: 8px; padding: .55rem .9rem; }
.side-list { flex: 1; overflow-y: auto; min-height: 0; }
.row-item { display: flex; align-items: center; gap: .8rem; padding: .65rem 1rem; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; font: inherit; color: inherit; }
.row-item:hover { background: #f5f6f6; }
.row-item.active { background: #f0f2f5; }
.row-item .body { flex: 1; min-width: 0; border-bottom: 1px solid var(--line); padding-bottom: .65rem; margin-bottom: -.65rem; }
.row-item:last-child .body { border-bottom: 0; }
.row-top, .row-bot { display: flex; align-items: center; gap: .5rem; }
.row-top .name { flex: 1; font-weight: 500; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-top .time { font-size: .75rem; color: var(--muted); }
.row-top .time.unread { color: var(--accent); font-weight: 600; }
.row-bot { margin-top: .15rem; }
.row-bot .preview { flex: 1; font-size: .88rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: .25rem; }
.row-bot .preview svg { width: 16px; height: 16px; flex: none; }
.row-bot .preview.typing { color: var(--accent); }
.unread-count { background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; min-width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; padding: 0 6px; }
.side-empty { color: var(--muted); padding: 2rem 1.5rem; text-align: center; font-size: .92rem; }
.call-dir { display: inline-flex; align-items: center; gap: .2rem; }
.call-dir.missed, .call-dir.bad { color: var(--bad); }
.call-dir.ok { color: var(--ok); }
.section-label { padding: .9rem 1rem .3rem; font-size: .78rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; }

/* conversation pane */
.convo { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--chatbg); position: relative; }
.convo::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none; background-image: radial-gradient(rgba(0, 0, 0, .045) 1px, transparent 1px); background-size: 18px 18px; }
.convo-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem; background: #f8f9fa; position: relative; border-bottom: 6px solid var(--accent); }
.convo-empty h2 { font-size: 1.8rem; font-weight: 400; margin: 1.2rem 0 .4rem; }
.convo-main { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.convo-head { display: flex; align-items: center; gap: .7rem; padding: .55rem 1rem; background: var(--bg); min-height: 60px; border-left: 1px solid var(--line); }
.convo-head .back { display: none; }
.peer-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peer-status { font-size: .8rem; color: var(--muted); min-height: 1.1em; }
.peer-status.typing { color: var(--accent); }
.msgs { flex: 1; overflow-y: auto; padding: 1rem 6%; display: flex; flex-direction: column; gap: 2px; min-height: 0; position: relative; }
.day-sep { align-self: center; background: #fff; color: var(--muted); font-size: .75rem; padding: .3rem .8rem; border-radius: 8px; margin: .7rem 0; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); text-transform: uppercase; }
.notice { align-self: center; background: #fff5c4; color: #54656f; font-size: .78rem; padding: .4rem .8rem; border-radius: 8px; margin: .4rem 0 .8rem; text-align: center; max-width: 90%; }
.bubble { max-width: min(65%, 560px); padding: .38rem .55rem .3rem .6rem; border-radius: 8px; background: #fff; align-self: flex-start; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); font-size: .94rem; line-height: 1.38; position: relative; margin-top: 2px; }
.bubble.mine { background: var(--out); align-self: flex-end; }
.bubble.first { margin-top: 8px; }
.bubble .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .meta { float: right; margin: .35rem 0 -.2rem .6rem; font-size: .68rem; color: var(--muted); display: inline-flex; align-items: center; gap: .2rem; position: relative; top: .25rem; }
.tick { width: 16px; height: 11px; color: #8696a0; }
.tick.read { color: var(--tick); }
.bubble.callmsg { padding: .6rem .7rem .4rem; min-width: 240px; }
.callcard { display: flex; align-items: center; gap: .7rem; }
.callcard .cicon { width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, .06); display: grid; place-items: center; color: var(--muted); flex: none; }
.callcard .cicon.live { background: var(--accent); color: #fff; }
.callcard .cicon.bad { color: var(--bad); }
.callcard .ct { font-weight: 600; }
.callcard .cs { font-size: .8rem; color: var(--muted); }
.callcard-actions { display: flex; gap: .4rem; margin-top: .55rem; flex-wrap: wrap; }
.composer { display: flex; align-items: flex-end; gap: .5rem; padding: .55rem .8rem; background: var(--bg); position: relative; }
.composer textarea { margin: 0; border: 0; border-radius: 10px; resize: none; max-height: 140px; line-height: 1.35; padding: .65rem .9rem; }
.send-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.send-btn:hover { background: var(--brand-dark); }

@media (max-width: 800px) {
  .sidebar { width: 100%; border-right: 0; }
  .wa .convo { display: none; }
  .wa.in-chat .sidebar { display: none; }
  .wa.in-chat .convo { display: flex; }
  .convo-head .back { display: grid; }
  .msgs { padding: .8rem .7rem; }
  .bubble { max-width: 85%; }
}

/* ================= admin ================= */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1.4rem; background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 5; }
.topbar .badge { background: rgba(255, 255, 255, .2); color: #fff; }
.topbar .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.topbar-right { display: flex; align-items: center; gap: .6rem; }
.page { max-width: 1180px; margin: 0 auto; padding: 1.4rem; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; align-items: start; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: start; }
.span2 { grid-column: span 2; }
@media (max-width: 900px) { .grid, .grid2 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }
@media (max-width: 600px) { .topbar { padding: .7rem .9rem; } #admin-name { display: none; } .page { padding: .9rem; } }
.tabs { display: flex; gap: .4rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.tab { font: inherit; font-weight: 600; border: 1px solid var(--line); background: #fff; padding: .55rem 1rem; border-radius: 99px; cursor: pointer; color: var(--muted); }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.count { background: var(--bad); color: #fff; border-radius: 99px; font-size: .72rem; padding: .05rem .45rem; margin-left: .25rem; }
.count:empty { display: none; }
.list { display: flex; flex-direction: column; gap: .7rem; }
.item { display: flex; align-items: center; gap: .8rem; padding: .85rem; border: 1px solid var(--line); border-radius: 12px; }
.item .title { font-weight: 600; }
.item .sub { color: var(--muted); font-size: .84rem; margin-top: .15rem; }
.item .actions { display: flex; gap: .45rem; flex-wrap: wrap; justify-content: flex-end; }
.list.compact .item { padding: .6rem .8rem; }
.empty { color: var(--muted); font-size: .92rem; padding: 1rem; text-align: center; border: 1px dashed var(--line); border-radius: 12px; }
.status { font-size: .74rem; font-weight: 700; padding: .18rem .55rem; border-radius: 99px; text-transform: capitalize; white-space: nowrap; }
.s-pending { background: var(--warn-soft); color: var(--warn); }
.s-approved, .s-active { background: var(--ok-soft); color: var(--ok); }
.s-ended, .s-expired, .s-cancelled { background: #eff0f5; color: var(--muted); }
.s-rejected, .s-declined { background: var(--bad-soft); color: var(--bad); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; padding: .5rem; border-bottom: 1px solid var(--line); }
.table td { padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.right { text-align: right; white-space: nowrap; }
.switch { position: relative; width: 40px; height: 22px; display: inline-block; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #d4d6e2; cursor: pointer; transition: .15s; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ================= modals & toasts ================= */
.modal-back { position: fixed; inset: 0; background: rgba(11, 20, 26, .55); display: grid; place-items: center; z-index: 80; padding: 1rem; }
.modal { background: #fff; border-radius: 16px; padding: 1.5rem; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal .row { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; flex-wrap: wrap; }
.modal p { line-height: 1.45; }
.toasts { position: fixed; bottom: 5.5rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: .6rem; z-index: 90; width: min(420px, calc(100vw - 2rem)); }
.toast { background: #1f2c33; color: #fff; padding: .8rem 1rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-size: .92rem; display: flex; gap: .7rem; align-items: center; animation: slidein .2s ease-out; cursor: default; }
.toast .btn { padding: .38rem .75rem; font-size: .84rem; }
.toast.ok { background: var(--brand-dark); }
.toast.bad { background: #8f1d1d; }
@keyframes slidein { from { transform: translateY(-8px); opacity: 0; } }

/* ================= incoming call ================= */
.incoming { position: fixed; inset: 0; z-index: 70; background: linear-gradient(160deg, #0b3d36, #0b141a 70%); color: #fff; display: grid; place-items: center; text-align: center; padding: 1.5rem; }
.incoming-inner { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.incoming h2 { font-size: 1.7rem; font-weight: 500; margin: .8rem 0 0; }
.muted-light { color: rgba(255, 255, 255, .7); margin: 0; }
.ring { animation: ring 1.5s infinite; margin-top: 1.2rem; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); } 70% { box-shadow: 0 0 0 30px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
.incoming-actions { display: flex; gap: 2.4rem; margin-top: 3rem; }
.incoming-actions > div { display: flex; flex-direction: column; align-items: center; gap: .5rem; font-size: .85rem; color: rgba(255, 255, 255, .85); }

/* ================= call screen ================= */
.call { position: fixed; inset: 0; background: #0b141a; z-index: 60; color: #fff; overflow: hidden; }
#remote-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0b141a; }
.remote-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; color: rgba(255, 255, 255, .75); font-size: 1rem; text-align: center; padding: 1rem; background: linear-gradient(160deg, #0b3d36, #0b141a 70%); }
.call-peer-big { font-size: 1.6rem; color: #fff; margin-top: .6rem; }
#local-video { position: absolute; right: 1rem; bottom: 7rem; width: min(26vw, 230px); aspect-ratio: 3/4; object-fit: cover; border-radius: 14px; background: #1f2c33; border: 2px solid rgba(255, 255, 255, .15); transform: scaleX(-1); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); z-index: 2; }
#local-video.off { display: none; }
.call-top { position: absolute; top: 0; left: 0; right: 0; padding: 1rem 1.3rem; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(rgba(0, 0, 0, .55), transparent); font-weight: 600; z-index: 2; }
.timer { font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, .14); padding: .25rem .65rem; border-radius: 99px; font-size: .9rem; }
.call-controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.3rem 1rem calc(1.3rem + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 1rem; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); z-index: 3; }
.round { width: 62px; height: 62px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; transition: background .15s; position: relative; }
.round:hover { background: rgba(255, 255, 255, .26); }
.round svg { width: 24px; height: 24px; }
.round .slash { display: none; stroke-width: 2.4; }
.round.off { background: #fff; color: #111; }
.round.off .slash { display: block; }
.round .lbl { font-size: .6rem; font-weight: 600; opacity: .85; }
.round.danger { background: var(--bad); }
.round.danger:hover { background: #c8373c; }
.round.accept { background: var(--accent); }
.round.ghosty { background: rgba(255, 255, 255, .15); }
.unread { position: absolute; top: 0; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.call-chat { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 100vw); background: var(--chatbg); color: var(--ink); display: flex; flex-direction: column; z-index: 4; box-shadow: -10px 0 30px rgba(0, 0, 0, .3); }
.call-chat-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.1rem; background: var(--bg); }
.call-chat .msgs { padding: .8rem; }
.call-chat .bubble { max-width: 85%; }
.call.chat-open #local-video { right: calc(min(380px, 100vw) + 1rem); }
.call.chat-open .call-controls { right: min(380px, 100vw); }
@media (max-width: 700px) {
  #local-video { width: 30vw; bottom: 6.5rem; right: .7rem; }
  .round { width: 56px; height: 56px; }
  .call-controls { gap: .8rem; }
  .call.chat-open .call-controls { display: none; }
}
.cicon-wrap { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.ic { display: inline-flex; }

/* ================= snaps ================= */
:root { --snap: #f23c57; }
.composer .snap-btn { width: 44px; height: 44px; color: #54656f; }
.icon-btn.light { color: #fff; background: rgba(255, 255, 255, .12); }
.icon-btn.light:hover { background: rgba(255, 255, 255, .22); }
.icon-btn.big { width: 52px; height: 52px; cursor: pointer; }
.btn.light { color: #fff; border-color: rgba(255, 255, 255, .35); }

.snapcam { position: fixed; inset: 0; z-index: 75; background: #000; color: #fff; display: flex; flex-direction: column; }
.snapcam-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: .9rem 1rem; z-index: 2; font-weight: 600; background: linear-gradient(rgba(0, 0, 0, .55), transparent); }
#snap-video, #snap-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
#snap-video.mirror { transform: scaleX(-1); }
#snap-preview { object-fit: contain; }
.snapcam-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 2rem; color: rgba(255, 255, 255, .8); }
.snapcam-bottom { position: absolute; left: 0; right: 0; bottom: 2.2rem; display: flex; justify-content: center; align-items: center; gap: 2.2rem; z-index: 2; padding: 0 1rem; }
.snapcam-bottom.send { flex-direction: column; gap: .7rem; bottom: 2.4rem; }
.snapcam-bottom.send input { max-width: 520px; background: rgba(0, 0, 0, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .25); text-align: center; margin: 0; }
.snap-send-row { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.secs { display: flex; align-items: center; gap: .4rem; margin: 0; font-weight: 500; background: rgba(0, 0, 0, .5); padding: .25rem .25rem .25rem .7rem; border-radius: 10px; }
.secs select { margin: 0; width: auto; padding: .4rem .5rem; background: #1f2c33; color: #fff; border: 0; }
.shutter { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: transparent; cursor: pointer; transition: transform .08s; }
.shutter:active { transform: scale(.92); background: rgba(255, 255, 255, .3); }
.snap-note { position: absolute; bottom: .4rem; left: 0; right: 0; text-align: center; font-size: .72rem; color: rgba(255, 255, 255, .55); margin: 0; z-index: 2; }

.snapview { position: fixed; inset: 0; z-index: 85; background: #000; color: #fff; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; }
#snap-canvas { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; }
.snap-progress { position: absolute; top: .6rem; left: .8rem; right: .8rem; height: 3px; background: rgba(255, 255, 255, .25); border-radius: 3px; overflow: hidden; z-index: 2; }
#snap-bar { height: 100%; width: 100%; background: #fff; transform-origin: left; }
.snapview-top { position: absolute; top: 1.1rem; left: 1rem; right: 1rem; display: flex; justify-content: space-between; font-weight: 600; z-index: 2; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.snap-cap { position: absolute; left: 0; right: 0; top: 62%; background: rgba(0, 0, 0, .55); text-align: center; padding: .6rem 1rem; font-size: 1.05rem; z-index: 2; white-space: pre-wrap; overflow-wrap: anywhere; }

.bubble.snapmsg { padding: .55rem .7rem .4rem; min-width: 190px; cursor: default; }
.bubble.snapmsg.can-open { cursor: pointer; }
.bubble.snapmsg.can-open:hover { filter: brightness(.97); }
.snapcard { display: flex; align-items: center; gap: .65rem; }
.snapsq { width: 16px; height: 16px; border-radius: 3px; border: 2.5px solid var(--snap); flex: none; }
.snapsq.full { background: var(--snap); }
.snapsq.gray { border-color: #8696a0; }
.snapcard .ct { font-weight: 600; }
.snapcard .cs { font-size: .8rem; color: var(--muted); }
.notice.alert { background: #fde8eb; color: #b4233a; font-weight: 600; }

/* privacy */
.msgs.protect, .msgs.protect * { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.shield { position: fixed; inset: 0; z-index: 55; background: #0b141a; color: #fff; display: grid; place-items: center; text-align: center; padding: 1.5rem; }
.shield-inner { display: flex; flex-direction: column; align-items: center; gap: .4rem; max-width: 360px; }
.shield svg { width: 54px; height: 54px; color: var(--accent); }
.shield h2 { font-size: 1.4rem; margin: .6rem 0 0; }
.shield p { color: rgba(255, 255, 255, .7); margin: 0 0 1rem; }

/* admin snaps */
.thumb-sq { width: 38px; height: 38px; border-radius: 8px; background: #fde8eb; display: grid; place-items: center; flex: none; }
.thumb-sq .snapsq { width: 14px; height: 14px; }
[hidden] { display: none !important; }
