/* ============================================================
   style.css – Aliens Panel
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font: 'Outfit', system-ui, sans-serif;

  /* Kolory główne */
  --clr-bg:        #080c1a;
  --clr-bg-2:      #0d1326;
  --clr-surface:   #111827;
  --clr-surface-2: #1a2236;
  --clr-border:    rgba(99,102,241,.25);
  --clr-border-2:  rgba(99,102,241,.12);

  /* Akcenty */
  --clr-primary:   #6366f1;
  --clr-primary-h: #818cf8;
  --clr-cyan:      #22d3ee;
  --clr-cyan-h:    #6ee7f7;

  /* Tekst */
  --clr-text:      #e2e8f0;
  --clr-text-muted:#94a3b8;
  --clr-text-dim:  #475569;

  /* Status */
  --clr-error:     #f87171;
  --clr-success:   #34d399;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 24px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 48px rgba(0,0,0,.6);
  --glow:      0 0 32px rgba(99,102,241,.35);

  /* Sidebar */
  --sidebar-w: 260px;

  /* Transitions */
  --trans: .25s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--clr-bg);
  color: var(--clr-text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,.18) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(34,211,238,.12) 0%, transparent 55%),
              var(--clr-bg);
}

/* ----- Cząsteczki w tle ----- */
.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.7), transparent 70%);
  animation: float linear infinite;
  opacity: 0;
}
@keyframes float {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: .4; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ----- Login wrapper ----- */
.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 1.5rem;
}

.login-card {
  background: rgba(17,24,39,.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--clr-border);
  border-radius: 1.5rem;
  padding: 2.5rem 2.25rem;
  box-shadow: var(--shadow-lg), var(--glow);
  animation: cardIn .6s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(30px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* ----- Header ----- */
.login-header {
  text-align: center;
  margin-bottom: 2rem;
}
.logo-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  background: rgba(99,102,241,.12);
  border: 1px solid var(--clr-border);
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  animation: pulse-glow 3s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%,100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); }
  50%      { box-shadow: 0 0 20px 6px rgba(99,102,241,.25); }
}
.logo-icon svg { width: 100%; height: 100%; }

.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--clr-cyan-h), var(--clr-primary-h));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-subtitle {
  font-size: .875rem;
  color: var(--clr-text-muted);
  margin-top: .25rem;
}

/* ----- Form ----- */
.login-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group { display: flex; flex-direction: column; gap: .45rem; }
.form-group label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--clr-text-muted);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: .85rem;
  width: 18px;
  height: 18px;
  color: var(--clr-text-dim);
  pointer-events: none;
  transition: color var(--trans);
}
.input-wrapper:focus-within .input-icon { color: var(--clr-primary-h); }

.input-wrapper input {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--clr-border-2);
  border-radius: .75rem;
  padding: .8rem 3rem .8rem 2.75rem;
  font-family: var(--font);
  font-size: .95rem;
  color: var(--clr-text);
  outline: none;
  transition: border-color var(--trans), box-shadow var(--trans), background var(--trans);
}
.input-wrapper input::placeholder { color: var(--clr-text-dim); }
.input-wrapper input:focus {
  border-color: var(--clr-primary);
  background: rgba(99,102,241,.07);
  box-shadow: 0 0 0 3px rgba(99,102,241,.18);
}

.toggle-password {
  position: absolute;
  right: .75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--clr-text-dim);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--trans);
}
.toggle-password:hover { color: var(--clr-primary-h); }
.toggle-password svg { width: 18px; height: 18px; }

/* ----- Error ----- */
.error-msg {
  display: none;
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.3);
  color: var(--clr-error);
  border-radius: .6rem;
  padding: .65rem 1rem;
  font-size: .875rem;
  animation: shake .4s ease;
}
.error-msg.visible { display: block; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-6px); }
  40%,80%  { transform: translateX(6px); }
}

/* ----- Login button ----- */
.btn-login {
  margin-top: .25rem;
  width: 100%;
  padding: .9rem;
  background: linear-gradient(135deg, var(--clr-primary), #4f46e5);
  border: none;
  border-radius: .75rem;
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: transform var(--trans), box-shadow var(--trans), opacity var(--trans);
  box-shadow: 0 4px 20px rgba(99,102,241,.45);
  position: relative;
  overflow: hidden;
}
.btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
  opacity: 0;
  transition: opacity var(--trans);
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,.55); }
.btn-login:hover::before { opacity: 1; }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: .7; cursor: not-allowed; transform: none; }

.btn-spinner svg { width: 20px; height: 20px; animation: spin 1s linear infinite; }
.spinner-circle { stroke-linecap: round; animation: dash 1.5s ease-in-out infinite; }
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes dash  { 0%{stroke-dashoffset:60}50%{stroke-dashoffset:20}100%{stroke-dashoffset:60} }

/* ----- Footer ----- */
.login-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: .8rem;
  color: var(--clr-text-dim);
}

/* ============================================================
   DASHBOARD PAGE
   ============================================================ */

body.dashboard-page {
  display: flex;
  min-height: 100vh;
  background: var(--clr-bg);
}

/* ----- Sidebar ----- */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--clr-surface);
  border-right: 1px solid var(--clr-border-2);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--trans);
  box-shadow: 4px 0 24px rgba(0,0,0,.4);
}
.sidebar.hidden { transform: translateX(-100%); }

.sidebar-header {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--clr-border-2);
}
.sidebar-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: rgba(99,102,241,.12);
  border: 1px solid var(--clr-border);
  border-radius: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}
