/* ==========================================================================
   Paperbit — Field Comms  |  Clean neutral UI
   Palette: Notion/ChatGPT-style greys · Green = safe · Red = emergency
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg:        #212121;
  --bg-1:      #2c2c2c;
  --bg-2:      #353535;
  --bg-3:      #3f3f3f;
  --bg-4:      #4a4a4a;

  --fg:        #ececec;
  --fg-2:      #b4b4b4;
  --fg-3:      #737373;
  --fg-4:      #4a4a4a;

  --line:      rgba(255,255,255,0.06);
  --line-2:    rgba(255,255,255,0.10);

  --green:     #19c37d;
  --green-dim: rgba(25,195,125,0.12);
  --green-bd:  rgba(25,195,125,0.28);

  --red:       #ef4444;
  --red-dim:   rgba(239,68,68,0.13);
  --red-bd:    rgba(239,68,68,0.30);
  --red-press: #dc2626;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --r-sm:    6px;
  --r-md:    10px;
  --r-lg:    14px;
  --r-xl:    18px;
  --r-round: 999px;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, p { margin: 0; }
button, input, textarea { font-family: inherit; font-size: inherit; color: inherit; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
::-webkit-scrollbar {
    display: none;
}
:focus-visible { outline: 2px solid var(--fg-3); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ==========================================================================
   Frame
   ========================================================================== */

.backdrop {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

@media (min-width: 560px) {
  .backdrop { background: #1a1a1a; padding: 32px 16px; }
  .phone {
    height: min(890px, calc(100vh - 64px));
    border-radius: 28px;
    box-shadow: 0 0 0 1px var(--line-2), 0 24px 48px rgba(0,0,0,0.5);
  }
}

/* ==========================================================================
   App bar
   ========================================================================== */

.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 13px;
  flex-shrink: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.appbar-brand { display: flex; align-items: center; gap: 8px; }

.appbar-mark { width: 24px; height: 24px; display: flex; align-items: center; }
.appbar-mark img { width: 100%; height: 100%; object-fit: contain; }

.appbar-title { font-weight: 600; font-size: 15px; color: var(--fg); }

/* Status chip — no dot, just text */
.status-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  padding: 5px 10px;
  border-radius: var(--r-round);
  cursor: pointer;
}
.status-dot { display: none; } /* hidden — not needed */
.status-chip-label { font-size: 11px; font-weight: 500; color: var(--fg-2); }
.status-chip-caret { width: 12px; height: 12px; stroke: var(--fg-3); }

/* ==========================================================================
   Screens
   ========================================================================== */

.screens { flex: 1; min-height: 0; position: relative; }
.screen { position: absolute; inset: 0; display: none; flex-direction: column; }
.screen:not([hidden]) { display: flex; }

.screen-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 14px 14px;
  -webkit-overflow-scrolling: touch;
}

.scroll-spacer { height: 12px; }
.voice-spacer  { height: 220px; }

.section-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 20px 0 8px;
}
.section-title { font-size: 11px; font-weight: 500; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.06em; }
.section-title-meta { font-size: 11px; color: var(--fg-3); }

/* ==========================================================================
   Home — Hero card
   ========================================================================== */

.hero-card {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 18px 16px 16px;
}

.hero-eyebrow {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-bottom: 10px;
}

.hero-line1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--fg-2);
}

.hero-line2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--green);
  margin-top: 1px;
}

.hero-rows {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.hero-row:last-child { border-bottom: none; }

.hero-row-label { font-size: 12px; color: var(--fg-3); }
.hero-row-value { font-size: 12px; font-weight: 600; }
.hero-row-value.tone-green { color: var(--green); }
.hero-row-value.tone-muted  { color: var(--fg-3); }

/* ==========================================================================
   Quick actions
   ========================================================================== */

.action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

.action-tile {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 13px 12px;
  cursor: pointer;
  min-height: 52px;
  transition: background 0.1s;
}
.action-tile:active { background: var(--bg-2); }

.action-icon {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.action-icon i { width: 16px; height: 16px; color: var(--fg-2); stroke-width: 1.8; }

.action-label { font-size: 13px; font-weight: 500; color: var(--fg); }

.action-tile-danger { border-color: var(--red-bd); background: var(--red-dim); }
.action-tile-danger .action-icon { background: var(--red-dim); }
.action-tile-danger .action-icon i { color: var(--red); }
.action-tile-danger .action-label { color: var(--red); }
.action-tile-danger:active { background: rgba(239,68,68,0.2); }

/* ==========================================================================
   Activity
   ========================================================================== */

.activity-list { display: flex; flex-direction: column; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.activity-icon i { width: 13px; height: 13px; color: var(--fg-3); }
.activity-icon.tone-red   i { color: var(--red); }
.activity-icon.tone-green i { color: var(--green); }

.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: 13px; color: var(--fg-2); }
.activity-text b { font-weight: 600; color: var(--fg); }
.activity-meta { margin-top: 2px; font-size: 11px; color: var(--fg-3); }

.list-empty { padding: 26px 0; text-align: center; color: var(--fg-3); font-size: 13px; }

/* ==========================================================================
   Hop trail
   ========================================================================== */

.hop-trail {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--fg-3); flex-wrap: wrap;
}
.hop-node {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--fg-3);
  font-size: 10px; font-weight: 500;
}
.hop-node.is-you  { background: var(--bg-3); color: var(--fg); border-color: var(--line-2); }
.hop-node.is-dest { background: var(--green-dim); color: var(--green); border-color: var(--green-bd); }
.hop-arrow { color: var(--fg-4); font-size: 11px; }

