/* Google Fonts - Nunito для красивого текста в чате */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Core Colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #b6c2d3;
  --text-on-accent: #ffffff;
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --success-color: #10b981;
  --success-hover: #059669;
  --warning-color: #f59e0b;
  --warning-hover: #d97706;
  --info-color: #38bdf8;
  --info-hover: #0ea5e9;
  --primary-color: var(--accent-color);
  
  /* Semantic status colors */
  --status-online: #22c55e;
  --status-offline: #6b7280;
  --status-error: var(--danger-color);
  --status-warning: var(--warning-color);
  
  /* Glassmorphism */
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  --backdrop-blur: blur(10px);

  /* Layout */
  --sidebar-width: 280px;
  --header-height: 70px;
  --border-radius: 20px;
  --card-radius: 18px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --glow-shadow: 0 0 20px rgba(59, 130, 246, 0.3);

  /* 8px Grid System */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
  z-index: -1;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  filter: brightness(1.1);
}

/* Typography */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 { font-size: 28px; font-weight: 800; line-height: 1.2; margin-bottom: var(--space-4); }
h2 { font-size: 22px; font-weight: 700; line-height: 1.25; margin-bottom: var(--space-3); }
h3 { font-size: 18px; font-weight: 700; line-height: 1.3; margin-bottom: var(--space-2); }
h4 { font-size: 16px; font-weight: 600; line-height: 1.4; margin-bottom: var(--space-2); }

.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 28px; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* Multi-layer shadows */
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.shadow-md { box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.06); }
.shadow-lg { box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 8px 20px rgba(0,0,0,0.1); }
.shadow-xl { box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 4px 8px rgba(0,0,0,0.1), 0 16px 40px rgba(0,0,0,0.15); }

/* Themes */
body.theme-ocean {
  --accent-color: #3aa0ff;
  --accent-hover: #2b7fe0;
  --bg-primary: #0b1424;
  --bg-secondary: #121f34;
  --bg-tertiary: #1a2c46;
  --glass-bg: rgba(18, 31, 52, 0.72);
  --text-secondary: #9aa9bf;
  --stat-color: #a9d0ff;
}

/* Neon Cyberpunk Theme */
body.theme-sunset {
  --accent-color: #00ff9d;
  --accent-hover: #00cc7d;
  --bg-primary: #050510;
  --bg-secondary: #0a0a1f;
  --bg-tertiary: #14143a;
  --glass-bg: rgba(10, 10, 31, 0.85);
  --text-secondary: #8b8bba;
  --stat-color: #00ff9d;
  --text-primary: #ffffff;
  background-image: 
    linear-gradient(45deg, rgba(255, 0, 255, 0.15) 0%, transparent 70%),
    linear-gradient(-45deg, rgba(0, 255, 255, 0.15) 0%, transparent 70%),
    radial-gradient(circle at 50% 0%, rgba(100, 0, 255, 0.2), transparent 60%);
  background-attachment: fixed;
}

body.theme-sunset .card {
  border: 1px solid rgba(0, 255, 157, 0.3);
  box-shadow: 0 0 15px rgba(0, 255, 157, 0.1);
}

body.theme-sunset .btn-primary {
  background: linear-gradient(90deg, #00ff9d, #00b8ff);
  color: #000;
  font-weight: bold;
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
}

body.theme-sunset .nav-item.active {
  background: rgba(0, 255, 157, 0.15);
  color: #00ff9d;
  border-left: 3px solid #00ff9d;
  box-shadow: 0 0 15px rgba(0, 255, 157, 0.2);
}

/* Gold Luxury Theme */
body.theme-newyear { 
  --accent-color: #ffd700; 
  --accent-hover: #e6c200;
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --glass-bg: rgba(26, 26, 26, 0.9);
  --text-secondary: #b3b3b3;
  --stat-color: #ffd700;
  --text-primary: #f5f5f5;
  background-image: 
    radial-gradient(circle at top right, rgba(255, 215, 0, 0.15), transparent 60%),
    radial-gradient(circle at bottom left, rgba(218, 165, 32, 0.1), transparent 60%);
  background-attachment: fixed;
}

body.theme-newyear .card {
  border: 1px solid rgba(255, 215, 0, 0.2);
}

body.theme-newyear .btn-primary {
  background: linear-gradient(135deg, #ffd700 0%, #daa520 100%);
  color: #000;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

body.theme-newyear .nav-item.active {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), transparent);
  color: #ffd700;
  border-left: 3px solid #ffd700;
}

body.theme-anime {
  --accent-color: #f5f5f5;
  --accent-hover: #d8d8d8;
  --text-on-accent: #1a1a2e;
  --bg-primary: #020202;
  --bg-secondary: #090909;
  --bg-tertiary: #141414;
  --glass-bg: rgba(8, 8, 8, 0.76);
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.72);
  --stat-color: #ffffff;
  --glass-border: 1px solid rgba(255, 255, 255, 0.14);
  --glass-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  background: url('/static/65eeff4c209bf9c7badcd8a688136363.jpg') center center / cover no-repeat fixed;
}

body.theme-anime::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.78) 28%, rgba(255,255,255,0.05) 50%, rgba(0,0,0,0.8) 72%, rgba(0,0,0,0.94) 100%),
    radial-gradient(circle at 50% 45%, rgba(255,255,255,0.12), transparent 28%),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.018) 0px, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 4px);
  pointer-events: none;
  z-index: 0;
}

body.theme-anime::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.16), transparent 18%),
    radial-gradient(circle at bottom left, rgba(255,255,255,0.08), transparent 22%);
  mix-blend-mode: screen;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

@keyframes anime-text-sheen {
  0% {
    background-position: 0% 50%;
    filter: brightness(0.96);
  }
  50% {
    background-position: 100% 50%;
    filter: brightness(1.08);
  }
  100% {
    background-position: 0% 50%;
    filter: brightness(0.96);
  }
}

body.theme-anime .ambient-particles span {
  width: 9px;
  height: 14px;
  border-radius: 80% 0 80% 0;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 0 18px rgba(255,255,255,0.22);
  opacity: 0.72;
  transform: rotate(18deg);
}

body.theme-anime .sidebar {
  background: linear-gradient(180deg, rgba(5,5,5,0.84), rgba(5,5,5,0.6));
  border-right: 1px solid rgba(255,255,255,0.12);
  box-shadow: 24px 0 60px rgba(0,0,0,0.38);
}

body.theme-anime .brand {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(100deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,1) 22%, rgba(255,255,255,0.72) 38%, rgba(255,255,255,1) 52%, rgba(255,255,255,0.55) 74%, rgba(255,255,255,0.95) 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 16px rgba(255,255,255,0.12);
  animation: anime-text-sheen 9.5s ease-in-out infinite;
}

body.theme-anime .brand-logo {
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 14px 28px rgba(0,0,0,0.4);
}

body.theme-anime .nav-item {
  color: rgba(255,255,255,0.7);
  border: 1px solid transparent;
  border-radius: 16px;
  backdrop-filter: blur(6px);
}

body.theme-anime .nav-item:hover,
body.theme-anime .nav-item.active {
  transform: translateX(10px);
  background: linear-gradient(90deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03));
  border-color: rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 14px 34px rgba(0,0,0,0.34);
}

body.theme-anime .nav-item.active {
  color: #000;
  background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(214,214,214,0.85));
  border-left: 4px solid rgba(255,255,255,0.95);
}

body.theme-anime .main-content {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.72), rgba(0,0,0,0.3)),
    radial-gradient(circle at top right, rgba(255,255,255,0.08), transparent 30%);
}

body.theme-anime .top-bar {
  background: linear-gradient(180deg, rgba(8,8,8,0.78), rgba(8,8,8,0.54));
  border-bottom: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
}

body.theme-anime .page-title {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(100deg, rgba(255,255,255,0.56) 0%, rgba(255,255,255,1) 20%, rgba(255,255,255,0.72) 38%, rgba(255,255,255,1) 54%, rgba(255,255,255,0.56) 74%, rgba(255,255,255,0.96) 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 20px rgba(255,255,255,0.16);
  animation: anime-text-sheen 11s ease-in-out infinite;
}

body.theme-anime .icon-btn {
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

body.theme-anime .icon-btn:hover {
  background: rgba(255,255,255,0.12);
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
}

body.theme-anime .card,
body.theme-anime .accounts-list-container,
body.theme-anime .modal-content,
body.theme-anime .terminal,
body.theme-anime .selector-item label,
body.theme-anime .stat-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.03)),
    linear-gradient(135deg, rgba(9,9,9,0.9), rgba(0,0,0,0.82));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 28px 60px rgba(0,0,0,0.36);
}