.sidebar-logo svg { width: 100%; height: 100%; }
.sidebar-name {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--clr-cyan-h), var(--clr-primary-h));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-sub { display: block; font-size: .72rem; color: var(--clr-text-dim); }

/* ----- Nav ----- */
.sidebar-nav {
  flex: 1;
  padding: 1.25rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.nav-section-label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--clr-text-dim);
  padding: 0 .5rem;
  margin-bottom: .5rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem .9rem;
  border-radius: .75rem;
  text-decoration: none;
  color: var(--clr-text-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: background var(--trans), color var(--trans);
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(99,102,241,.1); color: var(--clr-text); }
.nav-item.active {
  background: rgba(99,102,241,.18);
  color: var(--clr-primary-h);
  box-shadow: inset 3px 0 0 var(--clr-primary);
}

/* ----- Sidebar footer ----- */
.sidebar-footer {
  padding: 1rem .75rem;
  border-top: 1px solid var(--clr-border-2);
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .75rem;
  background: rgba(255,255,255,.04);
  border-radius: .75rem;
  border: 1px solid var(--clr-border-2);
}
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: .5rem;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
  flex-shrink: 0;
}
.user-name { display: block; font-size: .875rem; font-weight: 600; }
.user-role { display: block; font-size: .72rem; color: var(--clr-text-dim); }

.btn-logout {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .65rem .9rem;
  border: 1px solid rgba(248,113,113,.2);
  background: rgba(248,113,113,.07);
  border-radius: .75rem;
  color: #f87171;
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--trans), border-color var(--trans);
}
.btn-logout:hover { background: rgba(248,113,113,.14); border-color: rgba(248,113,113,.4); }
.btn-logout svg { width: 16px; height: 16px; }

/* ----- Main content ----- */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--trans);
}
.main-content.full { margin-left: 0; }

/* ----- Topbar ----- */
.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: rgba(17,24,39,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--clr-border-2);
  position: sticky;
  top: 0;
  z-index: 50;
}
.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--clr-text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: .5rem;
  transition: background var(--trans), color var(--trans);
}
.sidebar-toggle:hover { background: rgba(255,255,255,.06); color: var(--clr-text); }
.sidebar-toggle svg { width: 20px; height: 20px; }
.topbar-title { font-size: 1.1rem; font-weight: 600; flex: 1; }
.topbar-date { font-size: .8rem; color: var(--clr-text-dim); }
.topbar-right { display: flex; align-items: center; gap: 1rem; }

/* ----- Dashboard section ----- */
.dashboard-section { padding: 2rem; flex: 1; }

/* ============================================================
   SEKCJA STATYSTYK BOTA DISCORD & FINANSÓW
   ============================================================ */

/* ----- Pasek stanu bota ----- */
.bot-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(17,24,39,.9), rgba(26,34,54,.75));
  border: 1px solid var(--clr-border);
  border-radius: 1rem;
  padding: 1rem 1.4rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.bot-status-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-indicator-wrap {
  position: relative;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--clr-success);
  box-shadow: 0 0 10px var(--clr-success);
  transition: background var(--trans), box-shadow var(--trans);
}
.status-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--clr-success);
  opacity: .6;
  animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}

.bot-status-bar.error .status-dot,
.bot-status-bar.error .status-ping {
  background: var(--clr-error);
  box-shadow: 0 0 10px var(--clr-error);
}

@keyframes ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.bot-info-text {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.bot-status-headline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}

.bot-title {
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
}

.bot-state-text {
  font-size: .88rem;
  font-weight: 500;
  color: var(--clr-success);
}
.bot-status-bar.error .bot-state-text {
  color: var(--clr-error);
}

.bot-file-tag {
  background: rgba(99,102,241,.18);
  border: 1px solid rgba(99,102,241,.35);
  color: var(--clr-primary-h);
  font-size: .72rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: .4rem;
  font-family: monospace;
}

.bot-status-sub {
  font-size: .8rem;
  color: var(--clr-text-muted);
  display: flex;
  align-items: center;
  gap: .45rem;
}
.bot-status-sub strong {
  color: var(--clr-text);
}
.bot-status-sub .sep {
  opacity: .4;
}

.bot-status-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.btn-file-load, .btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .95rem;
  border-radius: .65rem;
  font-size: .82rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--trans);
  user-select: none;
}

.btn-file-load {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border-2);
  color: var(--clr-text-muted);
}
.btn-file-load:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-color: var(--clr-border);
}

.btn-refresh {
  background: rgba(99,102,241,.16);
  border: 1px solid var(--clr-border);
  color: var(--clr-primary-h);
}
.btn-refresh:hover {
  background: rgba(99,102,241,.28);
  color: #fff;
  box-shadow: 0 0 16px rgba(99,102,241,.35);
}
.btn-refresh svg, .btn-file-load svg {
  width: 16px;
  height: 16px;
}
.btn-refresh.spinning svg {
  animation: spin 0.8s linear infinite;
}

/* ----- Alert błędu danych ----- */
.data-alert {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  background: rgba(248,113,113,.08);
  border: 1px solid rgba(248,113,113,.25);
  border-radius: .85rem;
  padding: .9rem 1.25rem;
  margin-bottom: 1.5rem;
  color: #fca5a5;
  animation: fadeIn .3s ease;
}
.alert-icon { font-size: 1.2rem; line-height: 1; }
.alert-title { font-weight: 600; font-size: .9rem; margin-bottom: .2rem; color: #fff; }
.alert-msg { font-size: .825rem; color: #cbd5e1; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----- Siatka kart KPI ----- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  position: relative;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-2);
  border-radius: 1.15rem;
  padding: 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  overflow: hidden;
  transition: transform var(--trans), border-color var(--trans), box-shadow var(--trans);
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--clr-border);
  box-shadow: 0 8px 30px rgba(0,0,0,.45);
}

