/* =====================================================================
   boolymen — DARK PREMIUM TECHNICAL DESIGN SYSTEM
   Głęboki grafit · cienkie linie · przygaszony złoty akcent ·
   kompaktowa techniczna typografia · małe promienie · minimalne cienie.
   Mobile-first. Funkcjonalność, routing i logika bez zmian.
   ===================================================================== */

/* ------------------------------------------------------------------ */
/* 1. DESIGN TOKENS (pojedyncze źródło prawdy)                         */
/* ------------------------------------------------------------------ */
:root, [data-theme="graphite"] {
  /* powierzchnie */
  --color-bg: #08090B;
  --color-surface-1: #0D0F12;
  --color-surface-2: #111318;
  --color-surface-3: #15171C;
  --color-hover: #14161A;
  --color-active: #191B20;
  --color-border: rgba(255, 255, 255, 0.07);
  --color-border-strong: #26272B;
  --color-border-hover: rgba(255, 255, 255, 0.12);
  /* tekst */
  --color-text-primary: #F0F0F2;
  --color-text-secondary: #B0B1B6;
  --color-text-muted: #7A7B81;
  --color-text-disabled: #4C4D52;
  /* akcent (biały) */
  --color-accent: #FFFFFF;
  --color-accent-hover: #DCDCE0;
  --color-accent-contrast: #0B0B0D;
  --color-accent-soft: rgba(255, 255, 255, 0.10);
  /* statusy (jasne) */
  --color-success: #22C55E;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;
  --color-success-soft: rgba(34, 197, 94, 0.16);
  --color-error-soft: rgba(239, 68, 68, 0.14);
  --color-info-soft: rgba(59, 130, 246, 0.16);
  --radius-sm: 5px;
  --radius-md: 7px;
  --radius-lg: 10px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 8px 30px rgba(0, 0, 0, 0.28);
  --glow: 0 0 20px rgba(255, 255, 255, 0.05);
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 40px;
  --font-page: 24px; --font-section: 13px; --font-body: 13px; --font-nav: 12px; --font-meta: 11px; --font-tiny: 9px;
  --font-mono: ui-monospace, "SF Mono", Consolas, Menlo, monospace;
  --sidebar-w: 268px;
  --topbar-h: 54px;
}

[data-theme="white"] {
  --color-bg: #F1F2F5;
  --color-surface-1: #FFFFFF;
  --color-surface-2: #F4F5F8;
  --color-surface-3: #ECEEF2;
  --color-hover: #F0F1F5;
  --color-active: #E7E9EF;
  --color-border: rgba(15, 17, 22, 0.10);
  --color-border-strong: rgba(15, 17, 22, 0.18);
  --color-border-hover: rgba(15, 17, 22, 0.20);
  --color-text-primary: #1C1E24;
  --color-text-secondary: #5C606B;
  --color-text-muted: #8B8E98;
  --color-text-disabled: #B9BBC3;
  --color-accent: #23262D;
  --color-accent-hover: #3A3E47;
  --color-accent-contrast: #FFFFFF;
  --color-accent-soft: rgba(35, 38, 45, 0.10);
  --color-success: #16A34A;
  --color-warning: #D97706;
  --color-error: #DC2626;
  --color-info: #2563EB;
  --color-success-soft: rgba(22, 163, 74, 0.12);
  --color-error-soft: rgba(220, 38, 38, 0.10);
  --color-info-soft: rgba(37, 99, 235, 0.12);
  --shadow-1: 0 1px 2px rgba(20, 22, 28, 0.06);
  --shadow-2: 0 8px 24px rgba(20, 22, 28, 0.12);
  --glow: 0 0 20px rgba(35, 38, 45, 0.10);
}

[data-theme="violet"] {
  --color-bg: #0A0713;
  --color-surface-1: #0F0A1C;
  --color-surface-2: #150F26;
  --color-surface-3: #1A1230;
  --color-hover: #181128;
  --color-active: #1E1536;
  --color-border: rgba(167, 139, 250, 0.10);
  --color-border-strong: rgba(167, 139, 250, 0.22);
  --color-border-hover: rgba(167, 139, 250, 0.20);
  --color-text-primary: #ECE8F7;
  --color-text-secondary: #ABA4C4;
  --color-text-muted: #716A8C;
  --color-text-disabled: #48435C;
  --color-accent: #8B5CF6;
  --color-accent-hover: #A78BFA;
  --color-accent-contrast: #FFFFFF;
  --color-accent-soft: rgba(139, 92, 246, 0.18);
  --color-success: #22C55E;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;
  --color-success-soft: rgba(34, 197, 94, 0.16);
  --color-error-soft: rgba(239, 68, 68, 0.14);
  --color-info-soft: rgba(59, 130, 246, 0.16);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 8px 30px rgba(0, 0, 0, 0.4);
  --glow: 0 0 20px rgba(139, 92, 246, 0.10);
}

[data-theme="emerald"] {
  --color-bg: #06110C;
  --color-surface-1: #0A1711;
  --color-surface-2: #0F1E17;
  --color-surface-3: #15281E;
  --color-hover: #0E1C15;
  --color-active: #163225;
  --color-border: rgba(52, 211, 153, 0.10);
  --color-border-strong: rgba(52, 211, 153, 0.22);
  --color-border-hover: rgba(52, 211, 153, 0.20);
  --color-text-primary: #E5F5EE;
  --color-text-secondary: #A3BFB2;
  --color-text-muted: #6B856F;
  --color-text-disabled: #45514C;
  --color-accent: #10B981;
  --color-accent-hover: #34D399;
  --color-accent-contrast: #FFFFFF;
  --color-accent-soft: rgba(16, 185, 129, 0.18);
  --color-success: #22C55E;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;
  --color-success-soft: rgba(34, 197, 94, 0.16);
  --color-error-soft: rgba(239, 68, 68, 0.14);
  --color-info-soft: rgba(59, 130, 246, 0.16);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 8px 30px rgba(0, 0, 0, 0.4);
  --glow: 0 0 20px rgba(16, 185, 129, 0.10);
}

[data-theme="darkblue"] {
  --color-bg: #080B12;
  --color-surface-1: #0D1220;
  --color-surface-2: #121A2C;
  --color-surface-3: #172136;
  --color-hover: #131B2D;
  --color-active: #1A2740;
  --color-border: rgba(91, 140, 255, 0.10);
  --color-border-strong: rgba(91, 140, 255, 0.22);
  --color-border-hover: rgba(91, 140, 255, 0.20);
  --color-text-primary: #E8EEF8;
  --color-text-secondary: #A6B1C6;
  --color-text-muted: #6C7890;
  --color-text-disabled: #454F63;
  --color-accent: #5B8CFF;
  --color-accent-hover: #7BA3FF;
  --color-accent-contrast: #FFFFFF;
  --color-accent-soft: rgba(91, 140, 255, 0.18);
  --color-success: #22C55E;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #5B8CFF;
  --color-success-soft: rgba(34, 197, 94, 0.16);
  --color-error-soft: rgba(239, 68, 68, 0.14);
  --color-info-soft: rgba(91, 140, 255, 0.16);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 8px 30px rgba(0, 0, 0, 0.4);
  --glow: 0 0 20px rgba(91, 140, 255, 0.10);
}

[data-theme="allblack"] {
  --color-bg: #000000;
  --color-surface-1: #0B0B0C;
  --color-surface-2: #141415;
  --color-surface-3: #1A1A1B;
  --color-hover: #151516;
  --color-active: #1E1E20;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: #2A2A2C;
  --color-border-hover: rgba(255, 255, 255, 0.14);
  --color-text-primary: #F2F2F2;
  --color-text-secondary: #B1B1B4;
  --color-text-muted: #7B7B80;
  --color-text-disabled: #4D4D51;
  --color-accent: #FFFFFF;
  --color-accent-hover: #E0E0E2;
  --color-accent-contrast: #000000;
  --color-accent-soft: rgba(255, 255, 255, 0.10);
  --color-success: #22C55E;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;
  --color-success-soft: rgba(34, 197, 94, 0.16);
  --color-error-soft: rgba(239, 68, 68, 0.14);
  --color-info-soft: rgba(59, 130, 246, 0.16);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 8px 30px rgba(0, 0, 0, 0.6);
  --glow: 0 0 20px rgba(255, 255, 255, 0.04);
}

