:root {
  --bg: #10131b;
  --bg-sidebar: #141824;
  --bg-header: rgba(20, 24, 36, 0.88);
  --bg-card: #191e2c;
  --bg-card-hover: #202638;
  --bg-subtle: #141825;
  --bg-input: #10141f;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --inner-glow: inset 0 1px 0 rgba(255, 255, 255, 0.05);

  --text: #d4dae8;
  --text-strong: #f3f6fc;
  --muted: #8490a8;

  --accent: #6366f1;
  --accent-hover: #7578f8;
  --accent-light: #9396ff;
  --accent-soft: rgba(99, 102, 241, 0.15);

  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.13);
  --cyan: #38bdf8;
  --cyan-soft: rgba(56, 189, 248, 0.13);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.13);
  --violet: #c084fc;
  --violet-soft: rgba(192, 132, 252, 0.13);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.13);
  --purple: #a78bfa;

  --radius: 10px;
  --radius-sm: 7px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', ui-monospace, SFMono-Regular, Consolas, monospace;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.48;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.36); }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.text-xs { font-size: 11.5px; }
.text-emerald { color: var(--emerald); }
.text-cyan { color: var(--cyan); }
.text-amber { color: var(--amber); }
.text-violet { color: var(--violet); }
.text-accent { color: var(--accent-light); }
.text-danger { color: var(--danger); }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mb-6 { margin-bottom: 6px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.spacer { flex: 1; }

code {
  font-family: var(--font-mono);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 11px;
  color: #c7d2fe;
}

/* ==================== KEYFRAMES & MOTION ==================== */
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

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

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

@keyframes slideIn {
  from { opacity: 0; transform: translateX(14px) scale(0.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

/* ==================== APP SHELL ==================== */
.app-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: 244px 1fr;
  grid-template-areas:
    "header header"
    "rail main";
  height: 100vh;
  width: 100vw;
}

/* ==================== TOP BAR & HORIZONTAL NAVIGATION ==================== */
.top-shell {
  grid-area: header;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 50;
}

.topbar {
  height: 52px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 2px 10px rgba(99, 102, 241, 0.32);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
}

.brand-title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.topbar-divider {
  width: 1px;
  height: 16px;
  background: var(--border-strong);
}

.ws-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(52, 211, 153, 0.09);
  border: 1px solid rgba(52, 211, 153, 0.22);
  color: #6ee7b7;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ws-pill .dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--emerald);
  animation: livePulse 2.4s infinite;
}

.ws-pill.disconnected {
  background: var(--danger-soft);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}
.ws-pill.disconnected .dot {
  background: var(--danger);
  animation: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.action-pill-group {
  display: inline-flex;
  gap: 4px;
  padding: 2px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* Refined Horizontal Navigation */
.top-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}
.top-nav::-webkit-scrollbar { display: none; }

.nav-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6.5px;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 9.5px 11px;
  cursor: pointer;
  font-weight: 500;
  font-size: 12.5px;
  font-family: inherit;
  white-space: nowrap;
  border-radius: 6px 6px 0 0;
  transition: color 0.16s var(--ease-out), background 0.16s var(--ease-out);
}

.nav-tab svg {
  width: 14px;
  height: 14px;
  opacity: 0.65;
  flex-shrink: 0;
  transition: opacity 0.16s, color 0.16s, transform 0.16s var(--ease-out);
}

.nav-tab:hover {
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.035);
}
.nav-tab:hover svg {
  opacity: 0.95;
  transform: translateY(-0.5px);
}

.nav-tab.active {
  color: var(--text-strong);
  font-weight: 600;
}

.nav-tab.active svg {
  color: var(--accent-light);
  opacity: 1;
}

.nav-tab::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  opacity: 0;
  transition: transform 0.2s var(--ease-out), opacity 0.18s;
}

.nav-tab.active::after {
  transform: scaleX(1);
  opacity: 1;
}

.nav-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
  margin: 0 5px;
  flex-shrink: 0;
}

/* ==================== LEFT ACCOUNT RAIL ==================== */
.sidebar {
  grid-area: rail;
  background: linear-gradient(180deg, #151926 0%, #121621 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px 10px 10px;
  overflow: hidden;
  min-height: 0;
}

.sidebar-accounts-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--muted);
  padding: 0 5px 8px;
}

.sidebar-search { margin-bottom: 8px; }

.account-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 2px;
}