/* ==========================================================================
   Chat
   ========================================================================== */

.chat-head {
  padding: 11px 14px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
}
.chat-head-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg-1); border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-head-icon i { width: 14px; height: 14px; color: var(--fg-2); }
.chat-head-title { font-size: 14px; font-weight: 600; color: var(--fg); }
.chat-head-sub { font-size: 11px; color: var(--fg-3); margin-top: 1px; }

.chat-scroll { display: flex; flex-direction: column; }
.message-list { display: flex; flex-direction: column; gap: 8px; }

.message-item { display: flex; flex-direction: column; max-width: 78%; }
.message-item.is-out { align-self: flex-end; align-items: flex-end; }
.message-item.is-in  { align-self: flex-start; align-items: flex-start; }

.message-bubble {
  padding: 9px 13px;
  font-size: 14px;
  line-height: 1.45;
  border-radius: var(--r-lg);
}
.message-item.is-out .message-bubble {
  background: var(--bg-3);
  color: var(--fg);
  border-radius: var(--r-lg) var(--r-lg) 4px var(--r-lg);
}
.message-item.is-in .message-bubble {
  background: var(--bg-1);
  color: var(--fg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 4px;
}

.message-meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 3px; font-size: 10px; color: var(--fg-3); flex-wrap: wrap;
}
.message-item.is-out .message-meta { justify-content: flex-end; }

.status-badge {
  display: inline-flex; align-items: center;
  padding: 1px 6px; border-radius: 3px;
  font-size: 10px; font-weight: 500;
  background: var(--bg-2); color: var(--fg-3);
}
.status-badge.st-delivered { background: var(--green-dim); color: var(--green); }
.status-badge.st-transmitting { animation: fade-pulse 1.1s ease-in-out infinite; }
.status-badge.st-relayed { background: var(--green-dim); color: var(--green); }
@keyframes fade-pulse { 50% { opacity: 0.4; } }

/* Composer */
.composer {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  flex-shrink: 0;
}
.composer-input {
  flex: 1;
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  border-radius: var(--r-round);
  padding: 10px 15px;
  font-size: 14px; color: var(--fg);
}
.composer-input::placeholder { color: var(--fg-3); }
.composer-input:focus { outline: none; border-color: var(--fg-4); }

.composer-send {
  width: 38px; height: 38px;
  border-radius: 50%; border: none;
  background: var(--fg); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
  transition: opacity 0.1s;
}
.composer-send:active { opacity: 0.75; }
.composer-send i { width: 16px; height: 16px; }

/* ==========================================================================
   Voice
   ========================================================================== */

.voice-top {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 24px 0 8px;
}
.voice-phase { font-size: 13px; font-weight: 500; color: var(--fg-3); }

.waveform { display: flex; align-items: center; gap: 3px; height: 26px; }
.waveform span { width: 3px; border-radius: 2px; background: var(--bg-3); height: 6px; }
.waveform.is-active span { background: var(--fg-2); animation: wave 0.9s ease-in-out infinite; }
.waveform.is-active span:nth-child(2n) { animation-delay: 0.1s; }
.waveform.is-active span:nth-child(3n) { animation-delay: 0.2s; }
@keyframes wave { 0%, 100% { height: 6px; } 50% { height: 24px; } }

