/* ══════════════════════════════════════════════════════════════
   UniMC AdminPanel — PREMIUM REDESIGN
   Ultra Modern · Dark Luxury · Enterprise SaaS · 2030 Edition
   ══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@200;300;400;500;600;700;800&family=DM+Mono:wght@300;400;500&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ══ CSS VARIABLES ══ */
:root {
  --bg:          #07090f;
  --bg-primary:  #07090f;
  --bg-sidebar:  #05070c;
  --bg-panel:    #080b14;
  --bg-card:     rgba(10,13,24,0.92);
  --bg-elevated: rgba(13,16,28,0.95);

  --s1: rgba(255,255,255,0.028);
  --s2: rgba(255,255,255,0.055);
  --s3: rgba(255,255,255,0.085);

  --border:  rgba(255,255,255,0.055);
  --border2: rgba(255,255,255,0.090);
  --border3: rgba(255,255,255,0.130);

  --text:   #eef0f8;
  --text2:  rgba(238,240,248,0.75);
  --muted:  rgba(238,240,248,0.30);
  --muted2: rgba(238,240,248,0.50);

  /* Premium accent palette */
  --indigo:   #6366f1;
  --violet:   #8b5cf6;
  --cyan:     #22d3ee;
  --sapphire: #3b82f6;
  --emerald:  #10b981;
  --amber:    #f59e0b;
  --rose:     #f43f5e;
  --slate:    #94a3b8;

  /* Semantic aliases */
  --blue:   #6366f1;
  --purple: #8b5cf6;
  --teal:   #10b981;
  --green:  #10b981;
  --red:    #f43f5e;
  --warn:   #f59e0b;
  --mint:   #22d3ee;

  /* Glow variants */
  --glow-indigo: rgba(99,102,241,0.18);
  --glow-violet: rgba(139,92,246,0.18);
  --glow-cyan:   rgba(34,211,238,0.15);

  /* Cinematic gradients */
  --grad-primary:  linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --grad-aurora:   linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
  --grad-emerald:  linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-rose:     linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  --grad-amber:    linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --grad-glass:    linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);

  --sw:      260px;
  --sw-col:  64px;
  --font:    'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-mono: 'DM Mono', monospace;
  --font-display: 'Sora', sans-serif;
  --radius:  20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
}

/* ══ LIGHT MODE ══ */
body.light-mode {
  --bg: #f4f5f9;
  --bg-primary: #f4f5f9;
  --bg-sidebar: #ffffff;
  --bg-card: rgba(255,255,255,0.90);
  --bg-elevated: rgba(255,255,255,0.95);
  --s1: rgba(0,0,0,0.035);
  --s2: rgba(0,0,0,0.065);
  --s3: rgba(0,0,0,0.095);
  --border:  rgba(0,0,0,0.07);
  --border2: rgba(0,0,0,0.11);
  --border3: rgba(0,0,0,0.16);
  --text:   #0f1118;
  --text2:  rgba(15,17,24,0.75);
  --muted:  rgba(15,17,24,0.35);
  --muted2: rgba(15,17,24,0.55);
}
body.light-mode { background: var(--bg); color: var(--text); }
body.light-mode .sidebar { background: var(--bg-sidebar); border-right: 1px solid var(--border); box-shadow: 4px 0 32px rgba(0,0,0,0.06); }
body.light-mode .main { background: var(--bg); }
body.light-mode .card, body.light-mode .stat-card { background: rgba(255,255,255,0.90); border-color: var(--border); }
body.light-mode .topbar { background: rgba(255,255,255,0.85); border-bottom-color: var(--border); }
body.light-mode .modal { background: #ffffff; border-color: var(--border2); }
body.light-mode .fi, body.light-mode .fs, body.light-mode .fta { background: var(--s1); border-color: var(--border2); color: var(--text); }
body.light-mode .btn-ghost { background: var(--s2); color: var(--muted2); }
body.light-mode .nav-item:hover, body.light-mode .nav-item.active { background: var(--s2); }
body.light-mode .right-drawer { background: #ffffff; }
body.light-mode .data-table thead th { background: rgba(0,0,0,0.04); }
body.light-mode .tb-title { background: linear-gradient(135deg, #0f1118, #374151); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
body.light-mode .orb { opacity: 0.06; }
body.light-mode #bg-canvas { opacity: 0.04; }
body.light-mode .card::before { opacity: 0.4; }
body.light-mode .stat-card::before { opacity: 0.4; }

/* ══ TRANSITIONS ══ */
.sidebar { transition: width 0.35s cubic-bezier(0.4,0,0.2,1); overflow: hidden; }
.main    { transition: margin-left 0.35s cubic-bezier(0.4,0,0.2,1); }
.logo-texts, .nav-group-label, .nav-label, .nbadge, .user-name, .user-role, .user-chevron {
  transition: opacity 0.2s, max-width 0.3s, transform 0.2s;
  max-width: 200px; overflow: hidden; white-space: nowrap;
}

/* ══ COLLAPSED STATE ══ */
body.sbc .sidebar      { width: var(--sw-col); }
body.sbc .main         { margin-left: var(--sw-col); }
body.sbc .sidebar-logo { justify-content: center; padding: 16px 8px; }
body.sbc .logo-texts, body.sbc .admin-logo-wrap, body.sbc .nav-group-label,
body.sbc .nav-label, body.sbc .nbadge, body.sbc .user-name, body.sbc .user-chevron,
body.sbc .madeby-text, body.sbc .madeby-sparkle {
  opacity: 0; max-width: 0; pointer-events: none;
}
body.sbc .nav-scroll   { padding: 10px 8px; }
body.sbc .nav-item     { justify-content: center; padding: 10px; gap: 0; }
body.sbc .nav-ico-wrap { margin: 0; }
body.sbc .user-pill    { justify-content: center; padding: 8px; }
body.sbc .sidebar-foot { padding: 10px 8px 16px; }
body.sbc .madeby       { padding: 4px 8px; }

/* ══ TOOLTIP (collapsed) ══ */
.nav-tooltip {
  position: fixed; left: calc(var(--sw-col) + 8px); top: auto;
  background: rgba(10,13,24,0.98); color: var(--text); font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: var(--radius-xs); border: 1px solid var(--border2);
  white-space: nowrap; pointer-events: none; opacity: 0; z-index: 9999;
  backdrop-filter: blur(20px); box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: opacity 0.15s; font-family: var(--font);
}
body.sbc .nav-item:hover .nav-tooltip { opacity: 1; }

/* ══════════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════════ */
html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* ══ BACKGROUND AMBIENT ══ */
.orb { display: none; }
#bg-canvas { display: none; }

body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% -10%, rgba(99,102,241,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 110%, rgba(139,92,246,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(34,211,238,0.03) 0%, transparent 70%);
}
body::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.012) 1px, transparent 0);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}

/* ══════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════ */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sw); z-index: 200;
  display: flex; flex-direction: column;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 40px rgba(0,0,0,0.35);
}