.sb-account-item {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 7px 8px;
  cursor: pointer;
  transition: background 0.15s var(--ease-out), border-color 0.15s, transform 0.12s var(--ease-out), opacity 0.12s;
}

.sb-account-item:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.06);
}

.sb-account-item.selected {
  background: rgba(99, 102, 241, 0.13);
  border-color: rgba(99, 102, 241, 0.34);
}

.sb-acc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.sb-acc-name {
  font-weight: 500;
  font-size: 12.5px;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-acc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding-left: 15px;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.sb-acc-econ {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  padding-left: 15px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.sb-econ-m { color: #f6c453; }
.sb-econ-c { color: #5cc8f7; }

.sb-drag-grip {
  color: #4b556b;
  font-size: 10px;
  letter-spacing: -1px;
  cursor: grab;
  width: 10px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  flex-shrink: 0;
}

.sb-account-item:hover .sb-drag-grip {
  opacity: 1;
  color: var(--muted);
}

.sb-power-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 5px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 9px;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.14s, background 0.14s, color 0.14s, transform 0.1s;
}

.sb-account-item:hover .sb-power-btn,
.sb-power-btn.on { opacity: 1; }
.sb-power-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--text-strong); }
.sb-power-btn:active { transform: scale(0.9); }
.sb-power-btn.on { color: var(--emerald); }

.sidebar-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
}

.mini-stat {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 7px;
  text-align: center;
  padding: 5px 2px;
}

.mini-stat-label {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
}

.mini-stat-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 11.5px;
  color: var(--text-strong);
}

/* ==================== MAIN WORKSPACE ==================== */
.main-area {
  grid-area: main;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(880px 360px at 14% -10%, rgba(99, 102, 241, 0.085), transparent 62%),
    radial-gradient(720px 300px at 88% -8%, rgba(52, 211, 153, 0.055), transparent 58%),
    var(--bg);
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 26px 30px;
}

.tab-view { display: none; }
.tab-view.active {
  display: block;
  animation: tabFadeIn 0.22s var(--ease-out);
}

/* ==================== PANELS, BUTTONS, INPUTS ==================== */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--inner-glow), 0 4px 18px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color 0.16s;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  flex-wrap: wrap;
}

.panel-header h4 {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
  gap: 12px;
  flex-wrap: wrap;
}

.section-header h3 {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-strong);
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6.5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  font-weight: 500;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s var(--ease-out), border-color 0.15s, color 0.15s, transform 0.1s var(--ease-out), box-shadow 0.15s;
  font-family: inherit;
  color: var(--text-strong);
  background: #23283a;
  white-space: nowrap;
}

.btn:hover { background: #2b3248; border-color: rgba(255, 255, 255, 0.22); }
.btn:active:not(:disabled) { transform: scale(0.965); }
.btn:disabled { opacity: 0.38; cursor: not-allowed; }
.btn-sm { padding: 5.5px 11px; font-size: 12px; }
.btn-xs { padding: 4px 8.5px; font-size: 11.5px; border-radius: 6px; }
.btn-full { width: 100%; }

/* Refined Indigo Primary Button */
.btn-primary {
  background: linear-gradient(180deg, #6b6ff5 0%, #5b5fe8 100%);
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 8px rgba(99, 102, 241, 0.25);
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #777bf8 0%, #6569ef 100%);
  border-color: rgba(165, 180, 252, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-success-soft {
  background: rgba(52, 211, 153, 0.11);
  border-color: rgba(52, 211, 153, 0.24);
  color: #6ee7b7;
}
.btn-success-soft:hover {
  background: rgba(52, 211, 153, 0.2);
  border-color: rgba(52, 211, 153, 0.4);
}

.btn-danger {
  background: #e11d48;
  border-color: #f43f5e;
  color: #fff;
}
.btn-danger:hover { background: #f43f5e; }

.btn-danger-soft {
  background: rgba(248, 113, 113, 0.11);
  border-color: rgba(248, 113, 113, 0.24);
  color: #fca5a5;
}
.btn-danger-soft:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.4);
}

.btn-amber-soft {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.34);
  color: #fde047;
}
.btn-amber-soft:hover { background: rgba(251, 191, 36, 0.24); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.025);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: var(--border-strong);
  color: var(--text-strong);
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.14s, color 0.14s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--text-strong); }

