:root {
  color-scheme: dark;
  --bg: #050916;
  --bg-2: #08101f;
  --panel: rgba(11, 18, 34, 0.92);
  --panel-solid: #0b1222;
  --panel-2: #101a2e;
  --panel-3: #15213a;
  --line: rgba(145, 167, 214, 0.16);
  --line-strong: rgba(145, 167, 214, 0.3);
  --text: #f5f6f8;
  --text-2: #ccd5ea;
  --muted: #7f8ca8;
  --teal: #00d4b4;
  --teal-2: #00e5c4;
  --blue: #2962ff;
  --purple: #7c3aed;
  --purple-2: #9c4dff;
  --coral: #ff6b7a;
  --orange: #ff9a45;
  --green: #39d98a;
  --danger: #ff5367;
  --warning: #ffb547;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --gradient: linear-gradient(135deg, var(--teal) 0%, var(--blue) 52%, var(--purple-2) 100%);
  --gradient-soft: linear-gradient(135deg, rgba(0, 212, 180, 0.15), rgba(41, 98, 255, 0.13), rgba(124, 58, 237, 0.14));
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 16% 12%, rgba(0, 212, 180, 0.08), transparent 28%),
    radial-gradient(circle at 82% 15%, rgba(124, 58, 237, 0.11), transparent 31%),
    var(--bg);
  overflow: hidden;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.hidden { display: none !important; }

.prototype-banner {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  color: #b8c6e7;
  background: #060b16;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 30;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(0, 212, 180, 0.1), 0 0 18px rgba(0, 212, 180, 0.7);
}

.app-shell {
  height: calc(100vh - 30px);
  display: grid;
  grid-template-columns: 88px 330px minmax(0, 1fr) 292px;
  background: rgba(5, 9, 22, 0.45);
}

/* Rail */
.nav-rail {
  border-right: 1px solid var(--line);
  background: rgba(6, 11, 23, 0.95);
  backdrop-filter: blur(22px);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}
.brand-button {
  width: 54px;
  height: 54px;
  margin: 0 auto 8px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
  transition: transform .2s ease;
}
.brand-button:hover { transform: translateY(-2px) scale(1.02); }
.brand-button img { width: 100%; height: 100%; display: block; }
.rail-nav { display: flex; flex-direction: column; gap: 8px; }
.rail-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 16px;
  min-height: 58px;
  padding: 8px 4px;
  display: grid;
  place-items: center;
  gap: 3px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.rail-item:hover { background: rgba(255,255,255,.04); color: var(--text-2); transform: translateY(-1px); }
.rail-item.active {
  color: #fff;
  background: linear-gradient(145deg, rgba(0,212,180,.15), rgba(41,98,255,.12), rgba(124,58,237,.15));
  box-shadow: inset 0 0 0 1px rgba(85, 130, 255, 0.16);
}
.rail-icon { font-size: 22px; line-height: 1; }
.rail-item.active .rail-icon, .rail-icon.sparkle { color: var(--teal-2); text-shadow: 0 0 18px rgba(0,229,196,.55); }
.rail-label { font-size: 10px; font-weight: 700; }
.profile-rail { margin-top: auto; }
.mini-avatar {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px;
  background: var(--gradient); color: #fff; font-weight: 800; box-shadow: 0 8px 24px rgba(41,98,255,.25);
}