.sidebar-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  transition: padding 0.35s, justify-content 0s;
}

.admin-logo-wrap { display: flex; flex-direction: column; gap: 2px; }
.admin-logo-line1 { display: flex; align-items: center; gap: 0; }

/* Hide old glitch elements */
.admin-logo-line1 .glitch-a,
.admin-logo-line1 .glitch-b { display: none; }

.admin-logo-line1 .uni {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 800; letter-spacing: -0.03em;
  background: var(--grad-aurora);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.admin-logo-line1 .mc {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 300; letter-spacing: -0.02em;
  color: var(--text2);
}
.admin-logo-bar { display: none; }
.admin-logo-line2 {
  font-size: 9.5px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); font-family: var(--font-mono);
  margin-top: 1px;
}

/* ── Nav scroll ── */
.nav-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 16px 12px;
  scrollbar-width: none;
  transition: padding 0.35s;
}
.nav-scroll::-webkit-scrollbar { display: none; }

/* ── Nav group label ── */
.nav-group-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
  padding: 14px 10px 6px; font-family: var(--font-mono);
}

/* ── Nav item ── */
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  cursor: pointer; position: relative;
  color: var(--muted2); font-size: 13px; font-weight: 500;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  margin-bottom: 1px;
}
.nav-item:hover {
  background: var(--s1); color: var(--text);
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.14), rgba(139,92,246,0.08));
  color: var(--text);
  border: 1px solid rgba(99,102,241,0.18);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 2.5px; border-radius: 0 2px 2px 0;
  background: var(--grad-primary);
  box-shadow: 0 0 12px rgba(99,102,241,0.5);
}