body.theme-anime .card {
  border-radius: 24px;
  backdrop-filter: blur(12px);
}

body.theme-anime .card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(140deg, rgba(255,255,255,0.1), transparent 32%, transparent 68%, rgba(255,255,255,0.05)),
    linear-gradient(180deg, transparent, rgba(255,255,255,0.03));
  pointer-events: none;
}

body.theme-anime .card:hover {
  border-color: rgba(255,255,255,0.35);
  box-shadow: 0 0 20px rgba(255,255,255,0.1), 0 16px 40px rgba(0,0,0,0.4);
}

body.theme-anime .section > .card,
body.theme-anime .section > .card:hover {
  transform: none !important;
}

body.theme-anime .dashboard-card {
  min-height: 132px;
}

body.theme-anime .dashboard-card:hover {
  border-color: rgba(255,255,255,0.6);
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 0 25px rgba(255,255,255,0.2), 0 32px 70px rgba(0,0,0,0.42);
}

body.theme-anime .account-item:hover {
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 0 15px rgba(255,255,255,0.12);
}

body.theme-anime #section-dashboard .grid-container {
  align-items: start;
}

body.theme-anime #section-dashboard .dashboard-card {
  height: fit-content;
  align-self: start;
  min-height: 0;
  padding: 18px 20px 16px;
}

body.theme-anime #section-dashboard .dashboard-card .card-header {
  align-items: flex-start;
  margin-bottom: 0;
}

body.theme-anime #section-dashboard .dashboard-card .card-header > div:last-child {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

body.theme-anime #section-dashboard .dashboard-card h3 {
  line-height: 1.15;
  margin: 0;
}

body.theme-anime #section-dashboard .dashboard-card p {
  margin-top: 6px;
  line-height: 1.05;
}

body.theme-anime #section-dashboard .dashboard-unread .card-header {
  position: relative;
  min-height: 52px;
}

body.theme-anime #section-dashboard .dashboard-unread .card-header > div:last-child {
  position: static;
}

body.theme-anime #section-dashboard .dashboard-unread h3 {
  max-width: 125px;
  padding-right: 40px;
}

body.theme-anime #section-dashboard .dashboard-unread p {
  position: absolute;
  top: -2px;
  right: 2px;
  margin: 0;
  line-height: 1;
}

body.theme-anime .dashboard-card .card-icon,
body.theme-anime .card-icon,
body.theme-anime .module-avatar {
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

body.theme-anime .module-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03)),
    linear-gradient(135deg, rgba(0,0,0,0.92), rgba(12,12,12,0.84)),
    url('/static/65eeff4c209bf9c7badcd8a688136363.jpg') center center / cover no-repeat;
  background-blend-mode: soft-light, normal, normal;
}

body.theme-anime .module-card textarea,
body.theme-anime .module-card input,
body.theme-anime .module-card select {
  background: rgba(0,0,0,0.42);
}

body.theme-anime .dashboard-card .stat-number,
body.theme-anime .stat-number,
body.theme-anime .stat-value {
  color: #ffffff;
  text-shadow: 0 0 18px rgba(255,255,255,0.08);
}

body.theme-anime .btn {
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

body.theme-anime .btn-primary {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(214,214,214,0.86));
  color: #030303;
  box-shadow: 0 18px 30px rgba(255,255,255,0.08), inset 0 1px 0 rgba(255,255,255,0.85);
}

body.theme-anime .btn-primary:hover {
  filter: brightness(1.04);
}

body.theme-anime .btn-secondary,
body.theme-anime .btn-info,
body.theme-anime .btn-warning,
body.theme-anime .btn-danger {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  color: #ffffff;
}

body.theme-anime .btn-secondary:hover,
body.theme-anime .btn-info:hover,
body.theme-anime .btn-warning:hover,
body.theme-anime .btn-danger:hover {
  background: rgba(255,255,255,0.14);
}

body.theme-anime input,
body.theme-anime select,
body.theme-anime textarea,
body.theme-anime .form-input {
  background: rgba(0,0,0,0.38);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

body.theme-anime input:focus,
body.theme-anime select:focus,
body.theme-anime textarea:focus,
body.theme-anime .form-input:focus {
  border-color: rgba(255,255,255,0.42);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}

body.theme-anime .pill {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}

body.theme-anime .pill-warning {
  background: rgba(255,255,255,0.92);
  color: #000;
  border-color: rgba(255,255,255,0.96);
}

body.theme-anime .pill-danger {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.24);
}

body.theme-anime .account-item {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  border-left-width: 4px;
}

body.theme-anime .account-item:hover,
body.theme-anime .selector-item label:hover {
  background: rgba(255,255,255,0.08);
}

body.theme-anime .modal {
  background: rgba(0,0,0,0.76);
  backdrop-filter: blur(10px);
}

body.theme-anime .terminal {
  color: #f8fafc;
  border-color: rgba(255,255,255,0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01)),
    rgba(0,0,0,0.86);
}

body.theme-anime .settings-thanks-card {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03)),
    linear-gradient(135deg, rgba(0,0,0,0.82), rgba(18,18,18,0.74));
}

body.theme-anime .settings-heart,
body.theme-anime .settings-credit-item {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

body.theme-anime-red {
  --accent-color: #ff5252;
  --accent-hover: #ff8888;
  --text-on-accent: #ffffff;
  --bg-primary: #080102;
  --bg-secondary: #0d0203;
  --bg-tertiary: #170305;
  --glass-bg: rgba(12, 2, 3, 0.84);
  --text-primary: #fff2f2;
  --text-secondary: rgba(255,228,228,0.76);
  --stat-color: #d97272;
  --glass-border: 1px solid rgba(255, 110, 110, 0.1);
  --glass-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  background: url('/static/0bd8dfaf6ab848de88ccf825405484a9.png') center center / cover no-repeat fixed;
}

body.theme-anime-red::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(255,0,30,0.18), transparent 22%),
    linear-gradient(90deg, rgba(0,0,0,0.4) 0%, rgba(80,0,6,0.24) 30%, rgba(255,30,30,0.04) 50%, rgba(80,0,6,0.24) 70%, rgba(0,0,0,0.4) 100%),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.01) 0px, rgba(255,255,255,0.01) 1px, transparent 1px, transparent 4px);
  pointer-events: none;
  z-index: 0;
}

body.theme-anime-red::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255,72,72,0.08), transparent 18%),
    radial-gradient(circle at bottom left, rgba(125,0,0,0.08), transparent 22%);
  mix-blend-mode: screen;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

body.theme-anime-red .ambient-particles span {
  width: 9px;
  height: 14px;
  border-radius: 80% 0 80% 0;
  background: rgba(255,120,120,0.78);
  box-shadow: 0 0 18px rgba(255,50,50,0.35);
  opacity: 0.72;
  transform: rotate(18deg);
}

body.theme-anime-red .sidebar {
  background: linear-gradient(180deg, rgba(12,2,3,0.9), rgba(12,2,3,0.64));
  border-right: 1px solid rgba(255,84,84,0.12);
  box-shadow: 24px 0 60px rgba(0,0,0,0.45), 0 0 14px rgba(255, 40, 40, 0.05);
}

body.theme-anime-red .brand {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(100deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,1) 22%, rgba(255,255,255,0.72) 38%, rgba(255,255,255,1) 52%, rgba(255,255,255,0.55) 74%, rgba(255,255,255,0.95) 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 16px rgba(255,255,255,0.12);
  animation: anime-text-sheen 9.5s ease-in-out infinite;
}

