/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0f1117;
  --bg-sidebar:  #13151c;
  --bg-card:     #1a1d27;
  --bg-hover:    #1e2130;
  --bg-active:   #1e2a45;
  --border:      #252836;
  --accent:      #3b82f6;
  --accent-glow: rgba(59,130,246,0.18);
  --text:        #e2e8f0;
  --text-muted:  #6b7280;
  --text-dim:    #94a3b8;
  --sidebar-w:   280px;
  --topbar-h:    56px;
  --radius:      8px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3f52; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s ease;
  z-index: 100;
}

.sidebar-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon { font-size: 22px; }
.logo-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text);
}

/* ===== NAV ===== */
.nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0 20px;
}

.nav-list {
  list-style: none;
}

/* Section divider label */
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 20px 6px;
}

/* Items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 20px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 13.5px;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  user-select: none;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav-item.active {
  background: var(--bg-active);
  color: var(--accent);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.nav-item.sub  { padding-left: 32px; }
.nav-item.sub2 { padding-left: 44px; font-size: 13px; }
.nav-item.sub3 { padding-left: 56px; font-size: 12.5px; }

.nav-divider {
  height: 2px;
  background: var(--border);
  margin: 8px 12px;
  list-style: none;
  opacity: 0.85;
}

/* Group headers */
.nav-group-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 20px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}

.nav-group-header:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav-group-header.active {
  background: var(--bg-active);
  color: var(--accent);
  position: relative;
}

.nav-group-header.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.nav-group-header.sub2 {
  padding-left: 44px;
  font-size: 13px;
}

.nav-group-header .arrow {
  margin-left: auto;
  font-size: 11px;
  transition: transform 0.2s;
  color: var(--text-muted);
}

.nav-group-header.collapsed .arrow {
  transform: rotate(-90deg);
}

/* Sublist */
.nav-sublist {
  list-style: none;
  overflow: hidden;
  max-height: 1000px;
  transition: max-height 0.25s ease;
}

.nav-sublist.collapsed {
  max-height: 0;
}

/* Color dots */
.color-dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
}
.color-dot.green  { background: #22c55e; }
.color-dot.orange { background: #f97316; }
.color-dot.red    { background: #ef4444; }
.color-dot.black  { background: #374151; border: 1px solid #4b5563; }
.color-dot.purple { background: #a855f7; }
.color-dot.dark   { background: #374151; border: 1px solid #4b5563; }

.nav-icon { font-size: 14px; flex-shrink: 0; line-height: 1; }
.nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== MAIN WRAPPER ===== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===== TOPBAR ===== */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
  z-index: 50;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  display: none;
}

.sidebar-toggle:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }

.search-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  padding: 7px 14px;
  width: 220px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--accent); }

/* ===== CONTENT ===== */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 40px 48px;
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
  position: relative;
}

/* LSPD watermark background on every page */
.content::before {
  content: '';
  position: fixed;
  top: 50%;
  left: calc(50% + 130px); /* offset for sidebar */
  transform: translate(-50%, -50%);
  width: 520px;
  height: 520px;
  background-image: url('LSPD.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

.content-page { position: relative; z-index: 1; }

/* PAGE HERO */
.page-hero {
  margin-bottom: 40px;
}

/* ===== PAGE HERO BANNER (nowy styl – jak zasady) ===== */
.page-hero-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #09132a 0%, #112240 50%, #09132a 100%);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 14px;
  padding: 22px 28px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.phb-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(59,130,246,0.4));
}

.phb-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.phb-text .page-badge {
  margin-bottom: 0;
}

.phb-text .page-title {
  margin-bottom: 0;
  font-size: 26px;
}

.phb-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.page-hero-banner > .bookmark-btn {
  position: absolute;
  top: 14px;
  right: 14px;
}

/* ===== PAGE LEAD HERO ===== */
.page-lead-hero {
  position: relative;
  margin-bottom: 36px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(59,130,246,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  cursor: default;
}

/* zdjęcie – pełna szerokość, naturalna wysokość */
.plh-image-wrap {
  width: 100%;
  line-height: 0;
}

.plh-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* bookmark zawsze widoczny */
.page-lead-hero > .bookmark-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
}

/* hint "najedź" – widoczny domyślnie, znika po najechaniu */
.plh-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.2s ease;
}