[data-theme="custom"] {
  --color-bg: var(--ct-bg);
  --color-surface-1: var(--ct-surface, var(--ct-bg));
  --color-surface-2: color-mix(in srgb, var(--ct-surface, #191c22) 55%, var(--ct-bg));
  --color-surface-3: color-mix(in srgb, var(--ct-accent) 0%, var(--ct-surface, #191c22));
  --color-hover: color-mix(in srgb, var(--ct-accent) 8%, var(--ct-bg));
  --color-active: color-mix(in srgb, var(--ct-accent) 14%, var(--ct-bg));
  --color-border: color-mix(in srgb, var(--ct-accent) 14%, var(--ct-bg));
  --color-border-strong: color-mix(in srgb, var(--ct-accent) 26%, var(--ct-bg));
  --color-border-hover: color-mix(in srgb, var(--ct-accent) 22%, var(--ct-bg));
  --color-text-primary: var(--ct-text);
  --color-text-secondary: color-mix(in srgb, var(--ct-text) 72%, var(--ct-bg));
  --color-text-muted: color-mix(in srgb, var(--ct-text) 46%, var(--ct-bg));
  --color-text-disabled: color-mix(in srgb, var(--ct-text) 28%, var(--ct-bg));
  --color-accent: var(--ct-accent);
  --color-accent-hover: color-mix(in srgb, var(--ct-accent) 82%, #ffffff);
  --color-accent-contrast: color-mix(in srgb, var(--ct-accent) 12%, #000000);
  --color-accent-soft: color-mix(in srgb, var(--ct-accent) 14%, transparent);
  --color-success: #22C55E;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;
  --color-success-soft: rgba(34, 197, 94, 0.16);
  --color-error-soft: rgba(239, 68, 68, 0.14);
  --color-info-soft: rgba(59, 130, 246, 0.16);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 8px 30px rgba(0, 0, 0, 0.4);
  --glow: 0 0 20px var(--color-accent-soft);
}


/* 2. BASE / RESET                                                     */
/* ------------------------------------------------------------------ */
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  font-family: "Inter", "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--font-body); line-height: 1.5;
  color: var(--color-text-primary);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.hidden { display: none !important; }
.ico { flex-shrink: 0; display: inline-block; vertical-align: middle; }

/* ------------------------------------------------------------------ */
/* 3. LAYOUT (mobile-first)                                            */
/* ------------------------------------------------------------------ */
.app-view { height: 100vh; overflow: hidden; }
.app-shell { height: 100%; }

.main {
  height: 100%;
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
}

.topbar {
  height: var(--topbar-h); flex-shrink: 0;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 0 var(--sp-4);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.topbar-title { min-width: 0; flex: 1; }
.overline {
  margin: 0; font-size: var(--font-tiny); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted);
}
.topbar h1 {
  margin: 1px 0 0; font-size: 17px; font-weight: 600;
  letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--color-text-primary);
}
.topbar-actions { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; }
.menu-button { display: inline-flex; }

/* Workspace (mobile: stack) */
.workspace {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-3);
  overflow: hidden;
}
.panel {
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  overflow: hidden;
}
.conversations-panel { width: 100%; flex: 0 0 auto; max-height: 46vh; }
.messages-panel { flex: 1 1 auto; min-height: 0; }
.admin-view { flex: 1; overflow-y: auto; padding: var(--sp-4); }

/* Sidebar: na mobile drawer off-canvas, na desktop stały */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 96;
  width: min(84vw, 300px);
  display: flex; flex-direction: column;
  padding: var(--sp-4);
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  transform: translateX(-100%);
  transition: transform 0.18s ease-out;
  min-height: 0;
}
body.sidebar-open .sidebar { transform: translateX(0); }
body.sidebar-open::after {
  content: ""; position: fixed; inset: 0; z-index: 95;
  background: rgba(0, 0, 0, 0.5);
}
.brand-row { display: flex; align-items: center; gap: var(--sp-3); padding: 0 2px var(--sp-4); }
.brand-mark {
  width: 34px; height: 34px; border-radius: var(--radius-md); overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
  display: flex; align-items: center; justify-content: center;
}
.brand-mark .brand-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.brand { font-size: var(--font-section); font-weight: 600; letter-spacing: -0.01em; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2px var(--sp-2); font-size: var(--font-tiny); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted);
}
.pill {
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px;
  font-size: var(--font-meta); font-weight: 500; color: var(--color-text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
}
.hidden-count { color: var(--color-text-disabled); }

.accounts-list { flex: 1; overflow-y: auto; min-height: 0; padding-bottom: var(--sp-2); }
.sidebar-footer {
  padding-top: var(--sp-3); border-top: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
}
.auth-user { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.auth-user-meta { min-width: 0; flex: 1; }
.auth-user-name { font-weight: 600; font-size: var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-actions { display: flex; gap: var(--sp-1); }

/* ------------------------------------------------------------------ */
/* 4. COMPONENTS                                                       */
/* ------------------------------------------------------------------ */

/* --- Przyciski (tool, nie marketing) --- */
.btn { border: 1px solid var(--color-border); background: var(--color-surface-1); color: var(--color-text-primary); padding: 7px 14px; border-radius: var(--radius-md); cursor: pointer; font-weight: 500; font-size: var(--font-nav); font-family: inherit; transition: background 0.15s ease-out, border-color 0.15s ease-out; }
.btn:hover { background: var(--color-hover); }
.btn-primary { background: var(--color-accent); border-color: transparent; color: var(--color-accent-contrast); }
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 10px; font-size: var(--font-meta); }

.primary-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--color-accent); color: var(--color-accent-contrast); border: 0;
  border-radius: var(--radius-md); padding: 7px 14px; font-weight: 600; font-size: var(--font-nav);
  cursor: pointer; font-family: inherit; height: 34px;
  transition: background 0.15s ease-out;
}
.primary-button:hover { background: var(--color-accent-hover); }
.primary-button:active { transform: translateY(0); }
.primary-button.full { width: 100%; }

.ghost-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: transparent; color: var(--color-text-secondary); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 6px 12px; font-weight: 500; font-size: var(--font-nav);
  cursor: pointer; font-family: inherit; height: 32px;
  transition: background 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
}
.ghost-button:hover { background: var(--color-hover); border-color: var(--color-border-hover); color: var(--color-text-primary); }
.ghost-button.full { width: 100%; }

.icon-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-md); border: 0;
  background: transparent; color: var(--color-text-muted); cursor: pointer;
  transition: background 0.15s ease-out, color 0.15s ease-out;
}
.icon-button:hover { background: var(--color-hover); color: var(--color-text-primary); }
.icon-button svg { width: 16px; height: 16px; stroke-width: 1.5; }

.error-msg { color: var(--color-error); font-size: var(--font-body); min-height: 18px; margin: var(--sp-2) 0 0; }
.hint { font-size: var(--font-body); color: var(--color-text-muted); margin: 0 0 var(--sp-3); line-height: 1.5; }

/* --- Pola / inputy (ciemne, płaskie) --- */
.offer-input, .stacked input[type=text], .stacked input[type=number], .stacked input[type=password],
.stacked textarea, .modal textarea, .composer textarea,
.admin-card select, .admin-card input[type=text], .admin-card input[type=number] {
  width: 100%; background: #0C0D10; color: var(--color-text-primary);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  padding: 8px 12px; font-size: var(--font-body); font-family: inherit; height: 38px;
  transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}
.stacked textarea, .modal textarea, .composer textarea { height: auto; font-family: var(--font-mono); font-size: 12px; resize: vertical; }
.offer-input::placeholder, .stacked input::placeholder, .composer textarea::placeholder,
.admin-card input::placeholder { color: #5D5E64; }
.offer-input:focus, .stacked input:focus, .stacked textarea:focus, .modal textarea:focus,
.composer textarea:focus, .admin-card select:focus, .admin-card input:focus {
  outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent-soft);
}