body.theme-anime-red .page-title {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(100deg, rgba(255,255,255,0.56) 0%, rgba(255,255,255,1) 20%, rgba(255,255,255,0.72) 38%, rgba(255,255,255,1) 54%, rgba(255,255,255,0.56) 74%, rgba(255,255,255,0.96) 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 20px rgba(255,255,255,0.16);
  animation: anime-text-sheen 11s ease-in-out infinite;
}

body.theme-anime-red .brand-logo {
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 14px 28px rgba(0,0,0,0.4);
}

body.theme-anime-red .nav-item {
  color: rgba(255,226,226,0.76);
  border: 1px solid transparent;
  border-radius: 16px;
  backdrop-filter: blur(6px);
}

body.theme-anime-red .nav-item:hover,
body.theme-anime-red .nav-item.active {
  transform: translateX(10px);
  background: linear-gradient(90deg, rgba(255,80,80,0.16), rgba(255,255,255,0.03));
  border-color: rgba(255,120,120,0.16);
  box-shadow: inset 0 1px 0 rgba(255,210,210,0.08), 0 14px 34px rgba(0,0,0,0.34);
}

body.theme-anime-red .nav-item.active {
  color: #fff7f7;
  background: linear-gradient(90deg, rgba(138,10,12,0.92), rgba(208,28,28,0.76));
  border-left: 4px solid rgba(255,180,180,0.92);
  box-shadow: inset 0 0 0 1px rgba(255,160,160,0.12), 0 0 12px rgba(255, 40, 40, 0.1);
}

body.theme-anime-red .main-content {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.24), rgba(20,0,0,0.12)),
    radial-gradient(circle at top right, rgba(255,70,70,0.05), transparent 30%);
}

body.theme-anime-red .top-bar {
  background: linear-gradient(180deg, rgba(14,2,3,0.8), rgba(14,2,3,0.56));
  border-bottom: 1px solid rgba(255,110,110,0.16);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 12px rgba(255, 30, 30, 0.05);
}

body.theme-anime-red .icon-btn {
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,90,90,0.14);
  box-shadow: inset 0 1px 0 rgba(255,210,210,0.05), 0 0 8px rgba(255, 30, 30, 0.05);
}

body.theme-anime-red .icon-btn:hover {
  background: rgba(255,70,70,0.14);
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
}

body.theme-anime-red .card,
body.theme-anime-red .accounts-list-container,
body.theme-anime-red .modal-content,
body.theme-anime-red .terminal,
body.theme-anime-red .selector-item label,
body.theme-anime-red .stat-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    linear-gradient(135deg, rgba(9,9,9,0.9), rgba(0,0,0,0.82));
  border: 1px solid rgba(190, 62, 62, 0.26);
  box-shadow: 0 28px 60px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(120, 18, 18, 0.14);
}

body.theme-anime-red .card {
  border-radius: 24px;
  backdrop-filter: blur(12px);
}

body.theme-anime-red .card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(140deg, rgba(255,170,170,0.08), transparent 32%, transparent 68%, rgba(255,80,80,0.06)),
    linear-gradient(180deg, transparent, rgba(255,255,255,0.02));
  pointer-events: none;
}

body.theme-anime-red .card:hover {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2), 0 16px 40px rgba(0,0,0,0.4);
}

body.theme-anime-red .section > .card,
body.theme-anime-red .section > .card:hover {
  transform: none !important;
}

body.theme-anime-red .dashboard-card {
  min-height: 132px;
}

body.theme-anime-red .dashboard-card:hover {
  border-color: rgba(59, 130, 246, 0.7);
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.3), 0 32px 70px rgba(0,0,0,0.42);
}

body.theme-anime-red .account-item:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

body.theme-anime-red #section-dashboard .grid-container {
  align-items: start;
}

body.theme-anime-red #section-dashboard .dashboard-card {
  height: fit-content;
  align-self: start;
  min-height: 0;
  padding: 18px 20px 16px;
}

body.theme-anime-red #section-dashboard .dashboard-card .card-header {
  align-items: flex-start;
  margin-bottom: 0;
}

body.theme-anime-red #section-dashboard .dashboard-card .card-header > div:last-child {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

body.theme-anime-red #section-dashboard .dashboard-card h3 {
  line-height: 1.15;
  margin: 0;
}

body.theme-anime-red #section-dashboard .dashboard-card p {
  margin-top: 6px;
  line-height: 1.05;
}

body.theme-anime-red #section-dashboard .dashboard-unread .card-header {
  position: relative;
  min-height: 52px;
}

body.theme-anime-red #section-dashboard .dashboard-unread .card-header > div:last-child {
  position: static;
}

body.theme-anime-red #section-dashboard .dashboard-unread h3 {
  max-width: 125px;
  padding-right: 40px;
}

body.theme-anime-red #section-dashboard .dashboard-unread p {
  position: absolute;
  top: -2px;
  right: 2px;
  margin: 0;
  line-height: 1;
}

body.theme-anime-red .dashboard-card .card-icon,
body.theme-anime-red .card-icon,
body.theme-anime-red .module-avatar {
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
  color: rgba(241,245,249,0.96);
}

body.theme-anime-red .module-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03)),
    linear-gradient(135deg, rgba(0,0,0,0.92), rgba(12,12,12,0.84)),
    url('/static/0bd8dfaf6ab848de88ccf825405484a9.png') center center / cover no-repeat;
  background-blend-mode: soft-light, normal, normal;
  box-shadow: 0 28px 60px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(120, 18, 18, 0.14);
}

body.theme-anime-red .module-card textarea,
body.theme-anime-red .module-card input,
body.theme-anime-red .module-card select,
body.theme-anime-red input,
body.theme-anime-red select,
body.theme-anime-red textarea,
body.theme-anime-red .form-input {
  background: rgba(20,0,0,0.28);
  border: 1px solid rgba(255,90,90,0.18);
  box-shadow: inset 0 1px 0 rgba(255,220,220,0.03);
}

body.theme-anime-red input:focus,
body.theme-anime-red select:focus,
body.theme-anime-red textarea:focus,
body.theme-anime-red .form-input:focus {
  border-color: rgba(255,140,140,0.42);
  box-shadow: 0 0 0 3px rgba(160,0,0,0.18);
}

body.theme-anime-red .dashboard-card .stat-number,
body.theme-anime-red .stat-number,
body.theme-anime-red .stat-value {
  color: #cc6666;
  text-shadow: 0 0 10px rgba(160,30,30,0.08);
}

body.theme-anime-red .btn-primary {
  background: linear-gradient(180deg, rgba(196,24,24,0.98), rgba(120,0,0,0.9));
  color: #fff7f7;
  box-shadow: 0 18px 30px rgba(120,0,0,0.24), inset 0 1px 0 rgba(255,180,180,0.3);
}

body.theme-anime-red .btn-secondary,
body.theme-anime-red .btn-info,
body.theme-anime-red .btn-warning,
body.theme-anime-red .btn-danger {
  background: rgba(255,80,80,0.08);
  border: 1px solid rgba(255,120,120,0.16);
  color: #fff4f4;
}

body.theme-anime-red .btn-secondary:hover,
body.theme-anime-red .btn-info:hover,
body.theme-anime-red .btn-warning:hover,
body.theme-anime-red .btn-danger:hover {
  background: rgba(255,80,80,0.14);
}

body.theme-anime-red .pill {
  background: rgba(255,70,70,0.1);
  border-color: rgba(255,120,120,0.18);
  color: #fff4f4;
}

body.theme-anime-red .pill-warning {
  background: rgba(255,210,210,0.94);
  color: #4a0000;
  border-color: rgba(255,235,235,0.98);
}

body.theme-anime-red .pill-danger {
  background: rgba(180,0,0,0.18);
  color: #ffd9d9;
  border-color: rgba(255,120,120,0.22);
}

body.theme-anime-red .dashboard-card {
  border-color: rgba(190, 62, 62, 0.28);
  box-shadow: 0 24px 52px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(118, 16, 16, 0.16);
}

body.theme-anime-red .dashboard-card:hover {
  border-color: rgba(206,92,92,0.36);
  box-shadow: 0 30px 60px rgba(0,0,0,0.42), inset 0 0 0 1px rgba(150, 24, 24, 0.22);
}

body.theme-anime-red .account-item:hover,
body.theme-anime-red .selector-item label:hover {
  background: rgba(255,70,70,0.08);
}

body.theme-anime-red .terminal {
  color: #ffe4e4;
  border-color: rgba(255,120,120,0.16);
  background:
    linear-gradient(180deg, rgba(255,120,120,0.04), rgba(255,255,255,0.01)),
    rgba(12,0,0,0.88);
}