.input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-strong);
  padding: 7px 10px;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.input:focus {
  border-color: rgba(99, 102, 241, 0.65);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
  background: #131826;
}
.input-sm { padding: 6px 9px; font-size: 12px; }
.select-inline { width: auto; min-width: 150px; }
.color-input { height: 32px; padding: 2px 4px; cursor: pointer; }
textarea.input { resize: vertical; font-family: var(--font-mono); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono);
}

.badge-muted { background: rgba(255, 255, 255, 0.055); border: 1px solid var(--border); color: var(--muted); }
.badge-emerald { background: var(--emerald-soft); color: #6ee7b7; }
.badge-cyan { background: var(--cyan-soft); color: #7dd3fc; }
.badge-amber { background: var(--amber-soft); color: #fde047; }
.badge-danger { background: var(--danger-soft); color: #fca5a5; }

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-online { background: var(--emerald); box-shadow: 0 0 6px rgba(52, 211, 153, 0.5); }
.status-connecting, .status-reconnecting { background: var(--amber); }
.status-offline { background: #475569; }
.status-error { background: var(--danger); }

.ping-good { color: #34d399; }
.ping-med { color: #fbbf24; }
.ping-bad { color: #f87171; }

/* ==================== LAYERED METRIC STRIP ==================== */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.kpi-cell {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--inner-glow), 0 4px 14px rgba(0, 0, 0, 0.18);
  border-radius: var(--radius);
  padding: 13px 15px;
  min-width: 0;
  overflow: hidden;
  transition: transform 0.18s var(--ease-out), border-color 0.18s, background 0.18s;
}

.kpi-cell:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.kpi-cell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.kpi-icon svg { width: 13px; height: 13px; }
.kpi-icon-emerald { background: var(--emerald-soft); color: var(--emerald); }
.kpi-icon-amber { background: var(--amber-soft); color: var(--amber); }
.kpi-icon-cyan { background: var(--cyan-soft); color: var(--cyan); }
.kpi-icon-accent { background: var(--accent-soft); color: var(--accent-light); }
.kpi-icon-violet { background: var(--violet-soft); color: var(--violet); }

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

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--inner-glow), 0 3px 12px rgba(0, 0, 0, 0.16);
  border-radius: var(--radius);
  padding: 13px 15px;
  transition: border-color 0.16s, transform 0.16s var(--ease-out);
}
.kpi-card:hover { border-color: var(--border-strong); }

.kpi-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}

.kpi-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 6px 0 2px;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-sub { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.dash-quick-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--inner-glow);
  border-radius: var(--radius);
  padding: 9px 13px;
  flex-wrap: wrap;
}

.quick-broadcast-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 240px;
}

.quick-broadcast-form {
  display: flex;
  gap: 6px;
  margin: 8px 0 6px;
}

.global-server-bar {
  display: grid;
  grid-template-columns: 1.7fr 0.65fr 1.1fr 0.85fr auto;
  gap: 10px;
  align-items: end;
}

.dash-server-details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 13px;
  transition: border-color 0.16s;
}
.dash-server-details:hover { border-color: var(--border-strong); }

.dash-server-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  user-select: none;
  transition: color 0.14s;
}
.dash-server-details[open] summary,
.dash-server-details summary:hover { color: var(--text-strong); }

/* ==================== ACCOUNT TABLE & COMPACT CARDS + DRAG-DROP ==================== */
.bot-list-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--inner-glow), 0 4px 18px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
}

.bot-list-header {
  display: grid;
  grid-template-columns: 46px minmax(185px, 1.4fr) minmax(120px, 0.85fr) minmax(105px, 0.72fr) minmax(115px, 0.75fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(16, 20, 31, 0.65);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--muted);
}

.bot-row {
  position: relative;
  padding: 8.5px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  transition: background 0.14s var(--ease-out), opacity 0.14s;
}
.bot-row:last-child { border-bottom: none; }
.bot-row:hover { background: rgba(99, 102, 241, 0.055); }

.bot-row-main {
  display: grid;
  grid-template-columns: 46px minmax(185px, 1.4fr) minmax(120px, 0.85fr) minmax(105px, 0.72fr) minmax(115px, 0.75fr) auto;
  align-items: center;
  gap: 10px;
}

.bot-row-order {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0.45;
  transition: opacity 0.14s;
}
.bot-row:hover .bot-row-order,
tr:hover .bot-row-order { opacity: 1; }

