/* Squads Multisig Verifier — Institutional Grade */

:root {
  --bg: #0a0a0c;
  --bg-surface: rgba(255, 255, 255, 0.03);
  --bg-surface-solid: #131316;
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-elevated: rgba(255, 255, 255, 0.08);
  --bg-inset: rgba(0, 0, 0, 0.35);

  --fg: #ededf0;
  --fg-secondary: #8a8a96;
  --fg-muted: #52525c;
  --fg-faint: rgba(255, 255, 255, 0.06);

  --accent: #3dd68c;
  --accent-hover: #34c47e;
  --accent-muted: rgba(61, 214, 140, 0.10);
  --accent-glow: rgba(61, 214, 140, 0.15);

  --yellow: #e8b730;
  --yellow-muted: rgba(232, 183, 48, 0.10);
  --red: #e85454;
  --red-muted: rgba(232, 84, 84, 0.10);
  --blue: #5b9ef0;
  --blue-muted: rgba(91, 158, 240, 0.10);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);

  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f2f2f5;
    --bg-surface: rgba(255, 255, 255, 0.75);
    --bg-surface-solid: #ffffff;
    --bg-hover: rgba(0, 0, 0, 0.03);
    --bg-elevated: rgba(0, 0, 0, 0.06);
    --bg-inset: rgba(0, 0, 0, 0.04);
    --fg: #111113;
    --fg-secondary: #64646e;
    --fg-muted: #9494a0;
    --fg-faint: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.12);
  }
}

/* ─── Reduced Motion ─── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Reset ─── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app { min-height: 100%; }

/* ─── Focus Styles ─── */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Layout ─── */

.app {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 40px 80px;
  min-height: 100vh;
}

/* ─── Header ─── */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--fg-faint);
  margin-bottom: 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
}

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

.header-left img { height: 20px; width: auto; opacity: 0.7; }

.logo-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  letter-spacing: -0.01em;
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--fg-faint);
}

.header-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.header-stat-value {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.header-stat-sep {
  width: 1px;
  height: 14px;
  background: var(--fg-faint);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-wallet {
  font-family: var(--mono);
  font-size: 12px;
  border: 1px solid var(--fg-faint);
  background: var(--bg-surface-solid);
}

.address-bar {
  display: flex;
  align-items: center;
  background: var(--bg-surface-solid);
  border: 1px solid var(--fg-faint);
  border-radius: var(--radius-lg);
  padding: 6px 8px 6px 24px;
  margin-bottom: 32px;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.address-bar:focus-within {
  border-color: rgba(61, 214, 140, 0.3);
  box-shadow: var(--shadow-sm), 0 0 0 3px var(--accent-muted);
}

.address-bar:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.address-bar:focus-within:hover {
  border-color: rgba(61, 214, 140, 0.3);
}

.address-bar-input {
  flex: 1;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--fg);
  letter-spacing: 0.02em;
  padding: 14px 0;
  background: none;
  border: none;
  outline: none;
  min-width: 0;
}

.address-bar-input::placeholder { color: var(--fg-muted); }

.address-bar--changed { border-color: rgba(61, 214, 140, 0.3); }
.address-bar--changed .btn-refresh { background: var(--accent); color: #000; }
.address-bar--changed .btn-refresh:hover { background: var(--accent-hover); }

.address-bar--invalid { border-color: rgba(232, 84, 84, 0.3); }

.address-bar-hint {
  font-size: 12px;
  padding: 4px 4px 0;
  margin-top: -24px;
  margin-bottom: 24px;
}

.address-bar-hint--error { color: var(--red); }

.address-bar .btn-refresh {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--bg-hover);
  border: none;
  color: var(--fg-muted);
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.address-bar .btn-refresh:hover {
  background: var(--bg-elevated);
  color: var(--fg);
}

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  background: var(--bg-surface);
  color: var(--fg-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1.15;
}

.btn:hover { background: var(--bg-hover); color: var(--fg); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(61, 214, 140, 0.2);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #000;
  box-shadow: 0 4px 16px rgba(61, 214, 140, 0.3);
}

.setup .btn-primary {
  width: 100%;
  padding: 16px;
  font-size: 15px;
  border-radius: var(--radius);
  margin-top: 12px;
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red-muted);
}
.btn-danger:hover { background: var(--red-muted); border-color: transparent; }

.btn-sm { padding: 6px 12px; font-size: 12px; }

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--fg-secondary); }