.stacked { display: block; font-size: var(--font-nav); color: var(--color-text-secondary); margin-bottom: var(--sp-3); }
.stacked > span { font-size: var(--font-tiny); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); display: block; margin-bottom: var(--sp-2); }
.modal-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
.checkbox-row { display: flex; align-items: flex-start; gap: var(--sp-2); margin-top: var(--sp-3); font-size: var(--font-body); cursor: pointer; color: var(--color-text-primary); }
.checkbox-row input[type=checkbox] { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--color-accent); flex-shrink: 0; cursor: pointer; }
.field-hint { display: block; font-size: var(--font-meta); color: var(--color-text-disabled); margin-top: 2px; }
.autocomplete-wrap { position: relative; }
.suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; background: var(--color-surface-2); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); max-height: 240px; overflow-y: auto; box-shadow: var(--shadow-2); }
.suggest-item { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; background: transparent; color: var(--color-text-primary); font-size: var(--font-body); cursor: pointer; font-family: inherit; }
.suggest-item:hover { background: var(--color-hover); }
.offer-form .stacked { margin-bottom: var(--sp-3); }

/* --- Konta (sidebar) --- */
.account-item {
  position: relative;
  display: flex; align-items: center; gap: var(--sp-3); padding: 7px 8px;
  border-radius: var(--radius-md); cursor: pointer; margin-bottom: 1px;
  border: 1px solid transparent; transition: background 0.12s ease-out;
}
.account-item:hover { background: var(--color-hover); }
.account-item.active { background: var(--color-active); border-color: var(--color-border); }
.account-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 11px; overflow: hidden;
}
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-meta { flex: 1; min-width: 0; }
.account-name { font-weight: 600; font-size: var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-uuid { font-size: var(--font-meta); color: var(--color-text-disabled); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-del { border: 0; background: transparent; color: var(--color-text-disabled); cursor: pointer; font-size: 14px; opacity: 0; transition: opacity 0.15s; padding: 2px 4px; }
.account-item:hover .account-del { opacity: 1; }
.account-del:hover { color: var(--color-error); }
.account-gear { border: 0; background: transparent; color: var(--color-text-disabled); cursor: pointer; padding: 3px; opacity: 0; transition: opacity 0.15s, color 0.15s; display: inline-flex; }
.account-item:hover .account-gear { opacity: 1; }
.account-gear:hover { color: var(--color-text-primary); }
.acct-status { display: flex; align-items: center; gap: 5px; font-size: var(--font-meta); font-weight: 500; margin-top: 2px; }
.acct-status .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.acct-status.online { color: var(--color-success); }
.acct-status.online .dot { background: var(--color-success); }
.acct-status.offline { color: var(--color-text-muted); }
.acct-status.offline .dot { background: var(--color-warning); }
.acct-sub { font-size: var(--font-meta); color: var(--color-text-disabled); margin-top: 1px; }
.acct-wallet { font-size: var(--font-meta); color: var(--color-text-muted); margin-top: 1px; }
.acct-2fa {
  color: var(--color-info); display: inline-flex; align-items: center; justify-content: center;
  padding: 4px; flex-shrink: 0; background: transparent; border: 0; cursor: pointer; border-radius: var(--radius-md);
}
.acct-2fa:hover { background: var(--color-hover); color: var(--color-accent); }
.acct-unread {
  position: absolute; top: 6px; right: 6px;
  background: var(--color-accent); color: var(--color-accent-contrast);
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; font-size: var(--font-tiny); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.empty-list { color: var(--color-text-muted); text-align: center; font-size: var(--font-body); padding: var(--sp-6) var(--sp-3); }

.auth-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
  color: var(--color-accent-contrast);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; overflow: hidden;
}
.auth-avatar img { width: 100%; height: 100%; object-fit: cover; }
.auth-user-role { font-size: var(--font-tiny); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.auth-user-role[data-role="owner"] { color: var(--color-accent); }
.auth-user-role[data-role="admin"] { color: var(--color-info); }

/* --- Wyszukiwarka / panel heads --- */
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--color-border); gap: var(--sp-3); min-height: 46px; }
.panel-head h2 { margin: 0; font-size: var(--font-section); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--color-text-secondary); }
.search-wrap { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); padding: 5px 9px; color: var(--color-text-muted); background: #0C0D10; transition: border-color 0.15s ease-out; height: 32px; }
.search-wrap:focus-within { border-color: var(--color-accent); }
.search { border: 0; background: transparent; color: var(--color-text-primary); font-size: var(--font-body); font-family: inherit; width: 110px; }
.search:focus { outline: none; }
.search::placeholder { color: #5D5E64; }

/* --- Zakładki / filtry --- */
.conv-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--color-border); background: var(--color-bg); }
.conv-tab { flex: 1 1 auto; min-width: 0; padding: 5px 10px; border: 1px solid transparent; background: transparent; color: var(--color-text-muted); border-radius: var(--radius-md); font-size: var(--font-nav); font-weight: 500; cursor: pointer; font-family: inherit; transition: color 0.15s ease-out, background 0.15s ease-out; }
.conv-tab:hover { background: var(--color-hover); color: var(--color-text-primary); }
.conv-tab.active { background: var(--color-surface-2); color: var(--color-accent); border-color: var(--color-border); }
#conv-tabs .conv-tab { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.tab-pill { min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; background: var(--color-accent); color: var(--color-accent-contrast); font-size: var(--font-tiny); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* --- Lista rozmów / wiadomości --- */
.conversation-list { flex: 1; overflow-y: auto; padding: var(--sp-2); scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.conv { display: flex; gap: 10px; align-items: center; padding: 8px 10px; margin-bottom: 1px; border-radius: var(--radius-md); cursor: pointer; border: 1px solid transparent; transition: background 0.12s ease-out; }
.conv:hover { background: var(--color-hover); }
.conv.active { background: var(--color-active); border-color: var(--color-border); }
.conv-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; overflow: hidden; background: var(--color-surface-2); color: var(--color-text-muted); }
.conv-avatar img, .msg-avatar img, #head-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.conv-avatar.thumb, #head-avatar.thumb { border-radius: var(--radius-md); }
.conv-body { flex: 1; min-width: 0; }
.conv-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); }
.conv-peer { font-weight: 600; font-size: var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time { font-size: var(--font-meta); color: var(--color-text-disabled); flex-shrink: 0; }
.conv-ad { font-size: var(--font-tiny); color: var(--color-text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; min-width: 0; }
.conv-ad-title { font-size: var(--font-meta); color: var(--color-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-last { font-size: var(--font-body); color: var(--color-text-secondary); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-role { font-size: var(--font-tiny); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 1px 5px; border-radius: var(--radius-sm); flex-shrink: 0; }
.conv-role.buy { color: var(--color-success); background: var(--color-success-soft); }
.conv-role.sell { color: var(--color-accent); background: var(--color-accent-soft); }
.conv-role.s { color: var(--color-success); background: var(--color-success-soft); }
.conv-role.k { color: var(--color-accent); background: var(--color-accent-soft); }
.conv-role::after { content: none; }
.conv-dot { color: var(--color-text-disabled); font-size: 9px; flex-shrink: 0; }
.conv-line { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.conv-action { opacity: 0; background: transparent; border: 0; color: var(--color-text-muted); cursor: pointer; padding: 4px; flex-shrink: 0; display: inline-flex; transition: opacity 0.15s, color 0.15s; border-radius: var(--radius-md); }
.conv:hover .conv-action { opacity: 1; }
.conv-action:hover { color: var(--color-accent); background: var(--color-hover); }
.conv-susp { font-size: var(--font-tiny); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-error); background: var(--color-error-soft); padding: 1px 6px; border-radius: var(--radius-sm); flex-shrink: 0; }

/* --- Wątek --- */
.messages-pane { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.messages-head { border-bottom: 1px solid var(--color-border); align-items: center; }
.chat-peer-head { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.peer-info { min-width: 0; flex: 1; }
.peer-name { font-size: 14px; font-weight: 600; color: var(--color-text-primary); text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peer-name-wrap { display: flex; align-items: center; gap: 6px; min-width: 0; }
.peer-name-wrap .peer-name { flex: 0 1 auto; }
.peer-name:hover { color: var(--color-accent); }
.peer-status { margin-left: 4px; font-size: var(--font-tiny); font-weight: 500; }
.peer-status.online { color: var(--color-success); }
.peer-status.offline { color: var(--color-text-muted); }
.head-open { margin-left: auto; flex-shrink: 0; }
.head-ad { display: flex; align-items: center; gap: 8px; margin-top: 3px; min-width: 0; }
.head-ad-img { width: 30px; height: 30px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--color-border); flex-shrink: 0; }
.head-ad-title { font-size: var(--font-meta); color: var(--color-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-bar { display: flex; align-items: center; gap: 10px; padding: 7px var(--sp-4); background: var(--color-surface-1); border-bottom: 1px solid var(--color-border); flex-shrink: 0; }
.ad-bar-img { width: 36px; height: 36px; object-fit: cover; border-radius: var(--radius-md); flex-shrink: 0; border: 1px solid var(--color-border); }
.ad-bar-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; min-width: 0; }
.ad-bar-title { font-size: var(--font-body); font-weight: 500; }
.ad-bar-price { font-size: var(--font-body); font-weight: 700; color: var(--color-accent); }
.ad-bar-open { margin-left: auto; flex-shrink: 0; white-space: nowrap; }

.messages-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--color-text-muted); text-align: center; padding: var(--sp-6); gap: var(--sp-2); }
.message-thread { flex: 1; overflow-y: auto; padding: var(--sp-4); display: flex; flex-direction: column; gap: 6px; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.msg-row { display: flex; gap: 8px; align-items: flex-end; }
.msg-row.out { justify-content: flex-end; }
.msg-avatar { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 10px; margin-bottom: 2px; user-select: none; background: var(--color-surface-2); color: var(--color-text-muted); }
.msg-avatar.thumb { border-radius: var(--radius-sm); }
.msg { max-width: 86%; padding: 8px 12px; border-radius: var(--radius-lg); font-size: var(--font-body); line-height: 1.5; word-wrap: break-word; }
.msg.in { align-self: flex-start; background: var(--color-surface-2); border: 1px solid var(--color-border); border-bottom-left-radius: var(--radius-sm); }
.msg.out { align-self: flex-end; background: var(--color-surface-3); border: 1px solid var(--color-border); border-bottom-right-radius: var(--radius-sm); }
.msg .msg-text { display: block; white-space: pre-wrap; word-break: break-word; }
.msg-meta { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 3px; }
.msg-time { font-size: var(--font-tiny); color: var(--color-text-disabled); }
.msg-status { font-size: var(--font-tiny); font-weight: 600; letter-spacing: 0.02em; }
.msg.out .msg-status { color: var(--color-accent); }
.msg-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.msg-img { width: 90px; height: 90px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--color-border); display: block; }
.msg-error { color: var(--color-error); font-size: var(--font-body); text-align: center; }
.email-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--color-accent-soft); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1px 5px; color: var(--color-accent); vertical-align: middle; }
.email-copy { display: inline-flex; align-items: center; justify-content: center; padding: 1px; border: 0; background: transparent; color: inherit; cursor: pointer; border-radius: var(--radius-sm); }
.email-copy:hover { background: var(--color-accent-soft); }

.composer { border-top: 1px solid var(--color-border); padding: var(--sp-3); display: flex; gap: 10px; flex-direction: column; background: var(--color-bg); }
.composer textarea { min-height: 44px; }
.composer-actions { display: flex; justify-content: flex-end; gap: var(--sp-2); }

/* --- Ogłoszenia --- */
.ads-list { display: flex; flex-direction: column; gap: 8px; max-height: 72vh; overflow-y: auto; }
.ad-card { display: flex; gap: 12px; padding: 9px; border: 1px solid var(--color-border); border-radius: var(--radius-md); align-items: center; background: var(--color-surface-1); transition: border-color 0.15s ease-out; }
.ad-card:hover { border-color: var(--color-border-hover); }
.ad-card-img { width: 64px; height: 64px; border-radius: var(--radius-md); object-fit: cover; flex-shrink: 0; background: var(--color-surface-2); border: 1px solid var(--color-border); }
.ad-card-img.noimg::after { content: "no image"; font-size: 9px; color: var(--color-text-disabled); display: flex; align-items: center; justify-content: center; height: 100%; text-transform: uppercase; letter-spacing: 0.05em; }
.ad-card-body { flex: 1; min-width: 0; }
.ad-card-title { font-weight: 600; font-size: var(--font-body); }
.ad-card-meta { display: flex; align-items: center; gap: 10px; margin-top: 3px; flex-wrap: wrap; }
.ad-card-views { font-size: var(--font-meta); color: var(--color-text-muted); }
.ad-card-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ad-stat { font-size: var(--font-meta); color: var(--color-text-muted); }
.conv-state.active { color: var(--color-success); }
.conv-state.inactive { flex-shrink: 0; font-size: var(--font-tiny); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-text-muted); background: var(--color-surface-2); border: 1px solid var(--color-border); padding: 1px 6px; border-radius: var(--radius-sm); }

/* --- Statystyki --- */
.stats-chart { display: flex; flex-direction: column; gap: 5px; max-height: 60vh; overflow-y: auto; }
.stat-bar-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.stat-bar-label { width: 54px; flex-shrink: 0; color: var(--color-text-muted); }
.stat-bar-track { flex: 1; height: 12px; background: var(--color-surface-2); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--color-border); }
.stat-bar-fill { height: 100%; background: var(--color-accent); border-radius: var(--radius-sm); transition: width 0.3s ease-out; }
.stat-bar-val { width: 34px; text-align: right; color: var(--color-text-secondary); flex-shrink: 0; font-weight: 500; }

/* --- Admin --- */
.admin-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); align-items: start; }
.admin-card { background: var(--color-surface-1); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--sp-5); }
.admin-card h3 { margin: 0 0 var(--sp-4); font-size: var(--font-section); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.admin-card h3 small { color: var(--color-text-muted); font-weight: 400; font-size: var(--font-meta); text-transform: none; letter-spacing: 0; }
.admin-card label { display: block; font-size: var(--font-nav); color: var(--color-text-secondary); margin-bottom: var(--sp-3); }
.gen-result { margin-top: var(--sp-4); padding: var(--sp-3); border-radius: var(--radius-md); background: var(--color-surface-2); border: 1px dashed var(--color-border-strong); }
.gen-result p { margin: 0 0 8px; font-size: var(--font-body); color: var(--color-text-secondary); }
.code-big { font-family: var(--font-mono); font-size: 20px; font-weight: 700; letter-spacing: 3px; text-align: center; padding: 10px; border-radius: var(--radius-md); background: var(--color-bg); border: 1px solid var(--color-border-strong); margin-bottom: 10px; color: var(--color-accent); }
.admin-table { display: flex; flex-direction: column; gap: 4px; }
.admin-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); flex-wrap: wrap; background: var(--color-surface-1); }
.admin-role { font-size: var(--font-meta); font-weight: 600; min-width: 52px; text-transform: uppercase; letter-spacing: 0.04em; }
.admin-role.user { color: var(--color-info); }
.admin-role.admin { color: var(--color-accent); }
.admin-role.owner { color: var(--color-warning); }
.admin-code { font-family: var(--font-mono); font-weight: 600; letter-spacing: 1.5px; }
.admin-note { color: var(--color-text-muted); font-size: var(--font-body); flex: 1; min-width: 80px; }
.admin-status { font-size: var(--font-meta); }
.admin-status.valid { color: var(--color-success); }
.admin-status.expired { color: var(--color-error); }
.admin-actions { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; }
.admin-actions select { width: auto; padding: 5px 8px; font-size: var(--font-meta); }

