/* ============================================================
   JAK TO DZIAŁA — ZMIENNE DODATKOWE
   ============================================================ */
:root {
  --danger:    #A32D2D;
  --warning:   #C2862E;
  --font-mono: 'Space Mono', monospace;
}

/* ============================================================
   NAV — ACTIVE LINK
   ============================================================ */
.nav-links a.active {
  color: var(--primary);
  font-weight: 500;
}

/* ============================================================
   MAIN WRAPPER
   ============================================================ */
.jtd-main {
  position: relative;
}

/* ============================================================
   AKT — SEKCJA
   ============================================================ */
.akt {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 0 80px;
  position: relative;
}

/* Naprzemienne tła */
.akt-01 { background: var(--background); }
.akt-02 { background: #EDECEA; }
.akt-03 { background: var(--background); }
.akt-04 { background: #EDECEA; }
.akt-05 { background: var(--background); }
.akt-06 { background: #EDECEA; }

/* ============================================================
   AKT INNER — TREŚĆ
   ============================================================ */
.akt-inner {
  max-width: 760px;
  margin-inline: auto;
  text-align: left;
}

/* ============================================================
   AKT LABEL
   ============================================================ */
.akt-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 28px;
  opacity: 0.85;
}

/* ============================================================
   AKT HEADING
   ============================================================ */
.akt h2 {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--foreground);
  margin-bottom: 28px;
  max-width: calc(100% + 64px);
  margin-inline: -32px;
}

/* ============================================================
   AKT DESC
   ============================================================ */
.akt-desc {
  font-size: 17px;
  color: var(--muted-foreground);
  line-height: 1.75;
  max-width: calc(100% + 56px);
  margin-inline: -28px;
}

/* ============================================================
   DOT NAV — FIXED PRAWA STRONA
   ============================================================ */
.dot-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* ============================================================
   DOT — POJEDYNCZA KROPKA
   ============================================================ */
.dot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}

.dot::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
}

.dot:hover {
  background: var(--muted-foreground);
  text-decoration: none;
}

/* Aktywna kropka */
.dot.is-active {
  background: var(--primary);
  transform: scale(1.5);
}

/* ============================================================
   DOT NUM — ETYKIETA PRZY HOVER
   ============================================================ */
.dot-num {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--primary);
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.dot:hover .dot-num,
.dot.is-active .dot-num {
  opacity: 1;
}

/* ============================================================
   DOT NAV — UKRYJ NA MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .dot-nav {
    display: none;
  }

  .akt {
    padding: 80px 0 60px;
    align-items: flex-start;
    justify-content: center;
  }

  .akt-inner {
    text-align: left;
  }

  .akt h2 {
    font-size: clamp(22px, 6vw, 32px);
    max-width: 680px;
    margin-inline: 0;
  }

  .akt-desc {
    font-size: 15px;
    max-width: 580px;
    margin-inline: 0;
  }
}

/* ============================================================
   AKT-01 — SCANNER SCENE (nowa, jednoscenowa)
   ============================================================ */

/* Pinned — wyłącz domyślne justify-content center */
.akt-01 {
  justify-content: flex-start;
  padding-top: 120px;
}

/* Szerszy inner dla sceny */
.akt-inner--01 {
  max-width: 960px;
}

/* ============================================================
   SCANNER SCENE — kontener sceny (bez ramki monitora)
   ============================================================ */
.scanner-scene {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 48px;
  width: 100%;
  max-width: 900px;
  /* neutralne tło sceny */
  background: color-mix(in srgb, var(--foreground) 4%, var(--background));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  overflow: hidden;
}

/* ============================================================
   WIN WORD — AKT 1 (statyczne okno, nie na pulpicie)
   ============================================================ */
.win-word--akt1 {
  position: relative;
  width: 100%;
  height: auto;
  background: #fff;
  display: flex;
  flex-direction: column;
  border-radius: 8px 8px 4px 4px;
  overflow: hidden;
  box-shadow:
    0 2px 12px rgba(0,0,0,0.18),
    0 1px 3px rgba(0,0,0,0.12);
}

/* ============================================================
   WORD CONTENT — AKT 1 (bez flex:1, auto height)
   ============================================================ */
.word-content--akt1 {
  flex: none;
  padding: 14px 16px 16px;
}

/* ============================================================
   AKT1 DOC LINE — wiersz dokumentu w oknie Word
   ============================================================ */
.akt1-doc-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 0;
  font-size: 11px;
  line-height: 1.5;
}

.akt1-doc-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #666;
  min-width: 80px;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.akt1-doc-value {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #1a1a1a;
  transition: color 0.15s ease;
}

/* Stan zanonimizowany — linia dokumentu */
.akt1-doc-value.is-redacted {
  color: var(--primary);
  letter-spacing: 0.05em;
}

/* ============================================================
   WIN SCREENSHOT — okno podglądu zrzutu ekranu
   ============================================================ */
.win-screenshot {
  position: relative;
  width: 100%;
  height: auto;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
  border-radius: 8px 8px 4px 4px;
  overflow: hidden;
  box-shadow:
    0 2px 12px rgba(0,0,0,0.18),
    0 1px 3px rgba(0,0,0,0.12);
}

/* Titlebar zrzutu ekranu — ciemny, jak przeglądarka */
.win-titlebar--screenshot {
  background: #3a3a3a;
}

.win-titlebar--screenshot .win-title-left .ti {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}

.win-titlebar--screenshot .win-title-name {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* ============================================================
   SCREENSHOT TOOLBAR — pasek narzędzi podglądu
   ============================================================ */
.screenshot-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #e8e8e8;
  border-bottom: 1px solid #d0d0d0;
}

.screenshot-toolbar .ti {
  font-size: 11px;
  color: #666;
  flex-shrink: 0;
}

.screenshot-toolbar__label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #555;
  flex: 1;
}

.screenshot-toolbar__zoom {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #888;
}

/* ============================================================
   SCREENSHOT CONTENT — treść mockupu formularza CRM
   ============================================================ */
.screenshot-content {
  background: #fff;
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crm-form-title {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #333;
  letter-spacing: 0.04em;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 2px;
}

/* ============================================================
   CRM FORM FIELDS — pola formularza
   ============================================================ */
.crm-form-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crm-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.crm-field__label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.crm-field__input {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #1a1a1a;
  background: #f9f9f9;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  padding: 5px 8px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Stan zanonimizowany — pole CRM */
.crm-field__input.is-redacted {
  background: #2C2C2A;
  color: transparent;
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  /* czarny blok redakcji — tekst niewidoczny */
}

/* ============================================================
   SCAN BEAM — jedna belka skanująca przez całą scenę
   ============================================================ */
.scan-beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 28px;
  top: -28px; /* startowo powyżej sceny */
  pointer-events: none;
  z-index: 20;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  box-shadow:
    0 0 14px 4px color-mix(in srgb, var(--primary) 32%, transparent),
    0 0 32px 8px color-mix(in srgb, var(--primary) 12%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--primary) 55%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
}

/* ============================================================
   ANON BADGE — badge "Zanonimizowano" (fade-in po skanowaniu)
   ============================================================ */
.anon-badge {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--primary) 12%, var(--background));
  border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
}

.anon-badge .ti {
  font-size: 14px;
  color: var(--primary);
  flex-shrink: 0;
}

/* ============================================================
   PANEL LABEL TAG — etykieta "Z Aizyl" / "Bez Aizyl"
   Reużywana przez Akt 1 (comparison-summary), Akt 2, Akt 3
   ============================================================ */
.panel-label-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: color-mix(in srgb, #22c55e 12%, transparent);
  border: 1px solid color-mix(in srgb, #22c55e 35%, transparent);
  color: #22c55e;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.panel-label-tag--danger {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
  color: var(--danger);
}

/* ============================================================
   COMPARISON SUMMARY — statyczna sekcja porównania pod sceną
   ============================================================ */
.comparison-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
  width: 100%;
  max-width: 900px;
}

/* Reużyj .scan-result z Aktu 2/3 — definiujemy tu bazowe style */
.scan-result {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 500;
}

