/* ============================================================
   Cevio Bots Dashboard — V2 Style
   Dark · Minimal · Large typography · Pill CTAs
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg:            #0a0a0a;
  --bg-elev:       #111111;
  --surface:       #141414;
  --surface-2:     #1a1a1a;
  --border:        #1f1f1f;
  --border-strong: #2a2a2a;
  --text:          #fafafa;
  --text-muted:    #888888;
  --text-dim:      #555555;
  --accent:        #ffffff;
  --accent-ink:    #000000;
  --success:       #4ade80;
  --error:         #f87171;
  --warn:          #fbbf24;
  --radius:        14px;
  --radius-lg:     20px;
  --radius-pill:   999px;
  --shadow:        0 10px 40px rgba(0, 0, 0, 0.4);
  --transition:    180ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

/* ============================================================
   Header
   ============================================================ */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px;
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
.brand {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-link:hover { color: var(--text); }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.user-name {
  font-size: 13px;
  font-weight: 500;
}
.logout {
  color: var(--text-muted);
  margin-left: 4px;
  padding: 0 6px;
  font-size: 16px;
  transition: color var(--transition);
}
.logout:hover { color: var(--text); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--text-muted);
}
.btn-lg {
  padding: 16px 32px;
  font-size: 15px;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* ============================================================
   Layout
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition);
}
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { color: var(--text-dim); }
.breadcrumb span:last-child { color: var(--text); }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.page-head-with-icon {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.page-head-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.page-title {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 12px;
}
.page-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 600px;
}

.big-guild-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}
.big-guild-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-muted);
}

/* ============================================================
   Landing
   ============================================================ */
.page-landing { background: var(--bg); }
.landing {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 48px 120px;
}
.hero-title {
  font-size: clamp(56px, 9vw, 128px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 32px;
}
.hero-accent {
  color: var(--text-muted);
}
.hero-sub {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.5;
  margin-bottom: 48px;
}
.hero-cta {
  display: flex;
  gap: 16px;
  margin-bottom: 120px;
  flex-wrap: wrap;
}
.hero-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
}
.feature h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================================
   Cards & grids
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.card:hover:not(.bot-card-disabled) {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.guild-card {
  flex-direction: row;
  align-items: center;
}
.guild-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}
.guild-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 22px;
  color: var(--text-muted);
}
.guild-meta {
  flex: 1;
  min-width: 0;
}
.guild-name {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.guild-tag {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.card-arrow {
  color: var(--text-muted);
  font-size: 14px;
  margin-left: auto;
  transition: transform var(--transition);
}
.card:hover .card-arrow { transform: translateX(4px); color: var(--text); }

/* Bot cards */
.bot-card { padding: 28px; }
.bot-card-name {
  font-size: 20px;
  font-weight: 700;
}
.bot-card-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
}
.bot-card-disabled {
  opacity: 0.6;
}
.bot-card-disabled .bot-card-name {
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  width: fit-content;
}
.badge-soon {
  border-color: var(--warn);
  color: var(--warn);
}

/* Module cards */
.module-section {
  margin-bottom: 48px;
}
.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.module-card {
  padding: 24px;
}
.module-card-soon {
  opacity: 0.65;
}
.module-icon {
  font-size: 28px;
  margin-bottom: 4px;
}
.module-name {
  font-size: 16px;
  font-weight: 600;
}
.module-desc {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  flex: 1;
}

/* ============================================================
   Settings forms
   ============================================================ */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.settings-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.settings-section-head h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.muted { color: var(--text-muted); font-size: 14px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.field:last-child { margin-bottom: 0; }
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.field input[type="text"],
.field input[type="number"],
.field textarea,
.field select,
input[type="text"],
input[type="number"],
textarea,
select {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color var(--transition);
  width: 100%;
}
textarea {
  resize: vertical;
  font-family: 'Inter', monospace;
  line-height: 1.5;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--text-muted);
}
input[type="color"] {
  height: 44px;
  padding: 4px;
  cursor: pointer;
  width: 80px;
}

.field-row {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.field-inline {
  margin-bottom: 0;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.field-inline label { margin: 0; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.hint {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}
.hint code {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.hint-warn { color: var(--warn); }

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-track {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  transition: all var(--transition);
}
.switch-track::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition);
}
.switch input:checked + .switch-track {
  background: var(--accent);
  border-color: var(--accent);
}
.switch input:checked + .switch-track::before {
  transform: translateX(20px);
  background: var(--accent-ink);
}

.form-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 8px;
}
.save-status {
  font-size: 13px;
  color: var(--text-muted);
}
.save-status.ok    { color: var(--success); }
.save-status.err   { color: var(--error); }
.save-status.saving{ color: var(--text-muted); }

/* ============================================================
   Empty states
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.empty-state h2, .empty-state h3 {
  font-size: 24px;
  font-weight: 700;
}
.empty-state p {
  color: var(--text-muted);
  max-width: 480px;
}
.big-emoji {
  font-size: 64px;
  margin-bottom: 8px;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 48px;
  color: var(--text-dim);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.site-footer a {
  color: var(--text-muted);
  transition: color var(--transition);
}
.site-footer a:hover { color: var(--text); }
.dot { color: var(--text-dim); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .site-header  { padding: 20px 24px; }
  .container    { padding: 32px 24px; }
  .landing      { padding: 48px 24px 80px; }
  .page-title   { font-size: 36px; }
  .settings-section { padding: 24px; }
  .settings-section-head { flex-direction: column; gap: 12px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head-with-icon { flex-direction: column; }
  .layout-with-preview { grid-template-columns: 1fr; }
  .preview-column { position: static; }
}

/* ============================================================
   Phase 2 — Two-column layout, preview, var picker, audit
   ============================================================ */

.container-wide {
  max-width: 1480px;
}

.layout-with-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 32px;
  align-items: start;
}
.preview-column {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- Preview pane ---------- */
.preview-pane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.preview-pane-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}
.preview-pane-body {
  padding: 18px;
  background: #2b2d31; /* Discord dark bg */
  min-height: 100px;
}
.preview-pane-foot {
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-dim);
}

