@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #05070b;
  --bg-elev: #0a0f15;
  --panel: #0b121a;
  --panel-2: #0d1620;
  --panel-3: #0f1b27;
  --stroke: #1a2a38;
  --stroke-soft: #162430;
  --text: #e7f0f7;
  --muted: #88a0b3;
  --accent: #5ed3ff;
  --accent-2: #57f0b8;
  --danger: #ff6f86;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(9, 16, 24, 0.72);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1f455c, #245e63);
  border: 2px solid rgba(9, 16, 24, 0.88);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #2a6d8f, #2d877a);
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  min-height: 100vh;
  color: var(--text);
  scrollbar-color: #245e63 rgba(9, 16, 24, 0.72);
  scrollbar-width: thin;
  background:
    radial-gradient(circle at 20% 0%, rgba(44, 83, 100, 0.2), transparent 35%),
    radial-gradient(circle at 90% 10%, rgba(54, 112, 92, 0.15), transparent 45%),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.015),
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px,
      transparent 28px
    ),
    var(--bg);
}

.app {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 360px;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

.rail,
.inspector {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(10, 16, 23, 0.94), rgba(7, 11, 16, 0.98));
  border-right: 1px solid var(--stroke-soft);
  backdrop-filter: blur(8px);
}

.inspector {
  border-right: none;
  border-left: 1px solid var(--stroke-soft);
  background: linear-gradient(180deg, rgba(10, 17, 26, 0.95), rgba(8, 12, 19, 0.99));
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(94, 211, 255, 0.25);
  background: #0f1a24;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  letter-spacing: 0.3px;
}

.brand-sub {
  color: var(--muted);
  font-size: 11px;
}

.search input {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
}

.section-title {
  text-transform: uppercase;
  letter-spacing: 1.3px;
  font-size: 10px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.queue-toggle {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
}

.ticket-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  align-content: start;
  padding-right: 4px;
}

.archive-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
}

.archive-pagination.hidden {
  display: none;
}

.archive-page-info {
  font-size: 11px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
}

.archive-page-btn {
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: #0f1721;
  color: var(--text);
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
}