.stat-card-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  pointer-events: none;
  opacity: .35;
  filter: blur(28px);
}
.kpi-total .stat-card-glow   { background: var(--clr-cyan); }
.kpi-split .stat-card-glow   { background: #a855f7; }
.kpi-count .stat-card-glow   { background: #3b82f6; }
.kpi-avg .stat-card-glow     { background: #10b981; }

.stat-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--trans);
}
.stat-card:hover .stat-icon-wrap { transform: scale(1.06); }
.stat-icon-wrap svg { width: 24px; height: 24px; }

.icon-cyan {
  background: rgba(34,211,238,.12);
  border: 1px solid rgba(34,211,238,.3);
  color: var(--clr-cyan);
}
.icon-purple {
  background: rgba(168,85,247,.12);
  border: 1px solid rgba(168,85,247,.3);
  color: #c084fc;
}
.icon-blue {
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.3);
  color: #60a5fa;
}
.icon-emerald {
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.3);
  color: #34d399;
}

.stat-body {
  flex: 1;
  min-width: 0;
}

.stat-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .4rem;
}

.stat-label {
  font-size: .85rem;
  font-weight: 500;
  color: var(--clr-text-muted);
}

.stat-badge {
  font-size: .68rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 9999px;
  white-space: nowrap;
}
.badge-cyan {
  background: rgba(34,211,238,.12);
  border: 1px solid rgba(34,211,238,.28);
  color: var(--clr-cyan);
}
.badge-purple {
  background: rgba(168,85,247,.12);
  border: 1px solid rgba(168,85,247,.28);
  color: #c084fc;
}
.badge-blue {
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.28);
  color: #60a5fa;
}
.badge-emerald {
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.28);
  color: #34d399;
}

.stat-main-value {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  margin-bottom: .35rem;
}
.value-number {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
  line-height: 1.2;
}
.value-currency, .value-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--clr-text-muted);
}

/* Wyróżniony podział 50/50 */
.highlight-split .value-number {
  background: linear-gradient(135deg, #e0e7ff, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-subtext {
  font-size: .78rem;
  color: var(--clr-text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   KARTA WIZUALNEGO PODZIAŁU ZYSKÓW (50% / 50%)
   ============================================================ */
.split-visual-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 1.25rem;
  padding: 1.6rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.split-visual-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-cyan), #a855f7, var(--clr-primary));
}

.split-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.split-header-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .25rem;
}
.split-header-info p {
  font-size: .84rem;
  color: var(--clr-text-muted);
}
.split-tag {
  font-size: .75rem;
  font-weight: 700;
  padding: .3rem .8rem;
  background: rgba(99,102,241,.18);
  border: 1px solid var(--clr-border);
  border-radius: 9999px;
  color: var(--clr-primary-h);
  white-space: nowrap;
}

.split-partners-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.partner-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--clr-border-2);
  border-radius: 1rem;
  padding: 1.1rem 1.4rem;
  transition: transform var(--trans), border-color var(--trans);
}
.partner-box:hover {
  transform: translateY(-2px);
}
.partner-box.p1 {
  border-left: 4px solid var(--clr-cyan);
}
.partner-box.p2 {
  border-left: 4px solid #c084fc;
}

.partner-avatar {
  width: 44px;
  height: 44px;
  border-radius: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}
.partner-box.p1 .partner-avatar {
  background: linear-gradient(135deg, #0ea5e9, var(--clr-cyan));
  box-shadow: 0 0 16px rgba(34,211,238,.3);
}
.partner-box.p2 .partner-avatar {
  background: linear-gradient(135deg, #9333ea, #c084fc);
  box-shadow: 0 0 16px rgba(168,85,247,.3);
}

.partner-meta {
  display: flex;
  flex-direction: column;
}
.partner-role {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--clr-text-dim);
}
.partner-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.partner-amount {
  margin-left: auto;
  text-align: right;
  display: flex;
  flex-direction: column;
}
.partner-sum {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}
.partner-box.p1 .partner-sum { color: var(--clr-cyan-h); }
.partner-box.p2 .partner-sum { color: #d8b4fe; }
.partner-percent {
  font-size: .75rem;
  font-weight: 600;
  color: var(--clr-text-muted);
}

.split-divider-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .75rem;
  color: var(--clr-text-dim);
  flex-shrink: 0;
}

.split-progress-container {
  margin-top: .5rem;
}
.split-bar-wrap {
  width: 100%;
  height: 28px;
  background: rgba(255,255,255,.05);
  border-radius: 9999px;
  display: flex;
  overflow: hidden;
  padding: 3px;
  border: 1px solid var(--clr-border-2);
}
.split-bar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.6s ease;
  position: relative;
}
.split-bar.bar-p1 {
  background: linear-gradient(90deg, #0ea5e9, var(--clr-cyan));
  border-radius: 9999px 0 0 9999px;
}
.split-bar.bar-p2 {
  background: linear-gradient(90deg, #9333ea, #c084fc);
  border-radius: 0 9999px 9999px 0;
}
.bar-label {
  font-size: .74rem;
  font-weight: 700;
  color: #080c1a;
  white-space: nowrap;
  padding: 0 .75rem;
}

/* ============================================================
   SEKCJA WYKRESU
   ============================================================ */
.charts-section {
  margin-bottom: 1.75rem;
}
.card-chart {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-2);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.card-chart-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .2rem;
}
.card-chart-header p {
  font-size: .82rem;
  color: var(--clr-text-muted);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: var(--clr-text-muted);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--clr-cyan);
  box-shadow: 0 0 8px var(--clr-cyan);
}