/* --- Modale --- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; padding: var(--sp-3); animation: fadein 0.16s ease-out; }
.modal { background: var(--color-surface-1); width: 100%; max-width: 100%; max-height: 92vh; overflow-y: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-2); padding: var(--sp-5); color: var(--color-text-primary); border: 1px solid var(--color-border-strong); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--sp-4); gap: var(--sp-3); }
.modal-head h3 { margin: 2px 0 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.modal-head .overline { margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-4); }
.confirm-modal { max-width: 380px; }
.confirm-msg { font-size: var(--font-body); color: var(--color-text-primary); margin: 0 0 var(--sp-3); line-height: 1.5; }
.ads-modal { max-width: 720px; }

/* --- Ustawienia / motyw --- */
.settings-modal { max-width: 440px; }
.settings-label { font-size: var(--font-tiny); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); margin: 2px 0 var(--sp-2); }
.settings-sep { border: 0; border-top: 1px solid var(--color-border); margin: var(--sp-4) 0; }
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.settings-theme-card { display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: transparent; color: var(--color-text-secondary); cursor: pointer; font-family: inherit; font-size: var(--font-nav); font-weight: 500; transition: border-color 0.15s ease-out, background 0.15s ease-out; }
.settings-theme-card:hover { background: var(--color-hover); }
.settings-theme-card.active { border-color: var(--color-accent); }
.theme-preview { width: 100%; height: 40px; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: linear-gradient(135deg, var(--pv-accent), var(--pv-bg)); }
.theme-check { color: var(--color-accent); font-size: 12px; opacity: 0; }
.settings-theme-card.active .theme-check { opacity: 1; }

