:root {
  --accent: #c6ff00;
  --accent-2: #d4ff3f;
  --accent-ink: #0a0a0a;          /* text/icons sitting on the lime accent */
  --bg-0: #050505;
  --bg-1: #0c0c0c;
  --surface: #171717;             /* raised dark tiles (avatars, chips) */
  --text: #f5f5f5;
  --muted: #b7b7b7;
  --field: #161616;
  --border: rgba(255, 255, 255, 0.09);
  --danger: #ff4d4f;
}

* { box-sizing: border-box; }
.accent { color: var(--accent); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 12% -10%, rgba(198, 255, 0, 0.28), transparent 60%),
    radial-gradient(900px 600px at 100% 110%, rgba(198, 255, 0, 0.25), transparent 55%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1));
  background-attachment: fixed;
}

/* ---------- shared form controls ---------- */
label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--muted); }

input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: #8f8f8f; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(198, 255, 0, 0.25); }

select {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  appearance: none;
  cursor: pointer;
  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 fill='%238f8f8f' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(198, 255, 0, 0.25); }
select option { background: var(--field); color: var(--text); }

.field-hint { font-size: 12px; color: var(--muted); min-height: 15px; line-height: 1.4; }
.field-hint.ok { color: #34d399; }
.field-hint.warn { color: #fbbf24; }
/* label { display:flex } would otherwise beat the UA [hidden] rule and show it anyway */
[hidden] { display: none !important; }
.linklike {
  background: none; border: none; box-shadow: none; padding: 0; width: auto;
  font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline;
}
.linklike:hover { filter: brightness(1.1); }

/* Brak zaznaczania na logo, nazwie, przyciskach i ikonach */
button,
a.lp-cta, a.lp-btn, .lp-brand, .lp-foot-brand, .side-brand,
.hiw-num, .sp-shot,
img, svg {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

button {
  padding: 12px 16px;
  font-size: 15px; font-weight: 700;
  color: var(--accent-ink); cursor: pointer;
  border: none; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px -10px rgba(198, 255, 0, 0.45);
  transition: transform 0.08s ease, box-shadow 0.15s, filter 0.15s;
}
button:hover { filter: brightness(1.07); box-shadow: 0 8px 18px -10px rgba(198, 255, 0, 0.55); }
button:active { transform: translateY(1px); }
button.ghost {
  background: transparent; border: 1px solid var(--border);
  box-shadow: none; color: var(--muted);
}
button.ghost:hover { color: var(--text); border-color: var(--accent); filter: none; }
button.sm { padding: 8px 14px; font-size: 13px; }

/* ---------- auth (login) ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }

.card {
  width: 100%; max-width: 400px;
  background: rgba(23, 23, 23, 0.72);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 38px 34px 32px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.card form { display: flex; flex-direction: column; gap: 16px; }
.card button[type="submit"] { margin-top: 6px; }

.brand { text-align: center; margin-bottom: 26px; }
.logo {
  width: 62px; height: 62px; margin: 0 auto 16px;
  display: block; object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(198, 255, 0, 0.28));
}
.brand h1 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -0.5px; }
.brand .sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.alert {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--danger);
  padding: 10px 13px; border-radius: 10px; font-size: 13px;
  margin-bottom: 16px; text-align: center;
}
.foot { margin-top: 22px; text-align: center; color: #8f8f8f; font-size: 12px; }

/* ---------- app / panel ---------- */
.logo-sm {
  width: 40px; height: 40px; object-fit: contain; display: block;
  filter: drop-shadow(0 6px 16px rgba(198, 255, 0, 0.25));
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}

.tile {
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  background: rgba(23, 23, 23, 0.72);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 18px; text-align: center;
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.6);
  transition: transform 0.1s, box-shadow 0.15s, border-color 0.15s;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 28px 60px -24px rgba(0, 0, 0, 0.7); border-color: rgba(255, 255, 255, 0.16); }
.tile.flagged { border-color: rgba(220, 70, 60, 0.9); box-shadow: 0 0 0 1px rgba(220, 70, 60, 0.45), 0 20px 50px -24px rgba(0, 0, 0, 0.6); }
.tile.flagged:hover { border-color: rgba(220, 70, 60, 1); box-shadow: 0 0 0 1px rgba(220, 70, 60, 0.6), 0 28px 60px -24px rgba(0, 0, 0, 0.7); }

.avatar {
  width: 64px; height: 64px; border-radius: 19px;
  display: grid; place-items: center; font-size: 27px; font-weight: 800; color: var(--accent);
  background: var(--surface);
  border: 1px solid rgba(198, 255, 0, 0.22);
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.7);
}
.tile-name { font-size: 15px; font-weight: 600; color: var(--text); word-break: break-word; }
.tile-sub { font-size: 12px; color: var(--muted); word-break: break-word; }

.avatar-img {
  width: 64px; height: 64px; border-radius: 19px; object-fit: cover;
  background: #fff;
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.6);
}

