/* ============================================================
   Avehost Panel - arkusz stylow (bez frameworkow, CSP-safe)
   UI refresh: Inter + Space Grotesk (self-hosted, font-src 'self'),
   glassmorphism, gradient fiolet->blekit zgodny ze strona Avehost.
   ============================================================ */

/* ---------- Fonty (self-hosted; CSP font-src spada do default-src 'self') ---------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var-latin-ext.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-var-latin.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-var-latin-ext.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokeny ---------- */
:root {
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --bg: #07080f;
  --bg-soft: rgba(255, 255, 255, .04);
  --card: rgba(255, 255, 255, .05);
  --card-2: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #eef0fa;
  --muted: #a7adc4;
  --faint: #838aa6; /* AA: >=4.5:1 kontrastu z --bg (#07080f) */
  --primary: #7c6cff;
  --accent: #7c6cff;
  --accent-2: #38bdf8;
  --grad: linear-gradient(135deg, #7c6cff 0%, #38bdf8 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 108, 255, .16), rgba(56, 189, 248, .12));
  --success: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 12px;
  --radius-lg: 18px;
  /* Spójna skala cieni: md zamiast dawnego shadow-sm, xl do modali/drawerów */
  --shadow-sm: 0 4px 14px rgba(2, 4, 16, .32);
  --shadow: 0 16px 40px rgba(2, 4, 16, .5);
  --shadow-xl: 0 28px 64px rgba(2, 4, 16, .62);
  --glow: 0 0 32px rgba(124, 108, 255, .3);
  /* Wewnętrzny highlight górnej krawędzi kart (efekt "szkła") */
  --card-top: inset 0 1px 0 rgba(255, 255, 255, .06);
  /* Pierścień focus - jeden wzorzec w całym panelu */
  --ring: 0 0 0 3px rgba(124, 108, 255, .28);
  --tr: .22s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Baza ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scrollbar-color: rgba(124, 108, 255, .4) transparent; scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.6 var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* Aurora: dwa fiksowane glow w tle; nie lapia zdarzen, z-index -1 = pod trescia.
   Delikatny, bardzo wolny dryf ozywia tlo (wylaczany przez prefers-reduced-motion). */
body::before, body::after { content: ""; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; will-change: transform; }
body::before {
  top: -18vh; left: -12vw; width: 62vw; height: 62vh;
  background: radial-gradient(closest-side, rgba(124, 108, 255, .15), transparent 72%);
  animation: auroraDriftA 46s ease-in-out infinite;
}
body::after {
  bottom: -28vh; right: -14vw; width: 70vw; height: 70vh;
  background: radial-gradient(closest-side, rgba(56, 189, 248, .1), transparent 72%);
  animation: auroraDriftB 58s ease-in-out infinite;
}
@keyframes auroraDriftA { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(3vw, 2vh, 0) scale(1.06); } }
@keyframes auroraDriftB { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-3vw, -2vh, 0) scale(1.05); } }
.blank-body::before, .blank-body::after { display: none; }

