/* Palette/typography identical to the original Lançar Token Bot
   (github.com/alemaxxx/lauch-token) - on purpose, to keep the visual
   identity between the full bot and this DBC-focused cut. */
:root {
  --bg: #0a0d12;
  --panel: #12161d;
  --panel-alt: #171c25;
  --border: #232935;
  --text: #e6e9ef;
  --text-muted: #7c8698;
  --text-faint: #e6e9ef; /* was #4d5566 (too dark to read against --bg) - brightened 2026-09-26 */

  --accent-warm: #f0a73c;
  --accent-hot: #ff6b4a;
  --accent-success: #3ecf8e;
  --accent-info: #5aa9e6;
  --accent-mine: #b892ff;
  --accent-error: #ff5c5c;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
}

.app { max-width: 900px; margin: 0 auto; padding: 24px 20px 64px; }

/* ---- topbar ---- */
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.eyebrow {
  display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px;
}
.topbar h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.tagline { font-size: 13px; color: var(--text-muted); line-height: 1.5; max-width: 56ch; margin-top: 6px; }

.stat { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.stat__label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.stat__value { font-size: 14px; font-weight: 600; color: var(--text); font-family: var(--font-mono); }
.topbar__right { display: flex; align-items: center; gap: 16px; }
#wallet-connect-btn.is-connected { border-color: var(--accent-mine); color: var(--accent-mine); }

/* ---- copy button (wallet/mint address) ---- */
.copy-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; padding: 0; margin-left: 2px;
  border: 1px solid var(--border); border-radius: 4px; background: transparent;
  color: var(--text-faint); font-size: 12px; line-height: 1; cursor: pointer; vertical-align: middle;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent-info); }

/* ---- launch panel ---- */
.panel {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; margin: 28px 0 24px;
}
.panel__title { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.panel__subtitle { font-size: 12px; color: var(--text-faint); margin: 0 0 18px; line-height: 1.5; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.field input, .field select {
  font-family: var(--font-mono); font-size: 13px; color: var(--text); background: var(--panel-alt);
  border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent-info); }
.field__hint { font-size: 11px; color: var(--text-faint); line-height: 1.45; margin: 4px 0 0; }

.image-row { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.image-preview {
  width: 84px; height: 84px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--border); background: var(--panel-alt); flex-shrink: 0;
}
.image-actions { display: flex; flex-direction: column; gap: 6px; }

/* #preset-chips holds one <select> PER preset.group (2026-09-26,
   replacing a single dropdown with <optgroup> sections) - each is a
   normal .field, just nested and tightened up a bit since they're all
   sub-parts of the outer "Curve preset" field rather than independent
   top-level fields. */
.preset-group-selects { display: flex; flex-direction: column; gap: 10px; }
.preset-group-selects .field { margin-bottom: 0; }
.preset-group-selects .field label { color: var(--text); font-weight: 600; }

.btn-secondary, .btn-primary, .btn-danger {
  font-family: var(--font-display); font-weight: 600; font-size: 13px; border-radius: 8px;
  padding: 10px 18px; cursor: pointer; border: 1px solid var(--border);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
}
.btn-secondary { background: transparent; color: var(--text-muted); }
.btn-secondary:hover { color: var(--text); }
.btn-primary { background: var(--accent-mine); color: var(--bg); border-color: var(--accent-mine); }
.btn-primary:hover { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.5; cursor: default; }
.btn-primary:active:not(:disabled), .btn-danger:active:not(:disabled) { transform: translateY(1px); }
.btn-danger { background: var(--accent-hot); color: #1a0d08; border-color: var(--accent-hot); }
.btn-danger:hover { opacity: 0.88; }

.warning-box {
  font-size: 12px; color: var(--accent-warm); line-height: 1.55; margin: 14px 0 0;
  background: rgba(240, 167, 60, 0.08); border: 1px solid rgba(240, 167, 60, 0.25);
  border-radius: 8px; padding: 10px 12px;
}
.error-box {
  font-size: 12px; color: var(--accent-hot); margin: 12px 0 0;
  background: rgba(255, 107, 74, 0.08); border: 1px solid rgba(255, 107, 74, 0.25);
  border-radius: 8px; padding: 10px 12px;
}
.success-box {
  font-size: 12px; color: var(--accent-success); margin: 12px 0 0; word-break: break-word;
  background: rgba(62, 207, 142, 0.08); border: 1px solid rgba(62, 207, 142, 0.25);
  border-radius: 8px; padding: 10px 12px; line-height: 1.6;
}

/* ---- launched tokens table ---- */
.subsection-title {
  margin: 8px 0 8px; font-size: 14px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; min-width: 640px; }
.grid thead th {
  text-align: left; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 600; padding: 12px 16px; background: var(--panel-alt);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.grid tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: top; }
.grid tbody tr:last-child td { border-bottom: none; }
.grid tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

.pool-name { font-weight: 600; }
.pool-addr { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.mono { font-family: var(--font-mono); color: var(--text-muted); font-size: 12px; }
.fee-rate__base { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px;
  font-weight: 500; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--text-muted); white-space: nowrap;
}
.pill--pending { color: var(--accent-warm); }
.pill--success { color: var(--accent-success); }
.pill--error { color: var(--accent-hot); }

.sf-meteora-link { color: var(--accent-info); text-decoration: underline; font-size: 12px; white-space: nowrap; }
.sf-meteora-link:hover { color: var(--text); }
.sf-action-btn {
  font-family: var(--font-display); font-weight: 600; font-size: 12px; border-radius: 6px;
  padding: 6px 12px; cursor: pointer; border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); white-space: nowrap;
}
.sf-action-btn:hover:not(:disabled) { color: var(--text); border-color: var(--text-muted); }
.sf-action-btn:disabled { cursor: default; opacity: 0.7; }
.dbc-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 4px; }