.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 24px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: -1.5px;
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}
.drag-handle:hover { background: rgba(255, 255, 255, 0.08); color: var(--text-strong); }
.drag-handle:active { cursor: grabbing; }

.nudge-btns { display: flex; flex-direction: column; gap: 1px; }

.nudge-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 8px;
  line-height: 1;
  padding: 2px 3.5px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.nudge-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-strong); }

.bot-color-pip {
  width: 3px;
  height: 15px;
  border-radius: 99px;
  flex-shrink: 0;
  opacity: 0.85;
}

.bot-row-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.bot-row-name-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.bot-row-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-row-sub {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  padding-left: 17px;
}

.ip-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
  border: 1px solid rgba(52, 211, 153, 0.24);
  background: rgba(52, 211, 153, 0.08);
  color: #6ee7b7;
}

.ip-pill-2 {
  border-color: rgba(129, 140, 248, 0.28);
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
}

.econ-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s;
}

.econ-chip-money {
  background: rgba(251, 191, 36, 0.09);
  border: 1px solid rgba(251, 191, 36, 0.18);
  color: #fcd34d;
}

.econ-chip-crystal {
  background: rgba(56, 189, 248, 0.09);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
}

.econ-chip-empty {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  color: #4b556b;
  font-weight: 400;
}

.econ-val-money { color: #fcd34d; }
.econ-val-crystal { color: #7dd3fc; }
.econ-val-empty { color: #4b556b; font-weight: 400; }

.bot-row-status {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
}

.ping-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.sig-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 10px;
}
.sig-bars i {
  display: block;
  width: 2.5px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.14);
}
.sig-bars i:nth-child(1) { height: 4px; }
.sig-bars i:nth-child(2) { height: 7px; }
.sig-bars i:nth-child(3) { height: 10px; }
.sig-bars.sig-good i { background: var(--emerald); }
.sig-bars.sig-med i:nth-child(1), .sig-bars.sig-med i:nth-child(2) { background: var(--amber); }
.sig-bars.sig-bad i:nth-child(1) { background: var(--danger); }

.bot-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.bot-row-extra {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Drag-and-drop states */
.dnd-dragging { opacity: 0.35 !important; }
.dnd-over-before { box-shadow: inset 0 2px 0 0 var(--accent-light) !important; }
.dnd-over-after { box-shadow: inset 0 -2px 0 0 var(--accent-light) !important; }

/* Crafted Compact Cards View */
.bot-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(296px, 1fr));
  gap: 12px;
}

.bot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--inner-glow), 0 4px 16px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s var(--ease-out), border-color 0.18s, background 0.18s, box-shadow 0.18s, opacity 0.14s;
}

.bot-card:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.32);
  background: var(--bg-card-hover);
  box-shadow: var(--inner-glow), 0 10px 24px rgba(0, 0, 0, 0.28);
}

.bot-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.bot-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  gap: 7px;
}

.bot-card-sub {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.bot-card-econ-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bot-card-econ-box {
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.bot-card-econ-box.money {
  background: rgba(251, 191, 36, 0.06);
  border-color: rgba(251, 191, 36, 0.16);
}
.bot-card-econ-box.crystal {
  background: rgba(56, 189, 248, 0.06);
  border-color: rgba(56, 189, 248, 0.16);
}

.bot-card-econ-label {
  font-size: 10.5px;
  color: var(--muted);
}

.bot-card-econ-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 2px;
}

.bot-card-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.bot-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
}

