/* ===== Catppuccin Mocha Theme — Dark ===== */
[data-theme="dark"] {
  /* Core palette */
  --base: #1e1e2e;
  --mantle: #181825;
  --crust: #11111b;
  --surface0: #313244;
  --surface1: #45475a;
  --surface2: #585b70;
  --overlay0: #6c7086;
  --overlay1: #7f849c;
  --overlay2: #9399b2;
  --subtext0: #a6adc8;
  --subtext1: #bac2de;
  --text: #cdd6f4;

  /* Accent colors */
  --lavender: #b4befe;
  --blue: #89b4fa;
  --sapphire: #74c7ec;
  --sky: #89dceb;
  --teal: #94e2d5;
  --green: #a6e3a1;
  --yellow: #f9e2af;
  --peach: #fab387;
  --maroon: #eba0ac;
  --red: #f38ba8;
  --mauve: #cba6f7;
  --pink: #f5c2e7;
  --flamingo: #f2cdcd;
  --rosewater: #f5e0dc;

  /* Accent gradients */
  --gradient-blue: linear-gradient(135deg, #89b4fa, #74c7ec);
  --gradient-mauve: linear-gradient(135deg, #cba6f7, #b4befe);
  --gradient-green: linear-gradient(135deg, #a6e3a1, #94e2d5);
  --gradient-red: linear-gradient(135deg, #f38ba8, #fab387);
  --gradient-peach: linear-gradient(135deg, #fab387, #f9e2af);
  --gradient-accent: linear-gradient(135deg, #89b4fa, #cba6f7, #f38ba8);

  /* Glassmorphism */
  --glass-bg: rgba(49, 50, 68, 0.45);
  --glass-bg-hover: rgba(49, 50, 68, 0.6);
  --glass-border: rgba(205, 214, 244, 0.06);
  --glass-border-hover: rgba(205, 214, 244, 0.12);
  --glass-blur: blur(20px);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --glass-shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.2);
  --glass-inset-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);

  /* Misc */
  --table-row-even: rgba(24, 24, 37, 0.5);
  --table-row-hover: rgba(137, 180, 250, 0.04);
  --table-border: rgba(17, 17, 27, 0.6);
  --log-line-bg: rgba(49, 50, 68, 0.15);
  --content-gradient-1: rgba(137, 180, 250, 0.03);
  --content-gradient-2: rgba(203, 166, 247, 0.02);
  --btn-shadow: rgba(0, 0, 0, 0.25);
  --btn-active-shadow: rgba(0, 0, 0, 0.15);
  --tooltip-shadow: rgba(0, 0, 0, 0.3);
  --loading-overlay-bg: rgba(17, 17, 27, 0.85);
  --notif-container-shadow: rgba(0, 0, 0, 0.4);
  --notif-container-border: rgba(255, 255, 255, 0.04);
  --scrollbar-track: transparent;
  --scrollbar-thumb: rgba(69, 71, 90, 0.5);
  --scrollbar-thumb-hover: rgba(88, 91, 112, 0.8);
  --file-border: rgba(17, 17, 27, 0.5);
  --selection-bg: rgba(137, 180, 250, 0.25);
  --dropdown-arrow: '%236c7086';
}

/* ===== Light Theme ===== */
[data-theme="light"] {
  /* Core palette */
  --base: #f5f6fa;
  --mantle: #eef0f5;
  --crust: #e2e5ed;
  --surface0: #ffffff;
  --surface1: #e8ebf0;
  --surface2: #d5d9e2;
  --overlay0: #9ba2b5;
  --overlay1: #636e82;
  --overlay2: #4a5568;
  --subtext0: #636e82;
  --subtext1: #3d4655;
  --text: #2c3e50;

  /* Accent colors */
  --lavender: #a29bfe;
  --blue: #6c5ce7;
  --sapphire: #0984e3;
  --sky: #00b4d8;
  --teal: #00b894;
  --green: #00b894;
  --yellow: #f39c12;
  --peach: #e17055;
  --maroon: #d63031;
  --red: #e74c3c;
  --mauve: #6c5ce7;
  --pink: #fd79a8;
  --flamingo: #e84393;
  --rosewater: #d63031;

  /* Accent gradients */
  --gradient-blue: linear-gradient(135deg, #6c5ce7, #a29bfe);
  --gradient-mauve: linear-gradient(135deg, #a29bfe, #dfe6e9);
  --gradient-green: linear-gradient(135deg, #00b894, #55efc4);
  --gradient-red: linear-gradient(135deg, #e74c3c, #e17055);
  --gradient-peach: linear-gradient(135deg, #e17055, #f39c12);
  --gradient-accent: linear-gradient(135deg, #6c5ce7, #a29bfe, #fd79a8);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-bg-hover: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-hover: rgba(0, 0, 0, 0.15);
  --glass-blur: blur(20px);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --glass-shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.06);
  --glass-inset-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);

  /* Misc */
  --table-row-even: rgba(0, 0, 0, 0.02);
  --table-row-hover: rgba(108, 92, 231, 0.05);
  --table-border: rgba(0, 0, 0, 0.06);
  --log-line-bg: rgba(0, 0, 0, 0.03);
  --content-gradient-1: rgba(108, 92, 231, 0.03);
  --content-gradient-2: rgba(162, 155, 254, 0.03);
  --btn-shadow: rgba(0, 0, 0, 0.1);
  --btn-active-shadow: rgba(0, 0, 0, 0.05);
  --tooltip-shadow: rgba(0, 0, 0, 0.12);
  --loading-overlay-bg: rgba(245, 246, 250, 0.85);
  --notif-container-shadow: rgba(0, 0, 0, 0.1);
  --notif-container-border: rgba(0, 0, 0, 0.06);
  --scrollbar-track: transparent;
  --scrollbar-thumb: rgba(0, 0, 0, 0.15);
  --scrollbar-thumb-hover: rgba(0, 0, 0, 0.25);
  --file-border: rgba(0, 0, 0, 0.06);
  --selection-bg: rgba(108, 92, 231, 0.15);
  --dropdown-arrow: '%23636e82';
}

/* ===== Spacing & Radii (shared) ===== */
:root {
  --radius: 12px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', 'SF Pro Display', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Noto Sans', sans-serif;
  font-size: 14px;
  /* До data-theme на <html> темы ещё нет — без fallback в Electron (transparent) окно «пустое» */
  color: var(--text, #cdd6f4);
  background: var(--base, #1e1e2e);
  user-select: none;
  -webkit-user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
  transition: background var(--transition);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ===== Draggable regions ===== */
.draggable {
  -webkit-app-region: drag;
}

.not-draggable {
  -webkit-app-region: no-drag;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  outline: none;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  transition: opacity var(--transition);
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--btn-shadow);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px var(--btn-active-shadow);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-primary {
  background: var(--gradient-blue);
  color: #fff;
  box-shadow: 0 2px 12px rgba(108, 92, 231, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.35);
}

[data-theme="dark"] .btn-primary {
  color: var(--crust);
  box-shadow: 0 2px 12px rgba(137, 180, 250, 0.25);
}

[data-theme="dark"] .btn-primary:hover {
  box-shadow: 0 4px 20px rgba(137, 180, 250, 0.35);
}

.btn-danger {
  background: var(--gradient-red);
  color: #fff;
  box-shadow: 0 2px 12px rgba(231, 76, 60, 0.2);
}

.btn-danger:hover {
  box-shadow: 0 4px 20px rgba(231, 76, 60, 0.3);
}

[data-theme="dark"] .btn-danger {
  color: var(--crust);
  box-shadow: 0 2px 12px rgba(243, 139, 168, 0.2);
}

[data-theme="dark"] .btn-danger:hover {
  box-shadow: 0 4px 20px rgba(243, 139, 168, 0.3);
}

.btn-success {
  background: var(--gradient-green);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 184, 148, 0.2);
}

.btn-success:hover {
  box-shadow: 0 4px 20px rgba(0, 184, 148, 0.3);
}

[data-theme="dark"] .btn-success {
  color: var(--crust);
  box-shadow: 0 2px 12px rgba(166, 227, 161, 0.2);
}

[data-theme="dark"] .btn-success:hover {
  box-shadow: 0 4px 20px rgba(166, 227, 161, 0.3);
}

.btn-warning {
  background: var(--gradient-peach);
  color: #fff;
  box-shadow: 0 2px 12px rgba(243, 156, 18, 0.2);
}

.btn-warning:hover {
  box-shadow: 0 4px 20px rgba(243, 156, 18, 0.3);
}

[data-theme="dark"] .btn-warning {
  color: var(--crust);
  box-shadow: 0 2px 12px rgba(249, 226, 175, 0.2);
}

[data-theme="dark"] .btn-warning:hover {
  box-shadow: 0 4px 20px rgba(249, 226, 175, 0.3);
}

.btn-dark {
  background: var(--surface1);
  color: var(--text);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-dark:hover {
  background: var(--surface2);
  border-color: var(--glass-border-hover);
}

/* ===== Inputs ===== */
.input {
  padding: 9px 14px;
  background: var(--surface0);
  border: 1px solid var(--surface1);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: all var(--transition);
}

[data-theme="light"] .input {
  background: #ffffff;
  border-color: var(--crust);
}

.input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12), 0 0 12px rgba(108, 92, 231, 0.08);
}

[data-theme="dark"] .input:focus {
  box-shadow: 0 0 0 3px rgba(137, 180, 250, 0.15), 0 0 12px rgba(137, 180, 250, 0.1);
}

.input::placeholder {
  color: var(--overlay0);
  font-weight: 400;
}

/* ===== Tables ===== */
.table-container {
  overflow: auto;
  max-height: 100%;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--overlay1);
  background: var(--mantle);
  border-bottom: 1px solid var(--surface1);
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}

.data-table tbody tr {
  transition: all var(--transition);
}

.data-table tbody tr:nth-child(even) {
  background: var(--table-row-even);
}

.data-table tbody tr:hover {
  background: var(--table-row-hover);
}

.data-table tbody tr:hover td {
  color: var(--text);
}

.data-table tbody td {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--subtext1);
  border-bottom: 1px solid var(--table-border);
  white-space: nowrap;
  transition: color var(--transition);
}

.victim-status {
  font-size: 12px;
  font-weight: 600;
}
.victim-status-online {
  color: var(--green);
}
.victim-status-offline {
  color: var(--overlay0);
}

/* ===== Spinner ===== */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--surface1);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Checkbox ===== */
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--subtext1);
  transition: color var(--transition);
  padding: 6px 10px;
  border-radius: var(--radius-xs);
}

.checkbox-label:hover {
  color: var(--text);
  background: var(--table-row-hover);
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--surface2);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked {
  background: var(--gradient-blue);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

[data-theme="dark"] .checkbox-label input[type="checkbox"]:checked {
  box-shadow: 0 2px 8px rgba(137, 180, 250, 0.3);
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: -1px;
  left: 2px;
  font-size: 12px;
  color: #fff;
  font-weight: 700;
}

[data-theme="dark"] .checkbox-label input[type="checkbox"]:checked::after {
  color: var(--crust);
}

/* ===== Radio ===== */
.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--subtext1);
  transition: color var(--transition);
  padding: 6px 10px;
  border-radius: var(--radius-xs);
}

.radio-label:hover {
  color: var(--text);
}

.radio-label input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--surface2);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  flex-shrink: 0;
}

.radio-label input[type="radio"]:checked {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12);
}