.chart-canvas-container {
  position: relative;
  width: 100%;
  height: 220px;
}
#statsChart {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(17,24,39,.95);
  border: 1px solid var(--clr-border);
  padding: .5rem .8rem;
  border-radius: .5rem;
  font-size: .75rem;
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translate(-50%, -120%);
  z-index: 10;
  white-space: nowrap;
}

/* ============================================================
   TABELA TRANSAKCJI
   ============================================================ */
.transactions-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-2);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.table-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.table-title-wrap {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.table-title-wrap h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
.badge-count {
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .6rem;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--clr-border-2);
  border-radius: 9999px;
  color: var(--clr-text-muted);
}

.search-box {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--clr-border-2);
  border-radius: .7rem;
  padding: .45rem .85rem;
  min-width: 260px;
  transition: border-color var(--trans), background var(--trans);
}
.search-box:focus-within {
  border-color: var(--clr-primary);
  background: rgba(255,255,255,.07);
}
.search-box svg {
  width: 16px;
  height: 16px;
  color: var(--clr-text-dim);
  flex-shrink: 0;
}
.search-box input {
  background: none;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: .82rem;
  color: #fff;
  width: 100%;
}
.search-box input::placeholder {
  color: var(--clr-text-dim);
}

.table-responsive {
  overflow-x: auto;
  border-radius: .85rem;
}

.transactions-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: .86rem;
}

.transactions-table thead th {
  background: rgba(255,255,255,.03);
  color: var(--clr-text-dim);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--clr-border-2);
  white-space: nowrap;
}

.transactions-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background var(--trans);
}
.transactions-table tbody tr:hover {
  background: rgba(99,102,241,.06);
}

.transactions-table td {
  padding: .9rem 1.1rem;
  color: var(--clr-text);
  vertical-align: middle;
  white-space: nowrap;
}

.tx-id {
  font-family: monospace;
  font-size: .8rem;
  color: var(--clr-text-muted);
}

.tx-user {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.user-mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: .5rem;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .75rem;
  color: #fff;
}
.user-discord-name {
  font-weight: 600;
  color: #fff;
}

.tx-item {
  color: var(--clr-text-muted);
}

.tx-date {
  font-size: .8rem;
  color: var(--clr-text-dim);
}

.tx-amount {
  font-weight: 700;
  color: #fff;
}

.tx-split {
  font-weight: 600;
  color: #c084fc;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 600;
  padding: .25rem .65rem;
  border-radius: 9999px;
}
.badge-status.completed {
  background: rgba(52,211,153,.12);
  border: 1px solid rgba(52,211,153,.3);
  color: #34d399;
}

.status-cell {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.badge-method {
  font-size: .68rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: .4rem;
  letter-spacing: .06em;
  font-family: monospace;
}
.badge-method.blik {
  background: rgba(235, 94, 40, .14);
  border: 1px solid rgba(235, 94, 40, .4);
  color: #fb923c;
}
.badge-method.ltc {
  background: rgba(59, 130, 246, .14);
  border: 1px solid rgba(59, 130, 246, .4);
  color: #60a5fa;
}

.user-col {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.user-discord-id {
  font-size: .7rem;
  color: var(--clr-text-dim);
  font-family: monospace;
}
.user-discord-id.copyable-id {
  cursor: pointer;
  text-decoration: underline dotted;
  transition: color var(--trans);
}
.user-discord-id.copyable-id:hover {
  color: var(--clr-cyan-h);
}
.user-mini-avatar.is-id {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  font-size: .7rem;
}

.table-loading, .table-empty {
  text-align: center;
  padding: 2.5rem 1rem !important;
  color: var(--clr-text-dim);
  font-size: .88rem;
}

.loading-placeholder {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--clr-text-dim);
  font-size: .84rem;
  font-style: italic;
  animation: pulse-opacity 1.5s ease-in-out infinite;
}
@keyframes pulse-opacity {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

/* ============================================================
   MOTYWY KOLORYSTYCZNE (THEMES)
   ============================================================ */
:root[data-theme="purple"], body[data-theme="purple"] {
  --clr-primary:   #a855f7;
  --clr-primary-h: #c084fc;
  --clr-cyan:      #e879f9;
  --clr-cyan-h:    #f0abfc;
  --glow:          0 0 32px rgba(168,85,247,.35);
}

:root[data-theme="emerald"], body[data-theme="emerald"] {
  --clr-primary:   #059669;
  --clr-primary-h: #10b981;
  --clr-cyan:      #34d399;
  --clr-cyan-h:    #6ee7b7;
  --glow:          0 0 32px rgba(16,185,129,.35);
}

:root[data-theme="orange"], body[data-theme="orange"] {
  --clr-primary:   #ea580c;
  --clr-primary-h: #f97316;
  --clr-cyan:      #fbbf24;
  --clr-cyan-h:    #fcd34d;
  --glow:          0 0 32px rgba(249,115,22,.35);
}

/* ============================================================
   TOPBAR - ULEPSZENIA
   ============================================================ */
.topbar-title-wrap {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex: 1;
}

.topbar-live-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .2rem .55rem;
  background: rgba(52,211,153,.1);
  border: 1px solid rgba(52,211,153,.3);
  border-radius: 9999px;
  font-size: .68rem;
  font-weight: 700;
  color: #34d399;
  letter-spacing: .06em;
}

.pulse-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
  animation: ping 1.8s infinite;
}

.topbar-clock {
  font-family: monospace;
  font-size: .95rem;
  font-weight: 700;
  color: var(--clr-cyan-h);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border-2);
  padding: .25rem .65rem;
  border-radius: .5rem;
}