.voice-log { display: flex; flex-direction: column; }
.voice-log-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.voice-log-item:last-child { border-bottom: none; }
.voice-log-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.voice-log-icon {
  width: 30px; height: 30px; border-radius: var(--r-sm);
  background: var(--bg-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.voice-log-icon i { width: 13px; height: 13px; color: var(--fg-3); }
.voice-log-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.voice-log-title { font-size: 13px; color: var(--fg-2); }

/* PTT */
.ptt-dock {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 16px calc(22px + var(--safe-bottom));
  background: linear-gradient(to top, var(--bg) 60%, transparent);
}

.ptt-button {
  width: 88px; height: 88px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--bg-1);
  color: var(--fg-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; touch-action: none;
  user-select: none; -webkit-user-select: none;
  transition: background 0.15s, border-color 0.15s;
}
.ptt-button i { width: 28px; height: 28px; stroke-width: 1.6; }
.ptt-ring {
  position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid var(--fg-3); opacity: 0;
}
.ptt-button.is-listening { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.ptt-button.is-listening .ptt-ring { animation: pulse-ring 1.3s ease-out infinite; }
.ptt-button.is-processing { background: var(--bg-2); }
.ptt-button.is-transmitting { background: var(--fg); color: var(--bg); border-color: var(--fg); }
@keyframes pulse-ring { 0% { opacity: 0.5; transform: scale(0.6); } 100% { opacity: 0; transform: scale(2); } }
.ptt-hint { font-size: 11px; color: var(--fg-3); }

/* ==========================================================================
   Network
   ========================================================================== */

.summary-card {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 18px;
}
.summary-card-top { display: flex; align-items: baseline; gap: 8px; }
.summary-count { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; color: var(--fg); }
.summary-count-label { font-size: 12px; color: var(--fg-3); }
.summary-split { display: flex; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.summary-split-item { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 0 10px; border-right: 1px solid var(--line); }
.summary-split-item:first-child { padding-left: 0; }
.summary-split-item:last-child { border-right: none; }
.summary-split-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-3); }
.summary-split-value { font-size: 13px; font-weight: 600; color: var(--fg); }
.summary-split-value.tone-green { color: var(--green); }
.summary-split-value.tone-gray  { color: var(--fg-3); }

.relay-path {
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 16px; display: flex; align-items: center; overflow-x: auto;
}
.relay-node { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 60px; flex-shrink: 0; }
.relay-dot {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
}
.relay-dot i { width: 13px; height: 13px; color: var(--fg-3); }
.relay-node.is-reachable .relay-dot { border-color: var(--green-bd); background: var(--green-dim); }
.relay-node.is-reachable .relay-dot i { color: var(--green); }
.relay-node.is-you .relay-dot { border-color: var(--line-2); background: var(--bg-3); }
.relay-node.is-you .relay-dot i { color: var(--fg); }
.relay-label { font-size: 9px; font-weight: 600; text-align: center; color: var(--fg-3); letter-spacing: 0.04em; }
.relay-link { flex-shrink: 0; width: 24px; height: 1px; background: var(--line-2); margin-bottom: 18px; }
.relay-link.is-active { background: var(--green); }

.node-list { display: flex; flex-direction: column; }
.node-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.node-item:last-child { border-bottom: none; }
.node-info { flex: 1; min-width: 0; }
.node-name { font-size: 13px; font-weight: 600; color: var(--fg); }
.node-status-text { font-size: 11px; color: var(--fg-3); margin-top: 1px; }
.node-badge {
  font-size: 10px; font-weight: 500; padding: 2px 8px;
  border-radius: 4px; background: var(--bg-2); color: var(--fg-3);
  border: 1px solid var(--line-2); flex-shrink: 0;
}
.node-badge.tone-green { background: var(--green-dim); color: var(--green); border-color: var(--green-bd); }

.legend-list { display: flex; flex-direction: column; gap: 6px; }
.legend-item { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.legend-item-label { font-size: 12px; font-weight: 600; color: var(--fg-2); margin-bottom: 2px; }
.legend-item-desc  { font-size: 11px; color: var(--fg-3); }

/* ==========================================================================
   Emergency
   ========================================================================== */

.emergency-banner {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--red-dim); border: 1px solid var(--red-bd);
  border-radius: var(--r-md); padding: 12px 13px; margin-bottom: 14px;
}
.emergency-banner i { width: 15px; height: 15px; color: var(--red); flex-shrink: 0; margin-top: 2px; }
.emergency-banner p { font-size: 12px; color: var(--red); line-height: 1.5; }

.sos-button {
  width: 100%; background: var(--red); color: #fff;
  border: none; border-radius: var(--r-xl); padding: 22px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; margin-bottom: 12px;
  transition: background 0.1s;
}
.sos-button:active { background: var(--red-press); }
.sos-button-label { font-size: 26px; font-weight: 700; letter-spacing: 0.05em; }
.sos-button-sub { font-size: 11px; opacity: 0.8; }

.emergency-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-bottom: 4px; }
.emergency-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  background: var(--bg-1); border: 1px solid var(--red-bd);
  border-radius: var(--r-lg); padding: 13px; cursor: pointer;
  min-height: 76px; transition: background 0.1s;
}
.emergency-tile:active { background: var(--red-dim); }
.emergency-tile i { width: 16px; height: 16px; color: var(--red); }
.emergency-tile span { font-size: 12px; font-weight: 600; color: var(--fg); line-height: 1.3; }