/* --- Dodawanie konta --- */
.add-mode-picker { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.add-mode-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; width: 100%; background: var(--color-surface-1); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 11px 13px; cursor: pointer; color: var(--color-text-primary); font-family: inherit; transition: border-color 0.15s ease-out, background 0.15s ease-out; }
.add-mode-card:hover { background: var(--color-hover); }
.add-mode-card.active { border-color: var(--color-accent); background: var(--color-surface-2); }
.add-mode-title { font-weight: 600; font-size: var(--font-body); display: inline-flex; align-items: center; gap: 8px; }
.add-mode-title .tag { font-size: var(--font-tiny); font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; background: var(--color-accent); color: var(--color-accent-contrast); padding: 2px 7px; border-radius: var(--radius-sm); }
.add-mode-desc { font-size: var(--font-meta); color: var(--color-text-muted); }
.add-pane { display: flex; flex-direction: column; }
.connect-steps { margin: 0 0 var(--sp-4); padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.connect-steps li { font-size: var(--font-body); color: var(--color-text-secondary); line-height: 1.5; }
.connect-steps code { font-family: var(--font-mono); font-size: var(--font-meta); background: var(--color-surface-2); border: 1px solid var(--color-border); padding: 1px 5px; border-radius: var(--radius-sm); color: var(--color-text-primary); }
.connect-steps strong { color: var(--color-text-primary); }
.connect-status { margin-top: 4px; font-size: var(--font-body); }
.connect-status.success { color: var(--color-success); }
.connect-status.error { color: var(--color-error); }
.add-options { margin-bottom: var(--sp-4); padding: var(--sp-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-1); }

/* --- Ustawienia konta OLX --- */
#modal-account-settings h4 { font-size: var(--font-tiny); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 var(--sp-2); color: var(--color-text-muted); }
#modal-account-settings .as-sep { padding-top: var(--sp-3); }
#modal-account-settings .hint { font-size: var(--font-meta); }
#modal-account-settings .checkbox-row { background: var(--color-surface-1); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 10px 12px; margin-top: var(--sp-2); }
.as-sep { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--color-border); }
.as-sep h4 { margin: 0 0 var(--sp-2); font-size: var(--font-section); }
/* --- Proxy: nowoczesny, spójny z resztą pól --- */
.proxy-row { display: flex; gap: 8px; align-items: stretch; }
.proxy-row input.offer-input { flex: 1; min-width: 0; height: 38px; }

/* Własny (nie-natywny) wybór protokołu proxy — pasuje do motywu */
.proxy-scheme { position: relative; flex-shrink: 0; width: auto; min-width: 132px; }
.proxy-scheme-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; height: 38px; padding: 8px 12px;
  background: #0C0D10; color: var(--color-text-primary);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  font-size: var(--font-body); font-family: inherit; cursor: pointer; text-align: left;
  transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}
.proxy-scheme-trigger:hover { border-color: var(--color-border-hover); }
.proxy-scheme-trigger:focus-visible,
.proxy-scheme.open .proxy-scheme-trigger {
  outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent-soft);
}
.proxy-scheme-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proxy-scheme-chevron { flex-shrink: 0; color: var(--color-text-muted); transition: transform 0.18s ease-out; }
.proxy-scheme.open .proxy-scheme-chevron { transform: rotate(180deg); color: var(--color-text-secondary); }

.proxy-scheme-menu {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0;
  min-width: 100%; max-height: 260px; overflow-y: auto;
  background: var(--color-surface-2); border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md); box-shadow: var(--shadow-2);
  padding: 5px; display: flex; flex-direction: column; gap: 2px;
}
.proxy-scheme-menu[hidden] { display: none; }
.proxy-scheme-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 9px 10px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--color-text-secondary);
  font-size: var(--font-body); font-family: inherit; text-align: left; cursor: pointer;
  transition: background 0.12s ease-out, color 0.12s ease-out;
}
.proxy-scheme-option:hover { background: var(--color-hover); color: var(--color-text-primary); }
.proxy-scheme-option .opt-desc { font-size: var(--font-tiny); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.proxy-scheme-option.selected { background: var(--color-accent-soft); color: var(--color-text-primary); }
.proxy-scheme-option.selected .opt-desc { color: var(--color-text-secondary); }
.proxy-scheme-option .opt-check { width: 14px; height: 14px; flex-shrink: 0; color: var(--color-accent); opacity: 0; }
.proxy-scheme-option.selected .opt-check { opacity: 1; }

.proxy-test-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.proxy-result { font-size: var(--font-meta); color: var(--color-text-muted); }
.proxy-result.ok { color: var(--color-success); }
.proxy-result.err { color: var(--color-error); }
.thread-actions { display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; }

/* --- 2FA --- */
.as-2fa-status { font-size: var(--font-body); margin-bottom: var(--sp-3); }
.as-2fa-status .ok { color: var(--color-success); }
.as-2fa-status .pending { color: var(--color-text-muted); }
.as-2fa-btns { display: flex; flex-direction: column; gap: var(--sp-2); }
.as-2fa-secret-row { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); }
.as-2fa-secret { flex: 1; font-family: var(--font-mono); font-size: var(--font-body); word-break: break-all; background: var(--color-bg); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); padding: 9px; }
.secret-copy { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); color: var(--color-text-muted); display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; cursor: pointer; }
.secret-copy:hover { color: var(--color-accent); border-color: var(--color-accent); }
.as-2fa-code-row { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.as-2fa-code-row .offer-input { flex: 1; }
.as-totp { margin-top: var(--sp-3); padding: var(--sp-3); background: var(--color-surface-1); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.as-totp-code { font-family: var(--font-mono); font-size: 28px; font-weight: 700; letter-spacing: 3px; color: var(--color-accent); }
.as-totp-remaining { font-size: var(--font-meta); color: var(--color-text-muted); margin-top: 2px; }
.as-totp-track { height: 4px; background: var(--color-surface-2); border-radius: 999px; overflow: hidden; margin-top: var(--sp-2); border: 1px solid var(--color-border); }
.as-totp-fill { height: 100%; background: var(--color-accent); border-radius: 999px; transition: width 1s linear; }

/* --- Kafelki zdjęć --- */
.offer-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 4px; }
.offer-tile { position: relative; aspect-ratio: 1/1; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); background: var(--color-surface-2); display: flex; align-items: center; justify-content: center; }
.offer-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.offer-tile-add { color: var(--color-text-muted); border: 1px dashed var(--color-border-strong); cursor: pointer; transition: border-color 0.15s ease-out, color 0.15s ease-out; }
.offer-tile-add:hover { color: var(--color-accent); border-color: var(--color-accent); }
.offer-tile:not(.offer-tile-add) { cursor: grab; }
.offer-tile:not(.offer-tile-add):active { cursor: grabbing; }
.offer-tile.dragging { opacity: 0.4; }
.offer-tile-x { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(0,0,0,0.6); color: #fff; font-size: 10px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.offer-tile-x:hover { background: var(--color-error); }
.offer-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.offer-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
.offer-thumb-wrap { position: relative; }
.offer-thumb-rm { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--color-error); color: #fff; font-size: 10px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

/* --- Auth (logowanie) --- */
.auth-view { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--sp-4); background: var(--color-bg); }
.auth-content { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 360px; }
.auth-brand { text-align: center; margin-bottom: var(--sp-6); }
.auth-logo { width: 56px; height: 56px; margin: 0 auto var(--sp-4); border-radius: var(--radius-md); overflow: hidden; background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover)); color: var(--color-accent-contrast); display: flex; align-items: center; justify-content: center; }
.auth-logo-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.auth-brand-name { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.auth-form-wrap { width: 100%; padding: var(--sp-6); background: var(--color-surface-1); border: 1px solid var(--color-border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); }
.auth-field { position: relative; margin-bottom: 4px; }
.auth-field input { width: 100%; padding: 18px 0 8px; font-size: 15px; letter-spacing: 1px; color: var(--color-text-primary); background: transparent; border: 0; font-family: inherit; }
.auth-field input:focus { outline: none; }
.auth-field label { position: absolute; top: 15px; left: 0; color: var(--color-text-muted); font-size: 14px; transition: all 0.16s ease-out; pointer-events: none; }
.auth-field input:focus + label, .auth-field input:not(:placeholder-shown) + label { top: -4px; font-size: var(--font-tiny); letter-spacing: 0.06em; color: var(--color-accent); text-transform: uppercase; }
.auth-field-line { height: 1px; background: var(--color-border-strong); transition: background 0.16s ease-out; }
.auth-field input:focus ~ .auth-field-line { background: var(--color-accent); }
.auth-error { color: var(--color-error); font-size: var(--font-body); min-height: 18px; margin: var(--sp-2) 0 8px; text-align: center; }
.auth-footer { margin: var(--sp-5) 0 0; font-size: var(--font-meta); color: var(--color-text-disabled); letter-spacing: 0.06em; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-disabled); }
::-webkit-scrollbar-track { background: transparent; }