/* ============================================================
   WIDGETY ANALITYCZNE: TOP PRODUKTY & TOP KLIENCI
   ============================================================ */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.analytics-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-2);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.analytics-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.analytics-card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .2rem;
}

.analytics-card-header p {
  font-size: .8rem;
  color: var(--clr-text-muted);
}

.badge-mini {
  font-size: .72rem;
  font-weight: 600;
  padding: .2rem .55rem;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border-2);
  border-radius: 9999px;
  color: var(--clr-text-muted);
  white-space: nowrap;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .65rem .85rem;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.04);
  border-radius: .85rem;
  transition: all var(--trans);
}
.ranking-item:hover {
  background: rgba(255,255,255,.05);
  border-color: var(--clr-border-2);
  transform: translateX(3px);
}

.rank-badge {
  width: 26px;
  height: 26px;
  border-radius: .45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(255,255,255,.06);
  color: var(--clr-text-muted);
}
.rank-badge.gold {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #000;
  box-shadow: 0 0 10px rgba(245,158,11,.4);
}
.rank-badge.silver {
  background: linear-gradient(135deg, #94a3b8, #cbd5e1);
  color: #000;
}
.rank-badge.bronze {
  background: linear-gradient(135deg, #b45309, #d97706);
  color: #fff;
}

.product-info {
  flex: 1;
  min-width: 0;
}
.product-name {
  display: block;
  font-size: .84rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: .3rem;
}
.product-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,.07);
  border-radius: 9999px;
  overflow: hidden;
}
.product-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-cyan));
  border-radius: 9999px;
  transition: width .8s ease;
}

.product-qty-badge {
  font-size: .82rem;
  font-weight: 700;
  color: var(--clr-cyan-h);
  background: rgba(34,211,238,.1);
  padding: .2rem .6rem;
  border-radius: .5rem;
  white-space: nowrap;
  margin-left: auto;
}

/* Klienci */
.client-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .7rem .85rem;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.04);
  border-radius: .85rem;
  transition: all var(--trans);
}
.client-item:hover {
  background: rgba(255,255,255,.05);
  border-color: var(--clr-border-2);
}

.client-avatar {
  width: 32px;
  height: 32px;
  border-radius: .6rem;
  background: linear-gradient(135deg, var(--clr-primary), #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.client-meta {
  flex: 1;
  min-width: 0;
}
.client-id-row {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.client-id {
  font-family: monospace;
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-copy-id {
  background: none;
  border: none;
  color: var(--clr-text-dim);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color var(--trans);
}
.btn-copy-id:hover { color: var(--clr-cyan-h); }
.btn-copy-id svg { width: 14px; height: 14px; }

.client-orders-count {
  font-size: .72rem;
  color: var(--clr-text-muted);
}

.client-spent {
  text-align: right;
  font-size: .92rem;
  font-weight: 700;
  color: #34d399;
  white-space: nowrap;
}

/* ============================================================
   EKSPORT CSV & PAGINACJA TABELI
   ============================================================ */
.btn-export-csv {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .85rem;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border-2);
  border-radius: .7rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  cursor: pointer;
  transition: all var(--trans);
  font-family: var(--font);
}
.btn-export-csv:hover {
  background: rgba(99,102,241,.18);
  border-color: var(--clr-border);
  color: #fff;
}
.btn-export-csv svg { width: 15px; height: 15px; }

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--clr-border-2);
  font-size: .8rem;
  color: var(--clr-text-dim);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.btn-page {
  padding: .35rem .75rem;
  border-radius: .5rem;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border-2);
  color: var(--clr-text-muted);
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans);
}
.btn-page:hover:not(:disabled) {
  background: rgba(99,102,241,.2);
  color: #fff;
  border-color: var(--clr-border);
}
.btn-page:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.page-pills {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.page-pill {
  width: 28px;
  height: 28px;
  border-radius: .4rem;
  background: none;
  border: 1px solid transparent;
  color: var(--clr-text-muted);
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans);
}
.page-pill:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}
.page-pill.active {
  background: var(--clr-primary);
  border-color: var(--clr-primary-h);
  color: #fff;
  box-shadow: 0 0 10px rgba(99,102,241,.4);
}

.pagination-size {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.pagination-size select, .form-field select {
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border-2);
  border-radius: .5rem;
  color: #fff;
  padding: .35rem .6rem;
  font-family: var(--font);
  font-size: .8rem;
  outline: none;
  cursor: pointer;
  transition: border-color var(--trans);
}
.pagination-size select:focus, .form-field select:focus {
  border-color: var(--clr-primary);
}

/* ============================================================
   SEKCJA USTAWIENIA (SETTINGS)
   ============================================================ */
.settings-section {
  animation: fadeIn .3s ease;
}

.settings-header {
  margin-bottom: 1.75rem;
}
.settings-title-wrap h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .3rem;
}
.settings-title-wrap p {
  font-size: .9rem;
  color: var(--clr-text-muted);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.settings-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-2);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.settings-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--clr-border-2);
}
.settings-card-icon {
  width: 42px;
  height: 42px;
  border-radius: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.settings-card-icon svg { width: 22px; height: 22px; }

.settings-card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .2rem;
}
.settings-card-header p {
  font-size: .78rem;
  color: var(--clr-text-muted);
}