[data-theme="dark"] .radio-label input[type="radio"]:checked {
  box-shadow: 0 0 0 3px rgba(137, 180, 250, 0.15);
}

.radio-label input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(108, 92, 231, 0.5);
}

/* ===== Flag Icon ===== */
.flag-icon {
  font-size: 18px;
  display: inline-block;
  width: 24px;
  text-align: center;
}

/* ===== Utility Classes ===== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.flex-1 { flex: 1; }
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.text-yellow { color: var(--yellow); }
.text-blue { color: var(--blue); }
.text-muted { color: var(--overlay1); }
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }

/* ===== Selection color ===== */
::selection {
  background: var(--selection-bg);
  color: var(--text);
}
/* ===== Log Panel ===== */
.log-panel {
  background: var(--crust);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .log-panel {
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.04);
}

.log-panel .log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--mantle);
  border-bottom: 1px solid var(--glass-border);
  transition: background-color 0.3s ease;
}

.log-panel .log-header::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px rgba(0, 184, 148, 0.5);
  animation: statusPulse 2s ease-in-out infinite;
}

[data-theme="dark"] .log-panel .log-header::before {
  box-shadow: 0 0 6px rgba(166, 227, 161, 0.5);
}

.log-panel .log-header .log-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--overlay1);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.log-panel .log-header .clear-btn {
  padding: 4px 12px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--overlay0);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: all var(--transition);
  letter-spacing: 0.3px;
}