/* List panel */
.list-panel {
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: rgba(8, 15, 29, 0.92);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
}
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px 10px;
}
.eyebrow {
  color: var(--teal-2);
  letter-spacing: .16em;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.eyebrow span { color: #6aa7ff; }
h1, h2, h3, h4, p { margin-top: 0; }
.list-header h1 { margin: 4px 0 0; font-size: 26px; letter-spacing: -.03em; }
.icon-button {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.035); color: #dce5fb;
  cursor: pointer; transition: .18s ease;
}
.icon-button:hover { background: rgba(255,255,255,.075); border-color: var(--line-strong); transform: translateY(-1px); }
.search-box {
  margin: 8px 16px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  color: var(--muted);
}
.search-box input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.search-box input::placeholder { color: #65718c; }
.search-box kbd { font: 10px var(--font); padding: 3px 6px; border-radius: 6px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.stories-strip {
  display: flex;
  gap: 10px;
  padding: 4px 16px 15px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stories-strip::-webkit-scrollbar { display: none; }
.story-chip { min-width: 58px; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.story-ring {
  width: 52px; height: 52px; border-radius: 18px; padding: 2px; margin: 0 auto 6px;
  background: var(--gradient);
}
.story-ring.seen { background: #27334d; }
.story-ring-inner {
  width: 100%; height: 100%; border-radius: 16px; display: grid; place-items: center;
  background: var(--panel-2); border: 2px solid #0b1427; color: #fff; font-weight: 800;
}
.story-chip small { display: block; max-width: 60px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
.list-content { flex: 1; min-height: 0; overflow: auto; padding: 2px 10px 16px; scrollbar-color: #23304a transparent; }
.list-section-title { padding: 10px 8px 7px; color: #65718d; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.chat-row, .call-row, .list-action-row {
  width: 100%; border: 0; color: inherit; text-align: left; background: transparent;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px;
  padding: 10px; border-radius: 16px; cursor: pointer; transition: .16s ease;
}
.chat-row:hover, .call-row:hover, .list-action-row:hover { background: rgba(255,255,255,.04); }
.chat-row.active { background: var(--gradient-soft); box-shadow: inset 0 0 0 1px rgba(75,120,255,.12); }
.avatar {
  width: 45px; height: 45px; border-radius: 15px; display: grid; place-items: center;
  color: #fff; font-weight: 800; background: linear-gradient(145deg,#263554,#15203a); position: relative; flex: 0 0 auto;
}
.avatar-gradient { background: var(--gradient); box-shadow: 0 10px 26px rgba(60,70,255,.18); }
.avatar.coral { background: linear-gradient(145deg,#ff7e73,#e84472); }
.avatar.blue { background: linear-gradient(145deg,#2ba9ff,#3755e6); }
.avatar.green { background: linear-gradient(145deg,#1fd49c,#0d967b); }
.avatar.purple { background: linear-gradient(145deg,#a354ff,#6130d5); }
.avatar.small { width: 36px; height: 36px; border-radius: 12px; font-size: 12px; }
.online-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--teal); border: 2px solid #0c1528;
  position: absolute; right: -1px; bottom: -1px;
}
.row-main { min-width: 0; }
.row-top { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; }
.row-top strong { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.row-time { color: #66738e; font-size: 10px; flex: 0 0 auto; }
.row-preview { margin-top: 4px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 10px; font-weight: 800; }
.row-status { color: var(--muted); font-size: 11px; }

/* Workspace */
.workspace { min-width: 0; min-height: 0; position: relative; background: rgba(5,9,22,.6); }
.view { height: 100%; display: none; }
.view.active { display: flex; flex-direction: column; }
.conversation-header {
  min-height: 70px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 13, 26, 0.84);
  backdrop-filter: blur(18px);
}
.conversation-person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.conversation-person h2 { margin: 0; font-size: 15px; }
.conversation-person p { margin: 3px 0 0; font-size: 11px; color: var(--muted); }
.header-actions { display: flex; gap: 7px; align-items: center; }
.ai-button {
  height: 40px; padding: 0 13px; border-radius: 13px; border: 1px solid rgba(0,212,180,.18);
  background: linear-gradient(135deg, rgba(0,212,180,.12), rgba(41,98,255,.12)); color: #eafcff; font-weight: 800; cursor: pointer;
}
.ai-button span { color: var(--teal-2); margin-right: 5px; }
.mobile-back { display: none; border: 0; background: transparent; color: #fff; font-size: 30px; }
.connection-strip {
  min-height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 18px;
  background: rgba(0, 212, 180, 0.045); border-bottom: 1px solid rgba(0,212,180,.09); color: #9db3c5; font-size: 10px;
}
.connection-strip strong { color: #cfefe9; }
.connection-strip button { margin-left: auto; border: 0; background: transparent; color: var(--teal); font-weight: 800; cursor: pointer; }
.shield-mini { width: 18px; height: 18px; border-radius: 7px; display: grid; place-items: center; color: #04120f; background: var(--teal); font-weight: 900; }
.messages {
  flex: 1; min-height: 0; overflow-y: auto; padding: 24px clamp(18px, 4vw, 58px);
  background:
    radial-gradient(circle at 85% 18%, rgba(124,58,237,.08), transparent 33%),
    radial-gradient(circle at 16% 84%, rgba(0,212,180,.05), transparent 30%),
    linear-gradient(rgba(7,13,26,.5), rgba(7,13,26,.5));
  scrollbar-color: #263552 transparent;
}
.day-marker { width: max-content; margin: 0 auto 22px; padding: 7px 10px; border-radius: 999px; color: #8290ad; background: rgba(19,30,52,.8); font-size: 10px; }
.message { max-width: min(68%, 620px); margin: 8px 0 13px; display: flex; flex-direction: column; align-items: flex-start; }
.message.me { margin-left: auto; align-items: flex-end; }
.message-bubble {
  padding: 10px 12px 8px; border-radius: 16px 16px 16px 5px; background: #121e34; border: 1px solid rgba(142,164,207,.08);
  box-shadow: 0 8px 28px rgba(0,0,0,.08); line-height: 1.42; font-size: 13px; color: #edf2ff;
}
.message.me .message-bubble { background: linear-gradient(135deg, #1c5fdf, #6545dc); border-radius: 16px 16px 5px 16px; }
.message-author { color: #79dcff; font-size: 10px; font-weight: 800; margin-bottom: 3px; }
.message-meta { display: flex; justify-content: flex-end; gap: 5px; margin-top: 5px; color: rgba(236,243,255,.65); font-size: 9px; }
.message-action-row { opacity: 0; display: flex; gap: 5px; margin-top: 5px; transition: opacity .15s ease; }
.message:hover .message-action-row { opacity: 1; }
.message-action-row button { border: 0; background: rgba(255,255,255,.04); color: #8895b2; border-radius: 7px; padding: 4px 6px; font-size: 9px; cursor: pointer; }
.system-message { margin: 12px auto; width: fit-content; max-width: 70%; color: #72809d; text-align: center; font-size: 10px; }
.attachment-bubble { display: grid; grid-template-columns: auto 1fr; gap: 9px; align-items: center; min-width: 230px; }
.file-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.1); }
.attachment-bubble small { display: block; color: rgba(255,255,255,.65); margin-top: 3px; }
.typing-indicator { padding: 0 30px 8px; color: #71809d; font-size: 10px; }
.typing-indicator span { display: inline-block; width: 4px; height: 4px; margin-right: 2px; border-radius: 50%; background: var(--teal); animation: blink 1s infinite alternate; }
.typing-indicator span:nth-child(2) { animation-delay: .2s; }
.typing-indicator span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { to { opacity: .25; transform: translateY(-2px); } }
.composer {
  min-height: 74px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; align-items: end;
  padding: 12px 18px 14px; border-top: 1px solid var(--line); background: rgba(7,13,26,.9); backdrop-filter: blur(18px);
}
.composer-tool, .send-button {
  width: 44px; height: 44px; border: 0; border-radius: 14px; cursor: pointer; display: grid; place-items: center;
}
.composer-tool { background: #131f35; color: #a9b7d3; font-size: 22px; }
.send-button { background: var(--gradient); color: #fff; box-shadow: 0 10px 30px rgba(65,75,255,.26); }
.composer-input-wrap { min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 16px; background: #101a2d; }
.composer-input-wrap textarea { width: 100%; max-height: 120px; resize: none; border: 0; outline: 0; color: var(--text); background: transparent; line-height: 1.35; }
.composer-input-wrap textarea::placeholder { color: #62708b; }
.composer-hints { display: flex; justify-content: flex-end; gap: 6px; margin-top: 2px; }
.composer-hints button { border: 0; background: transparent; color: #65728d; font-size: 9px; cursor: pointer; }
.reply-preview { padding: 6px 8px; margin-bottom: 5px; border-left: 2px solid var(--teal); border-radius: 6px; background: rgba(255,255,255,.03); color: #9dadca; font-size: 10px; }

/* Details */
.details-panel {
  min-width: 0; overflow-y: auto; border-left: 1px solid var(--line); background: rgba(8,15,29,.93); padding: 16px;
  scrollbar-color: #263552 transparent;
}
.close-details { display: none; }
.details-top { text-align: center; padding: 10px 4px 18px; border-bottom: 1px solid var(--line); }
.details-avatar { width: 72px; height: 72px; border-radius: 24px; display: grid; place-items: center; margin: 5px auto 11px; font-size: 22px; font-weight: 800; }
.details-top h3 { margin: 0; font-size: 16px; }
.details-top p { margin: 4px 0 14px; color: var(--muted); font-size: 10px; }
.details-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.details-actions button { border: 1px solid var(--line); border-radius: 12px; background: #101a2e; color: #aab7d1; padding: 8px 3px; cursor: pointer; font-size: 9px; }
.details-actions span { display: block; font-size: 17px; color: var(--teal); margin-bottom: 4px; }
.details-section { padding: 15px 2px; border-bottom: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.section-head h3, .section-head h4 { margin: 0; font-size: 13px; }
.section-head button { border: 0; background: transparent; color: var(--teal); cursor: pointer; font-size: 10px; }
.member { display: flex; align-items: center; gap: 9px; margin-top: 11px; }
.member strong { display: block; font-size: 11px; }
.member small { color: var(--muted); font-size: 9px; }
.media-preview { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-top: 10px; }
.media-preview span { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; background: var(--gradient-soft); color: #b8c9f3; font-size: 10px; font-weight: 900; }
.trust-box { border: 1px solid rgba(0,212,180,.12); border-radius: 16px; margin-top: 14px; padding: 12px; display: flex; gap: 10px; background: rgba(0,212,180,.04); }
.shield-large { width: 36px; height: 36px; border-radius: 12px; background: rgba(0,212,180,.13); color: var(--teal); display: grid; place-items: center; font-weight: 900; }
.trust-box strong { font-size: 11px; }
.trust-box p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }

/* General pages */
.page-scroll { flex: 1; min-height: 0; overflow: auto; padding: clamp(20px, 4vw, 46px); scrollbar-color: #263552 transparent; }
.page-hero { position: relative; overflow: hidden; padding: 30px; border: 1px solid var(--line); border-radius: 26px; background: var(--gradient-soft); box-shadow: var(--shadow); }
.page-hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(0,229,196,.18), transparent 68%); }
.page-hero.compact { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.page-hero h2, .ai-hero h2 { margin: 7px 0 9px; font-size: clamp(26px,3vw,42px); line-height: 1.05; letter-spacing: -.04em; max-width: 720px; }
.page-hero p, .ai-hero p { margin: 0; color: #9aa8c4; max-width: 720px; line-height: 1.6; font-size: 13px; }
.gradient-button, .secondary-button, .wide-button {
  border-radius: 14px; min-height: 42px; padding: 0 16px; font-weight: 800; cursor: pointer;
}
.gradient-button { border: 0; background: var(--gradient); color: white; box-shadow: 0 10px 30px rgba(68,75,255,.22); }
.secondary-button { border: 1px solid var(--line); background: rgba(255,255,255,.04); color: #dce5f8; }
.gradient-button.full { width: 100%; }
.metric-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 20px 0; }
.metric-card { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); padding: 18px; }
.metric-card span, .metric-card small { display: block; color: var(--muted); font-size: 10px; }
.metric-card strong { display: block; margin: 7px 0 2px; font-size: 25px; }
.content-card { border: 1px solid var(--line); border-radius: 21px; background: rgba(11,18,34,.88); padding: 18px; }
.content-card + .content-card { margin-top: 14px; }
.recent-call { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid rgba(145,167,214,.08); }
.recent-call:last-child { border-bottom: 0; }
.recent-call strong { font-size: 12px; }
.recent-call p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.recent-call button { width: 34px; height: 34px; border-radius: 11px; border: 1px solid var(--line); background: #111c31; color: var(--teal); cursor: pointer; }

.story-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-top: 20px; }
.story-card { min-height: 300px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 23px; background: linear-gradient(145deg,#132b42,#211648); cursor: pointer; padding: 0; text-align: left; color: #fff; }
.story-card::after { content:""; position:absolute; inset:0; background: linear-gradient(transparent 40%,rgba(2,5,12,.85)); }
.story-card .story-art { position: absolute; inset: 0; display: grid; place-items: center; font-size: 70px; background-size: cover; background-position: center; }
.story-card .story-card-info { position:absolute; z-index:2; left:15px; right:15px; bottom:14px; }
.story-card .story-card-user { display:flex; gap:8px; align-items:center; margin-bottom:8px; }
.story-card p { margin:0; font-size:12px; line-height:1.45; }
.stories-hero { background: linear-gradient(135deg,rgba(124,58,237,.18),rgba(41,98,255,.12),rgba(0,212,180,.1)); }

.space-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; margin: 20px 0; }
.space-card { border: 1px solid var(--line); border-radius: 21px; background: rgba(11,18,34,.88); padding: 18px; cursor: pointer; transition: .18s ease; }
.space-card:hover { border-color: rgba(0,212,180,.25); transform: translateY(-2px); }
.space-icon { width: 47px; height: 47px; border-radius: 15px; display:grid; place-items:center; font-weight:900; background: var(--gradient); margin-bottom:13px; }
.space-card h3 { margin:0 0 5px; font-size:15px; }
.space-card p { margin:0; color:var(--muted); font-size:10px; line-height:1.5; }
.space-meta { display:flex; justify-content:space-between; margin-top:13px; color:#6f7d99; font-size:9px; }
.status-pill { padding: 5px 8px; border-radius: 999px; background: rgba(124,58,237,.13); color:#bda6ff; font-size:9px; font-weight:800; }
.status-pill.good { background: rgba(0,212,180,.1); color: var(--teal); }
.roadmap-card { margin-top: 0 !important; }
.timeline { margin-top: 14px; }
.timeline > div { display:grid; grid-template-columns:auto 50px 1fr; align-items:center; gap:8px; padding:8px 0; }
.timeline-dot { width:8px;height:8px;border-radius:50%; }
.timeline-dot.teal { background:var(--teal); }.timeline-dot.purple { background:var(--purple-2); }.timeline-dot.blue { background:#5da3ff; }
.timeline strong { font-size:10px; color:#8d9ab5; }
.timeline p { margin:0; font-size:11px; }

.ai-hero { padding: 40px 25px; text-align:center; border:1px solid var(--line); border-radius:28px; background: radial-gradient(circle at 50% 10%,rgba(0,229,196,.1),transparent 32%), radial-gradient(circle at 80% 65%,rgba(124,58,237,.12),transparent 35%), rgba(10,17,32,.84); }
.ai-hero p { margin-left:auto; margin-right:auto; }
.ai-orb { width:68px;height:68px;border-radius:23px;display:grid;place-items:center;margin:0 auto 16px;background:var(--gradient);font-size:28px;box-shadow:0 18px 50px rgba(49,78,255,.28); }
.ai-command { max-width:700px; margin:23px auto 0; display:grid; grid-template-columns:1fr auto; gap:8px; padding:7px; border:1px solid var(--line); border-radius:17px; background:#0f1a2e; }
.ai-command input { min-width:0; border:0; outline:0; background:transparent; color:var(--text); padding:0 9px; }
.ai-command button { border:0;border-radius:12px;background:var(--gradient);color:#fff;padding:0 15px;font-weight:800;cursor:pointer; }
.feature-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:13px; margin-top:17px; }
.feature-card { min-height:125px; border:1px solid var(--line); border-radius:19px; background:#0d172a; color:inherit; text-align:left; padding:17px; cursor:pointer; transition:.18s ease; }
.feature-card:hover { background:var(--gradient-soft); transform:translateY(-2px); border-color:rgba(0,212,180,.2); }
.feature-card span { display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:rgba(0,212,180,.09);color:var(--teal);font-size:18px;margin-bottom:13px; }
.feature-card strong { display:block;font-size:12px;margin-bottom:4px; }
.feature-card small { color:var(--muted);font-size:9px; }
.ai-response { margin-top:15px; border:1px solid rgba(0,212,180,.15); border-radius:19px; background:rgba(0,212,180,.04); padding:17px; color:#cce4e1; line-height:1.65; font-size:12px; }

.profile-cover { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:17px; padding:25px; border:1px solid var(--line); border-radius:25px; background:var(--gradient-soft); }
.large-avatar { width:83px;height:83px;border-radius:27px;display:grid;place-items:center;background:var(--gradient);font-size:28px;font-weight:900; }
.profile-cover h2 { margin:5px 0 3px;font-size:27px; }
.profile-cover p { margin:0;color:var(--muted);font-size:11px; }
.settings-grid { display:grid;grid-template-columns:1.2fr .8fr;gap:15px;margin-top:17px; }
.settings-grid .content-card:nth-child(3) { grid-column:1/-1; }
.setting-row { display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 0;border-bottom:1px solid rgba(145,167,214,.08); }
.setting-row:last-child { border-bottom:0; }
.setting-row strong { display:block;font-size:11px; }.setting-row small { color:var(--muted);font-size:9px; }
.setting-row input { accent-color:var(--teal); }
.webpush-setting { align-items:flex-start; }
.webpush-setting p { margin:4px 0 10px; color:var(--muted); font-size:11px; line-height:1.45; }
.webpush-controls { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.webpush-controls .status-pill { text-transform:none; }
.webpush-controls button:disabled { opacity:.45; cursor:default; }
.security-score { padding:20px 0;text-align:center; }
.security-score strong { font-size:40px;color:var(--teal); }.security-score span{color:var(--muted);font-size:10px}.security-score p{margin:5px 0 0;color:var(--muted);font-size:10px}
.wide-button { width:100%;border:1px solid var(--line);background:#111c31;color:#d3dcf0;margin-top:8px;text-align:left; }
.plan-card { margin-top:13px;padding:17px;border-radius:16px;background:var(--gradient-soft); }.plan-card p{color:var(--muted);font-size:10px;line-height:1.5}

/* Dialogs */
dialog { color:var(--text); }
dialog::backdrop { background:rgba(1,4,10,.78); backdrop-filter:blur(7px); }
.glass-dialog { width:min(560px,calc(100vw - 30px)); border:1px solid var(--line-strong); border-radius:25px; background:rgba(9,16,30,.96); box-shadow:var(--shadow); padding:0; }
.onboarding-dialog { width:min(520px,calc(100vw - 30px)); }
.onboarding-content { padding:36px;text-align:center; }
.onboarding-content img { width:105px;height:105px;margin-bottom:15px; }
.onboarding-content h2 { font-size:30px;line-height:1.13;margin:8px 0 12px;letter-spacing:-.04em; }
.onboarding-content p { color:var(--muted);font-size:12px;line-height:1.6;margin-bottom:20px; }
.onboarding-content .gradient-button { min-width:180px; }
.onboarding-content small { display:block;color:#64718c;font-size:9px;margin-top:13px; }
.dialog-title { display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:22px 22px 0; }
.dialog-title h3 { margin:5px 0 0;font-size:20px; }
.dialog-x { width:38px;height:38px;border:0;border-radius:13px;background:rgba(0,0,0,.3);color:#fff;font-size:24px;cursor:pointer;position:absolute;right:15px;top:15px;z-index:3; }
.dialog-x.static { position:static;flex:0 0 auto; }
.form-dialog form { padding-bottom:22px; }
.form-dialog label { display:block;margin:16px 22px 0;color:#a9b6d0;font-size:10px;font-weight:800; }
.form-dialog textarea, .form-dialog select { width:100%;margin-top:7px;border:1px solid var(--line);border-radius:13px;background:#111c30;color:var(--text);padding:11px;outline:0; }
.form-dialog textarea { min-height:100px;resize:vertical; }
.file-drop { padding:13px;border:1px dashed var(--line-strong);border-radius:14px;text-align:center;cursor:pointer; }
.file-drop input { display:none; }.file-drop span{display:block;margin-top:4px;color:var(--teal);}
.form-actions { display:flex;justify-content:flex-end;gap:8px;padding:20px 22px 0; }
.summary-dialog { padding-bottom:22px; }
.consent-note { display:flex;gap:10px;margin:17px 22px;padding:12px;border-radius:14px;background:rgba(41,98,255,.08);border:1px solid rgba(41,98,255,.12); }
.consent-note span { width:24px;height:24px;flex:0 0 auto;border-radius:9px;background:#245ee7;display:grid;place-items:center;font-weight:900; }
.consent-note p { margin:0;color:#a9b8d7;font-size:10px;line-height:1.5; }
#summaryContent { padding:0 22px;color:#d4dded;font-size:12px;line-height:1.6; }
#summaryContent ul { padding-left:18px; }
.security-dialog { padding-bottom:22px; }
.security-overview { display:flex;align-items:center;gap:17px;margin:17px 22px;padding:15px;border-radius:17px;background:var(--gradient-soft); }
.security-ring { width:78px;height:78px;flex:0 0 auto;border-radius:50%;display:grid;place-items:center;align-content:center;border:7px solid rgba(0,212,180,.55);box-shadow:0 0 35px rgba(0,212,180,.12); }
.security-ring strong { font-size:24px; }.security-ring span{color:var(--muted);font-size:9px;}
.security-overview h4{margin:0 0 4px}.security-overview p{margin:0;color:var(--muted);font-size:10px;line-height:1.5}
.check-list { margin:0 22px; }
.check-list > div { display:flex;gap:10px;padding:10px 0;border-bottom:1px solid rgba(145,167,214,.08); }
.check { width:28px;height:28px;flex:0 0 auto;border-radius:10px;display:grid;place-items:center;font-weight:900; }.check.good{background:rgba(0,212,180,.12);color:var(--teal)}.check.warn{background:rgba(255,181,71,.12);color:var(--warning)}.check.neutral{background:rgba(41,98,255,.12);color:#6c9aff}
.check-list p{margin:0}.check-list strong{display:block;font-size:10px}.check-list small{color:var(--muted);font-size:9px}.security-dialog>.gradient-button{width:calc(100% - 44px);margin:18px 22px 0}
.story-dialog { width:min(430px,calc(100vw - 20px));height:min(760px,calc(100vh - 20px));padding:0;border:0;border-radius:25px;background:#080e1a;overflow:hidden; }
.story-stage { height:100%;position:relative;display:flex;flex-direction:column;background:linear-gradient(150deg,#1e4464,#3c175e); }
.story-progress { position:absolute;left:13px;right:13px;top:10px;height:3px;border-radius:4px;background:rgba(255,255,255,.25);z-index:3;overflow:hidden; }.story-progress span{display:block;height:100%;width:72%;background:#fff}
.story-user { position:absolute;top:24px;left:14px;z-index:3;display:flex;align-items:center;gap:8px; }.story-user strong{display:block;font-size:11px}.story-user small{color:rgba(255,255,255,.7);font-size:9px}
.story-main { flex:1;display:grid;place-items:center;font-size:90px;background-size:cover;background-position:center;text-align:center;padding:60px 28px 100px;line-height:1.2; }
.story-bottom { position:absolute;z-index:3;left:0;right:0;bottom:0;padding:50px 17px 18px;background:linear-gradient(transparent,rgba(2,5,12,.9));display:flex;align-items:flex-end;gap:10px; }.story-bottom p{margin:0;flex:1;font-size:12px;line-height:1.5}.story-bottom button{width:40px;height:40px;border-radius:50%;border:1px solid rgba(255,255,255,.25);background:rgba(0,0,0,.25);color:#fff;font-size:20px}
.call-dialog { width:min(470px,calc(100vw - 25px));height:min(690px,calc(100vh - 25px));border:0;border-radius:28px;padding:0;background:#080d18;overflow:hidden; }
.call-background { height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:radial-gradient(circle at 50% 25%,rgba(0,212,180,.18),transparent 25%),radial-gradient(circle at 80% 70%,rgba(124,58,237,.2),transparent 35%),#080d18;position:relative; }
.call-avatar { width:115px;height:115px;border-radius:38px;display:grid;place-items:center;font-size:35px;font-weight:900;box-shadow:0 24px 70px rgba(42,74,255,.26); }
.call-background h2{margin:22px 0 5px;font-size:28px}.call-background>p{color:var(--muted);font-size:12px}.call-quality{display:flex;align-items:center;gap:9px;color:#8c9bb8;font-size:9px;margin-top:8px}.call-controls{display:flex;gap:18px;margin-top:60px}.call-controls button{width:70px;height:70px;border-radius:23px;border:1px solid var(--line);background:rgba(255,255,255,.06);color:#fff;display:grid;place-items:center;align-content:center;font-size:20px;cursor:pointer}.call-controls button small{display:block;font-size:8px;margin-top:5px;color:#aab7d1}.call-controls .hangup{background:var(--danger);border-color:transparent}

.toast-stack { position:fixed;right:18px;bottom:18px;z-index:100;display:flex;flex-direction:column;gap:8px; }
.toast { min-width:250px;max-width:360px;padding:12px 14px;border:1px solid var(--line-strong);border-radius:14px;background:rgba(11,18,34,.96);box-shadow:0 16px 45px rgba(0,0,0,.35);color:#dfe7f7;font-size:11px;animation:toast-in .2s ease; }
.toast strong{color:var(--teal)}
@keyframes toast-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.mobile-nav { display:none; }

@media (max-width: 1220px) {
  .app-shell { grid-template-columns: 76px 310px minmax(0,1fr); }
  .details-panel { position:fixed;top:30px;bottom:0;right:0;width:310px;z-index:40;box-shadow:-25px 0 70px rgba(0,0,0,.35);transform:translateX(105%);transition:transform .22s ease; }
  .details-panel.open { transform:translateX(0); }
  .close-details { display:grid;place-items:center;position:absolute;right:12px;top:10px;width:32px;height:32px;border:0;border-radius:10px;background:#111d32;color:#fff;font-size:20px;cursor:pointer; }
}
@media (max-width: 900px) {
  body { overflow:auto; }
  .prototype-banner { height:auto;min-height:28px;text-align:center;padding:6px 10px; }
  .app-shell { height:calc(100vh - 28px);grid-template-columns:72px 290px minmax(0,1fr); }
  .feature-grid { grid-template-columns:repeat(2,1fr); }
  .story-grid { grid-template-columns:repeat(2,1fr); }
  .message { max-width:82%; }
  .space-grid { grid-template-columns:1fr; }
}
@media (max-width: 720px) {
  body { overflow:hidden; }
  .prototype-banner { display:none; }
  .app-shell { height:100vh;display:block;padding-bottom:63px; }
  .nav-rail { display:none; }
  .list-panel { height:100%;border-right:0; }
  .workspace { position:fixed;inset:0 0 63px 0;z-index:15;background:var(--bg);transform:translateX(100%);transition:transform .22s ease; }
  .workspace.mobile-open { transform:translateX(0); }
  .workspace.mobile-static { transform:none; }
  .details-panel { top:0;bottom:63px;width:min(330px,90vw); }
  .mobile-nav { position:fixed;z-index:50;left:0;right:0;bottom:0;height:63px;display:grid;grid-template-columns:repeat(5,1fr);background:rgba(7,13,25,.97);border-top:1px solid var(--line);backdrop-filter:blur(18px);padding-bottom:env(safe-area-inset-bottom); }
  .mobile-nav button { border:0;background:transparent;color:#68758f;font-size:8px;display:grid;place-items:center;align-content:center;gap:3px; }
  .mobile-nav button span{font-size:19px}.mobile-nav button.active{color:var(--teal)}
  .mobile-back { display:block; }
  .conversation-header { padding:10px 11px; }.conversation-person .avatar{width:40px;height:40px}.header-actions>.icon-button:nth-child(1),.header-actions>.icon-button:nth-child(2),.header-actions>.icon-button:nth-child(4){display:none}.ai-button{padding:0 10px;font-size:10px}
  .connection-strip { padding:5px 12px;min-height:34px;line-height:1.3; }.connection-strip button{display:none}
  .messages { padding:18px 12px; }.message{max-width:88%}.message-action-row{display:none}
  .composer { padding:9px 9px 10px;grid-template-columns:auto minmax(0,1fr) auto; }.composer-tool,.send-button{width:40px;height:40px}.composer-hints{display:none}
  .page-scroll { padding:15px; }.page-hero.compact{display:block;padding:22px}.page-hero.compact .gradient-button{margin-top:17px}.page-hero h2,.ai-hero h2{font-size:27px}
  .metric-row { grid-template-columns:1fr 1fr; }.metric-row .metric-card:last-child{grid-column:1/-1}
  .story-grid { grid-template-columns:1fr 1fr;gap:9px}.story-card{min-height:260px}
  .feature-grid { grid-template-columns:1fr 1fr;gap:9px }.feature-card{min-height:110px;padding:13px}
  .profile-cover { grid-template-columns:auto 1fr;padding:18px }.profile-cover .secondary-button{grid-column:1/-1}.settings-grid{grid-template-columns:1fr}.settings-grid .content-card:nth-child(3){grid-column:auto}.large-avatar{width:65px;height:65px;border-radius:21px}
  .glass-dialog { border-radius:22px; }.onboarding-content{padding:28px 20px}.onboarding-content h2{font-size:27px}
  .toast-stack { left:12px;right:12px;bottom:74px }.toast{min-width:0;max-width:none}
}
@media (max-width: 430px) {
  .story-grid { grid-template-columns:1fr 1fr; }.story-card{min-height:220px}
  .feature-grid { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* TARVI promo scene — chat “Человечество” */
.demo-scene-bar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(124, 58, 237, .2);
  background:
    linear-gradient(90deg, rgba(0, 212, 180, .07), rgba(41, 98, 255, .08), rgba(124, 58, 237, .09)),
    rgba(8, 14, 28, .94);
}
.demo-scene-copy { min-width: 0; display: grid; gap: 2px; }
.demo-kicker { color: var(--purple-2); font-size: 8px; font-weight: 900; letter-spacing: .18em; }
.demo-scene-copy strong { font-size: 12px; }
.demo-scene-copy small { color: #8190ad; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-scene-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.demo-scene-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.035);
  color: #b8c5df;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}
.demo-scene-actions button:hover { background: rgba(255,255,255,.07); border-color: var(--line-strong); }
.demo-scene-actions .demo-play {
  border-color: rgba(0, 212, 180, .24);
  background: linear-gradient(135deg, rgba(0,212,180,.17), rgba(41,98,255,.17), rgba(124,58,237,.18));
  color: #f2ffff;
}
.message.ai-message .message-bubble {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0,212,180,.12), rgba(41,98,255,.12) 54%, rgba(124,58,237,.14)),
    #111d33;
  border-color: rgba(0,212,180,.22);
  box-shadow: 0 14px 40px rgba(0, 161, 183, .09);
}
.message.ai-message .message-bubble::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.045) 48%, transparent 72%);
  transform: translateX(-100%);
  animation: tarviSheen 4.8s ease-in-out infinite;
}
.message.ai-message .message-author::before { content: '✦ '; color: var(--teal-2); }
@keyframes tarviSheen { 0%, 62% { transform: translateX(-110%); } 100% { transform: translateX(110%); } }

.promo-finale {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(0,212,180,.13), transparent 32%),
    radial-gradient(circle at 68% 68%, rgba(124,58,237,.2), transparent 38%),
    rgba(4, 8, 18, .96);
  backdrop-filter: blur(24px);
}
.promo-finale-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 1px solid rgba(0,212,180,.12);
  box-shadow: 0 0 130px rgba(41,98,255,.13), inset 0 0 110px rgba(124,58,237,.08);
  animation: finalePulse 3.5s ease-in-out infinite alternate;
}
@keyframes finalePulse { to { transform: scale(1.08); opacity: .72; } }
.promo-finale-content { position: relative; z-index: 2; max-width: 600px; text-align: center; }
.promo-finale-content img { width: 102px; height: 102px; filter: drop-shadow(0 20px 46px rgba(45,100,255,.32)); }
.promo-finale-content h2 { margin: 18px 0 12px; font-size: clamp(32px, 5vw, 64px); letter-spacing: -.045em; }
.promo-finale-content p { margin: 0 auto 16px; color: #d6def0; font-size: clamp(17px, 2.2vw, 25px); line-height: 1.48; }
.promo-finale-content p strong { color: #fff; }
.promo-finale-content small { display: block; max-width: 520px; margin: 0 auto; color: #71809d; line-height: 1.55; }
.promo-finale-actions { display: flex; justify-content: center; gap: 10px; margin-top: 25px; }

/* Clean, centered capture mode for screen recording */
body.recording-mode {
  background:
    radial-gradient(circle at 50% 10%, rgba(0,212,180,.08), transparent 34%),
    radial-gradient(circle at 50% 90%, rgba(124,58,237,.13), transparent 40%),
    #030610;
}
body.recording-mode .prototype-banner,
body.recording-mode .nav-rail,
body.recording-mode .list-panel,
body.recording-mode .details-panel,
body.recording-mode .mobile-nav { display: none !important; }
body.recording-mode .app-shell {
  height: 100vh;
  display: block;
  background: transparent;
}
body.recording-mode .workspace {
  width: min(620px, 100vw);
  height: 100vh;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  box-shadow: 0 0 100px rgba(0,0,0,.55);
  background: var(--bg);
}
body.recording-mode .conversation-header { min-height: 78px; padding-inline: 20px; }
body.recording-mode .header-actions > *:not(.ai-button) { display: none; }
body.recording-mode .connection-strip { justify-content: center; text-align: center; padding: 7px 16px; }
body.recording-mode .connection-strip .shield-mini { display: none; }
body.recording-mode .demo-scene-bar { align-items: center; }
body.recording-mode .demo-scene-copy small { white-space: normal; }
body.recording-mode .messages { padding-inline: 22px; }
body.recording-mode .message { max-width: 86%; }
body.recording-mode .composer { display: none; }
body.recording-mode .typing-indicator { padding-bottom: 16px; }

@media (max-width: 900px) {
  .demo-scene-bar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .demo-scene-actions { width: 100%; overflow-x: auto; }
  .demo-scene-actions button { white-space: nowrap; }
}

@media (max-width: 720px) {
  .demo-scene-bar { padding: 8px 10px; }
  .demo-scene-copy small { white-space: normal; line-height: 1.35; }
  .promo-finale { padding: 18px; }
  .promo-finale-content img { width: 84px; height: 84px; }
  .promo-finale-actions { flex-direction: column-reverse; }
  .promo-finale-actions button { width: 100%; }
  body.recording-mode .workspace { position: relative; inset: auto; transform: none; }
}


/* TARVI Services + Action Loop v0.5 */
.services-page { background: radial-gradient(circle at 80% 5%, rgba(124,58,237,.08), transparent 28%); }
.service-hero { margin-bottom: 18px; }
.service-grid { display: grid; grid-template-columns: repeat(5,minmax(150px,1fr)); gap: 12px; margin-bottom: 18px; }
.service-card { min-height: 145px; text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: rgba(12,20,38,.9); color: var(--text); cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.service-card:hover, .service-card.active { transform: translateY(-2px); border-color: rgba(0,212,180,.28); background: linear-gradient(145deg,rgba(0,212,180,.08),rgba(68,75,255,.08)); }
.service-icon { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px; background: var(--gradient-soft); color: var(--teal-2); font-size: 18px; }
.service-card strong, .service-card small, .service-card em { display: block; }
.service-card strong { font-size: 14px; }
.service-card small { margin-top: 5px; color: var(--muted); line-height: 1.4; }
.service-card em { margin-top: 12px; color: #71809d; font-size: 9px; font-style: normal; text-transform: uppercase; letter-spacing: .08em; }
.action-workbench { border: 1px solid var(--line); border-radius: 26px; padding: 22px; background: rgba(8,15,30,.92); box-shadow: var(--shadow); transition: opacity .2s ease, filter .2s ease; }
.action-workbench.analyzing { opacity: .55; filter: blur(1px); pointer-events: none; }
.action-workbench-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.action-workbench-head h3 { margin: 6px 0 6px; font-size: 24px; }
.action-workbench-head p { margin: 0; max-width: 760px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.action-head-controls { display: flex; gap: 8px; flex-shrink: 0; }
.action-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 18px 0; }
.action-metrics article { border: 1px solid rgba(145,167,214,.1); border-radius: 17px; padding: 15px; background: rgba(255,255,255,.025); }
.action-metrics span, .action-metrics small { display: block; color: var(--muted); font-size: 9px; }
.action-metrics strong { display: block; margin: 5px 0 2px; font-size: 25px; }
.action-layout { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(270px,.7fr); gap: 14px; }
.action-queue-wrap, .action-memory { border: 1px solid rgba(145,167,214,.09); border-radius: 20px; padding: 16px; background: rgba(10,18,34,.78); }
.action-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.action-filters button { border: 1px solid var(--line); border-radius: 999px; background: transparent; color: #8593ae; padding: 7px 10px; font-size: 9px; cursor: pointer; }
.action-filters button.active { color: #05130f; background: var(--teal); border-color: var(--teal); font-weight: 800; }
.action-queue { display: grid; gap: 9px; }
.action-item { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; padding: 13px; border: 1px solid rgba(145,167,214,.08); border-radius: 17px; background: rgba(255,255,255,.022); }
.action-item.approved { border-color: rgba(0,212,180,.18); background: rgba(0,212,180,.035); }
.action-item.rejected { opacity: .5; }
.action-item-icon { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; font-weight: 900; }
.action-item-icon.teal { background: rgba(0,212,180,.12); color: var(--teal); }
.action-item-icon.purple { background: rgba(124,58,237,.13); color: #aa86ff; }
.action-item-icon.blue { background: rgba(41,98,255,.13); color: #73a5ff; }
.action-item-icon.amber { background: rgba(255,177,64,.13); color: #ffbd63; }
.action-item-top { display: flex; justify-content: space-between; gap: 8px; }
.action-type { color: var(--teal-2); font-size: 9px; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; }
.confidence { color: #66748f; font-size: 9px; }
.action-item h4 { margin: 5px 0 5px; font-size: 13px; }
.action-item p { margin: 0; color: #9aa8c2; font-size: 10px; line-height: 1.5; }
.action-item-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; color: #6f7e9b; font-size: 9px; }
.action-item-meta strong { color: #aab8d3; }
.action-item-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.action-item-actions button { border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); color: #8d9ab4; padding: 6px 8px; font-size: 9px; cursor: pointer; }
.action-item-actions button.approve { color: #041511; background: var(--teal); border-color: var(--teal); font-weight: 800; }
.resolved-label { color: var(--teal); font-size: 9px; font-weight: 800; }
.memory-summary { border: 1px solid rgba(0,212,180,.12); border-radius: 17px; padding: 13px; margin: 14px 0; background: rgba(0,212,180,.035); display: flex; gap: 10px; }
.memory-orb { width: 31px; height: 31px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; background: var(--gradient); }
.memory-summary p { margin: 0; color: #9fadc7; font-size: 10px; line-height: 1.55; }
.memory-summary strong { color: #e7fff9; }
.memory-list { display: grid; gap: 9px; margin-bottom: 13px; }
.memory-list > div { display: grid; grid-template-columns: auto 1fr; gap: 9px; align-items: start; }
.memory-list > div > span { color: #52617c; font-size: 9px; }
.memory-list p { margin: 0; }
.memory-list strong, .memory-list small { display: block; }
.memory-list strong { font-size: 10px; }
.memory-list small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.action-source-dialog { width: min(620px,calc(100vw - 28px)); }
.source-quote { padding: 16px; border-left: 3px solid var(--teal); border-radius: 12px; background: rgba(255,255,255,.035); color: #d9e5f7; line-height: 1.6; font-size: 12px; }
.source-facts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.source-facts span { padding: 7px 9px; border: 1px solid var(--line); border-radius: 999px; color: #8d9bb6; font-size: 9px; }
@media (max-width: 1180px) { .service-grid { grid-template-columns: repeat(3,1fr); } .action-layout { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .service-grid { grid-template-columns: repeat(2,1fr); } .action-workbench { padding: 14px; border-radius: 20px; } .action-workbench-head { display: block; } .action-head-controls { margin-top: 12px; } .action-metrics { grid-template-columns: repeat(2,1fr); } .action-item-meta { display: grid; } .mobile-nav { grid-template-columns: repeat(6,1fr); overflow-x: auto; } .mobile-nav button { min-width: 66px; } }

/* TARVI Shield v0.5 */
.hidden-service { display: none !important; }
.shield-workbench {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 22px;
  background:
    radial-gradient(circle at 86% 0%, rgba(0,212,180,.08), transparent 28%),
    rgba(8,15,30,.94);
  box-shadow: var(--shadow);
  transition: opacity .2s ease, filter .2s ease;
}
.shield-workbench.analyzing { opacity: .55; filter: blur(1px); pointer-events: none; }
.shield-workbench-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.shield-workbench-head h3 { margin:6px 0; font-size:24px; }
.shield-workbench-head p { margin:0; max-width:760px; color:var(--muted); font-size:12px; line-height:1.55; }
.shield-head-controls { display:flex; gap:8px; flex-shrink:0; }
.shield-score-layout { display:grid; grid-template-columns:minmax(320px,1.6fr) repeat(3,minmax(150px,.7fr)); gap:10px; margin:18px 0; }
.shield-score-card, .shield-stat-card { border:1px solid rgba(145,167,214,.1); border-radius:19px; background:rgba(255,255,255,.025); }
.shield-score-card { display:flex; align-items:center; gap:16px; padding:16px; }
.shield-score-ring {
  --score: 280deg;
  width:84px; height:84px; flex:0 0 auto; border-radius:50%; display:grid; place-items:center; position:relative;
  background:conic-gradient(var(--teal) var(--score), rgba(145,167,214,.11) 0);
}
.shield-score-ring::after { content:''; position:absolute; inset:7px; border-radius:50%; background:#0b1427; border:1px solid rgba(145,167,214,.08); }
.shield-score-ring strong, .shield-score-ring span { position:relative; z-index:1; }
.shield-score-ring strong { font-size:24px; }
.shield-score-ring span { color:var(--muted); font-size:9px; position:absolute; bottom:20px; right:18px; }
.risk-kicker { color:var(--teal-2); font-size:8px; letter-spacing:.14em; font-weight:900; }
.shield-score-card h4 { margin:5px 0; font-size:16px; }
.shield-score-card p { margin:0; color:var(--muted); font-size:10px; line-height:1.5; }
.shield-stat-card { padding:15px; }
.shield-stat-card span, .shield-stat-card small { display:block; color:var(--muted); font-size:9px; }
.shield-stat-card strong { display:block; margin:7px 0 4px; font-size:22px; }
.shield-tabs { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 14px; padding:5px; border:1px solid rgba(145,167,214,.09); border-radius:15px; background:rgba(255,255,255,.018); }
.shield-tabs button { border:0; border-radius:11px; background:transparent; color:#7f8da9; padding:9px 12px; font-size:9px; font-weight:800; cursor:pointer; }
.shield-tabs button.active { background:rgba(0,212,180,.12); color:#dffff8; box-shadow:inset 0 0 0 1px rgba(0,212,180,.17); }
.shield-panel { display:none; border:1px solid rgba(145,167,214,.09); border-radius:20px; padding:16px; background:rgba(10,18,34,.76); }
.shield-panel.active { display:block; }
.shield-panel-head { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; margin-bottom:14px; }
.shield-panel-head h3 { margin:0 0 5px; font-size:17px; }
.shield-panel-head p { margin:0; max-width:760px; color:var(--muted); font-size:10px; line-height:1.55; }
.status-pill.warn { color:#ffd59a; background:rgba(255,181,71,.09); border-color:rgba(255,181,71,.2); }
.risk-list { display:grid; gap:10px; }
.risk-card { display:grid; grid-template-columns:auto minmax(0,1fr); gap:13px; padding:14px; border:1px solid rgba(145,167,214,.09); border-radius:18px; background:rgba(255,255,255,.022); }
.risk-card.critical { border-color:rgba(255,83,103,.24); background:linear-gradient(135deg,rgba(255,83,103,.06),rgba(255,255,255,.018)); }
.risk-card.high { border-color:rgba(255,154,69,.2); }
.risk-card.medium { border-color:rgba(255,181,71,.17); }
.risk-card.safe { opacity:.56; }
.risk-card.blocked { border-color:rgba(0,212,180,.18); background:rgba(0,212,180,.025); }
.risk-icon { width:42px; height:42px; border-radius:14px; display:grid; place-items:center; font-weight:900; background:rgba(255,181,71,.1); color:var(--warning); }
.risk-card.critical .risk-icon { color:#ff8290; background:rgba(255,83,103,.13); }
.risk-card.high .risk-icon { color:#ffab67; background:rgba(255,154,69,.12); }
.risk-top { display:flex; justify-content:space-between; gap:8px; color:#6f7e9b; font-size:9px; }
.risk-level { color:#ffbd75; font-weight:900; letter-spacing:.05em; text-transform:uppercase; }
.risk-card.critical .risk-level { color:#ff8996; }
.risk-main h4 { margin:5px 0 2px; font-size:13px; }
.risk-sender { margin:0 0 8px !important; color:#7d8aa5 !important; font-size:9px !important; }
.risk-main blockquote { margin:0; padding:10px 12px; border-left:2px solid rgba(255,181,71,.6); border-radius:10px; background:rgba(0,0,0,.13); color:#bec9dc; font-size:10px; line-height:1.5; }
.risk-signals { display:flex; flex-wrap:wrap; gap:5px; margin-top:9px; }
.risk-signals span { padding:5px 7px; border:1px solid var(--line); border-radius:999px; color:#8190aa; font-size:8px; }
.risk-actions { display:flex; justify-content:flex-end; align-items:center; gap:6px; margin-top:10px; }
.risk-actions button { border:1px solid var(--line); border-radius:9px; background:rgba(255,255,255,.025); color:#91a0ba; padding:7px 9px; font-size:9px; cursor:pointer; }
.risk-actions button.danger { color:#fff; background:rgba(255,83,103,.14); border-color:rgba(255,83,103,.24); }
.risk-resolved { font-size:9px; font-weight:800; }
.risk-resolved.blocked { color:var(--teal); }
.risk-resolved.safe { color:#8997b0; }
.link-checker { display:grid; gap:9px; }
.link-checker label { color:#b9c5da; font-size:10px; font-weight:800; }
.link-check-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.link-check-row input { min-height:44px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.035); color:var(--text); padding:0 13px; min-width:0; }
.link-result { display:none; margin-top:6px; padding:14px; border:1px solid var(--line); border-radius:17px; grid-template-columns:auto 1fr; gap:13px; align-items:center; }
.link-result.visible { display:grid; }
.link-result.high { border-color:rgba(255,83,103,.24); background:rgba(255,83,103,.045); }
.link-result.medium { border-color:rgba(255,181,71,.22); background:rgba(255,181,71,.035); }
.link-result.low { border-color:rgba(0,212,180,.2); background:rgba(0,212,180,.035); }
.link-result-score { width:72px; height:72px; border-radius:22px; display:grid; place-items:center; align-content:center; background:rgba(255,255,255,.045); }
.link-result-score strong { font-size:24px; }
.link-result-score span { color:var(--muted); font-size:8px; }
.link-result h4 { margin:0 0 4px; }
.link-result p, .link-result small { display:block; margin:0; color:#9ba9c1; font-size:10px; line-height:1.5; }
.link-result small { margin-top:6px; color:#71809a; }
.device-list { display:grid; gap:8px; }
.device-card { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px; align-items:center; padding:12px; border:1px solid rgba(145,167,214,.09); border-radius:16px; background:rgba(255,255,255,.022); }
.device-card.blocked { opacity:.58; }
.device-icon { width:40px; height:40px; border-radius:13px; display:grid; place-items:center; background:rgba(41,98,255,.1); color:#7aa9ff; }
.device-title { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.device-card p { margin:4px 0 0; color:var(--muted); font-size:9px; }
.device-card > button { border:1px solid var(--line); border-radius:9px; background:transparent; color:#8e9cb5; padding:7px 9px; font-size:9px; cursor:pointer; }
.device-management { display:grid; gap:12px; }
.device-management [hidden] { display:none !important; }
.device-management h4 { margin:0; font-size:15px; }
.device-management > p { margin:0; color:var(--muted); font-size:11px; }
.device-management-actions, .device-step-up { display:flex; flex-wrap:wrap; gap:8px; align-items:end; }
.device-management button { border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.025); color:#dce7fa; min-height:38px; padding:8px 10px; cursor:pointer; }
.device-step-up label { display:grid; gap:4px; color:#b9c5da; font-size:10px; font-weight:700; }
.device-step-up input { min-height:38px; max-width:210px; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.035); color:var(--text); padding:0 10px; }
#revokedDeviceRecovery { padding:13px; border:1px solid rgba(255,181,71,.3); border-radius:14px; background:rgba(255,181,71,.06); }
#revokedDeviceRecovery h4, #revokedDeviceRecovery p { margin:0 0 8px; }
#revokedDeviceRecovery p { color:#d5c196; font-size:11px; line-height:1.45; }
.recovery-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.recovery-card { border:1px solid rgba(145,167,214,.09); border-radius:18px; padding:15px; background:rgba(255,255,255,.022); }
.recovery-card.complete { border-color:rgba(0,212,180,.2); background:rgba(0,212,180,.03); }
.recovery-card > span { color:#53627d; font-size:9px; }
.recovery-card h4 { margin:10px 0 6px; }
.recovery-card p { min-height:48px; margin:0 0 12px; color:var(--muted); font-size:9px; line-height:1.5; }
.recovery-output { margin-top:12px; padding:14px; border:1px solid rgba(255,181,71,.22); border-radius:17px; background:rgba(255,181,71,.035); }
.recovery-output strong, .recovery-output code, .recovery-output p { display:block; }
.recovery-output strong { color:#ffd08a; font-size:9px; letter-spacing:.08em; }
.recovery-output code { margin:10px 0; padding:11px; border-radius:10px; background:rgba(0,0,0,.18); color:#ebf4ff; word-break:break-word; }
.recovery-output p { margin:0; color:var(--muted); font-size:9px; line-height:1.5; }
.transparency-table { display:grid; overflow:hidden; border:1px solid rgba(145,167,214,.09); border-radius:16px; }
.transparency-row { display:grid; grid-template-columns:1fr 1.4fr 1.25fr 1.15fr; gap:10px; padding:11px 12px; border-bottom:1px solid rgba(145,167,214,.07); color:#9aa8c0; font-size:9px; line-height:1.45; }
.transparency-row:last-child { border-bottom:0; }
.transparency-row.heading { background:rgba(255,255,255,.035); color:#d3dbea; font-weight:800; }
.transparency-row strong { color:#e7eef9; }
.shield-principle { display:flex; gap:10px; margin-top:12px; padding:12px; border:1px solid rgba(41,98,255,.16); border-radius:15px; background:rgba(41,98,255,.035); }
.shield-principle > span { width:26px; height:26px; flex:0 0 auto; border-radius:9px; display:grid; place-items:center; background:rgba(41,98,255,.15); color:#8db5ff; }
.shield-principle p { margin:0; color:#8f9db5; font-size:9px; line-height:1.55; }
.message-risk { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:9px; align-items:center; margin-bottom:5px; padding:8px; border:1px solid rgba(255,181,71,.19); border-radius:13px; background:rgba(255,181,71,.045); }
.message-risk.critical { border-color:rgba(255,83,103,.24); background:rgba(255,83,103,.055); }
.message-risk > span { width:26px; height:26px; border-radius:9px; display:grid; place-items:center; background:rgba(255,181,71,.13); color:var(--warning); font-weight:900; }
.message-risk strong, .message-risk small { display:block; }
.message-risk strong { color:#ffd092; font-size:9px; }
.message-risk small { margin-top:2px; color:#8e9bb3; font-size:8px; line-height:1.35; }
.message-risk button { border:1px solid var(--line); border-radius:8px; background:rgba(255,255,255,.025); color:#a7b5cc; padding:6px 8px; font-size:8px; cursor:pointer; }
.message.risk-message .message-bubble { border-color:rgba(255,181,71,.17); }

@media (max-width: 1180px) {
  .shield-score-layout { grid-template-columns:repeat(3,1fr); }
  .shield-score-card { grid-column:1/-1; }
}
@media (max-width: 760px) {
  .shield-workbench { padding:14px; border-radius:20px; }
  .shield-workbench-head, .shield-panel-head { display:block; }
  .shield-head-controls { margin-top:12px; overflow-x:auto; }
  .shield-score-layout { grid-template-columns:1fr 1fr; }
  .shield-score-card { grid-column:1/-1; }
  .shield-stat-card:last-child { grid-column:1/-1; }
  .shield-tabs { flex-wrap:nowrap; overflow-x:auto; }
  .shield-tabs button { white-space:nowrap; }
  .recovery-grid { grid-template-columns:1fr; }
  .transparency-table { overflow-x:auto; }
  .transparency-row { min-width:700px; }
  .link-check-row { grid-template-columns:1fr; }
  .risk-actions { justify-content:flex-start; flex-wrap:wrap; }
  .device-card { grid-template-columns:auto 1fr; }
  .device-card > button { grid-column:1/-1; }
  .device-management-actions, .device-step-up { display:grid; grid-template-columns:1fr; }
  .device-step-up input { max-width:none; width:100%; }
}

@media (min-width: 1181px) {
  .app-shell.wide-workspace { grid-template-columns: 88px 330px minmax(0, 1fr); }
  .app-shell.wide-workspace .details-panel { display: none; }
}

/* TARVI v0.6 — Messaging Core */
.messaging-core-workbench {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(0, 212, 180, .16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 0%, rgba(41,98,255,.10), transparent 35%),
    linear-gradient(145deg, rgba(9,18,35,.96), rgba(7,13,26,.93));
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
}
.core-workbench-head { display:flex; align-items:flex-start; justify-content:space-between; gap:22px; }
.core-workbench-head h3 { margin:7px 0 6px; font-size:22px; letter-spacing:-.025em; }
.core-workbench-head p { margin:0; max-width:820px; color:var(--muted); font-size:11px; line-height:1.62; }
.core-head-controls { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.core-backend-pill { min-height:36px; display:inline-flex; align-items:center; gap:8px; padding:0 11px; border:1px solid var(--line); border-radius:999px; background:rgba(255,255,255,.025); color:#a9b7cf; font-size:8px; letter-spacing:.08em; }
.core-backend-pill i { width:8px; height:8px; border-radius:50%; background:var(--warning); box-shadow:0 0 0 5px rgba(255,181,71,.08); }
.core-backend-pill.server { border-color:rgba(0,212,180,.25); color:#d8fff8; background:rgba(0,212,180,.055); }
.core-backend-pill.server i { background:var(--teal); box-shadow:0 0 0 5px rgba(0,212,180,.09),0 0 16px rgba(0,212,180,.55); }
.core-backend-pill.error i { background:var(--danger); }
.core-proof-strip { display:flex; flex-wrap:wrap; gap:7px; margin:16px 0; padding:10px; border:1px solid rgba(145,167,214,.08); border-radius:15px; background:rgba(255,255,255,.018); }
.core-proof-strip span { padding:6px 9px; border:1px solid rgba(0,212,180,.12); border-radius:999px; color:#a7c9c3; background:rgba(0,212,180,.03); font-size:8px; font-weight:750; }
.core-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:9px; }
.core-metrics article { min-height:86px; padding:13px; border:1px solid rgba(145,167,214,.09); border-radius:17px; background:rgba(255,255,255,.022); }
.core-metrics span,.core-metrics small { display:block; color:var(--muted); font-size:8px; }
.core-metrics strong { display:block; margin:8px 0 4px; font-size:21px; }
.contacts-direct-panel { margin:14px 0; padding:14px; border:1px solid rgba(145,167,214,.12); border-radius:16px; background:rgba(255,255,255,.02); max-width:100%; overflow-x:hidden; }
.contacts-direct-form { display:flex; flex-wrap:wrap; gap:8px; align-items:flex-end; margin-bottom:8px; }
.contacts-direct-form label { font-size:11px; color:var(--muted); }
.contacts-direct-form input { min-height:44px; flex:1 1 160px; max-width:100%; }
.contacts-direct-form button { min-height:44px; }
.contacts-direct-status { font-size:12px; margin:6px 0; }
.contacts-direct-status.notFound,.contacts-direct-status.unavailable { color:var(--muted); }
.contacts-direct-status.rateLimited { color:#f5b84d; }
.contacts-direct-status.retryable { color:#8ec5ff; }
.contacts-direct-result { margin:8px 0; padding:10px; border-radius:12px; background:rgba(255,255,255,.03); }
.contacts-direct-list { list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.contacts-direct-list li { display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:space-between; padding:10px; border-radius:12px; background:rgba(255,255,255,.03); }
.contacts-direct-list button { min-height:44px; }
.contacts-direct-list button:focus-visible,.contacts-direct-form button:focus-visible,.contacts-direct-form input:focus-visible { outline:2px solid #7eb6ff; outline-offset:2px; }
.contacts-direct-actions { display:flex; flex-wrap:wrap; gap:8px; }
.trust-safety-panel { margin:14px 0; padding:14px; border:1px solid rgba(145,167,214,.12); border-radius:16px; background:rgba(255,255,255,.02); max-width:100%; overflow-x:hidden; }
.trust-safety-banner { margin:0 0 12px; padding:10px 12px; border-radius:12px; background:rgba(245,184,77,.12); color:#f5d39a; font-size:12px; }
.trust-safety-grid { display:grid; gap:14px; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }
.trust-safety-grid h4 { margin:0 0 8px; font-size:12px; }
.trust-safety-notice,.trust-safety-report { padding:10px; border-radius:12px; background:rgba(255,255,255,.03); margin-bottom:8px; font-size:12px; }
.trust-safety-empty { color:var(--muted); font-size:12px; }
.trust-safety-appeal-form,.trust-safety-report-form { display:grid; gap:8px; }
.trust-safety-appeal-form[hidden],.trust-safety-dialog[hidden],.trust-safety-panel[hidden],.trust-safety-banner[hidden] { display:none !important; }
.trust-safety-appeal-form textarea,.trust-safety-report-form textarea,.trust-safety-report-form select { width:100%; min-height:44px; max-width:100%; }
.trust-safety-check { display:flex; gap:8px; align-items:center; font-size:12px; }
.trust-safety-dialog { margin-top:12px; padding:12px; border:1px solid rgba(145,167,214,.16); border-radius:14px; background:rgba(8,16,31,.92); }
.trust-safety-dialog-actions { display:flex; flex-wrap:wrap; gap:8px; }
.trust-safety-dialog-actions button,.trust-safety-appeal-form button,.trust-safety-report-form button { min-height:44px; }
.trust-safety-report-message { margin-top:8px; min-height:44px; }
.trust-safety-status { min-height:1.2em; font-size:12px; color:#9ebcff; }
.trust-safety-panel button:focus-visible,.trust-safety-panel input:focus-visible,.trust-safety-panel select:focus-visible,.trust-safety-panel textarea:focus-visible { outline:2px solid #7eb6ff; outline-offset:2px; }
.data-rights-copy { margin:0 0 12px; color:var(--muted); font-size:12px; line-height:1.45; }
.data-rights-step-up { margin-bottom:10px; }
.data-rights-status { min-height:1.2em; margin:0 0 10px; font-size:12px; color:#9ebcff; }
.data-rights-empty { color:var(--muted); font-size:12px; }
.data-rights-list { display:grid; gap:8px; }
.data-rights-job { padding:10px; border-radius:12px; background:rgba(255,255,255,.03); font-size:12px; }
.data-rights-job header { display:flex; gap:8px; align-items:center; justify-content:space-between; margin-bottom:6px; }
.data-rights-job code { font-size:10px; color:var(--muted); }
.data-rights-job button { margin-top:8px; min-height:44px; }
#dataRightsPanel button:focus-visible,#dataRightsPanel input:focus-visible { outline:2px solid #7eb6ff; outline-offset:2px; }
#dataRightsPanel[hidden] { display:none !important; }
@media (max-width:430px) {
  .trust-safety-panel,.trust-safety-dialog { padding:12px; }
  .trust-safety-dialog-actions { flex-direction:column; }
  .trust-safety-dialog-actions button { width:100%; }
}
.core-account-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:12px 0; }
.core-account-card { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px; align-items:center; padding:13px; border:1px solid rgba(145,167,214,.09); border-radius:18px; background:rgba(255,255,255,.022); }
.core-account-avatar { width:44px; height:44px; display:grid; place-items:center; border-radius:15px; background:var(--gradient); font-weight:900; }
.core-account-card.maria .core-account-avatar { background:linear-gradient(135deg,#2962ff,#8b5cf6); }
.core-account-card h4 { margin:0; font-size:13px; }
.core-account-card p { margin:4px 0 0; color:var(--muted); font-size:8px; }
.core-account-meta { display:flex; gap:6px; margin-top:7px; flex-wrap:wrap; }
.core-account-meta span { padding:4px 6px; border-radius:999px; background:rgba(255,255,255,.04); color:#8897b1; font-size:7px; }
.core-network-button { min-width:92px; border:1px solid rgba(0,212,180,.2); border-radius:12px; background:rgba(0,212,180,.07); color:#d7fff8; padding:9px 10px; cursor:pointer; font-size:8px; font-weight:850; }
.core-network-button.offline { border-color:rgba(255,83,103,.2); background:rgba(255,83,103,.07); color:#ffc0c8; }
.core-main-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(270px,.75fr); gap:12px; }
.core-conversation-panel,.core-side-card,.core-protocol-card { border:1px solid rgba(145,167,214,.09); border-radius:20px; background:rgba(7,14,27,.76); }
.core-conversation-panel { padding:15px; }
.core-conversation-panel .section-head p { margin:4px 0 0; color:var(--muted); font-size:8px; }
.core-message-list { height:360px; overflow:auto; display:flex; flex-direction:column; gap:9px; padding:12px 4px 12px 0; border-top:1px solid rgba(145,167,214,.07); border-bottom:1px solid rgba(145,167,214,.07); }
.core-message { display:flex; gap:8px; align-items:flex-end; max-width:86%; }
.core-message.mine { align-self:flex-end; flex-direction:row-reverse; }
.core-message-avatar { width:26px; height:26px; flex:0 0 auto; display:grid; place-items:center; border-radius:9px; background:rgba(41,98,255,.13); color:#9ebcff; font-size:8px; font-weight:900; }
.core-message.mine .core-message-avatar { background:rgba(0,212,180,.12); color:#9bffef; }
.core-message-bubble { min-width:170px; padding:10px 11px 8px; border:1px solid rgba(145,167,214,.10); border-radius:15px 15px 15px 5px; background:rgba(255,255,255,.035); }
.core-message.mine .core-message-bubble { border-radius:15px 15px 5px 15px; border-color:rgba(0,212,180,.15); background:linear-gradient(135deg,rgba(0,212,180,.09),rgba(41,98,255,.06)); }
.core-message-bubble p { margin:0; white-space:pre-wrap; color:#e7edf7; font-size:10px; line-height:1.52; }
.core-message-footer { display:flex; justify-content:space-between; gap:10px; align-items:center; margin-top:7px; color:#66758f; font-size:7px; }
.core-state { display:inline-flex; align-items:center; gap:4px; font-weight:900; text-transform:uppercase; letter-spacing:.04em; }
.core-state.queued { color:#ffcb78; }
.core-state.sent { color:#83a9ff; }
.core-state.delivered { color:#94c6ff; }
.core-state.read { color:#64ecd7; }
.core-envelope { margin-top:7px; padding-top:7px; border-top:1px dashed rgba(145,167,214,.09); color:#5e6c85; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:6px; line-height:1.5; word-break:break-all; }
.core-composer { padding-top:12px; }
.core-composer label { color:#91a0ba; font-size:8px; font-weight:800; }
.core-composer select { margin-left:7px; min-height:30px; border:1px solid var(--line); border-radius:9px; background:#0e1930; color:#e7eef8; padding:0 8px; }
.core-compose-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; margin-top:8px; }
.core-compose-row textarea { resize:vertical; min-height:58px; max-height:120px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.035); color:var(--text); padding:11px; }
.core-compose-actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.core-compose-actions button { border:1px solid var(--line); border-radius:9px; background:rgba(255,255,255,.025); color:#91a0b9; padding:7px 9px; font-size:8px; cursor:pointer; }
.core-toggle { display:inline-flex; align-items:center; gap:6px; margin-left:auto; padding:5px 8px; border:1px solid var(--line); border-radius:9px; }
.core-toggle input { accent-color:var(--teal); }
.core-side-panel { display:grid; gap:12px; align-content:start; }
.core-side-card { padding:13px; }
.core-side-card .section-head { margin-bottom:9px; }
.core-side-card .section-head > span { display:grid; place-items:center; min-width:25px; height:25px; border-radius:9px; background:rgba(255,181,71,.09); color:#ffd08b; font-size:9px; font-weight:900; }
.core-side-card .section-head button { border:0; background:transparent; color:#71809a; font-size:8px; cursor:pointer; }
.core-outbox-item { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; padding:9px; border:1px solid rgba(255,181,71,.12); border-radius:12px; background:rgba(255,181,71,.03); margin-bottom:7px; }
.core-outbox-item p { margin:0; color:#a6b2c6; font-size:8px; line-height:1.4; }
.core-outbox-item span { color:#ffcd81; font-size:7px; }
.core-empty { padding:13px; border:1px dashed rgba(145,167,214,.10); border-radius:12px; color:#687792; text-align:center; font-size:8px; }
.core-event-log { max-height:250px; overflow:auto; display:grid; gap:6px; }
.core-log-item { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px; padding:7px 0; border-bottom:1px solid rgba(145,167,214,.06); }
.core-log-item:last-child { border-bottom:0; }
.core-log-time { color:#52617b; font-family:ui-monospace,monospace; font-size:7px; }
.core-log-item p { margin:0; color:#8897b0; font-size:8px; line-height:1.4; }
.core-log-item strong { color:#d7e0ef; }
.core-protocol-card { display:flex; justify-content:space-between; align-items:center; gap:18px; margin-top:12px; padding:15px; }
.core-protocol-card h3 { margin:5px 0; font-size:16px; }
.core-protocol-card p { margin:0; max-width:740px; color:var(--muted); font-size:9px; line-height:1.6; }
.core-protocol-card code { color:#b7fff2; }
.core-protocol-flow { display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.core-protocol-flow span { padding:7px 9px; border:1px solid rgba(0,212,180,.15); border-radius:10px; background:rgba(0,212,180,.035); color:#bcfff3; font-size:8px; font-weight:850; }
.core-protocol-flow b { color:#53627b; }
.core-honesty-note { margin-top:11px; padding:12px 14px; border:1px solid rgba(255,181,71,.16); border-radius:15px; background:rgba(255,181,71,.035); color:#8795ad; font-size:8px; line-height:1.6; }
.core-honesty-note strong { color:#ffd18c; }

@media (max-width: 1180px) {
  .core-main-grid { grid-template-columns:1fr; }
  .core-side-panel { grid-template-columns:1fr 1fr; }
}
@media (max-width: 760px) {
  .messaging-core-workbench { padding:13px; border-radius:20px; }
  .core-workbench-head,.core-protocol-card { display:block; }
  .core-head-controls { margin-top:12px; justify-content:flex-start; }
  .core-metrics { grid-template-columns:1fr 1fr; }
  .core-account-grid,.core-side-panel { grid-template-columns:1fr; }
  .core-account-card { grid-template-columns:auto minmax(0,1fr); }
  .core-network-button { grid-column:1/-1; }
  .core-message-list { height:330px; }
  .core-compose-row { grid-template-columns:1fr; }
  .core-toggle { margin-left:0; }
  .core-protocol-flow { justify-content:flex-start; margin-top:12px; }
}

/* TARVI v0.7 · Identity & Sessions */
.identity-workbench {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(90, 229, 201, .17);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 0%, rgba(49, 224, 180, .13), transparent 28%),
    linear-gradient(145deg, rgba(13, 20, 34, .98), rgba(8, 12, 23, .96));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .22);
}
.identity-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.identity-head h3 { margin: 6px 0 8px; font-size: clamp(22px, 3vw, 34px); letter-spacing: -.035em; }
.identity-head p { max-width: 820px; margin: 0; color: var(--muted); line-height: 1.65; }
.identity-head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; min-width: 300px; }
.identity-backend-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); font-size: 11px; letter-spacing: .08em; }
.identity-backend-pill i { width: 8px; height: 8px; border-radius: 50%; background: #ffba5b; box-shadow: 0 0 16px rgba(255,186,91,.6); }
.identity-backend-pill.server i { background: #38e6b0; box-shadow: 0 0 16px rgba(56,230,176,.75); }
.identity-backend-pill.error i { background: #ff6b7d; box-shadow: 0 0 16px rgba(255,107,125,.65); }
.identity-proof-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.identity-proof-strip span { padding: 7px 10px; border-radius: 10px; background: rgba(89, 229, 202, .07); border: 1px solid rgba(89, 229, 202, .12); color: #c8fff2; font-size: 12px; }
.identity-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.identity-metrics article { padding: 15px; border-radius: 17px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.035); }
.identity-metrics span, .identity-metrics small { display: block; color: var(--muted); }
.identity-metrics strong { display: block; margin: 7px 0 3px; font-size: 25px; }
.identity-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(300px, 1fr); gap: 14px; align-items: start; }
.identity-auth-card, .identity-accounts-card, .identity-sessions-card, .identity-audit-card { padding: 18px; border-radius: 20px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.035); min-width: 0; }
.identity-auth-card { grid-row: span 2; }
.identity-auth-card label { display: grid; gap: 7px; margin: 12px 0; color: #d9e4ef; font-size: 12px; }
.identity-auth-card input { width: 100%; border-radius: 12px; border: 1px solid rgba(255,255,255,.11); background: rgba(5,10,20,.72); color: #fff; padding: 12px 13px; outline: none; }
.identity-auth-card input:focus { border-color: rgba(71, 226, 190, .58); box-shadow: 0 0 0 3px rgba(71, 226, 190, .08); }
.identity-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 14px 0 8px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.25); }
.identity-tabs button { padding: 9px; border-radius: 9px; color: var(--muted); }
.identity-tabs button.active { color: #fff; background: linear-gradient(135deg, rgba(53,222,180,.22), rgba(94,109,246,.2)); }
.identity-demo-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.identity-demo-buttons button { padding: 10px; border-radius: 11px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.04); }
.identity-auth-result { margin-top: 13px; padding: 11px 12px; border-radius: 12px; color: var(--muted); background: rgba(0,0,0,.2); line-height: 1.5; font-size: 12px; }
.identity-auth-result.good { color: #caffed; border: 1px solid rgba(53,226,177,.18); }
.identity-auth-result.bad { color: #ffb8c0; border: 1px solid rgba(255,107,125,.18); }
.identity-account-list, .identity-session-list, .identity-audit-list { display: grid; gap: 9px; margin-top: 12px; max-height: 330px; overflow: auto; }
.identity-account-item, .identity-session-item, .identity-audit-item { display: grid; gap: 9px; padding: 12px; border-radius: 14px; background: rgba(4,9,18,.55); border: 1px solid rgba(255,255,255,.065); }
.identity-account-item { grid-template-columns: auto 1fr auto; align-items: center; cursor: pointer; }
.identity-account-item.active { border-color: rgba(57,225,180,.42); background: rgba(57,225,180,.07); }
.identity-account-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: #06100e; font-weight: 800; background: linear-gradient(135deg, #5df0c5, #73a2ff); }
.identity-account-item p, .identity-session-item p, .identity-audit-item p { margin: 2px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.identity-account-actions, .identity-session-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.identity-account-actions button, .identity-session-actions button { padding: 7px 9px; border-radius: 9px; font-size: 11px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); }
.identity-session-item { grid-template-columns: 1fr auto; align-items: center; }
.identity-session-item.current { border-color: rgba(57,225,180,.3); }
.identity-session-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.identity-session-meta span { padding: 5px 7px; border-radius: 7px; font-size: 10px; background: rgba(255,255,255,.05); color: #cbd8e6; }
.identity-audit-item { grid-template-columns: auto 1fr; }
.identity-audit-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(86,226,190,.1); color: #66e7c2; }
.identity-honesty-note { padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(111, 143, 255, .18); background: rgba(85, 101, 210, .07); color: #b9c6d7; line-height: 1.65; font-size: 12px; }
.identity-honesty-note strong { color: #fff; }

@media (max-width: 980px) {
  .identity-head { flex-direction: column; }
  .identity-head-actions { min-width: 0; justify-content: flex-start; }
  .identity-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .identity-layout { grid-template-columns: 1fr; }
  .identity-auth-card { grid-row: auto; }
}
@media (max-width: 560px) {
  .identity-workbench { padding: 13px; border-radius: 18px; }
  .identity-metrics { grid-template-columns: 1fr 1fr; }
  .identity-head-actions > * { flex: 1 1 auto; }
  .identity-account-item, .identity-session-item { grid-template-columns: auto 1fr; }
  .identity-account-actions, .identity-session-actions { grid-column: 1 / -1; }
}

/* TARVI v0.8 Groups & Media */
.groups-media-workbench {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(112, 240, 220, .16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 82% 0%, rgba(78, 123, 255, .14), transparent 34%),
    linear-gradient(145deg, rgba(11, 19, 33, .98), rgba(7, 12, 23, .98));
  box-shadow: 0 30px 70px rgba(0, 0, 0, .26);
}
.gm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.gm-head h3 { margin: 7px 0 8px; font-size: clamp(24px, 3vw, 38px); letter-spacing: -.04em; }
.gm-head p { max-width: 780px; margin: 0; color: var(--muted); line-height: 1.62; }
.gm-head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.gm-backend-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); font-size: 11px; letter-spacing: .08em; white-space: nowrap; }
.gm-backend-pill i { width: 8px; height: 8px; border-radius: 50%; background: #f3a54a; box-shadow: 0 0 16px currentColor; }
.gm-backend-pill.server { color: #72f3c8; border-color: rgba(114,243,200,.28); background: rgba(38,160,125,.11); }
.gm-backend-pill.server i { background: #72f3c8; }
.gm-proof-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.gm-proof-strip span { padding: 7px 10px; border: 1px solid rgba(112,240,220,.13); border-radius: 999px; color: #b9ddd8; background: rgba(38, 145, 132, .07); font-size: 12px; }
.gm-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.gm-metrics article { padding: 15px; border-radius: 17px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); }
.gm-metrics span, .gm-metrics small { display: block; color: var(--muted); }
.gm-metrics strong { display: block; margin: 5px 0 3px; font-size: 26px; }
.gm-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 14px; }
.gm-card { min-width: 0; padding: 17px; border: 1px solid rgba(255,255,255,.07); border-radius: 19px; background: rgba(255,255,255,.028); }
.gm-create-row { display: grid; grid-template-columns: 1.1fr 1fr auto; gap: 9px; margin-bottom: 13px; }
.gm-create-row input, .gm-compose textarea, .gm-media-card input[type="file"] { width: 100%; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(1,7,15,.62); color: var(--text); padding: 11px 12px; }
.gm-group-list, .gm-member-list, .gm-message-list { display: grid; gap: 8px; max-height: 370px; overflow: auto; }
.gm-group-row { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 1px solid transparent; border-radius: 13px; background: rgba(255,255,255,.025); color: inherit; text-align: left; }
.gm-group-row > span, .gm-member-row > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; font-weight: 800; color: #071414; background: linear-gradient(135deg, #75f2ce, #6ca4ff); }
.gm-group-row strong, .gm-member-row strong { display: block; }
.gm-group-row small, .gm-member-row small { color: var(--muted); }
.gm-group-row em { font-style: normal; color: var(--muted); }
.gm-group-row.active { border-color: rgba(112,240,220,.38); background: rgba(73,183,162,.09); }
.gm-member-row { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 10px; border-radius: 13px; background: rgba(255,255,255,.025); }
.gm-member-row em { padding: 5px 8px; border-radius: 999px; background: rgba(116,137,255,.12); color: #bdc7ff; font-size: 11px; font-style: normal; }
.gm-invite-output { margin-top: 10px; padding: 11px; border-radius: 12px; word-break: break-all; color: #bde8df; background: rgba(36,156,128,.08); border: 1px dashed rgba(112,240,220,.2); font-size: 12px; }
.gm-progress { height: 8px; margin: 12px 0; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.06); }
.gm-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #61e8bd, #6d9fff, #9d70ff); transition: width .25s ease; }
.gm-upload-result { min-height: 58px; padding: 11px; border-radius: 12px; color: var(--muted); background: rgba(255,255,255,.025); line-height: 1.45; }
.gm-media-card input[type="file"] { margin: 3px 0 10px; }
.gm-message-list { min-height: 210px; max-height: 390px; padding-right: 4px; }
.gm-message { max-width: 88%; padding: 11px 12px; border-radius: 15px 15px 15px 5px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.055); }
.gm-message.me { margin-left: auto; border-radius: 15px 15px 5px 15px; background: linear-gradient(145deg, rgba(43,166,139,.17), rgba(62,111,206,.12)); border-color: rgba(100,220,195,.15); }
.gm-message > div { display: flex; justify-content: space-between; gap: 10px; }
.gm-message small, .gm-message footer { color: var(--muted); }
.gm-message p { margin: 7px 0; white-space: pre-wrap; }
.gm-message footer { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 10px; }
.gm-attachment { display: block; margin: 8px 0; padding: 8px; border-radius: 9px; color: #bde9df; background: rgba(71,170,148,.1); font-size: 11px; }
.gm-compose { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-top: 12px; align-items: end; }
.gm-honesty-note { margin-top: 14px; padding: 13px 15px; border-radius: 15px; color: #aeb8ca; background: rgba(245,181,70,.055); border: 1px solid rgba(245,181,70,.12); line-height: 1.55; font-size: 12px; }
@media (max-width: 980px) {
  .gm-head { flex-direction: column; }
  .gm-head-actions { justify-content: flex-start; }
  .gm-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gm-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .groups-media-workbench { padding: 13px; border-radius: 18px; }
  .gm-metrics { grid-template-columns: 1fr 1fr; }
  .gm-create-row { grid-template-columns: 1fr; }
  .gm-compose { grid-template-columns: 1fr; }
}

/* TARVI v0.10 — Sync, Push & Abuse Controls */
.sync-push-workbench { margin-top: 18px; display: grid; gap: 16px; }
.sync-push-workbench.hidden-service { display: none; }
.sp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px; border: 1px solid rgba(85,200,255,.18); border-radius: 24px; background: linear-gradient(145deg, rgba(15,26,43,.96), rgba(8,13,23,.96)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.sp-head h3 { margin: 5px 0 7px; font-size: clamp(22px,3vw,34px); }
.sp-head p { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.55; }
.sp-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.sp-backend-pill { display:inline-flex; align-items:center; gap:8px; padding:9px 12px; border-radius:999px; background:rgba(255,255,255,.06); color:var(--muted); font-size:11px; letter-spacing:.06em; }
.sp-backend-pill i { width:8px; height:8px; border-radius:50%; background:#778196; box-shadow:0 0 12px currentColor; }
.sp-backend-pill.server { color:#22e6a8; background:rgba(34,230,168,.1); }
.sp-backend-pill.server i { background:#22e6a8; }
.sp-backend-pill.error { color:#ff7f8e; background:rgba(255,90,110,.1); }
.sp-backend-pill.error i { background:#ff5a6e; }
.sp-proof-strip { display:flex; flex-wrap:wrap; gap:8px; }
.sp-proof-strip span { padding:8px 11px; border-radius:999px; border:1px solid rgba(34,230,168,.17); background:rgba(34,230,168,.06); color:#bfffe9; font-size:12px; }
.sp-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.sp-metrics article { padding:16px; border-radius:18px; background:rgba(12,20,34,.85); border:1px solid rgba(255,255,255,.07); }
.sp-metrics span,.sp-metrics small { display:block; color:var(--muted); }
.sp-metrics strong { display:block; margin:6px 0 2px; font-size:26px; }
.sp-layout { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.sp-card { min-width:0; padding:18px; border-radius:22px; border:1px solid rgba(255,255,255,.075); background:rgba(9,16,28,.9); }
.sp-card .section-head { margin-bottom:14px; }
.sp-card .section-head p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.sp-card .section-head > span { padding:6px 9px; border-radius:10px; background:rgba(255,255,255,.06); color:var(--muted); font-size:12px; }
.sp-cursor { display:flex; align-items:baseline; gap:10px; padding:18px; border-radius:17px; background:linear-gradient(135deg,rgba(34,230,168,.1),rgba(85,200,255,.08)); }
.sp-cursor small { color:#8fa4b9; letter-spacing:.13em; }
.sp-cursor strong { font-size:36px; }
.sp-actions { display:flex; gap:10px; margin-top:12px; }
.sp-actions button { flex:1; }
.sp-status { min-height:42px; color:var(--muted); line-height:1.45; }
.sp-event-list,.sp-push-list,.sp-abuse-list { display:grid; gap:9px; max-height:300px; overflow:auto; }
.sp-event,.sp-push,.sp-abuse { padding:12px 13px; border-radius:15px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.055); }
.sp-event header,.sp-push header,.sp-abuse header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:5px; }
.sp-event code,.sp-push code { color:#80e9ff; font-size:11px; }
.sp-event p,.sp-push p,.sp-abuse p { margin:0; color:var(--muted); font-size:12px; line-height:1.45; overflow-wrap:anywhere; }
.sp-push.safe { border-color:rgba(34,230,168,.16); }
.sp-abuse { border-color:rgba(255,127,142,.18); }
.danger-soft { color:#ff9ba7 !important; border-color:rgba(255,90,110,.25) !important; background:rgba(255,90,110,.08) !important; }
@media (max-width: 920px) { .sp-head { flex-direction:column; } .sp-head-actions { justify-content:flex-start; } .sp-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .sp-layout { grid-template-columns:1fr; } }
@media (max-width: 560px) { .sp-metrics { grid-template-columns:1fr 1fr; } .sp-head,.sp-card { padding:15px; border-radius:18px; } .sp-actions { flex-direction:column; } }

/* Real Chats V1 — temporary functional shell; not claimed as Figma V2.1 */
.chats-real-host {
  overflow-x: hidden;
}
.chats-real-host[hidden] {
  display: none !important;
}
/* Inbox host replaces listContent only while the Chats view is active. */
body.chats-real-v1.chats-real-active-inbox #listContent {
  display: none !important;
}
body.chats-real-v1.chats-real-active-inbox #chatsRealHost {
  display: block;
}
body.chats-real-v1:not(.chats-real-active-inbox) #chatsRealHost {
  display: none !important;
}
body.chats-real-v1 #storiesStrip,
body.chats-real-v1 #demoSceneBar,
body.chats-real-v1 #promoFinale,
body.chats-real-v1.chats-real-active-inbox #connectionStrip,
body.chats-real-v1.chats-real-active-inbox .composer-hints,
body.chats-real-v1.chats-real-active-inbox .composer-tool,
body.chats-real-v1.chats-real-active-inbox .header-actions [data-action="start-audio"],
body.chats-real-v1.chats-real-active-inbox .header-actions [data-action="start-video"],
body.chats-real-v1.chats-real-active-inbox .header-actions [data-action="ai-summary"],
body.chats-real-v1.chats-real-active-inbox .message-action-row,
body.chats-real-v1.chats-real-active-inbox .typing-indicator {
  display: none !important;
}
body.chats-real-v1.chats-real-active-inbox .composer {
  grid-template-columns: minmax(0, 1fr) auto;
}
.chats-real-shell-notice {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 196, 72, 0.08);
  color: var(--muted, #b7b3c7);
  font-size: 0.86rem;
  line-height: 1.35;
}
.chats-real-shell-notice strong {
  color: var(--text, #f4f1ff);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.rail-item[data-shell-kind="demo"] .rail-label::after,
.mobile-nav [data-shell-kind="demo"]::after {
  content: ' · демо';
  opacity: 0.72;
  font-size: 0.72em;
}
.rail-item[data-shell-kind="tech"] .rail-label::after,
.mobile-nav [data-shell-kind="tech"]::after {
  content: ' · техника';
  opacity: 0.72;
  font-size: 0.72em;
}
.chats-real-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}
.chats-real-session strong,
.chats-real-session span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chats-real-session strong {
  display: block;
  font-size: 13px;
}
.chats-real-session span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.chats-real-login,
.chats-real-contact,
.chats-real-state {
  display: grid;
  gap: 10px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}
.chats-real-login label,
.chats-real-contact label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #a7b4cc;
  min-width: 0;
}
.chats-real-login input,
.chats-real-contact input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  color: #eef3ff;
  padding: 11px 12px;
}
.chats-real-login button,
.chats-real-contact button,
.chats-real-session button,
.chats-real-state button {
  border: 0;
  border-radius: 12px;
  min-height: 40px;
  padding: 0 14px;
  background: linear-gradient(135deg, rgba(0, 212, 180, 0.22), rgba(41, 98, 255, 0.22));
  color: #f4ffff;
  font-weight: 800;
  cursor: pointer;
}
.chats-real-session button,
.chats-real-contact .secondary,
.chats-real-state .secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}
.chats-real-state {
  color: var(--muted);
  line-height: 1.45;
}
.chats-real-state.error {
  border-color: rgba(255, 127, 142, 0.28);
  color: #ffb7c0;
}
.chats-real-details .details-top h3 {
  margin: 0;
}
.chats-real-details .details-top p {
  margin: 6px 0 0;
  color: var(--muted);
}
.chats-real-details .details-section,
.chats-real-details .details-actions,
.chats-real-details .trust-box {
  display: none !important;
}