/* Per-page accent colors — subdued */
.nav-item[href="index.html"]     { --nav-color: #6366f1; }
.nav-item[href="lista.html"]     { --nav-color: #22d3ee; }
.nav-item[href="urlopy.html"]    { --nav-color: #10b981; }
.nav-item[href="plusy.html"]     { --nav-color: #f59e0b; }
.nav-item[href="awanse.html"]    { --nav-color: #8b5cf6; }
.nav-item[href="bylyadm.html"]   { --nav-color: #f97316; }
.nav-item[href="admmiesiaca.html"]{ --nav-color: #f59e0b; }
.nav-item[href="tickety.html"]   { --nav-color: #3b82f6; }
.nav-item[href="zarzad.html"]    { --nav-color: #8b5cf6; }
.nav-item[href="permisje.html"]  { --nav-color: #94a3b8; }
.nav-item[href="ustawienia.html"]{ --nav-color: #94a3b8; }
.nav-item[onclick*="logout"],
.nav-item[onclick*="location.href='logout"] { --nav-color: #f43f5e; }

.nav-item.active { color: var(--nav-color, var(--indigo)); }
.nav-item.active .nav-ico { color: var(--nav-color, var(--indigo)); opacity: 1; }
.nav-item:hover  .nav-ico { color: var(--nav-color, var(--text)); }

.nav-ico-wrap {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.nav-item:hover   .nav-ico-wrap,
.nav-item.active  .nav-ico-wrap {
  background: rgba(255,255,255,0.05);
}

.nav-ico {
  width: 16px; height: 16px;
  opacity: 0.55; transition: opacity 0.2s, color 0.2s;
}

/* Nav badge */
.nbadge {
  margin-left: auto; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  font-family: var(--font-mono); letter-spacing: 0.02em;
  transition: opacity 0.2s, max-width 0.3s;
}
.nbadge[style*="display:none"] { display: none !important; }
.nbadge.b { background: rgba(99,102,241,0.12); color: var(--indigo); border: 1px solid rgba(99,102,241,0.2); }
.nbadge.g { background: rgba(16,185,129,0.10); color: var(--emerald); border: 1px solid rgba(16,185,129,0.2); }
.nbadge.w { background: rgba(139,92,246,0.10); color: var(--violet); border: 1px solid rgba(139,92,246,0.2); }
.nbadge.o { background: rgba(249,115,22,0.10); color: #f97316; border: 1px solid rgba(249,115,22,0.2); animation: pulse-badge 2.5s infinite; }
.nbadge.y { background: rgba(245,158,11,0.10); color: var(--amber); border: 1px solid rgba(245,158,11,0.2); }
.nbadge.r { background: rgba(244,63,94,0.10); color: var(--rose); border: 1px solid rgba(244,63,94,0.2); animation: pulse-badge 2.5s infinite; }

@keyframes pulse-badge { 0%,100%{opacity:1} 50%{opacity:0.55} }

/* ── Sidebar footer ── */
.sidebar-foot {
  padding: 10px 10px 14px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
}

/* ── User card ── */
.sb-user-card {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.18s;
  position: relative; overflow: hidden;
}
.sb-user-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(91,155,255,0.06) 0%, rgba(168,85,247,0.05) 100%);
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.sb-user-card:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.14); transform: translateY(-1px); }
.sb-user-card:hover::before { opacity: 1; }

.sb-uc-av-wrap { position: relative; flex-shrink: 0; width: 38px; height: 38px; }
.sb-uc-av {
  width: 38px !important; height: 38px !important;
  font-size: 13px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.4);
}
.sb-uc-status-dot {
  position: absolute; bottom: 0px; right: 0px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--bg-sidebar, #0a0e1a);
  box-shadow: 0 0 6px rgba(34,197,94,0.7);
  z-index: 5;
}

.sb-uc-info { flex: 1; min-width: 0; }
.sb-uc-name {
  font-size: 12.5px; font-weight: 700;
  font-family: 'Exo 2', sans-serif;
  color: rgba(255,255,255,0.9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2;
}
.sb-uc-role {
  font-size: 10px; font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted2);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sb-uc-arrow {
  color: rgba(255,255,255,0.25);
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}
.sb-user-card:hover .sb-uc-arrow { color: rgba(255,255,255,0.55); transform: translateX(2px); }

/* ── Made by ── */
.sb-madeby {
  text-align: center;
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  opacity: 0.55;
  font-family: 'JetBrains Mono', monospace;
}
.sb-madeby strong { color: var(--muted2); font-weight: 700; }

/* legacy — zachowane dla kompatybilności */
.madeby-wrap { display: none; }
.user-pill { display: none; }
.user-name { font-size: 12.5px; font-weight: 600; flex: 1; min-width: 0; }
.user-role { font-size: 10px; color: var(--muted2); }
.user-chevron { display: none; }

/* Avatar */
.av {
  border-radius: 50%; background: linear-gradient(135deg, var(--indigo), var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
  position: relative; font-family: var(--font-display);
}
.av.sm  { width: 30px; height: 30px; font-size: 10px; }
.av.md  { width: 36px; height: 36px; font-size: 12px; }
.av.lg  { width: 48px; height: 48px; font-size: 15px; }
.av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.av-ring {
  position: absolute; inset: -2px; border-radius: 50%;
  border: 1.5px solid transparent;
  background: linear-gradient(var(--bg-sidebar), var(--bg-sidebar)) padding-box,
              var(--grad-primary) border-box;
  opacity: 0; transition: opacity 0.2s;
}
.user-pill:hover .av-ring { opacity: 0.6; }

/* Online dot */
.odot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.odot.on  { background: var(--emerald); box-shadow: 0 0 0 2px rgba(16,185,129,0.25); }
.odot.off { background: var(--muted); }
.odot.aw  { background: var(--amber); box-shadow: 0 0 0 2px rgba(245,158,11,0.25); }

/* Sidebar collapse toggle */
.sb-toggle {
  position: fixed; left: calc(var(--sw) - 12px); top: 22px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 201; color: var(--muted2); font-size: 11px;
  transition: left 0.35s cubic-bezier(0.4,0,0.2,1), all 0.2s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.sb-toggle:hover { background: var(--s2); color: var(--text); border-color: var(--border3); }
body.sbc .sb-toggle { left: calc(var(--sw-col) - 12px); }

/* ══════════════════════════════════════════════════
   MAIN / TOPBAR
   ══════════════════════════════════════════════════ */
.main {
  margin-left: var(--sw);
  flex: 1; min-height: 100vh;
  display: flex; flex-direction: column;
  position: relative; z-index: 1;
}

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 28px;
  background: rgba(7,9,15,0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}

.topbar-left { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tb-breadcrumb {
  font-size: 9.5px; color: var(--muted);
  font-family: var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
}
.tb-title {
  font-size: 16px; font-weight: 700; letter-spacing: -0.025em;
  background: linear-gradient(120deg, var(--text) 0%, var(--text2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  font-family: var(--font-display);
}

.tb-search { flex: 1; max-width: 300px; margin-left: 20px; position: relative; }
.tb-search input {
  width: 100%; background: var(--s1); border: 1px solid var(--border);
  border-radius: 24px; padding: 8px 16px 8px 36px;
  color: var(--text); font-family: var(--font); font-size: 13px; outline: none;
  transition: all 0.25s; font-weight: 400;
}
.tb-search input:focus {
  background: var(--s2); border-color: rgba(99,102,241,0.28);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08), 0 4px 20px rgba(0,0,0,0.15);
}
.tb-search input::placeholder { color: var(--muted); }
.tb-sic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; }

.tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.ico-btn {
  width: 36px; height: 36px; border-radius: var(--radius-xs);
  background: var(--s1); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted2); font-size: 15px;
  transition: all 0.2s; position: relative;
}
.ico-btn:hover { background: var(--s2); border-color: var(--border2); color: var(--text); }

.notif-pip {
  position: absolute; top: 7px; right: 7px;
  width: 6px; height: 6px; background: var(--indigo);
  border-radius: 50%; border: 1.5px solid var(--bg);
  box-shadow: 0 0 8px rgba(99,102,241,0.6);
  animation: pip-pulse 2s ease-in-out infinite;
}
@keyframes pip-pulse { 0%,100%{box-shadow:0 0 8px rgba(99,102,241,0.6)} 50%{box-shadow:0 0 16px rgba(99,102,241,0.9)} }

.refresh-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 24px;
  background: var(--s1); border: 1px solid var(--border);
  color: var(--muted2); font-size: 12px; font-weight: 500;
  cursor: pointer; user-select: none; transition: all 0.2s;
  font-family: var(--font);
}
.refresh-btn:hover { background: var(--s2); border-color: var(--border2); color: var(--text); }

/* ══════════════════════════════════════════════════
   PAGE
   ══════════════════════════════════════════════════ */
.page { padding: 28px; animation: pgIn2 0.4s cubic-bezier(0.16,1,0.3,1) forwards; }

@keyframes pgIn  { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
@keyframes pgIn2 { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }

/* ══════════════════════════════════════════════════
   GLASS CARD
   ══════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0,0,0,0.32), 0 1px 0 rgba(255,255,255,0.04) inset;
  overflow: hidden; position: relative;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(255,255,255,0.07) 40%, rgba(99,102,241,0.15) 60%, transparent 90%);
  pointer-events: none;
}
.card:hover {
  border-color: rgba(99,102,241,0.18);
  box-shadow: 0 12px 48px rgba(0,0,0,0.42), 0 1px 0 rgba(255,255,255,0.06) inset, 0 0 0 1px rgba(99,102,241,0.06);
}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.card-title {
  font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px;
  letter-spacing: -0.01em; color: var(--text); font-family: var(--font-display);
}
.card-action {
  font-size: 11.5px; color: var(--indigo); font-weight: 500;
  cursor: pointer; opacity: 0.7; transition: opacity 0.2s;
  font-family: var(--font-mono); letter-spacing: 0.02em;
}
.card-action:hover { opacity: 1; }

/* ══════════════════════════════════════════════════
   STAT CARDS
   ══════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px; margin-bottom: 20px;
}

.stat-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius); padding: 22px;
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.28), 0 1px 0 rgba(255,255,255,0.04) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), rgba(99,102,241,0.18), transparent);
  pointer-events: none;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99,102,241,0.22);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.08) inset, 0 0 0 1px rgba(99,102,241,0.08);
}
.stat-card:active {
  transform: translateY(-1px);
}

.stat-card .sc-glow {
  position: absolute; top: -50px; right: -50px;
  width: 130px; height: 130px; border-radius: 50%;
  filter: blur(40px); opacity: 0.12; pointer-events: none;
  transition: opacity 0.35s;
}
.stat-card:hover .sc-glow { opacity: 0.22; }

.sc-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.sc-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  background: var(--s1); border: 1px solid var(--border);
}
.sc-trend {
  font-size: 9.5px; font-weight: 700; padding: 3px 8px; border-radius: 20px;
  font-family: var(--font-mono); letter-spacing: 0.04em;
}
.sc-trend.up   { background: rgba(16,185,129,0.10); color: var(--emerald); border: 1px solid rgba(16,185,129,0.20); }
.sc-trend.flat { background: var(--s1); color: var(--muted2); border: 1px solid var(--border); }
.sc-trend.down { background: rgba(244,63,94,0.10); color: var(--rose); border: 1px solid rgba(244,63,94,0.20); }
.sc-trend.live { background: rgba(16,185,129,0.10); color: var(--emerald); border: 1px solid rgba(16,185,129,0.20); }

.sc-val {
  font-size: 36px; font-weight: 800; line-height: 1;
  letter-spacing: -0.04em; margin-bottom: 5px;
  font-family: var(--font-display);
}
.sc-lbl { font-size: 12px; color: var(--muted2); font-weight: 400; letter-spacing: 0.01em; }
.sc-sub {
  margin-top: 14px; font-size: 10.5px; color: var(--muted);
  border-top: 1px solid var(--border); padding-top: 11px;
  font-family: var(--font-mono); letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════════
   TABLE
   ══════════════════════════════════════════════════ */
.table-scroll-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}
.table-scroll-wrap .data-table tbody tr { animation: fadeIn 0.22s ease both; }
@keyframes fadeIn { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }

.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table colgroup col:nth-child(1) { width: 28%; }
.data-table colgroup col:nth-child(2) { width: 18%; }
.data-table colgroup col:nth-child(3) { width: 14%; }
.data-table colgroup col:nth-child(4) { width: 14%; }
.data-table colgroup col:nth-child(5) { width: 26%; }
.data-table th {
  text-align: left; font-size: 9px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  background: rgba(7,9,15,0.6);
  position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
.data-table th.col-akcje { text-align: center; }
.data-table td {
  padding: 12px 16px; font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s; vertical-align: middle;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover td { background: rgba(99,102,241,0.04); }
.data-table td.col-akcje { text-align: center; overflow: visible; }

/* Compact mode */
#lista-table.compact th { padding: 7px 10px; font-size: 8px; }
#lista-table.compact td { padding: 6px 10px; font-size: 11.5px; }
#lista-table.compact .lst-avatar { width: 24px !important; height: 24px !important; }
#lista-table.compact .lst-name { font-size: 12px; }
#lista-table.compact .lst-num { display: none; }
#lista-table.compact .tbl-btn { padding: 2px 7px; font-size: 10px; }
#btn-compact.active { background: rgba(99,102,241,0.08) !important; border-color: rgba(99,102,241,0.20) !important; color: var(--indigo) !important; }

/* Table action buttons */
.tbl-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; transition: all 0.15s;
  font-family: var(--font); letter-spacing: 0.01em; white-space: nowrap;
  background: var(--s1); color: var(--muted2); border-color: var(--border);
}
.tbl-btn:hover { background: var(--s2); color: var(--text); border-color: var(--border2); }
.tbl-btn.green { color: var(--emerald); border-color: rgba(16,185,129,0.22); background: rgba(16,185,129,0.06); }
.tbl-btn.green:hover { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.4); }
.tbl-btn.red   { color: var(--rose); border-color: rgba(244,63,94,0.22); background: rgba(244,63,94,0.06); }
.tbl-btn.red:hover   { background: rgba(244,63,94,0.12); border-color: rgba(244,63,94,0.4); }
.tbl-btn.dark-red { color: var(--rose); border-color: rgba(244,63,94,0.18); background: rgba(100,20,35,0.18); }
.tbl-btn.dark-red:hover { background: rgba(244,63,94,0.10); border-color: rgba(244,63,94,0.35); }

/* ══════════════════════════════════════════════════
   LIST ITEMS
   ══════════════════════════════════════════════════ */
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 22px; border-bottom: 1px solid var(--border);
  transition: background 0.15s; cursor: pointer;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: rgba(99,102,241,0.04); }
.li-info { flex: 1; min-width: 0; }
.li-name { font-size: 13px; font-weight: 500; }
.li-sub  { font-size: 11.5px; color: var(--muted2); margin-top: 2px; }
.li-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* ══════════════════════════════════════════════════
   FEED
   ══════════════════════════════════════════════════ */
.feed-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 22px; border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.feed-item:last-child { border-bottom: none; }
.feed-item:hover { background: rgba(99,102,241,0.03); }
.fd { width: 6px; height: 6px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.feed-text { flex: 1; font-size: 12.5px; line-height: 1.65; color: var(--muted2); }
.feed-text strong { color: var(--text); font-weight: 600; }
.feed-time { font-size: 10px; color: var(--muted); white-space: nowrap; font-family: var(--font-mono); }

/* ══════════════════════════════════════════════════
   BADGES / RANKS
   ══════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 20px;
  font-family: var(--font-mono); letter-spacing: 0.04em;
}

/* CEO — czerwony */
.b-ceo {
  background: rgba(220,38,38,0.10);
  border: 1px solid rgba(220,38,38,0.25) !important;
  color: #ef4444; font-weight: 700;
}
.b-ceo-wrap .badge { position: relative; z-index: 1; }

/* Other ranks */
.b-zarzad    { background: rgba(248,113,113,0.10); color: #f87171; border: 1px solid rgba(248,113,113,0.25) !important; }
.b-admin     { background: rgba(248,113,113,0.10); color: #f87171; border: 1px solid rgba(248,113,113,0.25) !important; }
.b-jadmin    { background: rgba(249,115,22,0.10); color: #f97316; border: 1px solid rgba(249,115,22,0.25) !important; }
.b-mod       { background: rgba(34,197,94,0.10); color: #22c55e; border: 1px solid rgba(34,197,94,0.25) !important; }
.b-helper    { background: rgba(59,130,246,0.10); color: #3b82f6; border: 1px solid rgba(59,130,246,0.25) !important; }
.b-support   { background: rgba(34,211,238,0.10); color: #22d3ee; border: 1px solid rgba(34,211,238,0.25) !important; }
.b-online    { background: rgba(16,185,129,0.10); color: #34d399; border: 1px solid rgba(16,185,129,0.22) !important; }
.b-offline   { background: var(--s1); color: var(--muted2); border: 1px solid var(--border) !important; }
.b-urlop     { background: rgba(245,158,11,0.10); color: #fbbf24; border: 1px solid rgba(245,158,11,0.22) !important; }
.b-plus      { background: rgba(16,185,129,0.10); color: #34d399; border: 1px solid rgba(16,185,129,0.22) !important; }
.b-minus     { background: rgba(244,63,94,0.10); color: #fb7185; border: 1px solid rgba(244,63,94,0.22) !important; }
.b-zatw      { background: rgba(16,185,129,0.10); color: #34d399; border: 1px solid rgba(16,185,129,0.22) !important; }
.b-odrzucony { background: rgba(244,63,94,0.10); color: #fb7185; border: 1px solid rgba(244,63,94,0.22) !important; }
.b-oczekuje  { background: rgba(245,158,11,0.10); color: #fbbf24; border: 1px solid rgba(245,158,11,0.22) !important; }

/* ══════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════ */
/* Zapobiega gestowi "podwójne dotknięcie = przybliżenie" na mobile przy szybkim klikaniu przycisków */
.btn, .btn-approve, .btn-reject, .tbl-btn, .refresh-btn, .ico-btn, .modal-x, .nav-item {
  touch-action: manipulation;
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 24px;
  font-family: var(--font); font-size: 12.5px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  letter-spacing: 0.01em; position: relative; overflow: hidden;
  touch-action: manipulation; user-select: none;
}
.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,0.25);
  border-color: transparent;
}
.btn-primary:hover  { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(99,102,241,0.35); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 4px 16px rgba(99,102,241,0.25); }
.btn-ghost {
  background: var(--s1); border-color: var(--border2); color: var(--muted2);
}
.btn-ghost:hover  { background: var(--s2); color: var(--text); border-color: var(--border3); }
.btn-ghost:active { background: var(--s1); }
.btn-danger {
  background: rgba(244,63,94,0.08); border-color: rgba(244,63,94,0.20); color: var(--rose);
}
.btn-danger:hover  { background: rgba(244,63,94,0.14); border-color: rgba(244,63,94,0.35); }
.btn-danger:active { background: rgba(244,63,94,0.08); }
.btn-approve {
  background: var(--grad-emerald); color: #fff;
  border-radius: 24px; padding: 7px 16px; font-size: 12px; font-weight: 600;
  box-shadow: 0 4px 16px rgba(16,185,129,0.28);
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  transition: transform 0.18s ease, box-shadow 0.18s ease; font-family: var(--font); border: none;
  position: relative; overflow: hidden;
}
.btn-approve:hover  { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(16,185,129,0.4); }
.btn-approve:active { transform: translateY(0); box-shadow: 0 4px 16px rgba(16,185,129,0.28); }
.btn-reject {
  background: var(--grad-rose); color: #fff;
  border-radius: 24px; padding: 7px 16px; font-size: 12px; font-weight: 600;
  box-shadow: 0 4px 16px rgba(244,63,94,0.28);
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  transition: transform 0.18s ease, box-shadow 0.18s ease; font-family: var(--font); border: none;
  position: relative; overflow: hidden;
}
.btn-reject:hover  { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(244,63,94,0.4); }
.btn-reject:active { transform: translateY(0); box-shadow: 0 4px 16px rgba(244,63,94,0.28); }

/* ══════════════════════════════════════════════════
   LAYOUT HELPERS
   ══════════════════════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.mb { margin-bottom: 16px; }

.sec-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.sec-title {
  font-size: 15px; font-weight: 700; letter-spacing: -0.025em;
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display);
}

/* ══════════════════════════════════════════════════
   PROGRESS BAR
   ══════════════════════════════════════════════════ */
.pbar { height: 3px; border-radius: 3px; background: var(--s2); overflow: hidden; margin-top: 6px; }
.pfill {
  height: 100%; border-radius: 3px;
  background: var(--grad-primary);
  transition: width 0.8s cubic-bezier(0.16,1,0.3,1);
}
.pfill.g { background: var(--grad-emerald); }
.pfill.r { background: var(--grad-rose); }
.pfill.y { background: var(--grad-amber); }

/* ══════════════════════════════════════════════════
   RANG CARD (Permisje)
   ══════════════════════════════════════════════════ */
.rang-card {
  background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px; transition: all 0.22s;
}
.rang-card:hover { border-color: var(--border2); background: var(--s2); }
.rang-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rang-name { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; font-family: var(--font-display); }
.rang-desc { font-size: 11.5px; color: var(--muted2); margin-bottom: 10px; }
.perm-tag {
  display: inline-block; font-size: 9px; font-weight: 600;
  padding: 3px 8px; border-radius: 20px; margin: 2px 2px 2px 0;
  background: rgba(99,102,241,0.07); color: var(--indigo);
  border: 1px solid rgba(99,102,241,0.14); font-family: var(--font-mono); letter-spacing: 0.04em;
}
.perm-tag.no { background: rgba(244,63,94,0.07); color: var(--rose); border-color: rgba(244,63,94,0.14); }

/* ══════════════════════════════════════════════════
   TOGGLE
   ══════════════════════════════════════════════════ */
.toggle {
  width: 42px; height: 24px; border-radius: 12px;
  background: var(--s2); border: 1px solid var(--border2);
  position: relative; cursor: pointer; transition: all 0.25s; flex-shrink: 0;
}
.toggle.on {
  background: var(--grad-primary); border-color: transparent;
  box-shadow: 0 0 16px rgba(99,102,241,0.22);
}
.toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.toggle.on::after { transform: translateX(18px); }

/* ══════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════ */
.fg { margin-bottom: 16px; }
.fl {
  font-size: 10px; font-weight: 600; color: var(--muted2); margin-bottom: 7px;
  display: block; letter-spacing: 0.10em; text-transform: uppercase; font-family: var(--font-mono);
}
.fi, .fs, .fta {
  width: 100%; background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 10px 14px; color: var(--text);
  font-family: var(--font); font-size: 13px; outline: none; transition: all 0.22s;
}
.fi:focus, .fs:focus, .fta:focus {
  background: var(--s2); border-color: rgba(99,102,241,0.3);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}
.fi::placeholder { color: var(--muted); }
.fs option { background: #0d0f1a; }
.fta { resize: vertical; min-height: 80px; }

/* ══════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════ */
.modal-bd {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; visibility: hidden; opacity: 0;
  transition: opacity 0.25s, visibility 0.25s;
}
.modal-bd.show { visibility: visible; opacity: 1; }

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: 0 32px 80px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.06) inset;
  max-width: 560px; width: 100%;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
  position: relative; overflow: hidden;
}
.modal::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.35), rgba(139,92,246,0.25), transparent);
}
.modal-bd.show .modal { transform: none; }
.modal-sm { max-width: 380px; }
.modal-lg { max-width: 760px; }
.modal-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--border);
}
.modal-ttl { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; font-family: var(--font-display); }
.modal-x {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--s1); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted2); font-size: 14px; transition: all 0.15s;
}
.modal-x:hover { background: var(--s2); color: var(--text); }
.modal-body { padding: 20px 24px; }
.modal-ft {
  padding: 14px 24px 20px; display: flex; gap: 10px;
  justify-content: flex-end; border-top: 1px solid var(--border);
}

/* Profile in modal */
.p-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 14px;
}
.p-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.p-stat {
  background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 10px; text-align: center;
}
.p-sv { font-size: 20px; font-weight: 700; font-family: var(--font-display); }
.p-sl { font-size: 10px; color: var(--muted2); margin-top: 2px; }

/* Confirm modal */
#confirm-bd { background: rgba(0,0,0,0.70); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }

/* ══════════════════════════════════════════════════
   TOASTS
   ══════════════════════════════════════════════════ */
#toasts { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 18px; border-radius: var(--radius-sm);
  background: var(--bg-elevated); border: 1px solid var(--border2);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.05) inset;
  min-width: 260px; max-width: 360px; pointer-events: all;
  position: relative; overflow: hidden;
  transform: translateX(120%); opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.25s;
  backdrop-filter: blur(20px) saturate(160%);
}
.toast.in  { transform: translateX(0); opacity: 1; }
.toast.out { transform: translateX(120%); opacity: 0; transition: transform 0.22s ease-in, opacity 0.2s; }
.toast-ico { font-size: 18px; flex-shrink: 0; }
.toast-msg { font-size: 13px; font-weight: 500; flex: 1; line-height: 1.4; }
.toast-prog { position: absolute; bottom: 0; left: 0; height: 2px; border-radius: 0 0 12px 12px; animation: toast-prog 3.2s linear forwards; }
.t-ok   .toast-prog { background: var(--grad-emerald); }
.t-err  .toast-prog { background: var(--grad-rose); }
.t-warn .toast-prog { background: var(--grad-amber); }
.t-info .toast-prog { background: var(--grad-primary); }
@keyframes toast-prog { from{width:100%} to{width:0} }

/* ══════════════════════════════════════════════════
   SIDE PANEL (notifications)
   ══════════════════════════════════════════════════ */
.side-panel {
  position: fixed; top: 0; right: -400px; bottom: 0; width: 380px; z-index: 500;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 48px rgba(0,0,0,0.35);
  backdrop-filter: blur(20px) saturate(150%);
}
.side-panel.open { right: 0; }
.side-panel-overlay {
  display: none; position: fixed; inset: 0; z-index: 499;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
}
.side-panel-overlay.active { display: block; }
.sp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.sp-title { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; font-family: var(--font-display); }
.sp-close {
  width: 28px; height: 28px; border-radius: 8px; background: var(--s1);
  border: 1px solid var(--border); display: flex; align-items: center;
  justify-content: center; cursor: pointer; color: var(--muted2); font-size: 13px;
  transition: all 0.15s;
}
.sp-close:hover { background: var(--s2); color: var(--text); }
.sp-body { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }

/* ══════════════════════════════════════════════════
   RIGHT DRAWER
   ══════════════════════════════════════════════════ */
.right-drawer {
  position: fixed; top: 0; right: -420px; bottom: 0; width: 400px; z-index: 450;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 48px rgba(0,0,0,0.3);
  backdrop-filter: blur(20px) saturate(150%);
}
.right-drawer.open { right: 0; }
.dh {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.d-name { font-size: 14px; font-weight: 700; font-family: var(--font-display); }
.d-sub { font-size: 11.5px; color: var(--muted2); }
.d-tabs { display: flex; gap: 4px; }
.d-tab {
  font-size: 11.5px; font-weight: 500; padding: 5px 12px;
  border-radius: 20px; cursor: pointer; color: var(--muted2);
  border: 1px solid transparent; transition: all 0.15s;
}
.d-tab:hover { color: var(--text); background: var(--s1); }
.d-tab.active { color: var(--indigo); background: rgba(99,102,241,0.09); border-color: rgba(99,102,241,0.18); }
.d-search {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; background: var(--s1); border: 1px solid var(--border);
  border-radius: 20px; margin: 12px 18px 0;
}
.d-sic { color: var(--muted); font-size: 12px; }
#dSearch { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 12.5px; font-family: var(--font); }
.d-body { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }

/* ══════════════════════════════════════════════════
   ADMIN CARDS (lista.html pg-grid)
   ══════════════════════════════════════════════════ */
.pg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px; padding: 18px;
}
@media(max-width:500px){ .pg-grid { grid-template-columns: 1fr; } }

.pg-card {
  position: relative; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden; cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.pg-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
  pointer-events: none;
}
.pg-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99,102,241,0.2);
  box-shadow: 0 12px 36px rgba(0,0,0,0.3), 0 0 0 1px rgba(99,102,241,0.06);
}
.pg-card[data-typ="plus"]::before  { background: linear-gradient(90deg, transparent, rgba(16,185,129,0.2), transparent); }
.pg-card[data-typ="minus"]::before { background: linear-gradient(90deg, transparent, rgba(244,63,94,0.2), transparent); }
.pg-card[data-typ="plus"]  { --card-border: rgba(16,185,129,0.15); }
.pg-card[data-typ="minus"] { --card-border: rgba(244,63,94,0.15); }

.pg-card-top {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px 10px;
}
.pg-card-info { flex: 1; min-width: 0; }
.pg-card-name {
  font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-display);
}
.pg-card-sub { font-size: 11px; color: var(--muted2); margin-top: 2px; }
.pg-card-actions {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 0 14px 12px;
}
.pg-card-body {
  font-size: 12px; color: var(--muted2); line-height: 1.65;
  padding: 0 14px 4px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; max-height: 5em; cursor: pointer;
  transition: color 0.15s;
}
.pg-card-body:hover { color: var(--text2); }
.pg-card-body.no-clamp { max-height: none; -webkit-line-clamp: unset; cursor: default; }
.pg-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-top: 1px solid var(--border);
  font-size: 10px; color: var(--muted); font-family: var(--font-mono);
}

/* ══════════════════════════════════════════════════
   SHORTCUTS MODAL
   ══════════════════════════════════════════════════ */
#shortcuts-modal-bd {
  display: none; position: fixed; inset: 0; z-index: 99999;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
#shortcuts-modal-bd.show { display: flex; }
#shortcuts-modal {
  background: var(--bg-elevated); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 28px 32px;
  max-width: 420px; width: 100%; position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}
#shortcuts-modal h3 { font-size: 14px; font-weight: 700; margin-bottom: 20px; font-family: var(--font-display); }
.sc-group { margin-bottom: 18px; }
.sc-group-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 10px; font-family: var(--font-mono);
}
.sc-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.sc-row:last-child { border-bottom: none; }
.sc-desc { font-size: 12.5px; color: var(--text2); }
.sc-keys { display: flex; gap: 4px; align-items: center; }
.sc-key {
  background: var(--s2); border: 1px solid var(--border2);
  border-radius: 6px; padding: 2px 8px; font-size: 10.5px;
  font-family: var(--font-mono); font-weight: 500; color: var(--text2);
  box-shadow: 0 2px 0 rgba(0,0,0,0.25);
}
.sc-plus { font-size: 10px; color: var(--muted); }
.sc-close {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--s1); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted2); font-size: 13px; transition: all 0.15s;
}
.sc-close:hover { background: var(--s2); color: var(--text); }

/* ══════════════════════════════════════════════════
   SECTION HEADER (rank separators in lista)
   ══════════════════════════════════════════════════ */
.rank-section-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px 8px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted2); font-family: var(--font-mono);
  border-bottom: 1px solid var(--border); margin-top: 4px;
}

/* ══════════════════════════════════════════════════
   SETTING ROWS (ustawienia.html)
   ══════════════════════════════════════════════════ */
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  gap: 16px;
}
.setting-row:last-child { border-bottom: none; }
.sl { font-size: 13px; font-weight: 500; }
.ss { font-size: 11.5px; color: var(--muted2); margin-top: 2px; }

/* ══════════════════════════════════════════════════
   MOBILE OVERLAY
   ══════════════════════════════════════════════════ */
.mob-overlay {
  display: none; position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.3s;
}
.mob-overlay.active { opacity: 1; }

.mob-menu-btn {
  display: none; width: 36px; height: 36px; border-radius: var(--radius-xs);
  background: var(--s1); border: 1px solid var(--border);
  align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted2); font-size: 18px;
  transition: all 0.2s; flex-shrink: 0; z-index: 201;
}
.mob-menu-btn:hover { background: var(--s2); color: var(--text); }