body.theme-anime-red .settings-thanks-card {
  background:
    linear-gradient(135deg, rgba(255,120,120,0.12), rgba(255,255,255,0.03)),
    linear-gradient(135deg, rgba(32,3,4,0.82), rgba(18,1,1,0.74));
}

body.theme-anime-red .settings-heart,
body.theme-anime-red .settings-credit-item {
  background: rgba(255,70,70,0.06);
  border-color: rgba(255,120,120,0.12);
}

body.theme-anime-yellow {
  --accent-color: #ffb300;
  --accent-hover: #ffc107;
  --text-on-accent: #1a1200;
  --bg-primary: #0a0800;
  --bg-secondary: #110e00;
  --bg-tertiary: #1a1500;
  --glass-bg: rgba(10, 8, 0, 0.84);
  --text-primary: #fff8e1;
  --text-secondary: rgba(255,248,225,0.72);
  --stat-color: #ffb300;
  --glass-border: 1px solid rgba(255, 179, 0, 0.14);
  --glass-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  background: url('/static/80bb9c986844c9b644b8f60a32b898cb.png') center center / cover no-repeat fixed;
}

body.theme-anime-yellow::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(255,179,0,0.12), transparent 24%),
    linear-gradient(90deg, rgba(0,0,0,0.5) 0%, rgba(60,40,0,0.22) 30%, rgba(255,179,0,0.03) 50%, rgba(60,40,0,0.22) 70%, rgba(0,0,0,0.5) 100%),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.01) 0px, rgba(255,255,255,0.01) 1px, transparent 1px, transparent 4px);
  pointer-events: none;
  z-index: 0;
}

body.theme-anime-yellow::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255,179,0,0.06), transparent 18%),
    radial-gradient(circle at bottom left, rgba(200,120,0,0.06), transparent 22%);
  mix-blend-mode: screen;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

body.theme-anime-yellow .ambient-particles span {
  width: 9px;
  height: 14px;
  border-radius: 80% 0 80% 0;
  background: rgba(255,186,0,0.78);
  box-shadow: 0 0 18px rgba(255,179,0,0.3);
  opacity: 0.72;
  transform: rotate(18deg);
}

body.theme-anime-yellow .sidebar {
  background: linear-gradient(180deg, rgba(10,8,0,0.9), rgba(10,8,0,0.64));
  border-right: 1px solid rgba(255,179,0,0.12);
  box-shadow: 24px 0 60px rgba(0,0,0,0.45), 0 0 14px rgba(255,179,0,0.04);
}

body.theme-anime-yellow .brand {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(100deg, rgba(255,200,0,0.6) 0%, rgba(255,200,0,1) 22%, rgba(255,179,0,0.72) 38%, rgba(255,200,0,1) 52%, rgba(255,160,0,0.55) 74%, rgba(255,179,0,0.95) 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 16px rgba(255,179,0,0.12);
  animation: anime-text-sheen 9.5s ease-in-out infinite;
}

body.theme-anime-yellow .brand-logo {
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255,179,0,0.18), 0 14px 28px rgba(0,0,0,0.4);
}

body.theme-anime-yellow .nav-item {
  color: rgba(255,240,200,0.76);
  border: 1px solid transparent;
  border-radius: 16px;
  backdrop-filter: blur(6px);
}

body.theme-anime-yellow .nav-item:hover,
body.theme-anime-yellow .nav-item.active {
  transform: translateX(10px);
  background: linear-gradient(90deg, rgba(255,179,0,0.14), rgba(255,255,255,0.03));
  border-color: rgba(255,179,0,0.14);
  box-shadow: inset 0 1px 0 rgba(255,230,150,0.08), 0 14px 34px rgba(0,0,0,0.34);
}

body.theme-anime-yellow .nav-item.active {
  color: #fff8e1;
  background: linear-gradient(90deg, rgba(180,120,0,0.92), rgba(200,140,0,0.76));
  border-left: 4px solid rgba(255,210,100,0.92);
  box-shadow: inset 0 0 0 1px rgba(255,200,100,0.12), 0 0 12px rgba(255,179,0,0.08);
}

body.theme-anime-yellow .main-content {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.3), rgba(10,8,0,0.15)),
    radial-gradient(circle at top right, rgba(255,179,0,0.04), transparent 30%);
}

body.theme-anime-yellow .top-bar {
  background: linear-gradient(180deg, rgba(12,10,0,0.8), rgba(12,10,0,0.56));
  border-bottom: 1px solid rgba(255,179,0,0.14);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 12px rgba(255,179,0,0.04);
}

body.theme-anime-yellow .page-title {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(100deg, rgba(255,200,0,0.56) 0%, rgba(255,200,0,1) 20%, rgba(255,179,0,0.72) 38%, rgba(255,200,0,1) 54%, rgba(255,160,0,0.56) 74%, rgba(255,179,0,0.96) 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 20px rgba(255,179,0,0.12);
  animation: anime-text-sheen 11s ease-in-out infinite;
}

body.theme-anime-yellow .icon-btn {
  border-radius: 14px;
  background: rgba(255,179,0,0.06);
  border: 1px solid rgba(255,179,0,0.14);
  box-shadow: inset 0 1px 0 rgba(255,220,150,0.05);
}

body.theme-anime-yellow .icon-btn:hover {
  background: rgba(255,179,0,0.14);
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
}

body.theme-anime-yellow .card,
body.theme-anime-yellow .accounts-list-container,
body.theme-anime-yellow .modal-content,
body.theme-anime-yellow .terminal,
body.theme-anime-yellow .selector-item label,
body.theme-anime-yellow .stat-card {
  background:
    linear-gradient(180deg, rgba(255,200,50,0.06), rgba(255,179,0,0.02)),
    linear-gradient(135deg, rgba(9,8,0,0.9), rgba(5,4,0,0.84));
  border: 1px solid rgba(255,179,0,0.18);
  box-shadow: 0 28px 60px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,179,0,0.08);
}

body.theme-anime-yellow .card {
  border-radius: 24px;
  backdrop-filter: blur(12px);
}

body.theme-anime-yellow .card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(140deg, rgba(255,200,80,0.06), transparent 32%, transparent 68%, rgba(255,179,0,0.04)),
    linear-gradient(180deg, transparent, rgba(255,255,255,0.01));
  pointer-events: none;
}

body.theme-anime-yellow .card:hover {
  border-color: rgba(255,179,0,0.4);
  box-shadow: 0 0 20px rgba(255,179,0,0.1), 0 16px 40px rgba(0,0,0,0.4);
}

body.theme-anime-yellow .section > .card,
body.theme-anime-yellow .section > .card:hover {
  transform: none !important;
}

body.theme-anime-yellow .dashboard-card {
  min-height: 132px;
}

body.theme-anime-yellow .dashboard-card:hover {
  border-color: rgba(255,179,0,0.45);
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 0 25px rgba(255,179,0,0.15), 0 32px 70px rgba(0,0,0,0.42);
}

body.theme-anime-yellow .account-item:hover {
  border-color: rgba(255,179,0,0.35);
  box-shadow: 0 0 15px rgba(255,179,0,0.1);
}

body.theme-anime-yellow #section-dashboard .grid-container {
  align-items: start;
}

body.theme-anime-yellow #section-dashboard .dashboard-card {
  height: fit-content;
  align-self: start;
  min-height: 0;
  padding: 18px 20px 16px;
}

body.theme-anime-yellow #section-dashboard .dashboard-card .card-header {
  align-items: flex-start;
  margin-bottom: 0;
}

body.theme-anime-yellow #section-dashboard .dashboard-card .card-header > div:last-child {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

body.theme-anime-yellow #section-dashboard .dashboard-card h3 {
  line-height: 1.15;
  margin: 0;
}

body.theme-anime-yellow #section-dashboard .dashboard-card p {
  margin-top: 6px;
  line-height: 1.05;
}

body.theme-anime-yellow #section-dashboard .dashboard-unread .card-header {
  position: relative;
  min-height: 52px;
}

body.theme-anime-yellow #section-dashboard .dashboard-unread .card-header > div:last-child {
  position: static;
}

body.theme-anime-yellow #section-dashboard .dashboard-unread h3 {
  max-width: 125px;
  padding-right: 40px;
}

body.theme-anime-yellow #section-dashboard .dashboard-unread p {
  position: absolute;
  top: -2px;
  right: 2px;
  margin: 0;
  line-height: 1;
}

