/* Scam Protect — app shell styles (light, warm; builds on ../css/styles.css tokens) */
.app-body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg-800); }

/* App bar */
.app-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .8rem clamp(1rem, 4vw, 1.6rem); background: rgba(247,244,238,0.9); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border); }
.app-bar .brand { font-size: 1.1rem; }
.app-bar .brand .logo-mark { width: 28px; height: 32px; }
.app-bar .brand .logo-mark svg { width: 28px; height: 32px; }
.app-tag { font-family: 'JetBrains Mono', monospace; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-soft); border-radius: var(--radius-pill); padding: .2rem .55rem; margin-left: .5rem; font-weight: 600; white-space: nowrap; flex: none; }
.app-bar .right { display: flex; align-items: center; gap: .7rem; }
.app-bar .who { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--ink-soft); }
.app-bar .who .ring { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: .8rem; }
@media (max-width: 600px) { .app-tag { display: none; } }
@media (max-width: 560px) { .app-bar .who span.hide-sm { display: none; } }

.app-main { flex: 1; width: 100%; max-width: 1080px; margin-inline: auto; padding: clamp(1.2rem, 4vw, 2.2rem) var(--gutter) 4rem; }

/* Trial banner */
.trial-banner { display: flex; align-items: center; gap: 1rem; background: var(--amber-soft); border: 1px solid var(--amber);
  border-radius: var(--radius); padding: .85rem 1.1rem; margin-bottom: 1.4rem; }
.trial-banner.ending { background: var(--threat-soft); border-color: var(--threat); }
.trial-banner .tb-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(204,138,43,0.16); color: var(--amber); }
.trial-banner.ending .tb-ic { background: rgba(207,75,51,0.14); color: var(--threat); }
.trial-banner .tb-meta { flex: 1; }
.trial-banner .tb-meta strong { display: block; color: var(--ink); font-size: .95rem; }
.trial-banner .tb-meta span { color: var(--ink-soft); font-size: .82rem; }

/* Status hero */
.sp-status { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.4rem, 4vw, 2.2rem); box-shadow: var(--shadow-sm); }
@media (max-width: 640px) { .sp-status { grid-template-columns: 1fr; text-align: center; justify-items: center; } }
.ring-hero { width: 176px; height: 176px; border-radius: 50%; display: grid; place-items: center; position: relative; background: conic-gradient(var(--safe) 360deg, var(--line-soft) 360deg); }
.ring-hero::before { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-soft); }
.ring-hero .inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: .55rem; }
.ring-hero .inner .pr { font-family: 'JetBrains Mono', monospace; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--safe); font-weight: 600; }
.sp-status.scanning .ring-hero { background: conic-gradient(var(--brand) var(--scan-deg, 90deg), var(--line-soft) var(--scan-deg, 90deg)); }
.sp-status.scanning .ring-hero .inner .pr { color: var(--brand); }
.sp-status.risk .ring-hero { background: conic-gradient(var(--threat) 300deg, var(--line-soft) 300deg); }
.sp-status.risk .ring-hero .inner .pr { color: var(--threat); }
.sp-status h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
.sp-status .sub { margin-top: .5rem; color: var(--ink-soft); font-size: 1.05rem; max-width: 46ch; }
.app-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
@media (max-width: 640px) { .app-actions { justify-content: center; } }

/* Install banner */
.install-banner { display: none; align-items: center; gap: 1rem; background: var(--brand-tint); border: 1px solid var(--brand-soft); border-radius: var(--radius); padding: 1rem 1.2rem; margin-top: 1.4rem; }
.install-banner.show { display: flex; }
.install-banner .ib-ic { width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--brand); color: #fff; }
.install-banner .ib-meta { flex: 1; }
.install-banner .ib-meta strong { color: var(--ink); display: block; font-size: .92rem; }
.install-banner .ib-meta span { color: var(--ink-soft); font-size: .82rem; }