.scan-result .ti {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* comparison-summary-01: tag nad wierszem ikona+tekst */
#comparison-summary-01 .scan-result {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.scan-result__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.scan-result--ok {
  background: color-mix(in srgb, #22c55e 10%, transparent);
  border: 1px solid color-mix(in srgb, #22c55e 35%, transparent);
  color: #22c55e;
}

.scan-result--ok .ti {
  color: #22c55e;
}

.scan-result--danger {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  color: var(--danger);
}

.scan-result--danger .ti {
  color: var(--danger);
}

/* ============================================================
   GUARDIAN DETECTION PANEL — niezależne klasy dla #guardian-detection-09
   Skopiowane z .scan-result / .panel-label-tag jako punkt startowy.
   Można swobodnie modyfikować bez wpływu na comparison-summary.
   ============================================================ */
.guardian-detection-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 500;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.guardian-detection-row .ti {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.guardian-detection-row__content {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.guardian-detection-row--safe {
  color: #22c55e;
}

.guardian-detection-row--safe .ti {
  color: #22c55e;
}

.guardian-detection-row--risk {
  color: var(--danger);
}

.guardian-detection-row--risk .ti {
  color: var(--danger);
}

.guardian-detection-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: color-mix(in srgb, #22c55e 12%, transparent);
  border: 1px solid color-mix(in srgb, #22c55e 35%, transparent);
  color: #22c55e;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.guardian-detection-tag--safe {
  background: color-mix(in srgb, #22c55e 12%, transparent);
  border-color: color-mix(in srgb, #22c55e 35%, transparent);
  color: #22c55e;
}

.guardian-detection-tag--risk {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
  color: var(--danger);
}

/* ============================================================
   SCANNER RESULTS — WYNIKI (reużywane przez Akt 2/3, fade-in)
   ============================================================ */
.scanner-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 16px;
  width: 100%;
  max-width: 860px;
  opacity: 0;
  visibility: hidden;
}

/* ============================================================
   SCANNER SCENE — RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .scanner-scene {
    grid-template-columns: 1fr;
    max-width: 480px;
    gap: 16px;
  }

  .comparison-summary {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .scanner-results {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

/* ============================================================
   AKT-02 — PINNED: wyłącz domyślne justify-content center
   ============================================================ */
.akt-02 {
  justify-content: flex-start;
  padding-top: 120px;
}

/* Szerszy inner dla okna Explorera */
.akt-inner--02 {
  max-width: 960px;
}

/* ============================================================
   WIN EXPLORER — OKNO EXPLORERA (AKT 02)
   Samodzielna klasa, niezależna od .win-word/.win-browser z Aktu 4
   ============================================================ */
.win-explorer {
  position: relative;
  width: 100%;
  max-width: 900px;
  min-height: 440px;
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  border-radius: 8px 8px 4px 4px;
  overflow: hidden;
  box-shadow:
    0 2px 12px rgba(0,0,0,0.18),
    0 1px 3px rgba(0,0,0,0.12);
  background: var(--card, var(--background));
  border: 1px solid var(--border);
}

/* ============================================================
   WIN TITLEBAR — EXPLORER (niebieski pasek jak Windows Explorer)
   ============================================================ */
.win-titlebar--explorer {
  background: #1a6496;
}

.win-titlebar--explorer .win-title-left .ti {
  font-size: 13px;
  color: rgba(255,255,255,0.9);
}

.win-titlebar--explorer .win-title-name {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

/* ============================================================
   EXPLORER BODY — flex row: sidebar + content
   ============================================================ */
.explorer-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ============================================================
   EXPLORER SIDEBAR — lewy wąski panel (~25%)
   ============================================================ */
.explorer-sidebar {
  width: 25%;
  min-width: 110px;
  max-width: 160px;
  background: var(--card, var(--background));
  border-right: 1px solid var(--border);
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.explorer-sidebar__item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-foreground);
  cursor: default;
  border-radius: 4px;
  margin: 0 4px;
  transition: background 0.15s ease;
}

.explorer-sidebar__item .ti {
  font-size: 13px;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.explorer-sidebar__item--active {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--foreground);
}

.explorer-sidebar__item--active .ti {
  color: var(--primary);
}

/* ============================================================
   EXPLORER CONTENT — prawy obszar z plikami (75%)
   ============================================================ */
.explorer-content {
  flex: 1;
  min-width: 0;
  padding: 40px 0 40px;
  background: var(--background);
}

/* ============================================================
   FILE GRID — SIATKA 4 KOLUMNY
   ============================================================ */
.file-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 10px 8px;
}

/* Wariant dla Explorera — 4 kolumny × 2 rzędy */
.file-grid--explorer {
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 8px;
  padding: 14px 16px 14px;
}

/* ============================================================
   FILE NODE — POJEDYNCZY ELEMENT
   ============================================================ */
.file-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 8px 4px 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  cursor: default;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.file-node .ti {
  font-size: 26px;
  color: var(--muted-foreground);
  line-height: 1;
  transition: color 0.2s ease;
}

.file-node__name {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--muted-foreground);
  text-align: center;
  line-height: 1.3;
  word-break: break-all;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

/* ---- Nowy plik (startowo ukryty) ---- */
.file-node--new {
  opacity: 0;
  transform: scale(0.7);
  transform-origin: center center;
}

/* ---- Pseudo-element ping (::after) ---- */
.file-node::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  border: 2px solid var(--primary);
  transform: scale(1);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}

/* ============================================================
   SHINE OVERLAY — EFEKT SKANOWANIA
   Bazowy .shine reużywany przez Akt 3 (nad .ctx-file-node--large)
   ============================================================ */
.shine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  background: linear-gradient(
    115deg,
    transparent,
    rgba(11, 105, 81, 0.22),
    transparent
  );
  pointer-events: none;
  z-index: 10;
}

/* Wariant dla .win-explorer — rozciągnięty na całe okno (sidebar + content) */
.shine--explorer {
  /* dziedziczy position: absolute, top/bottom/left/width/background z .shine */
  /* z-index wyższy niż sidebar i content */
  z-index: 20;
}

/* ============================================================
   TOAST — POWIADOMIENIE
   ============================================================ */
.toast {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--card, var(--background));
  border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--foreground);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 40;
}

.toast__icon {
  font-size: 14px;
  color: var(--primary);
  flex-shrink: 0;
}

.toast__icon--ok {
  color: #22c55e;
}

/* Wariant toastu dla Explorera — nad oknem, wyżej */
.toast--explorer {
  top: 36px;
}

/* ============================================================
   PING RING — element wstrzykiwany przez JS do .file-node
   ============================================================ */
.ping-ring {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  border: 2px solid var(--primary);
  transform: scale(1);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}

/* ============================================================
   COMPARISON SUMMARY — AKT 02 (wzorzec z Aktu 1)
   ============================================================ */
.comparison-summary--akt2 {
  margin-top: 20px;
  width: 100%;
  max-width: 900px;
  opacity: 0;
  visibility: hidden;
}

/* ============================================================
   WIN EXPLORER — RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .win-explorer {
    max-width: 100%;
  }

  .explorer-sidebar {
    min-width: 90px;
    max-width: 110px;
  }

  .explorer-sidebar__item {
    font-size: 9px;
    padding: 4px 8px;
  }

  .file-grid--explorer {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px;
  }

  .comparison-summary--akt2 {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .explorer-sidebar {
    display: none;
  }

  .file-grid--explorer {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }

  .file-node .ti {
    font-size: 22px;
  }

  .file-node__name {
    font-size: 7px;
  }
}

/* ============================================================
   AKT-03 — MENU KONTEKSTOWE
   ============================================================ */

/* Pinned — wyłącz domyślne justify-content center */
.akt-03 {
  justify-content: flex-start;
  padding-top: 120px;
  background: var(--background);
}

/* Szerszy inner dla okna Explorera */
.akt-inner--03 {
  max-width: 960px;
}

/* ============================================================
   WIN EXPLORER — MODYFIKATOR AKT 03
   ============================================================ */
.win-explorer--akt3 {
  margin-top: 48px;
}

/* ============================================================
   EXPLORER TABS — pasek zakładek (Windows 11 Explorer)
   ============================================================ */
.explorer-tabs {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 0 8px;
  background: #1a6496; /* ten sam kolor co titlebar */
  height: 28px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.explorer-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 6px 6px 0 0;
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255,255,255,0.55);
  background: transparent;
  cursor: default;
  height: 22px;
  white-space: nowrap;
}

