/* ── TOKENY ─────────────────────────────────────────────────── */
:root {
  --bg:       #0C0B1A;
  --bg2:      #13103A;
  --card:     #1A1640;
  --card2:    #221D55;
  --border:   rgba(155,77,255,0.18);
  --border2:  rgba(155,77,255,0.35);
  --violet:   #9B4DFF;
  --violet2:  #B87FFF;
  --violet3:  #D4AAFF;
  --glow:     rgba(155,77,255,0.15);
  --white:    #FFFFFF;
  --muted:    #8B7CB8;
  --text:     #E8E0FF;
  --success:  #4ADE80;
  --warn:     #FBBF24;
  --danger:   #F87171;
  --info:     #60A5FA;
  --mono:     'JetBrains Mono', monospace;
  --sans:     'Space Grotesk', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; height: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overflow: hidden;
}

/* ── NOISE TEXTURE ───────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ── GLOW ORBS ───────────────────────────────────────────────── */
.orb {
  position: fixed; border-radius: 50%;
  filter: blur(80px); pointer-events: none; z-index: 0;
}
.orb1 { width: 400px; height: 400px; background: rgba(155,77,255,0.12); top: -100px; right: -100px; }
.orb2 { width: 300px; height: 300px; background: rgba(90,50,180,0.10); bottom: -50px; left: -80px; }
.orb3 { width: 200px; height: 200px; background: rgba(155,77,255,0.08); top: 40%; left: 40%; }

/* ── VIEWS ───────────────────────────────────────────────────── */
.view { display: none; position: relative; z-index: 1; }
.view.active { display: block; animation: viewEnter .5s ease both; }
@keyframes viewEnter { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
#view-login  { display: none; min-height: 100vh; min-height: 100dvh; align-items: flex-start; justify-content: center; padding: 48px 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; position: relative; }
#view-login.active   { display: flex; }
/* wrap centruje się w pionie gdy mieści się na ekranie, a gdy jest wyższy
   niż widok — pozwala na pełny scroll w dół bez ucinania dołu karty */
#view-login .login-wrap { margin: auto; }

/* ── MOBILE: karta wyżej, mniejsza + zapas na dole, żeby dało się zjechać ── */
@media (max-width: 600px) {
  #view-login {
    align-items: flex-start;
    /* górny zapas robi miejsce na przycisk „Strona główna”, dolny pozwala
       przewinąć kartę spod dolnego paska nawigacji telefonu */
    padding: 64px 16px calc(48px + env(safe-area-inset-bottom));
  }
  #view-login .login-wrap { margin: 0 auto; gap: 14px; }
  /* mniejsze logo = karta startuje wyżej na ekranie */
  #view-login .logo-icon-wrap { width: 68px; height: 68px; margin-bottom: 8px; }
  #view-login .login-logo h1 { font-size: 30px; }
  #view-login .login-logo p { margin-top: 4px; font-size: 10px; }
  /* mniejsza, ciaśniejsza karta */
  #view-login .login-card { padding: 22px 20px; border-radius: 18px; }
  #view-login .login-card h2 { font-size: 24px; }
  #view-login .btn-login { padding: 14px; }
  #view-login .login-hint { font-size: 10px !important; line-height: 1.7 !important; }
}
.login-back {
  position: fixed; top: 20px; left: 24px; z-index: 50;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px;
  color: rgba(184,127,255,0.7); text-decoration: none;
  padding: 8px 14px; border-radius: 10px;
  background: rgba(20,16,48,0.5); backdrop-filter: blur(12px);
  border: 1px solid rgba(155,77,255,0.25);
  transition: all .2s ease;
}
.login-back:hover {
  color: var(--white); border-color: rgba(155,77,255,0.5);
  background: rgba(155,77,255,0.12); transform: translateX(-2px);
}
/* link powrotu widoczny tylko gdy ekran logowania jest aktywny */
#view-login:not(.active) .login-back { display: none; }
#view-client.active  { display: block; height: 100vh; height: 100dvh; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
#view-employee.active { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
#view-sales.active    { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
#view-admin.active   { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ── PORTFOLIO MOSAIC ────────────────────────────────────── */
.portfolio-mosaic {
  position: fixed; inset: 0; z-index: 4; pointer-events: none;
}
.pm-item {
  position: absolute; left: var(--x); top: var(--y);
  width: 240px; height: 148px;
  border-radius: 16px; overflow: hidden;
  border: none;
  box-shadow: none;
  transform: rotate(var(--r));
  animation: pmFloat 11s ease-in-out infinite;
  animation-delay: var(--delay);
  animation-fill-mode: both;
}
.pm-item.pm-small { width: 170px; height: 110px; }
.pm-svg {
  width: 100%; height: 100%;
  display: block; overflow: hidden;
  filter: brightness(0.45) saturate(0.5) contrast(0.85);
}
.pm-item.pm-bright .pm-svg {
  filter: brightness(0.75) saturate(0.8) contrast(1.0);
}
.pm-svg svg {
  width: 100%; height: 100%;
  display: block;
}
/* Mgła — rozpływa kafelek w kosmosie od wszystkich krawędzi */
.pm-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 25%, rgba(6,3,15,0.5) 60%, rgba(6,3,15,0.95) 100%);
}
.pm-item.pm-bright .pm-overlay {
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(6,3,15,0.35) 70%, rgba(6,3,15,0.88) 100%);
}
/* Dodatkowa fioletowa mgiełka subtelna */
.pm-item::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(90,20,160,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.pm-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(155,77,255,0.1), rgba(6,3,15,0.45));
}
@keyframes pmFloat {
  0%   { opacity: 0;    transform: rotate(var(--r)) translateY(20px); }
  12%  { opacity: 0.88; }
  50%  { opacity: 0.92; transform: rotate(var(--r)) translateY(-18px); }
  88%  { opacity: 0.88; }
  100% { opacity: 0;    transform: rotate(var(--r)) translateY(20px); }
}
.mosaic-mask {
  position: fixed; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(
    ellipse 65% 85% at 50% 50%,
    rgba(6,3,15,0.9) 0%,
    rgba(6,3,15,0.65) 45%,
    rgba(6,3,15,0.15) 75%,
    transparent 100%
  );
}

/* ═══════════════════════════ LOGIN BG ═══════════════════════ */
.login-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: #06030f;
}

/* Canvas cząsteczek i energii */
#login-canvas {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
}



/* Skanujące linie */
.scan-lines {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(155,77,255,0.015) 2px,
    rgba(155,77,255,0.015) 4px
  );
  animation: scanMove 8s linear infinite;
}
@keyframes scanMove {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100px; }
}


/* Siatka hex */
.hex-grid {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(155,77,255,0.08) 1px, transparent 0);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent);
  animation: hexPulse 4s ease-in-out infinite;
}
@keyframes hexPulse {
  0%,100% { opacity: 0.5; }
  50%     { opacity: 1; }
}

/* Iskry elektryczne */
.sparks {
  position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden;
}
.spark {
  position: absolute;
  width: 2px; height: 2px;
  background: #B87FFF;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(155,77,255,0.8);
  animation: sparkAnim linear infinite;
  opacity: 0;
}
@keyframes sparkAnim {
  0%   { transform: translate(0,0) scale(0); opacity: 0; }
  10%  { opacity: 1; transform: scale(1); }
  50%  { opacity: 0.8; }
  100% { transform: translate(var(--sx), var(--sy)) scale(0); opacity: 0; }
}

/* Pulsujące węzły siatki */
.nodes {
  position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden;
}
.node {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(155,77,255,0.8) 0%, transparent 70%);
  animation: nodePulse ease-in-out infinite;
}
@keyframes nodePulse {
  0%,100% { transform: scale(0.5); opacity: 0.2; }
  50%     { transform: scale(1.5); opacity: 0.6; }
}

/* ── FORM ELEMENTS ─────────────────────────── */
.login-wrap {
  position: relative; z-index: 10;
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.login-logo { text-align: center; }
.logo-icon-wrap {
  position: relative; display: inline-flex;
  align-items: center; justify-content: center;
  width: 96px; height: 96px; margin-bottom: 20px;
}

/* Obracający się zewnętrzny pierścień z kreskami */
.logo-orbit {
  position: absolute; inset: 0;
  border-radius: 50%;
  animation: logoOrbit 8s linear infinite;
}
.logo-orbit svg { width: 100%; height: 100%; }
@keyframes logoOrbit { to { transform: rotate(360deg); } }

/* Przeciwny wolniejszy pierścień */
.logo-orbit-2 {
  position: absolute; inset: 6px;
  border-radius: 50%;
  animation: logoOrbit 12s linear infinite reverse;
  opacity: 0.5;
}
.logo-orbit-2 svg { width: 100%; height: 100%; }

/* Pulsujące kółko w tle */
.logo-glow {
  position: absolute; inset: 18px; border-radius: 50%;
  background: radial-gradient(circle, rgba(155,77,255,0.3) 0%, transparent 70%);
  animation: logoGlowPulse 3s ease-in-out infinite;
}
@keyframes logoGlowPulse {
  0%,100% { transform: scale(0.9); opacity: 0.6; }
  50%     { transform: scale(1.2); opacity: 1; }
}

/* Główny symbol — hexagon */
.logo-hex {
  position: relative; z-index: 2;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  animation: logoHexPulse 4s ease-in-out infinite;
}
@keyframes logoHexPulse {
  0%,100% { filter: drop-shadow(0 0 8px rgba(155,77,255,0.6)); }
  50%     { filter: drop-shadow(0 0 20px rgba(184,127,255,1)) drop-shadow(0 0 40px rgba(155,77,255,0.5)); }
}
.logo-hex svg { width: 100%; height: 100%; }

/* Błysk po hexagonie */
.logo-flash {
  position: absolute; inset: 20px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(155,77,255,0.4) 15%, transparent 30%);
  animation: logoFlash 3s linear infinite;
}
@keyframes logoFlash { to { transform: rotate(360deg); } }

.logo-planet-orbit {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
}
.login-logo h1 {
  font-size: 26px; font-weight: 700; letter-spacing: 1px;
  color: var(--white); margin: 0 0 4px;
  font-family: var(--sans);
  text-shadow: 0 0 30px rgba(155,77,255,0.4);
}
.login-logo h1 em {
  font-style: normal; color: var(--violet);
  font-weight: 300;
}
.login-logo p {
  font-size: 8px; letter-spacing: 5px; text-transform: uppercase;
  color: rgba(155,77,255,0.5); font-family: var(--mono);
}
/* Podkreślenie pod nazwą */
.logo-line {
  width: 60px; height: 1px; margin: 8px auto 6px;
  background: linear-gradient(90deg, transparent, rgba(155,77,255,0.8), transparent);
  animation: logoLinePulse 3s ease-in-out infinite;
}
@keyframes logoLinePulse {
  0%,100% { opacity: 0.4; width: 40px; }
  50%     { opacity: 1;   width: 80px; }
}

.login-card {
  width: 100%;
  background: rgba(10,6,25,0.85);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(155,77,255,0.25);
  border-radius: 24px; padding: 32px;
  box-shadow: 0 0 0 1px rgba(155,77,255,0.05) inset,
              0 30px 80px rgba(0,0,0,0.7),
              0 0 120px rgba(155,77,255,0.08);
  position: relative; overflow: hidden;
  transition: transform .55s cubic-bezier(.4,0,.2,1), opacity .55s ease;
  will-change: transform, opacity;
}
/* delikatne zejście karty w dół przy udanym logowaniu */
.login-card.leaving {
  transform: translateY(40px) scale(0.97);
  opacity: 0;
}
/* cała sekcja logowania też miękko gaśnie */
#view-login.leaving { transition: opacity .5s ease; opacity: 0; }
.login-card::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(155,77,255,0.8), transparent);
  animation: cardTopGlow 3s ease-in-out infinite;
}
@keyframes cardTopGlow {
  0%,100% { opacity: 0.5; }
  50%     { opacity: 1; box-shadow: 0 0 20px rgba(155,77,255,0.5); }
}
.login-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 40% at 50% -10%, rgba(155,77,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.login-card h2 {
  font-size: 20px; font-weight: 700; color: var(--white); margin: 0 0 8px;
  letter-spacing: 0.5px;
}
.login-card .sub {
  font-size: 12px; color: #4ade80; margin: 0 0 24px;
  font-family: var(--mono); letter-spacing: 0.5px;
  min-height: 18px;
}
.login-card .sub::after {
  content: '▌';
  animation: blink .7s step-end infinite;
  color: #4ade80;
  margin-left: 1px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-family: var(--mono); font-size: 9px;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(155,77,255,0.7); margin-bottom: 8px;
}
.field input {
  width: 100%; padding: 13px 16px;
  background: rgba(155,77,255,0.05);
  border: 1px solid rgba(155,77,255,0.2);
  border-radius: 12px; color: var(--white);
  font-family: var(--sans); font-size: 14px; outline: none;
  transition: all .25s;
}
.field input:focus {
  border-color: var(--violet);
  background: rgba(155,77,255,0.1);
  box-shadow: 0 0 0 3px rgba(155,77,255,0.15), 0 0 20px rgba(155,77,255,0.1);
}
.field input::placeholder { color: rgba(139,124,184,0.4); }

.btn-login {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, #9B4DFF 0%, #7B2FBE 50%, #9B4DFF 100%);
  background-size: 200% auto;
  border: none; border-radius: 12px;
  color: white; font-family: var(--sans);
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all .3s; position: relative; overflow: hidden;
  box-shadow: 0 4px 25px rgba(155,77,255,0.45);
  letter-spacing: 0.5px;
  animation: btnGlow 3s ease-in-out infinite;
}
@keyframes btnGlow {
  0%,100% { box-shadow: 0 4px 20px rgba(155,77,255,0.4); }
  50%     { box-shadow: 0 4px 40px rgba(155,77,255,0.7); }
}
.btn-login::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent 50%);
  border-radius: 12px;
}
.btn-login::after {
  content: ''; position: absolute; top: -50%; left: -60%; width: 60%; height: 200%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg);
  animation: btnShimmer 3s ease-in-out infinite;
}
@keyframes btnShimmer {
  0%   { left: -60%; }
  50%  { left: 120%; }
  100% { left: 120%; }
}
.btn-login:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(155,77,255,0.65);
}
.btn-login:active { transform: translateY(0); }

.login-hint {
  text-align: center; color: var(--muted); font-size: 11px; line-height: 2;
  padding: 14px 16px; margin-top: 4px;
  background: rgba(155,77,255,0.04);
  border: 1px solid rgba(155,77,255,0.12);
  border-radius: 12px;
}
.login-hint span { color: var(--violet2); font-weight: 600; }


/* ═══════════════════════════════════════════════════════════════
   SHARED LAYOUT
═══════════════════════════════════════════════════════════════ */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100vh;
  overflow: hidden;
}
.client-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.client-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  flex: 1;
}
@media(max-width:900px) { .client-cols { grid-template-columns: 1fr; } }
@media(max-width:768px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .sidebar.open { display: flex; position: fixed; inset: 0; z-index: 50; }
}

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.sidebar {
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 24px 0;
  height: 100%;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.sidebar-logo .lname {
  font-size: 18px; font-weight: 700; color: var(--white);
}
.sidebar-logo .lname span { color: var(--violet); }
.sidebar-logo .ltag {
  font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); font-family: var(--mono);
}

.sidebar-section {
  padding: 0 12px; margin-bottom: 4px;
}
.sidebar-section-label {
  font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(139,124,184,0.5); font-family: var(--mono);
  padding: 8px 8px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--muted); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: all .15s; border: none;
  background: none; width: 100%; text-align: left;
}
.nav-item .ni { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item:hover { background: rgba(155,77,255,0.08); color: var(--violet2); }
.nav-item.active {
  background: rgba(155,77,255,0.15);
  color: var(--violet2);
  border: 1px solid rgba(155,77,255,0.2);
}
.nav-item .badge {
  margin-left: auto; background: var(--violet);
  color: white; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 20px;
  font-family: var(--mono);
}

.sidebar-footer {
  margin-top: auto; padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.user-chip {
  display: flex; align-items: center; gap: 10px;
}
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), #5A32B4);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: white; flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; color: var(--white); }
.user-role { font-size: 10px; color: var(--muted); font-family: var(--mono); }
.btn-logout {
  margin-left: auto; background: none; border: 1px solid var(--border);
  color: var(--muted); padding: 5px 8px; border-radius: 6px;
  cursor: pointer; font-size: 12px; transition: all .2s;
}
.btn-logout:hover { border-color: var(--danger); color: var(--danger); }

/* ── MAIN CONTENT ────────────────────────────────────────────── */
.main-content {
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(12,11,26,0.95);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 10;
  flex-shrink: 0;
}
.topbar-title { font-size: 18px; font-weight: 700; color: var(--white); }
.topbar-title span { color: var(--muted); font-weight: 400; font-size: 14px; margin-left: 8px; }
/* pasek powrotu (Wstecz + Dashboard) */
.back-bar { display: none; align-items: center; gap: 10px; padding: 12px 28px 0; flex-wrap: wrap; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border); background: rgba(26,22,64,0.5); color: var(--violet2); font-family: var(--sans); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .18s; }
.back-btn:hover { border-color: var(--border2); background: rgba(155,77,255,0.12); transform: translateX(-2px); }
.back-btn.home { color: var(--muted); }
.back-btn.home:hover { color: var(--violet2); }
.back-crumb { font-size: 12px; color: var(--muted); font-family: var(--mono); margin-left: 4px; }
@media (max-width: 600px) { .back-bar { padding: 10px 16px 0; } }
.topbar-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ── USER FORM MODAL ─────────────────────────────────────── */
.uf-role-btn {
  display:flex; flex-direction:column; align-items:center;
  padding:14px 8px; border-radius:10px; cursor:pointer;
  border:2px solid var(--border); background:rgba(255,255,255,0.02);
  color:var(--text); font-family:var(--sans); transition:all .15s; text-align:center;
}
.uf-role-btn:hover { border-color:var(--border2); background:rgba(155,77,255,0.06); }
.uf-role-btn.selected { border-color:var(--violet); background:rgba(155,77,255,0.12); box-shadow:0 0 12px rgba(155,77,255,0.2); }
.uf-role-btn.selected div { color:var(--white); }
.user-mgmt-row {
  display:flex; align-items:center; gap:12px;
  padding:12px 16px; border-bottom:1px solid var(--border); transition:background .15s;
}
.user-mgmt-row:hover { background:rgba(255,255,255,0.02); }
.user-mgmt-row:last-child { border-bottom:none; }
.umr-avatar { width:36px; height:36px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; color:white; }
.umr-info { flex:1; min-width:0; }
.umr-name  { font-size:13px; font-weight:600; color:var(--white); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.umr-sub   { font-size:10px; color:var(--muted); font-family:var(--mono); margin-top:1px; }
.umr-actions { display:flex; gap:6px; flex-shrink:0; align-items:center; }

/* ── ADMIN DASHBOARD TILES ───────────────────────────────── */
.adm-stat-tile {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  transition: border-color .15s;
}
.adm-stat-tile:hover { border-color: var(--border2); }
.adm-tile-icon { font-size: 18px; margin-bottom: 4px; }
.adm-tile-val  { font-size: 22px; font-weight: 700; color: var(--white); font-family: var(--mono); line-height: 1; }
.adm-tile-label{ font-size: 10px; color: var(--muted); margin-top: 2px; }

.adm-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
}
.adm-section-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--white);
}
.adm-add-btn {
  width: 100%; padding: 10px; border: none;
  background: rgba(155,77,255,0.06); color: var(--muted);
  font-family: var(--sans); font-size: 12px; cursor: pointer;
  border-top: 1px solid var(--border); transition: all .15s;
}
.adm-add-btn:hover { background: rgba(155,77,255,0.12); color: var(--violet2); }