.settings-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.form-field label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--clr-text-muted);
}
.form-field input[type="text"],
.form-field input[type="password"] {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--clr-border-2);
  border-radius: .7rem;
  padding: .65rem .9rem;
  color: #fff;
  font-family: var(--font);
  font-size: .86rem;
  outline: none;
  transition: all var(--trans);
}
.form-field input:focus {
  border-color: var(--clr-primary);
  background: rgba(255,255,255,.07);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.form-field select {
  padding: .65rem .9rem;
  border-radius: .7rem;
}

.field-hint {
  font-size: .72rem;
  color: var(--clr-text-dim);
}

/* Suwak proporcji */
.slider-field {
  background: rgba(255,255,255,.025);
  border: 1px solid var(--clr-border-2);
  border-radius: .9rem;
  padding: 1rem;
}
.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.slider-val-badge {
  font-size: .78rem;
  font-weight: 700;
  color: var(--clr-cyan-h);
  background: rgba(34,211,238,.12);
  border: 1px solid rgba(34,211,238,.3);
  padding: .25rem .65rem;
  border-radius: 9999px;
}

.custom-range-slider {
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #0ea5e9, var(--clr-cyan), #9333ea, #c084fc);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.custom-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--clr-primary);
  box-shadow: 0 0 12px var(--clr-primary);
  cursor: grab;
  transition: transform var(--trans);
}
.custom-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: .68rem;
  color: var(--clr-text-dim);
  margin-top: .4rem;
}
.slider-ticks span {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all var(--trans);
}
.slider-ticks span:hover {
  color: var(--clr-cyan-h);
  background: rgba(34,211,238,.1);
}
.slider-ticks .active-tick {
  color: var(--clr-cyan-h);
  font-weight: 700;
  background: rgba(34,211,238,.12);
}

.slider-presets {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}
.preset-label {
  font-size: .72rem;
  color: var(--clr-text-dim);
  font-weight: 600;
}
.preset-btn {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--clr-border-2);
  color: var(--clr-text-muted);
  font-family: var(--font);
  font-size: .72rem;
  font-weight: 600;
  padding: .28rem .6rem;
  border-radius: .5rem;
  cursor: pointer;
  transition: all var(--trans);
}
.preset-btn:hover {
  background: rgba(255,255,255,.08);
  border-color: var(--clr-border);
  color: #fff;
}
.preset-btn.active {
  background: rgba(34,211,238,.15);
  border-color: var(--clr-cyan);
  color: var(--clr-cyan-h);
  box-shadow: 0 0 10px rgba(34,211,238,.25);
}

/* Selektor motywów */
.theme-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  margin-top: .25rem;
}
.theme-chip {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem .85rem;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--clr-border-2);
  border-radius: .75rem;
  color: var(--clr-text-muted);
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans);
}
.theme-chip:hover {
  background: rgba(255,255,255,.06);
  border-color: var(--clr-border);
  color: #fff;
}
.theme-chip.active {
  background: rgba(var(--clr-primary-rgb, 99,102,241),.14);
  border-color: var(--clr-primary);
  color: #fff;
  box-shadow: 0 0 14px color-mix(in srgb, var(--clr-primary) 35%, transparent);
}

.chip-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cyan-gradient   { background: linear-gradient(135deg, #06b6d4, #3b82f6); box-shadow: 0 0 8px #06b6d4; }
.purple-gradient { background: linear-gradient(135deg, #a855f7, #ec4899); box-shadow: 0 0 8px #a855f7; }
.emerald-gradient{ background: linear-gradient(135deg, #10b981, #06b6d4); box-shadow: 0 0 8px #10b981; }
.orange-gradient { background: linear-gradient(135deg, #f97316, #fbbf24); box-shadow: 0 0 8px #f97316; }

/* Pasek akcji ustawień */
/* Pasek akcji ustawień */
.settings-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(17,24,39,.85);
  backdrop-filter: blur(14px);
  border: 1px solid var(--clr-border-2);
  border-radius: 1rem;
  position: sticky;
  bottom: 1.5rem;
  z-index: 40;
  box-shadow: var(--shadow-md);
}

.actions-bar-left {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.actions-bar-right {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: auto;
}

.btn-save-settings, .btn-reset-settings, .btn-reset-stats {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.35rem;
  border-radius: .75rem;
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans);
}
.btn-save-settings {
  background: linear-gradient(135deg, var(--clr-primary), #4f46e5);
  border: none;
  color: #fff;
  box-shadow: 0 4px 18px rgba(99,102,241,.4);
}
.btn-save-settings:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99,102,241,.6);
}
.btn-save-settings svg, .btn-reset-settings svg, .btn-reset-stats svg { width: 18px; height: 18px; }

.btn-reset-settings {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border-2);
  color: var(--clr-text-muted);
}
.btn-reset-settings:hover {
  background: rgba(255,255,255,.09);
  color: #fff;
}

.btn-reset-stats {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.12);
}
.btn-reset-stats:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.35);
}

/* Karta zarządzania danymi bota */
.icon-rose {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.25);
}
.data-management-card {
  border-color: rgba(244, 63, 94, 0.2);
}
.data-mgmt-status {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--clr-border-2);
  border-radius: .85rem;
  padding: .85rem 1.15rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.data-mgmt-status-item {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.status-label {
  font-size: .8rem;
  color: var(--clr-text-muted);
}
.stats-status-badge {
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .65rem;
  border-radius: 9999px;
}
.stats-status-badge.live {
  background: rgba(52,211,153,.15);
  color: #34d399;
  border: 1px solid rgba(52,211,153,.35);
}
.stats-status-badge.reset {
  background: rgba(245,158,11,.15);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,.35);
}
.stats-count-badge {
  font-size: .75rem;
  font-weight: 700;
  color: var(--clr-cyan-h);
  background: rgba(34,211,238,.1);
  border: 1px solid rgba(34,211,238,.25);
  padding: .25rem .65rem;
  border-radius: 9999px;
}
/* ============================================================
   PANEL OKRESÓW ROZLICZENIOWYCH (OKIENKA: STARE / NOWE)
   ============================================================ */
.periods-panel {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.9) 0%, rgba(13, 19, 38, 0.95) 100%);
  border: 1px solid var(--clr-border);
  border-radius: 1.15rem;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}