.explorer-tab .ti {
  font-size: 11px;
  flex-shrink: 0;
}

.explorer-tab--active {
  background: var(--card, var(--background));
  color: var(--foreground);
}

.explorer-tab--active .ti {
  color: var(--primary);
}

/* ============================================================
   FILE GRID — WARIANT AKT 03 (3 pliki)
   ============================================================ */
.file-grid--ctx3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 8px;
  padding: 14px 16px 14px;
  align-items: start;
}

/* ============================================================
   CTX FILE NODE — DUŻY PLIK GŁÓWNY
   ============================================================ */
.ctx-file-node--large {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 10px 4px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  cursor: default;
  overflow: hidden;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ctx-file-node--large .ti {
  font-size: 34px;
  color: var(--muted-foreground);
  line-height: 1;
  transition: color 0.2s ease;
}

.ctx-file-node--large .file-node__name {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--muted-foreground);
  text-align: center;
  line-height: 1.3;
  word-break: break-all;
  letter-spacing: 0.02em;
}

/* ============================================================
   SHINE — WARIANT NAD POJEDYNCZYM PLIKIEM
   ============================================================ */
.shine--file {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  background: linear-gradient(
    115deg,
    transparent,
    rgba(11, 105, 81, 0.30),
    transparent
  );
  pointer-events: none;
  z-index: 10;
  border-radius: 6px;
}

/* ============================================================
   CURSOR ICON — ANIMOWANY WSKAŹNIK MYSZY
   ============================================================ */
.cursor-icon {
  position: absolute;
  pointer-events: none;
  z-index: 41;
  top: 9px;
  left: 20px;
  opacity: 0;
}

.cursor-icon .ti {
  font-size: 20px;
  color: var(--foreground);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
  line-height: 1;
}

/* ============================================================
   CTX MENU — MENU KONTEKSTOWE
   ============================================================ */
.ctx-menu {
  position: absolute;
  z-index: 35;
  min-width: 180px;
  background: var(--card, var(--background));
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow:
    0 4px 6px -1px rgba(0,0,0,0.10),
    0 10px 24px -4px rgba(0,0,0,0.14);
  padding: 4px 0;
  opacity: 0;
  transform: scale(0.92);
  transform-origin: top left;
  pointer-events: none;
}

.ctx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--foreground);
  letter-spacing: 0.02em;
  cursor: default;
  transition: background 0.15s ease;
}

.ctx-item .ti {
  font-size: 14px;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.ctx-item--danger {
  color: var(--danger);
}

.ctx-separator {
  height: 1px;
  background: var(--border);
  margin: 3px 0;
}

/* Pozycja menu w oknie Explorera Aktu 3 */
#ctx-menu {
  top: 140px;
  left: 290px;
}

/* ============================================================
   CTX ITEM — AIZYL (highlight)
   ============================================================ */
.ctx-item--aizyl {
  color: var(--primary);
  font-weight: 500;
}

.ctx-item--aizyl .ti {
  color: var(--primary);
}

.ctx-item--aizyl.is-highlighted {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border-radius: 4px;
}

/* ============================================================
   TOAST — AKT 03 (pozycja nad zawartością okna)
   ============================================================ */
.toast--akt3 {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--card, var(--background));
  border: 1px solid color-mix(in srgb, #22c55e 40%, transparent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--foreground);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 40;
  height: 40px;
  top: 65px;
}

/* ============================================================
   COMPARISON SUMMARY — AKT 03 (wzorzec Aktu 2)
   ============================================================ */
.comparison-summary--akt3 {
  margin-top: 20px;
  width: 100%;
  max-width: 900px;
  opacity: 0;
  visibility: hidden;
}

/* ============================================================
   AKT-03 — RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .win-explorer--akt3 {
    max-width: 100%;
  }

  .file-grid--ctx3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 8px;
  }

  .comparison-summary--akt3 {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .ctx-file-node--large .ti {
    font-size: 28px;
  }

  .explorer-tabs {
    height: 24px;
  }
}

/* ============================================================
   AKT-04 — PASEK SYSTEMOWY
   ============================================================ */

/* Pinned — wyłącz domyślne justify-content center */
.akt-04 {
  justify-content: flex-start;
  padding-top: 100px;
  background: #EDECEA;
}

/* Szerszy inner dla monitora */
.akt-inner--04 {
  max-width: 960px;
}

/* ============================================================
   MONITOR WRAP — kontener z podstawką
   ============================================================ */
.monitor-wrap {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ============================================================
   MONITOR FRAME — ramka monitora
   ============================================================ */
.monitor-frame {
  width: 100%;
  max-width: 860px;
  background: #c9c8c8;
  border-radius: 14px 14px 6px 6px;
  padding: 10px 10px 8px;
  box-shadow:
    0 0 0 1px #111,
    0 8px 32px rgba(0,0,0,0.45),
    0 2px 8px rgba(0,0,0,0.3);
  position: relative;
}

/* Kamera (dot na górze ramki) */
.monitor-frame::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #333;
}

/* ============================================================
   MONITOR SCREEN — ekran
   ============================================================ */
.monitor-screen {
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  position: relative;
  background: color-mix(in srgb, var(--primary) 70%, black);
}

/* ============================================================
   MONITOR STAND — podstawka
   ============================================================ */