body.theme-anime-yellow .dashboard-card .card-icon,
body.theme-anime-yellow .card-icon,
body.theme-anime-yellow .module-avatar {
  background: linear-gradient(180deg, rgba(255,179,0,0.14), rgba(255,179,0,0.04));
  border: 1px solid rgba(255,179,0,0.14);
  box-shadow: inset 0 1px 0 rgba(255,200,100,0.12);
  color: rgba(255,220,100,0.96);
}

body.theme-anime-yellow .module-card {
  background:
    linear-gradient(180deg, rgba(255,200,50,0.08), rgba(255,179,0,0.02)),
    linear-gradient(135deg, rgba(0,0,0,0.92), rgba(8,6,0,0.84)),
    url('/static/80bb9c986844c9b644b8f60a32b898cb.png') center center / cover no-repeat;
  background-blend-mode: soft-light, normal, normal;
  box-shadow: 0 28px 60px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,179,0,0.1);
}

body.theme-anime-yellow .module-card textarea,
body.theme-anime-yellow .module-card input,
body.theme-anime-yellow .module-card select,
body.theme-anime-yellow input,
body.theme-anime-yellow select,
body.theme-anime-yellow textarea,
body.theme-anime-yellow .form-input {
  background: rgba(15,12,0,0.32);
  border: 1px solid rgba(255,179,0,0.18);
  box-shadow: inset 0 1px 0 rgba(255,220,150,0.03);
}

body.theme-anime-yellow input:focus,
body.theme-anime-yellow select:focus,
body.theme-anime-yellow textarea:focus,
body.theme-anime-yellow .form-input:focus {
  border-color: rgba(255,179,0,0.42);
  box-shadow: 0 0 0 3px rgba(255,179,0,0.12);
}

body.theme-anime-yellow .dashboard-card .stat-number,
body.theme-anime-yellow .stat-number,
body.theme-anime-yellow .stat-value {
  color: #ffb300;
  text-shadow: 0 0 12px rgba(255,179,0,0.15);
}

body.theme-anime-yellow .btn-primary {
  background: linear-gradient(180deg, rgba(200,140,0,0.98), rgba(140,90,0,0.92));
  color: #fff8e1;
  box-shadow: 0 18px 30px rgba(140,90,0,0.24), inset 0 1px 0 rgba(255,220,130,0.3);
}

body.theme-anime-yellow .btn-primary:hover {
  background: linear-gradient(180deg, rgba(220,155,0,0.98), rgba(160,105,0,0.92));
}

body.theme-anime-yellow .btn-secondary,
body.theme-anime-yellow .btn-info,
body.theme-anime-yellow .btn-warning,
body.theme-anime-yellow .btn-danger {
  background: rgba(255,179,0,0.08);
  border: 1px solid rgba(255,179,0,0.16);
  color: #fff8e1;
}

body.theme-anime-yellow .btn-secondary:hover,
body.theme-anime-yellow .btn-info:hover,
body.theme-anime-yellow .btn-warning:hover,
body.theme-anime-yellow .btn-danger:hover {
  background: rgba(255,179,0,0.14);
}

body.theme-anime-yellow .pill {
  background: rgba(255,179,0,0.1);
  border-color: rgba(255,179,0,0.2);
  color: #fff8e1;
}

body.theme-anime-yellow .pill-warning {
  background: rgba(255,220,130,0.94);
  color: #3a2800;
  border-color: rgba(255,230,150,0.98);
}

body.theme-anime-yellow .pill-danger {
  background: rgba(180,100,0,0.18);
  color: #ffe0a0;
  border-color: rgba(255,160,50,0.22);
}

body.theme-anime-yellow .dashboard-card {
  border-color: rgba(255,179,0,0.22);
  box-shadow: 0 24px 52px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,179,0,0.1);
}

body.theme-anime-yellow .dashboard-card:hover {
  border-color: rgba(255,179,0,0.34);
  box-shadow: 0 30px 60px rgba(0,0,0,0.42), inset 0 0 0 1px rgba(255,179,0,0.18);
}

body.theme-anime-yellow .account-item:hover,
body.theme-anime-yellow .selector-item label:hover {
  background: rgba(255,179,0,0.06);
}

body.theme-anime-yellow .terminal {
  color: #fff8e1;
  border-color: rgba(255,179,0,0.14);
  background:
    linear-gradient(180deg, rgba(255,179,0,0.04), rgba(255,255,255,0.01)),
    rgba(8,6,0,0.88);
}

body.theme-anime-yellow .settings-thanks-card {
  background:
    linear-gradient(135deg, rgba(255,179,0,0.1), rgba(255,255,255,0.02)),
    linear-gradient(135deg, rgba(18,14,0,0.82), rgba(10,8,0,0.74));
}

body.theme-anime-yellow .settings-heart,
body.theme-anime-yellow .settings-credit-item {
  background: rgba(255,179,0,0.06);
  border-color: rgba(255,179,0,0.12);
}

body.theme-anime-yellow .account-item {
  border-bottom: 1px solid rgba(255,179,0,0.08);
  border-left-width: 4px;
}

body.theme-anime-yellow .modal {
  background: rgba(0,0,0,0.76);
  backdrop-filter: blur(10px);
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  display: flex;
}

body {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.stat-number {
  color: var(--stat-color);
}

.app-container {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-color); }

.sidebar-mobile-header {
  display: none;
}

.sidebar-desktop-brand {
  display: flex;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur);
  border-right: var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  z-index: 50;
  transition: var(--transition);
  flex-shrink: 0;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.brand {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding: 2px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, var(--accent-color), var(--stat-color), rgba(255,255,255,0.98));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(255,255,255,0.1);
  flex: 0 0 auto;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: rgba(241,245,249,0.78);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  transform: translateX(4px);
}

.nav-item.active {
  background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
  box-shadow: 0 4px 16px -4px rgba(59, 130, 246, 0.5);
  color: #ffffff;
  transform: translateX(4px);
}

.nav-item i { 
  width: 18px; 
  text-align: center; 
  font-size: 0.92rem;
  transition: transform 0.25s ease;
}

.nav-item:hover i {
  transform: scale(1.2);
}

.nav-badge {
  background: var(--danger-color, #ef4444);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.05), transparent 40%);
  width: 100%; /* Ensure full width */
}

.top-bar {
  height: var(--header-height);
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: var(--glass-border);
  background: rgba(15, 23, 42, 0.3);
  flex-shrink: 0;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.top-actions {
  display: flex;
  gap: 15px;
}

/* AI Assistant Chat */
.ai-chat-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #090e17;
  border: 2.5px solid #22c55e;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.45);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: float 3s ease-in-out infinite;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.ai-chat-toggle:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 40px rgba(34, 197, 94, 0.7);
  border-color: #4ade80;
}
.ai-toggle-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.ai-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}
.ai-online-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.ai-chat-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  align-items: flex-end;
  justify-content: flex-end;
  padding: 30px;
}
.ai-chat-modal.active {
  display: flex;
}
.ai-chat-content {
  width: 450px;
  max-width: 95vw;
  height: 650px;
  max-height: 90vh;
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur);
  border: var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.ai-chat-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(0,0,0,0.2));
}
.ai-chat-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ai-message, .user-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.user-message {
  flex-direction: row-reverse;
}
.ai-avatar, .user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.ai-avatar {
  background: #090e17;
  border: 1.5px solid #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.35);
  overflow: hidden;
  padding: 0;
}
.ai-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.user-avatar {
  background: #1e293b;
  color: #94a3b8;
}
.ai-text, .user-text {
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 80%;
}
.ai-text {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  border-top-left-radius: 4px;
  word-break: break-word;
}
.ai-text strong, .ai-text b {
  color: #ffffff;
  font-weight: 800;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}