/* verification badge */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 1.4;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { color: #34d399; background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.3); }
.badge.wait { color: #fbbf24; background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.3); }

.tile.add {
  cursor: pointer; font: inherit;
  background: transparent;
  border: 1.5px dashed rgba(255, 255, 255, 0.3);
  color: #dcdcdc; box-shadow: none;
}
.tile.add:hover { border-color: var(--accent); color: var(--text); filter: none; transform: translateY(-3px); }
.plus {
  width: 64px; height: 64px; border-radius: 19px;
  display: grid; place-items: center; font-size: 36px; font-weight: 300;
  border: 1.5px solid rgba(255, 255, 255, 0.3); color: inherit;
}

.empty {
  margin-top: 18px; color: var(--muted); padding: 48px;
  text-align: center; border: 1px dashed var(--border); border-radius: 18px;
}
.empty code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; color: var(--text);
  background: var(--field); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 6px; white-space: nowrap;
}

a.tile { text-decoration: none; color: var(--text); }

/* ---------- store detail: sidebar + products ---------- */
.layout { display: flex; min-height: 100vh; align-items: stretch; }

.sidebar {
  width: 272px; flex-shrink: 0;
  background: rgba(10, 10, 10, 0.55);
  border-right: 1px solid var(--border);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 4px;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 14px; text-decoration: none; color: var(--text); }
.side-brand .t { font-size: 16px; font-weight: 800; line-height: 1.1; letter-spacing: -0.3px; }
.side-brand .s { font-size: 11px; color: var(--muted); margin-top: 2px; }
.side-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 10px 6px; }