.monitor-stand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.monitor-stand__neck {
  width: 60px;
  height: 28px;
  background: linear-gradient(to bottom, #1a1a1a, #252525);
  clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
}

.monitor-stand__base {
  width: 160px;
  height: 10px;
  background: linear-gradient(to bottom, #252525, #1e1e1e);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* ============================================================
   WIN DESKTOP — pulpit Windows
   ============================================================ */
.win-desktop {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 70%, black) 0%, color-mix(in srgb, var(--primary) 45%, black) 55%, #0B6951 100%);
  overflow: hidden;
}

/* ============================================================
   DESKTOP ICONS — ikony pulpitu
   ============================================================ */
.desktop-icons {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 5;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 52px;
  cursor: default;
}

.desktop-icon .ti {
  font-size: 22px;
  color: rgba(255,255,255,0.85);
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.desktop-icon span {
  font-family: var(--font-mono);
  font-size: 8px;
  color: rgba(255,255,255,0.85);
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
  line-height: 1.2;
  word-break: break-word;
}

/* ============================================================
   WIN WINDOW — bazowy styl okna
   ============================================================ */
.win-window {
  position: absolute;
  border-radius: 8px 8px 4px 4px;
  overflow: hidden;
  box-shadow:
    0 4px 24px rgba(0,0,0,0.5),
    0 1px 4px rgba(0,0,0,0.3);
}

/* ============================================================
   WIN TITLEBAR — pasek tytułu
   ============================================================ */
.win-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  height: 28px;
  flex-shrink: 0;
}

.win-titlebar--word {
  background: #2b579a;
}

.win-titlebar--browser {
  background: #2d2d2d;
  flex-direction: column;
  height: auto;
  padding: 0;
}

.win-title-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.win-title-left .ti {
  font-size: 13px;
  color: rgba(255,255,255,0.9);
}

.win-title-name {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* ============================================================
   WIN CONTROLS — przyciski min/max/close
   ============================================================ */
.win-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.win-btn {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.win-btn--min  { background: #f5a623; }
.win-btn--max  { background: #27c93f; }
.win-btn--close { background: #ff5f57; }

/* ============================================================
   WIN TABS — zakładki przeglądarki
   ============================================================ */
.win-tabs {
  display: flex;
  align-items: center;
  padding: 4px 8px 0;
  background: #1e1e1e;
  width: 100%;
  box-sizing: border-box;
}

.win-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px 6px 0 0;
  font-family: var(--font-mono);
  font-size: 8px;
  color: rgba(255,255,255,0.6);
  background: transparent;
  cursor: default;
}

.win-tab--active {
  background: #2d2d2d;
  color: rgba(255,255,255,0.9);
}

.win-tab .ti {
  font-size: 10px;
}

/* Pasek tytułu przeglądarki — potrzebuje position: relative dla absolutnych .win-controls */
.win-titlebar--browser {
  position: relative;
}

.win-titlebar--browser > .win-controls {
  padding: 4px 8px;
  position: absolute;
  top: 4px;
  right: 8px;
}

/* ============================================================
   BROWSER ADDRESSBAR — pasek adresu
   ============================================================ */
.browser-addressbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: #2d2d2d;
  border-bottom: 1px solid #3a3a3a;
}

.browser-addressbar .ti {
  font-size: 10px;
  color: #4caf50;
  flex-shrink: 0;
}

.browser-url {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255,255,255,0.7);
}

/* ============================================================
   BROWSER CONTENT — treść czatu AI
   ============================================================ */
.browser-content {
  background: #1a1a2e;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 8px;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

/* ============================================================
   CHAT BUBBLE — bąbelek AI
   ============================================================ */
.chat-bubble--ai {
  background: #2a2a3e;
  border-radius: 4px 12px 12px 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 85%;
  align-self: flex-start;
}

.chat-placeholder-line {
  height: 6px;
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
}

/* ============================================================
   CHAT INPUT — pole wiadomości
   ============================================================ */
.chat-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  background: #252535;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 5px 8px;
}

.chat-input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255,255,255,0.85);
  min-height: 14px;
  display: flex;
  align-items: center;
  gap: 1px;
}

.chat-input__text {
  /* tekst wklejony przez JS */
}

.chat-input__cursor {
  display: inline-block;
  width: 1px;
  height: 11px;
  background: rgba(255,255,255,0.7);
  opacity: 0;
  vertical-align: middle;
}

.chat-send-btn {
  background: none;
  border: none;
  cursor: default;
  padding: 2px;
  display: flex;
  align-items: center;
}

.chat-send-btn .ti {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   WIN WORD — okno dokumentu Word
   ============================================================ */
.win-word {
  top: 8%;
  left: 6%;
  width: 52%;
  height: 68%;
  background: #fff;
  z-index: 20;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   WORD RIBBON — uproszczony ribbon
   ============================================================ */
.word-ribbon {
  display: flex;
  align-items: center;
  gap: 0;
  background: #f3f3f3;
  border-bottom: 1px solid #d0d0d0;
  padding: 0 8px;
  height: 22px;
  flex-shrink: 0;
}

.ribbon-tab {
  font-family: var(--font-mono);
  font-size: 8px;
  color: #555;
  padding: 0 8px;
  height: 100%;
  display: flex;
  align-items: center;
  cursor: default;
}

.ribbon-tab--active {
  color: #2b579a;
  border-bottom: 2px solid #2b579a;
  font-weight: 600;
}

/* ============================================================
   WORD CONTENT — treść dokumentu
   ============================================================ */
.word-content {
  background: #fff;
  padding: 12px 14px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.word-doc-title {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.word-placeholder-line {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
}

/* ============================================================
   WORD PESEL LINE — linia z numerem PESEL
   ============================================================ */
.word-pesel-line {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
}

.word-pesel-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #555;
  flex-shrink: 0;
}

.word-pesel-value {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #1a1a1a;
  position: relative;
  z-index: 2;
  /* selection jest dzieckiem tego elementu */
}

/* Podświetlenie zaznaczenia (selection highlight) —
   left ustawiany przez JS (offsetLeft wartości PESEL),
   width animowana przez GSAP 0% → szerokość wartości PESEL */
.word-selection {
  position: absolute;
  left: 0;   /* nadpisywane przez JS po load */
  top: 0;
  bottom: 0;
  width: 0%;
  background: color-mix(in srgb, var(--primary) 35%, transparent);
  border-radius: 2px;
  z-index: 1;
  pointer-events: none;
}

/* ============================================================
   COPY TOOLTIP — badge "Skopiowano" nad .word-selection
   Pozycjonowany absolutnie względem .word-pesel-line,
   wyrównany do lewej krawędzi .word-selection (left ustawiany przez JS)
   ============================================================ */
.copy-tooltip {
  position: absolute;
  bottom: calc(100% + 5px); /* tuż nad linią PESEL */
  left: 0;                  /* nadpisywane przez JS (= selLeft) */
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 30;
}

.copy-tooltip .ti {
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
  line-height: 1;
}

/* ============================================================
   WIN BROWSER — okno przeglądarki
   ============================================================ */
.win-browser {
  top: 12%;
  left: 28%;
  width: 58%;
  height: 65%;
  background: #2d2d2d;
  z-index: 10;
  display: flex;
  flex-direction: column;
  opacity: 0;
}

/* ============================================================
   AIZYL PILL — pasek Aizyl (nad paskiem zadań, prawy dolny róg)
   Zakotwiczony przez środek: left + translateX(-50%) → symetryczne
   rozwijanie width w obie strony od punktu środkowego.
   ============================================================ */
.aizyl-pill {
  position: absolute;
  bottom: 38px; /* taskbar 32px + 6px margines */
  top: auto;
  /* Punkt środkowy: ~75% szerokości ekranu (prawa strona taskbara) */
  left: 85%;
  transform: translateX(-50%);
  z-index: 100;
  /* Szerokość animowana przez JS na .aizyl-pill__inner */
}

.aizyl-pill__inner {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 3px 10px 3px 3px;
  border-radius: 7px;
  background: #EDECEA;
  border: 1px solid #494949;
  backdrop-filter: blur(6px);
  white-space: nowrap;
  overflow: hidden;
  transition: none; /* animacje przez GSAP */
  box-shadow: 0 1px 6px rgba(0,0,0,0.10);
}

/* Kapsuła ikony — jaśniejsze tło, oddzielona separatorem */
.aizyl-pill__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 12%, var(--card));
  border-right: 1px solid var(--border);
  margin-right: 8px;
  flex-shrink: 0;
}

.aizyl-pill__icon {
  font-size: 12px;
  /* Kolor zawsze var(--foreground) — czarny w obu stanach */
  color: var(--foreground);
  flex-shrink: 0;
  transition: none;
}

.aizyl-pill__text {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  /* Kolor zawsze var(--foreground) — czarny w obu stanach */
  color: var(--foreground);
  letter-spacing: 0.07em;
  white-space: nowrap;
  overflow: hidden;
  transition: none;
}

/* Stan ostrzeżenia — tylko tło kapsuły ikony zmienia się,
   kolor tekstu i ikony pozostaje var(--foreground) */
.aizyl-pill--warning .aizyl-pill__inner {
  border-color: #494949;
}

.aizyl-pill--warning .aizyl-pill__icon-wrap {
  background: color-mix(in srgb, var(--warning) 12%, var(--card));
  border-right-color: color-mix(in srgb, var(--warning) 30%, var(--border));
}

/* ============================================================
   WIN TASKBAR — pasek zadań Windows
   ============================================================ */
.win-taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: rgba(20, 20, 30, 0.88);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  z-index: 50;
}

.taskbar-left {
  display: flex;
  align-items: center;
  gap: 2px;
}

.taskbar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: default;
}

.taskbar-icon .ti {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}

.taskbar-icon--start {
  background: rgba(255,255,255,0.06);
}

.taskbar-icon--start .ti {
  color: #0078d4;
}

.taskbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.taskbar-sys-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.taskbar-sys-icons .ti {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}

.taskbar-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

.taskbar-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255,255,255,0.85);
  line-height: 1.2;
}

.taskbar-date {
  font-family: var(--font-mono);
  font-size: 7px;
  color: rgba(255,255,255,0.55);
  line-height: 1.2;
}

