:root {
  --bg: #07080b;
  --panel: #101116;
  --panel-2: #171922;
  --line: rgba(255,255,255,.09);
  --text: #f7f7fb;
  --muted: #8c92a3;
  --red: #e02232;
  --red-2: #ff4051;
  --red-soft: rgba(224,34,50,.16);
  --green: #32d583;
  --yellow: #f5c044;
  --topbar-height: 76px;
  --panel-title-height: 48px;
  --control-height: 34px;
}
* { box-sizing: border-box; }
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.22) rgba(0,0,0,.18);
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: rgba(0,0,0,.18);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(224,34,50,.38));
  border: 2px solid rgba(0,0,0,.18);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,64,81,.55));
}
*::-webkit-scrollbar-corner { background: transparent; }
html, body { height: 100%; }
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.ui-icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}
button, input, textarea, select { font: inherit; }
button {
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: white;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}
button:hover { background: var(--red-2); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.ghost {
  background: #1a1d27;
  color: var(--text);
  border: 1px solid var(--line);
}
button.ghost:hover { border-color: rgba(255,255,255,.2); background: #222633; }
button.danger { background: #68141c; }
button.small { padding: 8px 10px; font-size: 12px; }
button.mini { padding: 5px 8px; font-size: 11px; }
button.full { width: 100%; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #0b0c11;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.muted { color: var(--muted); }
.eyebrow {
  color: var(--red-2);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 25% 20%, rgba(224,34,50,.20), transparent 34%),
    linear-gradient(150deg, #07080b 0%, #11131a 56%, #22070b 100%);
}
.login-shell { width: min(440px, calc(100vw - 32px)); }
.login-panel {
  border: 1px solid var(--line);
  background: rgba(16,17,22,.92);
  padding: 34px;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
  text-align: center;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red), #7d111a);
  color: white;
  font-weight: 1000;
}
.brand-logo {
  width: 46px;
  height: 46px;
  display: block;
  flex: 0 0 46px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(224,34,50,.32));
}
.login-logo {
  width: 104px;
  height: 104px;
  margin: 0 auto 10px;
}
.login-panel h1 { margin: 10px 0 8px; font-size: 32px; }
.login-form { display: grid; gap: 14px; margin-top: 24px; }
.login-form label, .profile-form label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.login-form button { margin-top: 6px; }
.alert {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 16px;
}
.alert.danger { border-color: rgba(224,34,50,.45); background: var(--red-soft); color: #ffdbe0; }
.app-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 330px 1fr;
  overflow: hidden;
}
.accounts-rail {
  border-right: 1px solid var(--line);
  background: #0b0c11;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.rail-head {
  height: var(--topbar-height);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #0d0f15;
}
.brand-row { min-width: 0; display: flex; align-items: center; gap: 12px; }
.brand-row b { display: block; line-height: 1.05; letter-spacing: .04em; }
.brand-row span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.logout {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
.logout:hover { color: #fff; border-color: var(--line); background: rgba(255,255,255,.045); }
.limit-card {
  margin: 14px;
  padding: 12px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.limit-card span { display: block; color: var(--muted); font-size: 11px; }
.limit-card b { font-size: 20px; }
.rail-actions { padding: 0 14px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.search-box { padding: 0 14px 12px; }
.new-replies-section {
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--line);
}
.new-replies-section.hidden { display: none; }
.rail-section-title {
  padding: 0 8px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.rail-section-title b { color: var(--text); font-size: 13px; }
.rail-section-title #new-replies-count {
  min-width: 20px;
  height: 20px;
  padding: 1px 6px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 19px;
}
.reply-list {
  max-height: 238px;
  overflow: auto;
}
.reply-row {
  background: rgba(224,34,50,.07);
  border-color: rgba(224,34,50,.22);
}
.dialog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.045);
}
.segmented {
  min-height: var(--control-height);
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.04);
}
.segmented button {
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  font-size: 12px;
}
.segmented button.active { background: var(--red); color: #fff; }
.dialog-tools { display: inline-flex; gap: 6px; }
.icon-button {
  width: var(--control-height);
  height: var(--control-height);
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
}
.icon-button .ui-icon { width: 16px; height: 16px; }
.account-list, .dialog-list {
  overflow: auto;
  min-height: 0;
  padding: 8px;
}
.account-row, .dialog-row {
  width: 100%;
  display: grid;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  padding: 9px;
  border-radius: 10px;
  color: var(--text);
  margin-bottom: 4px;
}
.account-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
.dialog-row { grid-template-columns: 44px minmax(0, 1fr) auto auto; }
.account-row:hover, .dialog-row:hover { background: #141720; }
.account-row.active, .dialog-row.active {
  background: linear-gradient(90deg, var(--red-soft), rgba(255,255,255,.03));
  border-color: rgba(224,34,50,.42);
}
.account-row.restricted {
  background: rgba(247, 188, 45, .10);
  border-color: rgba(247, 188, 45, .26);
}
.account-row.restricted:hover { background: rgba(247, 188, 45, .16); }
.account-row.restricted.active {
  background: linear-gradient(90deg, rgba(247, 188, 45, .22), rgba(255,255,255,.03));
  border-color: rgba(247, 188, 45, .48);
}
.account-row span, .dialog-row span { min-width: 0; }
.account-row b, .dialog-row b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-row small, .dialog-row small {
  display: block;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}
.dialog-tags {
  display: block;
  color: #ff9aa8;
  font-size: 11px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}
.dialog-status {
  font-style: normal;
  color: #ffccd3;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 3px 6px;
  font-size: 10px;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-row em { font-style: normal; color: var(--muted); font-size: 11px; }
.account-row.restricted em { color: #ffd879; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #252a36;
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  overflow: hidden;
  position: relative;
}
.avatar span { position: relative; z-index: 0; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; }
.avatar.lg { width: 48px; height: 48px; }
.avatar.xl { width: 82px; height: 82px; margin: 0 auto 12px; border: 3px solid rgba(224,34,50,.38); }
.workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(680px, 1fr) 340px;
}
.chat-zone {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.thread-head {
  height: var(--topbar-height);
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #0d0f15;
}
.thread-head h1 { margin: 0; font-size: 20px; }
.thread-head span { color: var(--muted); font-size: 13px; }
.thread-actions { display: flex; align-items: center; gap: 8px; }
.pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.pill.off { background: #272a33; color: var(--muted); }
.pill.on { background: rgba(50,213,131,.16); color: var(--green); }
.pill.wait { background: rgba(245,192,68,.16); color: var(--yellow); }
.chat-layout {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 310px 1fr;
}
.dialog-panel {
  min-height: 0;
  border-right: 1px solid var(--line);
  background: #101116;
  display: flex;
  flex-direction: column;
}
.panel-title {
  min-height: var(--panel-title-height);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.panel-title span { color: var(--muted); font-size: 12px; }
.unread {
  min-width: 22px;
  height: 22px;
  padding: 1px 7px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 21px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.messages-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(11,12,17,.94), rgba(11,12,17,.94)),
    repeating-linear-gradient(135deg, rgba(224,34,50,.08), rgba(224,34,50,.08) 1px, transparent 1px, transparent 18px);
}
.messages {
  flex: 1;
  overflow: auto;
  padding: 18px 22px;
  min-height: 0;
}
.virtual-spacer {
  flex: 0 0 auto;
  min-height: 0;
}
.msg { display: flex; margin: 7px 0; align-items: flex-end; gap: 8px; }
.msg.out { justify-content: flex-end; }
.msg.has-avatar { justify-content: flex-start; }
.msg .bubble { cursor: default; }
.msg .bubble:hover { border-color: rgba(255,255,255,.18); }
.message-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #252936;
  color: rgba(255,255,255,.76);
  font-size: 12px;
  font-weight: 900;
}
.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  grid-area: 1 / 1;
}
.message-avatar span { grid-area: 1 / 1; }
.bubble {
  max-width: min(680px, 78%);
  background: #20232d;
  border: 1px solid rgba(255,255,255,.08);
  padding: 7px 10px 5px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.msg.out .bubble {
  background: linear-gradient(135deg, #8f1722, #d92334);
  border-color: rgba(255,255,255,.16);
}
.sender { color: #ffb3bc; font-size: 12px; font-weight: 800; margin-bottom: 2px; }
.reply-preview {
  margin: 0 0 5px;
  padding: 5px 7px;
  border-left: 2px solid rgba(255,255,255,.42);
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.78);
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bubble-text { line-height: 1.34; white-space: pre-wrap; word-break: break-word; }
.message-reactions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.message-reactions span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  font-size: 12px;
  font-weight: 800;
}
.bubble time {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 3px;
  text-align: right;
  color: rgba(255,255,255,.58);
  font-size: 10px;
}
.message-status {
  min-width: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  color: rgba(255,255,255,.72);
  font-weight: 900;
  letter-spacing: 0;
}
.message-status.pending { color: rgba(255,255,255,.48); }
.message-status.delivered, .message-status.read { color: #9ee8ff; }
.message-status.failed { color: #ffd1d6; }
.attachment { margin-top: 6px; border-radius: 10px; overflow: hidden; max-width: 340px; }
.attachment.image, .attachment.video {
  display: block;
  width: min(340px, 100%);
  max-height: 360px;
  object-fit: contain;
  background: #050507;
}
.attachment.image {
  min-height: 132px;
  aspect-ratio: 4 / 3;
}
.attachment.video {
  min-height: 150px;
  aspect-ratio: 16 / 9;
}
.video-card {
  position: relative;
  display: block;
  width: min(340px, 100%);
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(224,34,50,.12));
  color: var(--text);
  cursor: pointer;
}
.video-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.video-card.no-poster {
  display: grid;
  place-items: center;
  min-height: 150px;
}
.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0,0,0,.62);
  border: 1px solid rgba(255,255,255,.24);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  padding-left: 3px;
}
.video-label {
  position: absolute;
  left: 9px;
  bottom: 8px;
  max-width: calc(100% - 18px);
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(0,0,0,.62);
  color: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 700;
}
.video-card.no-poster .video-label {
  position: static;
  background: transparent;
  padding-top: 54px;
}
.attachment.sticker { display: block; width: min(160px, 45vw); max-height: 180px; object-fit: contain; background: transparent; }
.attachment.audio {
  width: min(300px, 70vw);
  height: 42px;
  display: block;
}
.attachment.file, .attachment.poster {
  padding: 10px;
  background: rgba(255,255,255,.08);
  color: var(--text);
}
.attachment.poster img { width: 100%; display: block; border-radius: 8px; margin-bottom: 6px; }
.attachment.call,
.attachment.control,
.service-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.075);
  color: rgba(255,255,255,.88);
  font-size: 13px;
  font-weight: 750;
}
.attachment.call {
  border-radius: 999px;
}
.attachment.call .call-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 3px;
  background: rgba(255,255,255,.12);
  color: currentColor;
  flex: 0 0 auto;
}
.attachment.call.missed {
  color: #ffd5da;
  border-color: rgba(255,91,110,.34);
  background: rgba(224,34,50,.16);
}
.attachment.call.cancelled {
  color: #ffd9aa;
  border-color: rgba(255,172,80,.3);
  background: rgba(255,172,80,.12);
}
.attachment.call.outgoing {
  color: #d9fff1;
  border-color: rgba(55,214,154,.28);
  background: rgba(55,214,154,.12);
}
.attachment.call.incoming {
  color: #d9ecff;
  border-color: rgba(97,166,255,.28);
  background: rgba(97,166,255,.12);
}
.attachment.control,
.service-line {
  border-radius: 10px;
  color: rgba(255,255,255,.66);
  font-size: 12px;
  font-weight: 700;
}
.inline-keyboard {
  display: grid;
  gap: 6px;
  margin-top: 7px;
  max-width: 340px;
}
.inline-keyboard-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.inline-keyboard-button {
  min-height: 32px;
  flex: 1 1 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 9px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.inline-keyboard-button:hover:not(:disabled) {
  border-color: rgba(224,34,50,.55);
  background: rgba(224,34,50,.18);
}
.inline-keyboard-button:disabled,
.inline-keyboard-empty {
  opacity: .55;
  cursor: default;
}
.inline-keyboard-button.loading {
  opacity: .72;
}
.compose {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #0d0f15;
}
.reply-panel {
  grid-column: 1 / -1;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.1);
  border-left: 3px solid var(--red-2);
  border-radius: 9px;
  background: rgba(255,255,255,.055);
  color: rgba(255,255,255,.82);
  font-size: 13px;
  overflow: hidden;
}
.reply-panel.hidden { display: none; }
.reply-panel span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attach-button {
  align-self: end;
  width: 44px;
  height: 44px;
  color: var(--muted);
  border-color: rgba(255,255,255,.1);
}
.attach-button:not(:disabled):hover {
  color: #fff;
  border-color: rgba(224,34,50,.45);
}
.compose textarea { min-height: 44px; max-height: 140px; }
.send-icon-button {
  align-self: end;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}
.send-icon-button .ui-icon {
  width: 19px;
  height: 19px;
  margin-left: 2px;
}
.passport-panel {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: #090a0f;
  padding: 14px;
}
.passport-card, .side-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}
.passport-card { text-align: center; }
.passport-card h2 { margin: 4px 0; }
.passport-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  gap: 8px;
  margin-top: 14px;
  text-align: left;
}
.passport-grid div:first-child { grid-column: 1 / -1; }
.passport-grid div {
  background: #0b0c11;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
}
.passport-grid span { display: block; color: var(--muted); font-size: 11px; }
.passport-grid b { overflow-wrap: anywhere; }
#passport-phone { white-space: nowrap; overflow-wrap: normal; word-break: normal; font-size: 15px; }
.profile-form { margin-top: 14px; display: grid; gap: 8px; text-align: left; }
.profile-name-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.dialog-meta-form { display: grid; gap: 10px; text-align: left; }
.dialog-meta-form label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.side-actions, .tool-row, .tool-grid {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}
.tool-grid button { flex: 1 1 92px; }
.tool-form {
  display: grid;
  gap: 8px;
  text-align: left;
}
.tool-form + .tool-form { margin-top: 12px; }
.session-row, .log-row {
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}
.session-row b, .log-row b { display: block; font-size: 13px; }
.session-row span, .log-row span, .log-row time { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.empty {
  color: var(--muted);
  text-align: center;
  padding: 28px 12px;
}
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #141720;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: .18s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.danger { border-color: rgba(224,34,50,.55); background: #250b10; }
.message-menu {
  position: fixed;
  z-index: 40;
  width: 210px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: #11131a;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
}
.message-menu.hidden { display: none; }
.message-menu button {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 13px;
}
.message-menu button:hover { background: rgba(255,255,255,.08); }
.message-menu button.danger-menu { color: #ffb5bd; }
.message-menu button:disabled {
  opacity: .38;
  pointer-events: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  background: var(--panel);
  color: var(--text);
}
dialog::backdrop { background: rgba(0,0,0,.7); }
.dialog-card { width: 420px; padding: 18px; display: grid; gap: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 290px 1fr; }
  .workspace { grid-template-columns: 1fr; }
  .passport-panel { display: none; }
}
@media (max-width: 850px) {
  .app-shell { grid-template-columns: 1fr; }
  .accounts-rail { display: none; }
  .chat-layout { grid-template-columns: 1fr; }
  .dialog-panel { display: none; }
}