.log-panel .log-header .clear-btn:hover {
  background: var(--surface1);
  color: var(--text);
  border-color: var(--glass-border-hover);
}

[data-theme="light"] .log-panel .log-header .clear-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.log-panel .log-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 21px,
      var(--log-line-bg) 21px,
      var(--log-line-bg) 22px
    );
  transition: background-color 0.3s ease;
}

.log-panel .log-entry {
  display: flex;
  gap: 12px;
  padding: 1px 0;
  transition: background var(--transition-fast);
  border-radius: 2px;
}

.log-panel .log-entry:hover {
  background: var(--table-row-hover);
}

.log-panel .log-entry .log-date {
  color: var(--overlay0);
  white-space: nowrap;
  min-width: 160px;
  opacity: 0.7;
  font-size: 11px;
}

.log-panel .log-entry .log-msg {
  word-break: break-word;
  font-weight: 500;
}

/* ===== Notification ===== */
.notification-container {
  width: 320px;
  height: 88px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 40px var(--notif-container-shadow), 0 0 0 1px var(--notif-container-border);
  transition: box-shadow 0.3s ease;
}

.notification-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 16px 20px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-left: 4px solid;
  border-image: var(--gradient-red) 1;
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.notification-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 0% 50%, rgba(231, 76, 60, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

[data-theme="dark"] .notification-card::before {
  background: radial-gradient(ellipse at 0% 50%, rgba(243, 139, 168, 0.06) 0%, transparent 70%);
}

.notification-card .notif-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.notification-card .notif-model {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

.notification-card .notif-socket {
  font-size: 12px;
  color: var(--overlay1);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-weight: 500;
}

.notification-card .notif-flag {
  font-size: 28px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

[data-theme="dark"] .notification-card .notif-flag {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* ===== Loading Overlay ===== */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--loading-overlay-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10;
  border-radius: var(--radius);
  transition: background-color 0.3s ease;
}

.loading-text {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--subtext1);
  font-size: 13px;
  font-weight: 500;
}

/* ===== Empty State ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--overlay1);
  text-align: center;
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 14px;
  opacity: 0.3;
  filter: grayscale(0.3);
}

.empty-state .empty-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--overlay0);
}

/* ===== Dropdown ===== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown select {
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 36px 9px 14px;
  background: var(--surface0);
  border: 1px solid var(--surface1);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  transition: all var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='var(--dropdown-arrow)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

[data-theme="light"] .dropdown select {
  background: #ffffff;
  border-color: var(--crust);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23636e82' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
}

.dropdown select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12);
}

[data-theme="dark"] .dropdown select:focus {
  box-shadow: 0 0 0 3px rgba(137, 180, 250, 0.12);
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-blue {
  background: rgba(108, 92, 231, 0.1);
  color: var(--blue);
  border: 1px solid rgba(108, 92, 231, 0.15);
}

[data-theme="dark"] .badge-blue {
  background: rgba(137, 180, 250, 0.12);
  border: 1px solid rgba(137, 180, 250, 0.15);
}

.badge-green {
  background: rgba(0, 184, 148, 0.1);
  color: var(--green);
  border: 1px solid rgba(0, 184, 148, 0.15);
}

[data-theme="dark"] .badge-green {
  background: rgba(166, 227, 161, 0.12);
  border: 1px solid rgba(166, 227, 161, 0.15);
}

.badge-red {
  background: rgba(231, 76, 60, 0.1);
  color: var(--red);
  border: 1px solid rgba(231, 76, 60, 0.15);
}

[data-theme="dark"] .badge-red {
  background: rgba(243, 139, 168, 0.12);
  border: 1px solid rgba(243, 139, 168, 0.15);
}

.badge-yellow {
  background: rgba(243, 156, 18, 0.1);
  color: var(--yellow);
  border: 1px solid rgba(243, 156, 18, 0.15);
}

[data-theme="dark"] .badge-yellow {
  background: rgba(249, 226, 175, 0.12);
  border: 1px solid rgba(249, 226, 175, 0.15);
}

/* ===== Tooltip ===== */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: var(--surface1);
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--radius-xs);
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 4px 12px var(--tooltip-shadow);
  border: 1px solid var(--glass-border);
}

[data-theme="light"] [data-tooltip]:hover::after {
  background: var(--overlay1);
  color: #fff;
  border-color: transparent;
}