/* Stat tiles */
.app-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.6rem; }
@media (max-width: 620px) { .app-stats { grid-template-columns: 1fr; } }
.app-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.app-stat .n { font-size: 1.9rem; font-weight: 800; color: var(--ink); }
.app-stat .n.brand { color: var(--brand); }
.app-stat .l { color: var(--muted); font-size: .85rem; margin-top: .2rem; }

/* Protection modules (toggles) */
.section-title { font-size: 1.15rem; margin: 2.4rem 0 1rem; display: flex; align-items: center; gap: .6rem; color: var(--ink); }
.section-title svg { color: var(--brand); }
.shield-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 620px) { .shield-grid { grid-template-columns: 1fr; } }
.shield-card { display: flex; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.shield-card .ic { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--safe-soft); color: var(--safe); }
.shield-card .ic svg { width: 22px; height: 22px; }
.shield-card .meta { flex: 1; } .shield-card .meta strong { color: var(--ink); display: block; font-size: .98rem; } .shield-card .meta span { color: var(--muted); font-size: .82rem; }
.shield-card.off .ic { background: var(--panel); color: var(--faint); }

/* Toggle switch */
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; border-radius: 99px; background: var(--panel); border: 1px solid var(--border-strong); transition: background .2s, border-color .2s; cursor: pointer; }
.switch .slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: var(--faint); transition: transform .2s, background .2s; }
.switch input:checked + .slider { background: var(--safe-soft); border-color: var(--safe); }
.switch input:checked + .slider::before { transform: translateX(20px); background: var(--safe); }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 3px rgba(28,107,87,0.22); }

/* AI scam check (S-Security AI) */
.ai-check { margin-top: 1.6rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.2rem, 3vw, 1.6rem); box-shadow: var(--shadow-sm); }
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ai-badge { font-family: 'JetBrains Mono', monospace; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--brand-deep); background: var(--brand-soft); border: 1px solid #C5DED4; border-radius: var(--radius-pill); padding: .25rem .6rem; white-space: nowrap; }
.ai-sub { color: var(--ink-soft); font-size: .92rem; margin: .5rem 0 1rem; }
.ai-input { width: 100%; resize: vertical; min-height: 76px; font: inherit; font-size: .95rem; color: var(--ink); background: var(--bg-800); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: .8rem .9rem; }
.ai-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(28,107,87,0.16); }
.ai-actions { display: flex; align-items: center; gap: .7rem; margin-top: .9rem; flex-wrap: wrap; }
.ai-status { font-size: .82rem; color: var(--muted); }
.ai-status.err { color: var(--threat); }

