/* ===============================================================
   Warstwa funkcji strony.

   Osobny arkusz, celowo nietknięty przez Tailwinda z głównego
   bundla. Dzięki temu przebudowanie tamtego projektu niczego tu
   nie wycina, a klasy nie kolidują — wszystkie mają przedrostek gx-.

   Paleta i szkło dobrane tak, żeby okna wyglądały jak część
   istniejącego systemu, a nie doklejony widget.
   =============================================================== */

:root {
  --gx-glass: rgba(12, 16, 32, .72);
  --gx-line: rgba(255, 255, 255, .10);
  --gx-accent: #39ffc2;
  --gx-text: rgba(255, 255, 255, .92);
  --gx-muted: rgba(255, 255, 255, .55);
  --gx-z: 60;
}

.gx-root { position: fixed; inset: 0; z-index: var(--gx-z); pointer-events: none; }
.gx-root * { box-sizing: border-box; }

/* ---------------------------------------------------------- okno */

.gx-win {
  position: absolute;
  pointer-events: auto;
  background: var(--gx-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--gx-line);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  color: var(--gx-text);
  font-family: Inter, system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: gx-in .22s cubic-bezier(.2, .8, .3, 1);
}

@keyframes gx-in {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.gx-win.gx-closing { animation: gx-out .16s ease forwards; }
@keyframes gx-out { to { opacity: 0; transform: translateY(10px) scale(.98); } }

.gx-bar {
  height: 38px;
  flex: 0 0 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid var(--gx-line);
  background: rgba(255, 255, 255, .04);
  cursor: grab;
  user-select: none;
}
.gx-bar:active { cursor: grabbing; }

.gx-dot { width: 11px; height: 11px; border-radius: 50%; border: none; padding: 0; cursor: pointer; }
.gx-dot-close { background: #ff5f57; }
.gx-dot-min   { background: rgba(255, 255, 255, .28); cursor: default; }
.gx-dot-max   { background: rgba(255, 255, 255, .28); cursor: default; }

.gx-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--gx-muted); pointer-events: none;
}

.gx-body { flex: 1 1 auto; overflow: auto; padding: 18px 20px 22px; }
.gx-body::-webkit-scrollbar { width: 8px; }
.gx-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 8px; }

/* ---------------------------------------------------- typografia */

.gx-h { font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.gx-sub { font-size: 13px; color: var(--gx-muted); margin: 0 0 18px; line-height: 1.55; }
.gx-p { font-size: 14px; line-height: 1.6; margin: 0 0 12px; color: rgba(255,255,255,.8); }
.gx-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--gx-muted); }

.gx-a { color: var(--gx-accent); text-decoration: none; border-bottom: 1px solid transparent; }
.gx-a:hover { border-bottom-color: var(--gx-accent); }

.gx-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--gx-line);
  color: var(--gx-text);
  font: inherit; font-size: 13px; cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.gx-btn:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255,255,255,.22); }
.gx-btn-primary { background: var(--gx-accent); color: #04120d; border-color: transparent; font-weight: 600; }
.gx-btn-primary:hover { background: #5cffd2; }
.gx-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ------------------------------------------------------- produkt */

.gx-shots { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin: 0 0 16px; }
.gx-shots img {
  height: 240px; border-radius: 10px; border: 1px solid var(--gx-line);
  background: rgba(0,0,0,.3); flex: 0 0 auto;
}
.gx-meta { display: flex; flex-wrap: wrap; gap: 18px; margin: 14px 0 0; }
.gx-meta div { min-width: 96px; }
.gx-meta b { display: block; font-size: 14px; font-weight: 600; margin-top: 3px; }

.gx-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.gx-tag {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: rgba(57, 255, 194, .10); color: var(--gx-accent);
  border: 1px solid rgba(57, 255, 194, .22);
}

/* -------------------------------------------------------- status */

.gx-status-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 14px;
}
.gx-status-row:last-child { border-bottom: 0; }
.gx-led { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; background: rgba(255,255,255,.25); }
.gx-led-up   { background: #39ffc2; box-shadow: 0 0 10px rgba(57,255,194,.7); }
.gx-led-down { background: #ff5f57; box-shadow: 0 0 10px rgba(255,95,87,.6); }
.gx-led-wait { animation: gx-pulse 1.1s ease-in-out infinite; }
@keyframes gx-pulse { 50% { opacity: .3; } }
.gx-ms { margin-left: auto; font-size: 12px; color: var(--gx-muted); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------ terminal */

.gx-term {
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.65;
  background: rgba(0, 0, 0, .45);
  height: 100%;
  padding: 16px 18px;
  overflow: auto;
  cursor: text;
}
.gx-term-line { white-space: pre-wrap; word-break: break-word; }
.gx-term-in { color: var(--gx-accent); }
.gx-term-err { color: #ff8a80; }
.gx-term-dim { color: var(--gx-muted); }
.gx-term-form { display: flex; gap: 8px; align-items: baseline; }
.gx-term-form span { color: var(--gx-accent); }
.gx-term-form input {
  flex: 1; background: none; border: 0; outline: 0;
  color: var(--gx-text); font: inherit; caret-color: var(--gx-accent);
}

/* --------------------------------------------------- widget sieci */

.gx-chain {
  position: absolute; right: 14px; top: 44px;
  pointer-events: auto;
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 13px; border-radius: 12px;
  background: var(--gx-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--gx-line);
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px; color: var(--gx-text);
  text-decoration: none;
  min-width: 148px;
}
.gx-chain b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gx-chain:hover { border-color: rgba(57,255,194,.4); }

/* ------------------------------------------------------ responsyw */

@media (max-width: 720px) {
  .gx-win { left: 3vw !important; right: 3vw; width: auto !important; top: 8vh !important;
            max-height: 74vh; }
  .gx-shots img { height: 180px; }
  .gx-chain { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .gx-win, .gx-win.gx-closing { animation: none; }
  .gx-led-wait { animation: none; }
}