/* ══════════════════════════════════════════════════
   SCROLLBARS
   ══════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.13); }

/* ══════════════════════════════════════════════════
   UTILITY COLORS
   ══════════════════════════════════════════════════ */
.c-blue   { color: var(--indigo)  !important; }
.c-purp   { color: var(--violet)  !important; }
.c-teal   { color: var(--mint)    !important; }
.c-green  { color: var(--emerald) !important; }
.c-warn   { color: var(--amber)   !important; }
.c-red    { color: var(--rose)    !important; }
.c-muted  { color: var(--muted2)  !important; }

/* ══════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════ */
@keyframes counterPop { 0%{transform:scale(1)} 40%{transform:scale(1.12)} 100%{transform:scale(1)} }
.sc-val.pop { animation: counterPop 0.4s cubic-bezier(0.16,1,0.3,1) forwards; }

@keyframes sov-check { from{stroke-dashoffset:1} to{stroke-dashoffset:0} }
._anim-sov-check-lg { animation: sov-check 0.4s 0.45s cubic-bezier(0.16,1,0.3,1) forwards; }
._anim-sov-check-sm { animation: sov-check 0.3s 0.35s ease forwards; }
._anim-pgIn { animation: pgIn 0.38s cubic-bezier(0.16,1,0.3,1) forwards; }
._pointer { cursor: pointer; }