.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--fg-muted);
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  font-weight: 500;
  transition: color var(--transition-fast);
}
.btn-link:hover { color: var(--fg-secondary); }

/* ─── Section Header ─── */

.section-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 4px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--fg-faint);
}

/* ─── Proposal List ─── */

.proposal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--bg-surface-solid);
  border-radius: var(--radius);
  margin-bottom: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid var(--fg-faint);
  border-left: 3px solid var(--fg-faint);
  position: relative;
}

.proposal-row:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.08);
  border-left-color: rgba(255, 255, 255, 0.12);
}

.proposal-row--expanded {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: 0;
  border-bottom-color: transparent;
  background: var(--bg-surface-solid);
  border-left-color: var(--accent);
}

.proposal-row--expanded:hover {
  transform: none;
}

.proposal-row-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.proposal-index {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--fg);
  min-width: 48px;
  letter-spacing: -0.02em;
}

.proposal-approvals {
  font-size: 13px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}

/* ─── Status Dot ─── */

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: transparent;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status--active .status-dot  { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow), 0 0 2px var(--accent); }
.status--active              { color: var(--accent); background: var(--accent-muted); }

.status--approved .status-dot { background: var(--blue); box-shadow: 0 0 6px var(--blue-muted); }
.status--approved             { color: var(--blue); background: var(--blue-muted); }

.status--rejected .status-dot { background: var(--red); }
.status--rejected             { color: var(--red); background: var(--red-muted); }

.status--executed .status-dot { background: var(--fg-muted); }
.status--executed             { color: var(--fg-muted); }

.status--draft .status-dot    { background: var(--yellow); }
.status--draft                { color: var(--yellow); background: var(--yellow-muted); }

.status--cancelled .status-dot { background: var(--fg-muted); opacity: 0.4; }
.status--cancelled             { color: var(--fg-muted); }

/* ─── Proposal Detail ─── */

.proposal-detail {
  border-radius: 0 0 var(--radius) var(--radius);
  margin: 0 0 4px 0;
  padding: 24px;
  background: var(--bg-surface-solid);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid var(--fg-faint);
  box-shadow: var(--shadow-md);
  animation: detailIn 0.2s ease;
}

@keyframes detailIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Instruction Card (Collapsible) ─── */

.ix-card {
  background: var(--bg-surface-solid);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  font-size: 13px;
  border: 1px solid var(--fg-faint);
  overflow: hidden;
}

.ix-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.ix-summary:hover { background: var(--bg-hover); }

.ix-summary-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.ix-summary-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  color: var(--fg);
}

.ix-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ix-badge.known { background: var(--accent-muted); color: var(--accent); }
.ix-badge.unknown { background: var(--yellow-muted); color: var(--yellow); }

.ix-program-name {
  font-size: 11px;
  color: var(--fg-muted);
  font-family: var(--mono);
  flex-shrink: 0;
}

.ix-chevron {
  color: var(--fg-muted);
  font-size: 12px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.ix-detail {
  padding: 0 16px 16px;
  border-top: 1px solid var(--fg-faint);
}

.ix-raw-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 14px;
  margin-bottom: 6px;
}

/* ─── Explorer Link (on proposal row) ─── */

.explorer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--fg-muted);
  font-size: 14px;
  text-decoration: none;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.explorer-link:hover {
  background: var(--bg-elevated);
  color: var(--fg);
}

/* ─── Accounts Table ─── */

.accounts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-family: var(--mono);
  margin-top: 12px;
}

.accounts-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--fg-muted);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.accounts-table td {
  padding: 6px 10px;
  border-top: 1px solid var(--fg-faint);
}

