/* ==========================================================================
   ZellRayy — Theme Tokens & Design System (Dark Console Edition)
   ========================================================================== */

:root {
  --radius: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* DARK THEME (Official ZellRayy Tokens) */
  --bg: #0a0a0b;
  --bg-soft: #121213;
  --surface: #19191b;
  --surface-2: #222224;
  --border: #2b2b2e;
  --border-soft: #1f1f21;
  --text: #d9d4c7;
  --text-muted: #8b877c;
  --text-dim: #5c5952;
  --accent: #cdbd94;
  --accent-strong: #ded0aa;
  --accent-ink: #17150f;
  --success: #7fbf8f;
  --danger: #e06c75;
  --shadow: 0 8px 30px rgba(0, 0, 0, .45);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
  --grain-opacity: .05;
  --code-bg: #101011;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

::selection { background: var(--accent); color: var(--accent-ink); }

.font-display { font-family: 'Space Grotesk', 'Inter', sans-serif; }
.font-mono    { font-family: 'JetBrains Mono', 'Ubuntu Mono', monospace; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Subtle film-grain texture */
.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Layout Atoms */
.surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.surface-2 { background: var(--surface-2); }

.pill {
  border-radius: 999px;
  border: 1px solid var(--border);
}

.muted { color: var(--text-muted); }
.dim   { color: var(--text-dim); }

.page-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Navbar ── */
.navbar-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: 52px;
  display: flex;
  align-items: center;
}

.navbar-container {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-glyph { color: var(--accent); font-weight: 800; }
.brand-ext   { font-size: 0.74rem; color: var(--text-muted); font-weight: 600; }

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

.nav-links-menu {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--surface-2);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 4px;
  color: var(--text-muted);
  transition: all 0.15s;
}

.nav-link-btn:hover { color: var(--text); }
.nav-link-btn.active { color: var(--accent); background: var(--surface); border: 1px solid var(--border-soft); }

.domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--surface-2);
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
}

.status-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

/* ── Main Body ── */
.main-body {
  flex: 1;
  padding: 20px 0 36px;
}

.app-column {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Card 1: Mailbox Card ── */
.mailbox-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 3px solid var(--accent);
}

.mailbox-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.mailbox-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.sync-status-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sync-bar-track {
  width: 38px;
  height: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 99px;
  overflow: hidden;
}

.sync-bar-fill {
  height: 100%;
  width: 100%;
  background: var(--accent);
  transition: width 1s linear;
}