/* ══════════════════════════════════════════════════
   TICKET UTILITIES (tickety.html)
   ══════════════════════════════════════════════════ */
.tk-th { padding:10px 12px; text-align:left; color:var(--muted); font-weight:600; font-family:var(--font-mono); font-size:9px; text-transform:uppercase; letter-spacing:.10em; }
.tk-empty-red    { padding:24px; text-align:center; color:var(--rose); }
.tk-empty-muted  { padding:24px; text-align:center; color:var(--muted2); }
.tk-cell-center  { padding:16px 18px; text-align:center; }
.tk-empty-lg     { padding:28px; text-align:center; color:var(--muted2); }
.tk-empty-xl     { text-align:center; padding:40px 20px; color:var(--muted2); font-size:13px; }
.tk-empty-sm     { color:var(--muted2); font-size:12px; text-align:center; padding:20px; }
.tk-empty-err    { color:var(--rose); font-size:12px; text-align:center; padding:12px; }
.tk-empty-sm2    { color:var(--muted2); font-size:12px; text-align:center; padding:20px 0; }
.tk-empty-sm3    { color:var(--muted2); font-size:12px; text-align:center; padding:12px; }
.tk-label-xs     { font-size:10px; color:var(--muted2); text-transform:uppercase; letter-spacing:.05em; }
.tk-label-mono   { font-size:10px; color:var(--muted); font-family:var(--font-mono); text-transform:uppercase; letter-spacing:.1em; margin-bottom:8px; }
.tk-stat-box     { background:var(--s2); border-radius:8px; padding:8px; text-align:center; }
.tk-table        { width:100%; border-collapse:collapse; font-size:12.5px; table-layout:fixed; }
.tk-col-160      { width:160px; }
.tk-col-140      { width:140px; }
.tk-col-130      { width:130px; }
.tk-col-110      { width:110px; }
.tk-td-nowrap    { padding:10px 12px; white-space:nowrap; }
.tk-td-clip      { padding:10px 12px; overflow:hidden; }
.tk-td-muted-ellipsis { padding:10px 12px; font-size:12px; color:var(--muted2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-td-mono-nowrap  { padding:10px 12px; font-size:11px; color:var(--muted2); font-family:var(--font-mono); white-space:nowrap; }
.tk-td-mono-nowrap2 { padding:10px 12px; font-family:var(--font-mono); color:var(--muted2); font-size:11px; white-space:nowrap; }
.tk-td-sm            { padding:5px 12px; font-size:12px; }
.tk-flex-g8          { display:flex; gap:8px; align-items:center; }
.tk-flex-g8-plain    { display:flex; gap:8px; }
.tk-flex-col-g8      { display:flex; flex-direction:column; gap:8px; padding:4px 0; }
.tk-flex-sb-footer   { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-top:1px solid var(--border); }
.tk-flex1-clip       { flex:1; min-width:0; overflow:hidden; }
.tk-scroll-x         { overflow-x:auto; }
.tk-mb22             { margin-bottom:22px; }
.tk-hidden           { display:none; }
.tk-muted2           { color:var(--muted2); }
.tk-fs12-muted2      { font-size:12px; color:var(--muted2); }
.tk-row-border       { border-bottom:1px solid var(--border2); }
.tk-row-border-hover { border-bottom:1px solid var(--border); transition:background .15s; }

/* ══════════════════════════════════════════════════
   RESPONSIVE TABLET (≤ 900px)
   ══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1), width 0.32s;
    z-index: 200; width: var(--sw) !important;
  }
  .sidebar.mob-open { transform: translateX(0); }
  .main { margin-left: 0 !important; }
  .mob-menu-btn { display: flex; }
  .mob-overlay  { display: block; pointer-events: none; }
  .mob-overlay.active { pointer-events: all; }
  .topbar { padding: 12px 16px; gap: 10px; }
  .tb-breadcrumb { display: none; }
  .tb-search { max-width: 200px; margin-left: 10px; }
  .page { padding: 16px; }
  .grid-2 { grid-template-columns: 1fr !important; }
  .grid-3 { grid-template-columns: 1fr !important; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; }
  .data-table-wrap, .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 600px; }
  .modal { max-width: 95vw; }
  .sb-toggle { display: none; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE MOBILE (≤ 600px)
   ══════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .topbar { padding: 10px 12px; gap: 8px; }
  .tb-title { font-size: 14px; }
  .tb-search { display: none; }
  .page { padding: 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; }
  .sc-val { font-size: 24px !important; }
  .grid-2 { grid-template-columns: 1fr !important; gap: 10px; }
  .grid-3 { grid-template-columns: 1fr !important; gap: 10px; }
  .modal-bd { align-items: flex-end; padding: 0; }
  .modal {
    max-width: 100vw !important; width: 100vw !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    max-height: 90vh; overflow-y: auto;
  }
  .data-table { min-width: 520px; font-size: 12px; }
  .data-table td, .data-table th { padding: 10px 10px; }
  .tb-right .ico-btn:not(:first-child) { display: none; }
  .card-header { padding: 13px 16px; }
  .card-title  { font-size: 12px; }
  .p-stats { gap: 7px; }
  .p-sv    { font-size: 18px !important; }
  .sec-title { font-size: 13.5px; }
  .sec-header { margin-bottom: 14px; }
}

/* ══════════════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ══════════════════════════════════════════════════
   LEGACY / COMPAT — preserve JS-generated content
   ══════════════════════════════════════════════════ */

/* Admin logo legacy support */
.admin-logo-wrap { position: relative; }
.chroma-active .uni,
.chroma-active .mc,
.chroma-active .admin-logo-line1 { animation: none; }

/* Lista panel (override legacy inline styles) */
.lista-panel {
  position: relative; overflow: hidden;
  background: var(--bg-card) !important;
}
.lista-panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px; z-index: 2;
  background: linear-gradient(90deg,
    transparent 0%, rgba(99,102,241,0.35) 35%,
    rgba(139,92,246,0.25) 65%, transparent 100%
  );
  animation: none;
}
.lista-panel::after { display: none; }
.lista-corner-glow { display: none; }

/* bg-aurora fallback (remove cyberpunk canvas) */
#bg-canvas { display: none !important; }

/* AI Assistant button */
#ai-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 400;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--grad-primary);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(99,102,241,0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  color: #fff; font-size: 20px;
}
#ai-fab:hover  { transform: scale(1.08); box-shadow: 0 12px 36px rgba(99,102,241,0.5); }
#ai-fab:active { transform: scale(1.0);  box-shadow: 0 8px 24px rgba(99,102,241,0.35); }