.periods-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 180px;
  height: 2px;
  background: linear-gradient(90deg, var(--clr-cyan), transparent);
}

.periods-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.periods-title-group {
  display: flex;
  align-items: center;
  gap: .85rem;
}
.periods-icon-glow {
  width: 40px;
  height: 40px;
  border-radius: .85rem;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--clr-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.2);
}
.periods-icon-glow svg {
  width: 20px;
  height: 20px;
}
.periods-heading {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}
.periods-main-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.periods-current-badge {
  font-size: .72rem;
  font-weight: 700;
  color: var(--clr-cyan-h);
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.3);
  padding: .2rem .6rem;
  border-radius: 9999px;
  letter-spacing: .02em;
}
.periods-subtitle {
  font-size: .78rem;
  color: var(--clr-text-muted);
  margin-top: .15rem;
}

.periods-header-actions {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.btn-new-period {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(99, 102, 241, 0.25));
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: #fff;
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 600;
  padding: .55rem 1.05rem;
  border-radius: .75rem;
  cursor: pointer;
  transition: all var(--trans);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.15);
  white-space: nowrap;
}
.btn-new-period:hover {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.35), rgba(99, 102, 241, 0.4));
  border-color: var(--clr-cyan);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
  transform: translateY(-1px);
}
.btn-new-period svg {
  width: 16px;
  height: 16px;
  color: var(--clr-cyan-h);
}

/* Pasek kafelków okresów */
.periods-tabs-scroll {
  overflow-x: auto;
  padding-bottom: .35rem;
  margin-bottom: .75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}
.periods-tabs-scroll::-webkit-scrollbar {
  height: 5px;
}
.periods-tabs-scroll::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 4px;
}
.periods-tabs {
  display: flex;
  gap: .75rem;
  min-width: min-content;
}

/* Pojedynczy kafelek / okienko okresu */
.period-tab-btn {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: .75rem 1.1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--clr-border-2);
  border-radius: .85rem;
  color: var(--clr-text-muted);
  cursor: pointer;
  transition: all var(--trans);
  min-width: 175px;
  text-align: left;
  position: relative;
  user-select: none;
}
.period-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--clr-text);
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}
.period-tab-btn.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(99, 102, 241, 0.14));
  border-color: var(--clr-cyan);
  color: #fff;
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.25), inset 0 0 12px rgba(34, 211, 238, 0.08);
}
.period-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--clr-cyan);
  box-shadow: 0 0 10px var(--clr-cyan);
  border-radius: 2px;
}

.period-tab-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.period-tab-title {
  font-size: .84rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.period-tab-btn.active .period-tab-title {
  color: #fff;
}
.period-tab-badge {
  font-size: .66rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.period-tab-badge.badge-all {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
}
.period-tab-badge.badge-old {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.period-tab-badge.badge-new {
  background: rgba(52, 211, 153, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.45);
}

.period-tab-bottom-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
}
.period-tab-amount {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--clr-cyan-h);
  font-variant-numeric: tabular-nums;
}
.period-tab-orders {
  font-size: .72rem;
  color: var(--clr-text-dim);
}
.period-tab-btn.active .period-tab-orders {
  color: var(--clr-text-muted);
}

.period-active-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  display: inline-block;
  box-shadow: 0 0 8px #34d399;
  animation: pulseLiveDot 2s infinite;
  margin-right: .3rem;
}
@keyframes pulseLiveDot {
  0% { transform: scale(1); opacity: 1; box-shadow: 0 0 6px #34d399; }
  50% { transform: scale(1.3); opacity: 0.7; box-shadow: 0 0 14px #34d399; }
  100% { transform: scale(1); opacity: 1; box-shadow: 0 0 6px #34d399; }
}

/* Pasek informacyjny wybranego okresu */
.period-info-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--clr-border-2);
  border-radius: .7rem;
  padding: .5rem .85rem;
  font-size: .8rem;
  color: var(--clr-text-muted);
  flex-wrap: wrap;
  gap: .5rem;
}
.period-info-left {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.period-info-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clr-cyan);
}
.period-info-stats {
  font-weight: 700;
  color: var(--clr-cyan-h);
  font-size: .82rem;
}

/* Karta okresów w Ustawieniach */
.periods-management-card {
  border-color: rgba(34, 211, 238, 0.25);
}
.settings-periods-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.15rem;
}
.settings-period-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--clr-border-2);
  border-radius: .7rem;
  padding: .65rem .95rem;
  gap: .75rem;
}
.settings-period-row.active-period {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.05);
}
.period-row-info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.period-row-name {
  font-size: .86rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.period-row-meta {
  font-size: .72rem;
  color: var(--clr-text-muted);
}
.period-row-right {
  display: flex;
  align-items: center;
  gap: .85rem;
}
.period-row-amount {
  font-size: .95rem;
  font-weight: 800;
  color: var(--clr-cyan-h);
  font-variant-numeric: tabular-nums;
}

.btn-card-new-period, .btn-card-rename-period, .btn-card-reset-periods, .btn-bar-new-period {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1rem;
  border-radius: .7rem;
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans);
}
.btn-card-new-period {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(99, 102, 241, 0.25));
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: #fff;
}
.btn-card-new-period:hover {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.35), rgba(99, 102, 241, 0.4));
  border-color: var(--clr-cyan);
  transform: translateY(-1px);
}
.btn-card-rename-period {
  background: rgba(129, 140, 248, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: #c7d2fe;
}
.btn-card-rename-period:hover {
  background: rgba(129, 140, 248, 0.22);
  color: #fff;
}
.btn-card-reset-periods {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.btn-card-reset-periods:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #fff;
}
.btn-bar-new-period {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.25), rgba(99, 102, 241, 0.3));
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: #fff;
}
.btn-bar-new-period:hover {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.4), rgba(99, 102, 241, 0.45));
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.3);
}