/* ============================================================
   AKT-04 — RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .akt-inner--04 {
    max-width: 100%;
  }

  .monitor-frame {
    border-radius: 10px 10px 4px 4px;
    padding: 7px 7px 6px;
  }

  .monitor-stand__neck {
    width: 44px;
    height: 20px;
  }

  .monitor-stand__base {
    width: 120px;
    height: 8px;
  }
}

@media (max-width: 600px) {
  .monitor-frame {
    border-radius: 8px 8px 3px 3px;
    padding: 5px 5px 4px;
  }

  .win-word {
    width: 65%;
    left: 4%;
  }

  .win-browser {
    width: 68%;
    left: 22%;
  }

  .desktop-icon .ti {
    font-size: 18px;
  }

  .desktop-icon span {
    font-size: 7px;
  }
}

/* ============================================================
   AKT-05 — SHADOW AI
   ============================================================ */

/* Pinned — wyłącz domyślne justify-content center */
.akt-05 {
  justify-content: flex-start;
  padding-top: 120px;
  background: var(--background);
}

/* Szerszy inner dla okna aplikacji */
.akt-inner--05 {
  max-width: 960px;
}

/* ============================================================
   WIN AIZYL APP — główne okno aplikacji
   ============================================================ */
.win-aizyl-app {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  border-radius: 10px 10px 6px 6px;
  overflow: hidden;
  box-shadow:
    0 2px 16px rgba(0,0,0,0.12),
    0 1px 4px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
  height: 500px;
}

/* ============================================================
   WIN AIZYL TITLEBAR — jasny pasek tytułowy
   ============================================================ */
.win-aizyl-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  height: 36px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.win-aizyl-brand {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: 0.38em;
  text-transform: uppercase;
}

.win-aizyl-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.win-aizyl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1;
  cursor: default;
  padding: 0;
  font-family: var(--font-mono);
}

.win-aizyl-btn--close {
  border-color: var(--border);
}

/* ============================================================
   WIN AIZYL BODY — flex row: sidebar + content
   ============================================================ */
.win-aizyl-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ============================================================
   APP SIDEBAR — wąski lewy panel z ikonami
   ============================================================ */
.app-sidebar {
  width: 52px;
  flex-shrink: 0;
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 0;
  border-right: 1px solid var(--border);
}

.app-sidebar__icons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.app-sidebar__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-sidebar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: default;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
}

.app-sidebar__icon .ti {
  font-size: 17px;
  color: inherit;
}

.app-sidebar__letter {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  line-height: 1;
}

/* Aktywna ikona — kwadratowe tło w var(--primary) */
.app-sidebar__icon--active {
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
}

.app-sidebar__icon--active .ti {
  color: #fff;
}

/* ============================================================
   APP CONTENT — prawa główna część
   ============================================================ */
.app-content {
  flex: 1;
  min-width: 0;
  background: var(--background);
  display: flex;
  flex-direction: column;
  padding: 20px 22px 18px;
  gap: 14px;
}

/* ============================================================
   APP CONTENT HEADER
   ============================================================ */
.app-content__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.app-content__header-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.app-content__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.app-content__date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-foreground);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-content__report-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: none;
  cursor: default;
  white-space: nowrap;
  flex-shrink: 0;
}

.app-content__report-btn .ti {
  font-size: 13px;
  color: #fff;
}

/* ============================================================
   APP CARDS — kontener kart
   ============================================================ */
.app-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ============================================================
   APP CARD — pojedyncza karta
   ============================================================ */
.app-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--card, #F5F4F2);
  border: 1px solid var(--border);
}

.app-card__left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.app-card__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.3;
}

.app-card__sub {
  font-size: 11px;
  color: var(--muted-foreground);
  line-height: 1.4;
}

/* ============================================================
   APP TOGGLE — przełącznik (statyczny, włączony)
   ============================================================ */
.app-toggle {
  flex-shrink: 0;
}

.app-toggle__track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: #d0d0d0;
  cursor: default;
}

.app-toggle--on .app-toggle__track {
  background: #0B6951;
}

.app-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.22);
  transition: none;
}

.app-toggle--on .app-toggle__thumb {
  left: calc(100% - 19px);
}

/* ============================================================
   APP CARD STAT — karta ze statystykami
   ============================================================ */
.app-card--stat {
  align-items: center;
}

.app-card__stat-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.app-card__stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: color-mix(in srgb, #22c55e 14%, transparent);
  flex-shrink: 0;
}

.app-card__stat-icon .ti {
  font-size: 17px;
  color: #22c55e;
}

.app-card__stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.app-card__stat-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  line-height: 1.3;
}

.app-card__stat-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

/* ============================================================
   COUNTER VALUE — duża liczba wykrytych usług
   ============================================================ */
.counter-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ============================================================
   COUNTER SERVICES — mniejsza liczba aktywnych serwisów
   ============================================================ */
.counter-services {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.01em;
}

/* ============================================================
   APP CARD MONITOR — karta z pulsującym dotem
   ============================================================ */
.app-card--monitor {
  gap: 10px;
  justify-content: flex-start;
}

/* Pulsujący zielony dot — stała animacja CSS, niezależna od scrolla */
.app-card__monitor-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: monitor-dot-pulse 2s ease-in-out infinite;
}

@keyframes monitor-dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); opacity: 1; }
  50%  { box-shadow: 0 0 0 6px rgba(34,197,94,0); opacity: 0.75; }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); opacity: 1; }
}

/* ============================================================
   DETECTED SERVICES LIST — lista wykrytych serwisów
   ============================================================ */
.detected-services-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  padding: 0 2px;
}

.detected-service-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--primary) 6%, var(--background));
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  opacity: 0;
  transform: translateY(6px);
  /* animacja przez GSAP */
}

.detected-service-row .ti {
  font-size: 13px;
  color: var(--primary);
  flex-shrink: 0;
}

.detected-service-row__name {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--foreground);
  letter-spacing: 0.04em;
}

/* ============================================================
   CURSOR ICON — wariant dla Aktu 5 (pozycja startowa)
   ============================================================ */
.cursor-icon--akt5 {
  position: absolute;
  pointer-events: none;
  z-index: 41;
  top: 20px;
  left: 80px;
  opacity: 0;
}

/* ============================================================
   TOAST — AKT 05 RAPORT (przy przycisku "Generuj raport PDF")
   ============================================================ */
.toast--akt5-report {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--card, var(--background));
  border: 1px solid color-mix(in srgb, #22c55e 40%, transparent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--foreground);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 43;
}

.toast--akt5-report .ti {
  font-size: 13px;
  color: #22c55e;
  flex-shrink: 0;
}

/* ============================================================
   PDF PREVIEW MINI — miniaturka wygenerowanego raportu PDF
   Proporcje A4 (1:√2 ≈ 1:1.414), slide-down + fade-in przez GSAP
   ============================================================ */
.pdf-preview-mini {
  position: absolute;
  /* pozycja ustawiana przez JS — pod przyciskiem "Generuj raport PDF" */
  top: 52px;
  right: 14px;
  width: 88px;
  /* height = width * √2 */
  height: 80px;
  border-radius: 5px;
  background: var(--card, #F5F4F2);
  border: 1px solid var(--border);
  box-shadow:
    0 4px 16px rgba(0,0,0,0.14),
    0 1px 4px rgba(0,0,0,0.08);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  opacity: 0;
  pointer-events: none;
  z-index: 42;
  overflow: hidden;
  /* startowo przesunięta w górę — GSAP animuje y: -10 → 0 */
  transform: translateY(-10px);
}

.pdf-preview-mini__page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 8px 8px;
  gap: 6px;
}

.pdf-preview-mini__icon {
  font-size: 28px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 8px;
}

.pdf-preview-mini__filename {
  font-family: var(--font-mono);
  font-size: 6px;
  color: var(--muted-foreground);
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.02em;
  word-break: break-all;
  margin-top: auto;
}

/* ============================================================
   COMPARISON SUMMARY — AKT 05
   ============================================================ */
.comparison-summary--akt5 {
  margin-top: 20px;
  width: 100%;
  max-width: 900px;
  opacity: 0;
  visibility: hidden;
}