/* ---------- Discord-style message ---------- */
.discord-msg { font-family: 'gg sans', 'Inter', sans-serif; color: #dbdee1; font-size: 14px; line-height: 1.4; }
.dc-empty   { color: #72767d; font-style: italic; font-size: 13px; }
.dc-row     { display: flex; gap: 14px; align-items: flex-start; }
.dc-avatar  { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.dc-content { flex: 1; min-width: 0; }
.dc-author  { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.dc-username { color: #f2f3f5; font-weight: 600; font-size: 15px; }
.dc-bot-tag {
  background: #5865f2;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}
.dc-time { color: #949ba4; font-size: 11px; margin-left: 4px; }
.dc-text { color: #dbdee1; word-wrap: break-word; }
.dc-text strong { color: #fff; font-weight: 700; }
.dc-mention {
  background: rgba(88, 101, 242, 0.3);
  color: #c9cdfb;
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 500;
  cursor: pointer;
}
.dc-code {
  background: #2b2d31;
  border: 1px solid #1e1f22;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 12px;
  font-family: 'Consolas', 'Monaco', monospace;
}
.dc-embed {
  margin-top: 6px;
  background: #2b2d31;
  border-left: 4px solid #ffffff;
  border-radius: 4px;
  padding: 10px 14px;
  max-width: 520px;
}
.dc-embed-desc { color: #dbdee1; }

/* ---------- Variable picker ---------- */
.field-textarea-vars { display: flex; flex-direction: column; gap: 8px; }
.var-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.var-picker-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
}
.var-chip {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  cursor: pointer;
  transition: all var(--transition);
}
.var-chip code {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Consolas', 'Monaco', monospace;
  background: none;
  border: none;
  padding: 0;
}
.var-chip:hover {
  background: var(--surface-2);
  border-color: var(--text-muted);
}
.var-chip:hover code { color: var(--text); }

/* ---------- Color picker (combined) ---------- */
.field-color { margin-bottom: 0; }
.color-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.color-input-wrap input[type="color"] {
  width: 48px;
  height: 40px;
  padding: 3px;
}
.color-hex {
  width: 100px !important;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  text-transform: uppercase;
}

/* ---------- Select wrap (consistency) ---------- */
.select-wrap { position: relative; }

/* ---------- Audit log ---------- */
.audit-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
}
.audit-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.audit-row:hover { background: var(--surface-2); }
.audit-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}
.audit-body { flex: 1; min-width: 0; }
.audit-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
}
.audit-line strong { color: var(--text); font-weight: 600; }
.audit-action { color: var(--text-muted); }
.audit-module {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  font-size: 12px;
  color: var(--text);
  font-family: 'Consolas', 'Monaco', monospace;
}
.audit-details {
  margin-top: 8px;
  font-size: 12px;
}
.audit-details summary {
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.audit-details summary::-webkit-details-marker { display: none; }
.audit-details summary::before { content: '▸ '; }
.audit-details[open] summary::before { content: '▾ '; }
.audit-details summary:hover { color: var(--text-muted); }
.audit-details pre {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 8px;
  overflow-x: auto;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
  font-family: 'Consolas', 'Monaco', monospace;
}
.audit-time {
  font-size: 12px;
  color: var(--text-dim);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ============================================================
   Phase 3 — Toast, Confirm, Multi-pickers, Number, Strikes
   ============================================================ */

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 48px);
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.02);
  font-size: 14px;
  color: var(--text);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms;
}
.toast.toast-in  { transform: translateX(0); opacity: 1; }
.toast.toast-out { transform: translateX(120%); opacity: 0; }

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.toast-success .toast-icon { background: rgba(74, 222, 128, 0.15); color: var(--success); }
.toast-error   .toast-icon { background: rgba(248, 113, 113, 0.15); color: var(--error); }
.toast-info    .toast-icon { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); }
.toast-loading .toast-icon { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--error); }
.toast-info    { border-left: 3px solid var(--text-muted); }
.toast-loading { border-left: 3px solid var(--text-muted); }

.toast-message { flex: 1; line-height: 1.4; }
.toast-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color var(--transition);
}
.toast-close:hover { color: var(--text); }

/* ---------- Confirm dialog ---------- */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  opacity: 0;
  transition: opacity 180ms ease;
  padding: 24px;
}
.confirm-overlay.confirm-in { opacity: 1; }
.confirm-modal {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
}
.confirm-overlay.confirm-in .confirm-modal { transform: scale(1); }
.confirm-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.confirm-message {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Danger button */
.btn-danger {
  background: var(--error);
  color: #1a0a0a;
}
.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(248, 113, 113, 0.25);
}

/* ---------- Check-list (multi-pickers) ---------- */
.check-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.check-list::-webkit-scrollbar { width: 8px; }
.check-list::-webkit-scrollbar-track { background: transparent; }
.check-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
}
.check-item:hover { background: var(--surface); }
.check-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.check-dot {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.check-item input:checked + .check-dot {
  background: var(--accent);
  border-color: var(--accent);
}
.check-item input:checked + .check-dot::after {
  content: '✓';
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
}
.check-label {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Number field ---------- */
.number-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.number-wrap input[type="number"] {
  padding-right: 56px;
  -moz-appearance: textfield;
}
.number-wrap input[type="number"]::-webkit-inner-spin-button,
.number-wrap input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.number-suffix {
  position: absolute;
  right: 14px;
  color: var(--text-dim);
  font-size: 12px;
  pointer-events: none;
  text-transform: lowercase;
}

/* ---------- Threshold grid (strikes page) ---------- */
.threshold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.threshold-grid .field { margin-bottom: 0; }

/* ---------- Field row enhancement ---------- */
.field-row > .field { flex: 1; min-width: 180px; margin-bottom: 0; }