.ai-result { margin-top: 1.2rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ai-result .ai-rtop { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; }
.ai-result .ai-vic { width: 42px; height: 42px; flex: none; border-radius: 11px; display: grid; place-items: center; }
.ai-result .ai-vmeta { flex: 1; }
.ai-result .ai-vmeta strong { display: block; font-size: 1.05rem; color: var(--ink); }
.ai-result .ai-vmeta span { font-size: .84rem; color: var(--muted); }
.ai-result .ai-score { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 1.15rem; }
.ai-result .ai-reasons { padding: 0 1.1rem 1.1rem; }
.ai-result .ai-reasons li { display: flex; gap: .55rem; align-items: flex-start; color: var(--ink-soft); font-size: .9rem; padding: .25rem 0; list-style: none; }
.ai-result .ai-reasons li::before { content: ""; width: 6px; height: 6px; margin-top: .45rem; border-radius: 50%; flex: none; background: currentColor; opacity: .55; }
.ai-result .ai-advice { padding: .85rem 1.1rem; border-top: 1px solid var(--border); font-size: .9rem; color: var(--ink); display: flex; gap: .5rem; align-items: flex-start; }
/* verdict color themes */
.ai-result.dangerous { border-color: #E7B6AB; } .ai-result.dangerous .ai-rtop { background: var(--threat-soft); } .ai-result.dangerous .ai-vic { background: var(--threat); color: #fff; } .ai-result.dangerous .ai-score { color: var(--threat); }
.ai-result.suspicious { border-color: #E6CE9C; } .ai-result.suspicious .ai-rtop { background: var(--amber-soft); } .ai-result.suspicious .ai-vic { background: var(--amber); color: #fff; } .ai-result.suspicious .ai-score { color: var(--amber); }
.ai-result.safe { border-color: #BFE3D0; } .ai-result.safe .ai-rtop { background: var(--safe-soft); } .ai-result.safe .ai-vic { background: var(--safe); color: #fff; } .ai-result.safe .ai-score { color: var(--safe); }

/* Scan report */
.scan-wrap { max-width: 460px; margin-top: 1rem; display: none; }
.sp-status.scanning .scan-wrap { display: block; }
.scan-track { height: 8px; border-radius: 99px; background: var(--panel); overflow: hidden; border: 1px solid var(--border); }
.scan-fill { height: 100%; width: 0%; background: var(--brand); transition: width .2s linear; }
.scan-label { margin-top: .55rem; font-family: 'JetBrains Mono', monospace; font-size: .78rem; color: var(--ink-soft); min-height: 1.1em; }

.scan-report { margin-top: 1.8rem; }
.scan-report-head strong { display: block; color: var(--ink); font-size: 1.08rem; }
.scan-report-head span { color: var(--muted); font-size: .86rem; }
.scan-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-top: 1.1rem; }
@media (max-width: 620px) { .scan-cats { grid-template-columns: 1fr; } }
.scan-cat { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); transition: border-color .25s; }
.scan-cat .cat-ic { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--panel); color: var(--muted); transition: background .25s, color .25s; }
.scan-cat .cat-ic svg { width: 18px; height: 18px; }
.scan-cat .cat-name { flex: 1; font-size: .9rem; color: var(--ink-soft); }
.cat-status { font-family: 'JetBrains Mono', monospace; font-size: .7rem; font-weight: 600; padding: .2rem .55rem; border-radius: 99px; border: 1px solid var(--border-strong); color: var(--muted); white-space: nowrap; }
.scan-cat.scanning { border-color: var(--brand); }
.scan-cat.scanning .cat-ic { background: var(--brand-soft); color: var(--brand); animation: catpulse 1s ease-in-out infinite; }
.scan-cat.scanning .cat-status { color: var(--brand); border-color: #C5DED4; background: var(--brand-soft); }
.scan-cat.clean .cat-ic { background: var(--safe-soft); color: var(--safe); }
.scan-cat.clean .cat-status { color: var(--safe); border-color: #BFE3D0; background: var(--safe-soft); }
@keyframes catpulse { 50% { opacity: .55; } }
.scan-report-foot { display: flex; gap: .8rem; align-items: center; margin-top: 1.3rem; padding: 1rem 1.2rem; border-radius: 12px;
  background: var(--safe-soft); border: 1px solid #BFE3D0; color: var(--brand-deep); font-weight: 700; }
.scan-report-foot .sp-shield { width: 28px; height: 32px; flex: none; }

/* Feed + devices reuse global .block-row / .device-chip */
.device-row-mini { display: flex; gap: .7rem; flex-wrap: wrap; }
.device-row-mini .device-chip { min-width: 150px; }

/* This-device detail card (real detection) */
.device-detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.device-detail .dd-head { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--border); }
.device-detail .dd-ic { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.device-detail .dd-head > div { flex: 1; min-width: 0; }
.device-detail .dd-head strong { display: block; color: var(--ink); font-size: 1.05rem; }
.device-detail .dd-head > div span { color: var(--muted); font-size: .82rem; }
.device-detail .dd-live { flex: none; display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 600; color: var(--safe); }
.device-detail .dd-live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--safe); box-shadow: 0 0 0 3px var(--safe-soft); }
.device-detail .dd-rows { padding: .4rem 1.3rem 1rem; }
.device-detail .dd-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line-soft); }
.device-detail .dd-row:last-child { border-bottom: 0; }
.device-detail .dd-k { color: var(--muted); font-size: .85rem; flex: none; }
.device-detail .dd-v { color: var(--ink); font-size: .9rem; font-weight: 600; text-align: right; word-break: break-word; }
.device-detail .dd-v.mono { font-family: 'JetBrains Mono', monospace; font-weight: 500; }