/* ============================================================
   AKT-05 — RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .akt-inner--05 {
    max-width: 100%;
  }

  .win-aizyl-app {
    max-width: 100%;
  }

  .app-content__title {
    font-size: 17px;
  }

  .counter-value {
    font-size: 28px;
  }

  .counter-services {
    font-size: 18px;
  }

  .comparison-summary--akt5 {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .app-sidebar {
    width: 42px;
  }

  .app-sidebar__icon {
    width: 30px;
    height: 30px;
  }

  .app-sidebar__icon .ti {
    font-size: 15px;
  }

  .app-content {
    padding: 14px 14px 12px;
    gap: 10px;
  }

  .app-content__report-btn {
    display: none;
  }

  .app-card {
    padding: 10px 12px;
  }

  .counter-value {
    font-size: 24px;
  }
}

/* ============================================================
   AKT-06 — PAMIĘĆ / HISTORIA ALERTÓW
   ============================================================ */

/* Pinned — wyłącz domyślne justify-content center */
.akt-06 {
  justify-content: flex-start;
  padding-top: 60px;
  background: #EDECEA;
}

/* Szerszy inner dla okna aplikacji */
.akt-inner--06 {
  max-width: 960px;
}

/* Modyfikator okna aplikacji dla Aktu 6 */
.win-aizyl-app--akt6 {
  margin-top: 16px;
}

/* Override nagłówka h2 dla Aktu 6 — zmniejszony o ~15% względem bazowego */
.akt-06 h2 {
  font-size: clamp(22px, 3.4vw, 37px);
}

/* Override paddingu wiersza alertu dla Aktu 6 */
.akt-06 .alert-row {
  padding: 9px 14px;
}

/* ============================================================
   APP SIDEBAR — ikona historii podświetlona na zielono (Akt 6)
   ============================================================ */
.app-sidebar__icon--history {
  background: var(--primary);
  color: #fff;
}

.app-sidebar__icon--history .ti {
  color: #fff;
}

/* ============================================================
   ALERT HISTORY LIST — lista wierszy alertów
   ============================================================ */
.alert-history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card, var(--background));
}

/* ============================================================
   ALERT ROW — pojedynczy wiersz alertu
   ============================================================ */
.alert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card, var(--background));
  transition: background 0.15s ease;
}

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

/* Ikona statusu */
.alert-row__icon {
  font-size: 15px;
  flex-shrink: 0;
  line-height: 1;
}

.alert-row__icon--ok {
  color: #22c55e;
}

.alert-row__icon--warn {
  color: var(--warning, #C2862E);
}

/* Kolumna opisu — zajmuje dostępne miejsce */
.alert-row__desc {
  flex: 1;
  min-width: 0;
}

.alert-row__event {
  font-size: 11px;
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  display: block;
}

/* Kolumna daty */
.alert-row__date {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--muted-foreground);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

/* Badge statusu */
.alert-row__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.alert-row__badge--ok {
  background: color-mix(in srgb, #22c55e 12%, transparent);
  border: 1px solid color-mix(in srgb, #22c55e 35%, transparent);
  color: #22c55e;
}

.alert-row__badge--warn {
  background: color-mix(in srgb, var(--warning) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent);
  color: var(--warning, #C2862E);
}

/* ============================================================
   CURSOR ICON — wariant dla Aktu 6 (pozycja startowa)
   ============================================================ */
.cursor-icon--akt6 {
  position: absolute;
  pointer-events: none;
  z-index: 41;
  top: 20px;
  left: 80px;
  opacity: 0;
}

/* ============================================================
   TOAST — AKT 06 RAPORT (przy przycisku "Generuj raport PDF")
   Analogiczny do .toast--akt5-report
   ============================================================ */
.toast--akt6-report {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--card, var(--background));
  border: 1px solid color-mix(in srgb, #22c55e 40%, transparent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--foreground);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 43;
}

.toast--akt6-report .ti {
  font-size: 13px;
  color: #22c55e;
  flex-shrink: 0;
}

/* ============================================================
   PDF PREVIEW MINI — wariant dla Aktu 6
   Reużywa .pdf-preview-mini z Aktu 5, pozycja pod przyciskiem
   ============================================================ */
.pdf-preview-mini--akt6 {
  top: 52px;
  right: 14px;
}

/* ============================================================
   COMPARISON SUMMARY — AKT 06
   ============================================================ */
.comparison-summary--akt6 {
  margin-top: 20px;
  width: 100%;
  max-width: 900px;
  opacity: 0;
  visibility: hidden;
}

/* ============================================================
   AKT-06 — RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .akt-inner--06 {
    max-width: 100%;
  }

  .win-aizyl-app--akt6 {
    max-width: 100%;
  }

  .alert-row {
    gap: 8px;
  }

  /* Ukryj datę na małych ekranach */
  .alert-row__date {
    display: none;
  }

  .comparison-summary--akt6 {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .alert-row {
    padding: 7px 10px;
    gap: 6px;
  }

  .alert-row__event {
    font-size: 10px;
  }
}

/* ============================================================
   AKT-07 — OCHRONA DOSTĘPU
   ============================================================ */

/* Pinned — wyłącz domyślne justify-content center */
.akt-07 {
  justify-content: flex-start;
  padding-top: 60px;
  background: var(--background);
}

/* Szerszy inner dla okna aplikacji */
.akt-inner--07 {
  max-width: 960px;
}

/* Override nagłówka h2 dla Aktu 7 */
.akt-07 h2 {
  font-size: clamp(22px, 3.4vw, 37px);
}

/* Modyfikator okna aplikacji dla Aktu 7 */
.win-aizyl-app--akt7 {
  margin-top: 16px;
}

/* ============================================================
   APP SIDEBAR — ikona settings podświetlona na zielono (Akt 7)
   ============================================================ */
.app-sidebar__icon--settings {
  background: var(--primary);
  color: #fff;
}

.app-sidebar__icon--settings .ti {
  color: #fff;
}

/* ============================================================
   APP CONTENT SECTION TITLE — nagłówek sekcji "Ustawienia"
   ============================================================ */
.app-content__section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

/* ============================================================
   APP CARDS — wariant dla ustawień (mniejszy gap)
   ============================================================ */
.app-cards--settings {
  gap: 8px;
}

/* Akt 7 — większy gap między kartami dla wyrównania wysokości z Aktem 5 */
.akt-07 .app-content {
  gap: 18px;
}

/* ============================================================
   PASSWORD GATE — overlay na całe .win-aizyl-app
   ============================================================ */
.password-gate {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.40);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  border-radius: inherit;
}

/* ============================================================
   PASSWORD GATE CARD — karta z formularzem hasła
   ============================================================ */
.password-gate-card {
  background: var(--card, #F5F4F2);
  border-radius: 8px;
  padding: 20px 24px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.22),
    0 2px 8px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  max-width: 300px;
  width: 100%;
}

.password-gate-card__icon {
  font-size: 24px;
  color: var(--foreground);
  line-height: 1;
  flex-shrink: 0;
}

.password-gate-card__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--foreground);
  text-align: center;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.password-gate-card__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-foreground);
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

/* ============================================================
   PASSWORD GATE INPUT — pole z maskowanymi znakami
   ============================================================ */
.password-gate-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  padding: 7px 12px;
  display: flex;
  align-items: center;
  min-height: 34px;
  box-sizing: border-box;
}

.password-gate-input__dots {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--foreground);
  letter-spacing: 0.18em;
  line-height: 1;
}

/* ============================================================
   PASSWORD GATE ACTIONS — przyciski Anuluj / Potwierdź
   ============================================================ */
.password-gate-card__actions {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
}

.password-gate-btn {
  flex: 1;
  padding: 7px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  cursor: default;
  text-align: center;
  white-space: nowrap;
}

.password-gate-btn--cancel {
  background: transparent;
  color: var(--muted-foreground);
}