.ai-text em, .ai-text i {
  font-style: italic;
  color: #93c5fd;
}
.ai-paragraph-gap {
  height: 12px;
  width: 100%;
}
.ai-list-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 6px 0;
  line-height: 1.55;
  width: 100%;
}
.ai-list-num {
  color: #4ade80;
  font-weight: 800;
  flex-shrink: 0;
  min-width: 20px;
}
.ai-bullet {
  color: #38bdf8;
  font-weight: 900;
  flex-shrink: 0;
  min-width: 14px;
}
.ai-list-text {
  flex: 1;
}
.ai-inline-code {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.88em;
  color: #38bdf8;
}
.ai-code-block {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 14px;
  overflow-x: auto;
  margin: 8px 0;
}
.ai-code-block code {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.85em;
  color: #e2e8f0;
}
.user-text {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 20px rgba(59,130,246,0.3);
}
.ai-chat-input-wrap {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.15);
}
.ai-quick-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.ai-quick-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-quick-btn:hover {
  background: rgba(59,130,246,0.15);
  color: var(--text-primary);
  border-color: rgba(59,130,246,0.3);
}
.ai-chat-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
#ai-chat-input {
  flex: 1;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.2);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}
#ai-chat-input:focus {
  border-color: rgba(59,130,246,0.5);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.ai-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}
.ai-send-btn:hover {
  transform: scale(1.1);
}

/* Existing styles */
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: var(--glass-border);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.icon-btn:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

#content-area {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  position: relative;
}

/* Sections */
.section {
  display: none;
  animation: fadeIn 0.4s ease;
}
.section.active { display: block; }

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

/* Cards Grid */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.dashboard-secondary-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.35fr);
  gap: 18px;
  align-items: start;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.dashboard-panel {
  min-height: 0;
}

.dashboard-pinned-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, max-content));
  gap: 12px;
  align-items: start;
}

.dashboard-recent-list {
  display: flex;
  flex-direction: column;
}

@media (max-width: 1100px) {
  .dashboard-secondary-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-panels {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: var(--border-radius);
  padding: 25px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.section > .card,
.section > .card:hover,
#section-wins .card,
#section-wins .card:hover,
#section-balance .card,
#section-balance .card:hover,
#section-inbox .card,
#section-inbox .card:hover {
  transform: none !important;
}

.win-item-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.win-item-card:hover {
  border-color: rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35) !important;
  transform: none !important;
}

.dashboard-card {
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 30px -15px rgba(0,0,0,0.5);
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
}

.dashboard-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.6), 0 0 20px rgba(59, 130, 246, 0.15);
}

.dashboard-card .card-icon {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}

.dashboard-card h3 {
  color: rgba(241,245,249,0.96);
}

.dashboard-card .stat-number {
  color: rgba(241,245,249,0.98);
  font-weight: 900;
  font-size: 1.45rem;
  letter-spacing: 0.01em;
}

.dashboard-total {
  border-left: 4px solid rgba(148, 163, 184, 0.8);
}

.dashboard-active {
  border-left: 4px solid rgba(16, 185, 129, 0.9);
}

.dashboard-active .stat-number {
  color: rgba(52, 211, 153, 0.98);
}

.dashboard-balance {
  border-left: 4px solid rgba(56, 189, 248, 0.9);
}

.dashboard-balance .stat-number {
  color: rgba(125, 211, 252, 0.98);
}

.dashboard-overlimit {
  border-left: 4px solid rgba(245, 158, 11, 0.95);
}

.dashboard-overlimit .stat-number {
  color: rgba(251, 191, 36, 0.98);
}

.dashboard-broken {
  border-left: 4px solid rgba(239, 68, 68, 0.95);
}

.dashboard-broken .stat-number {
  color: rgba(248, 113, 113, 0.98);
}

.balance-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.stat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 26px -16px rgba(0,0,0,0.55);
}

.stat-card:hover {
  transform: none;
}

.stat-title {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.stat-value {
  margin-top: 8px;
  font-size: 1.35rem;
  font-weight: 800;
}

.stat-neutral {
  border-left: 4px solid rgba(148, 163, 184, 0.75);
}

.stat-info {
  border-left: 4px solid rgba(56, 189, 248, 0.85);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
  border-color: var(--accent-color);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent-color);
}

.module-avatar {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.module-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.utility-feature-card { position: relative; overflow: hidden; }
.utility-feature-card::after { content: '⭐'; position: absolute; right: 14px; top: 12px; font-size: 2.4rem; opacity: .12; transform: rotate(14deg); pointer-events: none; }
.utility-feature-card .module-input { width: 100%; min-height: 38px; padding: 9px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.2); color: inherit; }
.utility-feature-card .module-input:focus { border-color: rgba(245,158,11,.7); box-shadow: 0 0 0 3px rgba(245,158,11,.14); outline: none; }

.account-choice-card { display:flex; align-items:center; gap:12px; min-height:66px; margin:6px 0; padding:10px 12px; border:1px solid rgba(255,255,255,.1); border-radius:14px; background:rgba(255,255,255,.025); cursor:pointer; transition:transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.account-choice-card:hover { transform:translateX(2px); background:rgba(255,255,255,.07); border-color:rgba(255,255,255,.25); }
.account-choice-card.is-selected { background:rgba(56,189,248,.13); border-color:rgba(56,189,248,.65); box-shadow:0 8px 22px -18px rgba(56,189,248,.95); }
.account-choice-card input { position:absolute; opacity:0; pointer-events:none; }
.account-choice-avatar { width:42px; height:42px; flex:0 0 42px; border-radius:12px; object-fit:cover; }
.account-choice-fallback { display:grid; place-items:center; background:rgba(56,189,248,.16); color:#7dd3fc; font-weight:800; }
.account-choice-copy { flex:1; min-width:0; line-height:1.35; }
.account-choice-mark { width:25px; height:25px; display:grid; place-items:center; border-radius:8px; border:1px solid rgba(255,255,255,.2); color:transparent; background:rgba(0,0,0,.18); font-weight:900; }
.account-choice-card.is-selected .account-choice-mark { color:#07131b; background:#38bdf8; border-color:#38bdf8; }

.module-card-info {
  flex: 1;
  min-width: 0;
}

.module-card-info h3 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 4px 0 !important;
  font-size: 1.1rem;
  font-weight: 800;
}

.module-pin-btn {
  flex-shrink: 0;
  margin-left: auto !important;
}

.card h3 { font-size: 1.1rem; margin: 0; }
.card p { font-size: 0.9rem; color: var(--text-secondary); margin-top: 5px; }

/* Inputs */
input, select, textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 12px 15px;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.btn-info {
  background: rgba(56, 189, 248, 0.18);
  color: rgba(224, 242, 254, 0.98);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.btn-info:hover {
  background: rgba(56, 189, 248, 0.24);
  transform: translateY(-1px);
}

.btn-warning {
  background: rgba(245, 158, 11, 0.18);
  color: rgba(255, 237, 213, 0.98);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.btn-warning:hover {
  background: rgba(245, 158, 11, 0.24);
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.18);
  color: rgba(254, 226, 226, 0.98);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.24);
  transform: translateY(-1px);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.10);
}

.pill-danger {
  background: rgba(239, 68, 68, 0.18);
  color: rgba(254, 226, 226, 0.98);
  border-color: rgba(239, 68, 68, 0.35);
}

.pill-info {
  background: rgba(59, 130, 246, 0.18);
  color: rgba(219, 234, 254, 0.98);
  border-color: rgba(59, 130, 246, 0.35);
}

.unread-chat {
  background: rgba(59, 130, 246, 0.08);
}

.btn-sm {
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.btn-danger { background: var(--danger-color); color: white; }
.btn-success { background: var(--success-color); color: white; }

/* Accounts List Virtualization */
.accounts-list-container {
  height: calc(100vh - 200px);
  overflow-y: auto;
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: var(--border-radius);
  position: relative;
}

.account-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s, box-shadow 0.2s;
  border-left: 3px solid transparent;
}

.account-item:hover {
  background: rgba(255,255,255,0.05);
}

.account-item.over-limit {
  border-left-color: var(--danger-color);
  background: rgba(239, 68, 68, 0.05);
}

.account-item.over-limit:hover {
  background: rgba(239, 68, 68, 0.08);
}

.account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.account-info { flex: 1; }
.account-name { font-weight: 600; }
.account-phone { font-size: 0.85rem; color: var(--text-secondary); }

.account-status {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-active { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.status-banned { background: rgba(239, 68, 68, 0.2); color: #f87171; }

/* Modal */
.modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  opacity: 0;
  transition: opacity 0.3s;
}
.modal.open { display: flex; opacity: 1; }

/* Account Selector Modal Items */
.selector-item label {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  transition: background 0.2s;
}

.selector-item label:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Override any potential white backgrounds in modals */
.modal-content, .modal-content * {
    color: var(--text-primary);
}

.modal-content button.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-content button.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.module-description-content {
  background: linear-gradient(135deg, rgba(25, 25, 35, 0.96), rgba(15, 15, 22, 0.96));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  padding: 22px;
}

.module-desc-text {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Ensure checkbox is visible */
.selector-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selector-item input[type="checkbox"]:checked {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.selector-item input[type="checkbox"]:checked::after {
    content: '✔';
    font-size: 12px;
    color: white;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
  color: var(--text-primary);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  min-width: 720px;
}

.hamburger-btn {
  display: none;
}

.sidebar-overlay {
  display: none;
}

.sidebar-overlay[hidden] {
  display: none !important;
}

#settings-avatar-preview {
  background-repeat: no-repeat;
}

/* Ensure inputs in modals are visible */
.form-input {
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 15px;
  border-radius: 10px;
  width: 100%;
}

input[type="file"] {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text-secondary);
  padding: 10px;
}

input[type="file"]::file-selector-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text-primary);
  padding: 8px 12px;
  margin-right: 12px;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Checkbox size */
input[type="checkbox"] {
  accent-color: var(--accent-color);
  width: 18px;
  height: 18px;
  margin-right: 8px;
}
.modal.open .modal-content { transform: scale(1); }

/* Logs Terminal */
.terminal {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
  font-family: 'Fira Code', monospace;
  height: 500px;
  overflow-y: auto;
  color: #10b981;
}

/* Animations */
@keyframes slideIn {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.nav-item { animation: slideIn 0.3s ease backwards; }
.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.15s; }
.nav-item:nth-child(3) { animation-delay: 0.2s; }
/* ... and so on */

/* Snowflakes for New Year Theme */
.snowflake {
  position: fixed;
  color: #fff;
  font-size: 1em;
  font-family: Arial;
  text-shadow: 0 0 1px #000;
  z-index: 9999;
  top: -10%;
  pointer-events: none;
  animation-name: snowflakes-fall, snowflakes-shake;
  animation-duration: 10s, 3s;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
}
@keyframes snowflakes-fall { 0% { top: -10%; } 100% { top: 100%; } }
@keyframes snowflakes-shake { 0% { transform: translateX(0px); } 50% { transform: translateX(80px); } 100% { transform: translateX(0px); } }

.ambient-particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ambient-particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.35);
  animation: ambient-float linear infinite;
}