/* client control row */
.adm-client-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.adm-client-row:hover { background: rgba(255,255,255,0.02); }
.adm-client-row:last-of-type { border-bottom: none; }

.mcl-tabs { display:flex; border-bottom:1px solid var(--border); padding:0 16px; gap:2px; overflow-x:auto; }
.mcl-tab { padding:10px 14px; border:none; background:none; color:var(--muted); font-family:var(--sans); font-size:12px; font-weight:500; cursor:pointer; border-bottom:2px solid transparent; white-space:nowrap; transition:all .15s; }
.mcl-tab:hover { color:var(--violet2); }
.mcl-tab.active { color:var(--white); border-bottom-color:var(--violet); }
.mcl-view { display:none; }
.mcl-view.active { display:block; }

/* ── CLIENT CARD in admin panel ───────────────────────────── */
.client-admin-card {
  background:var(--card); border:1px solid var(--border);
  border-radius:14px; overflow:hidden; transition:border-color .2s;
}
.client-admin-card:hover { border-color:var(--border2); }
.cac-header {
  display:flex; align-items:center; gap:14px;
  padding:16px 20px; cursor:pointer;
  border-bottom:1px solid var(--border);
  background:rgba(255,255,255,0.02);
}
.cac-avatar {
  width:40px; height:40px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-size:14px; font-weight:700; color:white;
  background:linear-gradient(135deg,var(--violet),#5A32B4);
}
.cac-name { font-size:14px; font-weight:600; color:var(--white); }
.cac-sub  { font-size:11px; color:var(--muted); font-family:var(--mono); margin-top:2px; }
.cac-actions { margin-left:auto; display:flex; gap:8px; align-items:center; }
.cac-body { padding:16px 20px; display:grid; grid-template-columns:1fr 1fr 1fr; gap:16px; }
.cac-stat { }
.cac-stat-label { font-size:9px; letter-spacing:2px; text-transform:uppercase; color:var(--muted); font-family:var(--mono); margin-bottom:4px; }
.cac-stat-val { font-size:13px; font-weight:600; color:var(--white); }
.cac-progress-wrap { padding:12px 20px 16px; border-top:1px solid var(--border); }

/* impersonate banner */
.impersonate-bar {
  position:fixed; top:0; left:0; right:0; z-index:500;
  background:linear-gradient(135deg,#D97706,#F59E0B);
  padding:8px 20px; display:flex; align-items:center; gap:12px;
  font-size:12px; font-weight:600; color:#000;
  box-shadow:0 2px 12px rgba(0,0,0,0.4);
}
.impersonate-bar button {
  margin-left:auto; background:#000; color:#F59E0B;
  border:none; padding:5px 12px; border-radius:6px;
  font-size:11px; font-weight:700; cursor:pointer; font-family:var(--sans);
}

.emp-layout { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }

.emp-nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex; flex-wrap: wrap; align-items: center;
  padding: 0 16px; gap: 0;
}

/* ── PRACOWNIK / HANDLOWIEC: nagłówek w dwóch rzędach (góra: logo+user, dół: zakładki) ── */
#view-employee .emp-nav, #view-sales .emp-nav, #view-admin .emp-nav { flex-direction: column; align-items: stretch; padding: 0; }
#view-employee .emp-nav-top, #view-sales .emp-nav-top, #view-admin .emp-nav-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px;
}
#view-employee .emp-nav-logo, #view-sales .emp-nav-logo, #view-admin .emp-nav-logo { border-right: none; margin: 0; padding: 0; }
#view-employee .emp-nav-right, #view-sales .emp-nav-right, #view-admin .emp-nav-right { border-left: none; margin: 0; padding: 0; }
/* zakładki jako KARTY — zawijają się pod spód, gdy nie mieszczą się w rzędzie */
#view-employee .emp-tabs, #view-sales .emp-tabs, #view-admin .emp-tabs {
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; overflow: visible;
  gap: 10px; padding: 14px 18px;
}
#view-employee .emp-tab, #view-sales .emp-tab, #view-admin .emp-tab {
  padding: 11px 16px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); border-radius: 14px;
  background: rgba(26,22,64,0.42);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  color: var(--muted); white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  transition: transform .25s cubic-bezier(.2,1,.4,1), border-color .25s, color .25s, background .25s;
}
#view-employee .emp-tab:hover, #view-sales .emp-tab:hover, #view-admin .emp-tab:hover {
  transform: translateY(-3px); color: var(--violet2);
  border-color: var(--border2); background: rgba(155,77,255,0.08);
}
#view-employee .emp-tab.active, #view-sales .emp-tab.active, #view-admin .emp-tab.active {
  color: white; border-color: transparent;
  background: linear-gradient(135deg, var(--violet), #5A32B4);
  box-shadow: 0 8px 22px rgba(155,77,255,0.4);
}
#view-employee .emp-tab .cn-badge, #view-sales .emp-tab .cn-badge, #view-admin .emp-tab .cn-badge { background: rgba(255,255,255,0.18); color: #fff; }

/* ── TELEFON: zakładki po 3 w rzędzie, z możliwością zwijania ── */
@media (max-width: 640px) {
  #view-employee .emp-tabs, #view-sales .emp-tabs, #view-admin .emp-tabs {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 8px; padding: 12px 14px;
  }
  #view-employee .emp-tab, #view-sales .emp-tab, #view-admin .emp-tab {
    padding: 10px 6px; font-size: 11.5px; box-shadow: none;
    justify-content: center; text-align: center;
    display: flex; align-items: center; gap: 4px;
  }
  /* zwinięty pasek — chowamy zakładki */
  #view-employee .emp-tabs.collapsed, #view-sales .emp-tabs.collapsed, #view-admin .emp-tabs.collapsed {
    display: none;
  }
  /* przycisk rozwiń/zwiń */
  .tabs-toggle { display: flex; }
}
.tabs-toggle { display: none; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px; border: none; border-top: 1px solid var(--border);
  background: rgba(155,77,255,0.1); color: var(--violet2); font-family: var(--sans);
  font-size: 13px; font-weight: 700; cursor: pointer; transition: background .2s; }
/* gdy menu jest zwinięte — przycisk „Pokaż menu" widoczny zawsze (też na desktopie) */
.emp-tabs.collapsed + .tabs-toggle { display: flex; }
.tabs-toggle:active { background: rgba(155,77,255,0.2); }
.tabs-toggle .tt-arrow { transition: transform .25s; font-size: 11px; }
.tabs-toggle.open .tt-arrow { transform: rotate(180deg); }
.tabs-toggle .tt-icon { font-size: 15px; }

/* ── PASEK SZYBKIEJ REGULACJI PROJEKTÓW (pod menu, nad treścią) ── */
.emp-quickbar {
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(26,22,64,0.5), rgba(12,11,26,0.4));
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
}
.emp-quickbar:empty { display: none; }
.qb-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.qb-title { font-size: 13px; font-weight: 700; color: var(--white); }
.qb-hint { font-size: 11px; color: var(--muted); }
.qb-track { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.qb-track::-webkit-scrollbar { display: none; }
.qb-card {
  flex: 0 0 300px; min-width: 280px;
  background: rgba(26,22,64,0.5);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .25s;
}
.qb-card:hover { border-color: var(--border2); }
.qb-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qb-name { font-size: 13.5px; font-weight: 700; color: var(--white); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qb-name:hover { color: var(--violet2); }
.qb-dl { font-size: 10.5px; font-family: var(--mono); color: var(--violet2); background: rgba(155,77,255,0.12); padding: 3px 8px; border-radius: 8px; white-space: nowrap; flex-shrink: 0; }
.qb-dl.urgent { color: #F87171; background: rgba(248,113,113,0.14); }
.qb-client { font-size: 11px; color: var(--muted); }
.qb-prog { display: flex; align-items: center; gap: 10px; }
.qb-prog-bar { flex: 1; height: 7px; border-radius: 5px; background: rgba(155,77,255,0.14); overflow: hidden; }
.qb-prog-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg,var(--violet),var(--violet3)); box-shadow: 0 0 10px rgba(155,77,255,0.5); transition: width .3s cubic-bezier(.2,1,.4,1); }
.qb-pct { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--violet2); min-width: 38px; text-align: right; }
.qb-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 5px; background: rgba(155,77,255,0.2); outline: none; cursor: pointer; margin-top: 2px; }
.qb-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--violet)); box-shadow: 0 0 0 3px rgba(155,77,255,0.25), 0 2px 8px rgba(0,0,0,0.4); cursor: grab; transition: transform .2s; }
.qb-slider::-webkit-slider-thumb:active { transform: scale(1.2); cursor: grabbing; }
.qb-slider::-moz-range-thumb { width: 18px; height: 18px; border: none; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--violet)); box-shadow: 0 0 0 3px rgba(155,77,255,0.25); cursor: grab; }
@media (max-width: 600px) {
  .emp-quickbar { padding: 12px 14px; }
  .qb-card { flex: 0 0 82%; min-width: 82%; }
}
.emp-nav-logo {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 8px 12px 0;
  margin-right: 8px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}
.emp-nav-sep { color: var(--border2); margin: 0 4px; }

.emp-tabs {
  display: flex; flex: 1; overflow-x: auto; gap: 0;
  scrollbar-width: none;
}
.emp-tabs::-webkit-scrollbar { display: none; }

.emp-tab {
  display: flex; align-items: center; gap: 5px;
  padding: 12px 14px; border: none; background: none;
  color: var(--muted); font-family: var(--sans); font-size: 12px;
  font-weight: 500; cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all .15s;
}
.emp-tab:hover { color: var(--violet2); background: rgba(155,77,255,0.05); }
.emp-tab.active { color: var(--white); border-bottom-color: var(--violet); }

.emp-stat-bar {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px; margin: 6px 8px 6px 0;
  flex-shrink: 0;
}
.esb-item { display: flex; align-items: center; gap: 6px; padding: 5px 12px; }
.esb-icon { font-size: 12px; }
.esb-val { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--white); line-height: 1; }
.esb-label { font-size: 8px; color: var(--muted); margin-top: 1px; }
.esb-sep { width: 1px; height: 22px; background: var(--border); flex-shrink: 0; }

.emp-nav-right {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0 8px 8px;
  border-left: 1px solid var(--border);
  margin-left: 4px; flex-shrink: 0;
}

.emp-main {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.emp-content-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(12,11,26,0.95);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 10;
}

.btn-sm {
  padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: none; font-family: var(--sans);
  transition: all .2s;
}
.btn-primary { background: var(--violet); color: white; }
.btn-primary:hover { background: #8B3DFF; }
.btn-outline { background: none; border: 1px solid var(--border2); color: var(--violet2); }
.btn-outline:hover { background: rgba(155,77,255,0.1); }

.content-area {
  min-height: min-content;
}
.content-area.hidden { display: none; }

/* ═══════════════════════════════════════════════════════════
   PANEL PRACOWNIKA — premium SaaS redesign (impulsdev)
═══════════════════════════════════════════════════════════════ */
.ep-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(26,22,64,0.6), rgba(12,11,26,0.85));
}
.ep-title { font-size: 22px; font-weight: 700; color: var(--white); letter-spacing: -.5px; }
.ep-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ep-wrap { padding: 24px 28px; display: flex; flex-direction: column; gap: 20px; }

/* glass surface */
.ep-glass {
  background: rgba(26,22,64,0.42);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border);
  border-radius: 18px; padding: 20px 22px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.3);
}
.ep-card-head { font-size: 13px; font-weight: 700; color: var(--white); margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }

/* ── DASHBOARD: statystyki ── */
.ep-stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.ep-stat {
  background: rgba(26,22,64,0.42);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border); border-radius: 18px; padding: 20px;
  position: relative; overflow: hidden;
  transition: transform .3s cubic-bezier(.2,1,.4,1), border-color .3s;
}
.ep-stat:hover { transform: translateY(-4px); border-color: var(--border2); }
.ep-stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; box-shadow: 0 6px 18px rgba(155,77,255,0.25); }
.ep-stat-val { font-size: 32px; font-weight: 800; color: var(--white); line-height: 1; font-family: var(--sans); }
.ep-stat-label { font-size: 12px; color: var(--muted); margin-top: 6px; }

.ep-dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ── DASHBOARD: dwie sekcje projektów obok siebie ── */
.ep-dash-projects { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.ep-dash-section { display: flex; flex-direction: column; gap: 14px; }
.ep-dash-section-head { font-size: 14px; font-weight: 700; color: var(--white); display: flex; align-items: center; gap: 8px; }
.ep-dash-pill { font-family: var(--mono); font-size: 11px; color: var(--violet2); background: rgba(155,77,255,0.14); padding: 2px 9px; border-radius: 20px; }
.ep-dash-list { display: flex; flex-direction: column; gap: 14px; }
.ep-dash-list .ep-card { min-width: 0; }
@media (max-width: 900px) {
  .ep-dash-projects { grid-template-columns: 1fr; }
}

/* średnia realizacja — pierścień */
.ep-avg { display: flex; align-items: center; gap: 22px; }
.ep-avg-ring {
  width: 110px; height: 110px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--violet) calc(var(--p)*1%), rgba(155,77,255,0.12) 0);
  display: flex; align-items: center; justify-content: center; position: relative;
  box-shadow: 0 0 30px rgba(155,77,255,0.2);
}
.ep-avg-ring::before { content:''; position: absolute; inset: 10px; border-radius: 50%; background: #140F32; }
.ep-avg-num { position: relative; font-size: 28px; font-weight: 800; color: var(--white); }
.ep-avg-num span { font-size: 14px; color: var(--violet2); }
.ep-avg-meta { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.ep-avg-meta b { color: var(--violet2); }
.ep-avg-bar { height: 6px; border-radius: 4px; background: rgba(155,77,255,0.14); overflow: hidden; margin-top: 6px; }
.ep-avg-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg,var(--violet),var(--violet3)); transition: width 1s cubic-bezier(.2,1,.4,1); }