/* Locked gate */
.gate { max-width: 520px; margin: 8vh auto; text-align: center; }
.gate .lock { width: 84px; height: 84px; margin: 0 auto 1.4rem; border-radius: 22px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); }
.gate .lock svg { width: 40px; height: 40px; }

.app-foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.5rem; border-top: 1px solid var(--border); }
.app-foot a { color: var(--ink-soft); }

/* ============================================================
   Truecaller-style tabs: Calls / Messages / Search / Blocked
   ============================================================ */
.app-main.has-tabbar { padding-bottom: 6.5rem; }
.tab-panel { display: none; animation: tabin .25s ease; }
.tab-panel.active { display: block; }
@keyframes tabin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tc-head { margin-bottom: 1.2rem; }
.tc-head h1 { font-size: clamp(1.6rem, 5vw, 2.1rem); }
.tc-head p { color: var(--ink-soft); margin-top: .3rem; font-size: .95rem; max-width: 50ch; }

/* bottom tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; justify-content: center;
  gap: .2rem; padding: .4rem .4rem calc(.4rem + env(safe-area-inset-bottom)); background: rgba(247,244,238,0.94);
  backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
.tab-btn { flex: 1; max-width: 120px; background: none; border: 0; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: .15rem; padding: .5rem .2rem; border-radius: 12px; color: var(--muted); font: inherit;
  font-size: .68rem; font-weight: 600; transition: color .15s, background .15s; }
.tab-btn svg { width: 22px; height: 22px; }
.tab-btn.active { color: var(--brand); }
.tab-btn.active svg { color: var(--brand); }
.tab-btn:active { background: var(--brand-tint); }

/* call & search rows */
.call-list, .block-list { display: flex; flex-direction: column; gap: .55rem; }
.call-row { display: flex; align-items: center; gap: .85rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .8rem 1rem; }
.call-row .av { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 1.05rem; color: #fff; background: var(--brand); }
.call-row.spam .av { background: var(--threat); } .call-row.warn .av { background: var(--amber); }
.call-row.safe .av { background: var(--safe); } .call-row.unknown .av { background: var(--muted); }
.call-row .cr-meta { flex: 1; min-width: 0; }
.call-row .cr-meta .nm { display: flex; align-items: center; gap: .4rem; color: var(--ink); font-weight: 700; font-size: .98rem; }
.call-row .cr-meta .sub { color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-row .cr-meta .sub .dir { color: var(--ink-soft); }
.call-row time { color: var(--muted); font-size: .78rem; flex: none; }
.spam-tag { font-family: 'JetBrains Mono', monospace; font-size: .6rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: .15rem .45rem; border-radius: 99px; white-space: nowrap; }
.spam-tag.spam { color: var(--threat); background: var(--threat-soft); border: 1px solid #E7B6AB; }
.spam-tag.warn { color: var(--amber); background: var(--amber-soft); border: 1px solid #E6CE9C; }
.spam-tag.safe { color: var(--safe); background: var(--safe-soft); border: 1px solid #BFE3D0; }
.cr-block { background: none; border: 1px solid var(--border-strong); color: var(--threat); border-radius: 10px;
  font: inherit; font-size: .76rem; font-weight: 600; padding: .35rem .7rem; cursor: pointer; flex: none; }
.cr-block:active { background: var(--threat-soft); }

/* segmented control (Inbox / Spam) */
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: .25rem; margin-bottom: 1.1rem; }
.seg button { background: none; border: 0; cursor: pointer; font: inherit; font-size: .88rem; font-weight: 600; color: var(--muted);
  padding: .45rem 1.1rem; border-radius: 9px; display: flex; align-items: center; gap: .4rem; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg-badge { font-size: .68rem; font-weight: 700; color: #fff; background: var(--threat); border-radius: 99px; padding: .05rem .4rem; }

/* message threads */
.msg-list { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1.8rem; }
.msg-row { display: flex; align-items: flex-start; gap: .85rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .85rem 1rem; }
.msg-row.spam { border-color: #E7B6AB; background: var(--threat-soft); }
.msg-row .av { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--brand); }
.msg-row.spam .av { background: var(--threat); }
.msg-row .mr-meta { flex: 1; min-width: 0; }
.msg-row .mr-top { display: flex; justify-content: space-between; gap: .6rem; }
.msg-row .mr-top strong { color: var(--ink); font-size: .95rem; }
.msg-row .mr-top time { color: var(--muted); font-size: .76rem; flex: none; }
.msg-row .body { color: var(--ink-soft); font-size: .86rem; margin-top: .15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.msg-row.spam .body { color: var(--threat); }
.msg-row .mr-flag { font-family: 'JetBrains Mono', monospace; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--threat); margin-top: .35rem; display: inline-flex; align-items: center; gap: .3rem; }

/* number search */
.num-search { display: flex; align-items: center; gap: .5rem; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: .4rem .4rem .4rem .9rem; margin-bottom: 1.4rem; }
.num-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(28,107,87,0.14); }
.num-search .ns-ic { color: var(--muted); display: grid; place-items: center; flex: none; }
.num-search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 1rem; color: var(--ink); padding: .5rem 0; }
.num-search input:focus { outline: none; }
.num-search .btn { flex: none; }

.search-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow-sm); margin-bottom: 1.4rem; }
.search-card .sc-top { display: flex; align-items: center; gap: 1rem; }
.search-card .av { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; color: #fff; }
.search-card.spam .av { background: var(--threat); } .search-card.warn .av { background: var(--amber); }
.search-card.safe .av { background: var(--safe); } .search-card.unknown .av { background: var(--muted); }
.search-card .sc-meta { flex: 1; min-width: 0; }
.search-card .sc-meta strong { display: block; font-size: 1.15rem; color: var(--ink); }
.search-card .sc-meta span { color: var(--muted); font-size: .86rem; }
.search-card .sc-score { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 1.4rem; }
.search-card.spam .sc-score { color: var(--threat); } .search-card.warn .sc-score { color: var(--amber); } .search-card.safe .sc-score { color: var(--safe); }
.search-card .sc-actions { display: flex; gap: .7rem; margin-top: 1.2rem; }
.search-card .sc-actions .btn { flex: 1; }
.btn-danger { background: var(--threat); color: #fff; border: 0; }

/* community card + block list */
.community-card { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; background: var(--brand-tint);
  border: 1px solid var(--brand-soft); border-radius: var(--radius-lg); padding: 1.3rem 1.5rem; margin-bottom: 1.4rem; }
.community-card .cc-ic { width: 46px; height: 46px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--brand); color: #fff; }
.community-card .cc-meta { flex: 1; min-width: 130px; }
.community-card .cc-meta strong { display: block; font-size: 1.4rem; font-weight: 800; color: var(--brand-deep); }
.community-card .cc-meta span { color: var(--ink-soft); font-size: .82rem; }
.block-item { display: flex; align-items: center; gap: .85rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; }
.block-item .av { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--threat); }
.block-item .bi-meta { flex: 1; min-width: 0; }
.block-item .bi-meta strong { display: block; color: var(--ink); font-size: .95rem; }
.block-item .bi-meta span { color: var(--muted); font-size: .8rem; }
.bi-unblock { background: none; border: 1px solid var(--border-strong); color: var(--ink-soft); border-radius: 10px; font: inherit; font-size: .78rem; font-weight: 600; padding: .35rem .8rem; cursor: pointer; flex: none; }
.empty-note { text-align: center; color: var(--muted); font-size: .88rem; padding: 1.6rem; border: 1px dashed var(--border-strong); border-radius: var(--radius); }

/* ============================================================
   Simulated incoming-call screen (Truecaller-style caller ID)
   ============================================================ */
.incall { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1.2rem;
  background: rgba(20,17,14,0.55); backdrop-filter: blur(6px); animation: tabin .2s ease; }
.incall-card { position: relative; width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 26px; padding: 2rem 1.6rem 1.6rem; text-align: center; box-shadow: 0 30px 80px rgba(20,17,14,0.4); }
.incall-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--border); background: var(--panel); color: var(--ink-soft); cursor: pointer; z-index: 2; }
.incall-close:active { background: var(--threat-soft); color: var(--threat); }
.incall-demo { font-family: 'JetBrains Mono', monospace; font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: .6rem; }
.incall.spam .incall-card { box-shadow: 0 30px 80px rgba(207,75,51,0.4); }
.incall-brand { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 700; color: var(--brand-deep);
  background: var(--brand-soft); border-radius: 99px; padding: .3rem .7rem; margin-bottom: 1.3rem; }
.incall-brand .sp-shield { width: 18px; height: 20px; }
.incall-avatar { width: 96px; height: 96px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.4rem; font-weight: 800; color: #fff; background: var(--muted); transition: background .3s; }
.incall.spam .incall-avatar { background: var(--threat); } .incall.safe .incall-avatar { background: var(--safe); }
.incall.warn .incall-avatar { background: var(--amber); }
.incall-name { font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.incall-num { color: var(--muted); font-size: .95rem; margin-top: .15rem; }
.incall-tag { display: inline-block; margin-top: .9rem; font-weight: 700; font-size: .9rem; padding: .4rem .9rem; border-radius: 99px; }
.incall.spam .incall-tag { color: var(--threat); background: var(--threat-soft); border: 1px solid #E7B6AB; }
.incall.safe .incall-tag { color: var(--safe); background: var(--safe-soft); border: 1px solid #BFE3D0; }
.incall.warn .incall-tag { color: var(--amber); background: var(--amber-soft); border: 1px solid #E6CE9C; }
.incall-reports { color: var(--muted); font-size: .8rem; margin-top: .6rem; }
.incall-actions { display: flex; justify-content: center; gap: 1.4rem; margin-top: 1.8rem; }
.ic-act { background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .4rem; font: inherit; font-size: .74rem; font-weight: 600; color: var(--ink-soft); }
.ic-act svg { width: 26px; height: 26px; padding: .9rem; border-radius: 50%; color: #fff; }
.ic-act.decline svg { background: var(--threat); transform: rotate(135deg); }
.ic-act.accept svg { background: var(--safe); }
.ic-act.block svg { background: var(--ink); }
.ic-act:active { opacity: .7; }
.incall-ring { animation: icring 1.1s ease-in-out infinite; }
@keyframes icring { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ============================================================
   Advanced features: trends feed, Account, family, onboarding tour
   ============================================================ */
.live-dot { color: var(--threat); font-size: .7rem; margin-left: .3rem; animation: livepulse 1.4s ease-in-out infinite; }
@keyframes livepulse { 50% { opacity: .3; } }

.trends { display: flex; flex-direction: column; gap: .55rem; }
.trend { display: flex; align-items: center; gap: .7rem; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--muted); border-radius: var(--radius); padding: .7rem .9rem; }
.trend.high { border-left-color: var(--threat); } .trend.med { border-left-color: var(--amber); } .trend.low { border-left-color: var(--safe); }
.trend .tr-tag { font-family: 'JetBrains Mono', monospace; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .2rem .45rem; border-radius: 99px; background: var(--panel); color: var(--muted); flex: none; }
.trend.high .tr-tag { background: var(--threat-soft); color: var(--threat); } .trend.med .tr-tag { background: var(--amber-soft); color: var(--amber); } .trend.low .tr-tag { background: var(--safe-soft); color: var(--safe); }
.trend .tr-t { flex: 1; min-width: 0; font-size: .9rem; color: var(--ink); }
.trend .tr-up { font-family: 'JetBrains Mono', monospace; font-size: .78rem; font-weight: 700; color: var(--threat); flex: none; }

/* Account tab */
.acct-head { display: flex; align-items: center; gap: 1rem; margin-bottom: .5rem; }
.acct-avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 1.4rem; }
.acct-head strong { display: block; font-size: 1.2rem; color: var(--ink); }
.acct-head span { color: var(--muted); font-size: .88rem; }
.acct-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line-soft); }
.acct-row:last-child { border-bottom: 0; }
.acct-row > span:first-child { color: var(--muted); font-size: .88rem; }
.acct-row strong { color: var(--ink); font-weight: 700; font-size: .92rem; }
.acct-row strong.ok, .acct-row strong.brand { color: var(--brand); }
.acct-row span strong { display: block; }
.acct-row span em { font-style: normal; color: var(--muted); font-size: .8rem; }
.badge-ok { font-size: .72rem; font-weight: 700; color: var(--safe); background: var(--safe-soft); border: 1px solid #BFE3D0; border-radius: 99px; padding: .2rem .6rem; flex: none; }
.acct-note { color: var(--ink-soft); font-size: .88rem; margin: 0 0 .8rem; }

.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.pref-row:last-child { border-bottom: 0; }
.pref-row span:first-child strong { display: block; color: var(--ink); font-size: .9rem; }
.pref-row span:first-child em { font-style: normal; color: var(--muted); font-size: .8rem; }

.family-list { display: flex; flex-direction: column; gap: .5rem; }
.fam-row { display: flex; align-items: center; gap: .7rem; }
.fam-av { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-deep); font-weight: 800; font-size: .9rem; }
.fam-meta { flex: 1; min-width: 0; } .fam-meta strong { display: block; color: var(--ink); font-size: .88rem; } .fam-meta span { color: var(--muted); font-size: .78rem; }

/* Onboarding tour */
.tour { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 1.4rem; background: rgba(20,17,14,0.55); backdrop-filter: blur(6px); }
.tour-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 2rem 1.6rem 1.6rem; text-align: center; box-shadow: 0 30px 80px rgba(20,17,14,0.4); }
.tour-ic { font-size: 3rem; line-height: 1; margin-bottom: 1rem; }
.tour-step { font-family: 'JetBrains Mono', monospace; font-size: .68rem; letter-spacing: .12em; color: var(--muted); margin-bottom: .6rem; }
.tour-card h2 { font-size: 1.4rem; }
.tour-card p { color: var(--ink-soft); margin-top: .6rem; font-size: .95rem; line-height: 1.5; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: 1.6rem; }
.tour-actions .btn-cta { flex: 1; }

/* 6-tab tab bar — tighten so labels fit on narrow phones */
.tabbar .tab-btn { font-size: .64rem; }
.tabbar .tab-btn svg { width: 21px; height: 21px; }
@media (max-width: 380px) { .tabbar .tab-btn { font-size: .58rem; } .tabbar .tab-btn span { letter-spacing: -.01em; } }
.tour-progress { height: 4px; border-radius: 99px; background: var(--line-soft); overflow: hidden; margin-top: 1.3rem; }
.tour-progress-fill { height: 100%; width: 0; background: var(--brand); border-radius: 99px; }