a { color: var(--accent-2); text-decoration: none; transition: color var(--tr); }
a:hover { color: #7dd3fc; text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: .005em; line-height: 1.25; }
h1 { font-size: 1.6rem; font-weight: 700; margin: .2em 0 .55em; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; font-weight: 600; margin: .4em 0 .5em; }
h3 { font-size: 1.03rem; font-weight: 600; margin: .3em 0 .5em; }
/* Linki w naglowkach / sekcjach bez podkreslenia (tylko hover) */
h1 a, h2 a, h3 a { color: inherit; }
h1 a:hover, h2 a:hover, h3 a:hover { color: var(--accent-2); text-decoration: none; }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .92em; }
code { background: rgba(124, 108, 255, .12); border: 1px solid rgba(124, 108, 255, .22); padding: 1px 6px; border-radius: 6px; color: #c4b5fd; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.main { padding: 22px 16px 40px; min-height: calc(100vh - 190px); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- Scrollbar / selekcja / focus ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124, 108, 255, .35); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(124, 108, 255, .6); border: 2px solid transparent; background-clip: padding-box; }
::selection { background: rgba(124, 108, 255, .45); color: #fff; }
:focus-visible { outline: 2px solid rgba(124, 108, 255, .85); outline-offset: 2px; border-radius: 6px; }

/* ---------- Gorny pasek (podstrony publiczne / auth) ---------- */
.topbar {
  background: rgba(10, 12, 24, .82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); font-family: var(--font-display); letter-spacing: .02em; }
.brand img { border-radius: 7px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: 6px 11px; border-radius: 999px; font-weight: 500; transition: color var(--tr), background var(--tr); }
.nav a:hover { color: var(--text); background: var(--card-2); text-decoration: none; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.bell { position: relative; font-size: 18px; color: var(--muted); transition: color var(--tr); }
.bell:hover { color: var(--text); }
.badge-count { position: absolute; top: -6px; right: -10px; background: var(--danger); color: #fff; font-size: 11px; border-radius: 9px; padding: 0 5px; display: none; box-shadow: 0 0 10px rgba(248, 113, 113, .6); }
.badge-count.visible { display: inline-block; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; padding: 6px 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-weight: 500; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu[open] summary { border-color: rgba(124, 108, 255, .5); }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: rgba(15, 18, 34, .96);
  border: 1px solid var(--line-strong); border-radius: 14px;
  min-width: 210px; box-shadow: var(--shadow); z-index: 30;
  padding: 6px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 9px 12px; color: var(--text); background: none; border: 0; border-radius: 9px; cursor: pointer; font: inherit; }
.dropdown a:hover, .dropdown button:hover { background: var(--card-2); text-decoration: none; }

/* ---------- Stopka ---------- */
.footer { border-top: 1px solid var(--line); background: rgba(10, 12, 24, .7); padding: 18px 0; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-nav { display: flex; gap: 14px; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; padding: 9px 17px;
  font: inherit; font-weight: 600; cursor: pointer; line-height: 1.2;
  background: var(--card-2); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: transform var(--tr), box-shadow var(--tr), background var(--tr), border-color var(--tr), filter var(--tr);
}
.btn:hover { filter: brightness(1.12); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:focus-visible { outline-offset: 2px; }
.btn-primary { background: var(--grad); color: #fff; border: 0; box-shadow: 0 6px 18px rgba(124, 108, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-primary:hover { box-shadow: 0 9px 26px rgba(124, 108, 255, .5), inset 0 1px 0 rgba(255, 255, 255, .22); filter: brightness(1.06) saturate(1.05); }
.btn-warning { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #241703; box-shadow: 0 6px 16px rgba(251, 191, 36, .25), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-success { background: linear-gradient(135deg, #34d399, #10b981); color: #052013; box-shadow: 0 6px 16px rgba(52, 211, 153, .25), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-danger { background: linear-gradient(135deg, #f87171, #ef4444); color: #fff; box-shadow: 0 6px 16px rgba(248, 113, 113, .28), inset 0 1px 0 rgba(255, 255, 255, .16); }
.btn-ghost { background: transparent; border-color: var(--line-strong); box-shadow: none; }
.btn-ghost:hover { background: rgba(124, 108, 255, .12); border-color: rgba(124, 108, 255, .55); color: #c4b5fd; filter: none; }
.btn-sm { padding: 5px 12px; font-size: .88em; }
.btn-lg { padding: 12px 26px; font-size: 1.05em; }
.btn-block { display: flex; width: 100%; text-align: center; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.linklike { background: none; border: 0; color: var(--text); cursor: pointer; font: inherit; padding: 0; }
.linklike:hover { color: var(--accent-2); }

/* ---------- Formularze ---------- */
label { display: block; margin: 10px 0; font-weight: 500; font-size: .95em; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=file], select, textarea {
  width: 100%; margin-top: 4px; padding: 10px 13px; border-radius: var(--radius);
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text);
  font: inherit; transition: border-color var(--tr), box-shadow var(--tr), background var(--tr);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18);
}
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .055); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: rgba(124, 108, 255, .85);
  box-shadow: 0 0 0 3px rgba(124, 108, 255, .25), inset 0 1px 2px rgba(0, 0, 0, .18);
  background: rgba(124, 108, 255, .07);
}
::placeholder { color: var(--faint); }
input[type=file] { padding: 8px 10px; box-shadow: none; }
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23a78bfa' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
select option { background: #0d1020; color: var(--text); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: auto; box-shadow: none; }
input[disabled], select[disabled], textarea[disabled] { opacity: .55; cursor: not-allowed; }
.checkbox { display: flex; gap: 8px; align-items: center; }
.checkbox input { width: auto; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 10px 0; padding: 4px 14px 14px; }
fieldset legend { padding: 0 6px; font-weight: 600; color: var(--muted); font-size: .9em; }
.inline-form { display: inline-block; }
.filters { display: flex; gap: 10px; align-items: end; margin: 10px 0; flex-wrap: wrap; }
.filters label { margin: 0; }

/* ---------- Karty i siatki ---------- */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px; margin: 10px 0;
  box-shadow: var(--shadow-sm), var(--card-top);
  transition: border-color var(--tr), box-shadow var(--tr), transform var(--tr);
}
.card:hover { border-color: var(--line-strong); }
.card.empty { text-align: center; padding: 34px; color: var(--muted); border-style: dashed; background: rgba(255, 255, 255, .02); }
/* Naglowek nad lista kart / sekcja z akcja po prawej */
.section { margin: 22px 0; }
.section > h2 { display: flex; align-items: center; gap: 10px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-span-2 { grid-column: 1 / -1; }

/* ---------- Sekcje landingowe ---------- */
.hero { text-align: center; padding: 60px 10px 30px; }
.hero h1 { font-size: 2.3rem; margin: 0 0 10px; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.product-card { display: flex; flex-direction: column; transition: transform var(--tr), border-color var(--tr), box-shadow var(--tr); }
.product-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.product-card.featured { border-color: rgba(124, 108, 255, .65); box-shadow: 0 0 28px rgba(124, 108, 255, .18), var(--shadow-sm); }
.specs { list-style: none; padding: 0; margin: 8px 0; color: var(--muted); }
.specs li { padding: 3px 0; }
.price { margin: 10px 0 12px; }
.price-gross { font-size: 1.4rem; font-weight: 800; font-family: var(--font-display); }
.steps { color: var(--muted); line-height: 2; }
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.page-content { max-width: 800px; }

/* ---------- Tabele ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 10px 0; font-size: .93em; }
.table th, .table td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th {
  color: var(--muted); font-weight: 600; background: rgba(255, 255, 255, .035);
  text-transform: uppercase; letter-spacing: .07em; font-size: .72rem;
  border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.table thead th:first-child { border-top-left-radius: var(--radius); }
.table thead th:last-child { border-top-right-radius: var(--radius); }
.table tbody tr { transition: background var(--tr); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(124, 108, 255, .06); }
.table td .btn { white-space: nowrap; }
/* Mobile: szerokie tabele przewijane poziomo zamiast rozrywania layoutu */
@media (max-width: 720px) {
  .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table th, .table td { white-space: nowrap; }
}
.kv { width: 100%; border-collapse: collapse; }
.kv th { text-align: left; color: var(--muted); font-weight: 500; padding: 7px 10px 7px 0; width: 40%; }
.kv td { padding: 7px 0; }
.err-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--danger); }
.ua-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

/* ---------- Badge (statusy) ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: .74em; font-weight: 600;
  background: var(--card-2); color: var(--muted); border: 1px solid var(--line);
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; box-shadow: 0 0 7px currentColor; opacity: .9; }
.badge-active, .badge-online, .badge-completed, .badge-answered, .badge-running { background: rgba(52, 211, 153, .12); color: #6ee7b7; border-color: rgba(52, 211, 153, .35); }
.badge-installing, .badge-creating, .badge-provisioning, .badge-paid, .badge-pending, .badge-open { background: rgba(124, 108, 255, .13); color: #b3a5ff; border-color: rgba(124, 108, 255, .4); }
.badge-awaiting_payment, .badge-stopped, .badge-maintenance { background: rgba(251, 191, 36, .12); color: var(--warn); border-color: rgba(251, 191, 36, .38); }
.badge-overdue, .badge-suspended, .badge-failed, .badge-error, .badge-closed { background: rgba(248, 113, 113, .12); color: #fca5a5; border-color: rgba(248, 113, 113, .38); }
.badge-staff { background: rgba(52, 211, 153, .12); color: var(--success); border-color: rgba(52, 211, 153, .35); }
.badge-internal { background: rgba(251, 191, 36, .15); color: var(--warn); border-color: rgba(251, 191, 36, .38); }

/* ---------- Alerty ---------- */
.alert {
  display: flex; gap: 11px; align-items: flex-start;
  border-radius: var(--radius); padding: 13px 16px; margin: 12px 0; border: 1px solid;
  line-height: 1.5;
}
.alert > svg { flex: 0 0 auto; margin-top: 1px; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert-success { background: rgba(52, 211, 153, .09); border-color: rgba(52, 211, 153, .4); color: #c8f5e2; }
.alert-success::before { content: ""; flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpath d='m9 11 3 3L22 4'/%3E%3C/svg%3E"); }
.alert-error { background: rgba(248, 113, 113, .09); border-color: rgba(248, 113, 113, .4); color: #ffd9d9; }
.alert-error::before { content: ""; flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f87171' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E"); }
.alert-warn { background: rgba(251, 191, 36, .09); border-color: rgba(251, 191, 36, .4); color: #ffeec2; }
.alert-warn::before { content: ""; flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fbbf24' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E"); }
.alert-info { background: rgba(124, 108, 255, .1); border-color: rgba(124, 108, 255, .4); color: #ddd8ff; }
.alert-info::before { content: ""; flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E"); }

/* ---------- Statystyki / mierniki ---------- */
.stat-grid { margin: 16px 0; }
.stat { text-align: center; }
.stat-num { font-size: 1.5rem; font-weight: 800; font-family: var(--font-display); }
.stat-alert { border-color: rgba(248, 113, 113, .55); }
.stat-alert .stat-num { color: var(--danger); }
.meter { margin: 10px 0; }
.meter label { margin: 0 0 4px; display: block; }
.meter-bar { height: 8px; background: rgba(255, 255, 255, .06); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.meter-bar > div { height: 100%; width: 0; background: var(--grad); transition: width .4s; box-shadow: 0 0 10px rgba(124, 108, 255, .5); }

/* ---------- Auth / instalacja / bledy ---------- */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-card {
  width: 100%; max-width: 440px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid var(--line-strong); border-radius: 22px; padding: 30px;
  box-shadow: var(--shadow-xl), var(--card-top); position: relative; overflow: hidden;
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.auth-card::before {
  content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 108, 255, .9), rgba(56, 189, 248, .9), transparent);
  box-shadow: 0 0 14px rgba(124, 108, 255, .5);
}
.auth-brand { justify-content: center; margin-bottom: 14px; font-size: 1.15rem; }
.auth-foot { text-align: center; margin-top: 16px; color: var(--muted); font-size: .92em; }
.auth-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.auth-foot a:hover { color: var(--accent-2); }
.error-card { text-align: center; }
.error-card h1 { font-size: 3.2rem; margin: 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.install-card { max-width: 760px; }
.totp-secret { word-break: break-all; display: inline-block; max-width: 100%; }
.recovery-codes { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); padding: 12px; border-radius: var(--radius); user-select: all; }
.api-key-plain { user-select: all; font-size: 1.05em; }

/* ---------- Serwer: zakladki / konsola / pliki ---------- */
.server-top { align-items: start; }
.tabs { margin-top: 20px; }
.tab-nav { display: flex; gap: 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab-btn {
  position: relative; background: none; border: 0; color: var(--muted); padding: 11px 16px;
  cursor: pointer; font: inherit; font-weight: 500; border-bottom: 2px solid transparent;
  transition: color var(--tr), border-color var(--tr), background var(--tr);
}
.tab-btn:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.tab-btn.active { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.tab-btn.active::after {
  content: ""; position: absolute; left: 20%; right: 20%; bottom: -2px; height: 2px;
  background: var(--grad); box-shadow: 0 0 10px rgba(124, 108, 255, .6);
}
.tab-panel { display: none; padding: 16px 0; }
.tab-panel.active { display: block; }
.console {
  background: #05070d; border: 1px solid var(--line); border-radius: var(--radius);
  height: 320px; overflow-y: auto; padding: 12px 14px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px;
  white-space: pre-wrap; word-break: break-all; color: #86efac;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .04);
  scrollbar-color: rgba(52, 211, 153, .4) transparent;
}
.console::-webkit-scrollbar-thumb { background: rgba(52, 211, 153, .4); border: 2px solid transparent; background-clip: padding-box; border-radius: 8px; }
.console-form { display: flex; gap: 8px; margin-top: 10px; }
.console-form input { flex: 1; margin-top: 0; font-family: ui-monospace, Consolas, monospace; }
.filebar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.filebar input[type=text] { width: 320px; margin-top: 0; }
.file-editor textarea { font-family: ui-monospace, Consolas, monospace; }
#files-table td[data-file] { cursor: pointer; color: var(--accent-2); }

/* ---------- Tickety ---------- */
.ticket-thread { display: flex; flex-direction: column; gap: 12px; }
.ticket-msg { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ticket-msg.client { background: rgba(255, 255, 255, .04); }
.ticket-msg.staff { background: rgba(52, 211, 153, .06); border-color: rgba(52, 211, 153, .3); }
.ticket-msg.internal { background: rgba(251, 191, 36, .06); border-color: rgba(251, 191, 36, .35); }
.ticket-msg-head { padding: 8px 14px; background: rgba(255, 255, 255, .03); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .92em; }
.ticket-msg-body { padding: 12px 14px; white-space: pre-wrap; }
.ticket-attachments { padding: 0 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 900px) { .grid-2-1 { grid-template-columns: 1fr; } }

/* ---------- Admin: uprawnienia / paginacja / faktury ---------- */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 14px; margin: 10px 0; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.pagination .btn { min-width: 36px; }
.code-block { background: #05070d; border: 1px solid var(--line); padding: 12px; border-radius: var(--radius); overflow-x: auto; }
.invoice { background: #fff; color: #1c2733; border-radius: var(--radius); padding: 30px; max-width: 800px; margin: 0 auto; }
.invoice-head { display: flex; justify-content: space-between; align-items: start; }
.invoice-parties { display: flex; gap: 40px; margin: 18px 0; flex-wrap: wrap; }
.invoice h1 { color: #1c2733; }
.invoice .table th, .invoice .table td { border-bottom: 1px solid #e2e8f0; }
.invoice .table thead th { background: #f1f5f9; color: #334155; text-transform: none; letter-spacing: 0; font-size: .8rem; }
.invoice .table tbody tr:hover td { background: #f8fafc; }
.invoice-totals { margin-top: 10px; margin-left: auto; width: 280px; }
.blank-body { background: #eef2f6; padding: 20px; }
.unread td { background: rgba(124, 108, 255, .07); }

@media (max-width: 720px) {
  .topbar-inner { height: auto; padding: 8px 0; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; }
  .hero h1 { font-size: 1.7rem; }
}

/* ============================================================
   Avehost UI - gorny pill-navbar (strony publiczne)
   ============================================================ */
.topnav-wrap { padding: 14px 16px 4px; position: sticky; top: 0; z-index: 40; background: linear-gradient(rgba(7, 8, 15, .9), rgba(7, 8, 15, .5) 70%, transparent); }
.topnav {
  max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 14px;
  background: rgba(13, 16, 32, .82); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 9px 7px 16px; box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.topnav .brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.05rem; color: var(--text); letter-spacing: .3px; }
.topnav .brand img { border-radius: 8px; }
.pillnav { display: flex; gap: 2px; flex-wrap: wrap; margin-left: 6px; }
.pillnav-link { color: var(--muted); padding: 8px 14px; border-radius: 999px; font-weight: 500; transition: color var(--tr), background var(--tr); }
.pillnav-link:hover { color: var(--text); background: rgba(124, 108, 255, .13); text-decoration: none; }
.pillnav-link.active {
  color: #fff; font-weight: 600;
  background: linear-gradient(90deg, rgba(124, 108, 255, .22), rgba(56, 189, 248, .16));
  box-shadow: inset 0 0 0 1px rgba(124, 108, 255, .3);
}
.topnav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang-select { position: relative; }
.lang-select summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); font-weight: 600; font-size: .9em; }
.lang-select summary::-webkit-details-marker { display: none; }
.lang-select .caret { color: var(--muted); font-size: .8em; }
.lang-item { display: flex; align-items: center; gap: 8px; padding: 9px 14px; color: var(--text); border-radius: 9px; }
.lang-item.active { background: rgba(124, 108, 255, .16); }
.lang-item.soon { color: var(--faint); cursor: not-allowed; }
.lang-item.soon em { font-size: .8em; font-style: normal; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); transition: border-color var(--tr), color var(--tr), background var(--tr); }
.icon-btn:hover { border-color: rgba(124, 108, 255, .6); color: #c4b5fd; background: rgba(124, 108, 255, .1); text-decoration: none; }
.btn-gradient {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px;
  background: var(--grad); color: #fff; font-weight: 700; border: 0; cursor: pointer; font-size: .95em;
  box-shadow: 0 6px 18px rgba(124, 108, 255, .4); white-space: nowrap;
  transition: transform var(--tr), box-shadow var(--tr), filter var(--tr);
}
.btn-gradient:hover { filter: brightness(1.08); text-decoration: none; color: #fff; transform: translateY(-1px); box-shadow: 0 9px 26px rgba(124, 108, 255, .55); }
.btn-gradient:active { transform: translateY(0) scale(.98); }
.btn-gradient.btn-block { justify-content: center; }

@media (max-width: 980px) {
  .topnav { flex-wrap: wrap; border-radius: 22px; }
  .pillnav { order: 3; width: 100%; padding: 4px 6px 8px; }
  .topnav-actions { margin-left: auto; }
}

/* ============================================================
   Panel klienta - lewy sidebar (glass)
   ============================================================ */
.client-body .shell { display: flex; min-height: 100vh; }
.csidebar {
  width: 264px; flex: 0 0 264px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, rgba(13, 16, 32, .92), rgba(8, 10, 20, .92));
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 12px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.cbrand {
  display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.12rem;
  color: var(--text); padding: 4px 10px 14px; font-family: var(--font-display); letter-spacing: .02em;
}
.cbrand img { border-radius: 8px; box-shadow: 0 0 16px rgba(124, 108, 255, .35); }
.cside { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.citem {
  position: relative;
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 11px;
  color: var(--muted); font-weight: 500; border: 0; background: none; cursor: pointer;
  font: inherit; text-align: left; width: 100%;
  transition: background var(--tr), color var(--tr), box-shadow var(--tr), transform var(--tr);
}
.citem svg { flex: 0 0 auto; opacity: .85; transition: opacity var(--tr), color var(--tr), transform var(--tr); }
.citem:hover { color: var(--text); background: rgba(124, 108, 255, .1); text-decoration: none; }
.citem:hover svg { opacity: 1; color: #c4b5fd; transform: translateX(1px); }
/* Aktywny element: delikatne tlo + lewy pasek akcentu zamiast calego gradientu (lzej, czytelniej gdzie jestem) */
.citem.active {
  color: var(--text); font-weight: 600;
  background: linear-gradient(90deg, rgba(124, 108, 255, .18), rgba(124, 108, 255, .06));
  box-shadow: inset 0 0 0 1px rgba(124, 108, 255, .18);
}
.citem.active::before {
  content: ""; position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%; border-radius: 3px; background: var(--grad);
  box-shadow: 0 0 10px rgba(124, 108, 255, .7);
}
.citem.active svg { opacity: 1; color: #c4b5fd; }
.citem.active .cbadge { background: rgba(124, 108, 255, .3); border-color: transparent; color: #e9e6ff; }
.citem-label { flex: 1; }
.citem:focus-visible { outline-offset: -2px; }
.cbadge {
  min-width: 24px; text-align: center; background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line); color: var(--muted); font-size: .78em; font-weight: 700;
  border-radius: 999px; padding: 2px 8px;
}
.server-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.server-card-head strong { flex: 1; font-size: 1.02rem; }
.server-card-head a { color: var(--text); }
.server-card-head a:hover { color: #c4b5fd; text-decoration: none; }
.citem.cback { color: var(--muted); }
.citem.cback:hover { color: var(--text); }
.clogout { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.citem.logout { color: #fca5a5; }
.citem.logout:hover { color: #fff; background: rgba(248, 113, 113, .85); box-shadow: 0 6px 18px rgba(248, 113, 113, .3); }
.citem.logout:hover svg { color: #fff; }
.cadmin-link {
  display: flex; align-items: center; gap: 8px; margin: 10px 6px 0; padding: 10px 12px;
  border-radius: 12px; border: 1px dashed var(--line-strong); color: var(--muted);
  font-size: .9em; transition: color var(--tr), border-color var(--tr), background var(--tr);
}
.cadmin-link:hover { color: #c4b5fd; border-color: rgba(124, 108, 255, .6); background: rgba(124, 108, 255, .08); text-decoration: none; }
.ccontent { flex: 1; min-width: 0; }
.cmobile-bar {
  display: none; align-items: center; gap: 12px; padding: 11px 16px;
  background: rgba(10, 12, 24, .82); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.cmain { padding: 24px 28px 44px; max-width: 1280px; }
.burger {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; width: 38px; height: 38px; cursor: pointer;
  transition: border-color var(--tr), background var(--tr), transform var(--tr);
}
.burger:hover { border-color: rgba(124, 108, 255, .6); background: rgba(124, 108, 255, .1); }
.burger:active { transform: scale(.94); }

@media (max-width: 900px) {
  .csidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; transform: translateX(-100%);
    transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .client-body .shell.sidebar-open .csidebar { transform: translateX(0); }
  .client-body .shell.sidebar-open::after {
    content: ""; position: fixed; inset: 0; z-index: 50;
    background: rgba(5, 7, 15, .6); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  }
  .cmobile-bar { display: flex; }
  .cmain { padding: 18px 14px 40px; }
}

/* ---------- Admin sidebar ---------- */
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav .citem { padding: 10px 13px; font-size: .95em; }

/* ---------- Ogloszenia ---------- */
.ann-list { display: flex; flex-direction: column; gap: 10px; }
.ann { border-left: 3px solid var(--accent); }
.ann-unread { border-left-color: var(--accent-2); background: rgba(56, 189, 248, .05); }
.ann-warning { border-left-color: var(--warn); }
.ann-maintenance { border-left-color: var(--warn); }
.ann-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ann-head h3 { margin: 0; flex: 1; }
.ann-type-info { background: rgba(124, 108, 255, .16); color: #c4b5fd; }
.ann-type-warning { background: rgba(251, 191, 36, .15); color: var(--warn); }
.ann-type-maintenance { background: rgba(251, 191, 36, .15); color: var(--warn); }
.ann-body { margin-bottom: 8px; }

/* ---------- Przypomnienia ---------- */
.rem { border-left: 3px solid var(--success); }
.rem-due { border-left-color: var(--danger); }
.rem-done { opacity: .55; }
.rem-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rem-head strong { flex: 1; }
.rem-body { margin: 6px 0; }
.rem-meta { font-size: .9em; margin-bottom: 4px; }

/* ---------- Notatki ---------- */
.note { border-left: 3px solid var(--accent); }
.note-pinned { border-left-color: var(--accent-2); }
.note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.note-edit { font-family: ui-monospace, Consolas, monospace; font-size: .92em; }

/* ---------- Zespol ---------- */
.invite-row { display: flex; gap: 10px; }
.invite-row input { margin-top: 0; flex: 1; }
@media (max-width: 640px) { .invite-row { flex-direction: column; } }

/* ============================================================
   Konfigurator zamowienia (orders/select + new)
   ============================================================ */
.ocat {
  margin-bottom: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: border-color var(--tr), box-shadow var(--tr);
}
.ocat[open] { border-color: rgba(124, 108, 255, .35); box-shadow: 0 0 24px rgba(124, 108, 255, .08); }
.ocat-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; cursor: pointer; list-style: none; border-radius: var(--radius-lg); transition: background var(--tr); }
.ocat-head::-webkit-details-marker { display: none; }
.ocat-head:hover { background: rgba(255, 255, 255, .03); }
.ocat-flag { font-size: 1.25em; filter: drop-shadow(0 0 8px rgba(124, 108, 255, .4)); }
.ocat-title { display: flex; flex-direction: column; flex: 1; }
.ocat-title strong { font-size: 1.02em; }
.ocat-chev { transition: transform .18s ease; opacity: .6; }
details[open] .ocat-chev { transform: rotate(180deg); }
.ocat-body { border-top: 1px solid var(--line); padding: 4px 10px 10px; }
.opkg { display: flex; align-items: center; gap: 16px; padding: 12px 8px; border-top: 1px dashed var(--line); flex-wrap: wrap; border-radius: 10px; transition: background var(--tr); }
.opkg:hover { background: rgba(124, 108, 255, .04); }
.opkg:first-child { border-top: 0; }
.opkg-info { flex: 1; min-width: 220px; }
.opkg-info h3 { margin: 0 0 2px; font-size: 1em; }
.opkg-info p { margin: 0 0 6px; }
.opkg-specs { display: flex; gap: 14px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; font-size: .88em; color: var(--muted); }
.opkg-buy { display: flex; align-items: center; gap: 14px; }
.opkg-price { margin: 0; }
.opkg-price b { font-size: 1.05em; font-family: var(--font-display); }
.ocat-soon { opacity: .75; }
.ocat-soon .ocat-head { cursor: default; }
.badge-soon { background: var(--card-2); color: var(--muted); }

.ocfg { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .ocfg { grid-template-columns: 1fr; } .ocfg-side { position: static; } }
.ocfg-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ocfg-main h2, .ocfg-side h2 { font-size: 1.02em; margin: 0 0 10px; }
.ocfg-side { position: sticky; top: 16px; }
.operiod { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.operiod-opt {
  display: flex; flex-direction: column; gap: 2px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  transition: border-color var(--tr), box-shadow var(--tr), background var(--tr);
}
.operiod-opt:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .03); }
.operiod-opt:has(input:checked) {
  border-color: rgba(124, 108, 255, .8); background: rgba(124, 108, 255, .1);
  box-shadow: 0 0 0 1px rgba(124, 108, 255, .8), 0 6px 18px rgba(124, 108, 255, .18);
}
.operiod-name { font-weight: 600; }
.ostep { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.ostep:first-of-type { border-top: 0; }
.ostep-info { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.ostep-ctrl { display: flex; align-items: center; gap: 6px; }
.ostep-ctrl input { width: 64px; text-align: center; padding: 6px 4px; }
.ostep-btn {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--card-2); color: var(--text); cursor: pointer; font-size: 1.1em; line-height: 1;
  transition: border-color var(--tr), background var(--tr), transform var(--tr);
}
.ostep-btn:hover { border-color: rgba(124, 108, 255, .6); background: rgba(124, 108, 255, .14); text-decoration: none; }
.ostep-btn:active { transform: scale(.92); }
.ostep-price { min-width: 92px; text-align: right; font-weight: 600; }
.cfg-lines { list-style: none; margin: 0 0 10px; padding: 0; }
.cfg-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed rgba(255, 255, 255, .06); }
.cfg-lines li:last-child { border-bottom: 0; }
.ochk-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.ochk { display: flex; gap: 8px; align-items: flex-start; font-size: .88em; line-height: 1.4; }
.ochk input { margin-top: 2px; }

/* ============================================================
   SKLEP - grupy w sidebarze (sekcje + rozwijane gry)
   ============================================================ */
.csec { margin: 16px 12px 5px; font-size: .66rem; letter-spacing: .15em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.cgroup > .cgroup-head { position: relative; }
.cgroup .ocat-chev { margin-left: auto; transition: transform .18s ease, opacity var(--tr); opacity: .7; }
.cgroup[open] > .cgroup-head .ocat-chev { transform: rotate(180deg); opacity: 1; }
.cgroup[open] > .cgroup-head { color: var(--text); }
.csub { display: flex; flex-direction: column; gap: 1px; padding: 3px 0 6px 15px; margin: 2px 8px 0 12px; border-left: 1px solid var(--line); }
.csub-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px;
  color: var(--muted); font-size: .93em; text-decoration: none;
  transition: color var(--tr), background var(--tr), transform var(--tr);
}
.csub-item:hover { color: var(--text); background: rgba(124, 108, 255, .1); text-decoration: none; transform: translateX(1px); }
.csub-label { flex: 1; }
.soon-red {
  background: rgba(248, 113, 113, .16); border: 1px solid rgba(248, 113, 113, .4); color: #fca5a5;
  font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 8px; border-radius: 999px; line-height: 1.5;
}
.csub-item .soon-red { flex: 0 0 auto; }

/* ---------- Sklep: kategorie "wkrotce" ---------- */
.ocat-soon-cat > .ocat-head { opacity: .92; }
.ocat-soon-cat .opkg { opacity: .9; }
.btn[disabled], .btn:disabled { opacity: .55; cursor: not-allowed; filter: saturate(.6); transform: none; }

/* ============================================================
   Dashboard klienta
   ============================================================ */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-head h1 { margin: 0 0 4px; font-size: 1.7rem; }
.dash-head .muted { margin: 0; }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-chips { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 20px; }
.chip {
  display: flex; flex-direction: column; gap: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 18px; min-width: 130px;
  box-shadow: var(--card-top);
  transition: transform var(--tr), border-color var(--tr), box-shadow var(--tr);
}
.chip:hover { transform: translateY(-2px); border-color: rgba(124, 108, 255, .4); box-shadow: 0 12px 28px rgba(2, 4, 16, .45), var(--card-top); }
.chip-val { font-size: 1.35rem; font-weight: 800; font-family: var(--font-display); line-height: 1.15; color: var(--text); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .chip-val { background: linear-gradient(120deg, #fff 10%, #c7d2fe 55%, #7dd3fc 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
}
.chip-lab { font-size: .8rem; color: var(--muted); }
.srv-game { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; }
.chip-game {
  display: inline-block; background: rgba(124, 108, 255, .15); color: #c4b5fd;
  border: 1px solid rgba(124, 108, 255, .38); font-size: .78em; font-weight: 700;
  padding: 2px 10px; border-radius: 999px;
}

/* ============================================================
   SKLEP - hub wyboru gry + podstrony gier
   ============================================================ */
.ogames { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 16px 0 22px; }
.ogame {
  display: flex; flex-direction: column; gap: 10px; padding: 18px 16px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--text); text-decoration: none;
  transition: border-color var(--tr), box-shadow var(--tr), transform var(--tr);
}
.ogame:hover { text-decoration: none; border-color: rgba(124, 108, 255, .5); box-shadow: 0 12px 32px rgba(2, 4, 16, .5), 0 0 24px rgba(124, 108, 255, .12); transform: translateY(-2px); }
.ogame::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, #7c6cff, #38bdf8); opacity: 0; transition: opacity var(--tr); }
.ogame:hover::after { opacity: 1; }
.ogame-art { font-size: 2.2rem; line-height: 1.15; filter: drop-shadow(0 4px 14px rgba(124, 108, 255, .35)); }
.ogame-title { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.ogame-title strong { font-size: 1.06em; font-family: var(--font-display); }
.ogame-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.ogame-go { color: var(--muted); transition: color var(--tr), transform var(--tr); }
.ogame:hover .ogame-go { color: #c7d2fe; transform: translateX(3px); }
.ogame-soon { opacity: .82; }
.ogame-soon:hover { transform: none; border-color: var(--line); box-shadow: none; }
.ogame-soon::after { display: none; }

/* Podstrona gry: karty pakietow */
.opkgs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 16px 0 22px; }
.opkg-card {
  display: flex; flex-direction: column; gap: 8px; padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: border-color var(--tr), box-shadow var(--tr), transform var(--tr);
}
.opkg-card:hover { border-color: rgba(124, 108, 255, .45); box-shadow: 0 12px 32px rgba(2, 4, 16, .5); transform: translateY(-2px); }
.opkg-card h3 { margin: 0; font-size: 1.04em; font-family: var(--font-display); }
.opkg-card p.muted { margin: 0; font-size: .88em; }
.opkg-card .opkg-price { margin: 4px 0 6px; }
.opkg-card .opkg-price b { font-size: 1.1em; font-family: var(--font-display); }
.opkg-card .btn { margin-top: auto; align-self: flex-start; }
.opkg-soon { opacity: .8; }
.opkg-soon:hover { transform: none; border-color: var(--line); box-shadow: none; }

/* ---------- Dostepnosc ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ============================================================
   UX COMPONENTS - stany puste, modal potwierdzenia, busy, skip-link
   ============================================================ */

/* ---------- Stan pusty (listy bez wyników) ---------- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 44px 20px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  margin: 14px 0 20px;
}
.empty-state svg { opacity: .6; }
.empty-state strong { color: var(--text); font-family: var(--font-display); font-size: 1.05em; }
.empty-state p { margin: 0; max-width: 420px; font-size: .92em; }
.empty-state .btn { margin-top: 6px; }

/* ---------- Modal potwierdzenia (zastępuje window.confirm; CSP-safe) ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(4, 6, 14, .66); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
  animation: modal-fade .16s ease;
}
.modal {
  width: 100%; max-width: 430px; padding: 22px;
  background: linear-gradient(180deg, rgba(30,33,54,.96), rgba(17,19,33,.98));
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); animation: modal-pop .18s ease;
}
.modal h3 { margin: 0 0 8px; font-size: 1.08em; }
.modal p { margin: 0 0 18px; color: var(--muted); font-size: .93em; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Stan "trwa wysyłka" na przyciskach ---------- */
.btn[aria-busy="true"] { pointer-events: none; opacity: .75; position: relative; }
.btn[aria-busy="true"]::after {
  content: ""; width: 14px; height: 14px; margin-left: 8px;
  border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ---------- Skip-link (dostępność: klawiatura) ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 10000;
  padding: 10px 16px; background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--accent); border-radius: 10px; text-decoration: none;
}
.skip-link:focus { left: 8px; }

/* === AVEHOST UI REFRESH - koniec === */

/* ---------- Pasek promocji + widoczność kodów rabatowych ---------- */
.promo-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 0 0 18px; padding: 11px 16px;
  border: 1px solid rgba(124, 108, 255, .38); border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(124, 108, 255, .18), rgba(56, 189, 248, .13));
  box-shadow: var(--card-top);
  color: var(--text); font-size: .94em; font-weight: 500; text-align: center;
}
.promo-banner::before { content: "🎉"; flex: 0 0 auto; }
.discount-visibility { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 230px; }
.discount-visibility .checkbox { margin: 0; font-size: .84em; color: var(--muted); }
.discount-visibility input[type="text"] { margin-top: 0; padding: 7px 10px; font-size: .84em; }
.discount-visibility .btn { margin-top: 2px; }