.flag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.flag-w { background: var(--yellow-muted); color: var(--yellow); }
.flag-s { background: var(--blue-muted); color: var(--blue); }

/* ─── Raw Data ─── */

.raw-hex {
  font-family: var(--mono);
  font-size: 11px;
  word-break: break-all;
  color: var(--fg-muted);
  background: var(--bg);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  max-height: 120px;
  overflow-y: auto;
  margin-top: 8px;
  line-height: 1.7;
  border: 1px solid var(--fg-faint);
}

/* ─── Detail Cards ─── */

.detail-card {
  background: var(--bg-inset);
  border: 1px solid var(--fg-faint);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 12px;
}

.detail-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.detail-card-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  letter-spacing: 0.06em;
  font-size: 11px;
}

/* ─── Threshold Progress ─── */

.threshold-count {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.threshold-current { color: var(--accent); }
.threshold-sep { color: var(--fg-muted); margin: 0 2px; }

.progress-bar {
  height: 3px;
  background: var(--fg-faint);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 20px;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.progress-fill--complete {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ─── Approval Header ─── */

.approval-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-bottom: 16px;
  padding: 2px 0;
}

.approval-header:hover .ix-chevron { color: var(--fg-secondary); }

.approval-header-left { display: flex; align-items: center; gap: 8px; }
.approval-header-right { display: flex; align-items: center; gap: 12px; }

/* ─── Member Grid ─── */

.member-section {
  border-top: 1px solid var(--fg-faint);
  padding-top: 16px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

@media (max-width: 700px) {
  .member-grid { grid-template-columns: repeat(2, 1fr); }
}

.member-card {
  background: var(--bg-surface-solid);
  border: 1px solid var(--fg-faint);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color var(--transition-fast);
}

.member-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.member-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.member-status-text {
  font-size: 12px;
  font-weight: 600;
}

.member-pending .member-status-dot { background: var(--fg-muted); }
.member-pending .member-status-text { color: var(--fg-muted); }

.member-approved .member-status-dot { background: var(--accent); box-shadow: 0 0 4px var(--accent-glow); }
.member-approved .member-status-text { color: var(--accent); }
.member-approved { border-color: rgba(61, 214, 140, 0.15); }

.member-rejected .member-status-dot { background: var(--red); }
.member-rejected .member-status-text { color: var(--red); }
.member-rejected { border-color: rgba(232, 84, 84, 0.15); }

.member-cancelled .member-status-dot { background: var(--fg-muted); opacity: 0.5; }
.member-cancelled .member-status-text { color: var(--fg-muted); }

.member-addr {
  font-size: 12px;
}

.badge-you {
  font-size: 9px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent-muted);
  padding: 2px 6px;
  border-radius: 9999px;
  margin-left: auto;
}

/* ─── Voted Status ─── */

.voted-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  background: var(--fg-faint);
  color: var(--fg-muted);
}

.voted-approved {
  background: var(--accent-muted);
  color: var(--accent);
}

.voted-rejected {
  background: var(--red-muted);
  color: var(--red);
}

/* ─── Section Label ─── */

.section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 28px;
  margin-bottom: 12px;
}

/* ─── Actions ─── */

.actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--fg-faint);
}

.actions .btn-primary {
  padding: 12px 32px;
  flex: 1;
}

.actions .btn-danger {
  padding: 12px 24px;
}

/* ─── Setup Screen ─── */

.setup-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.setup {
  width: 100%;
  max-width: 480px;
  padding: 0 24px;
}

.setup-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.setup-logo img { height: 40px; width: auto; }
.setup-logo span {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.setup-card {
  background: var(--bg-surface-solid);
  border: 1px solid var(--fg-faint);
  border-radius: var(--radius-lg);
  padding: 48px 44px 44px;
}

.setup h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.setup p {
  color: var(--fg-secondary);
  font-size: 14px;
  margin-bottom: 32px;
  line-height: 1.5;
}

.setup .field { margin-bottom: 20px; }

.setup .field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-secondary);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.setup .field input, .setup .field select {
  background: var(--bg);
  border: 1px solid var(--fg-faint);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  font-size: 15px;
  padding: 14px 18px;
  border-radius: var(--radius);
}