/* --- Lightbox --- */
.modal-backdrop.lightbox { cursor: zoom-out; background: rgba(0, 0, 0, 0.9); }
#lightbox-img { max-width: 92vw; max-height: 88vh; border-radius: var(--radius-md); box-shadow: var(--shadow-2); }

/* --- Ogłoszenia: licznik neutralny (nie jest powiadomieniem) --- */
#ads-tabs .tab-pill { background: var(--color-surface-3); color: var(--color-text-secondary); border: 1px solid var(--color-border); }

/* --- All Black / dark: dymki powiadomień złote --- */
[data-theme="graphite"] #conv-tabs .tab-pill,
[data-theme="darkblue"] #conv-tabs .tab-pill,
[data-theme="allblack"] #conv-tabs .tab-pill,
[data-theme="graphite"] .acct-unread,
[data-theme="darkblue"] .acct-unread,
[data-theme="allblack"] .acct-unread { background: var(--color-accent); color: var(--color-accent-contrast); }

/* --- Drobnice / statusy --- */
.unread-pill { background: var(--color-accent); color: var(--color-accent-contrast); }
.admin-wide { grid-column: span 1; }

/* --- Animacje --- */
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal-backdrop { animation: fadein 0.16s ease-out; }

/* ------------------------------------------------------------------ */
/* 5. DESKTOP (mobile-first: rozszerzenia)                             */
/* ------------------------------------------------------------------ */
@media (min-width: 768px) {
  .settings-grid { grid-template-columns: repeat(3, 1fr); }
  .modal-grid { grid-template-columns: 1fr 1fr; }
  .modal { max-width: 540px; }
  .auth-form-wrap { padding: var(--sp-7); }
}

@media (min-width: 900px) {
  body.sidebar-open::after { display: none; }
  .sidebar {
    position: static; transform: none;
    width: var(--sidebar-w);
    border-right: 1px solid var(--color-border);
  }
  .menu-button { display: none; }
  .app-shell { display: flex; }
  .main { flex: 1; }
  .workspace { flex-direction: row; }
  .conversations-panel { width: 344px; flex: 0 0 auto; max-height: none; }
  .messages-panel { flex: 1; }
  .admin-grid { grid-template-columns: 320px 1fr; }
  .topbar { padding: 0 var(--sp-5); }
  .workspace { padding: var(--sp-4); }
  .msg { max-width: 72%; }
  .offer-tiles { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
}

/* =====================================================================
   boolymen — poprawki / celowe udoskonalenia (albo v5)
   ===================================================================== */

/* Przełączniki zamiast checkboxów (animowane, rozróżnialne) */
.checkbox-row input[type=checkbox] {
  -webkit-appearance: none; appearance: none;
  width: 40px; height: 22px; border-radius: 999px;
  background: var(--color-surface-3);
  border: 1px solid var(--color-border-strong);
  position: relative; cursor: pointer; flex-shrink: 0; margin: 0;
  transition: background 0.18s ease-out, border-color 0.18s ease-out;
}
.checkbox-row input[type=checkbox]::before {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--color-text-disabled);
  transition: transform 0.18s ease-out, background 0.18s ease-out;
}
.checkbox-row input[type=checkbox]:checked {
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.checkbox-row input[type=checkbox]:checked::before {
  transform: translateX(18px);
  background: var(--color-accent-contrast);
}
.checkbox-row input[type=checkbox]:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--color-accent-soft); }

/* Odstęp pod "Dodaj konto" / nad "KONTA" */
.sidebar > .primary-button { margin-bottom: var(--sp-4); }
.section-head { margin-top: var(--sp-1); }

/* Gradient za logiem (lewy górny róg) */
.brand-mark {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
  box-shadow: 0 0 0 1px var(--color-border), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* Edytor własnego motywu */
.custom-theme {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3);
  margin-top: var(--sp-4); padding: var(--sp-4);
  background: var(--color-surface-1); border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.ct-field { display: flex; flex-direction: column; gap: 6px; }
.ct-field span { font-size: var(--font-tiny); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); }
.ct-field input[type=color] {
  width: 100%; height: 34px; padding: 2px; border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md); background: var(--color-bg); cursor: pointer;
}
.ct-field input[type=color]:focus-visible { outline: none; border-color: var(--color-accent); }

/* Jasne statusy - kropka + tekst */
.acct-status { font-size: var(--font-meta); font-weight: 600; }
.acct-status.online { color: var(--color-success); }
.acct-status.offline { color: var(--color-text-muted); }
.conv-role { font-weight: 700; }

/* =====================================================================
   boolymen — poprawki v5.1
   ===================================================================== */

/* Gradient widoczny za / wokół loga (lewy górny róg) */
.brand-mark {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
  padding: 3px;
  box-shadow: 0 0 14px var(--color-accent-soft), 0 0 0 1px var(--color-border);
}
.brand-mark .brand-img { border-radius: var(--radius-sm); }

/* Tarcza 2FA: czerwona = nieaktywne, zielona = włączone */
.acct-2fa-on { color: var(--color-success); }
.acct-2fa-on:hover { color: var(--color-success); background: var(--color-success-soft); }
.acct-2fa-off { color: var(--color-error); }
.acct-2fa-off:hover { color: var(--color-error); background: var(--color-error-soft); }

/* Statusy Online/Offline: zielone / czerwone */
.acct-status.online { color: var(--color-success); }
.acct-status.online .dot { background: var(--color-success); }
.acct-status.offline { color: var(--color-error); }
.acct-status.offline .dot { background: var(--color-error); }