.password-gate-btn--confirm {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================================
   CURSOR ICON — wariant dla Aktu 7 (pozycja startowa)
   ============================================================ */
.cursor-icon--akt7 {
  position: absolute;
  pointer-events: none;
  z-index: 41;
  top: 20px;
  left: 80px;
  opacity: 0;
}

/* ============================================================
   COMPARISON SUMMARY — AKT 07
   ============================================================ */
.comparison-summary--akt7 {
  margin-top: 20px;
  width: 100%;
  max-width: 900px;
  opacity: 0;
  visibility: hidden;
}

/* ============================================================
   AKT-07 — RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .akt-inner--07 {
    max-width: 100%;
  }

  .win-aizyl-app--akt7 {
    max-width: 100%;
  }

  .comparison-summary--akt7 {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .password-gate-card {
    min-width: 200px;
    padding: 16px 18px;
  }

  .password-gate-card__title {
    font-size: 12px;
  }
}

/* ============================================================
   AKT-08 — FLOTA
   ============================================================ */

/* Pinned — wyłącz domyślne justify-content center */
.akt-08 {
  justify-content: flex-start;
  padding-top: 60px;
  background: #EDECEA;
}

/* Szerszy inner dla okna aplikacji */
.akt-inner--08 {
  max-width: 960px;
}

/* Override nagłówka h2 dla Aktu 8 */
.akt-08 h2 {
  font-size: clamp(22px, 3.4vw, 37px);
}

/* Modyfikator okna aplikacji dla Aktu 8 */
.win-aizyl-app--akt8 {
  margin-top: 16px;
  height: 500px;
}

/* ============================================================
   APP SIDEBAR — ikona Fleet podświetlona var(--primary) (Akt 8)
   ============================================================ */
.app-sidebar__icon--fleet {
  background: var(--primary);
  color: #fff;
}

.app-sidebar__icon--fleet .ti {
  color: #fff;
}

/* ============================================================
   FLEET SUBTITLE — podtytuł "6 stacji w sieci" (Space Mono, szary)
   ============================================================ */
.fleet-subtitle {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-foreground);
  letter-spacing: 0.08em;
  text-transform: none;
}

/* ============================================================
   FLEET GRAPH — kontener grafu floty
   ============================================================ */
.fleet-graph {
  position: relative;
  flex: 1;
  min-height: 0;
  height: 360px;
  overflow: hidden;
}

/* ============================================================
   FLEET LINKS SVG — warstwa linii połączeń
   ============================================================ */
.fleet-links-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

/* ============================================================
   FLEET LINK — linia połączenia master ↔ agent
   Subtelna pulsująca animacja CSS (niezależna od scrolla)
   ============================================================ */
.fleet-link {
  stroke: color-mix(in srgb, var(--primary) 45%, transparent);
  stroke-width: 1.5;
  stroke-linecap: round;
  animation: fleet-link-pulse 2.4s ease-in-out infinite;
}

/* Każda linia z lekkim opóźnieniem dla efektu fali */
#fl-link-0 { animation-delay: 0s;    }
#fl-link-1 { animation-delay: 0.48s; }
#fl-link-2 { animation-delay: 0.96s; }
#fl-link-3 { animation-delay: 1.44s; }
#fl-link-4 { animation-delay: 1.92s; }

@keyframes fleet-link-pulse {
  0%   { stroke-opacity: 0.35; stroke-width: 1.5; }
  50%  { stroke-opacity: 0.85; stroke-width: 2.2; }
  100% { stroke-opacity: 0.35; stroke-width: 1.5; }
}

/* ============================================================
   FLEET NODE — bazowy węzeł grafu
   ============================================================ */
.fleet-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 2;
  cursor: default;
  /* transform: translate(-50%, -50%) ustawiany przez JS */
}

/* ============================================================
   FLEET NODE ICON WRAP — kółko z ikoną
   ============================================================ */
.fleet-node__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--card, #F5F4F2);
  border: 2px solid var(--border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fleet-node__icon-wrap .ti {
  color: var(--muted-foreground);
  line-height: 1;
}

/* ============================================================
   FLEET NODE LABEL — etykieta pod węzłem
   ============================================================ */
.fleet-node__label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--muted-foreground);
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

/* ============================================================
   FLEET NODE MASTER — węzeł centralny
   ============================================================ */
.fleet-node--master .fleet-node__icon-wrap {
  width: 56px;
  height: 56px;
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--card));
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent),
    0 2px 12px rgba(0,0,0,0.12);
}

.fleet-node--master .fleet-node__icon-wrap .ti {
  font-size: 24px;
  color: var(--primary);
}

.fleet-node--master .fleet-node__label {
  font-size: 9px;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: 0.06em;
}

/* ============================================================
   FLEET NODE AGENT — węzeł agenta
   ============================================================ */
.fleet-node--agent .fleet-node__icon-wrap {
  width: 40px;
  height: 40px;
}

.fleet-node--agent .fleet-node__icon-wrap .ti {
  font-size: 17px;
}

/* Online — zielone obramowanie */
.fleet-node--online .fleet-node__icon-wrap {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 15%, transparent);
}

.fleet-node--online .fleet-node__icon-wrap .ti {
  color: #22c55e;
}

/* Offline — szare obramowanie */
.fleet-node--offline .fleet-node__icon-wrap {
  border-color: var(--border);
  box-shadow: none;
}

.fleet-node--offline .fleet-node__icon-wrap .ti {
  color: var(--muted-foreground);
  opacity: 0.5;
}

.fleet-node--offline .fleet-node__label {
  opacity: 0.5;
}

/* Stan aktywny (kliknięty) — podświetlenie */
.fleet-node--agent.is-active .fleet-node__icon-wrap {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}

/* ============================================================
   FLEET SIDE PANEL — stały panel przy prawej krawędzi .fleet-graph
   Zawsze w tej samej pozycji niezależnie od klikniętego węzła
   ============================================================ */