.setup .field input:focus, .setup .field select:focus {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(255, 255, 255, 0.04);
  outline: none;
}

.setup .field input::placeholder { color: var(--fg-muted); }

.setup .hint {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 8px;
}

.setup .btn-primary {
  width: 100%;
  background: #fff;
  color: #000;
  font-size: 15px;
  font-weight: 600;
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: none;
  margin-top: 12px;
  letter-spacing: -0.01em;
}
.setup .btn-primary:hover {
  background: rgba(255, 255, 255, 0.92);
  color: #000;
  box-shadow: none;
}

.field { margin-bottom: 24px; }

.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field input, .field select {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--fg-faint);
  border-radius: var(--radius);
  background: var(--bg-surface-solid);
  color: var(--fg);
  font-size: 14px;
  font-family: var(--mono);
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.field input:focus, .field select:focus {
  border-color: rgba(61, 214, 140, 0.4);
  box-shadow: var(--shadow-sm), 0 0 0 3px var(--accent-muted);
}

.field input::placeholder { color: var(--fg-muted); }

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%2712%27 fill=%27%2356565f%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27M8 11L3 6h10z%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.field .hint {
  color: var(--fg-muted);
  font-size: 12px;
  margin-top: 10px;
  line-height: 1.5;
}

/* ─── Modal ─── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-surface-solid);
  border: 1px solid var(--fg-faint);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 420px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}

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

.modal h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

/* ─── Toast ─── */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  max-width: 360px;
  animation: toastIn 0.25s ease-out;
  background: var(--bg-surface-solid);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--fg-faint);
}

.toast-success { color: var(--accent); border-left: 3px solid var(--accent); }
.toast-error { color: var(--red); border-left: 3px solid var(--red); }
.toast-info { color: var(--blue); border-left: 3px solid var(--blue); }

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

/* ─── Address ─── */

.addr {
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  color: var(--fg-secondary);
  transition: color var(--transition-fast);
}
.addr:hover { color: var(--fg); }

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  color: var(--fg-muted);
  padding: 0 2px;
  font-family: var(--font);
  font-weight: 600;
  transition: color var(--transition-fast);
}
.copy-btn:hover { color: var(--fg-secondary); }

/* ─── Wallet Picker ─── */

.wallet-list { list-style: none; padding: 0; }

.wallet-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--fg-faint);
  border-radius: var(--radius);
  margin-bottom: 6px;
  cursor: pointer;
  width: 100%;
  background: transparent;
  color: var(--fg);
  font-size: 14px;
  font-family: var(--font);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.wallet-option:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

.wallet-option img { width: 28px; height: 28px; border-radius: 8px; }

/* ─── States ─── */

.loading, .empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--fg-muted);
  font-size: 14px;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.loading::before {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid var(--fg-faint);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Utilities ─── */

.error-inline { color: var(--red); font-size: 12px; display: none; margin-top: 10px; font-weight: 500; }
.error-inline.visible { display: block; }
.wallet-icon { border-radius: 4px; }
.flex { display: flex; }
.gap-sm { gap: 8px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.text-muted { color: var(--fg-muted); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-center { text-align: center; }
.p-lg { padding: 24px; }
.font-mono { font-family: var(--mono); }
.ml-sm { margin-left: 8px; }
.hidden { display: none; }

/* ─── Responsive ─── */

@media (max-width: 640px) {
  .app {
    padding: 0 20px 60px;
  }

  .header-stats {
    display: none;
  }

  .proposal-row {
    padding: 14px 16px;
  }

  .proposal-row-left { gap: 12px; }

  .proposal-detail {
    padding: 20px 16px;
  }

  .detail-card {
    padding: 20px 16px;
  }

  .member-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .setup-card {
    padding: 32px 24px 28px;
  }
}