/* Ranga w sidebarze: OWNER i ADMIN jaskrawo czerwoni, USER szary */
.auth-user-role[data-role="owner"],
.auth-user-role[data-role="admin"] { color: #EF4444; }
.auth-user-role { color: var(--color-text-muted); }

/* =====================================================================
   boolymen — poprawki v5.2
   ===================================================================== */

/* Gradient ZA logiem (lewy górny róg) — bez ramki */
.brand-row {
  background: linear-gradient(135deg, var(--color-accent-soft), transparent 62%);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  margin-bottom: var(--sp-2);
}
.brand-mark {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
  padding: 0;
  box-shadow: none;
}
.brand-mark .brand-img { padding: 2px; object-fit: contain; border-radius: var(--radius-sm); }

/* Tarcza 2FA: kompaktowa (mniej wysokości w oknie konta) */
.acct-2fa { width: 26px; height: 26px; padding: 0; }
.acct-2fa svg { width: 13px; height: 13px; }

/* Przyciski jednolitej wysokości (wypełnione = obrysowane) */
.btn, .primary-button, .ghost-button { height: 32px; padding: 0 13px; font-size: var(--font-nav); }

/* Admin: brak żółtych kolorów */
.admin-role.owner { color: var(--color-error); }
.admin-role.admin { color: var(--color-accent); }

/* Statusy Online/Offline: zielone / czerwone */
.acct-status.online { color: var(--color-success); }
.acct-status.online .dot { background: var(--color-success); }
.acct-status.offline { color: var(--color-error); }
.acct-status.offline .dot { background: var(--color-error); }

/* Przycisk BLACKLIST + zwijanie listy kont */
.sidebar-actions { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-2); }
.blacklist-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  height: 30px; padding: 0 10px; background: var(--color-error-soft); color: var(--color-error);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  font-size: var(--font-nav); font-weight: 600; letter-spacing: 0.04em; cursor: pointer; font-family: inherit;
  transition: border-color 0.15s ease-out, background 0.15s ease-out;
}
.blacklist-btn:hover { border-color: var(--color-error); }
.collapse-btn { flex-shrink: 0; }

/* Zwijanie listy kont - chevron */
.collapse-btn svg { transition: transform 0.18s ease-out; }
.collapse-btn.collapsed svg { transform: rotate(180deg); }

/* Manager proxy */
.proxy-pool-row { display: flex; gap: 8px; align-items: stretch; margin-bottom: 10px; }
.proxy-pool-row select.offer-input { flex: 1; min-width: 0; height: 38px; }
.proxy-pool-row .ghost-button { flex-shrink: 0; height: 38px; }
.proxies-modal { max-width: 620px; }
.empty-list { padding: 14px; text-align: center; color: var(--color-text-muted); font-size: var(--font-meta); }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: var(--font-body); color: var(--color-text-secondary); cursor: pointer; }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--color-accent); cursor: pointer; }
.btn-sm { height: 34px; padding: 0 12px; font-size: var(--font-meta); }
.proxy-add-form { margin-bottom: var(--sp-4); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--color-border); }
.proxy-list { display: flex; flex-direction: column; gap: 8px; max-height: 42vh; overflow-y: auto; }
.proxy-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px;
  border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-1);
}
.proxy-item-body { flex: 1; min-width: 0; }
.proxy-item-name { font-weight: 600; font-size: 14px; color: var(--color-text-primary); }
.proxy-item-url { font-size: var(--font-meta); color: var(--color-text-muted); word-break: break-all; margin-top: 2px; font-family: var(--font-mono); }
.proxy-item-meta { font-size: var(--font-meta); color: var(--color-text-muted); margin-top: 4px; }
.proxy-item-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.proxy-item .ghost-button { height: 30px; padding: 0 10px; font-size: var(--font-meta); }
.proxy-item .ghost-button.danger { color: var(--color-error); border-color: var(--color-error-soft); }
.proxy-item .ghost-button.danger:hover { background: var(--color-error-soft); border-color: var(--color-error); }
.proxy-badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; padding: 2px 6px; border-radius: var(--radius-sm); background: var(--color-accent-soft); color: var(--color-text-secondary); margin-left: 6px; }
.proxy-badge.manual { background: var(--color-surface-2); color: var(--color-text-muted); }

/* Blacklista */
.blacklist-modal { max-width: 480px; }
.blacklist-list { display: flex; flex-direction: column; gap: 8px; max-height: 70vh; overflow-y: auto; }
.blacklist-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px;
  border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-1);
}
.bl-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: var(--color-text-muted); overflow: hidden;
}
.bl-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bl-body { flex: 1; min-width: 0; }
.bl-name { font-weight: 600; font-size: 14px; }
.bl-meta { font-size: var(--font-meta); color: var(--color-text-muted); word-break: break-all; margin-top: 2px; }
.bl-note-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.bl-note {
  flex: 1; background: var(--color-bg); color: var(--color-text-primary);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); padding: 6px 9px;
  font-size: var(--font-body); font-family: inherit; height: 32px; transition: border-color 0.15s ease-out;
}
.bl-note:focus { outline: none; border-color: var(--color-accent); }
.bl-note-saved { flex-shrink: 0; font-size: 12px; color: var(--color-success); width: 14px; text-align: center; }
.bl-remove { flex-shrink: 0; height: 32px; }

/* =====================================================================
   boolymen — poprawki v5.3
   ===================================================================== */

/* Blacklista jako SZARA kategoria (nie czerwony przycisk) */
.blacklist-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  height: 30px; padding: 0 10px;
  background: transparent; color: var(--color-text-secondary);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  font-size: var(--font-nav); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer; font-family: inherit;
  transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
}
.blacklist-btn:hover { background: var(--color-hover); color: var(--color-text-primary); border-color: var(--color-border-hover); }

/* Ikona 2FA: przesunięta na bok (absolutna), nie zwiększa wysokości wiersza */
.acct-2fa {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px;
}
.account-item { padding-right: 34px; }

/* =====================================================================
   boolymen — poprawki v5.4 (layout sidebaru / kont / blacklisty)
   ===================================================================== */

/* Nagłówek KONTA: większy, collapse+licznik w tej samej linii */
.section-head { font-size: 13px; font-weight: 700; margin-top: var(--sp-1); }
.section-head > span:first-child { letter-spacing: 0.07em; }
.section-head-right { display: flex; align-items: center; gap: 4px; }

/* Blacklista: pełna szerokość pod listą kont, szara kategoria */
.blacklist-btn {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  width: 100%; height: 30px; margin-top: var(--sp-2); padding: 0 10px;
  background: transparent; color: var(--color-text-secondary);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  font-size: var(--font-nav); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer; font-family: inherit;
  transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
}
.blacklist-btn:hover { background: var(--color-hover); color: var(--color-text-primary); border-color: var(--color-border-hover); }