/* Notif panel item */
.notif-item {
  padding: 13px 20px; border-bottom: 1px solid var(--border);
  transition: background 0.15s; cursor: pointer;
}
.notif-item:hover { background: rgba(99,102,241,0.04); }
.notif-item.unread { background: rgba(99,102,241,0.04); }
.notif-item:last-child { border-bottom: none; }
.notif-ico { font-size: 14px; flex-shrink: 0; margin-top: 2px; }
.notif-text { font-size: 12.5px; line-height: 1.55; color: var(--muted2); }
.notif-text strong { color: var(--text); }
.notif-time { font-size: 10px; color: var(--muted); font-family: var(--font-mono); margin-top: 4px; }

/* Madeby sparkle animation */
@keyframes madeby-pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
@keyframes madeby-spin  { to{transform:rotate(360deg)} }

/* Responsive sidebar width variable */
@media (max-width: 900px) {
  :root { --sw: 260px; }
}

/* ══ FINAL AMBIENT LAYER ══ */
.page::before {
  content: none;
}

/* Remove any leftover cyberpunk references */
.orb-1, .orb-2, .orb-3, .orb-4 { display: none !important; }

/* ══ UTILITY CLASSES (_prefix) — używane przez app.js ══ */

/* Flex helpers */
._flex1-mw0 { flex: 1; min-width: 0; }