.fleet-side-panel {
  position: absolute;
  min-width: 190px;
  background: var(--card, #F5F4F2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow:
    0 4px 16px rgba(0,0,0,0.12),
    0 1px 4px rgba(0,0,0,0.08);
  padding: 10px 0 6px;
  opacity: 0;
  pointer-events: none;
  z-index: 35;
}

/* ============================================================
   FLEET SIDE PANEL HEADER — nagłówek z nazwą stacji
   ============================================================ */
.fleet-side-panel__header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.fleet-side-panel__icon {
  font-size: 14px;
  color: var(--primary);
  flex-shrink: 0;
}

.fleet-side-panel__name {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ============================================================
   FLEET PANEL ITEM — opcja w panelu (reużywa .ctx-item)
   ============================================================ */
.fleet-panel-item {
  font-size: 11px;
}

.fleet-panel-item .ti {
  font-size: 13px;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

/* Opcja "Generuj raport" — podświetlona jak .ctx-item--aizyl */
.fleet-panel-item--report {
  color: var(--primary);
  font-weight: 500;
}

.fleet-panel-item--report .ti {
  color: var(--primary);
}

.fleet-panel-item--report.is-highlighted {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border-radius: 4px;
}

/* ============================================================
   CURSOR ICON — wariant dla Aktu 8 (pozycja startowa)
   ============================================================ */
.cursor-icon--akt8 {
  position: absolute;
  pointer-events: none;
  z-index: 41;
  top: 6px;
  left: 10px;
  opacity: 0;
}

/* ============================================================
   TOAST — AKT 08 NODE (przy węźle agenta)
   ============================================================ */
.toast--akt8-node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--card, var(--background));
  border: 1px solid color-mix(in srgb, #22c55e 40%, transparent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--foreground);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 43;
  /* pozycja ustawiana przez JS */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.toast--akt8-node .ti {
  font-size: 13px;
  color: #22c55e;
  flex-shrink: 0;
}

/* ============================================================
   TOAST — AKT 08 RAPORT ZBIORCZY (przy przycisku nagłówka)
   ============================================================ */
.toast--akt8-report {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--card, var(--background));
  border: 1px solid color-mix(in srgb, #22c55e 40%, transparent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--foreground);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 43;
}

.toast--akt8-report .ti {
  font-size: 13px;
  color: #22c55e;
  flex-shrink: 0;
}

/* ============================================================
   PDF PREVIEW MINI — wariant dla Aktu 8 (raport zbiorczy)
   ============================================================ */
.pdf-preview-mini--akt8 {
  top: 52px;
  right: 14px;
}

/* ============================================================
   COMPARISON SUMMARY — AKT 08
   ============================================================ */
.comparison-summary--akt8 {
  margin-top: 20px;
  width: 100%;
  max-width: 900px;
  opacity: 0;
  visibility: hidden;
}

/* ============================================================
   AKT-08 — RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .akt-inner--08 {
    max-width: 100%;
  }

  .win-aizyl-app--akt8 {
    max-width: 100%;
  }

  .fleet-graph {
    height: 300px;
  }

  .fleet-node--master .fleet-node__icon-wrap {
    width: 46px;
    height: 46px;
  }

  .fleet-node--master .fleet-node__icon-wrap .ti {
    font-size: 20px;
  }

  .fleet-node--agent .fleet-node__icon-wrap {
    width: 34px;
    height: 34px;
  }

  .fleet-node--agent .fleet-node__icon-wrap .ti {
    font-size: 14px;
  }

  .comparison-summary--akt8 {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .fleet-graph {
    height: 260px;
  }

  .fleet-node__label {
    font-size: 7px;
  }

  .fleet-side-panel {
    min-width: 160px;
    right: 6px;
  }
}

/* ============================================================
   AKT-09 — GUARDIAN SCENE
   ============================================================ */

/* ---- Wrapper sceny ---- */
.akt-09 { background: var(--background); }

.akt-inner--09 {
  max-width: 900px;
}

.guardian-scene {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  width: 100%;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ============================================================
   GUARDIAN SIGIL WRAP — kontener 256×256px (canvas orb)
   ============================================================ */
.guardian-sigil-wrap {
  position: relative;
  width: 256px;
  height: 256px;
  flex-shrink: 0;
}

/* ============================================================
   GUARDIAN DOC WRAP — kontener dokumentu z efektem typing
   ============================================================ */
.guardian-doc-wrap {
  flex: 1;
  min-width: 260px;
  max-width: 420px;
  position: relative;
}

.guardian-doc-inner {
  background: var(--card, #F5F4F2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
}

.guardian-doc-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--muted-foreground);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.guardian-doc-text {
  font-size: 14px;
  color: var(--foreground);
  line-height: 1.7;
  min-height: 60px;
}

.guardian-typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--primary);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: guardian-cursor-blink 0.9s step-end infinite;
}

@keyframes guardian-cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ============================================================
   GUARDIAN LAYERS — trzy warstwy analizy nad dokumentem
   ============================================================ */
.guardian-layers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 10px;
  overflow: hidden;
  opacity: 0;
}

.guardian-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 8px 12px;
  opacity: 0;
}

.guardian-layer__label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}

.guardian-layer--structure {
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent);
  z-index: 1;
}
.guardian-layer--structure .guardian-layer__label {
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  color: var(--primary);
}

.guardian-layer--meaning {
  background: color-mix(in srgb, #7c3aed 15%, transparent);
  border: 1px solid color-mix(in srgb, #7c3aed 45%, transparent);
  z-index: 2;
}
.guardian-layer--meaning .guardian-layer__label {
  background: color-mix(in srgb, #7c3aed 15%, transparent);
  color: #7c3aed;
}

.guardian-layer--context {
  background: color-mix(in srgb, #0ea5e9 15%, transparent);
  border: 1px solid color-mix(in srgb, #0ea5e9 45%, transparent);
  z-index: 3;
}
.guardian-layer--context .guardian-layer__label {
  background: color-mix(in srgb, #0ea5e9 15%, transparent);
  color: #0ea5e9;
}

/* ============================================================
   GUARDIAN DETECTION PANEL — panel wyników detekcji pod sceną
   ============================================================ */
.guardian-detection-panel {
  width: 90%;
  max-width: 900px;
  margin-top: -20px;
  display: flex;
  gap: 10px;
}

/* ============================================================
   GUARDIAN HIGHLIGHT — podświetlenia fraz w tekście umowy
   ============================================================ */
.guardian-highlight--risk {
  background: color-mix(in srgb, var(--danger) 18%, transparent);
  border-radius: 3px;
  padding: 0 2px;
  transition: background 0.25s ease;
}

.guardian-highlight--safe {
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  border-radius: 3px;
  padding: 0 2px;
  transition: background 0.25s ease;
}

/* ============================================================
   GUARDIAN ORB PULSE — animacja pulsowania orba podczas analizy
   Glow na pseudo-elemencie ::before (okrąg ~70% wrappera),
   leży za canvasem (z-index: -1), nie daje kwadratowego zarysu.
   ============================================================ */
@keyframes guardian-orb-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 0%, transparent); }
  40%  { box-shadow: 0 0 28px 10px color-mix(in srgb, var(--primary) 65%, transparent), 0 0 56px 20px color-mix(in srgb, var(--primary) 30%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 0%, transparent); }
}

/* Pseudo-element okrągły — zawsze obecny, animacja tylko przy .is-analyzing */
.guardian-sigil-wrap::before {
  content: '';
  position: absolute;
  inset: 15%;          /* ~70% rozmiaru wrappera — pokrywa obszar kuli */
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}

.guardian-sigil-wrap.is-analyzing::before {
  animation: guardian-orb-pulse 1s ease-in-out infinite;
}

/* ============================================================
   COMPARISON SUMMARY — AKT 09
   ============================================================ */
.comparison-summary--akt9 {
  margin-top: 20px;
  width: 100%;
  max-width: 900px;
  opacity: 0;
  visibility: hidden;
}

/* ============================================================
   AKT-09 — RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .akt-inner--09 {
    max-width: 100%;
  }

  .guardian-scene {
    flex-direction: column;
    gap: 32px;
  }

  .guardian-doc-wrap {
    max-width: 90%;
    width: 100%;
  }

  .comparison-summary--akt9 {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .guardian-sigil-wrap {
    width: 200px;
    height: 200px;
  }
}

/* ============================================================
   CTA FINAL
   ============================================================ */
#cta-final {
  background: var(--primary);
  padding: 80px 0;
  text-align: center;
}

.cta-final-heading {
  color: white;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 500;
  max-width: 640px;
  margin: 0 auto 16px;
  line-height: 1.3;
}

.cta-final-sub {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 32px;
  font-size: 15px;
}

.cta-final-btn {
  display: inline-block;
  background: white;
  color: var(--primary);
  font-weight: 500;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 16px;
  text-decoration: none;
  margin-bottom: 16px;
  transition: opacity 0.15s ease;
}

.cta-final-btn:hover {
  opacity: 0.9;
  text-decoration: none;
}

.cta-final-link {
  display: inline-block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  text-decoration: none;
  margin-top: 8px;
  transition: color 0.15s ease;
}

.cta-final-link:hover {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
}

.waitlist-form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.waitlist-input {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: none;
  font-size: 15px;
  font-family: var(--font-base);
  width: 300px;
  outline: none;
  color: var(--foreground);
}

.waitlist-submit {
  padding: 12px 20px;
  background: var(--primary);
  color: white;
  border: 2px solid white;
  border-radius: var(--radius);
  font-family: var(--font-base);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.waitlist-submit:hover {
  opacity: 0.85;
}

@media (max-width: 768px) {
  /* --- CTA final: pełna szerokość, bez overflow --- */
  #cta-final {
    width: 100%;
    padding: 48px 20px;
    box-sizing: border-box;
    overflow: hidden;
  }

  /* --- CTA final: formularz kolumnowy --- */
  .waitlist-form {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .waitlist-input {
    width: 100%;
  }

  .waitlist-submit {
    width: 100%;
  }
}

@media (max-width: 860px) {
  /* Stan końcowy animacji pokazany statycznie na mobile */
  .comparison-summary { opacity: 1 !important; visibility: visible !important; }
  #akt8-report-toast, #akt6-report-toast, #akt5-report-toast { opacity: 0; }
}