.alert-log { display: flex; flex-direction: column; }
.alert-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.alert-item:last-child { border-bottom: none; }
.alert-item-icon {
  width: 30px; height: 30px; border-radius: var(--r-sm);
  background: var(--red-dim); border: 1px solid var(--red-bd);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.alert-item-icon i { width: 13px; height: 13px; color: var(--red); }
.alert-item-text { font-size: 13px; font-weight: 600; color: var(--fg); }
.alert-item-meta { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 11px; color: var(--fg-3); }

/* ==========================================================================
   Bottom nav
   ========================================================================== */

.bottom-nav {
  display: flex; border-top: 1px solid var(--line);
  background: var(--bg); flex-shrink: 0;
  padding: 6px 4px calc(6px + var(--safe-bottom));
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 6px 2px; border: none; background: transparent;
  color: var(--fg-3); cursor: pointer; border-radius: var(--r-sm); min-height: 48px;
}
.nav-btn i { width: 20px; height: 20px; stroke-width: 1.8; }
.nav-btn span { font-size: 10px; font-weight: 500; }
.nav-btn.is-active { color: var(--fg); }
.nav-btn-emergency.is-active,
.nav-btn-emergency:active { color: var(--red); }

/* ==========================================================================
   Sheets
   ========================================================================== */

.scrim {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none; transition: opacity 0.18s; z-index: 20;
}
.scrim.is-visible { opacity: 1; pointer-events: auto; }

.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--bg-1); border: 1px solid var(--line-2); border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 10px 18px calc(20px + var(--safe-bottom));
  transform: translateY(105%);
  transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 21; box-shadow: 0 -8px 24px rgba(0,0,0,0.4);
}
.sheet.is-open { transform: translateY(0); }

.sheet-grabber { width: 36px; height: 3px; border-radius: 2px; background: var(--bg-4); margin: 4px auto 16px; }
.sheet-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--fg); }
.sheet-sub { font-size: 12px; color: var(--fg-3); margin-top: 4px; }

.sheet-options { display: flex; flex-direction: column; gap: 7px; margin-top: 18px; }
.sheet-option {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 14px; border: 1px solid var(--line-2);
  border-radius: var(--r-md); background: var(--bg-2); cursor: pointer;
}
.sheet-option.is-selected { border-color: var(--fg-4); background: var(--bg-3); }
.sheet-option-label { font-size: 14px; font-weight: 500; }
.sheet-option-desc { font-size: 11px; color: var(--fg-3); margin-top: 2px; }
.sheet-option-check { width: 16px; height: 16px; color: var(--fg); flex-shrink: 0; }

.sheet-textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 11px 13px; resize: none; font-size: 14px;
  margin-top: 16px; background: var(--bg-2); color: var(--fg);
}
.sheet-textarea::placeholder { color: var(--fg-3); }
.sheet-textarea:focus { outline: none; border-color: var(--fg-4); }

.sheet-recipients {
  display: flex; align-items: center; gap: 7px; margin-top: 10px;
  font-size: 12px; color: var(--fg-3);
}
.sheet-recipients i { width: 13px; height: 13px; color: var(--fg-3); }

.sheet-primary-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--fg); color: var(--bg); border: none;
  border-radius: var(--r-md); padding: 13px; font-size: 14px; font-weight: 600;
  margin-top: 14px; cursor: pointer; transition: opacity 0.1s;
}
.sheet-primary-btn:active { opacity: 0.8; }
.sheet-primary-btn i { width: 15px; height: 15px; }

.sheet-danger .sheet-title { color: var(--red); }

.sheet-actions { display: flex; gap: 10px; margin-top: 20px; }
.sheet-secondary-btn, .sheet-danger-btn {
  flex: 1; border: none; border-radius: var(--r-md);
  padding: 13px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.sheet-secondary-btn { background: var(--bg-2); color: var(--fg); border: 1px solid var(--line-2); }
.sheet-danger-btn { background: var(--red); color: #fff; }
.sheet-danger-btn:active { background: var(--red-press); }

/* ==========================================================================
   Toasts
   ========================================================================== */

.toast-stack {
  position: fixed; left: 0; right: 0; bottom: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  z-index: 60; pointer-events: none; padding: 0 20px;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-3); border: 1px solid var(--line-2); color: var(--fg);
  padding: 10px 15px; border-radius: var(--r-round);
  font-size: 13px; font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  animation: toast-in 0.18s ease-out; max-width: 100%;
}
.toast i { width: 13px; height: 13px; flex-shrink: 0; }
.toast.tone-red { background: var(--red-press); border-color: transparent; }
.toast.tone-green i { color: var(--green); }

@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.toast.is-leaving { animation: toast-out 0.16s ease-in forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateY(4px); } }

/* misc */
.tone-green { color: var(--green); }
.tone-muted  { color: var(--fg-3); }