.ambient-particles span:nth-child(1) { left: 8%; animation-duration: 16s; animation-delay: -5s; }
.ambient-particles span:nth-child(2) { left: 16%; animation-duration: 22s; animation-delay: -9s; }
.ambient-particles span:nth-child(3) { left: 24%; animation-duration: 18s; animation-delay: -2s; }
.ambient-particles span:nth-child(4) { left: 31%; animation-duration: 20s; animation-delay: -11s; }
.ambient-particles span:nth-child(5) { left: 38%; animation-duration: 24s; animation-delay: -7s; }
.ambient-particles span:nth-child(6) { left: 44%; animation-duration: 19s; animation-delay: -4s; }
.ambient-particles span:nth-child(7) { left: 52%; animation-duration: 26s; animation-delay: -13s; }
.ambient-particles span:nth-child(8) { left: 60%; animation-duration: 17s; animation-delay: -1s; }
.ambient-particles span:nth-child(9) { left: 66%; animation-duration: 21s; animation-delay: -8s; }
.ambient-particles span:nth-child(10) { left: 74%; animation-duration: 23s; animation-delay: -14s; }
.ambient-particles span:nth-child(11) { left: 81%; animation-duration: 18s; animation-delay: -6s; }
.ambient-particles span:nth-child(12) { left: 87%; animation-duration: 25s; animation-delay: -10s; }
.ambient-particles span:nth-child(13) { left: 92%; animation-duration: 20s; animation-delay: -3s; }
.ambient-particles span:nth-child(14) { left: 96%; animation-duration: 27s; animation-delay: -12s; }

@keyframes ambient-float {
  0% { transform: translate3d(0, 102vh, 0) scale(0.7); opacity: 0; }
  10% { opacity: 0.65; }
  90% { opacity: 0.35; }
  100% { transform: translate3d(-20px, -10vh, 0) scale(1.2); opacity: 0; }
}

.app-container {
  position: relative;
  z-index: 1;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
}

#account-selector-modal {
  z-index: 4000;
}

.settings-card-glow {
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 16px 50px -24px rgba(30, 64, 175, 0.4);
}

.settings-thanks-card {
  background: linear-gradient(140deg, rgba(59,130,246,0.13), rgba(16,185,129,0.11));
}

.settings-heart {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: #f97316;
  font-size: 1rem;
}

.settings-credit-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-credit-name {
  margin-top: 4px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  font-size: 1.04rem;
}

/* ==========================================
   🎯 Skeleton Screens (загрузка)
   ========================================== */
.skeleton {
  background: linear-gradient(90deg, 
    rgba(255,255,255,0.06) 25%, 
    rgba(255,255,255,0.12) 50%, 
    rgba(255,255,255,0.06) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-card {
  height: 120px;
  border-radius: 14px;
  margin-bottom: 12px;
}

/* ==========================================
   📱 Mobile Responsive
   ========================================== */
@media (max-width: 1024px) {
  .sidebar {
    width: 220px;
  }
  .grid-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    height: 100dvh;
  }

  .sidebar-mobile-header {
    display: flex !important;
  }
  
  .sidebar-desktop-brand {
    display: none !important;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85%;
    height: 100dvh;
    z-index: 2000;
    padding: 18px 16px 24px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-secondary);
    box-shadow: 20px 0 50px rgba(0,0,0,0.5);
    border-right: 1px solid var(--glass-border);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
    min-width: 0;
    padding: 0;
  }

  .top-bar {
    height: auto;
    min-height: 70px;
    padding: 14px 16px 14px 72px;
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .page-title {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions {
    width: 100%;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .top-actions .icon-btn {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
  }

  #content-area {
    padding: 18px 16px 28px;
  }
  
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .dashboard-secondary-grid {
    grid-template-columns: 1fr;
  }
  
  /* Hamburger menu button */
  .hamburger-btn {
    display: flex !important;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1100;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  }
  
  .hamburger-btn:hover {
    background: rgba(255,255,255,0.15);
    transform: scale(1.05);
  }
  
  /* Overlay for mobile menu */
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1999;
    display: none;
  }
  
  .sidebar-overlay.open {
    display: block;
    animation: fadeInOverlay 0.3s ease;
  }

  @keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  .card {
    padding: 16px;
  }

  .card-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .dashboard-panels {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .accounts-list-container {
    height: auto;
    max-height: calc(100dvh - 220px);
  }

  .account-item {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
  }

  .account-avatar {
    margin-right: 0;
  }

  .account-info {
    min-width: 0;
    flex: 1 1 calc(100% - 52px);
  }

  .account-status {
    margin-left: auto;
  }

  .modal {
    align-items: flex-end;
    padding-top: 20px;
  }

  .modal-content {
    width: 100%;
    max-width: none;
    margin: 0;
    max-height: 90dvh;
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    padding: 20px 18px;
  }

  #startup-overlay > div {
    width: calc(100% - 24px) !important;
    padding: 20px !important;
  }

  #startup-overlay > div > div:first-child {
    flex-direction: column;
    align-items: flex-start !important;
  }

  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 16px; }
}

@media (max-width: 480px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
  
  .top-bar {
    padding: 12px 12px 12px 64px;
  }

  #content-area {
    padding: 14px 12px 24px;
  }
  
  .btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  .btn:not(.btn-sm) {
    width: 100%;
    justify-content: center;
  }

  .icon-btn,
  .btn-sm {
    width: auto;
  }
  
  .modal-content {
    padding: 16px;
    max-height: 92dvh;
    overflow-y: auto;
  }

  .table-wrap table {
    min-width: 560px !important;
  }
  
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
}