/* nadchodzące terminy */
.ep-deadlines { display: flex; flex-direction: column; gap: 10px; }
.ep-deadline { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(155,77,255,0.05); border: 1px solid transparent; cursor: pointer; transition: all .2s; }
.ep-deadline:hover { background: rgba(155,77,255,0.12); border-color: var(--border2); transform: translateX(3px); }
.ep-deadline-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ep-deadline-info { flex: 1; min-width: 0; }
.ep-deadline-name { font-size: 12.5px; color: var(--white); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-deadline-date { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.ep-deadline-badge { font-size: 11px; font-family: var(--mono); padding: 4px 8px; border-radius: 8px; background: rgba(155,77,255,0.14); color: var(--violet2); }
.ep-deadline-badge.urgent { background: rgba(248,113,113,0.16); color: #F87171; }

/* aktywności */
.ep-activities { display: flex; flex-direction: column; gap: 4px; }
.ep-activity { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(155,77,255,0.08); }
.ep-activity:last-child { border-bottom: none; }
.ep-activity-icon { width: 32px; height: 32px; border-radius: 10px; background: rgba(155,77,255,0.12); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.ep-activity-text { font-size: 12.5px; color: var(--text); }
.ep-activity-proj { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── TOOLBAR: szukaj / filtry / sort / widok ── */
.ep-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px 28px 0; }
.ep-search { display: flex; align-items: center; gap: 8px; background: rgba(26,22,64,0.5); border: 1px solid var(--border); border-radius: 12px; padding: 9px 14px; flex: 1; min-width: 200px; }
.ep-search span { color: var(--muted); font-size: 13px; }
.ep-search input { background: none; border: none; outline: none; color: var(--text); font-family: var(--sans); font-size: 13px; width: 100%; }
.ep-search input::placeholder { color: var(--muted); }
.ep-select { background: rgba(26,22,64,0.5); border: 1px solid var(--border); border-radius: 12px; padding: 9px 14px; color: var(--text); font-family: var(--sans); font-size: 12.5px; cursor: pointer; outline: none; }
.ep-select:hover { border-color: var(--border2); }
.ep-viewtoggle { display: flex; gap: 4px; background: rgba(26,22,64,0.5); border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.ep-viewtoggle button { background: none; border: none; color: var(--muted); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 15px; transition: all .2s; }
.ep-viewtoggle button.active { background: var(--violet); color: white; }

/* ── KARTY PROJEKTÓW ── */
.ep-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 18px; }
.ep-card {
  background: rgba(26,22,64,0.42);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border); border-radius: 18px; padding: 20px;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .3s cubic-bezier(.2,1,.4,1), border-color .3s, box-shadow .3s;
  display: flex; flex-direction: column; gap: 12px;
}
.ep-card::before { content:''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--violet), var(--violet3)); opacity: 0; transition: opacity .3s; }
.ep-card:hover { transform: translateY(-5px); border-color: var(--border2); box-shadow: 0 18px 44px rgba(155,77,255,0.18); }
.ep-card:hover::before { opacity: 1; }
.ep-card-top { display: flex; justify-content: space-between; align-items: center; }
.ep-prio { font-size: 10.5px; font-weight: 700; padding: 4px 9px; border-radius: 20px; }
.ep-card-name { font-size: 16px; font-weight: 700; color: var(--white); line-height: 1.3; }
.ep-card-client { font-size: 12px; color: var(--violet2); }
.ep-card-desc { font-size: 12px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ep-tag { font-size: 10.5px; font-family: var(--mono); padding: 4px 9px; border-radius: 7px; background: rgba(155,77,255,0.1); color: var(--violet2); border: 1px solid rgba(155,77,255,0.16); }
.ep-tag.skill { background: rgba(96,165,250,0.1); color: #60A5FA; border-color: rgba(96,165,250,0.2); }
.ep-prog { margin-top: 2px; }
.ep-prog-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.ep-prog-num { font-family: var(--mono); color: var(--violet2); font-weight: 700; }
.ep-prog-bar { height: 7px; border-radius: 5px; background: rgba(155,77,255,0.12); overflow: hidden; }
.ep-prog-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg,var(--violet),var(--violet3)); box-shadow: 0 0 12px rgba(155,77,255,0.5); transition: width .8s cubic-bezier(.2,1,.4,1); }
.ep-card-foot { display: flex; justify-content: space-between; align-items: center; }
.ep-foot-dl { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.ep-meta-mini { font-size: 11px; color: var(--muted); }
.ep-team { display: flex; }
.ep-av { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: white; margin-left: -7px; border: 2px solid #140F32; }
.ep-av:first-child { margin-left: 0; }
.ep-req { text-align: center; font-size: 12px; font-weight: 600; padding: 9px; border-radius: 10px; margin-top: 2px; }
.rq-none { background: rgba(155,77,255,0.12); color: var(--violet2); }
.rq-pending { background: rgba(251,191,36,0.14); color: #FBBF24; }
.rq-accepted { background: rgba(74,222,128,0.14); color: #4ADE80; }
.rq-rejected { background: rgba(248,113,113,0.14); color: #F87171; }

.ep-table tbody tr:hover { background: rgba(155,77,255,0.06); }
.ep-empty { text-align: center; color: var(--muted); padding: 50px; font-size: 13px; }

/* ═══ JEDEN EKRAN ROBOCZY (uproszczony panel pracownika) ═══ */
.ew-kpis { padding: 22px 28px 0; }
.ew-deadlines {
  background: linear-gradient(135deg, rgba(248,113,113,0.08), rgba(155,77,255,0.04));
  border: 1px solid rgba(248,113,113,0.25); border-radius: 16px; padding: 16px 18px;
}
.ew-deadlines.ok {
  background: rgba(74,222,128,0.06); border-color: rgba(74,222,128,0.22);
  color: var(--muted); font-size: 13px; text-align: center; padding: 16px;
}
.ewd-head { font-size: 13px; font-weight: 700; color: var(--white); display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.ewd-pill { font-family: var(--mono); font-size: 11px; color: #F87171; background: rgba(248,113,113,0.16); padding: 2px 9px; border-radius: 20px; }
.ewd-hint { font-size: 11px; color: var(--muted); font-weight: 400; }
.ewd-list { display: flex; flex-direction: column; gap: 8px; }
.ewd-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: rgba(12,11,26,0.4); border: 1px solid transparent; cursor: pointer; transition: all .2s; }
.ewd-item:hover { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.3); transform: translateX(3px); }
.ewd-dot { width: 9px; height: 9px; border-radius: 50%; background: #F87171; flex-shrink: 0; box-shadow: 0 0 8px rgba(248,113,113,0.6); }
.ewd-info { flex: 1; min-width: 0; }
.ewd-name { font-size: 13px; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ewd-date { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.ewd-badge { font-size: 11.5px; font-family: var(--mono); font-weight: 700; color: #F87171; background: rgba(248,113,113,0.16); padding: 5px 11px; border-radius: 9px; white-space: nowrap; flex-shrink: 0; }

/* toolbar: zakres (pill switch) + filtry */
.ew-toolbar { padding: 20px 28px 0; display: flex; flex-direction: column; gap: 14px; }
.ew-scope { display: inline-flex; gap: 6px; background: rgba(26,22,64,0.5); border: 1px solid var(--border); border-radius: 14px; padding: 5px; flex-wrap: wrap; }
.ew-scope-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: none; background: none; color: var(--muted);
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: 10px; cursor: pointer; transition: all .2s;
}
.ew-scope-btn span { font-family: var(--mono); font-size: 11px; background: rgba(155,77,255,0.14); color: var(--violet2); padding: 1px 8px; border-radius: 10px; }
.ew-scope-btn:hover { color: var(--violet2); }
.ew-scope-btn.active { background: linear-gradient(135deg, var(--violet), #5A32B4); color: #fff; box-shadow: 0 6px 16px rgba(155,77,255,0.35); }
.ew-scope-btn.active span { background: rgba(255,255,255,0.2); color: #fff; }
.ew-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ew-wrap { padding: 20px 28px 32px; }

/* karta: suwak postępu wprost na karcie */
.ep-card.is-mine, .ep-card.is-open { cursor: default; }
.ep-inline-prog { margin-top: 2px; }
.ep-inline-prog .ep-prog-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.ep-card-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 5px; background: rgba(155,77,255,0.2); outline: none; cursor: pointer; margin-top: 10px; }
.ep-card-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--violet)); box-shadow: 0 0 0 4px rgba(155,77,255,0.22), 0 2px 8px rgba(0,0,0,0.4); cursor: grab; transition: transform .2s; }
.ep-card-slider::-webkit-slider-thumb:active { transform: scale(1.2); cursor: grabbing; }
.ep-card-slider::-moz-range-thumb { width: 20px; height: 20px; border: none; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--violet)); box-shadow: 0 0 0 4px rgba(155,77,255,0.22); cursor: grab; }
.ep-details-btn { width: 100%; margin-top: 12px; padding: 9px; border: 1px solid var(--border2); border-radius: 10px; background: rgba(155,77,255,0.06); color: var(--violet2); font-family: var(--sans); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .2s; }
.ep-details-btn:hover { background: rgba(155,77,255,0.14); }
.ep-req-btn { width: 100%; margin-top: 4px; padding: 11px; border: none; border-radius: 11px; font-family: var(--sans); font-size: 13px; font-weight: 700; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.ep-req-btn.rq-none { background: linear-gradient(135deg, var(--violet), #5A32B4); color: #fff; box-shadow: 0 6px 18px rgba(155,77,255,0.32); }
.ep-req-btn.rq-none:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(155,77,255,0.45); }
.ep-req-btn.disabled { cursor: not-allowed; }
.ep-req-btn.rq-pending { background: rgba(251,191,36,0.14); color: #FBBF24; }
.ep-req-btn.rq-accepted { background: rgba(74,222,128,0.14); color: #4ADE80; }
.ep-foot-dl.urgent { color: #F87171; }

@media (max-width: 900px) { .ew-kpis { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .ew-kpis { padding: 16px 16px 0; }
  .ew-toolbar { padding: 16px 16px 0; }
  .ew-wrap { padding: 16px; }
  .ew-scope { width: 100%; }
  .ew-scope-btn { flex: 1; justify-content: center; padding: 9px 8px; font-size: 12px; }
}

/* ── KALENDARZ ── */
.cal-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; align-items: start; }
.cal-main { padding: 18px 20px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-title { font-size: 16px; font-weight: 700; color: var(--white); }
.cal-nav { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: rgba(155,77,255,0.06); color: var(--violet2); font-size: 18px; cursor: pointer; transition: all .2s; }
.cal-nav:hover { background: rgba(155,77,255,0.15); border-color: var(--border2); }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; }
.cal-dow { margin-bottom: 6px; }
.cal-dow-cell { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--muted); font-family: var(--mono); padding: 4px 0; }
.cal-cell { aspect-ratio: 1; border-radius: 10px; border: 1px solid transparent; padding: 6px; display: flex; flex-direction: column; gap: 3px; position: relative; transition: all .2s; }
.cal-cell.empty { background: none; }
.cal-cell:not(.empty) { background: rgba(155,77,255,0.04); }
.cal-cell.has-ev { cursor: pointer; border-color: var(--border); }
.cal-cell.has-ev:hover { background: rgba(155,77,255,0.12); border-color: var(--border2); transform: translateY(-2px); }
.cal-cell.today { border-color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet); }
.cal-cell.today .cal-num { color: var(--violet2); font-weight: 800; }
.cal-num { font-size: 12px; color: var(--text); font-family: var(--mono); }
.cal-dots { display: flex; gap: 3px; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.cal-ev-label { font-size: 9px; color: var(--violet2); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-side { padding: 18px 20px; }
.cal-up { display: flex; flex-direction: column; gap: 10px; }
.cal-up-item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(155,77,255,0.05); border: 1px solid transparent; cursor: pointer; transition: all .2s; }
.cal-up-item:hover { background: rgba(155,77,255,0.12); border-color: var(--border2); transform: translateX(3px); }
.cal-up-date { width: 46px; height: 46px; border-radius: 12px; background: rgba(155,77,255,0.12); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.cal-up-date.urgent { background: rgba(248,113,113,0.16); }
.cal-up-date b { font-size: 18px; font-weight: 800; color: var(--white); line-height: 1; }
.cal-up-date span { font-size: 9px; color: var(--violet2); font-family: var(--mono); text-transform: uppercase; }
.cal-up-date.urgent b, .cal-up-date.urgent span { color: #F87171; }
.cal-up-name { font-size: 13px; font-weight: 600; color: var(--white); }
.cal-up-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
@media (max-width: 900px) { .cal-layout { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .cal-cell { padding: 4px; } .cal-ev-label { display: none; } }
/* admin: dodawanie wydarzeń */
.cal-cell.admin-cell { cursor: pointer; }
.cal-cell.admin-cell:hover { background: rgba(155,77,255,0.12); border-color: var(--border2); }
.cal-add-hint { position: absolute; top: 4px; right: 6px; font-size: 13px; color: var(--violet2); opacity: 0; transition: opacity .2s; }
.cal-cell.admin-cell:hover .cal-add-hint { opacity: 1; }
.cal-up-item.adm-ev { position: relative; padding-right: 34px; cursor: default; }
.adm-ev-del { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 7px; border: none; background: rgba(248,113,113,0.12); color: #F87171; cursor: pointer; font-size: 11px; transition: background .2s; }
.adm-ev-del:hover { background: rgba(248,113,113,0.25); }

/* ═══════════════════════════════════════════════════════════
   PANEL HANDLOWCA (CRM) — style
═══════════════════════════════════════════════════════════════ */
.sal-kpis { display: grid; grid-template-columns: repeat(6,1fr); gap: 14px; padding: 22px 28px 0; }
.sal-followbar { margin: 18px 28px 0; }
.sal-follow-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sal-follow-chip { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 3px; padding: 11px 14px; border-radius: 12px; background: rgba(155,77,255,0.06); border: 1px solid var(--border); cursor: pointer; transition: all .2s; }
.sal-follow-chip:hover { background: rgba(155,77,255,0.12); border-color: var(--border2); transform: translateY(-2px); }
.sal-follow-chip.urgent { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.3); }
.sal-follow-when { font-size: 10.5px; font-family: var(--mono); font-weight: 700; color: var(--violet2); }
.sal-follow-chip.urgent .sal-follow-when { color: #F87171; }
.sal-follow-co { font-size: 13.5px; font-weight: 700; color: var(--white); }
.sal-follow-meta { font-size: 11px; color: var(--muted); }
.sal-dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 20px 28px 32px; }
.sal-funnel-row { display: flex; align-items: center; gap: 10px; }
.sal-funnel-lab { font-size: 11.5px; color: var(--muted); width: 90px; flex-shrink: 0; }
.sal-funnel-bar { flex: 1; height: 18px; border-radius: 6px; background: rgba(155,77,255,0.08); overflow: hidden; }
.sal-funnel-fill { height: 100%; border-radius: 6px; transition: width .8s cubic-bezier(.2,1,.4,1); min-width: 4px; }
.sal-funnel-num { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--white); width: 24px; text-align: right; }

/* leady toolbar reuses ew-toolbar/ep-* */
#view-sales .ew-toolbar { padding: 20px 28px 0; }
#view-sales .ew-wrap { padding: 20px 28px 32px; }

/* kanban */
.sal-kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.sal-kanban::-webkit-scrollbar { height: 8px; }
.sal-kanban::-webkit-scrollbar-thumb { background: rgba(155,77,255,0.3); border-radius: 8px; }
.sal-kcol { flex: 0 0 260px; min-width: 260px; }
.sal-kcol-head { font-size: 12.5px; font-weight: 700; color: var(--white); padding: 10px 12px; border-bottom: 2px solid; border-radius: 10px 10px 0 0; background: rgba(26,22,64,0.5); display: flex; align-items: center; gap: 6px; }
.sal-kcount { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); background: rgba(155,77,255,0.14); padding: 1px 8px; border-radius: 10px; }
.sal-kcol-body { display: flex; flex-direction: column; gap: 10px; padding: 12px 8px; background: rgba(12,11,26,0.3); border-radius: 0 0 12px 12px; min-height: 80px; }
.sal-kempty { text-align: center; color: var(--muted); font-size: 12px; padding: 16px 0; }
.sal-lcard { background: rgba(26,22,64,0.55); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; display: flex; flex-direction: column; gap: 7px; }
.sal-lcard:hover { transform: translateY(-3px); border-color: var(--border2); box-shadow: 0 10px 24px rgba(155,77,255,0.18); }
.sal-lcard-top { display: flex; justify-content: space-between; align-items: center; }
.sal-lcard-co { font-size: 13.5px; font-weight: 700; color: var(--white); }
.sal-int { font-size: 14px; }
.sal-lcard-person { font-size: 11.5px; color: var(--violet2); }
.sal-lcard-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.sal-lcard-foot { display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; color: var(--muted); font-family: var(--mono); margin-top: 2px; }
.urgent-txt { color: #F87171 !important; }
.sal-lcard-move { display: flex; justify-content: space-between; gap: 6px; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--border); }
.sal-move-btn { flex: 1; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: rgba(155,77,255,0.06); color: var(--muted); font-family: var(--sans); font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: all .18s; }
.sal-move-btn:hover { color: var(--violet2); border-color: var(--border2); background: rgba(155,77,255,0.14); }
.sal-move-btn.next { background: linear-gradient(135deg, rgba(155,77,255,0.18), rgba(155,77,255,0.08)); color: var(--violet2); border-color: var(--border2); }
.sal-move-btn.next:hover { background: linear-gradient(135deg, var(--violet), #5A32B4); color: #fff; border-color: transparent; }

/* lead detail: status switcher */
.sal-status-row { display: flex; flex-wrap: wrap; gap: 7px; }
.sal-status-btn { padding: 7px 12px; border-radius: 9px; border: 1px solid var(--border); background: rgba(155,77,255,0.04); color: var(--muted); font-family: var(--sans); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .2s; }
.sal-status-btn:hover { border-color: var(--border2); color: var(--violet2); }
.sal-status-btn.active { color: #fff; border-color: transparent; }
.sal-int-badge { font-size: 11px; font-weight: 700; color: var(--violet2); background: rgba(155,77,255,0.12); padding: 3px 9px; border-radius: 8px; }
.sal-addnote { display: flex; gap: 8px; margin-top: 10px; }
.sal-addnote input { flex: 1; background: rgba(12,11,26,0.5); border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px; color: var(--text); font-family: var(--sans); font-size: 12.5px; outline: none; }
.sal-addnote input:focus { border-color: var(--border2); }

/* wywiad */
.iv-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.iv-field { display: flex; flex-direction: column; gap: 5px; }
.iv-field label { font-size: 11px; color: var(--muted); font-weight: 600; }
.iv-field input { background: rgba(12,11,26,0.5); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; color: var(--text); font-family: var(--sans); font-size: 12.5px; outline: none; }
.iv-field input:focus { border-color: var(--border2); }
.iv-summary { display: flex; flex-direction: column; gap: 6px; }
.iv-sum-row { display: flex; justify-content: space-between; gap: 14px; font-size: 12.5px; padding: 7px 12px; background: rgba(155,77,255,0.05); border-radius: 9px; }
.iv-sum-row span { color: var(--muted); flex-shrink: 0; }
.iv-sum-row b { color: var(--white); text-align: right; }

/* analiza */
.sal-analysis { background: linear-gradient(135deg, rgba(155,77,255,0.1), rgba(155,77,255,0.03)); border: 1px solid var(--border2); border-radius: 14px; padding: 16px; }
.sal-an-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 14px; }
.sal-an-cell { background: rgba(12,11,26,0.4); border-radius: 10px; padding: 11px; display: flex; flex-direction: column; gap: 4px; }
.sal-an-cell span { font-size: 10px; color: var(--muted); }
.sal-an-cell b { font-size: 14px; color: var(--white); }
.sal-an-stack { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.sal-an-summary { background: rgba(12,11,26,0.4); border-radius: 10px; padding: 12px 14px; }
.sal-an-sum-lab { font-size: 11.5px; font-weight: 700; color: var(--violet2); margin-bottom: 6px; }

/* wsparcie sprzedaży */
.sal-support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sal-acc { display: flex; flex-direction: column; gap: 8px; }
.sal-acc-item { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; background: rgba(12,11,26,0.3); }
.sal-acc-q { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--white); }
.sal-acc-arr { color: var(--violet2); transition: transform .25s; }
.sal-acc-item.open .sal-acc-arr { transform: rotate(180deg); }
.sal-acc-a { max-height: 0; overflow: hidden; transition: max-height .3s, padding .3s; padding: 0 14px; font-size: 12.5px; color: var(--text); line-height: 1.6; }
.sal-acc-item.open .sal-acc-a { max-height: 300px; padding: 0 14px 14px; }
.sal-list { display: flex; flex-direction: column; gap: 10px; }
.sal-snippet { position: relative; background: rgba(12,11,26,0.4); border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px; padding-right: 78px; }
.sal-snip-t { font-size: 12px; font-weight: 700; color: var(--violet2); margin-bottom: 5px; }
.sal-snip-s { font-size: 12.5px; color: var(--text); line-height: 1.55; }
.sal-copy { position: absolute; top: 12px; right: 12px; padding: 5px 11px; border-radius: 8px; border: 1px solid var(--border2); background: rgba(155,77,255,0.08); color: var(--violet2); font-size: 11px; font-weight: 600; cursor: pointer; transition: background .2s; }
.sal-copy:hover { background: rgba(155,77,255,0.18); }
.sal-tech { background: rgba(12,11,26,0.4); border-radius: 11px; padding: 11px 14px; display: flex; flex-direction: column; gap: 3px; }
.sal-tech b { font-size: 12.5px; color: var(--white); }
.sal-tech span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.sal-tpl-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.sal-tpl-tab { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border); background: rgba(155,77,255,0.05); color: var(--muted); font-family: var(--sans); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .2s; }
.sal-tpl-tab.active { background: var(--violet); color: #fff; border-color: transparent; }

/* asystent AI */
.sal-ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.sal-ai-out { display: flex; flex-direction: column; gap: 14px; }
.sal-ai-block { background: rgba(12,11,26,0.4); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.sal-ai-h { font-size: 12.5px; font-weight: 700; color: var(--violet2); margin-bottom: 8px; }
.sal-ai-block ul { margin: 0; padding-left: 18px; }
.sal-ai-block li { font-size: 12.5px; color: var(--text); line-height: 1.6; margin-bottom: 5px; }
.sal-ai-offer { font-size: 15px; font-weight: 700; color: #4ADE80; }
.sal-ai-note { font-size: 11px; color: var(--muted); padding: 10px 12px; background: rgba(251,191,36,0.07); border-radius: 10px; }
.sal-ai-loading { font-size: 13px; color: var(--violet2); padding: 18px; text-align: center; }

/* ═══ POZYSKIWANIE KLIENTÓW (prospecting) ═══ */
.prospect-note { font-size: 12px; color: var(--violet2); background: rgba(155,77,255,0.08); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.prospect-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); gap: 16px; }
.prospect-card { background: rgba(26,22,64,0.5); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.prospect-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.prospect-co { font-size: 15px; font-weight: 700; color: var(--white); }
.prospect-place { font-size: 11px; color: var(--muted); margin-top: 2px; }
.prospect-badge { font-size: 10.5px; font-weight: 700; padding: 4px 9px; border-radius: 8px; white-space: nowrap; flex-shrink: 0; }
.prospect-contacts { display: flex; flex-direction: column; gap: 5px; }
.prospect-contact { font-size: 12.5px; color: var(--violet2); text-decoration: none; font-family: var(--mono); }
.prospect-contact:hover { text-decoration: underline; }
.prospect-note-txt { font-size: 12px; color: var(--text); background: rgba(12,11,26,0.4); border-radius: 9px; padding: 8px 11px; line-height: 1.45; }
.prospect-next { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.prospect-maplink { color: var(--violet2); text-decoration: none; border-bottom: 1px dashed var(--border2); }
.prospect-maplink:hover { color: var(--violet3); }
.prospect-meeting { display: flex; gap: 9px; align-items: flex-start; background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); border-radius: 11px; padding: 9px 12px; }
.pm-meet-i { font-size: 15px; }
.pm-meet-t { font-size: 12.5px; font-weight: 600; color: #6EE7B7; }
.pm-meet-place { font-size: 11px; color: var(--muted); margin-top: 2px; }
/* baner spotkań */
.meet-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(16,185,129,0.14), rgba(16,185,129,0.04));
  border: 1px solid rgba(16,185,129,0.3); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.meet-banner-main { display: flex; align-items: center; gap: 12px; }
.meet-banner-i { font-size: 22px; }
.meet-banner-lbl { font-size: 11px; color: #6EE7B7; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.meet-banner-co { font-size: 15px; font-weight: 700; color: var(--white); margin-top: 1px; }
.meet-banner-addr { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.meet-banner-addr a { color: var(--violet2); text-decoration: none; border-bottom: 1px dashed var(--border2); }
.meet-banner-btn { background: rgba(16,185,129,0.18); border: 1px solid rgba(16,185,129,0.4); color: #6EE7B7;
  border-radius: 10px; padding: 9px 14px; font-family: var(--sans); font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .18s; }
.meet-banner-btn:hover { background: rgba(16,185,129,0.3); }
/* lista spotkań w modalu */
.meet-item { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.meet-item:last-child { border-bottom: none; }
.meet-item-date { flex-shrink: 0; text-align: center; min-width: 78px; background: rgba(16,185,129,0.1); border-radius: 11px; padding: 10px 8px; }
.meet-item-d { font-size: 12px; font-weight: 700; color: #6EE7B7; font-family: var(--mono); }
.meet-item-rel { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.meet-item-co { font-size: 14px; font-weight: 700; color: var(--white); }
.meet-item-addr { font-size: 12px; color: var(--muted); margin-top: 3px; }
.meet-item-addr a { color: var(--violet2); text-decoration: none; border-bottom: 1px dashed var(--border2); }
.meet-item-contacts { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 5px; }
.meet-item-contacts a { font-size: 11.5px; color: var(--violet2); text-decoration: none; font-family: var(--mono); }
.meet-form-co { font-size: 15px; font-weight: 700; color: var(--white); margin-bottom: 14px; padding: 10px 14px; background: rgba(155,77,255,0.08); border-radius: 11px; border: 1px solid var(--border); }
.btn-danger-outline { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.35); color: #F87171; }
.btn-danger-outline:hover { background: rgba(248,113,113,0.18); }
/* plan dnia */
.dp-list { display: flex; flex-direction: column; gap: 10px; }
.dp-item { display: flex; align-items: center; gap: 12px; background: rgba(26,22,64,0.5); border: 1px solid var(--border); border-left: 3px solid var(--violet); border-radius: 11px; padding: 11px 13px; }
.dp-item-time { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--violet2); min-width: 46px; }
.dp-item-main { flex: 1; }
.dp-item-title { font-size: 13.5px; font-weight: 600; color: var(--white); }
.dp-item-type { font-size: 11px; color: var(--muted); margin-top: 2px; }
.dp-del, .dp-open { background: rgba(155,77,255,0.08); border: 1px solid var(--border); border-radius: 8px; padding: 6px 9px; cursor: pointer; font-size: 13px; color: var(--violet2); }
.dp-del { color: #F87171; border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.08); }
.dp-del:hover { background: rgba(248,113,113,0.18); }
.dp-open:hover { background: rgba(155,77,255,0.18); }
.dp-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 10px; }
/* lokalizacja leada (miasto + adres) */
.lead-loc { display: flex; align-items: center; gap: 11px; background: rgba(96,165,250,0.08); border: 1px solid rgba(96,165,250,0.25); border-radius: 12px; padding: 11px 14px; margin-top: 4px; }
.lead-loc-i { font-size: 17px; }
.lead-loc-city { font-size: 13.5px; font-weight: 700; color: var(--white); }
.lead-loc-addr { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.lead-loc-map { margin-left: auto; font-size: 11.5px; font-weight: 600; color: #60A5FA; text-decoration: none; background: rgba(96,165,250,0.12); border: 1px solid rgba(96,165,250,0.3); border-radius: 8px; padding: 6px 10px; white-space: nowrap; }
.lead-loc-map:hover { background: rgba(96,165,250,0.22); }
.sal-lcard-loc { font-size: 11px; color: var(--info); margin-top: 4px; }
.prospect-status-row { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 0; border-top: 1px solid var(--border); }
.prospect-st-btn { width: 34px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: rgba(155,77,255,0.05); cursor: pointer; font-size: 14px; transition: all .15s; }
.prospect-st-btn:hover { border-color: var(--border2); transform: translateY(-2px); }
.prospect-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.prospect-del { margin-left: auto; padding: 6px 9px; border-radius: 8px; border: 1px solid rgba(248,113,113,0.3); background: rgba(248,113,113,0.08); color: #F87171; cursor: pointer; font-size: 12px; }
.prospect-del:hover { background: rgba(248,113,113,0.18); }
@media (max-width: 600px) { .prospect-grid { grid-template-columns: 1fr; } }
/* wyszukiwarka firm */
.prospect-search { background: linear-gradient(135deg, rgba(155,77,255,0.1), rgba(155,77,255,0.03)); border: 1px solid var(--border2); border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.prospect-search-head { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.prospect-demo-tag { font-size: 9px; font-weight: 700; letter-spacing: 1px; color: var(--violet2); background: rgba(155,77,255,0.18); padding: 3px 8px; border-radius: 6px; }
.prospect-search-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.prospect-search-row .ep-search { min-width: 160px; }
.prospect-res-head { font-size: 12px; color: var(--muted); margin: 16px 0 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prospect-addall { background: none; border: 1px solid var(--border2); color: var(--violet2); border-radius: 8px; padding: 4px 10px; font-size: 11px; font-weight: 600; cursor: pointer; }
.prospect-addall:hover { background: rgba(155,77,255,0.12); }
.prospect-res-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 12px; }
.prospect-res-card { background: rgba(12,11,26,0.5); border: 1px solid var(--border); border-radius: 13px; padding: 13px; display: flex; flex-direction: column; gap: 6px; transition: border-color .2s; }
.prospect-res-card.added { opacity: 0.6; border-color: rgba(74,222,128,0.4); }
.prospect-res-co { font-size: 13.5px; font-weight: 700; color: var(--white); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prospect-rating { font-size: 10.5px; color: #FBBF24; background: rgba(251,191,36,0.12); padding: 1px 6px; border-radius: 6px; }
.prospect-res-place { font-size: 11px; color: var(--muted); }
.prospect-res-contacts { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--violet2); font-family: var(--mono); }
.prospect-res-add { margin-top: 6px; padding: 7px; border-radius: 9px; border: 1px solid var(--border2); background: rgba(155,77,255,0.1); color: var(--violet2); font-family: var(--sans); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .18s; }
.prospect-res-add:hover:not(:disabled) { background: var(--violet); color: #fff; border-color: transparent; }
.prospect-res-add:disabled { color: #4ADE80; border-color: rgba(74,222,128,0.4); background: rgba(74,222,128,0.1); cursor: default; }
.prospect-section-lbl { font-size: 12px; font-weight: 700; color: var(--muted); margin: 6px 0 12px; text-transform: uppercase; letter-spacing: 1px; }
@media (max-width: 600px) { .prospect-res-grid { grid-template-columns: 1fr; } .prospect-search-row { flex-direction: column; align-items: stretch; } .prospect-search-row .ep-search, .prospect-search-row .btn-sm { width: 100%; } }


/* ═══ PANEL ADMINA — moduły enterprise ═══ */
.adm-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.adm-rep-list { display: flex; flex-direction: column; gap: 10px; }
.adm-rep { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: rgba(155,77,255,0.05); border-radius: 11px; }
.adm-rep-name { font-size: 13px; font-weight: 700; color: var(--white); }
.adm-rep-meta { font-size: 11px; color: var(--muted); }
.adm-rep-score { font-family: var(--mono); font-size: 16px; font-weight: 800; color: #4ADE80; }
.adm-src { display: flex; flex-direction: column; gap: 6px; }
.adm-src-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 7px 12px; background: rgba(12,11,26,0.4); border-radius: 9px; }
.adm-src-row b { font-family: var(--mono); color: var(--violet2); }
/* finanse */
.adm-bars { display: flex; align-items: flex-end; gap: 12px; height: 160px; padding: 10px 4px 0; }
.adm-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.adm-bar { width: 100%; max-width: 46px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--violet2), var(--violet)); box-shadow: 0 0 14px rgba(155,77,255,0.4); transition: height .8s cubic-bezier(.2,1,.4,1); min-height: 4px; }
.adm-bar-lab { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.adm-inv-list { display: flex; flex-direction: column; gap: 8px; }
.adm-inv { display: flex; justify-content: space-between; align-items: center; padding: 11px 13px; background: rgba(12,11,26,0.4); border-radius: 11px; }
.adm-inv-nr { font-size: 12.5px; font-weight: 700; color: var(--white); font-family: var(--mono); }
.adm-inv-cli { font-size: 11px; color: var(--muted); }
.adm-inv-amt { font-size: 13.5px; font-weight: 700; color: var(--white); }
/* analityka AI */
.adm-ai-box { border: 1px solid var(--border2); background: linear-gradient(135deg, rgba(155,77,255,0.08), rgba(155,77,255,0.02)); }
.adm-recs { display: flex; flex-direction: column; gap: 10px; }
.adm-rec { display: flex; gap: 12px; padding: 12px 14px; background: rgba(12,11,26,0.4); border-radius: 12px; }
.adm-rec-i { font-size: 20px; flex-shrink: 0; }
.adm-rec-t { font-size: 13px; font-weight: 700; color: var(--white); margin-bottom: 3px; }
.adm-rec-d { font-size: 12px; color: var(--muted); line-height: 1.5; }
/* logi */
.adm-log-list { display: flex; flex-direction: column; gap: 2px; }
.adm-log { display: flex; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 10px; transition: background .15s; }
.adm-log:hover { background: rgba(155,77,255,0.05); }
.adm-log-i { font-size: 16px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: rgba(155,77,255,0.1); border-radius: 9px; flex-shrink: 0; }
.adm-log-what { font-size: 13px; color: var(--white); }
.adm-log-meta { font-size: 11px; color: var(--muted); font-family: var(--mono); }
@media (max-width: 900px) { .adm-2col { grid-template-columns: 1fr; } }
/* dashboard enterprise KPI */
.adm-kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.adm-kpi-tile { background: rgba(26,22,64,0.42); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; transition: transform .2s, border-color .2s; }
.adm-kpi-tile:hover { transform: translateY(-3px); border-color: var(--border2); }
.adm-kpi-icon { font-size: 20px; margin-bottom: 6px; }
.adm-kpi-val { font-size: 24px; font-weight: 800; color: var(--white); line-height: 1; }
.adm-kpi-lab { font-size: 11px; color: var(--muted); margin-top: 4px; }
@media (max-width: 700px) { .adm-kpi-grid { grid-template-columns: repeat(2,1fr); } }
/* komórka opiekuna (kto obsługuje) */
.own-cell { display: flex; align-items: center; gap: 7px; }
.own-none { color: var(--muted); font-family: var(--mono); }
.own-select { background: rgba(12,11,26,0.6); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-family: var(--sans); font-size: 11px; padding: 4px 6px; cursor: pointer; max-width: 130px; outline: none; }
.own-select:hover { border-color: var(--border2); }
.own-select:focus { border-color: var(--violet); }
/* zespół: kafelki + szczegóły */
.adm-team-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 14px; }
.adm-member-card { background: rgba(26,22,64,0.5); border: 1px solid var(--border); border-radius: 16px; padding: 18px 16px; text-align: center; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; }
.adm-member-card:hover { transform: translateY(-4px); border-color: var(--border2); box-shadow: 0 12px 28px rgba(155,77,255,0.2); }
.adm-member-name { font-size: 14.5px; font-weight: 700; color: var(--white); }
.adm-member-mail { font-size: 11px; color: var(--violet2); font-family: var(--mono); margin-top: 6px; word-break: break-all; }
.adm-member-stats { display: flex; justify-content: center; gap: 12px; margin-top: 10px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.mem-proj { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: rgba(155,77,255,0.05); border-radius: 11px; margin-bottom: 8px; }
.mem-proj-name { font-size: 13px; font-weight: 600; color: var(--white); }
.mem-proj-meta { font-size: 11px; color: var(--muted); }
.mem-row { display: flex; gap: 11px; align-items: center; padding: 10px 12px; background: rgba(12,11,26,0.4); border-radius: 11px; margin-bottom: 7px; }
.mem-row-i { font-size: 16px; flex-shrink: 0; }
.mem-row-t { font-size: 12.5px; color: var(--white); }
.mem-row-d { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.mem-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.mem-act { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: rgba(155,77,255,0.06); color: var(--violet2); font-family: var(--sans); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .18s; }
.mem-act:hover { background: rgba(155,77,255,0.16); border-color: var(--border2); }
.mem-act.on { background: rgba(248,113,113,0.14); color: #F87171; border-color: rgba(248,113,113,0.35); }
.mem-mini { padding: 5px 9px; border-radius: 8px; border: 1px solid var(--border); background: rgba(155,77,255,0.06); color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; transition: all .18s; }
.mem-mini.ok { color: #4ADE80; border-color: rgba(74,222,128,0.35); background: rgba(74,222,128,0.1); }
.mem-mini.ok:hover { background: rgba(74,222,128,0.2); }
.mem-mini.no { color: #F87171; border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.08); }
.mem-mini.no:hover { background: rgba(248,113,113,0.18); }
.mem-chat { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; }
.mem-msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; }
.mem-msg.in { align-self: flex-start; background: rgba(26,22,64,0.7); border: 1px solid var(--border); }
.mem-msg.out { align-self: flex-end; background: linear-gradient(135deg, var(--violet), #5A32B4); }
.mem-msg-t { font-size: 12.5px; color: var(--white); line-height: 1.45; }
.mem-msg-at { font-size: 10px; color: var(--muted); margin-top: 4px; }
.mem-msg.out .mem-msg-at { color: rgba(255,255,255,0.7); }
/* przycisk ⋯ i menu akcji */
.row-more { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); background: rgba(155,77,255,0.06); color: var(--violet2); font-size: 18px; line-height: 1; cursor: pointer; transition: all .18s; }
.row-more:hover { background: rgba(155,77,255,0.16); border-color: var(--border2); }
.action-menu { position: fixed; z-index: 9999; min-width: 230px; max-height: 70vh; overflow-y: auto; background: var(--card2, #221D55); border: 1px solid var(--border2); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,0.55); padding: 6px; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.am-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 8px 12px 4px; }
.am-item { display: block; width: 100%; text-align: left; padding: 9px 12px; border: none; background: none; color: var(--text); font-family: var(--sans); font-size: 13px; border-radius: 9px; cursor: pointer; transition: background .12s; }
.am-item:hover { background: rgba(155,77,255,0.14); color: var(--white); }
.am-item.danger { color: var(--danger); }
.am-item.danger:hover { background: rgba(248,113,113,0.14); }
.lead-pool-badge { font-size: 11px; font-weight: 600; color: var(--info); background: rgba(96,165,250,0.14); padding: 4px 10px; border-radius: 8px; }
/* pula ogólna w panelu handlowca */
.sal-pool { margin-bottom: 18px; border: 1px solid rgba(96,165,250,0.3); }
.sal-pool-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 12px; }
.sal-pool-card { background: rgba(96,165,250,0.06); border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px; display: flex; flex-direction: column; gap: 7px; }
.sal-pool-co { font-size: 14px; font-weight: 700; color: var(--white); display: flex; justify-content: space-between; align-items: center; }
.sal-pool-meta { font-size: 11.5px; color: var(--muted); }


@media (max-width: 1100px) { .sal-kpis { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 600px) {
  .sal-kcol { flex: 0 0 78vw; min-width: 78vw; }
}
@media (max-width: 900px) {
  .sal-dash-cols, .sal-support-grid, .sal-ai-grid { grid-template-columns: 1fr; }
  .iv-form, .sal-an-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .sal-kpis { grid-template-columns: 1fr 1fr; padding: 16px 16px 0; }
  .sal-dash-cols { padding: 16px; }
  #view-sales .ew-toolbar, #view-sales .ew-wrap { padding-left: 16px; padding-right: 16px; }
}


/* ── MODAL PROJEKTU ── */
.proj-modal-box { max-width: 820px; height: 88vh; max-height: 760px; }
.proj-modal-head { flex-shrink: 0; padding: 22px 26px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(26,22,64,0.7), rgba(20,16,48,0.5)); }
.pm-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.pm-head-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pm-head-name { font-size: 22px; font-weight: 800; color: var(--white); letter-spacing: -.5px; line-height: 1.2; }
.pm-head-client { font-size: 12.5px; color: var(--violet2); margin-top: 5px; }
.proj-modal-body { flex: 1; min-height: 0; overflow-y: auto; display: flex !important; flex-direction: column; gap: 18px; padding: 24px 26px !important; }

.pm-section {}
.pm-label { font-size: 12px; font-weight: 700; color: var(--white); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.pm-count { font-family: var(--mono); font-size: 11px; color: var(--violet2); background: rgba(155,77,255,0.12); padding: 2px 8px; border-radius: 8px; }
.pm-text { font-size: 13px; color: var(--text); line-height: 1.6; }
.pm-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.pm-meta { background: rgba(155,77,255,0.06); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.pm-meta span { font-size: 10.5px; color: var(--muted); }
.pm-meta b { font-size: 14px; color: var(--white); font-family: var(--mono); }

/* premium progress slider */
.pm-progress-box { background: linear-gradient(135deg, rgba(155,77,255,0.1), rgba(155,77,255,0.03)); border: 1px solid var(--border2); border-radius: 16px; padding: 20px; }
.pm-prog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.pm-prog-head span:first-child { font-size: 13px; font-weight: 700; color: var(--white); }
.pm-prog-big { font-size: 28px; font-weight: 800; color: var(--violet2); font-family: var(--sans); transition: all .3s; }
.pm-prog-bar { height: 12px; border-radius: 8px; background: rgba(155,77,255,0.14); overflow: hidden; margin-bottom: 16px; }
.pm-prog-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--violet), var(--violet3)); box-shadow: 0 0 16px rgba(155,77,255,0.6); transition: width .35s cubic-bezier(.2,1,.4,1); position: relative; }
.pm-prog-fill::after { content:''; position: absolute; top: 0; right: 0; bottom: 0; width: 30px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4)); }
.pm-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 5px; background: rgba(155,77,255,0.2); outline: none; cursor: pointer; }
.pm-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--violet)); box-shadow: 0 0 0 4px rgba(155,77,255,0.25), 0 4px 12px rgba(0,0,0,0.4); cursor: grab; transition: transform .2s; }
.pm-slider::-webkit-slider-thumb:active { transform: scale(1.2); cursor: grabbing; }
.pm-slider::-moz-range-thumb { width: 24px; height: 24px; border: none; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--violet)); box-shadow: 0 0 0 4px rgba(155,77,255,0.25); cursor: grab; }
.pm-prog-hint { font-size: 11px; color: var(--muted); margin-top: 10px; text-align: center; }

.pm-team { display: flex; gap: 4px; }
.pm-team .ep-av { width: 36px; height: 36px; font-size: 13px; }
.pm-checklist { display: flex; flex-direction: column; gap: 8px; }
/* ── ETAPY (spójne z paskiem realizacji u klienta), klikalne ── */
.pm-steps-hint { font-size: 10.5px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.pm-steps { display: flex; align-items: flex-start; gap: 0; position: relative; padding: 6px 4px 0; }
.pm-steps .ps-step { cursor: pointer; padding-bottom: 6px; transition: transform .2s; }
.pm-steps .ps-step:hover { transform: translateY(-2px); }
.pm-steps .ps-step:hover .ps-icon-wrap { box-shadow: 0 0 14px rgba(155,77,255,0.45); border-color: var(--violet2); }
.pm-steps .ps-label { font-size: 10.5px; }
.pm-steps .ps-date { font-size: 9px; }
.pm-check { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); padding: 8px 12px; background: rgba(155,77,255,0.05); border-radius: 10px; }
.pm-check.done { color: var(--muted); text-decoration: line-through; }
.pm-check-box { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--border2); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--success); flex-shrink: 0; }
.pm-check.done .pm-check-box { background: rgba(74,222,128,0.15); border-color: var(--success); }
.pm-twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pm-files { display: flex; flex-direction: column; gap: 8px; }
.pm-file { display: flex; align-items: center; gap: 10px; padding: 10px; background: rgba(155,77,255,0.05); border-radius: 10px; }
.pm-file-n { font-size: 12.5px; color: var(--white); }
.pm-file-m { font-size: 10.5px; color: var(--muted); font-family: var(--mono); }
.pm-history { display: flex; flex-direction: column; gap: 0; }
.pm-hist { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.pm-hist:not(:last-child)::before { content:''; position: absolute; left: 4px; top: 12px; bottom: 0; width: 1.5px; background: rgba(155,77,255,0.2); }
.pm-hist-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--violet); margin-top: 3px; flex-shrink: 0; box-shadow: 0 0 8px rgba(155,77,255,0.6); z-index: 1; }
.pm-hist-t { font-size: 12.5px; color: var(--text); }
.pm-hist-at { font-size: 10.5px; color: var(--muted); font-family: var(--mono); }
.pm-comments { display: flex; flex-direction: column; gap: 10px; }
.pm-comment { background: rgba(155,77,255,0.05); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--text); }
.pm-comment b { color: var(--white); font-size: 12.5px; }
.pm-comment-at { font-size: 10.5px; color: var(--muted); font-family: var(--mono); margin-left: 6px; }
.pm-open-box { background: linear-gradient(135deg, rgba(251,191,36,0.07), rgba(155,77,255,0.04)); border: 1px solid var(--border2); border-radius: 16px; padding: 18px; }
.pm-open-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 13px; color: var(--text); border-bottom: 1px solid rgba(155,77,255,0.08); }
.pm-open-row:last-of-type { border-bottom: none; }
.pm-open-row b { color: var(--white); }
.pm-join-btn { width: 100%; margin-top: 14px; padding: 14px; border: none; border-radius: 12px; font-family: var(--sans); font-size: 14px; font-weight: 700; color: white; cursor: pointer; background: linear-gradient(135deg, var(--violet), #7C3AED); box-shadow: 0 8px 24px rgba(155,77,255,0.35); transition: transform .2s, box-shadow .2s; }
.pm-join-btn:hover:not(.disabled) { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(155,77,255,0.5); }
.pm-join-btn.disabled { background: rgba(155,77,255,0.15); color: var(--muted); cursor: not-allowed; box-shadow: none; }

/* responsywność panelu pracownika */
@media (max-width: 900px) {
  .ep-stats-grid { grid-template-columns: repeat(2,1fr); }
  .ep-dash-cols { grid-template-columns: 1fr; }
  .pm-grid { grid-template-columns: repeat(2,1fr); }
  .pm-twocol { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ep-topbar { padding: 16px; }
  .ep-title { font-size: 18px; }
  .ep-wrap { padding: 16px; gap: 16px; }
  .ep-stats-grid { gap: 12px; }
  .ep-stat { padding: 16px; }
  .ep-stat-val { font-size: 26px; }
  .ep-cards { grid-template-columns: 1fr; }
  .ep-toolbar { padding: 14px 16px 0; }
  .ep-search { min-width: 100%; }
  .ep-select { flex: 1; }
  .proj-modal-box { height: 100dvh; max-height: none; border-radius: 0; }
  .pm-grid { grid-template-columns: 1fr 1fr; }
  .pm-head-name { font-size: 18px; }
}


/* ── CARDS ───────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 20px;
  position: relative; overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.stat-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(to right, var(--violet), transparent);
}
.stat-icon { font-size: 22px; margin-bottom: 12px; }
.stat-val { font-size: 28px; font-weight: 700; color: var(--white); font-family: var(--mono); line-height: 1; }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 4px; letter-spacing: 0.5px; }
.stat-delta { font-size: 11px; color: var(--success); margin-top: 6px; font-family: var(--mono); }
.stat-delta.neg { color: var(--danger); }

.section-title {
  font-size: 13px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted);
  font-family: var(--mono); margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.section-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
  margin-bottom: 20px;
}

/* ── TABLE ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* ── TABELE NA TELEFONIE: wiersze jako karty (czytelne, bez przewijania w bok) ── */
@media (max-width: 640px) {
  .ep-table.cardify, .ep-table.cardify thead, .ep-table.cardify tbody, .ep-table.cardify tr, .ep-table.cardify td { display: block; width: 100%; }
  .ep-table.cardify thead { display: none; }
  .ep-table.cardify tr { background: rgba(26,22,64,0.5); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
  .ep-table.cardify td { border: none !important; padding: 6px 0 !important; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; }
  .ep-table.cardify td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 600; text-align: left; flex-shrink: 0; }
  .ep-table.cardify td:first-child { text-align: left; display: block; margin-bottom: 4px; }
  .ep-table.cardify td:first-child::before { display: none; }
  .ep-table.cardify td:last-child { justify-content: flex-end; }
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  padding: 10px 14px; text-align: left;
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); font-family: var(--mono); font-weight: 600;
  border-bottom: 1px solid var(--border);
}
td { padding: 12px 14px; border-bottom: 1px solid rgba(155,77,255,0.06); color: var(--text); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(155,77,255,0.04); }

/* ── BADGES ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 600; font-family: var(--mono);
}
.badge-violet { background: rgba(155,77,255,0.15); color: var(--violet2); border: 1px solid rgba(155,77,255,0.25); }
.badge-success { background: rgba(74,222,128,0.12); color: #4ADE80; border: 1px solid rgba(74,222,128,0.2); }
.badge-warn { background: rgba(251,191,36,0.12); color: #FBBF24; border: 1px solid rgba(251,191,36,0.2); }
.badge-info { background: rgba(96,165,250,0.12); color: #60A5FA; border: 1px solid rgba(96,165,250,0.2); }
.badge-danger { background: rgba(248,113,113,0.12); color: #F87171; border: 1px solid rgba(248,113,113,0.2); }

/* ── PROGRESS ────────────────────────────────────────────────── */
.progress-wrap { margin: 8px 0; }
.progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.progress-bar { height: 6px; background: rgba(255,255,255,0.06); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 10px; background: linear-gradient(to right, var(--violet), var(--violet2)); transition: width .6s ease; }

/* ── PROJECT CARD ────────────────────────────────────────────── */
.project-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px; margin-bottom: 14px;
  transition: border-color .2s;
}
.project-card:hover { border-color: var(--border2); }
.project-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.project-name { font-size: 15px; font-weight: 600; color: var(--white); }
.project-client { font-size: 12px; color: var(--muted); margin-top: 2px; font-family: var(--mono); }
.project-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ── TIMELINE ────────────────────────────────────────────────── */
.timeline { position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 14px; top: 0; bottom: 0;
  width: 1px; background: var(--border);
}
.tl-item { display: flex; gap: 16px; margin-bottom: 20px; position: relative; }
.tl-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0; z-index: 1;
}
.tl-dot.done { background: rgba(74,222,128,0.15); border: 1px solid rgba(74,222,128,0.3); }
.tl-dot.active { background: rgba(155,77,255,0.2); border: 1px solid var(--border2); box-shadow: 0 0 12px rgba(155,77,255,0.3); }
.tl-dot.pending { background: rgba(255,255,255,0.04); border: 1px solid var(--border); }
.tl-body { flex: 1; padding-top: 4px; }
.tl-title { font-size: 13px; font-weight: 600; color: var(--white); }
.tl-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tl-date { font-size: 10px; color: rgba(139,124,184,0.6); margin-top: 4px; font-family: var(--mono); }

/* ── PROMO CARD ──────────────────────────────────────────────── */
.promo-card {
  border-radius: 14px; padding: 22px; margin-bottom: 14px;
  border: 1px solid var(--border); position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--card) 0%, var(--card2) 100%);
}
.promo-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.promo-card.hot::before { background: linear-gradient(to right, var(--violet), #FF6B9D); }
.promo-card.cool::before { background: linear-gradient(to right, #60A5FA, var(--violet)); }
.promo-card.gold::before { background: linear-gradient(to right, #FBBF24, #F59E0B); }
.promo-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  font-family: var(--mono); font-weight: 600; margin-bottom: 8px;
}
.promo-tag.hot { color: #FF6B9D; }
.promo-tag.cool { color: var(--info); }
.promo-tag.gold { color: var(--warn); }
.promo-title { font-size: 17px; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.promo-desc { font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.6; }
.promo-footer { display: flex; justify-content: space-between; align-items: center; }
.promo-expires { font-size: 11px; color: rgba(139,124,184,0.6); font-family: var(--mono); }

/* ── NOTIFICATION ────────────────────────────────────────────── */
.notif {
  display: flex; gap: 12px; padding: 14px;
  border-radius: 10px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); margin-bottom: 10px;
  transition: background .15s;
}
.notif:hover { background: rgba(155,77,255,0.05); }
.notif-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.notif-body .notif-title { font-size: 13px; font-weight: 600; color: var(--white); }
.notif-body .notif-text { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.notif-body .notif-time { font-size: 10px; color: rgba(139,124,184,0.5); margin-top: 4px; font-family: var(--mono); }
.notif.unread { border-color: rgba(155,77,255,0.25); background: rgba(155,77,255,0.06); }

/* ── AVATAR LIST ─────────────────────────────────────────────── */
.avatar-list { display: flex; }
.avatar-list .av {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: white;
  border: 2px solid var(--card); margin-left: -6px;
}
.avatar-list .av:first-child { margin-left: 0; }

/* ── EKG SVG ─────────────────────────────────────────────────── */
.ekg-svg { display: block; }

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes ekg { 0% { stroke-dashoffset: 300; } 100% { stroke-dashoffset: 0; } }

.fade-in { animation: fadeIn .35s ease both; }
.fade-in-d1 { animation: fadeIn .35s .05s ease both; }
.fade-in-d2 { animation: fadeIn .35s .1s ease both; }
.fade-in-d3 { animation: fadeIn .35s .15s ease both; }
.fade-in-d4 { animation: fadeIn .35s .2s ease both; }

.dot-pulse {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); animation: pulse 2s infinite;
}

/* ── CHAT WIDGET ─────────────────────────────────────────────── */
.chat-bubble {
  display: flex; gap: 10px; margin-bottom: 14px;
}
.chat-bubble.me { flex-direction: row-reverse; }
.chat-av {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), #5A32B4);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}
.chat-av.client { background: linear-gradient(135deg, #3B82F6, #1E40AF); }
.chat-msg {
  max-width: 75%; padding: 10px 14px; border-radius: 12px;
  font-size: 13px; line-height: 1.5; color: var(--text);
}
.chat-msg.them { background: var(--card2); border-radius: 12px 12px 12px 2px; }
.chat-msg.me-msg { background: rgba(155,77,255,0.2); border: 1px solid rgba(155,77,255,0.25); border-radius: 12px 12px 2px 12px; }
.chat-time { font-size: 10px; color: var(--muted); margin-top: 3px; font-family: var(--mono); }

.chat-input-row { display: flex; gap: 8px; margin-top: 16px; }
.chat-input {
  flex: 1; padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--white); font-family: var(--sans); font-size: 13px;
  outline: none;
}
.chat-input:focus { border-color: var(--violet); }

/* ── KANBAN ──────────────────────────────────────────────────── */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media(max-width:900px) { .kanban { grid-template-columns: 1fr; } }
.kanban-col { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.kanban-col-title {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  font-family: var(--mono); color: var(--muted); margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.kanban-task {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; margin-bottom: 10px;
  cursor: pointer; transition: all .15s;
}
.kanban-task:hover { border-color: var(--border2); transform: translateY(-1px); }
.kanban-task-title { font-size: 13px; font-weight: 500; color: var(--white); margin-bottom: 8px; }
.kanban-task-meta { display: flex; justify-content: space-between; align-items: center; }

/* ── GRID HELPERS ────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media(max-width:700px) { .grid-2 { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════════
   PROCESS BAR — kompaktowy
══════════════════════════════════════════════════════════ */
.process-bar-wrap {
  background: linear-gradient(180deg,#110E2E 0%,#0C0B1A 100%);
  border-bottom: 1px solid var(--border);
  padding: 22px 32px 0;
  position: sticky; top: 0; z-index: 9;
  flex-shrink: 0; overflow: hidden;
}
.process-bar-wrap::before {
  content:''; position:absolute; inset:0;
  background:radial-gradient(ellipse 60% 100% at 50% 0%,rgba(155,77,255,0.07) 0%,transparent 70%);
  pointer-events:none;
}
.process-bar-header {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:18px;
}
.process-bar-label {
  font-family:var(--mono); font-size:10px; letter-spacing:2px;
  color:var(--violet); text-transform:uppercase; display:block; margin-bottom:4px;
}
.process-bar-project { font-size:16px; font-weight:600; color:var(--white); }
.process-bar-id { font-family:var(--mono); font-size:12px; color:var(--muted); margin-left:6px; }
.process-bar-pct-wrap { position:relative; width:48px; height:48px; flex-shrink:0; }
.process-ring { width:48px; height:48px; transform:rotate(-90deg); }
.process-ring-pct {
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-family:var(--mono); font-size:13px; font-weight:600; color:var(--violet2);
}

/* steps row */
.process-steps {
  display:flex; align-items:flex-start; gap:0; position:relative;
}
.ps-step {
  flex:1; display:flex; flex-direction:column;
  align-items:center; position:relative; padding-bottom:18px;
}
.ps-connector-before,
.ps-connector-after {
  position:absolute; top:19px; height:2px;
  width:calc(50% - 19px); background:rgba(155,77,255,0.18);
}
.ps-connector-before { right:calc(50% + 19px); }
.ps-connector-after  { left:calc(50% + 19px); }
.ps-step:first-child .ps-connector-before,
.ps-step:last-child  .ps-connector-after { display:none; }
.ps-step.done .ps-connector-before,
.ps-step.done .ps-connector-after,
.ps-step.active .ps-connector-before { background:rgba(155,77,255,0.5); }

.ps-icon-wrap {
  width:38px; height:38px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  position:relative; z-index:2; font-size:15px; font-weight:700;
  transition:all .3s;
}
.ps-step.done .ps-icon-wrap {
  background:rgba(155,77,255,0.2); border:1.5px solid var(--violet);
  color:var(--violet2); box-shadow:0 0 8px rgba(155,77,255,0.2);
}
.ps-step.active .ps-icon-wrap {
  background:var(--violet); border:1.5px solid var(--violet2);
  color:white; box-shadow:0 0 14px rgba(155,77,255,0.5);
}
.ps-step.pending .ps-icon-wrap {
  background:rgba(255,255,255,0.03); border:1.5px solid rgba(155,77,255,0.18);
  color:rgba(139,124,184,0.3);
}
.ps-pulse-ring {
  position:absolute; inset:-4px; border-radius:50%;
  border:1.5px solid var(--violet);
  animation:psRingPulse 2s ease-in-out infinite;
}
@keyframes psRingPulse {
  0%,100%{opacity:.6;transform:scale(1)} 50%{opacity:0;transform:scale(1.6)}
}
.ps-step.active .ps-glow {
  position:absolute; width:50px; height:50px; border-radius:50%;
  top:-6px; left:50%; transform:translateX(-50%);
  background:radial-gradient(circle,rgba(155,77,255,0.3) 0%,transparent 70%);
  pointer-events:none;
}
.ps-label {
  font-size:12px; line-height:1.3; text-align:center;
  margin-top:9px; color:var(--muted); font-weight:500;
}
.ps-step.done .ps-label   { color:var(--violet3); }
.ps-step.active .ps-label { color:var(--white); font-weight:600; }
.ps-date {
  font-family:var(--mono); font-size:10px; text-align:center;
  color:rgba(139,124,184,0.45); margin-top:4px;
}
.ps-step.active .ps-date { color:var(--violet2); }
.ps-step.done .ps-date   { color:rgba(155,77,255,0.55); }

.process-track { height:3px; background:rgba(155,77,255,0.1); margin:0 -32px; }
.process-track-fill {
  height:100%;
  background:linear-gradient(to right,#5A32B4,#9B4DFF,#B87FFF);
  transition:width .8s ease; box-shadow:0 0 6px rgba(155,77,255,0.5);
}

/* ══════════════════════════════════════════════════════════
   ACTIVE STAGE CARD — kompaktowy
══════════════════════════════════════════════════════════ */
.active-stage-card {
  display:flex; gap:14px; align-items:flex-start;
  background:linear-gradient(135deg,rgba(155,77,255,0.09) 0%,rgba(34,29,85,0.5) 100%);
  border:1px solid rgba(155,77,255,0.3);
  border-radius:12px; padding:14px 16px;
  position:relative; overflow:hidden; margin-bottom:4px;
}
.active-stage-card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:2px;
  background:linear-gradient(to right,var(--violet),var(--violet2),transparent);
}
.asc-left { position:relative; flex-shrink:0; }
.asc-icon {
  width:38px; height:38px; border-radius:10px;
  background:var(--violet);
  display:flex; align-items:center; justify-content:center;
  font-size:16px; box-shadow:0 0 16px rgba(155,77,255,0.4);
  position:relative; z-index:1;
}
.asc-glow {
  position:absolute; inset:-6px; border-radius:14px;
  background:radial-gradient(circle,rgba(155,77,255,0.2) 0%,transparent 70%);
}
.asc-body { flex:1; min-width:0; }
.asc-kicker {
  font-family:var(--mono); font-size:8px; letter-spacing:2px;
  color:var(--violet2); margin-bottom:3px;
}
.asc-title { font-size:15px; font-weight:700; color:var(--white); margin-bottom:5px; }
.asc-desc { font-size:12px; color:var(--muted); line-height:1.55; margin-bottom:10px; }
.asc-progress-wrap { margin-bottom:10px; }
.asc-progress-label {
  display:flex; justify-content:space-between;
  font-size:10px; color:var(--muted); margin-bottom:4px;
}
.asc-progress-bar { height:6px; background:rgba(255,255,255,0.05); border-radius:10px; overflow:hidden; }
.asc-progress-fill {
  height:100%; border-radius:10px;
  background:linear-gradient(to right,#7B2FBE,#9B4DFF,#B87FFF);
  box-shadow:0 0 6px rgba(155,77,255,0.4);
  transition:width .8s ease; position:relative;
}
.asc-progress-fill::after {
  content:''; position:absolute; right:0; top:50%; transform:translateY(-50%);
  width:10px; height:10px; border-radius:50%;
  background:white; box-shadow:0 0 5px rgba(155,77,255,0.8);
}
.asc-meta { display:flex; flex-wrap:wrap; gap:6px; }

/* ── NEXT STAGE ROW ──────────────────────────────────────── */
.next-stage-row { display:flex; gap:10px; align-items:center; }
.nsr-arrow { font-size:16px; color:rgba(155,77,255,0.3); flex-shrink:0; }
.nsr-step {
  flex:1; background:rgba(255,255,255,0.02);
  border:1px solid var(--border); border-radius:10px;
  padding:12px 14px; display:flex; align-items:flex-start; gap:10px;
  transition:border-color .2s;
}
.nsr-step:hover { border-color:var(--border2); }
.nsr-num {
  width:24px; height:24px; border-radius:50%; flex-shrink:0;
  background:rgba(155,77,255,0.08); border:1px solid var(--border2);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--mono); font-size:10px; font-weight:600; color:var(--muted);
}
.nsr-body { flex:1; min-width:0; }
.nsr-title { font-size:12px; font-weight:600; color:var(--white); margin-bottom:3px; }
.nsr-desc  { font-size:11px; color:var(--muted); line-height:1.45; }
.nsr-date  {
  font-family:var(--mono); font-size:9px; color:rgba(139,124,184,0.5);
  flex-shrink:0; white-space:nowrap; margin-top:2px;
}

@media(max-width:600px) {
  .process-bar-wrap { padding:10px 14px 0; }
  .process-track { margin:0 -14px; }
  .ps-label { font-size:9px; }
  .ps-date  { display:none; }
  .next-stage-row { flex-direction:column; }
  .nsr-arrow { transform:rotate(90deg); }
  .active-stage-card { flex-direction:column; }
}

/* ══════════════════════════════════════════════════════════
   CLIENT LAYOUT
══════════════════════════════════════════════════════════ */
.client-nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20; flex-shrink: 0;
}
.cn-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 24px; border-bottom: 1px solid rgba(155,77,255,0.1);
}
.cn-logo { display: flex; align-items: center; gap: 8px; }
.cn-sep { color: var(--border2); margin: 0 4px; }
.cn-right { display: flex; align-items: center; gap: 10px; }
.cn-tabs {
  display: flex; padding: 0 16px;
  overflow-x: auto; gap: 2px;
}
.cn-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px; border: none; background: none;
  color: var(--muted); font-family: var(--sans); font-size: 13px;
  font-weight: 500; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .15s; white-space: nowrap;
}
.cn-tab:hover { color: var(--violet2); }
.cn-tab.active { color: var(--white); border-bottom-color: var(--violet); }
.cn-badge {
  background: var(--violet); color: white;
  font-size: 9px; font-weight: 700; font-family: var(--mono);
  padding: 1px 5px; border-radius: 10px;
}
/* cv views */
.cv-body { }
.cv-view { display: none; animation: fadeIn .25s ease; }
.cv-view.active { display: block; }
/* chat */
.cv-chat-wrap { max-width: 720px; margin: 0 auto; }
.cv-chat-header { display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.cv-chat-messages { padding: 20px 24px; display: flex; flex-direction: column; gap: 4px; }
.cv-chat-input { display: flex; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--card); position: sticky; bottom: 0; }
.cv-chat-input .chat-input { flex: 1; }
/* promos / files */
.cv-promos-wrap { padding: 24px 28px; }
.cv-section-title { font-size: 15px; font-weight: 700; color: var(--white); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.cv-promos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 16px; }
.cv-file-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; transition: border-color .15s; margin-bottom: 8px; }
.cv-file-row:hover { border-color: var(--border2); }
.cv-file-icon { font-size: 20px; flex-shrink: 0; }
.cv-file-info { flex: 1; }
.cv-file-name { font-size: 13px; font-weight: 500; color: var(--white); }
.cv-file-meta { font-size: 10px; color: var(--muted); font-family: var(--mono); margin-top: 2px; }
.cv-chat-btn { width: 100%; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: rgba(155,77,255,0.1); color: var(--violet2); font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.cv-chat-btn:hover { background: rgba(155,77,255,0.18); border-color: var(--border2); }

.client-stage-info {
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; padding:10px 24px;
  background:rgba(155,77,255,0.07); border-bottom:1px solid var(--border); flex-shrink:0;
}
.csi-left { display:flex; align-items:center; gap:10px; }
.csi-icon {
  width:32px; height:32px; border-radius:8px; background:var(--violet);
  display:flex; align-items:center; justify-content:center;
  font-size:14px; flex-shrink:0; box-shadow:0 0 12px rgba(155,77,255,0.4);
}
.csi-kicker { font-family:var(--mono); font-size:8px; letter-spacing:2px; color:var(--violet2); }
.csi-title { font-size:13px; font-weight:700; color:var(--white); }
.csi-right { display:flex; align-items:center; gap:12px; flex-shrink:0; }
.csi-bar-wrap { display:flex; align-items:center; gap:8px; }
.csi-bar { width:100px; height:5px; background:rgba(255,255,255,0.06); border-radius:10px; overflow:hidden; }
.csi-bar-fill { height:100%; background:linear-gradient(to right,var(--violet),var(--violet2)); border-radius:10px; }
.csi-pct { font-family:var(--mono); font-size:11px; color:var(--violet2); white-space:nowrap; }
.csi-meta { display:flex; gap:6px; }
.client-cols {
  display:grid; grid-template-columns:1fr 1fr 1fr;
}
.client-cols.cols-2 { grid-template-columns:1fr 1fr; }
@media(max-width:900px) { .client-cols { grid-template-columns:1fr; } .client-cols.cols-2 { grid-template-columns:1fr; } }
.client-col {
  border-right:1px solid var(--border);
  display:flex; flex-direction:column;
}

.client-col:last-child { border-right:none; }
.col-header {
  display:flex; align-items:center; gap:8px;
  padding:14px 16px; border-bottom:1px solid var(--border);
  background:rgba(255,255,255,0.02);
}

.col-icon { font-size:15px; }
.col-title { font-size:13px; font-weight:600; color:var(--white); }
.col-body { padding:14px 16px; }
.col-chat-link {
  padding:12px 16px; cursor:pointer;
  transition:background .15s; border-bottom:1px solid var(--border);
}
.col-chat-link:hover { background:rgba(155,77,255,0.06); }
.ccl-preview { display:flex; align-items:flex-start; gap:10px; margin-bottom:10px; }
.ccl-av {
  width:32px; height:32px; border-radius:50%; flex-shrink:0;
  background:linear-gradient(135deg,var(--violet),#5A32B4);
  display:flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:700; color:white;
}
.ccl-body { flex:1; min-width:0; }
.ccl-name { font-size:12px; font-weight:600; color:var(--white); }
.ccl-time { font-family:var(--mono); font-size:10px; color:var(--muted); margin-left:6px; }
.ccl-msg { font-size:11px; color:var(--muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ccl-unread {
  width:20px; height:20px; border-radius:50%;
  background:var(--violet); color:white; font-size:10px; font-weight:700;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.ccl-cta {
  font-size:12px; font-weight:600; color:var(--violet2); text-align:center;
  padding:6px; border:1px solid var(--border2); border-radius:8px; transition:all .15s;
}
.col-chat-link:hover .ccl-cta { background:rgba(155,77,255,0.12); }
.mini-chat { padding:12px 16px; flex:1; display:flex; flex-direction:column; }
.mini-chat-messages { overflow-y:auto; max-height:300px; margin-bottom:8px; }
.col-project-name { font-size:13px; font-weight:600; color:var(--white); }
.col-project-sub { font-family:var(--mono); font-size:10px; color:var(--muted); margin-top:2px; }

::-webkit-scrollbar { width:4px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(155,77,255,0.3); border-radius:10px; }

/* ═══════════════════════════════════════════════════════════
   MODERNIZACJA KONTA KLIENTA — styl spójny z ekranem logowania
   (glassmorphism, glow, miękkie cienie, gradientowe akcenty)
═══════════════════════════════════════════════════════════════ */

/* Tło widoku klienta — głęboki kosmiczny gradient jak w logowaniu */
#view-client {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(155,77,255,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(90,50,180,0.08) 0%, transparent 60%),
    linear-gradient(180deg, #0C0B1A 0%, #0A0818 100%);
}

/* ── NAWIGACJA: szklany, rozmyty pasek ───────────────────── */
#view-client .client-nav {
  background: rgba(12,11,26,0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(155,77,255,0.18);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}
#view-client .cn-tab {
  border-radius: 10px 10px 0 0;
  transition: all .2s ease;
}
#view-client .cn-tab.active {
  background: linear-gradient(180deg, rgba(155,77,255,0.14) 0%, transparent 100%);
  border-bottom-color: var(--violet2);
}
#view-client .cn-badge {
  box-shadow: 0 0 10px rgba(155,77,255,0.6);
}

/* ── PASEK REALIZACJI: lekka szklana poświata ────────────── */
#view-client .process-bar-wrap {
  background:
    radial-gradient(ellipse 70% 120% at 50% 0%, rgba(155,77,255,0.10) 0%, transparent 65%),
    linear-gradient(180deg, rgba(26,22,64,0.55) 0%, rgba(12,11,26,0.4) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(155,77,255,0.16);
}

/* ── PASEK AKTUALNEGO ETAPU: szkło + subtelny glow ───────── */
#view-client .client-stage-info {
  background: rgba(155,77,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(155,77,255,0.14);
}
#view-client .csi-icon {
  box-shadow: 0 0 18px rgba(155,77,255,0.55);
}

/* ── KOLUMNY PRZEGLĄDU → osobne szklane karty ────────────── */
#view-client .client-cols {
  gap: 18px;
  padding: 24px 28px;
  flex: 1;
}
#view-client .client-col {
  border-right: none;
  background: rgba(20,16,48,0.5);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(155,77,255,0.18);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(155,77,255,0.04) inset,
    0 20px 50px rgba(0,0,0,0.4),
    0 0 60px rgba(155,77,255,0.05);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
/* gradientowa linia u góry każdej karty — jak w login-card */
#view-client .client-col::before {
  content: ''; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(155,77,255,0.7), transparent);
  z-index: 1;
}
#view-client .client-col:hover {
  transform: translateY(-3px);
  border-color: rgba(155,77,255,0.35);
  box-shadow:
    0 0 0 1px rgba(155,77,255,0.06) inset,
    0 28px 64px rgba(0,0,0,0.5),
    0 0 80px rgba(155,77,255,0.12);
}
#view-client .col-header {
  background: rgba(155,77,255,0.05);
  border-bottom: 1px solid rgba(155,77,255,0.12);
}

/* ── KARTY PLIKÓW: szkło zamiast płaskiego boksu ─────────── */
#view-client .cv-file-row {
  background: rgba(20,16,48,0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(155,77,255,0.16);
  border-radius: 14px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
#view-client .cv-file-row:hover {
  transform: translateX(4px);
  border-color: rgba(155,77,255,0.35);
  box-shadow: 0 8px 30px rgba(155,77,255,0.10);
}

/* ── KARTY PROMOCJI: miękki glow przy hover ──────────────── */
#view-client .promo-card {
  border-radius: 18px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(155,77,255,0.05) 0%, transparent 70%),
    linear-gradient(135deg, rgba(26,22,64,0.7) 0%, rgba(34,29,85,0.55) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(155,77,255,0.18);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
#view-client .promo-card:hover {
  transform: translateY(-4px);
  border-color: rgba(155,77,255,0.35);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45), 0 0 70px rgba(155,77,255,0.12);
}

/* ── PRZYCISKI: bardziej dopracowane, z glow ─────────────── */
#view-client .cv-chat-btn {
  border-radius: 12px;
  transition: all .2s ease;
}
#view-client .cv-chat-btn:hover {
  box-shadow: 0 6px 24px rgba(155,77,255,0.2);
  transform: translateY(-1px);
}

/* ── CZAT: szklane okno rozmowy ──────────────────────────── */
#view-client .cv-chat-wrap {
  margin: 24px auto;
  background: rgba(20,16,48,0.45);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(155,77,255,0.16);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 60px rgba(155,77,255,0.05);
}
#view-client .cv-chat-input {
  background: rgba(12,11,26,0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(155,77,255,0.14);
}

/* ── CZAT KLIENTA: większe okno rozmowy ──────────────────── */
#view-client .cv-chat-wrap { max-width: 860px; }
/* wyższy obszar wiadomości — okno czatu jest bardziej okazałe */
#view-client .cv-chat-messages { min-height: 420px; padding: 24px 28px; gap: 6px; }
/* większe dymki i tekst tylko w czacie klienta */
#view-client .cv-chat-messages .chat-msg { font-size: 14.5px; padding: 12px 16px; max-width: 78%; }
#view-client .cv-chat-messages .chat-av  { width: 34px; height: 34px; font-size: 13px; }
#view-client .cv-chat-messages .chat-time { font-size: 11px; }
#view-client .cv-chat-messages .chat-bubble { margin-bottom: 16px; }
/* większy nagłówek i pole wpisywania */
#view-client .cv-chat-header { padding: 16px 28px; }
#view-client .cv-chat-input { padding: 16px 28px; }
#view-client .cv-chat-input .chat-input { font-size: 14px; padding: 12px 16px; }

/* ── CHAT MODAL: powiększający się czat (overlay z animacją zoom) ── */
.chat-modal-overlay { padding: 24px; }
.chat-modal-box {
  display: flex; flex-direction: column;
  width: 100%; max-width: 760px; height: 86vh; max-height: 720px;
  background: rgba(20,16,48,0.92);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(155,77,255,0.28);
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 80px rgba(155,77,255,0.12);
  transform-origin: center;
  animation: chatZoomIn .32s cubic-bezier(.2,1.1,.35,1) both;
}
@keyframes chatZoomIn {
  from { opacity: 0; transform: scale(.82) translateY(14px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
/* zamykanie z pomniejszeniem */
#modal-chat.closing .chat-modal-box,
#modal-promos.closing .chat-modal-box,
#modal-project.closing .chat-modal-box { animation: chatZoomOut .22s ease both; }
#modal-chat.closing .chat-modal-overlay,
#modal-promos.closing .chat-modal-overlay,
#modal-project.closing .chat-modal-overlay { animation: fadeOut .22s ease both; }
@keyframes chatZoomOut { to { opacity: 0; transform: scale(.88) translateY(10px); } }
@keyframes fadeOut { to { opacity: 0; } }
/* układ wewnątrz modala: nagłówek i input stałe, wiadomości scrollują */
.chat-modal-box .cv-chat-header { flex-shrink: 0; border-bottom: 1px solid rgba(155,77,255,0.16); }
.chat-modal-box .cv-chat-messages {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 24px 28px; display: flex; flex-direction: column; gap: 6px;
}
.chat-modal-box .cv-chat-messages .chat-msg { font-size: 14.5px; padding: 12px 16px; max-width: 78%; }
.chat-modal-box .cv-chat-messages .chat-av { width: 34px; height: 34px; font-size: 13px; }
.chat-modal-box .cv-chat-messages .chat-time { font-size: 11px; }
.chat-modal-box .cv-chat-messages .chat-bubble { margin-bottom: 16px; }
.chat-modal-box .cv-chat-input {
  flex-shrink: 0; display: flex; gap: 10px; padding: 16px 28px;
  border-top: 1px solid rgba(155,77,255,0.16);
  background: rgba(12,11,26,0.6);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.chat-modal-box .cv-chat-input .chat-input { flex: 1; font-size: 14px; padding: 12px 16px; }
@media (max-width: 600px) {
  .chat-modal-overlay {
    padding: 0;
    align-items: flex-start;        /* nie centruj — przypnij do góry widocznego obszaru */
    justify-content: stretch;
  }
  .chat-modal-box {
    /* wysokość = realnie widoczny obszar nad klawiaturą (ustawiane z JS),
       z fallbackiem na 100dvh gdy JS nie zdąży */
    height: var(--chat-vh, 100dvh);
    max-height: none; border-radius: 0; max-width: none;
    animation: none;                /* bez zoomu na mobile — natychmiast pełny ekran */
  }
  /* kompaktowy nagłówek — mniej miejsca, gdy wyskakuje klawiatura */
  .chat-modal-box .cv-chat-header { padding: 10px 14px; gap: 10px; }
  .chat-modal-box .cv-chat-header .chat-av { width: 32px !important; height: 32px !important; font-size: 12px !important; }
  /* tytuł i status mniejsze */
  .chat-modal-box .cv-chat-header > div:nth-child(2) > div:first-child { font-size: 13px !important; }
  .chat-modal-box .cv-chat-header > div:nth-child(2) > div:last-child { font-size: 10px !important; }
  /* ukryj badge projektu, żeby nagłówek był jednolinijkowy i niski */
  .chat-modal-box .cv-chat-header .badge { display: none; }
  .chat-modal-box .cv-chat-header .modal-close { margin-left: auto !important; }
  /* ciaśniejsze wiadomości i pole wpisywania */
  .chat-modal-box .cv-chat-messages { padding: 14px 14px; gap: 4px; }
  .chat-modal-box .cv-chat-messages .chat-bubble { margin-bottom: 12px; }
  .chat-modal-box .cv-chat-input { padding: 10px 14px; }
}

/* ── PROMOS MODAL: siatka kart w powiększającym się oknie ── */
.promos-modal-body { display: block !important; padding: 22px 24px !important; }
.promos-modal-body .cv-promos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 16px;
}
@media (max-width: 600px) {
  .promos-modal-body { padding: 16px 14px !important; }
  .promos-modal-body .cv-promos-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* ── PASKI POSTĘPU w kartach: cieńszy, z glow ────────────── */
#view-client .csi-bar-fill,
#view-client .progress-fill {
  box-shadow: 0 0 8px rgba(155,77,255,0.5);
}

/* responsywność: na wąskich ekranach karty jedna pod drugą */
@media(max-width:900px) {
  #view-client .client-cols { padding: 16px; gap: 14px; }
}

/* ── MOBILE: profil klienta — kompaktowy nagłówek + zapas na dole ── */
@media(max-width:600px) {
  /* górny pasek: logo w jednym rzędzie, dane użytkownika zawijają się ładnie */
  #view-client .cn-top {
    flex-wrap: wrap; gap: 8px; padding: 10px 14px;
  }
  #view-client .cn-right { gap: 8px; flex-wrap: wrap; }
  /* schowaj powitanie i nazwę, zostaw avatar + wyloguj, żeby nie zatłaczać */
  #view-client #client-greeting,
  #view-client #cli-nav-name { display: none; }
  #view-client .btn-logout { padding: 6px 10px; font-size: 11px; }

  /* zakładki: przewijalne w poziomie, mniejsze */
  #view-client .cn-tabs { padding: 0 8px; }
  #view-client .cn-tab { padding: 9px 12px; font-size: 12px; }

  /* mniejszy pasek realizacji i etapu */
  #view-client .process-bar-wrap { padding: 10px 14px 0; }
  #view-client .client-stage-info { padding: 12px 14px; }

  /* kolumny przeglądu: ciaśniejsze; brak dużego dolnego paddingu —
     zapas na dole daje dolny margines sceny + cv-view */
  #view-client .client-cols {
    padding: 14px 14px 0;
    gap: 14px;
  }
  /* gdy aktywny jest inny widok niż przegląd, też daj zapas na dole */
  #view-client .cv-view { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }

  /* czat: zapas pod polem wpisywania, żeby nie chowało się pod paskiem */
  #view-client .cv-chat-messages { padding: 16px 14px; }
  #view-client .cv-chat-header,
  #view-client .cv-chat-input { padding-left: 14px; padding-right: 14px; }
  #view-client .cv-chat-input { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }

  /* mniejszy „pracujący ludek”, odstęp jak między kafelkami (14px) + zapas na dole */
  #view-client .cvw-scene { height: 180px; }
  #cv-main .cv-worker { margin: 14px 14px calc(40px + env(safe-area-inset-bottom)); }
}

/* ═══════════════════════════════════════════════════════════
   UROZMAICENIE PRZEGLĄDU — statystyki + oś czasu aktywności
═══════════════════════════════════════════════════════════════ */

/* layout sekcji w przeglądzie */
#cv-main { display: flex; flex-direction: column; }
#cv-main .client-cols { flex: none; padding-bottom: 0; }
/* scena z animacją bliżej kafelków — odstęp taki sam jak między kafelkami (18px) */
#cv-main .cv-worker { margin: 18px 28px 28px; }

/* ═══════════════════════════════════════════════════════════
   ANIMOWANY PRACUJĄCY LUDEK — naturalna sekwencja zachowań 🐱💻
   Sterowany JS przez atrybut data-state na #cvw-guy.
   Płynne przejścia robi transition; mikroruchy robią keyframes.
═══════════════════════════════════════════════════════════════ */
.cv-worker {
  margin: 10px 28px 28px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 60% 100% at 50% 100%, rgba(155,77,255,0.12) 0%, transparent 70%),
    rgba(20,16,48,0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(155,77,255,0.16);
  overflow: hidden;
}
.cvw-scene {
  position: relative; height: 230px;
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden;
}
/* PODŁOGA — ciemna z fioletowym refleksem */
.cvw-scene::before {
  content:''; position: absolute; left: 0; right: 0; bottom: 0; height: 48px;
  background:
    linear-gradient(180deg, rgba(40,30,80,0.5) 0%, rgba(20,16,48,0.7) 100%);
  border-top: 1px solid rgba(155,77,255,0.25);
  box-shadow: 0 -1px 16px rgba(155,77,255,0.12);
}
/* ŚCIANA — subtelna siatka „tech" */
.cvw-scene::after {
  content:''; position: absolute; left: 0; right: 0; top: 0; bottom: 48px;
  background-image:
    linear-gradient(rgba(155,77,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155,77,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 90% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 40%, black, transparent);
  pointer-events: none;
}
.cvw-ground { display: none; }
.cvw-caption {
  position: absolute; bottom: 10px; left: 0; right: 0; text-align: center;
  font-size: 12px; color: var(--violet2); font-weight: 500;
  transition: opacity .4s ease; z-index: 7;
}

/* ════════ DEKORACJE BIURA ════════ */
/* Okno w kosmos po lewej */
.cvw-window {
  position: absolute; right: 4%; top: 30px; width: 74px; height: 80px;
  border-radius: 8px; overflow: hidden;
  background: linear-gradient(180deg, #1a1140 0%, #0e0826 100%);
  border: 2px solid rgba(155,77,255,0.3);
  box-shadow: inset 0 0 24px rgba(155,77,255,0.18), 0 0 18px rgba(155,77,255,0.12);
  z-index: 1;
}
.cvw-window::before { /* krzyżak okna (nad widokiem) */
  content:''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(rgba(155,77,255,0.3) 2px, transparent 2px) 0 50% / 100% 50%,
    linear-gradient(90deg, rgba(155,77,255,0.3) 2px, transparent 2px) 50% 0 / 50% 100%;
  background-repeat: no-repeat;
}
/* widok za szybą */
.cvw-cityview { position: absolute; inset: 0; overflow: hidden; }
.cvw-window-star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; box-shadow: 0 0 4px #fff; animation: twinkle 2.4s ease-in-out infinite; }
.cvw-window-star.s1 { left: 12px; top: 12px; }
.cvw-window-star.s2 { left: 30px; top: 8px; animation-delay: .8s; }
.cvw-window-star.s3 { left: 20px; top: 22px; animation-delay: 1.5s; }
@keyframes twinkle { 0%,100%{ opacity: .3; } 50%{ opacity: 1; } }
.cvw-window-moon {
  position: absolute; left: 10px; top: 10px; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8e0, #d4c9a0);
  box-shadow: 0 0 12px rgba(255,248,224,0.6);
}
/* sąsiedni budynek (prawa strona widoku) */
.cvw-building {
  position: absolute; right: 0; top: 14px; bottom: 22px; width: 38px;
  background: linear-gradient(180deg, #241a52 0%, #160f38 100%);
  border-left: 1px solid rgba(155,77,255,0.25);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  padding: 6px 5px; align-content: start;
}
.cvw-bwin {
  width: 100%; height: 7px; border-radius: 1px;
  background: rgba(155,77,255,0.12);
}
.cvw-bwin.on {
  background: #ffd98a;
  box-shadow: 0 0 5px rgba(255,217,138,0.7);
  animation: bwinFlicker 6s ease-in-out infinite;
}
.cvw-bwin.on:nth-child(3n) { animation-delay: 2s; }
.cvw-bwin.on:nth-child(2n) { animation-delay: 3.5s; background: #aee0ff; box-shadow: 0 0 5px rgba(174,224,255,0.7); }
@keyframes bwinFlicker { 0%,90%,100%{ opacity: 1; } 93%{ opacity: 0.4; } 96%{ opacity: 1; } }

/* ulica z ruchem (lewa strona widoku) */
.cvw-street {
  position: absolute; left: 0; right: 38px; bottom: 0; height: 22px;
  background: linear-gradient(180deg, #0e0826 0%, #1c1238 100%);
  border-top: 1px solid rgba(155,77,255,0.2);
  overflow: hidden;
}
.cvw-street::before { /* pas drogi */
  content:''; position: absolute; left: 0; right: 0; top: 11px; height: 1px;
  background: repeating-linear-gradient(90deg, rgba(184,127,255,0.4) 0 6px, transparent 6px 12px);
}
.cvw-vehicle { position: absolute; border-radius: 2px; }
/* auta — jadą w prawo i w lewo */
.cvw-car { width: 12px; height: 5px; top: 4px; }
.cvw-car::after { /* światło */
  content:''; position: absolute; width: 2px; height: 2px; border-radius: 50%; top: 1px;
}
.car1 { background: linear-gradient(90deg,#9B4DFF,#B87FFF); animation: drive 4.5s linear infinite; }
.car1::after { right: 0; background: #fff; box-shadow: 0 0 4px #fff; }
.car2 { background: linear-gradient(90deg,#FF6B9D,#c4477a); top: 13px; animation: driveRev 5.5s linear infinite; animation-delay: 1.5s; }
.car2::after { left: 0; background: #ff5252; box-shadow: 0 0 4px #ff5252; }
/* motory — mniejsze, szybsze */
.cvw-bike { width: 7px; height: 3px; }
.bike1 { background: #60A5FA; top: 5px; animation: drive 3s linear infinite; animation-delay: 2s; box-shadow: 0 0 4px rgba(96,165,250,0.6); }
.bike2 { background: #4ADE80; top: 14px; animation: driveRev 3.5s linear infinite; animation-delay: .5s; box-shadow: 0 0 4px rgba(74,222,128,0.6); }
@keyframes drive    { 0%{ left: -16px; } 100%{ left: 110%; } }   /* lewo → prawo */
@keyframes driveRev { 0%{ left: 110%; }  100%{ left: -16px; } }   /* prawo → lewo */

/* Neon z logo ImpulsDev */
.cvw-neon {
  position: absolute; left: 50%; top: 18px; transform: translateX(-50%) rotate(0deg);
  display: flex; align-items: center; gap: 5px;
  font-family: var(--sans); font-weight: 700; font-size: 15px;
  color: #fff; animation: neonFlicker 4s ease-in-out infinite;
  cursor: pointer; transform-origin: center;
  transition: transform .35s cubic-bezier(.34,1.4,.5,1), filter .35s ease;
  padding: 4px 6px; z-index: 4;            /* większy obszar najechania */
}
.cvw-neon:hover {
  transform: translateX(-50%) rotate(-7deg) scale(1.08);
  filter: drop-shadow(0 0 10px rgba(184,127,255,0.9));
}
.cvw-neon-bolt {
  font-size: 16px; filter: drop-shadow(0 0 6px rgba(184,127,255,0.9));
  transition: transform .35s ease;
}
.cvw-neon:hover .cvw-neon-bolt { transform: scale(1.3) rotate(12deg); }
.cvw-neon-text { text-shadow: 0 0 8px rgba(155,77,255,0.9), 0 0 16px rgba(155,77,255,0.5); letter-spacing: .5px; transition: text-shadow .35s ease; }
.cvw-neon:hover .cvw-neon-text { text-shadow: 0 0 12px rgba(184,127,255,1), 0 0 24px rgba(155,77,255,0.8); }
.cvw-neon-text b { color: var(--violet2); font-weight: 700; }
@keyframes neonFlicker {
  0%,100% { opacity: 1; } 92% { opacity: 1; } 93% { opacity: .55; } 94% { opacity: 1; }
  96% { opacity: .6; } 97% { opacity: 1; }
}

/* Półka z książkami i nagrodą (lewa góra) */
.cvw-shelf {
  position: absolute; left: 7%; top: 32px; width: 78px; height: 22px;
  border-bottom: 3px solid rgba(155,77,255,0.4);
  display: flex; align-items: flex-end; gap: 3px; padding-bottom: 2px;
  box-shadow: 0 3px 10px rgba(155,77,255,0.15);
}
.cvw-book { width: 8px; border-radius: 2px 2px 0 0; }
.cvw-book.b1 { height: 18px; background: #9B4DFF; }
.cvw-book.b2 { height: 14px; background: #60A5FA; }
.cvw-book.b3 { height: 20px; background: #B87FFF; }
.cvw-book.b4 { height: 16px; background: #5A32B4; }
.cvw-trophy { font-size: 15px; margin-left: 4px; filter: drop-shadow(0 0 6px rgba(251,191,36,0.5)); }

/* Roślinka (lewy dół) */
.cvw-plant {
  position: absolute; left: 3%; bottom: 44px; font-size: 26px;
  filter: drop-shadow(0 0 8px rgba(74,222,128,0.25));
}

/* ── BIURKO Z BLATEM ─────────────────────────────────────── */
.cvw-desk {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(22px);
  width: 86px; height: 4px; z-index: 2;
}
/* blat */
.cvw-desk-top {
  position: absolute; bottom: 18px; left: -8px; width: 122px; height: 7px;
  border-radius: 4px;
  background: linear-gradient(180deg, #3a2d6b 0%, #2a2052 100%);
  box-shadow: 0 4px 14px rgba(0,0,0,0.4), 0 0 14px rgba(155,77,255,0.18);
  border-top: 1px solid rgba(184,127,255,0.4);
}
/* nogi biurka */
.cvw-desk-leg {
  position: absolute; bottom: 0; width: 5px; height: 18px;
  background: linear-gradient(180deg, #2a2052, #1c1540); border-radius: 0 0 2px 2px;
}
.cvw-desk-leg-l { left: 2px; }
.cvw-desk-leg-r { left: 102px; }
/* monitor — stoi NA blacie (podstawka opiera się o blat) */
.cvw-monitor {
  position: absolute; bottom: 32px; right: 4px;
  width: 50px; height: 34px; border-radius: 5px;
  background: #1a1438; border: 2px solid var(--violet);
  box-shadow: 0 0 18px rgba(155,77,255,0.45);
}
.cvw-monitor-stand {
  position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 7px; background: var(--violet); border-radius: 0 0 3px 3px;
}
.cvw-screen {
  position: absolute; inset: 3px; border-radius: 2px; overflow: hidden;
  background: linear-gradient(180deg, #13103A, #0C0B1A);
}
.cvw-screen::before {
  content:''; position: absolute; left: 5px; top: 5px; right: 5px; height: 2px;
  background: var(--violet2); border-radius: 2px;
  box-shadow: 0 4px 0 rgba(184,127,255,0.6), 0 8px 0 rgba(184,127,255,0.35), 0 12px 0 rgba(184,127,255,0.5);
  animation: codeType 1.2s steps(4) infinite;
}
@keyframes codeType { 0%,100%{ width: 60%; } 50%{ width: 80%; } }
/* klawiatura — na blacie, bliżej ludka */
.cvw-deskkbd {
  position: absolute; bottom: 26px; left: 2px;
  width: 34px; height: 5px; border-radius: 3px;
  background: linear-gradient(180deg, #4a3580, #2a1c52);
  border: 1px solid rgba(155,77,255,0.4); box-shadow: 0 0 8px rgba(155,77,255,0.25);
}
/* kubek na blacie — z prawej strony monitora, leży na blacie */
.cvw-deskmug { position: absolute; bottom: 24px; right: -20px; font-size: 12px; z-index: 3; }
/* lampka biurkowa */
.cvw-lamp {
  position: absolute; bottom: 26px; right: 56px; width: 4px; height: 16px;
  background: #5a3fa0; border-radius: 2px;
}
.cvw-lamp::before { /* ramię + klosz */
  content:''; position: absolute; top: -4px; left: -1px; width: 12px; height: 6px;
  background: var(--violet); border-radius: 6px 6px 2px 2px; transform: rotate(18deg);
  box-shadow: 0 0 14px rgba(184,127,255,0.7);
}
.cvw-lamp::after { /* światło lampki */
  content:''; position: absolute; top: 2px; left: -6px; width: 24px; height: 22px;
  background: radial-gradient(ellipse at top, rgba(255,220,150,0.18), transparent 70%);
  pointer-events: none;
}

/* ── GIRLANDA ŚWIATEŁEK pod sufitem (cała szerokość) ─────── */
.cvw-garland {
  position: absolute; top: 6px; left: 4%; right: 4%; height: 18px;
  pointer-events: none; z-index: 0;
}
.cvw-garland::before { /* sznurek zwisający łukiem */
  content:''; position: absolute; top: 2px; left: 0; right: 0; height: 14px;
  border-bottom: 1.5px solid rgba(155,77,255,0.28);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.cvw-bulb {
  position: absolute; top: 8px; width: 5px; height: 5px; border-radius: 50%;
  animation: bulbGlow 2.6s ease-in-out infinite;
}
.cvw-bulb.g1 { left: 8%;  background: #B87FFF; box-shadow: 0 0 6px #B87FFF; top: 11px; animation-delay: 0s;   }
.cvw-bulb.g2 { left: 22%; background: #60A5FA; box-shadow: 0 0 6px #60A5FA; top: 13px; animation-delay: .4s;  }
.cvw-bulb.g3 { left: 36%; background: #4ADE80; box-shadow: 0 0 6px #4ADE80; top: 14px; animation-delay: .8s;  }
.cvw-bulb.g4 { left: 50%; background: #FBBF24; box-shadow: 0 0 6px #FBBF24; top: 14px; animation-delay: 1.2s; }
.cvw-bulb.g5 { left: 64%; background: #F87171; box-shadow: 0 0 6px #F87171; top: 14px; animation-delay: 1.6s; }
.cvw-bulb.g6 { left: 78%; background: #9B4DFF; box-shadow: 0 0 6px #9B4DFF; top: 13px; animation-delay: 2s;   }
.cvw-bulb.g7 { left: 92%; background: #B87FFF; box-shadow: 0 0 6px #B87FFF; top: 11px; animation-delay: 2.4s; }
@keyframes bulbGlow { 0%,100% { opacity: .45; } 50% { opacity: 1; } }

/* ── ZEGAR ŚCIENNY (prawa ściana, między logo a oknem) ───── */
.cvw-clock {
  position: absolute; right: 29%; top: 32px; width: 20px; height: 20px;
  border-radius: 50%; background: #1a1438;
  border: 2px solid rgba(184,127,255,0.55);
  box-shadow: 0 0 10px rgba(155,77,255,0.3), inset 0 0 6px rgba(0,0,0,0.5);
  z-index: 1;
}
.cvw-clock::before, .cvw-clock::after { /* wskazówki */
  content:''; position: absolute; left: 50%; top: 50%;
  background: var(--violet2); transform-origin: bottom center; border-radius: 2px;
}
.cvw-clock::before { width: 1.5px; height: 7px; margin-left: -.75px; margin-top: -7px;
  animation: clockMin 8s linear infinite; }
.cvw-clock::after  { width: 1.5px; height: 5px; margin-left: -.75px; margin-top: -5px;
  animation: clockHour 48s linear infinite; }
@keyframes clockMin  { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes clockHour { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* ── TABLICA KORKOWA z karteczkami (lewa ściana, obok ramki galaktyki) ── */
.cvw-board {
  position: absolute; left: 15%; top: 64px; width: 40px; height: 30px;
  border-radius: 4px; background: #3a2a1c;
  border: 2px solid #5a4630;
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
  z-index: 1;
}
.cvw-note { position: absolute; width: 12px; height: 12px; border-radius: 1px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.cvw-note.n1 { left: 4px;  top: 4px;  background: #FBBF24; transform: rotate(-6deg); }
.cvw-note.n2 { left: 19px; top: 5px;  background: #4ADE80; transform: rotate(5deg);  }
.cvw-note.n3 { left: 11px; top: 17px; background: #60A5FA; transform: rotate(-3deg); }
.cvw-note.n4 { left: 26px; top: 17px; background: #F87171; transform: rotate(8deg);  }

/* ── OBRAZEK W RAMCE (lewa ściana) ───────────────────────── */
.cvw-frame {
  position: absolute; left: 6%; top: 64px; width: 26px; height: 22px;
  border-radius: 3px; background: linear-gradient(135deg, #2a2052, #13103A);
  border: 2px solid rgba(184,127,255,0.5);
  box-shadow: 0 0 8px rgba(155,77,255,0.2);
  display: flex; align-items: center; justify-content: center; font-size: 11px;
  z-index: 1;
}

/* ── KRZESŁO ─────────────────────────────────────────────── */
.cvw-chair {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-32px);
  width: 30px; height: 50px; z-index: 1;
}
.cvw-chair-back {
  position: absolute; bottom: 22px; left: 2px; width: 6px; height: 26px;
  border-radius: 4px; background: #4a3580;
}
.cvw-chair-seat {
  position: absolute; bottom: 20px; left: 0; width: 26px; height: 6px;
  border-radius: 4px; background: #5a3fa0;
}
.cvw-chair-pole { position: absolute; bottom: 6px; left: 11px; width: 4px; height: 16px; background: #3a2570; }
.cvw-chair-base { position: absolute; bottom: 2px; left: 4px; width: 18px; height: 4px; border-radius: 3px; background: #3a2570; }

/* ── LUDEK (kontener) ────────────────────────────────────── */
.cvw-guy {
  position: absolute; bottom: 40px; left: 50%;
  width: 40px; height: 56px;
  transform: translateX(-46px);            /* domyślna pozycja: przy biurku */
  transform-origin: bottom center;
  transition: transform .6s cubic-bezier(.34,1.2,.64,1), bottom .6s cubic-bezier(.34,1.2,.64,1);
  z-index: 3;
}
/* podskok przy kliknięciu — zachowuje pozycję roboczą (translateX -22px) */
.cvw-guy.cvw-hop {
  animation: cvwHop .45s cubic-bezier(.3,1.6,.5,1) 2 !important;
}
@keyframes cvwHop {
  0%,100% { transform: translateX(-22px) translateY(0); }
  40%     { transform: translateX(-22px) translateY(-16px); }
}
/* delikatny oddech/idle nałożony jako animacja na wewn. wrapper poprzez head bob */
.cvw-head {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #B87FFF, #9B4DFF);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 16px rgba(155,77,255,0.5);
  transition: transform .5s ease;
  z-index: 2;
}
.cvw-face { font-size: 16px; line-height: 1; transition: transform .3s ease; }
.cvw-sweat {
  position: absolute; top: 0px; right: -2px; font-size: 10px; opacity: 0;
  transition: opacity .3s ease;
}
.cvw-torso {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 12px 12px 7px 7px;
  background: linear-gradient(135deg, #5A32B4, #9B4DFF);
  transition: height .5s ease, transform .5s ease;
}
/* ramiona */
.cvw-arm {
  position: absolute; top: 3px; width: 6px; height: 18px; border-radius: 4px;
  background: #7B4FD4; transform-origin: top center;
  transition: transform .5s cubic-bezier(.34,1.2,.64,1);
}
.cvw-arm-l { left: -3px; transform: rotate(12deg); }
.cvw-arm-r { right: -3px; transform: rotate(-12deg); }
.cvw-hand {
  position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: #8B5FE0;
}
/* rekwizyty trzymane w prawej ręce */
.cvw-prop {
  position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%) scale(0);
  font-size: 13px; opacity: 0; transition: opacity .35s ease, transform .35s ease;
}
/* nogi */
.cvw-leg {
  position: absolute; bottom: -14px; width: 7px; height: 16px; border-radius: 4px;
  background: #3a2570; transform-origin: top center;
  transition: transform .5s cubic-bezier(.34,1.2,.64,1), height .5s ease;
}
.cvw-leg-l { left: 9px; }
.cvw-leg-r { right: 9px; }

/* idle mikroruch głowy (oddech) — zawsze, subtelnie */
.cvw-head { animation: headBreath 3.2s ease-in-out infinite; }
@keyframes headBreath {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%     { transform: translateX(-50%) translateY(-1.5px); }
}

/* ════════════ POZY / STANY (data-state) ════════════ */

/* SITTING: siedzi przy biurku, nogi zgięte (krótkie), spokój */
.cvw-guy[data-state="sitting"] { transform: translateX(-22px); bottom: 50px; }
.cvw-guy[data-state="sitting"] .cvw-leg { height: 10px; transform: rotate(0deg) translateY(2px); }
.cvw-guy[data-state="sitting"] .cvw-arm-l { transform: rotate(40deg); }
.cvw-guy[data-state="sitting"] .cvw-arm-r { transform: rotate(-40deg); }

/* TYPING: jak sitting, ale ręce stukają (keyframes) */
.cvw-guy[data-state="typing"] { transform: translateX(-22px); bottom: 50px; }
.cvw-guy[data-state="typing"] .cvw-leg { height: 10px; transform: translateY(2px); }
.cvw-guy[data-state="typing"] .cvw-arm-l { animation: typeL .42s ease-in-out infinite; }
.cvw-guy[data-state="typing"] .cvw-arm-r { animation: typeR .42s ease-in-out infinite; }
.cvw-guy[data-state="typing"] .cvw-head { animation: headBreath 1.2s ease-in-out infinite; }
@keyframes typeL { 0%,100%{ transform: rotate(46deg); } 50%{ transform: rotate(56deg); } }
@keyframes typeR { 0%,100%{ transform: rotate(-56deg); } 50%{ transform: rotate(-46deg); } }

/* STRESS: pisze szybko + pot, lekkie dygotanie */
.cvw-guy[data-state="stress"] { transform: translateX(-22px); bottom: 50px; }
.cvw-guy[data-state="stress"] .cvw-leg { height: 10px; transform: translateY(2px); }
.cvw-guy[data-state="stress"] .cvw-arm-l { animation: typeL .18s ease-in-out infinite; }
.cvw-guy[data-state="stress"] .cvw-arm-r { animation: typeR .18s ease-in-out infinite; }
.cvw-guy[data-state="stress"] .cvw-sweat { opacity: 1; animation: sweatRun 1.6s ease-in infinite; }
.cvw-guy[data-state="stress"] { animation: jitter .12s linear infinite; }
@keyframes jitter { 0%,100%{ margin-left:0; } 25%{ margin-left:-1px; } 75%{ margin-left:1px; } }
@keyframes sweatRun {
  0%   { opacity: 0; transform: translateY(-2px); }
  20%  { opacity: 1; }
  80%  { opacity: 1; transform: translateY(10px); }
  100% { opacity: 0; transform: translateY(14px); }
}

/* FALLING: spada z krzesła — obrót i ląduje na ziemi */
.cvw-guy[data-state="falling"] {
  transform: translateX(-58px) rotate(-78deg);
  bottom: 40px;
  transition: transform .55s cubic-bezier(.5,-0.3,.7,1), bottom .55s ease-in;
}
.cvw-guy[data-state="falling"] .cvw-arm-l { transform: rotate(120deg); }
.cvw-guy[data-state="falling"] .cvw-arm-r { transform: rotate(-120deg); }
.cvw-guy[data-state="falling"] .cvw-leg-l { transform: rotate(30deg); }
.cvw-guy[data-state="falling"] .cvw-leg-r { transform: rotate(-20deg); }
.cvw-guy[data-state="falling"] .cvw-head { animation: none; transform: translateX(-50%); }

/* GETUP: podnosi się — przykuca i wstaje */
.cvw-guy[data-state="getup"] {
  transform: translateX(-52px) rotate(0deg); bottom: 40px;
}
.cvw-guy[data-state="getup"] .cvw-leg { height: 14px; transform: translateY(0); }
.cvw-guy[data-state="getup"] .cvw-arm-l { transform: rotate(20deg); }
.cvw-guy[data-state="getup"] .cvw-arm-r { transform: rotate(-20deg); }

/* STAND: stoi prosto */
.cvw-guy[data-state="stand"] { transform: translateX(-52px); bottom: 40px; }
.cvw-guy[data-state="stand"] .cvw-leg { height: 16px; }
.cvw-guy[data-state="stand"] .cvw-arm-l { transform: rotate(10deg); }
.cvw-guy[data-state="stand"] .cvw-arm-r { transform: rotate(-10deg); }

/* STRETCH: przeciąga się — ręce w górę */
.cvw-guy[data-state="stretch"] { transform: translateX(-52px); bottom: 40px; }
.cvw-guy[data-state="stretch"] .cvw-leg { height: 16px; }
.cvw-guy[data-state="stretch"] .cvw-arm-l { transform: rotate(-150deg); }
.cvw-guy[data-state="stretch"] .cvw-arm-r { transform: rotate(150deg); }
.cvw-guy[data-state="stretch"] .cvw-torso { height: 30px; }
.cvw-guy[data-state="stretch"] .cvw-head { transform: translateX(-50%) translateY(-2px); }

/* WALK-RIGHT / WALK-LEFT: idzie (nogi machają), trzyma teczkę */
.cvw-guy[data-state="walkR"] { transform: translateX(70px); bottom: 40px; }
.cvw-guy[data-state="walkL"] { transform: translateX(-110px); bottom: 40px; }
.cvw-guy[data-state="walkR"] .cvw-leg-l,
.cvw-guy[data-state="walkL"] .cvw-leg-l { height: 16px; animation: stepA .4s ease-in-out infinite; }
.cvw-guy[data-state="walkR"] .cvw-leg-r,
.cvw-guy[data-state="walkL"] .cvw-leg-r { height: 16px; animation: stepB .4s ease-in-out infinite; }
.cvw-guy[data-state="walkR"] .cvw-arm-l,
.cvw-guy[data-state="walkL"] .cvw-arm-l { animation: swingA .4s ease-in-out infinite; }
.cvw-guy[data-state="walkR"] .cvw-arm-r,
.cvw-guy[data-state="walkL"] .cvw-arm-r { transform: rotate(-30deg); } /* trzyma teczkę z boku */
@keyframes stepA { 0%,100%{ transform: rotate(22deg); } 50%{ transform: rotate(-22deg); } }
@keyframes stepB { 0%,100%{ transform: rotate(-22deg); } 50%{ transform: rotate(22deg); } }
@keyframes swingA { 0%,100%{ transform: rotate(-25deg); } 50%{ transform: rotate(25deg); } }

/* DRINK: stoi i pije kawę — prawa ręka do twarzy */
.cvw-guy[data-state="drink"] { transform: translateX(-52px); bottom: 40px; }
.cvw-guy[data-state="drink"] .cvw-leg { height: 16px; }
.cvw-guy[data-state="drink"] .cvw-arm-l { transform: rotate(10deg); }
.cvw-guy[data-state="drink"] .cvw-arm-r { transform: rotate(-135deg); }
.cvw-guy[data-state="drink"] .cvw-head { transform: translateX(-50%) rotate(-8deg); animation: none; }

/* SLEEP: drzemka przy biurku — głowa opada, kołysze się */
.cvw-guy[data-state="sleep"] { transform: translateX(-22px); bottom: 50px; }
.cvw-guy[data-state="sleep"] .cvw-leg { height: 10px; transform: translateY(2px); }
.cvw-guy[data-state="sleep"] .cvw-arm-l { transform: rotate(70deg); }
.cvw-guy[data-state="sleep"] .cvw-arm-r { transform: rotate(-70deg); }
.cvw-guy[data-state="sleep"] .cvw-head { transform: translateX(-50%) rotate(18deg) translateY(4px); animation: sleepBob 2.4s ease-in-out infinite; }
@keyframes sleepBob { 0%,100%{ transform: translateX(-50%) rotate(18deg) translateY(4px); } 50%{ transform: translateX(-50%) rotate(22deg) translateY(6px); } }

/* CELEBRATE: świętuje — ręce w górę, podskakuje */
.cvw-guy[data-state="celebrate"] { transform: translateX(-50px); bottom: 40px; animation: celebrateJump .5s ease-in-out infinite; }
.cvw-guy[data-state="celebrate"] .cvw-leg { height: 16px; }
.cvw-guy[data-state="celebrate"] .cvw-arm-l { animation: celebrateArmL .5s ease-in-out infinite; }
.cvw-guy[data-state="celebrate"] .cvw-arm-r { animation: celebrateArmR .5s ease-in-out infinite; }
@keyframes celebrateJump { 0%,100%{ transform: translateX(-50px) translateY(0); } 50%{ transform: translateX(-50px) translateY(-10px); } }
@keyframes celebrateArmL { 0%,100%{ transform: rotate(-160deg); } 50%{ transform: rotate(-200deg); } }
@keyframes celebrateArmR { 0%,100%{ transform: rotate(160deg); } 50%{ transform: rotate(200deg); } }

/* PHONE: rozmawia przez telefon — ręka przy uchu */
.cvw-guy[data-state="phone"] { transform: translateX(-50px); bottom: 40px; }
.cvw-guy[data-state="phone"] .cvw-leg { height: 16px; }
.cvw-guy[data-state="phone"] .cvw-arm-l { transform: rotate(10deg); }
.cvw-guy[data-state="phone"] .cvw-arm-r { transform: rotate(-150deg); }
.cvw-guy[data-state="phone"] .cvw-head { animation: phoneNod 1.1s ease-in-out infinite; }
@keyframes phoneNod { 0%,100%{ transform: translateX(-50%) rotate(-6deg); } 50%{ transform: translateX(-50%) rotate(2deg); } }

/* DANCE: tańczy z radości — kołysze się na boki */
.cvw-guy[data-state="dance"] { transform: translateX(-50px); bottom: 40px; animation: danceSway .45s ease-in-out infinite; }
.cvw-guy[data-state="dance"] .cvw-leg-l { height: 16px; animation: stepA .45s ease-in-out infinite; }
.cvw-guy[data-state="dance"] .cvw-leg-r { height: 16px; animation: stepB .45s ease-in-out infinite; }
.cvw-guy[data-state="dance"] .cvw-arm-l { animation: danceArmL .45s ease-in-out infinite; }
.cvw-guy[data-state="dance"] .cvw-arm-r { animation: danceArmR .45s ease-in-out infinite; }
@keyframes danceSway { 0%,100%{ transform: translateX(-50px) rotate(-7deg); } 50%{ transform: translateX(-50px) rotate(7deg); } }
@keyframes danceArmL { 0%,100%{ transform: rotate(-120deg); } 50%{ transform: rotate(-40deg); } }
@keyframes danceArmR { 0%,100%{ transform: rotate(40deg); } 50%{ transform: rotate(120deg); } }

/* FACEPALM: frustracja — ręka na czole */
.cvw-guy[data-state="facepalm"] { transform: translateX(-22px); bottom: 50px; }
.cvw-guy[data-state="facepalm"] .cvw-leg { height: 10px; transform: translateY(2px); }
.cvw-guy[data-state="facepalm"] .cvw-arm-l { transform: rotate(10deg); }
.cvw-guy[data-state="facepalm"] .cvw-arm-r { transform: rotate(-160deg); }
.cvw-guy[data-state="facepalm"] .cvw-head { transform: translateX(-50%) rotate(8deg); animation: none; }

/* STARE: wpatruje się w monitor z niedowierzaniem — pochyla się do przodu */
.cvw-guy[data-state="stare"] { transform: translateX(-18px); bottom: 50px; }
.cvw-guy[data-state="stare"] .cvw-leg { height: 10px; transform: translateY(2px); }
.cvw-guy[data-state="stare"] .cvw-arm-l { transform: rotate(50deg); }
.cvw-guy[data-state="stare"] .cvw-arm-r { transform: rotate(-50deg); }
.cvw-guy[data-state="stare"] .cvw-head { transform: translateX(-50%) translateX(4px); animation: none; }

/* rekwizyty: pokazywane gdy ludek je trzyma (klasy na #cvw-guy) */
.cvw-guy.holding-folder .cvw-folder-prop { opacity: 1; transform: translateX(-50%) scale(1); }
.cvw-guy.holding-mug    .cvw-mug-prop    { opacity: 1; transform: translateX(-50%) scale(1); }

/* ═══════════ SZEF W GARNITURZE 👔 ═══════════ */
.cvw-boss {
  position: absolute; bottom: 40px; left: 50%;
  width: 42px; height: 60px;
  transform: translateX(160px);            /* domyślnie poza sceną z prawej */
  transform-origin: bottom center;
  opacity: 0;
  transition: transform .9s cubic-bezier(.4,0,.3,1), opacity .3s ease;
  z-index: 4;
}
.cvw-boss-head {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #d9c5a0, #c9b088); /* odcień skóry */
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 2;
}
.cvw-boss-face { font-size: 15px; line-height: 1; }
.cvw-boss-torso {
  position: absolute; top: 24px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px; border-radius: 8px 8px 5px 5px;
  background: linear-gradient(135deg, #1a1a2e, #2a2a3e); /* ciemny garnitur */
  border-top: 2px solid #0f0f1a;
}
.cvw-boss-tie {
  position: absolute; top: 1px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 14px;
  background: linear-gradient(180deg, var(--violet), #c4477a);
  clip-path: polygon(50% 0, 100% 20%, 70% 100%, 30% 100%, 0 20%);
}
.cvw-boss-arm {
  position: absolute; top: 26px; width: 6px; height: 18px; border-radius: 4px;
  background: #22223a; transform-origin: top center;
  transition: transform .4s cubic-bezier(.34,1.2,.64,1);
}
.cvw-boss-arm-l { left: 3px; transform: rotate(12deg); }
.cvw-boss-arm-r { right: 3px; transform: rotate(-12deg); }
.cvw-boss-leg {
  position: absolute; bottom: -14px; width: 7px; height: 16px; border-radius: 3px;
  background: #16162a; transform-origin: top center;
  transition: transform .4s ease;
}
.cvw-boss-leg-l { left: 10px; }
.cvw-boss-leg-r { right: 10px; }

/* WALK-IN: wchodzi z prawej do śpiącego */
.cvw-boss[data-state="walkin"] { opacity: 1; transform: translateX(80px); }
.cvw-boss[data-state="walkin"] .cvw-boss-leg-l { animation: stepA .4s ease-in-out infinite; }
.cvw-boss[data-state="walkin"] .cvw-boss-leg-r { animation: stepB .4s ease-in-out infinite; }
.cvw-boss[data-state="walkin"] .cvw-boss-arm-l { animation: swingA .4s ease-in-out infinite; }

/* SCOLD: stoi obok i beszta — macha palcem (ręką) */
.cvw-boss[data-state="scold"] { opacity: 1; transform: translateX(80px); }
.cvw-boss[data-state="scold"] .cvw-boss-arm-r { animation: bossWag .3s ease-in-out infinite; }
@keyframes bossWag { 0%,100%{ transform: rotate(-150deg); } 50%{ transform: rotate(-110deg); } }

/* WALK-OUT: wychodzi w prawo */
.cvw-boss[data-state="walkout"] { opacity: 1; transform: translateX(180px); }
.cvw-boss[data-state="walkout"] .cvw-boss-leg-l { animation: stepA .4s ease-in-out infinite; }
.cvw-boss[data-state="walkout"] .cvw-boss-leg-r { animation: stepB .4s ease-in-out infinite; }

/* OFF: poza sceną */
.cvw-boss[data-state="off"] { opacity: 0; transform: translateX(160px); }

/* ── DYMEK MYŚLI ─────────────────────────────────────────── */
.cvw-bubble {
  position: absolute; top: 78px; left: 50%; transform: translateX(10px) scale(.6);
  background: rgba(20,16,48,0.92);
  border: 1px solid rgba(155,77,255,0.35);
  border-radius: 12px; padding: 6px 12px;
  font-size: 12px; color: var(--violet3); white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 0 24px rgba(155,77,255,0.15);
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
  z-index: 5;
}
.cvw-bubble::after {
  content:''; position: absolute; bottom: -5px; left: 18px;
  width: 9px; height: 9px; background: rgba(20,16,48,0.92);
  border-right: 1px solid rgba(155,77,255,0.35); border-bottom: 1px solid rgba(155,77,255,0.35);
  transform: rotate(45deg);
}
.cvw-bubble.show { opacity: 1; transform: translateX(10px) scale(1); }

/* dymek szefa — po prawej, czerwonawy/poważny */
.cvw-bubble-boss {
  left: auto; right: 50%; transform: translateX(140px) scale(.6);
  border-color: rgba(248,113,113,0.5);
  color: #fca5a5;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 0 24px rgba(248,113,113,0.18);
  z-index: 6;
}
.cvw-bubble-boss::after {
  left: auto; right: 18px;
  border-color: rgba(248,113,113,0.5);
}
.cvw-bubble-boss.show { transform: translateX(140px) scale(1); }

/* responsywność ludka */
@media(max-width:900px) {
  .cv-worker { margin: 12px 16px 20px; }
}

/* ── ADMIN / EMPLOYEE extra CSS ───────────────────────────── */

/* role badge in sidebar */
.role-crown { font-size: 10px; background: linear-gradient(135deg,#F59E0B,#D97706); color: #000; padding: 2px 7px; border-radius: 20px; font-family: var(--mono); font-weight: 700; letter-spacing: 1px; margin-left: 6px; }
.role-emp   { font-size: 10px; background: rgba(155,77,255,0.2); color: var(--violet2); padding: 2px 7px; border-radius: 20px; font-family: var(--mono); font-weight: 700; letter-spacing: 1px; margin-left: 6px; }

/* edit modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .2s ease; }
.modal-box { background: var(--card); border: 1px solid var(--border2); border-radius: 16px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: 0 0 60px rgba(155,77,255,0.2); }
/* tryb demo — komunikat powitalny */
.demo-box { padding: 30px 28px; text-align: center; background: radial-gradient(120% 120% at 50% 0%, rgba(155,77,255,0.14), var(--card) 60%); border-color: var(--border2); }
.demo-badge { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--violet2); background: rgba(155,77,255,0.14); border: 1px solid var(--border2); padding: 6px 14px; border-radius: 20px; margin-bottom: 16px; }
.demo-title { font-size: 22px; font-weight: 700; color: var(--white); margin-bottom: 14px; }
.demo-text { font-size: 13.5px; line-height: 1.6; color: var(--text); margin-bottom: 14px; }
.demo-text b { color: var(--white); font-weight: 600; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 16px; font-weight: 700; color: var(--white); }
.modal-close { background: none; border: 1px solid var(--border); color: var(--muted); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.modal-close:hover { border-color: var(--danger); color: var(--danger); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* form inside modal */
.form-field { margin-bottom: 16px; }
.form-label { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 10px 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 8px; color: var(--white); font-family: var(--sans); font-size: 13px; outline: none; transition: border-color .2s; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(155,77,255,0.1); }
.form-textarea { min-height: 80px; resize: vertical; }
.form-select { appearance: none; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-range { width: 100%; accent-color: var(--violet); cursor: pointer; }
.range-val { font-family: var(--mono); font-size: 12px; color: var(--violet2); font-weight: 600; }

/* step editor */
.step-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.step-row .step-num { font-family: var(--mono); font-size: 10px; color: var(--muted); min-width: 20px; }
.step-row .step-name { flex: 1; font-size: 12px; color: var(--white); }
.step-status { display: flex; gap: 4px; }
.step-btn { padding: 3px 8px; border-radius: 6px; font-size: 10px; cursor: pointer; border: none; font-weight: 600; transition: all .15s; }
.step-btn.done   { background: rgba(74,222,128,0.15); color: #4ADE80; }
.step-btn.active { background: rgba(155,77,255,0.2); color: var(--violet2); }
.step-btn.pending{ background: rgba(255,255,255,0.05); color: var(--muted); }
.step-btn.sel    { box-shadow: 0 0 0 2px var(--violet); }

/* action btn */
.btn-edit { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; border: 1px solid var(--border2); background: rgba(155,77,255,0.08); color: var(--violet2); transition: all .15s; font-family: var(--sans); }
.btn-edit:hover { background: rgba(155,77,255,0.2); }
.btn-del  { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; border: 1px solid rgba(248,113,113,0.2); background: rgba(248,113,113,0.06); color: var(--danger); transition: all .15s; font-family: var(--sans); }
.btn-del:hover  { background: rgba(248,113,113,0.15); }

/* toast */
.toast { position: fixed; bottom: 24px; right: 24px; z-index: 999; background: var(--card); border: 1px solid var(--success); border-radius: 10px; padding: 12px 18px; font-size: 13px; color: var(--white); display: flex; align-items: center; gap: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); animation: fadeIn .3s ease; }
.toast.error { border-color: var(--danger); }