/* ─────────────────────────────────────────────────────────────
   autosecured.net — Global Design System
   Font: Inter from Google Fonts (loaded per-page)
   ───────────────────────────────────────────────────────────── */

:root {
  /* Core palette */
  --bg:           #060610;
  --bg-elevated:  #0c0c1d;
  --bg-glass:     rgba(12, 12, 29, 0.7);
  --card:         #0f0f20;
  --card-hover:   #141428;
  --border:       #1e1e3a;
  --border-bright:#2d2d52;

  /* Text */
  --text:         #eeeeff;
  --text-dim:     #8080a8;
  --text-dimmer:  #5050708;

  /* Brand colours */
  --purple:       #a78bfa;
  --purple-deep:  #7c3aed;
  --purple-glow:  rgba(167, 139, 250, 0.18);
  --blue:         #60a5fa;
  --blue-deep:    #2563eb;
  --blue-glow:    rgba(96, 165, 250, 0.15);

  /* Semantic */
  --success:      #34d399;
  --success-glow: rgba(52, 211, 153, 0.2);
  --danger:       #f87171;
  --danger-glow:  rgba(248, 113, 113, 0.18);
  --warning:      #fbbf24;
  --spam:         #fb923c;

  /* Gradients */
  --gradient:        linear-gradient(135deg, var(--purple-deep), var(--blue-deep));
  --gradient-soft:   linear-gradient(135deg, rgba(124,58,237,0.3), rgba(37,99,235,0.25));
  --gradient-text:   linear-gradient(135deg, #c4b5fd, #93c5fd);
  --gradient-border: linear-gradient(135deg, var(--purple-deep), var(--blue-deep));

  /* Shape */
  --radius:    14px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.5);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.6);
  --shadow-purple: 0 8px 32px rgba(124,58,237,0.3);

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animated mesh background for key pages */
body.with-mesh {
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(124,58,237,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(37,99,235,0.14) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(124,58,237,0.08) 0%, transparent 50%),
    var(--bg);
}

h1, h2, h3 { margin: 0 0 4px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
p  { margin: 0; line-height: 1.6; }
a  { color: var(--purple); text-decoration: none; }
a:hover { color: var(--blue); }

/* ── Typography scale ────────────────────────────────────── */
.text-xs   { font-size: 0.72rem; }
.text-sm   { font-size: 0.82rem; }
.text-base { font-size: 0.92rem; }
.text-lg   { font-size: 1.05rem; }
.text-xl   { font-size: 1.2rem; }
.text-2xl  { font-size: 1.5rem; }
.text-dim  { color: var(--text-dim); }
.font-mono { font-family: 'Cascadia Code', 'JetBrains Mono', ui-monospace, monospace; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ── Inputs ──────────────────────────────────────────────── */
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}
.label-inline { margin-bottom: 0; }

input, select, textarea {
  width: 100%;
  margin-top: 5px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
input:hover, select:hover { border-color: var(--border-bright); }
input:focus, select:focus, textarea:focus {
  border-color: var(--purple);
  background: rgba(167,139,250,0.04);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.18);
}
input::placeholder { color: var(--text-dim); opacity: 0.6; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.1s var(--ease), opacity 0.15s, box-shadow 0.2s, background 0.15s;
  white-space: nowrap;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--gradient);
  box-shadow: 0 2px 12px rgba(124,58,237,0.35);
}
.btn-primary:hover { box-shadow: 0 4px 20px rgba(124,58,237,0.5); opacity: 0.95; }

.btn-secondary {
  background: var(--card-hover);
  border: 1px solid var(--border-bright);
}
.btn-secondary:hover { border-color: var(--purple); background: var(--card); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-bright); background: rgba(255,255,255,0.03); }

.btn-danger {
  background: rgba(248,113,113,0.1);
  color: #fca5a5;
  border: 1px solid rgba(248,113,113,0.25);
}
.btn-danger:hover { background: rgba(248,113,113,0.18); border-color: rgba(248,113,113,0.4); }