.page-lead-hero:hover .plh-hint {
  opacity: 0;
}

/* overlay z tekstem – domyślnie ukryty */
.plh-header {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 28px 24px;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.75) 60%,
    rgba(0,0,0,0.92) 100%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
}

.page-lead-hero:hover .plh-header {
  opacity: 1;
}

.plh-header .page-badge {
  margin-bottom: 10px;
}

.plh-header .page-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 26px;
  color: #fff;
}

.plh-header .page-subtitle {
  font-size: 13.5px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}

.plh-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.page-badge {
  display: inline-flex;
  align-self: flex-start;
  width: fit-content;
  align-items: center;
  gap: 6px;
  background: rgba(37,99,235,0.25);
  color: #93c5fd;
  border: 1px solid rgba(59,130,246,0.5);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.page-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 600px;
}

.home-text {
  font-size: 14.5px;
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 560px;
  text-align: center;
  margin-top: 0;
}

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 40px 52px;
  position: relative;
  overflow: hidden;
}

/* radial glow behind the whole hero */
.home-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(59,130,246,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.home-text-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.home-title {
  font-size: 36px !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  background: none !important;
  -webkit-text-fill-color: unset !important;
  margin-bottom: 0 !important;
  letter-spacing: -0.5px;
}

/* decorative blue line under title */
.home-title-line {
  width: 56px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 16px auto 20px;
  opacity: 0.7;
}

.home-banner-wrap {
  margin: -40px -48px 0;
  overflow: hidden;
}

.home-banner-img {
  width: 100%;
  display: block;
  cursor: zoom-in;
  transition: opacity 0.2s;
}

.home-banner-img:hover {
  opacity: 0.9;
}

.home-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 8px 0 40px;
}

.home-section {
  margin-bottom: 16px;
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
  display: block;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.card-icon { font-size: 24px; margin-bottom: 12px; }

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* SECTION HEADING */
.section-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  margin-top: 36px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* CONTENT PAGE */
.content-page { animation: fadeIn 0.2s ease; }

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

.wip-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 10px;
  padding: 14px 18px;
  color: #fbbf24;
  font-size: 13.5px;
  margin-bottom: 28px;
}

/* DIVIDER */
hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ===== KM LEVEL CARDS ===== */
.km-level-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.km-level-card {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.km-level-card:hover {
  border-color: var(--lc, var(--accent));
  background: var(--bg-hover);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.km-level-bar {
  width: 5px;
  align-self: stretch;
  background: var(--lc, #3b82f6);
  flex-shrink: 0;
}

.km-level-body {
  flex: 1;
  padding: 16px 20px;
}

.km-level-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.km-level-desc {
  font-size: 12.5px;
  color: var(--text-muted);
}

.km-level-arrow {
  font-size: 22px;
  color: var(--text-muted);
  padding: 0 20px 0 8px;
  transition: color 0.18s, transform 0.18s;
}

.km-level-card:hover .km-level-arrow {
  color: var(--lc, var(--accent));
  transform: translateX(3px);
}

/* ===== KOD MIASTO TABLE ===== */
.km-wrap { max-width: 100%; }

.km-table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
}

.km-header {
  padding: 12px 20px 12px 18px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  text-align: left;
  border-left: 4px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  gap: 10px;
}

.km-data-row {
  display: block;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: rgba(26, 29, 39, 0.75);
  border-top: 1px solid var(--border);
  line-height: 1.7;
}

/* Key-value row (PATROLE / KAMIZELKI / SZKOLENIOWCY) */
.km-kv-row {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--border);
  background: rgba(26, 29, 39, 0.75);
}

.km-key {
  min-width: 200px;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  background: rgba(20, 23, 32, 0.8);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  letter-spacing: 0.4px;
}

.km-val {
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  display: flex;
  align-items: center;
  line-height: 1.5;
}

.km-row {
  padding: 11px 20px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--text);
  background: rgba(26, 29, 39, 0.75);
  border-top: 1px solid var(--border);
  text-align: center;
  text-transform: uppercase;
}