/* Ikona 2FA: 26px, w flow (centrowane z zębatką i usuwaniem) */
.acct-2fa {
  position: static; transform: none;
  width: 26px; height: 26px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.acct-2fa svg { width: 20px; height: 20px; }
.account-item { padding-right: 4px; }
.account-item { align-items: center; }

/* =====================================================================
   boolymen — porządki v6
   ===================================================================== */

/* KONTA: powrót do małego, schludnego rozmiaru */
.section-head { font-size: 11px; font-weight: 650; letter-spacing: 0.08em; }

/* Ikona 2FA: ten sam rozmiar co pozostałe przyciski (zębatka itp.) */
.acct-2fa { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.acct-2fa svg { width: 15px; height: 15px; }

/* Kompaktowe wiersze kont */
.account-item { padding: 6px 8px; gap: 8px; align-items: center; }
.account-name { font-size: 13px; }
.acct-status { margin-top: 1px; }
.acct-sub { margin-top: 1px; }

/* Blacklista: zgrabny, mały przycisk (nie kloc) */
.blacklist-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  width: 100%; height: 26px; margin-top: var(--sp-2); padding: 0 9px;
  background: transparent; color: var(--color-text-secondary);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  font-size: 10px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; font-family: inherit;
  transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
}
.blacklist-btn:hover { background: var(--color-hover); color: var(--color-text-primary); border-color: var(--color-border-hover); }

/* ==== GLASSMORPHISM na każdym motywie ==== */
[data-theme="white"] {
  --glass: rgba(255,255,255,0.62);
  --glass-border: rgba(20,22,28,0.12);
  --glass-input: rgba(255,255,255,0.55);
}
[data-theme="graphite"], [data-theme="violet"], [data-theme="emerald"], [data-theme="darkblue"], [data-theme="allblack"] {
  --glass: rgba(20,22,27,0.45);
  --glass-border: rgba(255,255,255,0.08);
  --glass-input: rgba(255,255,255,0.04);
}
[data-theme="custom"] {
  --glass: rgba(20,22,27,0.5);
  --glass-border: rgba(255,255,255,0.08);
  --glass-input: rgba(255,255,255,0.05);
}

.panel, .modal, .topbar, .admin-card, .ad-card, .suggest, .blacklist-item, .as-totp, .gen-result {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  border-color: var(--glass-border);
}
.sidebar {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
}
.offer-input, .search-wrap, .stacked input, .stacked textarea, .modal textarea, .composer textarea,
.bl-note, .admin-card select, .admin-card input[type=text], .admin-card input[type=number],
#modal-account-settings .stacked input, #modal-account-settings .stacked textarea {
  background: var(--glass-input);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* =====================================================================
   boolymen — porządki v7 (zwarte wiersze kont + blacklista)
   ===================================================================== */

/* Konto: 2 wiersze (nazwa + status·Dodano), ikony w zwartej grupie po prawej */
.account-item {
  height: 50px; padding: 0 8px; gap: 10px; align-items: center;
  display: flex; flex-direction: row;
}
.account-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.account-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.acct-status-line {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500; line-height: 1.2; white-space: nowrap; overflow: hidden;
}
.acct-status-line .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.acct-status-line.online { color: var(--color-success); }
.acct-status-line.online .dot { background: var(--color-success); }
.acct-status-line.offline { color: var(--color-error); }
.acct-status-line.offline .dot { background: var(--color-error); }
.acct-status-line .acct-wallet { color: var(--color-text-secondary); }
.acct-status-line .acct-sub { color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.account-actions {
  display: flex; align-items: center; gap: 0; flex-shrink: 0; margin-left: 2px;
}
.account-actions .acct-2fa,
.account-actions .account-gear,
.account-actions .account-del {
  width: 28px; height: 28px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.account-actions .acct-2fa svg,
.account-actions .account-gear svg { width: 15px; height: 15px; }

/* Blacklista: ograniczona wysokość + kompaktowe elementy */
.blacklist-modal { max-width: 460px; }
.blacklist-list { max-height: min(50vh, 340px); }
.blacklist-item { padding: 10px; gap: 10px; }

/* =====================================================================
   boolymen — v7.1 (widoczna data + smukły BLACKLIST)
   ===================================================================== */

/* Nie ucinać "Dodano [data]":
   - linia statusu niczego nie obcina */
.acct-status-line { white-space: nowrap; overflow: visible; min-width: 0; }
.acct-status-line .acct-sub { white-space: nowrap; overflow: visible; text-overflow: clip; }

/* BLACKLIST: smukły, wąski przycisk (węższy niż "Dodaj konto") */
.blacklist-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: auto; height: 24px; padding: 0 10px; margin-top: 6px;
  background: transparent; color: var(--color-text-secondary);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  font-size: 9px; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase;
  cursor: pointer; font-family: inherit;
  transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
}
.blacklist-btn:hover { background: var(--color-hover); color: var(--color-text-primary); border-color: var(--color-border-hover); }
.blacklist-btn .pill { min-width: 14px; height: 14px; font-size: 8px; padding: 0 3px; }

/* =====================================================================
   boolymen — v8 (Dodano na osobnym wierszu + niski BLACKLIST)
   ===================================================================== */

/* Konto: 3 wiersze (nazwa / status / Dodano) - kompaktowo */
.account-item { height: auto; min-height: 54px; padding: 5px 8px; gap: 10px; align-items: flex-start; }
.account-meta { gap: 1px; }
.account-name { margin: 0; }
.acct-status {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500; line-height: 1.2; white-space: nowrap; overflow: visible;
}
.acct-status .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.acct-status.online { color: var(--color-success); }
.acct-status.online .dot { background: var(--color-success); }
.acct-status.offline { color: var(--color-error); }
.acct-status.offline .dot { background: var(--color-error); }
.acct-status .acct-wallet { color: var(--color-text-secondary); }
.acct-sub { font-size: 10px; color: var(--color-text-muted); line-height: 1.3; white-space: nowrap; overflow: visible; }
.acct-sub::before { content: ""; }

.account-actions { align-items: center; margin-top: 6px; }

/* BLACKLIST: bardzo niski (smukły) */
.blacklist-btn {
  height: 20px; padding: 0 8px; margin-top: 6px;
  width: auto; font-size: 8px; letter-spacing: 0.08em;
  line-height: 1;
}
.blacklist-btn .pill { height: 12px; min-width: 12px; font-size: 8px; }

/* =====================================================================
   boolymen — v9 (BLACKLIST jak zwykły przycisk na dole + odrobinę większa data)
   ===================================================================== */

/* BLACKLIST = normalny przycisk (jak ghost), na dole nad kontem/rangą */
.blacklist-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: auto; height: 32px; padding: 0 12px; margin: var(--sp-1) 0 2px;
  background: transparent; color: var(--color-text-secondary);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  font-size: var(--font-nav); font-weight: 500; letter-spacing: normal; text-transform: none;
  cursor: pointer; font-family: inherit;
  transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
}
.blacklist-btn:hover { background: var(--color-hover); color: var(--color-text-primary); border-color: var(--color-border-hover); }
.blacklist-btn .pill { height: 16px; min-width: 16px; font-size: 9px; }

/* Wiersz konta: minimalnie wyższy, "Dodano [data]" odrobinę większe */
.account-item { min-height: 56px; padding: 6px 8px; }
.acct-sub { font-size: 11px; line-height: 1.3; }

/* =====================================================================
   boolymen — v10 (BLACKLIST: finalnie bardzo mały, niski przycisk)
   ===================================================================== */
.blacklist-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  width: auto; height: 22px; min-height: 0; padding: 0 9px; margin: 6px 0 2px;
  background: transparent; color: var(--color-text-secondary);
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: 9px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
  line-height: 1; cursor: pointer; font-family: inherit;
  transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
}
.blacklist-btn:hover { background: var(--color-hover); color: var(--color-text-primary); border-color: var(--color-border-hover); }
.blacklist-btn .pill { height: 12px; min-width: 12px; font-size: 8px; padding: 0 3px; }

/* =====================================================================
   boolymen — v11 (BLACKLIST: NAJWAŻNIEJSZE - usunięte rozciąganie flex:1)
   ===================================================================== */
.blacklist-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  width: auto; max-width: 100%; height: 22px; min-height: 0; padding: 0 9px; margin: 6px 0 2px;
  background: transparent; color: var(--color-text-secondary);
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: 9px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
  line-height: 1; cursor: pointer; font-family: inherit;
  transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
}
.blacklist-btn:hover { background: var(--color-hover); color: var(--color-text-primary); border-color: var(--color-border-hover); }
.blacklist-btn .pill { height: 12px; min-width: 12px; font-size: 8px; padding: 0 3px; }

/* =====================================================================
   boolymen — selecty / import / telegram
   ===================================================================== */

/* Nowoczesne <select> (bez domyślnej przeglądarkowej strzałki, spójne z motywem) */
select.offer-input, select.offer-input.offer-input,
#offer-account, #offer-state, #admin-role,
.admin-card select, .admin-actions select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  color: var(--color-text-primary);
  padding-right: 30px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23999fad' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M4 6l4 4 4-4'/></svg>");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 14px;
  cursor: pointer;
}
select option, select option:checked { color: #1a1d27; background: #fff; }

/* Wiersz importu */
.import-row { display: flex; gap: 8px; margin-bottom: 4px; }
.import-row .offer-input { flex: 1; height: 34px; }
.import-row .ghost-button { flex-shrink: 0; height: 34px; }

/* Telegram */
#tg-fields .stacked input { height: 38px; }

/* --- Tryb mail:pass --- */
.ac-results { margin: 10px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.ac-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px;
  background: var(--surface, #15171c); font-size: 13px;
}
.ac-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.ac-dot.ok { background: #34d399; }
.ac-dot.err { background: #f87171; }
.ac-mail { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-prov { color: #9aa0a6; font-size: 12px; }
.ac-info { margin-left: auto; font-size: 12px; color: #9aa0a6; text-align: right; }