.side-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.side-store { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 11px; text-decoration: none; color: var(--text); }
.side-store:hover { background: rgba(255, 255, 255, 0.05); }
.side-store.active { background: rgba(198, 255, 0, 0.16); box-shadow: inset 0 0 0 1px rgba(198, 255, 0, 0.3); }
.side-store.flagged { box-shadow: inset 0 0 0 1.5px rgba(220, 70, 60, 0.85); }
.side-av { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; font-weight: 800; color: var(--accent); flex-shrink: 0; background: var(--surface); border: 1px solid rgba(198, 255, 0, 0.2); }
.side-av-img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; background: #fff; flex-shrink: 0; }
.side-name { flex: 1; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot.wait { background: #fbbf24; }

.side-add { margin-top: 8px; padding: 10px; border-radius: 11px; cursor: pointer; font: inherit; font-size: 13px; color: #dcdcdc; background: transparent; border: 1px dashed rgba(255, 255, 255, 0.3); box-shadow: none; }
.side-add:hover { border-color: var(--accent); color: var(--text); filter: none; }
.side-foot { margin-top: auto; padding: 14px 8px 4px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.side-foot .email { font-size: 12px; color: var(--muted); word-break: break-all; }
.side-foot form { margin: 0; }

.main { flex: 1; padding: 30px 34px 60px; min-width: 0; }
.main-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.main-title { display: flex; align-items: center; gap: 14px; }
.main-av { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; font-weight: 800; color: var(--accent); background: var(--surface); border: 1px solid rgba(198, 255, 0, 0.22); }
.main-av-img { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: #fff; }
.main-title h1 { margin: 0; font-size: 22px; }
.main-sub { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.main-sub .count { font-size: 13px; color: var(--muted); }
.main-sub .main-url { font-size: 13px; color: var(--muted); text-decoration: none; }
.main-sub .main-url:hover { color: inherit; text-decoration: underline; }

.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 24px; }
.prod { position: relative; background: rgba(23, 23, 23, 0.6); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: transform .1s, border-color .15s; }
.vec-dot { position: absolute; top: 8px; right: 8px; z-index: 2; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(10, 10, 10, 0.75); }
.vec-dot.on { background: #34d399; }
.vec-dot.off { background: #fbbf24; }

.search-bar { position: relative; margin-top: 24px; display: flex; align-items: center; gap: 12px; }
.search-bar .search-ico { position: absolute; left: 15px; font-size: 14px; opacity: .85; pointer-events: none; }
#store-search {
  width: 100%; max-width: 560px; padding: 13px 16px 13px 42px;
  font-size: 15px; color: var(--text); background: var(--field);
  border: 1px solid var(--border); border-radius: 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
#store-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(198, 255, 0, 0.25); }
.search-hint { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---- conversion stats banner + speedometer ---- */
.stats-banner {
  display: flex; align-items: center; gap: 30px; flex-wrap: wrap;
  margin-top: 22px; padding: 20px 26px;
  background: rgba(23, 23, 23, 0.6); border: 1px solid var(--border); border-radius: 18px;
}
.gauge-box { width: 196px; flex-shrink: 0; text-align: center; }
.gauge { width: 196px; height: auto; display: block; }
.gauge path { fill: none; stroke-width: 15; stroke-linecap: round; }
.gauge-bg { stroke: rgba(255, 255, 255, 0.09); }
.gauge-fg { stroke: url(#sf-gauge); transition: stroke-dasharray 0.9s cubic-bezier(0.34, 1.2, 0.4, 1); }
.gauge-text { fill: #fff; font-weight: 800; font-size: 44px; letter-spacing: -2px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.gauge-sign { fill: var(--accent); font-weight: 700; font-size: 21px; letter-spacing: 0; }
.gauge-label { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.4; }

.stat-cards { display: flex; gap: 14px; flex: 1; flex-wrap: wrap; }
.stat-card { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 168px; padding: 15px 18px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: 14px; }
.stat-ico { font-size: 22px; }
.stat-val { font-size: 21px; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-cur, .stat-sub { font-size: 14px; color: var(--muted); font-weight: 600; }
.stat-lbl { font-size: 12px; color: var(--muted); margin-top: 3px; }

.stat-card.top3 { flex-direction: column; align-items: stretch; gap: 8px; flex: 1.6; min-width: 230px; }
.top3-title { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.top3-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.top3-rank { width: 19px; height: 19px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: rgba(198, 255, 0, 0.16); color: var(--accent); flex-shrink: 0; }
.top3-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.top3-count { font-weight: 700; color: #34d399; flex-shrink: 0; }
.top3-empty { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .stats-banner { gap: 18px; } .gauge-box, .gauge { width: 172px; } }
.top-terms { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.top-terms-label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 2px; }
.term-chip {
  font: inherit; font-size: 13px; cursor: pointer; padding: 6px 12px; border-radius: 999px;
  color: var(--text); background: rgba(198, 255, 0, 0.12);
  border: 1px solid rgba(198, 255, 0, 0.28); box-shadow: none;
  display: inline-flex; align-items: center; gap: 7px;
}
.term-chip:hover { border-color: var(--accent); background: rgba(198, 255, 0, 0.22); filter: none; transform: none; }
.term-count { font-size: 11px; font-weight: 700; color: var(--muted); }
.prod:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.16); }
.prod-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #121212; display: block; }
.prod-ph { display: grid; place-items: center; }
.prod-ph img { width: 40px; height: 40px; object-fit: contain; opacity: 0.28; }
.prod-body { padding: 12px 13px; }
.prod-name { font-size: 13px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 35px; }
.prod-meta { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.prod-price { color: #34d399; font-weight: 700; font-size: 14px; }
.prod-sku { color: var(--muted); font-size: 12px; }
.prod-oos { color: #f87171; font-size: 11px; border: 1px solid rgba(248,113,113,.3); border-radius: 6px; padding: 1px 6px; }

@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .sidebar { width: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .side-foot { margin-top: 12px; }
}

/* ---------- modal ---------- */
dialog.modal { border: none; padding: 0; background: transparent; color: var(--text); }
dialog.modal::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.modal-card {
  width: 440px; max-width: 92vw;
  background: rgba(23, 23, 23, 0.97);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 28px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
}
.modal-card h2 { margin: 0; font-size: 18px; }
.modal-card .muted { margin: -6px 0 0; color: var(--muted); font-size: 13px; }
.modal-card form { margin: 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.modal-actions form { margin: 0; }

.key-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; cursor: text;
}
.key-row { display: flex; gap: 8px; }
.key-row .key-input { flex: 1; cursor: pointer; }
.sf-eye-btn {
  width: 46px; padding: 0; border-radius: 11px; cursor: pointer; font-size: 15px;
  background: var(--field); border: 1px solid var(--border); color: var(--muted); box-shadow: none;
}
.sf-eye-btn:hover { border-color: var(--accent); color: var(--text); filter: none; box-shadow: none; }
.copied-msg { display: inline-block; margin-top: 8px; font-size: 12px; color: #34d399; min-height: 14px; }
.keys-group { display: flex; flex-direction: column; gap: 12px; }
.key-field { display: flex; flex-direction: column; gap: 6px; }
.key-field label { margin: 0; }
.key-gen { white-space: nowrap; padding: 0 14px; }
.keys-actions { margin-top: 10px; }

/* inline button-styled link (e.g. download) */
a.btn-inline {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 16px; font-size: 14px; font-weight: 700;
  text-decoration: none; color: var(--accent-ink); border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 26px -10px rgba(198, 255, 0, 0.8);
  transition: filter 0.15s, box-shadow 0.15s;
}
a.btn-inline:hover { filter: brightness(1.07); }
a.btn-inline.ghost {
  background: transparent; border: 1px solid var(--border);
  box-shadow: none; color: var(--muted);
}
a.btn-inline.ghost:hover { color: var(--text); border-color: var(--accent); filter: none; }

.main-actions { display: flex; align-items: center; gap: 10px; }
.main-actions form { margin: 0; }
button.danger {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f87171);
  box-shadow: 0 12px 26px -12px rgba(239, 68, 68, 0.6);
}
button.danger:hover { filter: brightness(1.07); }
button.danger-outline { color: #f87171; border-color: rgba(248, 113, 113, 0.4); }
button.danger-outline:hover { color: #fff; border-color: #f87171; filter: none; }

/* PL/EN language switcher (public header + store sidebar). */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; margin: 0; }
.lang-switch .lang-btn {
  background: none; border: none; box-shadow: none; padding: 2px 4px;
  color: var(--muted); font: inherit; font-size: 13px; cursor: pointer;
}
.lang-switch .lang-btn:hover { color: var(--text); filter: none; }
.lang-switch .lang-btn.on { color: var(--accent); font-weight: 700; cursor: default; }
.lang-switch .lang-sep { color: var(--muted); font-size: 13px; }