.btn-warning {
  background: rgba(251,191,36,0.1);
  color: #fcd34d;
  border: 1px solid rgba(251,191,36,0.25);
}
.btn-warning:hover { background: rgba(251,191,36,0.18); }

.btn-spam {
  background: rgba(251,146,60,0.12);
  color: #fdba74;
  border: 1px solid rgba(251,146,60,0.3);
}
.btn-spam:hover { background: rgba(251,146,60,0.22); }

.btn-spam-stop {
  background: rgba(248,113,113,0.1);
  color: #fca5a5;
  border: 1px solid rgba(248,113,113,0.25);
}
.btn-spam-stop:hover { background: rgba(248,113,113,0.2); }

.btn-action {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}
.btn-action:hover { border-color: var(--purple); color: var(--text); background: var(--purple-glow); }

.btn-sm    { padding: 5px 10px; font-size: 0.76rem; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-row   { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-col   { display: flex; flex-direction: column; gap: 8px; }
.btn-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.btn-toggle-on {
  background: rgba(167,139,250,0.15);
  border: 1px solid rgba(167,139,250,0.4);
  color: #c4b5fd;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-bright); }
.card-header { margin-bottom: 16px; }
.row-between { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ── Tags / Badges ────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}
.tag-green   { background: rgba(52,211,153,0.12); color: #6ee7b7; border: 1px solid rgba(52,211,153,0.2); }
.tag-gray    { background: rgba(255,255,255,0.05); color: var(--text-dim); border: 1px solid var(--border); }
.tag-red     { background: rgba(248,113,113,0.1);  color: #fca5a5;  border: 1px solid rgba(248,113,113,0.2); }
.tag-purple  { background: rgba(167,139,250,0.1);  color: #c4b5fd;  border: 1px solid rgba(167,139,250,0.2); }
.tag-blue    { background: rgba(96,165,250,0.1);   color: #93c5fd;  border: 1px solid rgba(96,165,250,0.2); }
.tag-yellow  { background: rgba(251,191,36,0.1);   color: #fcd34d;  border: 1px solid rgba(251,191,36,0.2); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.badge-valid       { background: rgba(52,211,153,0.12); color: #6ee7b7; }
.badge-invalid     { background: rgba(248,113,113,0.12); color: #fca5a5; }
.badge-pending     { background: rgba(251,191,36,0.12); color: #fcd34d; }
.badge-connected   { background: rgba(52,211,153,0.12); color: #6ee7b7; }
.badge-connecting  { background: rgba(251,191,36,0.12); color: #fcd34d; }
.badge-follow      { background: rgba(167,139,250,0.12); color: #c4b5fd; }
.badge-disconnected{ background: rgba(255,255,255,0.05); color: var(--text-dim); }
.badge-spam        { background: rgba(251,146,60,0.12); color: #fdba74; }

/* ── Stat grid ────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0.4;
  pointer-events: none;
}
.stat-card:hover { border-color: var(--border-bright); transform: translateY(-1px); }
.stat-icon  { font-size: 1.2rem; margin-bottom: 6px; }
.stat-value { font-size: 1.7rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.stat-label { color: var(--text-dim); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }

/* ── Layout helpers ───────────────────────────────────────── */
.app-shell { max-width: 1200px; margin: 0 auto; padding: 20px; }
.two-col   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mt-6  { margin-top: 6px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.flex-1 { flex: 1; }
.muted  { color: var(--text-dim); font-size: 0.84rem; }

/* ── App Topbar (Mineflayer etc.) ─────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.tabs { display: flex; gap: 4px; }
.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.84rem;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}
.tab-btn:hover  { color: var(--text); background: rgba(255,255,255,0.04); }
.tab-btn.active {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 2px 10px rgba(124,58,237,0.3);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.whoami { color: var(--text-dim); font-size: 0.82rem; }
.tab-panel  { display: none; }
.tab-panel.active { display: block; }

/* ── Brand mark ───────────────────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1rem;
}
.brand-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 10px rgba(124,58,237,0.6);
  flex-shrink: 0;
}

/* ── Login page ───────────────────────────────────────────── */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-card {
  width: 360px;
  background: rgba(15, 15, 32, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.05);
}
.login-card h1 {
  margin: 6px 0 24px;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.login-card .brand { margin-bottom: 4px; }
.login-card .brand-dot { width: 11px; height: 11px; }
.error-text {
  color: var(--danger);
  font-size: 0.82rem;
  min-height: 1em;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Skin / avatar ────────────────────────────────────────── */
.skin-wrap { position: relative; flex-shrink: 0; }
.skin-avatar     { width: 32px; height: 32px; border-radius: 5px; image-rendering: pixelated; display: block; }
.skin-avatar-lg  { width: 40px; height: 40px; border-radius: 6px; image-rendering: pixelated; display: block; }
.skin-initial {
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient); border-radius: 5px;
  font-weight: 700; font-size: 0.9rem; color: #fff;
  width: 32px; height: 32px; flex-shrink: 0;
}
.skin-initial.skin-avatar-lg { width: 40px; height: 40px; font-size: 1.1rem; border-radius: 6px; }

/* ── Account rows ─────────────────────────────────────────── */
.account-list { display: flex; flex-direction: column; gap: 8px; }
.account-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  flex-wrap: wrap;
  transition: border-color 0.15s, background 0.15s;
}
.account-row:hover { border-color: var(--border-bright); background: var(--card-hover); }
.account-row .left { display: flex; align-items: center; gap: 10px; }
.account-name  { font-weight: 600; font-size: 0.9rem; }
.account-meta  { color: var(--text-dim); font-size: 0.75rem; margin-top: 1px; }

/* ── Bot cards ────────────────────────────────────────────── */
.bot-list { display: flex; flex-direction: column; gap: 10px; }
.bot-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: border-color 0.2s;
}
.bot-card:hover { border-color: var(--border-bright); }
.bot-card-head  { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bot-card-head .left { display: flex; align-items: center; }
.bot-section { margin-top: 12px; }
.bot-section-label {
  font-size: 0.69rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px;
}
.bot-controls { display: flex; gap: 6px; flex-wrap: wrap; }

.bot-follow-section {
  background: rgba(167,139,250,0.04);
  border: 1px solid rgba(167,139,250,0.15);
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color 0.2s;
}
.bot-follow-section.bot-follow-active {
  background: rgba(167,139,250,0.1);
  border-color: rgba(167,139,250,0.35);
}
.bot-follow-row { display: flex; align-items: center; gap: 8px; }
.bot-follow-row .follow-input { flex: 1; margin-top: 0; padding: 7px 10px; }
.follow-hint   { font-size: 0.75rem; color: var(--text-dim); margin-top: 6px; }
.follow-status { font-size: 0.75rem; color: #c4b5fd; margin-top: 6px; }

.bot-chat-row { display: flex; gap: 8px; }
.bot-chat-row input { margin-top: 0; }
.bot-live-stats { margin-top: 8px; font-size: 0.8rem; }
.connect-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.connect-form input { margin-top: 0; width: 140px; }

/* ── Bot log ──────────────────────────────────────────────── */
.bot-log-wrap { margin-top: 12px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.bot-log-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 10px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--border);
}
.bot-log-title { font-size: 0.72rem; font-weight: 700; color: var(--text-dim); letter-spacing: 0.05em; text-transform: uppercase; }
.btn-clear-log {
  background: transparent; border: none; color: var(--text-dim);
  font-size: 0.72rem; cursor: pointer; padding: 1px 6px; border-radius: 4px; font-family: inherit;
}
.btn-clear-log:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.bot-log {
  max-height: 160px; overflow-y: auto;
  font-family: 'Cascadia Code', 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.73rem; line-height: 1.65;
  padding: 8px 10px;
  background: rgba(0,0,0,0.25);
}
.log-empty  { color: rgba(150,150,180,0.35); font-style: italic; }
.log-line   { white-space: pre-wrap; word-break: break-all; }
.log-time   { color: rgba(150,150,180,0.4); }
.log-ok     { color: #6ee7b7; }
.log-err    { color: #fca5a5; }
.log-warn   { color: #fcd34d; }
.log-chat   { color: #93c5fd; }

/* ── Swarm ────────────────────────────────────────────────── */
.swarm-roster-card { padding: 20px; }
.swarm-roster-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.swarm-select-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.swarm-count-chip {
  padding: 4px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text-dim);
  transition: all 0.15s;
}
.swarm-count-active { background: var(--purple-glow); border-color: rgba(167,139,250,0.4); color: #d8b4fe; }
.swarm-roster-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; max-height: 340px; overflow-y: auto; padding: 2px; }
.swarm-roster-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  transition: border-color 0.15s, background 0.15s; user-select: none;
}
.swarm-roster-row:hover { border-color: var(--purple); background: var(--card-hover); }
.swarm-roster-row input[type=checkbox] { width: 16px; height: 16px; margin: 0; flex-shrink: 0; cursor: pointer; accent-color: var(--purple); }
.swarm-roster-row.row-invalid { opacity: 0.45; }
.swarm-bot-info { flex: 1; min-width: 0; }
.swarm-bot-name { font-weight: 600; font-size: 0.88rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swarm-bot-sub  { font-size: 0.72rem; color: var(--text-dim); display: block; }
.swarm-bot-badges { display: flex; gap: 4px; flex-wrap: wrap; flex-shrink: 0; }
.swarm-controls-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .swarm-controls-grid { grid-template-columns: 1fr; } }
.swarm-col { display: flex; flex-direction: column; gap: 0; }
.swarm-section-card { padding: 18px; }
.swarm-section-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 14px; letter-spacing: -0.01em; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.chat-once-row { display: flex; gap: 8px; margin-bottom: 14px; }
.chat-once-row input { margin-top: 0; }
.spam-divider {
  display: flex; align-items: center; gap: 10px; margin: 12px 0;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; color: var(--spam);
}
.spam-divider::before, .spam-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, transparent, rgba(251,146,60,0.3), transparent);
}
.spam-status { margin-top: 8px; color: var(--spam); min-height: 1em; font-size: 0.82rem; }
.swarm-follow-card { border: 1px solid rgba(167,139,250,0.2) !important; background: rgba(167,139,250,0.05) !important; }
.swarm-follow-status { margin-top: 8px; font-size: 0.78rem; min-height: 1.2em; }
.preset-list { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; }
.preset-list .account-row { padding: 10px 12px; }

/* ── Device code ──────────────────────────────────────────── */
.device-code {
  font-size: 1.6rem; font-weight: 700; letter-spacing: 4px; text-align: center; margin: 16px 0;
  background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── Modal ────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 420px;
  max-width: 92vw;
  box-shadow: var(--shadow-lg);
}
.modal-box h3 { margin-bottom: 10px; }
.modal-box textarea {
  width: 100%; min-height: 120px; margin-top: 6px; padding: 10px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: rgba(255,255,255,0.03); color: var(--text);
  font-family: ui-monospace, monospace; font-size: 0.8rem; resize: vertical;
}
.modal-box textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124,58,237,0.18); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ── Toasts ───────────────────────────────────────────────── */
.toast-root {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px; z-index: 1000;
}
.toast {
  background: rgba(15,15,32,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.2s var(--ease);
  max-width: 340px;
  word-break: break-word;
}
.toast.error   { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Scrollbars ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-bright); }

/* ── Upload drop zone ─────────────────────────────────────── */
.upload-drop {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.upload-drop:hover, .upload-drop.drag-over {
  border-color: var(--purple);
  background: var(--purple-glow);
  color: var(--text);
}

/* ── Pulse animation ──────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