/* Spacing */
._mt4 { margin-top: 4px; }

/* Hidden */
._hidden { display: none !important; }

/* Tab button (profile modal tabs) */
._tab-btn {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted2);
  cursor: pointer;
  font-family: var(--font-display, 'Exo 2', sans-serif);
  transition: color .15s, border-color .15s;
}
._tab-btn:hover {
  color: var(--text);
  border-bottom-color: rgba(255,255,255,0.15);
}

/* Monospace tiny muted text */
._mono-xs-muted2 {
  font-size: 10px;
  color: var(--muted2);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  white-space: nowrap;
}

/* Color helpers */
._c-text    { color: var(--text)    !important; }
._c-muted   { color: var(--muted)   !important; }
._c-muted-h { color: var(--muted2)  !important; }
._c-green   { color: var(--emerald, #34d399) !important; }
._c-red     { color: var(--rose,    #f87171) !important; }
._c-blue    { color: var(--blue,    #5b9bff) !important; }
._c-blue-raw  { color: var(--blue,  #5b9bff); }
._c-red-raw   { color: var(--rose,  #f87171); }

/* Error message block */
._c-red-msg {
  color: var(--rose, #f87171);
  font-size: 12px;
  padding: 12px;
  text-align: center;
}

/* p-head already defined above */

/* ── Brakujące utility klasy (używane w app.js) ── */

/* Flex row z gap 10px, margin-top 6px — kontener TAK/NIE */
._flex-g10-mt6 {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

/* Ikona 14x14 inline w przyciskach */
._icon-14 {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
  flex-shrink: 0;
}

/* Przycisk "NIE" — czerwony wariant przycisku potwierdzenia */
._btn-confirm-red {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: 10px;
  border: 1px solid rgba(220, 38, 38, 0.8);
  background: rgba(220, 38, 38, 0.2);
  cursor: pointer;
  font-weight: 700;
  color: var(--red, #f87171);
  transition: all 0.15s;
}
._btn-confirm-red:hover {
  background: rgba(220, 38, 38, 0.32);
}

/* Obrazek wypełniający rodzica (avatar) */
._cover-inherit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Soft danger background — używane w przyciskach btn */
._bg-danger-soft {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: var(--red, #f87171) !important;
}
._bg-danger-soft:hover {
  background: rgba(239, 68, 68, 0.2) !important;
}