.sync-text {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.sync-text strong { color: var(--accent); }

.btn-refresh-icon {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-refresh-icon:hover { color: var(--text); border-color: var(--accent); }
.btn-refresh-icon svg { width: 11px; height: 11px; }

.spin-anim { animation: spin 0.7s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Address Input Row */
.address-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.address-row:hover { border-color: var(--accent); }

.address-at-symbol {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.address-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  min-width: 0;
}

.btn-quick-copy {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  transition: all 0.15s;
}

.btn-quick-copy:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-quick-copy svg { width: 12px; height: 12px; }

/* ── Action Buttons ── */
.actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  font-weight: 600;
  font-size: .78rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius-sm);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s var(--ease), background-color .18s var(--ease);
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn svg { width: 13px; height: 13px; }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  filter: brightness(1.04);
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.btn-sm   { padding: .35rem .75rem; font-size: .74rem; }
.btn-full { width: 100%; }

/* Permalink Strip */
.permalink-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  gap: 8px;
  font-size: 0.7rem;
}

.permalink-left {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.permalink-left svg { width: 11px; height: 11px; color: var(--accent); flex-shrink: 0; }
.permalink-url { color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn-copy-permalink {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-copy-permalink:hover { color: var(--text); border-color: var(--accent); }

/* ── Card 2: Inbox Card ── */
.inbox-card {
  min-height: 340px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.inbox-header-row {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.inbox-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inbox-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.inbox-count-pill {
  font-size: 0.65rem;
  padding: 2px 7px;
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
}

.inbox-tools-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-ico {
  position: absolute;
  left: 9px;
  width: 12px;
  height: 12px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-wrap input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 8px 5px 26px;
  color: var(--text);
  font-size: 0.75rem;
  outline: none;
  width: 180px;
  transition: border-color 0.15s;
}

.search-wrap input::placeholder { color: var(--text-dim); }
.search-wrap input:focus { border-color: var(--accent); }

.btn-clear-inbox {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-clear-inbox:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.btn-clear-inbox svg { width: 11px; height: 11px; }

/* Messages List */
.inbox-feed-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Empty State */
.empty-inbox-wrap {
  margin: auto;
  padding: 40px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 320px;
  gap: 6px;
}

.empty-radar-beacon {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.radar-center {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.95rem;
  z-index: 2;
}

.radar-ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: radarWave 2.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

@keyframes radarWave {
  0% { transform: scale(0.7); opacity: 0.8; }
  100% { transform: scale(1.7); opacity: 0; }
}

.empty-title { font-size: 0.94rem; font-weight: 700; color: var(--text); }
.empty-desc  { font-size: 0.78rem; line-height: 1.5; margin-bottom: 6px; }

/* Message Rows */
.mail-list-item {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s var(--ease);
}

.mail-list-item:last-child { border-bottom: none; }

.mail-list-item:hover {
  background: var(--surface-2);
  border-left-color: var(--accent);
  padding-left: 19px;
}

.mail-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.mail-avatar-box {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.76rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mail-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.mail-sender-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mail-sender-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill-otp-badge {
  font-size: 0.62rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--success);
  background: rgba(127, 191, 143, 0.12);
  border: 1px solid rgba(127, 191, 143, 0.35);
  padding: 1px 6px;
  border-radius: 999px;
}

.mail-snippet-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mail-date-tag {
  font-size: 0.68rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
}

.mail-chevron-ico {
  width: 13px;
  height: 13px;
  color: var(--text-dim);
  transition: transform 0.15s;
}

.mail-list-item:hover .mail-chevron-ico {
  color: var(--accent);
  transform: translateX(2px);
}

/* ══════════════════════════════════════════════════
   POPUP MODAL: Message Detail Viewer (Dark Themed)
   ══════════════════════════════════════════════════ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop[hidden],
[hidden] {
  display: none !important;
}

.modal-msg-box {
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 0.18s var(--ease);
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-dialog-box {
  width: 100%;
  max-width: 420px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
}

.msg-modal-topbar {
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.msg-modal-topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.msg-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--success);
  background: rgba(127, 191, 143, 0.12);
  padding: 2px 7px;
  font-weight: 600;
}

.msg-modal-topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-msg-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-msg-action.danger:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.btn-modal-close {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-modal-close:hover { color: var(--text); border-color: var(--accent); }

.msg-modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg-modal-subject {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
}

.msg-modal-sender-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sender-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sender-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sender-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
}

/* Smart Detection Banner in Modal */
.modal-smart-card {
  margin: 12px 16px 0;
  background: rgba(205, 189, 148, 0.08);
  border: 1px solid rgba(205, 189, 148, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-smart-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--accent);
}

.modal-smart-title svg { width: 12px; height: 12px; }

.modal-smart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-smart-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.modal-smart-label { font-size: 0.78rem; font-weight: 600; color: var(--text); }
.modal-smart-val {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-smart-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Mail Body Dark Container */
.msg-modal-body-scroll {
  padding: 14px 16px;
  overflow-y: auto;
  flex: 1;
}

.mail-body-container {
  background: #111215;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  min-height: 180px;
}

.mail-iframe-view {
  width: 100%;
  min-height: 180px;
  border: none;
  display: block;
  background: #111215;
}

.mail-text-plain {
  background: #111215;
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.mail-loading-text {
  padding: 24px;
  text-align: center;
  font-size: 0.8rem;
}

/* Form Modals */
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.modal-title { font-size: 0.98rem; font-weight: 700; color: var(--text); }
.modal-desc  { font-size: 0.78rem; margin-top: 2px; }

.modal-form-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--text);
  font-size: 0.82rem;
  outline: none;
}

.form-input:focus { border-color: var(--accent); }

/* Custom Styled Select */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--code-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23cdbd94' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

.form-select option {
  background: #19191b;
  color: #d9d4c7;
}

.form-tip-pill {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: var(--surface-2);
  padding: 7px 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.form-tip-pill svg { width: 12px; height: 12px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* ── Footer ── */
.footer-wrapper {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 14px 0;
}

.footer-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 8px;
}

.footer-left,
.footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-sep { color: var(--border); }

.author-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  transition: color 0.15s;
}

.author-link:hover {
  color: var(--accent-strong);
}

/* ── Toasts ── */
#toasts {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  animation: slideToast 0.15s var(--ease);
}

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

.toast.ok   { border-color: var(--success); color: var(--success); }
.toast.err  { border-color: var(--danger); color: var(--danger); }
.toast.info { border-color: var(--accent); color: var(--accent); }

/* Mobile */
@media (max-width: 640px) {
  .hide-mobile { display: none; }
  .actions-row { width: 100%; }
  .actions-row .btn { flex: 1; }
  .search-wrap input { width: 130px; }
  #toasts { left: 14px; right: 14px; bottom: 14px; }
  .modal-msg-box { max-height: 92vh; }
  .footer-container { flex-direction: column; text-align: center; gap: 4px; }
}