/* ===== CONTENT COMPONENTS ===== */

/* Quote */
/* ===== ZASADY HEADER ===== */
.zasady-header {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #09132a 0%, #112240 50%, #09132a 100%);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 18px;
  padding: 22px 28px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
}

.zasady-header > .bookmark-btn {
  position: absolute;
  top: 14px;
  right: 14px;
}

.zasady-header-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(59,130,246,0.4));
}

.zasady-header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.zasady-header-title {
  font-family: 'Arial Black', Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(59,130,246,0.5);
}

.zasady-header-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.3px;
}

.doc-quote {
  border-left: 4px solid var(--accent);
  padding: 12px 20px;
  margin: 0 0 28px;
  color: var(--text-dim);
  font-style: italic;
  font-size: 15px;
  background: var(--bg-card);
  border-radius: 0 8px 8px 0;
}

/* Rules list */
.rules-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rule-item {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.6;
}

.rule-item.rule-danger {
  border-color: rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.07);
  color: #fca5a5;
}

.rule-item.rule-important {
  border-color: rgba(251,191,36,0.35);
  background: rgba(251,191,36,0.07);
  color: #fde68a;
}

.rule-num {
  color: var(--accent);
  font-weight: 700;
  font-size: 12.5px;
  margin-right: 6px;
}

/* Doc section title */
.doc-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Doc text */
.doc-text {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 12px;
  line-height: 1.6;
}

.doc-text-center { text-align: center; }
.doc-muted { color: var(--text-muted); font-size: 12.5px; }

/* Red highlight (pompka) */
.doc-highlight-red {
  text-align: center;
  padding: 18px 24px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 10px;
  color: #f87171;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.8;
  margin-top: 12px;
}

/* Callout (info) */
.doc-callout-info {
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 10px;
  padding: 16px 20px;
  color: #93c5fd;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 28px;
}

/* Generic callout */
.doc-callout {
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 10px;
  padding: 14px 20px;
  color: #fcd34d;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  margin-top: 20px;
}

/* Kadet list */
.kadet-list {
  list-style: disc;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.65;
}

.kadet-list ul {
  list-style: circle;
  padding-left: 20px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.kadet-link {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.kadet-link:hover { color: #93c5fd; }

/* ===== KADET PAGE ===== */
.kadet-intro {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 24px;
}

.kadet-intro-icon {
  font-size: 28px;
  line-height: 1;
}

.kadet-intro-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kadet-intro-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}

.kadet-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.kadet-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.kadet-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  box-shadow: 0 4px 16px rgba(59,130,246,0.08);
}

.kadet-card-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.7;
  letter-spacing: 1px;
  min-width: 24px;
  text-align: center;
}

.kadet-card-body {
  flex: 1;
}

.kadet-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.kadet-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.kadet-card-arrow {
  font-size: 20px;
  color: var(--text-muted);
  transition: color 0.18s, transform 0.18s;
  line-height: 1;
}

.kadet-card:hover .kadet-card-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* C8 Seating */
.c8-seating-wrapper {
  margin-top: 8px;
}

.c8-seating {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
  margin: 0 auto 12px;
}