/* Dashboard Pinned Modules Fix */
.dashboard-pinned-card {
  padding: 16px !important;
  min-height: auto !important;
  overflow: visible !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.dashboard-pinned-card:hover {
  transform: translateY(-3px) !important;
  border-color: var(--accent-color) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

#dashboard-pinned-list::-webkit-scrollbar {
  width: 4px;
}

#dashboard-pinned-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

/* ==========================================
   🌙 Light Theme (prefers-color-scheme)
   ========================================== */
@media (prefers-color-scheme: light) {
  :root[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: 1px solid rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
  }
}

/* ==========================================
   ✨ Animations & Micro-interactions
   ========================================== */
/* Button press effect */
.btn:active {
  transform: scale(0.98) !important;
}

/* Card hover lift */
.card:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Icon pulse on hover */
.nav-item:hover i,
.card-icon:hover i {
  animation: icon-pulse 0.6s ease;
}

@keyframes icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Modal fade-in */
.modal {
  animation: modal-fade-in 0.3s ease;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  animation: modal-slide-up 0.3s ease;
}

@keyframes modal-slide-up {
  from { 
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Tooltip */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

.module-desc {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.5em; /* Фиксированная высота для выравнивания */
  cursor: pointer;
  transition: color 0.2s;
}

.module-desc:hover {
  color: var(--accent-color);
}

/* Module Card Form Elements */
.module-textarea {
  width: 100%;
  height: 85px;
  min-height: 75px;
  resize: vertical;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 10px 12px;
  margin-bottom: 15px;
  font-family: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
  transition: var(--transition);
}

.module-textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  outline: none;
}

/* === Responsive Balance Section & Mobile Optimization === */
.balance-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.balance-actions-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.balance-bots-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.25);
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  #section-balance .card {
    padding: 12px;
    margin: 0;
    max-width: 100vw;
    box-sizing: border-box;
  }
  .balance-header-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .balance-header-wrap h3 {
    font-size: 1.15rem;
  }
  .balance-actions-bar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .balance-bots-filter {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 8px;
    box-sizing: border-box;
  }
  .balance-bots-filter span {
    grid-column: span 2;
    margin-bottom: 2px;
  }
  .balance-bot-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.76rem;
    padding: 8px 4px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .balance-actions-bar > button {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.9rem;
  }
  .balance-stats {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }
  .stat-card {
    padding: 12px;
  }
  .stat-value {
    font-size: 1.2rem;
  }
  .table-wrap {
    width: 100%;
    max-width: calc(100vw - 32px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
  }
}

/* ===== Reactions UI ===== */
.reactions-emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(255,255,255,.04), rgba(0,0,0,.28));
  border: 1px solid rgba(255,255,255,.09);
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.reactions-emoji-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  font-size: 30px;
  line-height: 1;
  border-radius: 16px;
  cursor: pointer;
  background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
  transition: transform .15s cubic-bezier(.2,.8,.3,1), background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.reactions-emoji-btn:hover {
  background: linear-gradient(160deg, rgba(255,255,255,.17), rgba(255,255,255,.05));
  border-color: rgba(255,255,255,.32);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 26px -18px rgba(0,0,0,.95), inset 0 1px 0 rgba(255,255,255,.12);
}

.reactions-emoji-btn:active {
  transform: translateY(-1px) scale(.97);
}

.reactions-emoji-btn.active {
  background: linear-gradient(160deg, rgba(56,189,248,.34), rgba(14,165,233,.16));
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56,189,248,.28), 0 16px 30px -20px rgba(56,189,248,.9), inset 0 1px 0 rgba(255,255,255,.16);
  transform: translateY(-3px) scale(1.04);
}

.reactions-emoji-btn.active::after {
  content: '✓';
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #38bdf8;
  color: #07131b;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 4px 10px -4px rgba(0,0,0,.9);
}

.reactions-custom-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.reactions-custom-input {
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  transition: border-color .16s ease;
}

.reactions-custom-input:focus {
  outline: none;
  border-color: var(--accent-color, #3b82f6);
}

.reactions-selected-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  min-height: 34px;
}

.reactions-chips-label,
.reactions-chips-empty {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.reactions-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: var(--text-primary);
  transition: background .16s ease, border-color .16s ease;
}

.reactions-chip i {
  font-size: 11px;
  opacity: .65;
}

.reactions-chip:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.55);
}

.reactions-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.reactions-mode-card {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 142px;
  padding: 18px;
  border-radius: 18px;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  border: 1px solid rgba(255,255,255,.12);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.reactions-mode-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0, rgba(56,189,248,.14), transparent 52%);
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}

.reactions-mode-card:hover {
  transform: translateY(-2px);
  background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  border-color: rgba(255,255,255,.28);
  box-shadow: 0 12px 28px -20px rgba(0,0,0,.9);
}

.reactions-mode-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}

.reactions-mode-card input[type="radio"]:focus-visible ~ .reactions-mode-body {
  outline: 2px solid #38bdf8;
  outline-offset: 4px;
}

.reactions-mode-check {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(0,0,0,.22);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.reactions-mode-card input[type="radio"]:checked ~ .reactions-mode-check {
  border-color: #38bdf8;
  background: #38bdf8;
  transform: scale(1.06);
  box-shadow: 0 0 0 4px rgba(56,189,248,.14);
}

.reactions-mode-card input[type="radio"]:checked ~ .reactions-mode-check::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #07131b;
  font-size: 17px;
  font-weight: 900;
}

.reactions-mode-card:has(input[type="radio"]:checked) {
  background: linear-gradient(145deg, rgba(14,165,233,.2), rgba(14,165,233,.06));
  border-color: rgba(56,189,248,.75);
  box-shadow: 0 16px 34px -24px rgba(56,189,248,.9), inset 0 1px 0 rgba(255,255,255,.08);
}

.reactions-mode-card:has(input[type="radio"]:checked)::before {
  opacity: 1;
}

.reactions-mode-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  width: 100%;
  padding-right: 38px;
}

.reactions-mode-body::before {
  content: '↔';
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #7dd3fc;
  background: rgba(56,189,248,.12);
  font-size: 22px;
  font-weight: 800;
}

.reactions-mode-card:nth-child(2) .reactions-mode-body::before {
  content: '✦';
  color: #fcd34d;
  background: rgba(245,158,11,.13);
}

.reactions-mode-title {
  margin-top: 50px;
  font-weight: 750;
  font-size: 1rem;
  letter-spacing: -.01em;
}

.reactions-mode-desc {
  max-width: 38ch;
  font-size: .82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}


.reactions-mode-badge {
  position: absolute;
  left: 18px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #07131b;
  background: #38bdf8;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}

.reactions-mode-card:has(input[type="radio"]:checked) .reactions-mode-badge {
  opacity: 1;
  transform: translateY(0);
}

.reactions-mode-card:not(:has(input[type="radio"]:checked)) {
  opacity: .82;
}

.reactions-mode-card:not(:has(input[type="radio"]:checked)):hover {
  opacity: 1;
}

@media (max-width: 680px) {
  .reactions-mode-grid { grid-template-columns: 1fr; }
}

/* ===== Stars transfer card ===== */
.star-transfer-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(250,204,21,.07), rgba(255,255,255,.015));
  border: 1px solid rgba(250,204,21,.22);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.star-transfer-card:hover {
  border-color: rgba(250,204,21,.4);
  box-shadow: 0 18px 40px -30px rgba(250,204,21,.75);
  transform: translateY(-2px);
}

.star-transfer-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  color: #fbbf24;
  font-size: 19px;
  background: linear-gradient(150deg, rgba(250,204,21,.24), rgba(250,204,21,.06));
  border: 1px solid rgba(250,204,21,.3);
}

.star-transfer-card .module-card-info h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -.01em;
}

.star-transfer-card .module-desc {
  margin: 3px 0 0;
  font-size: .79rem;
  line-height: 1.42;
  color: var(--text-secondary);
  max-width: 46ch;
}

.star-transfer-label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--text-secondary);
}

.star-transfer-card .module-input {
  width: 100%;
  border-radius: 13px;
  padding: 11px 14px;
  background: rgba(0,0,0,.26);
  border: 1px solid rgba(255,255,255,.12);
  transition: border-color .16s ease, background .16s ease;
}

.star-transfer-card .module-input:focus {
  outline: none;
  border-color: rgba(250,204,21,.6);
  background: rgba(0,0,0,.34);
}

.star-range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.star-range-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.star-range-grid label span {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.star-transfer-submit {
  width: 100%;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 13px;
  font-weight: 700;
}

@media (max-width: 520px) {
  .star-range-grid { grid-template-columns: 1fr; }
}