/* Modale */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 18, 0.82);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  background: #0d1326;
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 1.25rem;
  max-width: 500px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(34, 211, 238, 0.15);
  transform: translateY(20px) scale(0.96);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}
.modal-backdrop.open .modal-card {
  transform: translateY(0) scale(1);
}
.modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.modal-icon.cyan-glow {
  width: 48px;
  height: 48px;
  border-radius: 1rem;
  background: rgba(34, 211, 238, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: var(--clr-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.25);
}
.modal-icon.purple-glow {
  width: 48px;
  height: 48px;
  border-radius: 1rem;
  background: rgba(129, 140, 248, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(129, 140, 248, 0.25);
}
.modal-icon svg {
  width: 24px;
  height: 24px;
}
.modal-title-wrap h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .2rem;
}
.modal-title-wrap p {
  font-size: .8rem;
  color: var(--clr-text-muted);
}
.modal-body {
  color: var(--clr-text);
  font-size: .88rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}
.modal-summary-box {
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: .85rem;
  padding: .85rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: .5rem;
}
.summary-label {
  font-size: .8rem;
  color: var(--clr-text-muted);
}
.summary-value {
  font-size: .95rem;
  font-weight: 800;
  color: var(--clr-cyan-h);
}
.modal-field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1rem;
}
.modal-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--clr-text);
}
.modal-input, .modal-select {
  width: 100%;
  padding: .75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--clr-border);
  border-radius: .75rem;
  color: #fff;
  font-family: var(--font);
  font-size: .88rem;
  outline: none;
  transition: all var(--trans);
}
.modal-select option {
  background: #0d1326;
  color: #fff;
}
.modal-input:focus, .modal-select:focus {
  border-color: var(--clr-cyan);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.3);
  background: rgba(255, 255, 255, 0.07);
}
.modal-bullets {
  margin: .85rem 0 0 1.2rem;
  color: var(--clr-text-muted);
  font-size: .82rem;
}
.modal-bullets li {
  margin-bottom: .4rem;
}
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .85rem;
}
.btn-modal-cancel {
  padding: .7rem 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--clr-border-2);
  color: var(--clr-text-muted);
  border-radius: .75rem;
  font-family: var(--font);
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans);
}
.btn-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.btn-modal-confirm-period {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.35rem;
  background: linear-gradient(135deg, var(--clr-cyan), #3b82f6);
  border: none;
  color: #040712;
  border-radius: .75rem;
  font-family: var(--font);
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(34, 211, 238, 0.35);
  transition: all var(--trans);
}
.btn-modal-confirm-period:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(34, 211, 238, 0.55);
}
.btn-modal-confirm-period svg {
  width: 16px;
  height: 16px;
}

/* ============================================================
   SYSTEM POWIADOMIEŃ TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 380px;
  background: rgba(17,24,39,.95);
  border: 1px solid var(--clr-border);
  border-radius: .85rem;
  padding: .9rem 1.15rem;
  display: flex;
  align-items: center;
  gap: .85rem;
  box-shadow: 0 8px 30px rgba(0,0,0,.6);
  backdrop-filter: blur(14px);
  animation: slideInRight .3s ease forwards;
  transition: opacity .3s, transform .3s;
}
.toast.toast-hiding {
  opacity: 0;
  transform: translateX(30px);
}

.toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.toast.success .toast-icon {
  background: rgba(52,211,153,.15);
  color: #34d399;
  border: 1px solid rgba(52,211,153,.3);
}
.toast.info .toast-icon {
  background: rgba(34,211,238,.15);
  color: var(--clr-cyan);
  border: 1px solid rgba(34,211,238,.3);
}
.toast.error .toast-icon {
  background: rgba(248,113,113,.15);
  color: var(--clr-error);
  border: 1px solid rgba(248,113,113,.3);
}
.toast-icon svg { width: 16px; height: 16px; }

.toast-body {
  flex: 1;
}
.toast-title {
  font-size: .84rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .15rem;
}
.toast-msg {
  font-size: .78rem;
  color: var(--clr-text-muted);
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .split-partners-grid {
    flex-direction: column;
  }
  .split-divider-badge {
    transform: rotate(90deg);
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main-content { margin-left: 0 !important; }

  .topbar { padding: 1rem; }
  .dashboard-section { padding: 1rem; }

  .bot-status-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .bot-status-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .partner-box {
    width: 100%;
  }

  .search-box {
    width: 100%;
  }

  .settings-form-row {
    grid-template-columns: 1fr;
  }
  .theme-selector-grid {
    grid-template-columns: 1fr;
  }

  .pagination-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .login-card { padding: 2rem 1.5rem; }
  .table-header-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .settings-actions-bar {
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
  }
  .actions-bar-left, .actions-bar-right {
    width: 100%;
    flex-direction: column;
    gap: .6rem;
  }
  .btn-save-settings, .btn-reset-settings, .btn-reset-stats {
    width: 100%;
    justify-content: center;
  }
}