.c8-row {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.c8-seat {
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: center;
  min-width: 80px;
}

.c8-empty { background: transparent; min-width: 80px; }
.c8-lspd    { background: rgba(59,130,246,0.2);  color: #60a5fa; border: 1px solid rgba(59,130,246,0.4); }
.c8-dtu     { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.4); }
.c8-dea     { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.4); }
.c8-sahp    { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.4); }
.c8-sru     { background: rgba(34,197,94,0.15);  color: #4ade80; border: 1px solid rgba(34,197,94,0.4); }
.c8-aiad    { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.4); }
.c8-iag     { background: rgba(156,163,175,0.15);color: #9ca3af; border: 1px solid rgba(156,163,175,0.4); }
.c8-veteran { background: rgba(156,163,175,0.15);color: #9ca3af; border: 1px solid rgba(156,163,175,0.4); }
.c8-hc      { background: rgba(168,85,247,0.15); color: #c084fc; border: 1px solid rgba(168,85,247,0.4); }

/* ===== POŚCIG GRID ===== */
.poscig-grid {
  display: grid;
  grid-template-columns: 110px 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 13px;
}

.pg-head {
  background: #1e3a5f;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.pg-head:last-child { border-right: none; }

.pg-cell {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-weight: 500;
  vertical-align: top;
}

.pg-cell:last-child { border-right: none; }
.pg-cell:nth-child(3n+1) { background: #1a1d27; }

.pg-kod {
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pg-muted { color: var(--text-muted); text-align: center; }

.pg-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pg-list li::before {
  content: '– ';
  color: var(--text-muted);
}

/* ===== MANEWRY ===== */
.manewry-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.manewr-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.manewr-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text);
  margin-bottom: 8px;
}

.manewr-desc {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.55;
  padding: 8px 12px;
  background: rgba(59,130,246,0.05);
  border-left: 3px solid rgba(59,130,246,0.35);
  border-radius: 0 6px 6px 0;
}

.manewr-diagram {
  background: #0f1117;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  position: relative;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.manewr-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 8px;
  text-transform: uppercase;
}

.md-car, .md-target { font-size: 22px; }
.md-target { filter: hue-rotate(120deg); }

.md-middle-row, .strzalka-row, .pit-row, .blokada-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.blokada-row { gap: 8px; font-size: 22px; }
.pit-row { gap: 20px; font-size: 22px; }

/* ===== KODY RADIOWE ===== */
.radio-grid-wrap { max-width: 100%; }

.radio-tables-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.radio-table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.rt-head-row {
  display: grid;
  grid-template-columns: 200px 1fr;
}

.rt-head {
  background: #1e3a5f;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 10px 16px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.rt-head:last-child { border-right: none; }

.rt-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  border-top: 1px solid var(--border);
}

.rt-code {
  padding: 9px 16px;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  background: rgba(20, 23, 32, 0.7);
  border-right: 1px solid var(--border);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rt-val {
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  background: rgba(26, 29, 39, 0.7);
}

/* ===== SKRÓTY I POJĘCIA ===== */
.skroty-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.skroty-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.skroty-row:last-child {
  border-bottom: none;
}

.skroty-row:not(.skroty-header):hover {
  background: var(--bg-hover);
}

.skroty-header {
  background: rgba(59,130,246,0.07);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.skroty-header > div,
.skroty-row > div {
  padding: 12px 20px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.6;
}

.skroty-row > div:first-child {
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
}

.skrot-badge {
  display: inline-block;
  background: rgba(59,130,246,0.12);
  color: var(--accent);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* ===== WARTOŚCI ZAKŁADNIKÓW ===== */
.zak-table {
  background: var(--bg-card);
  border: 1px solid #2d3248;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  margin: 0 auto;
}

.zak-header-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(59,130,246,0.10);
  border-bottom: 2px solid #2d3248;
  padding: 12px 24px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.zak-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 13px 24px;
  border-bottom: 1px solid #2d3248;
  transition: background 0.15s;
  align-items: center;
}

.zak-row:last-child { border-bottom: none; }
.zak-row:hover { background: var(--bg-hover); }

.zak-name {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.zak-val {
  font-size: 14px;
  font-weight: 700;
}

/* ===== HIERARCHIA NAPADÓW ===== */
.hier-table {
  background: var(--bg-card);
  border: 1px solid #2d3248;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
}

.hier-head {
  display: grid;
  grid-template-columns: 60px 1fr 140px 140px;
  background: rgba(59,130,246,0.10);
  border-bottom: 2px solid #2d3248;
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.hier-row {
  display: grid;
  grid-template-columns: 60px 1fr 140px 140px;
  padding: 13px 20px;
  border-bottom: 1px solid #2d3248;
  align-items: center;
  transition: background 0.15s;
}

.hier-row:last-child { border-bottom: none; }
.hier-row:hover { background: var(--bg-hover); }

.hier-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.8;
}

.hier-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.3px;
}

.hier-lspd {
  font-size: 14px;
  font-weight: 700;
  color: #4ade80;
  text-align: center;
}

.hier-crime {
  font-size: 14px;
  font-weight: 700;
  color: #f87171;
  text-align: center;
}

/* ===== CO ZROBIĆ GDY ===== */
.czg-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.czg-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.czg-item.czg-danger {
  border-color: rgba(239,68,68,0.3);
}

.czg-header {
  background: #1e3a5f;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #fff;
  text-transform: uppercase;
}

.czg-item.czg-danger .czg-header {
  background: rgba(239,68,68,0.25);
  color: #fca5a5;
}

.czg-body {
  padding: 14px 18px;
  background: rgba(26, 29, 39, 0.7);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.czg-body p {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.65;
  margin: 0;
}

.czg-radio {
  background: rgba(59,130,246,0.08);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  font-size: 13px;
  color: #93c5fd;
  border-radius: 0 6px 6px 0;
  font-style: italic;
  line-height: 1.6;
}

.czg-code {
  background: #0a0c12;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: #4ade80;
  font-family: monospace;
  line-height: 1.8;
}

.czg-red { color: #f87171; font-weight: 700; }
.czg-highlight { color: #ef4444; font-weight: 700; }
.czg-big-red {
  font-size: 16px;
  font-weight: 800;
  color: #f87171;
  text-align: center;
  letter-spacing: 0.5px;
}

/* ===== PODJEDNOSTKI ===== */
.units-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.unit-card {
  background: rgba(26, 29, 39, 0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}

.unit-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.unit-tag {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.unit-tag.aiad   { background: rgba(239,68,68,0.2);   color: #f87171; }
.unit-tag.sahp   { background: rgba(251,191,36,0.2);  color: #fbbf24; }
.unit-tag.fto    { background: rgba(34,197,94,0.2);   color: #4ade80; }
.unit-tag.swat   { background: rgba(59,130,246,0.2);  color: #60a5fa; }
.unit-tag.sru    { background: rgba(34,197,94,0.2);   color: #4ade80; }
.unit-tag.dtu    { background: rgba(251,191,36,0.2);  color: #fbbf24; }
.unit-tag.dea    { background: rgba(249,115,22,0.2);  color: #fb923c; }

.unit-desc {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ===== WYPOSAŻENIE ACCORDION ===== */
.wyp-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wyp-acc-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.wyp-acc-item.open {
  border-color: rgba(59,130,246,0.4);
}

.wyp-acc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(26,29,39,0.85);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.wyp-acc-header:hover {
  background: var(--bg-hover);
}

.wyp-acc-num {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  min-width: 28px;
}

.wyp-acc-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.wyp-acc-arrow {
  font-size: 18px;
  color: var(--text-dim);
  transition: transform 0.25s ease;
  line-height: 1;
}

.wyp-acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: rgba(15,17,23,0.5);
  padding: 0 20px;
}

/* OLD index styles (kept for compat) */
.wyp-index {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 560px;
}

.wyp-index-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  transition: background 0.15s, border-color 0.15s;
}

.wyp-index-item:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

/* ===== WYPOSAŻENIE INDEX ===== */
.wyp-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(234,179,8,0.07);
  border: 1px solid rgba(234,179,8,0.25);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13.5px;
  color: #fbbf24;
  margin-bottom: 24px;
}

.wyp-notice-icon { font-size: 16px; flex-shrink: 0; }

.wyp-units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.wyp-unit-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.wyp-unit-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  box-shadow: 0 4px 16px rgba(59,130,246,0.08);
}

.wyp-unit-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.wyp-unit-body { flex: 1; }

.wyp-unit-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.wyp-unit-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.wyp-unit-arrow {
  font-size: 20px;
  color: var(--text-muted);
  transition: color 0.18s, transform 0.18s;
}

.wyp-unit-card:hover .wyp-unit-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox-overlay.open {
  display: flex;
}
.lightbox-overlay img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }
.zoomable {
  cursor: zoom-in;
  transition: opacity 0.15s;
}
.zoomable:hover { opacity: 0.88; }

.wyp-num {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
  min-width: 24px;
}

/* ===== WYPOSAŻENIE 2-COL ===== */
.wyp-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ===== WYP CARDS (nowe karty wyposażenia) ===== */
.wyp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.wyp-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #09132a 0%, #112240 100%);
  border-bottom: 1px solid rgba(59,130,246,0.2);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.wyp-card-icon {
  font-size: 18px;
  line-height: 1;
}

.wyp-list {
  list-style: none;
  padding: 8px 0;
  margin: 0;
}

.wyp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.wyp-item:last-child {
  border-bottom: none;
}

.wyp-check {
  color: #3b82f6;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

/* RESPONSIVE */
/* ===== PAGE TRANSITION ===== */
.content-page {
  animation: pageIn 0.22s ease both;
}

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

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, box-shadow 0.25s;
  z-index: 200;
  box-shadow: 0 4px 14px rgba(59,130,246,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.5);
}

/* ===== ACTIVE PARENT in sidebar ===== */
.nav-group-header.parent-active {
  color: var(--accent);
  opacity: 0.85;
}

/* ===== SIDEBAR OVERLAY (mobile) ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

.sidebar-overlay.active { display: block; }

/* ===== LOGIN GATE ===== */
.login-gate {
  position: fixed;
  inset: 0;
  background: #0b0d14;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  background-image: radial-gradient(ellipse at 50% 0%, rgba(59,130,246,0.12) 0%, transparent 60%);
}
.login-gate.hidden { display: none; }

.login-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #13151f;
  border: 1px solid #252836;
  border-radius: 20px;
  padding: 48px 52px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.login-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 20px rgba(59,130,246,0.4));
}

.login-title {
  font-size: 26px;
  font-weight: 800;
  color: #e2e8f0;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}

.login-sub {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  letter-spacing: 0.3px;
}

.login-divider {
  width: 40px;
  height: 2px;
  background: #3b82f6;
  border-radius: 2px;
  margin: 24px 0;
  opacity: 0.6;
}

.login-desc {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.7;
  margin: 0 0 28px;
}

.login-discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 0;
  background: #5865f2;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 20px rgba(88,101,242,0.35);
}
.login-discord-btn:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(88,101,242,0.5);
}
.login-discord-btn svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  flex-shrink: 0;
}

.login-denied {
  display: none;
  margin-top: 20px;
  padding: 12px 16px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 10px;
  color: #f87171;
  font-size: 13px;
  flex-direction: column;
  gap: 10px;
}
.login-denied.visible { display: flex; }
.login-denied button {
  background: none;
  border: 1px solid rgba(239,68,68,0.4);
  color: #f87171;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
}
.login-denied button:hover { background: rgba(239,68,68,0.15); }

/* topbar user chip */
.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-user-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px 3px 3px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.topbar-user-chip img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.topbar-user-chip span { font-weight: 600; color: var(--text); }
.topbar-logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.15s;
}
.topbar-logout-btn:hover { color: #ef4444; }

/* ===== EDIT BUTTON ===== */
.edit-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.edit-btn:hover { background: var(--bg-hover); color: var(--accent); border-color: var(--accent); }
.edit-btn.active { background: rgba(59,130,246,0.12); border-color: var(--accent); color: var(--accent); }

/* ===== WYSIWYG TOOLBAR ===== */
.wysiwyg-bar {
  position: fixed;
  bottom: -90px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1a1d2e;
  border: 1px solid #2d3248;
  border-radius: 14px;
  padding: 8px 12px;
  z-index: 600;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  transition: bottom 0.3s cubic-bezier(0.4,0,0.2,1);
  white-space: nowrap;
}
.wysiwyg-bar.open { bottom: 24px; }

.wysiwyg-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}

.wt-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  line-height: 1;
  min-width: 32px;
}
.wt-btn:hover { background: var(--bg-hover); color: var(--text); }
.wt-btn.on   { background: rgba(59,130,246,0.2); color: var(--accent); }

.wt-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
  flex-shrink: 0;
}

/* push content up so toolbar doesn't cover bottom */
.content.edit-mode-active {
  padding-bottom: 100px;
}

.wysiwyg-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  border-left: 1px solid var(--border);
  padding-left: 10px;
}

.wysiwyg-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-right: 4px;
}

.wt-save {
  padding: 6px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.wt-save:hover { background: #2563eb; }

.wt-cancel {
  padding: 6px 12px;
  background: var(--bg-card);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.wt-cancel:hover { background: var(--bg-hover); }

.wt-connect {
  padding: 6px 11px;
  background: rgba(16,185,129,0.1);
  color: #34d399;
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.wt-connect:hover  { background: rgba(16,185,129,0.2); }
.wt-connect.linked { background: rgba(16,185,129,0.18); border-color: #10b981; color: #10b981; }

.wt-reset {
  padding: 6px 10px;
  background: rgba(239,68,68,0.1);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.wt-reset:hover { background: rgba(239,68,68,0.2); }

/* pick mode banner */
.pick-banner {
  display: none;
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  background: #92400e;
  border: 1px solid #f59e0b;
  color: #fef3c7;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 10px;
  z-index: 700;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  pointer-events: none;
  white-space: nowrap;
}
.pick-banner span {
  opacity: 0.7;
  font-weight: 400;
  font-size: 12px;
  margin-left: 8px;
}
.pick-banner.visible { display: block; }

/* pick-mode row highlight */
.pick-hover {
  outline: 2px solid #f59e0b !important;
  outline-offset: 2px;
  border-radius: 4px;
  cursor: crosshair !important;
}

/* editable area highlight */
.content-page[contenteditable="true"] {
  outline: 2px solid rgba(59,130,246,0.3);
  outline-offset: 8px;
  border-radius: 8px;
  min-height: 200px;
}
.content-page[contenteditable="true"] *:hover {
  outline: 1px dashed rgba(59,130,246,0.4);
  outline-offset: 2px;
  border-radius: 3px;
}
.content-page[contenteditable="true"] *:focus {
  outline: none;
}

/* badge "Edytowano" */
.edited-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 20px;
  padding: 2px 10px;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

/* ===== C8 JAK PRZEPROWADZIĆ ===== */
.c8-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.c8-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
}

.c8-info-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.c8-info-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.c8-info-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-dim);
  margin-left: 4px;
}

.c8-radio-box {
  background: linear-gradient(135deg, #09132a 0%, #0f1e38 100%);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 28px;
}

.c8-radio-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #7aa8d8;
  margin-bottom: 6px;
}

.c8-radio-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 4px;
}

.c8-radio-cmd {
  color: #4ade80;
  font-family: monospace;
  font-size: 13px;
}

.c8-radio-tag {
  background: rgba(59,130,246,0.15);
  color: #93c5fd;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.c8-radio-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 12px 0;
}

.c8-steps-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.c8-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.c8-step {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 20px;
}

.c8-step:last-child { padding-bottom: 0; }

.c8-step::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 38px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.c8-step:last-child::before { display: none; }

.c8-step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
  z-index: 1;
}

.c8-step-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  flex: 1;
}

.c8-step-head {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.c8-step-text {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.6;
}

.c8-quote {
  color: #4ade80;
  font-weight: 700;
}

.c8-step-warn {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(239,68,68,0.08);
  border-left: 3px solid #ef4444;
  border-radius: 0 6px 6px 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #fca5a5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    transform: translateX(-100%);
    z-index: 100;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }
  .sidebar-toggle { display: block; }
  .content { padding: 24px 20px; }
  .back-to-top { bottom: 16px; right: 16px; }
}

/* ===== SEARCH DROPDOWN ===== */
.search-wrap {
  position: relative;
}

.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 500;
  overflow: hidden;
  max-height: 420px;
  overflow-y: auto;
}

.search-dropdown.open { display: block; }

.search-dd-empty {
  padding: 18px 16px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.search-dd-section {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.search-dd-section:first-child { border-top: none; }

.search-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s;
}

.search-dd-item:hover,
.search-dd-item.focused {
  background: var(--bg-hover);
}

.search-dd-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.search-dd-text { flex: 1; min-width: 0; }

.search-dd-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dd-name mark {
  background: none;
  color: var(--accent);
  font-weight: 700;
}

.search-dd-parent {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ===== ULUBIONE (SIDEBAR) ===== */
.nav-fav-section {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-fav-section::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 4px;
}

#favList:empty + .nav-divider { display: none; }

/* ===== BOOKMARK BUTTON ===== */
.bookmark-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 16px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  z-index: 10;
}

.bookmark-btn:hover {
  background: var(--bg-hover);
  color: var(--accent);
  border-color: var(--accent);
}

.bookmark-btn.saved {
  background: rgba(59,130,246,0.12);
  border-color: var(--accent);
  color: var(--accent);
}

.bookmark-btn.saved:hover {
  background: rgba(220,38,38,0.12);
  border-color: #ef4444;
  color: #ef4444;
}

/* page-hero needs relative to anchor button */
.page-hero { position: relative; }

/* ===== WEBSOCKET STATUS DOT ===== */
.ws-status {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #374151;
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.ws-status.ws-online {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,0.7);
  animation: ws-pulse 2.5s ease-in-out infinite;
}

.ws-status.ws-offline {
  background: #ef4444;
  box-shadow: 0 0 4px rgba(239,68,68,0.5);
}

@keyframes ws-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ===== TOAST NOTIFICATIONS ===== */
.lspd-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e2a45;
  border: 1px solid rgba(59,130,246,0.4);
  color: #93c5fd;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 24px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.lspd-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== KODY POŚCIGOWE – PP GRID ===== */
.pp-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
}

.pp-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pp-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
}

.pp-miasto {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

.pp-pojazd {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

.pp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pp-arrow {
  font-size: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ===== KODY POŚCIGOWE – PPK CARDS ===== */
.pp-kryteria {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ppk-card {
  border: 1px solid var(--pkolor, var(--border));
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

.ppk-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(255,255,255,0.04);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.ppk-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.ppk-col {
  padding: 14px 18px;
}

.ppk-col + .ppk-col {
  border-left: 1px solid var(--border);
}

.ppk-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.ppk-label-green {
  color: #4ade80;
}

.ppk-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ppk-list li {
  font-size: 13px;
  color: var(--text-dim);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}

.ppk-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.ppk-list-green li {
  color: #86efac;
}

.ppk-list-green li::before {
  color: #4ade80;
  content: '✓';
  font-size: 11px;
}

/* ===== DROP NAPAD ===== */
.drop-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.drop-head-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  background: rgba(37,99,235,0.15);
  padding: 10px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #93c5fd;
  gap: 16px;
}

.drop-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  padding: 10px 18px;
  gap: 16px;
  border-top: 1px solid var(--border);
  align-items: center;
  transition: background 0.12s;
}

.drop-row:hover {
  background: var(--bg-hover);
}

.drop-napad {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.drop-ico {
  font-size: 18px;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}

.drop-items {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.drop-tag {
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.25);
  color: #93c5fd;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ===== WARTOŚCI ZAKŁADNIKÓW – ZAK CARDS ===== */
.zak-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.zak-tier-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

.zak-tier-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}

.zak-tier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 18px;
  border-top: 1px solid rgba(255,255,255,0.04);
  gap: 12px;
}

.zak-tier-row:first-of-type {
  border-top: none;
}

.zak-tier-name {
  font-size: 13.5px;
  color: var(--text);
}

.zak-tier-val {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* ===== KRYTERIA NEGOCJACJI – NEG CARDS ===== */
.neg-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.neg-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 11px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: background 0.12s;
}

.neg-row:hover {
  background: var(--bg-hover);
}

.neg-name {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.45;
}

.neg-val {
  font-size: 13px;
  font-weight: 700;
  color: #4ade80;
  white-space: nowrap;
  text-align: right;
}

.neg-special {
  border-color: rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.05);
}

.neg-special .neg-val {
  color: #f87171;
}