.msa-banner {
  background: var(--amber-soft);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 12px;
}
.msa-code-pill { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: #fde047; letter-spacing: 1px; }

.bot-card-error {
  background: var(--danger-soft);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 11.5px;
  color: #fca5a5;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 44px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.empty-state h4 { font-size: 14px; color: var(--text-strong); margin-bottom: 6px; }

/* ==================== CHAT ==================== */
.chat-layout { height: calc(100vh - 138px); display: flex; flex-direction: column; }
.chat-main-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-filter-pills { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }

.filter-pill {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.filter-pill:hover { color: var(--text-strong); background: rgba(255, 255, 255, 0.06); }
.filter-pill.active { background: var(--accent-soft); border-color: rgba(99, 102, 241, 0.4); color: #e0e7ff; }

.chat-feed {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.6;
  overflow-y: auto;
  word-break: break-word;
}
.chat-feed-compact { height: 200px; }
.chat-feed-full { flex: 1; min-height: 240px; }
.chat-line { padding: 2px 0; display: flex; align-items: baseline; gap: 8px; }
.chat-line:hover { background: rgba(255, 255, 255, 0.025); }
.chat-time { color: #5b667d; font-family: var(--font-mono); font-size: 11px; flex-shrink: 0; }
.chat-bot-tag { font-size: 10.5px; font-weight: 600; padding: 0 6px; border-radius: 4px; background: rgba(99, 102, 241, 0.12); border: 1px solid rgba(99, 102, 241, 0.22); color: #c7d2fe; flex-shrink: 0; }
.chat-body { flex: 1; }
.chat-sys { font-style: italic; }
.chat-sys-info { color: #7dd3fc; }
.chat-sys-success { color: #6ee7b7; }
.chat-sys-warn { color: #fde047; }
.chat-sys-error { color: #fca5a5; }
.chat-out { color: #a5b4fc; font-weight: 600; }
.mc-obf { filter: blur(1.5px); }

.macro-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 7px 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.macro-list { display: flex; flex-wrap: wrap; gap: 5px; }
.macro-btn {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, transform 0.1s;
}
.macro-btn:hover { background: var(--bg-card-hover); color: var(--text-strong); }
.macro-btn:active { transform: scale(0.96); }

.chat-composer { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.composer-targets { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.composer-label { font-size: 12px; color: var(--muted); }
.segmented {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}
.seg-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 4.5px 10px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.16s var(--ease-out), color 0.16s;
}
.seg-btn:hover { color: var(--text-strong); }
.seg-btn.active {
  background: #272e44;
  color: var(--text-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.delay-wrap { display: inline-flex; align-items: center; gap: 6px; }
.multi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.multi-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px;
  background: var(--bg-input); border: 1px solid var(--border); font-size: 12px; cursor: pointer; user-select: none;
  transition: background 0.14s, border-color 0.14s;
}
.multi-chip.checked { background: var(--accent-soft); border-color: rgba(99, 102, 241, 0.45); color: #e0e7ff; }
.composer-form { display: flex; gap: 8px; }
.toggle-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }

/* ==================== INVENTORY & WINDOW ==================== */
.bot-selector-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--inner-glow);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 14px;
}
.inv-summary-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.drop-progress {
  background: var(--danger-soft);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
}
.drop-progress-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-weight: 600; }
.progress-bar { height: 5px; background: rgba(255, 255, 255, 0.08); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--danger); transition: width 0.15s; }

.inventory-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.9fr); gap: 14px; align-items: start; }
.inv-side-col { display: flex; flex-direction: column; gap: 14px; }
.inv-group-label { font-size: 11px; font-weight: 600; color: var(--muted); margin: 12px 0 6px; }
.inv-armor-row { display: flex; align-items: center; gap: 12px; }
.inv-divider { width: 1px; height: 42px; background: var(--border); }

.mc-grid { display: grid; gap: 5px; }
.mc-grid-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.mc-grid-4 { grid-template-columns: repeat(4, 58px); }
.mc-grid-1 { grid-template-columns: 58px; }
.mc-window-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 5px; max-width: 700px; }

.mc-slot {
  aspect-ratio: 1 / 1; min-height: 52px;
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 7px;
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4px; cursor: pointer; transition: border-color 0.12s, background 0.12s, transform 0.1s; user-select: none; overflow: hidden;
}
.mc-slot:hover { border-color: rgba(129, 140, 248, 0.55); background: #1e2436; }
.mc-slot:active { transform: scale(0.95); }
.mc-slot.occupied { background: #161b29; border-color: var(--border-strong); }
.mc-slot.enchanted { border-color: rgba(192, 132, 252, 0.55); }
.mc-slot.held { border-color: var(--emerald); }
.mc-slot.selected { border-color: var(--accent-light); box-shadow: 0 0 0 1.5px rgba(99, 102, 241, 0.4); }
.mc-slot-icon { font-size: 17px; line-height: 1; }
.mc-slot-name { font-size: 9.5px; color: var(--text); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; margin-top: 2px; }
.mc-slot-count { position: absolute; right: 4px; bottom: 2px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }
.mc-slot-idx { position: absolute; left: 4px; top: 2px; font-size: 9px; color: #5b667d; font-family: var(--font-mono); }
.mc-durability { position: absolute; left: 5px; right: 5px; bottom: 3px; height: 2px; background: rgba(0, 0, 0, 0.5); border-radius: 99px; overflow: hidden; }
.mc-durability > div { height: 100%; background: var(--emerald); }

.selected-item-box { min-height: 90px; }
.empty-hint { color: var(--muted); text-align: center; padding: 22px 12px; font-size: 12px; }
.item-detail-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.item-detail-icon { width: 40px; height: 40px; border-radius: 7px; background: var(--bg-input); border: 1px solid var(--border); display: grid; place-items: center; font-size: 19px; }
.item-enchants { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.enchant-tag { background: rgba(192, 132, 252, 0.14); color: #e9d5ff; padding: 2px 7px; border-radius: 5px; font-size: 11px; }
.item-lore { background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font-size: 11.5px; color: var(--text); margin: 8px 0; max-height: 100px; overflow-y: auto; }
.item-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }

/* ==================== FORMS & AUTOMATION & CAMPAIGNS ==================== */
.auto-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-stack { display: flex; flex-direction: column; gap: 10px; }
.form-section-title { font-size: 11px; font-weight: 600; color: var(--accent-light); text-transform: uppercase; letter-spacing: 0.6px; margin: 12px 0 6px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row-3 { display: grid; grid-template-columns: 1.4fr 0.7fr 0.9fr; gap: 10px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; padding: 2px 0; }
.switch-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; cursor: pointer; }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.check-card { display: flex; align-items: center; gap: 8px; background: var(--bg-subtle); border: 1px solid var(--border); padding: 7.5px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 12px; transition: border-color 0.14s, background 0.14s; }
.check-card:hover { border-color: var(--border-strong); background: #1a2030; }
input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }
.sep { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.input-with-btn { display: flex; gap: 6px; }

.timers-list, .triggers-list, .campaigns-list { display: flex; flex-direction: column; gap: 8px; }
.timer-row, .trigger-card { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.timer-row-top { display: grid; grid-template-columns: auto 1fr 90px auto; gap: 8px; align-items: center; }
.trigger-grid { display: grid; grid-template-columns: 1fr 1.3fr 1fr 80px; gap: 8px; }

.campaign-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
}
.campaign-card.active-cmp { border-color: rgba(99, 102, 241, 0.38); }
.campaign-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.campaign-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.campaign-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); }

/* ==================== DEEP INFO / HUD ==================== */
.pinger-inline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pinger-result { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pinger-icon { width: 44px; height: 44px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg-input); image-rendering: pixelated; flex-shrink: 0; }
.hud-overlays-wrap { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.bossbar-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 12px; }
.bossbar-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 500; margin-bottom: 5px; }
.bossbar-track { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bossbar-fill { height: 100%; border-radius: 99px; transition: width 0.25s; }
.actionbar-banner { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12.5px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.info-col { display: flex; flex-direction: column; gap: 14px; }
.mc-scoreboard-box { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 12.5px; line-height: 1.55; }
.sb-board-title { text-align: center; font-weight: 700; font-size: 13.5px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.sb-board-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px; }
.sb-board-spacer { height: 8px; }
.sb-board-score { color: var(--muted); font-family: var(--font-mono); font-size: 11px; flex-shrink: 0; }
.tab-meta-box { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; font-size: 12.5px; text-align: center; white-space: pre-wrap; line-height: 1.55; }

.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.kv-item { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 7px; padding: 7.5px 10px; }
.kv-k { font-size: 10.5px; color: var(--muted); }
.kv-v { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text-strong); margin-top: 2px; word-break: break-word; }
.effects-wrap { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.effect-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2.5px 8px; border-radius: 5px; font-size: 11px; font-family: var(--font-mono); background: var(--emerald-soft); color: #6ee7b7; }
.effect-pill.bad { background: var(--danger-soft); color: #fca5a5; }

.mc-map-frame {
  display: inline-block;
  padding: 8px;
  border-radius: 9px;
  background: #141824;
  border: 1px solid var(--border-strong);
}
.mc-map-img { width: 260px; height: 260px; display: block; image-rendering: pixelated; border-radius: 5px; }
.mc-map-preview { width: 210px; height: 210px; image-rendering: pixelated; border-radius: 7px; border: 1px solid var(--border-strong); }

.wl-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3.5px 9px; border-radius: 6px;
  background: rgba(99, 102, 241, 0.12); border: 1px solid rgba(99, 102, 241, 0.25); color: #e0e7ff; font-size: 12px; font-weight: 500;
}
.wl-chip button { background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 12px; }
.wl-chip button:hover { color: var(--text-strong); }

/* ==================== WORLD, RADAR & TAB ==================== */
.world-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 14px; }
.movement-deck { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.wasd-grid { display: grid; grid-template-columns: repeat(3, 68px); gap: 6px; }
.move-btn {
  height: 56px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--bg-input);
  color: var(--text-strong); font-size: 16px; font-weight: 600; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; user-select: none;
  transition: background 0.12s, border-color 0.12s, transform 0.1s;
}
.move-btn small { font-size: 10px; font-weight: 400; color: var(--muted); }
.move-btn:hover { background: var(--bg-card-hover); border-color: var(--accent-light); }
.move-btn.active { background: var(--accent-soft); border-color: var(--accent); color: #fff; transform: scale(0.96); }
.move-toggles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.move-toggle-btn { border: 1px solid var(--border); background: var(--bg-input); color: var(--text); padding: 6px 11px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.14s; }
.move-toggle-btn.active { background: var(--accent-soft); border-color: var(--accent); color: #e0e7ff; }
.look-pad { width: 100%; max-width: 240px; text-align: center; }
.look-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.radar-wrap { display: grid; grid-template-columns: 290px 1fr; gap: 12px; align-items: start; }
#radarCanvas { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); width: 290px; height: 290px; }
.nearby-list { max-height: 290px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.nearby-item { display: flex; align-items: center; justify-content: space-between; background: var(--bg-subtle); border-radius: 6px; padding: 6px 9px; font-size: 12px; }
.tab-players-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 6px; max-height: 290px; overflow-y: auto; }
.tab-player-card { display: flex; align-items: center; justify-content: space-between; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px; font-size: 12px; }
.tab-player-card.self { border-color: rgba(99, 102, 241, 0.45); background: var(--accent-soft); }

/* ==================== TABLES & PROXIES & SETTINGS ==================== */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 9px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.045); vertical-align: middle; transition: background 0.12s; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(99, 102, 241, 0.05); }

.proxy-top-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 14px; align-items: start; }
.proxy-assign-opts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.proxy-assign-list { display: flex; flex-direction: column; gap: 5px; max-height: 230px; overflow-y: auto; }
.proxy-assign-row { display: grid; grid-template-columns: 140px 1fr auto; gap: 8px; align-items: center; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; }

.settings-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 14px; align-items: start; }
.logs-feed { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; height: 420px; overflow-y: auto; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.55; }
.log-line { padding: 1px 0; }
.log-info { color: #93c5fd; }
.log-success { color: #6ee7b7; }
.log-warn { color: #fde047; }
.log-error { color: #fca5a5; }
.disk-logs-list { display: flex; flex-direction: column; gap: 5px; max-height: 220px; overflow-y: auto; }
.disk-log-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 7px; padding: 7px 10px; font-size: 11.5px; font-family: var(--font-mono); }

/* ==================== MODALS & TOASTS ==================== */
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(7, 9, 15, 0.72); backdrop-filter: blur(5px); animation: backdropFade 0.16s ease-out; }
.modal-dialog {
  position: relative; width: 100%; max-width: 540px; max-height: 90vh;
  background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 12px;
  display: flex; flex-direction: column;
  box-shadow: var(--inner-glow), 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: modalPop 0.2s var(--ease-out);
}
.modal-lg { max-width: 680px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 14.5px; font-weight: 600; color: var(--text-strong); }
.modal-body { padding: 16px 18px 18px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }

.details-box { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 11px; }
.details-box summary { cursor: pointer; font-weight: 500; color: var(--text-strong); font-size: 12px; }

.lock-screen {
  position: fixed; inset: 0; z-index: 2000;
  background: radial-gradient(600px 400px at 50% 30%, rgba(99, 102, 241, 0.12), transparent 65%), var(--bg);
  display: grid; place-items: center;
}
.lock-card { width: 100%; max-width: 340px; background: var(--bg-card); border: 1px solid var(--border-strong); box-shadow: var(--inner-glow), 0 24px 60px rgba(0, 0, 0, 0.45); border-radius: 12px; padding: 26px 22px; text-align: center; display: flex; flex-direction: column; gap: 12px; }
.brand-badge-lg { width: 42px; height: 42px; margin: 0 auto; border-radius: 10px; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35); }
.form-error { color: #fca5a5; background: var(--danger-soft); border-radius: 6px; padding: 7px 10px; font-size: 12px; }

.toast-container { position: fixed; right: 18px; bottom: 18px; z-index: 2500; display: flex; flex-direction: column; gap: 7px; max-width: 340px; }
.toast { background: #1e2334; border: 1px solid var(--border-strong); border-left: 3px solid var(--accent-light); border-radius: 9px; padding: 10px 13px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45); animation: slideIn 0.2s var(--ease-out); }
.toast-warn { border-left-color: var(--amber); }
.toast-error { border-left-color: var(--danger); }
.toast-info { border-left-color: var(--cyan); }
.toast-title { font-weight: 600; font-size: 12.5px; color: var(--text-strong); }
.toast-msg { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ==================== ÇİFTÇİ ==================== */
.ciftci-kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ciftci-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.95fr); gap: 14px; align-items: start; }
.ciftci-analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.progress-mini { height: 4px; background: rgba(255, 255, 255, 0.08); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.progress-mini-bar { height: 100%; background: linear-gradient(90deg, #6366f1, #38bdf8); border-radius: 999px; transition: width 0.25s ease; }
.ciftci-status-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 7px; padding: 8px 10px; }
.verify-banner {
  background: var(--amber-soft);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fef3c7;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.verify-banner-label { font-size: 11px; color: #fde047; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.verify-banner-target { font-size: 17px; font-weight: 700; color: #fff; margin-top: 2px; }
.verify-banner-hint { font-size: 11.5px; color: #fde68a; }

.ciftci-gui-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 5px;
  max-width: 660px;
  width: 100%;
  margin: 0 auto;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 8px;
}
.ciftci-gui-grid .mc-slot { aspect-ratio: auto; min-height: 60px; height: 60px; padding: 4px 3px; cursor: pointer; }
.ciftci-gui-grid.verify-mode { max-width: 700px; padding: 10px; gap: 6px; border-color: rgba(251, 191, 36, 0.45); }
.ciftci-gui-grid.verify-mode .mc-slot { min-height: 74px; height: 74px; padding: 5px 4px; }
.ciftci-gui-grid.verify-mode .mc-slot-icon { font-size: 22px; }
.ciftci-gui-grid.verify-mode .mc-slot-name { font-size: 10.5px; font-weight: 600; color: #fff; max-height: 26px; }
.ciftci-gui-grid .mc-slot:not(.occupied):not(.filler-slot) { opacity: 0.35; }
.ciftci-gui-grid .mc-slot.occupied:hover { border-color: var(--accent-light); background: rgba(99, 102, 241, 0.18); }
.ciftci-gui-grid .mc-slot.filler-slot { opacity: 0.18; border-style: dashed; pointer-events: none; }
.ciftci-gui-grid .mc-slot-icon { font-size: 19px; line-height: 1.05; }
.ciftci-gui-grid .mc-slot-name { font-size: 9.5px; line-height: 1.15; max-height: 22px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; text-align: center; margin-top: 2px; }
.ciftci-hover-bar { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 7px; padding: 8px 11px; min-height: 42px; font-size: 12px; max-width: 660px; margin: 10px auto 0; }
.ciftci-hover-title { font-weight: 600; color: var(--text-strong); margin-bottom: 2px; }
.ciftci-hover-lore { font-size: 11px; color: var(--muted); line-height: 1.4; }

.mobile-menu-btn { display: none; }

@media (max-width: 1200px) {
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .ciftci-kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .global-server-bar { grid-template-columns: repeat(2, 1fr); }
  .campaign-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .inventory-layout, .ciftci-layout, .ciftci-analytics-grid, .world-grid, .settings-grid, .auto-grid, .info-grid, .proxy-top-grid { grid-template-columns: 1fr; }
  .radar-wrap { grid-template-columns: 1fr; justify-items: center; }
  .bot-list-header { display: none; }
  .bot-row-main { grid-template-columns: 40px 1fr auto; gap: 8px; }
  .bot-row-actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
}

@media (max-width: 860px) {
  .mobile-menu-btn { display: inline-flex; }
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main";
  }
  .sidebar {
    position: fixed;
    left: 0; top: 96px; bottom: 0;
    width: 252px;
    z-index: 900;
    transform: translateX(-100%);
    transition: transform 0.22s var(--ease-out);
    box-shadow: 16px 0 40px rgba(0, 0, 0, 0.6);
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .topbar { padding: 0 12px; }
  .content { padding: 14px; }
}