.empty-state { margin: 32px auto; max-width: 420px; text-align: center; color: var(--text-muted); font-size: 13px; line-height: 1.6; }

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
  .stat { align-items: flex-start; }
}

/* ---- confirmation modal (uiKit.js) + toast ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal {
  width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal__header { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal__header h2 { margin: 0; font-size: 16px; letter-spacing: 0.02em; }
.modal__body { padding: 20px; }
.confirm-modal__message { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-muted); }
.modal__footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border); }

.wallet-picker { display: flex; flex-direction: column; gap: 6px; }
.wallet-picker__item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--panel-alt); color: var(--text);
  font-family: var(--font-display); font-size: 14px; font-weight: 600; cursor: pointer; text-align: left;
}
.wallet-picker__item:hover { border-color: var(--accent-mine); }
.wallet-picker__item img { width: 24px; height: 24px; border-radius: 6px; flex-shrink: 0; }

.toast-stack {
  position: fixed; bottom: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column-reverse;
  gap: 10px; max-width: min(380px, calc(100vw - 40px)); pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0; transform: translateY(10px) scale(0.98); transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
}
.toast.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.toast__icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.toast__icon svg { display: block; width: 100%; height: 100%; }
.toast__msg { flex: 1; font-size: 13px; line-height: 1.45; color: var(--text); word-break: break-word; }
.toast__close { flex-shrink: 0; background: none; border: none; color: var(--text-faint); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 0 0 4px; }
.toast__close:hover { color: var(--text); }
.toast--success { border-color: rgba(62, 207, 142, 0.4); }
.toast--success .toast__icon { color: var(--accent-success); }
.toast--error { border-color: rgba(255, 92, 92, 0.4); }
.toast--error .toast__icon { color: var(--accent-error); }
.toast--warning { border-color: rgba(240, 167, 60, 0.4); }
.toast--warning .toast__icon { color: var(--accent-warm); }
.toast--info { border-color: rgba(90, 169, 230, 0.4); }
.toast--info .toast__icon { color: var(--accent-info); }

@media (max-width: 480px) { .toast-stack { left: 16px; right: 16px; max-width: none; } }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-info); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .toast, .btn-primary, .btn-secondary, .btn-danger { transition: none; }
}