.archive-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ticket {
  background: linear-gradient(135deg, #0d161f, #0b141d);
  border: 1px solid var(--stroke-soft);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.ticket:hover {
  border-color: rgba(94, 211, 255, 0.5);
  transform: translateY(-1px);
}

.ticket.active {
  border-color: rgba(94, 211, 255, 0.75);
  box-shadow: 0 0 0 1px rgba(94, 211, 255, 0.25);
}

.ticket-compact {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ticket-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.ticket-avatar,
.ticket-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.ticket-avatar {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1a2c3b, #1b3740);
  font-size: 11px;
  font-weight: 700;
  color: #d9f5ff;
}

.ticket-avatar-img {
  object-fit: cover;
  background: #12222f;
}

.ticket-id {
  font-size: 12px;
  letter-spacing: 0.2px;
  color: var(--text);
}

.ticket-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ticket-tag {
  border: 1px solid rgba(94, 211, 255, 0.35);
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  line-height: 1;
}

.ticket-meta {
  color: var(--muted);
  font-size: 12px;
}

.workspace {
  min-height: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 14px 22px;
  border-bottom: 1px solid var(--stroke-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 11, 16, 0.8);
  backdrop-filter: blur(12px);
}

.ticket-id-only {
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  letter-spacing: 0.4px;
  color: #b8d6eb;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary,
.ghost {
  border-radius: 10px;
  border: 1px solid var(--stroke);
  padding: 9px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.primary {
  color: #032034;
  border-color: rgba(94, 211, 255, 0.5);
  background: linear-gradient(135deg, #5ed3ff, #57f0b8);
}

.ghost {
  color: var(--text);
  background: linear-gradient(135deg, #0e161f, #101a25);
}

.primary:hover,
.ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 211, 255, 0.55);
}

.chat {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 22px 20px;
}

.chat-stream {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 8px;
  scroll-behavior: smooth;
}

.bubble-row {
  width: 100%;
  display: flex;
}

.bubble-row.mine {
  justify-content: flex-end;
}

.bubble-row.incoming {
  justify-content: flex-start;
}

.bubble {
  width: auto;
  max-width: min(72%, 66ch);
  flex: 0 0 auto;
  padding: 10px 12px 8px;
  border-radius: 16px;
  border: 1px solid #1b2d3d;
  background: #101821;
  line-height: 1.36;
  font-size: 14px;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34);
  animation: bubbleIn 220ms ease;
}

.bubble.mine {
  border-color: rgba(94, 211, 255, 0.45);
  background: #143043;
  border-bottom-right-radius: 8px;
}

.bubble.client,
.bubble.support-peer {
  border-bottom-left-radius: 8px;
}

.bubble-sender {
  margin-bottom: 4px;
  font-size: 11px;
  color: #9bc0d9;
  font-weight: 600;
}

.bubble-text {
  white-space: normal;
}

.bubble-footer {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.attachments {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.attachment {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: rgba(8, 13, 19, 0.85);
  padding: 8px;
}

.attachment img,
.attachment video {
  width: 88px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #0a1017;
}

.attachment audio {
  width: 220px;
  max-width: 100%;
  height: 36px;
}

.audio-card {
  align-items: stretch;
  min-width: min(360px, 100%);
  max-width: 100%;
}

.audio-thumb,
.audio-thumb-fallback {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  flex: 0 0 auto;
}

.audio-thumb {
  object-fit: cover;
  background: #122736;
}

.audio-thumb-fallback {
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #9adbf4;
  background: linear-gradient(135deg, #183348, #234f57);
}

.audio-main {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 4px;
}

.audio-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-artist {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.audio-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: #102432;
  color: #c4ebfb;
  cursor: pointer;
}

.audio-range {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.audio-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: #17374a;
}

.audio-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: -4px;
  background: #6ee5ff;
  border: 1px solid #17374a;
}

.audio-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--muted);
  min-width: 72px;
  text-align: right;
}

.audio-card audio {
  display: none;
}

.file-icon {
  width: 88px;
  height: 64px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: #0d1620;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
}

.typing-indicator {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 7px 10px;
  background: #0f1822;
  color: var(--muted);
  font-size: 12px;
}

.typing-indicator.hidden {
  display: none;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.typing-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotPulse 1s infinite ease-in-out;
}

.typing-dots i:nth-child(2) {
  animation-delay: 0.14s;
}

.typing-dots i:nth-child(3) {
  animation-delay: 0.28s;
}

.composer {
  border: 1px solid var(--stroke-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #0c131d, #0a121a);
  padding: 12px;
  display: grid;
  gap: 10px;
  position: relative;
}

.composer-tools {
  display: flex;
  gap: 8px;
}

.chip {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: #0f1721;
  color: var(--text);
  font-size: 11px;
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease;
}

.chip:hover {
  border-color: rgba(94, 211, 255, 0.55);
  transform: translateY(-1px);
}

.chip-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
}

.chip-icon img {
  width: 18px;
  height: 18px;
  display: block;
  filter: brightness(0) saturate(100%) invert(85%) sepia(11%) saturate(590%) hue-rotate(171deg) brightness(98%) contrast(90%);
}

.composer-input {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px;
}

.upload-queue {
  display: grid;
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 4px;
}

.upload-queue.hidden {
  display: none;
}

.upload-item {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: #0b131c;
  padding: 8px;
  display: grid;
  gap: 5px;
}

.upload-item.error {
  border-color: rgba(255, 111, 134, 0.55);
}

.upload-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.upload-meta {
  font-size: 11px;
  color: var(--muted);
}

.upload-bar {
  width: 100%;
  height: 5px;
  background: #12202e;
  border-radius: 999px;
  overflow: hidden;
}

.upload-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #5ed3ff, #57f0b8);
  transition: width 140ms linear;
}

.drop-overlay {
  position: absolute;
  inset: 8px;
  border: 1.5px dashed rgba(94, 211, 255, 0.72);
  border-radius: 14px;
  background: rgba(12, 28, 38, 0.8);
  color: #c9e9f8;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.3px;
  display: grid;
  place-items: center;
  pointer-events: none;
  animation: overlayPop 160ms ease;
}

.drop-overlay.hidden {
  display: none;
}

textarea {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  background: #0b131c;
  color: var(--text);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 10px 12px;
}

.card,
.profile-card {
  border: 1px solid var(--stroke-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #0d1620, #0b131c);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.card-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(135deg, #183042, #1b3a3f);
  overflow: hidden;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-weight: 700;
  font-size: 15px;
}

.profile-tag {
  color: var(--muted);
  font-size: 12px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.stat {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: #0b131c;
  padding: 9px 10px;
}

.stat span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 3px;
}

.history {
  display: grid;
  gap: 8px;
}

.history-item {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 9px 10px;
  background: #0b131c;
  color: var(--muted);
  font-size: 12px;
}

.sub-indicator {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.sub-indicator.active {
  border-color: rgba(87, 240, 184, 0.55);
  color: #96f3cf;
  background: rgba(37, 92, 76, 0.35);
}

.sub-indicator.inactive {
  border-color: rgba(255, 111, 134, 0.55);
  color: #ff9eae;
  background: rgba(110, 42, 54, 0.28);
}

.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip.active {
  box-shadow: 0 0 0 1px rgba(94, 211, 255, 0.35);
}

.tag-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.tag-add input {
  background: #0b131c;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  color: var(--text);
  padding: 8px 10px;
}

.support-pill {
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: #0f1822;
  padding: 7px 9px;
}

.support-pill-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #132634;
}

.support-pill-name {
  font-size: 12px;
  line-height: 1.2;
}

.support-pill-balance {
  font-size: 11px;
  color: var(--accent-2);
}

.support-pill-logout {
  margin-left: auto;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: #111c28;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 11px;
  cursor: pointer;
}

.support-pill-push {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: #111c28;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 11px;
  cursor: pointer;
}

.support-pill-push.active {
  border-color: rgba(87, 240, 184, 0.55);
  color: #96f3cf;
  background: rgba(37, 92, 76, 0.35);
}

.support-pill-push:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 5, 8, 0.85);
  backdrop-filter: blur(9px);
  z-index: 100;
}

.auth-gate.hidden {
  display: none;
}

.auth-card {
  width: min(420px, 94vw);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: linear-gradient(180deg, #0d1722, #0a121b);
  padding: 24px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
  animation: cardIn 280ms ease;
}

.auth-card h1 {
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
}

.auth-card p,
.auth-status {
  color: var(--muted);
  font-size: 13px;
}

.auth-button {
  width: 100%;
}

.audio-unlock-btn {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 130;
  border: 1px solid rgba(94, 211, 255, 0.55);
  background: #112536;
  color: #d9efff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.audio-unlock-btn:hover {
  border-color: rgba(94, 211, 255, 0.82);
  background: #17344a;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  display: grid;
  gap: 12px;
  max-width: min(460px, calc(100vw - 28px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: linear-gradient(180deg, #0f1a25, #0d1620);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  animation: toastIn 200ms ease;
  min-width: 320px;
}

.toast-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.toast-title {
  font-size: 14px;
  font-weight: 700;
  color: #d8edfa;
  line-height: 1.35;
}

.toast-text {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.toast-close {
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: #122030;
  color: #c6d6e3;
  font-size: 14px;
  line-height: 1;
  padding: 6px 8px;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.toast-close:hover {
  border-color: rgba(94, 211, 255, 0.48);
  color: #f0f8ff;
  background: #183042;
}

.toast.good {
  border-color: rgba(87, 240, 184, 0.45);
}

.toast.bad {
  border-color: rgba(255, 111, 134, 0.45);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dotPulse {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes overlayPop {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1220px) {
  .app {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .inspector {
    display: none;
  }
}

@media (max-width: 920px) {
  .app {
    grid-template-columns: 1fr;
    display: block;
    position: relative;
    height: 100vh;
  }

  .rail,
  .workspace,
  .inspector {
    display: none;
    position: absolute;
    inset: 0;
    height: calc(100vh - 62px - env(safe-area-inset-bottom, 0px));
    min-height: 0;
    border: none;
    padding: 14px;
    padding-bottom: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(10, 16, 23, 0.98), rgba(7, 11, 16, 0.99));
  }

  body[data-mobile-panel="list"] .rail {
    display: flex;
  }

  body[data-mobile-panel="chat"] .workspace {
    display: flex;
  }

  body[data-mobile-panel="info"] .inspector {
    display: flex;
  }

  .topbar {
    padding: 10px 0 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid var(--stroke-soft);
  }

  .actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .actions .ghost {
    flex: 1;
    min-width: 124px;
  }

  .support-pill {
    min-width: 0;
    width: 100%;
  }

  .chat {
    padding: 12px 0 8px;
  }

  .bubble {
    max-width: 92%;
  }

  .composer-input {
    grid-template-columns: 1fr;
  }

  textarea {
    min-height: 92px;
  }

  .search input,
  .tag-add input,
  textarea {
    font-size: 16px;
  }

  .inspector {
    overflow-y: auto;
    gap: 12px;
  }

  .mobile-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--stroke-soft);
    border-radius: 14px;
    background: rgba(10, 17, 24, 0.92);
    backdrop-filter: blur(10px);
  }

  .mobile-nav-btn {
    border: 1px solid var(--stroke);
    border-radius: 10px;
    background: #101a25;
    color: var(--muted);
    padding: 10px 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }

  .mobile-nav-btn.active {
    color: #052236;
    border-color: rgba(94, 211, 255, 0.7);
    background: linear-gradient(135deg, #5ed3ff, #57f0b8);
  }

  .mobile-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .toast-stack {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    right: 12px;
    left: 12px;
    max-width: none;
  }

  .toast {
    min-width: 0;
  }
}

@media (min-width: 921px) {
  .mobile-nav {
    display: none;
  }
}
