/* BeeCode — panel klienta */
:root {
  color-scheme: dark;
  --bg: #0c0b09;
  --bg-2: #110f0c;
  --surface: #151310;
  --surface-2: #1b1914;
  --surface-3: #25221b;
  --line: rgba(255, 238, 200, .065);
  --line-2: rgba(255, 238, 200, .11);
  --text: #f7f2e8;
  --text-2: #b8af9d;
  --muted: #7c7465;
  --honey: #ffcd67;
  --honey-2: #ffdd94;
  --honey-deep: #f2aa2e;
  --honey-soft: rgba(255, 205, 103, .1);
  --honey-line: rgba(255, 205, 103, .32);
  --ok: #8fdca5;
  --ok-soft: rgba(143, 220, 165, .1);
  --warn: #ffb35c;
  --warn-soft: rgba(255, 179, 92, .11);
  --danger: #ff9580;
  --danger-soft: rgba(255, 149, 128, .1);
  --radius: 14px;
  --radius-lg: 20px;
  --sidebar: 268px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

*, ::before, ::after { box-sizing: border-box }
[hidden] { display: none !important }
html { -webkit-text-size-adjust: 100% }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none }
button, input { font: inherit; color: inherit }
button { cursor: pointer }
h1, h2, h3, p { margin: 0 }
code, .mono { font-family: var(--mono) }
svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
::selection { background: var(--honey); color: #1b1407 }
:focus-visible { outline: 2px solid var(--honey); outline-offset: 3px }
::-webkit-scrollbar { width: 10px; height: 10px }
::-webkit-scrollbar-track { background: var(--bg) }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; border: 2px solid var(--bg) }

/* ---------- Tło: miodowa poświata + plaster ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 88% -12%, rgba(255, 196, 82, .11), transparent 62%),
    radial-gradient(700px 420px at 8% 112%, rgba(255, 196, 82, .05), transparent 60%);
}
.backdrop::after { content: ""; position: absolute; inset: 0; opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 56 16.2v32.3L28 64.7 0 48.5V16.2zM28 64.7v32.3M0 97V80.8M56 97V80.8' fill='none' stroke='%23ffe4a8' stroke-opacity='.05'/%3E%3C/svg%3E");
  background-size: 56px 97px;
  -webkit-mask-image: radial-gradient(ellipse at 75% 0%, #000 0%, transparent 68%);
  mask-image: radial-gradient(ellipse at 75% 0%, #000 0%, transparent 68%);
}

/* ---------- Marka ---------- */
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px }
.brand-logo { width: 40px; height: 40px; padding: 5px; border-radius: 12px; object-fit: contain; flex: none;
  background: radial-gradient(circle at 50% 30%, rgba(255, 205, 103, .3), #17130b 72%);
  box-shadow: 0 0 0 1px var(--honey-line), 0 8px 24px rgba(255, 190, 70, .16);
}
.brand-name { font-weight: 750; font-size: 17px; letter-spacing: -.03em; line-height: 1.15 }
.brand-name b { color: var(--honey); font-weight: inherit }
.brand-sub, .label-mono { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted) }

/* ---------- Układ ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px; padding: 22px 18px;
  border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(21, 19, 16, .92), rgba(12, 11, 9, .92));
  backdrop-filter: blur(10px);
}
.nav { display: flex; flex-direction: column; gap: 3px }
.nav .label-mono { padding: 0 12px 8px }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 550; transition: background .15s, color .15s }
.nav a:hover { background: var(--surface-2); color: var(--text) }
.nav a[aria-current=page] { background: var(--honey-soft); color: var(--text) }
.nav a[aria-current=page] svg { color: var(--honey) }
.nav a[aria-current=page]::before { content: ""; position: absolute; left: -18px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--honey) }
.nav .count { margin-left: auto; min-width: 26px; text-align: center; font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  background: var(--surface-3); padding: 1px 8px; border-radius: 999px }
.nav a[aria-current=page] .count { background: rgba(255, 205, 103, .16); color: var(--honey) }
.nav-ext { margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line-2) }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px }
.help-card { position: relative; overflow: hidden; padding: 15px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 205, 103, .07), transparent 55%), var(--surface); font-size: 13px; color: var(--text-2) }
.help-card strong { display: block; color: var(--text); margin-bottom: 4px; font-size: 14px }
.help-card a { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--honey); font-weight: 650 }
.help-card a svg { width: 14px; height: 14px; transition: transform .15s }
.help-card a:hover svg { transform: translateX(3px) }
.user-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface) }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; background: var(--surface-3); object-fit: cover;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--honey-line) }
.user-meta { min-width: 0; flex: 1 }
.user-meta b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.user-meta small { display: block; font-size: 11px; color: var(--muted); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px;
  border: 1px solid var(--line); background: none; color: var(--text-2); transition: .15s }
.icon-btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--line-2) }
.icon-btn svg { width: 16px; height: 16px }
form.inline { display: contents }

.main { min-width: 0; padding: 38px 44px 72px }
.content { max-width: 1120px; margin: 0 auto }

/* ---------- Nagłówek strony ---------- */
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 24px; margin-bottom: 30px; flex-wrap: wrap }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-family: var(--mono); font-size: 11.5px;
  color: var(--honey); letter-spacing: .14em; text-transform: uppercase }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--honey) }
h1 { font-size: 34px; line-height: 1.1; letter-spacing: -.035em; font-weight: 750 }
h1 em { font-style: normal; color: var(--honey) }
.lead { margin-top: 8px; color: var(--text-2) }

/* ---------- Statystyki ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 38px }
.stat { position: relative; overflow: hidden; padding: 18px 18px 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); animation: rise .45s both }
.stat:nth-child(2) { animation-delay: .04s } .stat:nth-child(3) { animation-delay: .08s } .stat:nth-child(4) { animation-delay: .12s }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2) }
.stat-label svg { width: 16px; height: 16px; color: var(--muted) }
.stat-value { margin-top: 12px; font-size: 30px; font-weight: 750; letter-spacing: -.035em; line-height: 1.15; font-variant-numeric: tabular-nums }
.stat-value small { margin-left: 4px; font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0 }
.stat-note { margin-top: 4px; font-size: 12px; color: var(--muted) }
.stat.accent { border-color: var(--honey-line); background: linear-gradient(160deg, rgba(255, 205, 103, .15), rgba(255, 205, 103, .02) 62%), var(--surface) }
.stat.accent .stat-label svg { color: var(--honey) }
.stat.accent::after { content: ""; position: absolute; right: -28px; top: -28px; width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 205, 103, .18), transparent 70%) }
.stat.warn .stat-value { color: var(--warn) }
.stat .meter { margin-top: 12px }

/* ---------- Sekcje ---------- */
.section { margin-bottom: 40px }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap }
.section-head h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 650; letter-spacing: -.015em }
.section-head h2 .count { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--muted);
  padding: 1px 8px; border-radius: 999px; background: var(--surface-3) }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--honey); font-size: 13px; font-weight: 650 }
.link svg { width: 14px; height: 14px; transition: transform .15s }
.link:hover svg { transform: translateX(3px) }

/* ---------- Licencje ---------- */
.license-list { display: flex; flex-direction: column; gap: 10px }
.license { display: grid; align-items: center; gap: 24px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); grid-template-columns: minmax(200px, 1.25fr) minmax(220px, 1.3fr) minmax(170px, 1fr) minmax(120px, .7fr);
  transition: border-color .2s, background .2s; animation: rise .45s both }
.license:hover { border-color: var(--line-2); background: var(--surface-2) }
.license.dim { opacity: .7 }
.plugin { display: flex; align-items: center; gap: 14px; min-width: 0 }
.monogram { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; font-family: var(--mono);
  font-weight: 700; font-size: 14px; color: var(--honey); background: var(--honey-soft); border: 1px solid rgba(255, 205, 103, .24);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); border: 0 }
.license.dim .monogram { color: var(--muted); background: var(--surface-3) }
.plugin-name { font-weight: 650; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.plugin-sub { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; color: var(--muted) }
.plugin-sub .tag { padding: 0 7px; border-radius: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-2); background: var(--surface-3); border: 1px solid var(--line) }
.cell-label { margin-bottom: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted) }
.key { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 4px 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2) }
.key code { flex: 1; min-width: 0; font-size: 12.5px; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text) }
.key .icon-btn { width: 30px; height: 30px; border: 0 }
.key .icon-btn.done { color: var(--ok) }
.expiry-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-variant-numeric: tabular-nums }
.expiry-row b { font-size: 14px; font-weight: 600 }
.expiry-row small { font-size: 12px; color: var(--muted); white-space: nowrap }
.meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden }
.meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--honey-deep), var(--honey)); transform-origin: left; animation: grow .8s cubic-bezier(.2, .7, .2, 1) both }
.meter.warn span { background: linear-gradient(90deg, #e07a1f, var(--warn)) }
.meter.off span { background: var(--muted) }
.meter.infinite span { background: repeating-linear-gradient(-45deg, var(--honey) 0 6px, var(--honey-deep) 6px 12px); opacity: .75 }
.status-cell { text-align: right }

.chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12.5px;
  font-weight: 650; white-space: nowrap; border: 1px solid transparent }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor }
.chip.active { color: var(--ok); background: var(--ok-soft); border-color: rgba(143, 220, 165, .22) }
.chip.active::before { animation: pulse 2s infinite }
.chip.expiring { color: var(--warn); background: var(--warn-soft); border-color: rgba(255, 179, 92, .24) }
.chip.expired, .chip.revoked { color: var(--danger); background: var(--danger-soft); border-color: rgba(255, 149, 128, .22) }

/* ---------- Dodawanie klucza ---------- */
.claim { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px 18px; margin-bottom: 18px;
  border-radius: var(--radius); border: 1px solid var(--honey-line);
  background: linear-gradient(100deg, rgba(255, 205, 103, .09), rgba(255, 205, 103, .015) 70%), var(--surface) }
.claim-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--honey-soft); color: var(--honey) }
.claim b { display: block; font-size: 14px }
.claim small { display: block; font-size: 12.5px; color: var(--text-2) }
.claim-form { display: flex; gap: 8px; grid-column: 1 / -1 }
.claim-msg { grid-column: 1 / -1; font-size: 13px; color: var(--text-2); min-height: 0 }
.claim-msg:empty { display: none }
.claim-msg[data-state=error] { color: var(--danger) }
.claim-msg[data-state=ok] { color: var(--ok) }
.field { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; height: 42px; padding: 0 14px; border-radius: 11px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); transition: border-color .15s, box-shadow .15s }
.field:focus-within { border-color: var(--honey-line); box-shadow: 0 0 0 3px rgba(255, 205, 103, .08) }
.field svg { width: 16px; height: 16px }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font-size: 14px }
.field input::placeholder { color: var(--muted) }
.field input.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .03em }
.search { min-width: 260px; flex: none }

/* ---------- Zasoby ---------- */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px }
.resource { display: flex; flex-direction: column; gap: 16px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); transition: border-color .2s, background .2s, transform .2s; animation: rise .45s both }
.resource:hover { border-color: var(--honey-line); background: var(--surface-2); transform: translateY(-2px) }
.resource-top { display: flex; align-items: flex-start; gap: 14px; min-width: 0 }
.file-badge { position: relative; width: 46px; height: 54px; flex: none; display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 8px; border-radius: 8px 14px 8px 8px; border: 1px solid var(--line-2); background: linear-gradient(160deg, var(--surface-3), var(--bg-2));
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--honey) }
.file-badge::after { content: ""; position: absolute; top: -1px; right: -1px; width: 14px; height: 14px; border-radius: 0 14px 0 6px; background: var(--line-2) }
.resource-name { font-weight: 650; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere }
.resource-file { margin-top: 4px; font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere }
.resource-meta { display: flex; gap: 22px; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: 12px; color: var(--muted) }
.resource-meta b { display: block; margin-top: 2px; font-size: 13px; font-weight: 550; color: var(--text-2); font-variant-numeric: tabular-nums }

/* ---------- Przyciski ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 650; font-size: 14px; white-space: nowrap; transition: .15s }
.btn svg { width: 16px; height: 16px }
.btn:hover { background: var(--surface-3); border-color: rgba(255, 238, 200, .18) }
.btn:disabled { opacity: .6; cursor: wait }
.btn.primary { border-color: #ffd98a; background: linear-gradient(120deg, var(--honey), #ffc24d); color: #1d1508;
  box-shadow: 0 4px 16px rgba(255, 190, 70, .14), inset 0 1px 0 rgba(255, 255, 255, .35) }
.btn.primary:hover { background: linear-gradient(120deg, var(--honey-2), var(--honey)) }
.btn.discord { border-color: #6d78f5; background: #5865f2; color: #fff; box-shadow: 0 6px 22px rgba(88, 101, 242, .25), inset 0 1px 0 rgba(255, 255, 255, .2) }
.btn.discord:hover { background: #6772f4 }
.btn.block { width: 100% }
.btn.lg { height: 50px; padding: 0 20px; font-size: 15px; border-radius: 12px }

/* ---------- Puste stany ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 54px 24px; border-radius: var(--radius-lg);
  border: 1px dashed var(--line-2); background: rgba(21, 19, 16, .55) }
.empty-icon { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 16px; color: var(--honey);
  background: var(--honey-soft); clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%) }
.empty-icon svg { width: 22px; height: 22px }
.empty h3 { margin-bottom: 6px; font-size: 17px; letter-spacing: -.015em }
.empty p { max-width: 400px; margin-bottom: 18px; font-size: 14px; color: var(--text-2) }
.empty .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center }
.no-results { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius) }

/* ---------- Szkielet ładowania ---------- */
.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border: 1px solid var(--line) }

/* ---------- Toast ---------- */
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 12px; max-width: 380px;
  padding: 12px 16px 12px 12px; border-radius: 12px; border: 1px solid var(--honey-line); background: #19150d;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5); transform: translateY(16px); opacity: 0; pointer-events: none; transition: .25s }
.toast.show { transform: none; opacity: 1 }
.toast.error { border-color: rgba(255, 149, 128, .35) }
.toast-icon { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--honey-soft); color: var(--honey) }
.toast.error .toast-icon { background: var(--danger-soft); color: var(--danger) }
.toast-icon svg { width: 16px; height: 16px }
.toast b { display: block; font-size: 14px }
.toast small { display: block; font-size: 12px; color: var(--text-2) }

/* ---------- Mobile ---------- */
.mobile-bar, .mobile-nav { display: none }

@keyframes rise { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
@keyframes grow { from { transform: scaleX(0) } }
@keyframes shimmer { to { background-position: -200% 0 } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(143, 220, 165, .18) } 50% { box-shadow: 0 0 0 5px rgba(143, 220, 165, .04) } }
@keyframes float { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .license { grid-template-columns: 1fr 1fr; gap: 16px 20px }
  .license .key-cell { grid-column: 1 / -1; grid-row: 2 }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr }
  .sidebar { display: none }
  .mobile-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(12, 11, 9, .86); backdrop-filter: blur(12px) }
  .mobile-bar .brand-logo { width: 34px; height: 34px }
  .mobile-bar .avatar { width: 32px; height: 32px }
  .mobile-nav { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
    padding: 6px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(21, 19, 16, .93); backdrop-filter: blur(12px) }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 11px; font-size: 11.5px; font-weight: 550; color: var(--text-2) }
  .mobile-nav a svg { width: 19px; height: 19px }
  .mobile-nav a[aria-current=page] { background: var(--honey-soft); color: var(--honey) }
  .main { padding: 24px 16px 112px }
  h1 { font-size: 28px }
  .search { min-width: 0; width: 100% }
  .toast { left: 16px; right: 16px; bottom: 96px; max-width: none }
}
@media (max-width: 560px) {
  .stats { gap: 10px }
  .stat { padding: 14px }
  .stat-value { font-size: 24px }
  .license { grid-template-columns: 1fr }
  .license .key-cell { grid-row: auto }
  .status-cell { text-align: left }
  .claim { grid-template-columns: auto 1fr }
  .claim-form { flex-direction: column }
}
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation: none !important; transition: none !important }
}

/* =========================================================
   Strona logowania
   ========================================================= */
.auth { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 22px }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 1080px; margin: 0 auto }
.auth-top .link { color: var(--text-2) }
.auth-top .link:hover { color: var(--honey) }
.auth-main { display: grid; place-items: center; padding: 40px 0 }
.auth-card { position: relative; width: 100%; max-width: 440px; padding: 34px 32px 28px; border-radius: 24px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255, 205, 103, .06), transparent 40%), rgba(21, 19, 16, .88); backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45); animation: rise .5s both }
.auth-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 205, 103, .45), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude }
.auth-logo { width: 76px; height: 76px; margin-bottom: 18px; object-fit: contain; filter: drop-shadow(0 12px 28px rgba(255, 190, 70, .3)); animation: float 4s ease-in-out infinite }
.auth-card h1 { font-size: 28px }
.auth-card .lead { margin-bottom: 24px; font-size: 14.5px }
.perks { list-style: none; display: grid; gap: 10px; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px dashed var(--line-2) }
.perks li { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--text-2) }
.perks .ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--surface-3); color: var(--honey) }
.perks .ico svg { width: 15px; height: 15px }
.auth-note { margin-top: 18px; font-size: 12px; color: var(--muted); text-align: center }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; margin-bottom: 18px; border-radius: 11px; font-size: 13px;
  border: 1px solid rgba(255, 149, 128, .3); background: var(--danger-soft); color: #ffc9bd }
.alert.ok { border-color: rgba(143, 220, 165, .28); background: var(--ok-soft); color: #c9f0d4 }
.alert svg { width: 16px; height: 16px; margin-top: 2px }
.auth-foot { text-align: center; font-size: 12px; color: var(--muted) }

/* =========================================================
   Licencja, reset i panel admina
   ========================================================= */
.muted { color: var(--muted) }
.small { font-size: 12.5px }
.warn-text { color: var(--warn) }
.ok-text { color: var(--ok) }
.topbar-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap }
.nav-group { display: flex; flex-direction: column; gap: 3px; margin-top: 14px }
.key.masked code { filter: blur(5px); user-select: none }
.key code { transition: filter .2s }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; gap: 6px }
.btn.sm svg { width: 14px; height: 14px }
.btn.ghost { background: transparent }
.btn.ghost:hover { background: var(--surface-3) }
.btn.danger { border-color: rgba(255, 149, 128, .5); background: #d9573f; color: #fff }
.btn.danger:hover { background: #e8664d }
.icon-btn.danger:hover { color: var(--danger); border-color: rgba(255, 149, 128, .3); background: var(--danger-soft) }
.status-cell { display: flex; flex-direction: column; align-items: flex-end; gap: 8px }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex-wrap: wrap }
.row-actions .icon-btn { width: 30px; height: 30px; border-color: transparent }
.row-actions .icon-btn:hover { border-color: var(--line-2) }
.hint-box { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; margin-bottom: 22px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--text-2) }
.hint-box svg { color: var(--honey); margin-top: 1px }
.hint-box b { color: var(--text) }

.license.admin { grid-template-columns: minmax(170px, 1.1fr) minmax(150px, 1fr) minmax(190px, 1.25fr) minmax(140px, .9fr) minmax(130px, auto) }
.owner { display: flex; align-items: center; gap: 10px; min-width: 0 }
.owner b { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.owner small { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.owner.muted { font-size: 13px; font-style: italic }
.avatar.sm { width: 28px; height: 28px; box-shadow: none }
.user-row { display: grid; align-items: center; gap: 20px; padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); grid-template-columns: minmax(200px, 1.3fr) minmax(190px, 1fr) minmax(130px, .8fr) minmax(120px, .8fr) auto;
  transition: border-color .2s, background .2s; animation: rise .45s both }
.user-row:hover { border-color: var(--line-2); background: var(--surface-2) }
.user-row .num { font-size: 15px }
.user-row .muted { font-size: 13px }
.id-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-2); font-family: var(--mono); font-size: 12px; color: var(--text-2); transition: .15s }
.id-chip svg { width: 13px; height: 13px; color: var(--muted) }
.id-chip:hover { border-color: var(--honey-line); color: var(--text) }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--honey); background: var(--honey-soft); border: 1px solid rgba(255, 205, 103, .25) }
.badge svg { width: 11px; height: 11px }
.version { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 6px; font-family: var(--mono); font-size: 11px; font-weight: 600;
  color: var(--honey); background: var(--honey-soft); vertical-align: 2px }
.audience { display: inline-flex; align-self: flex-start; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px;
  font-size: 12.5px; color: var(--text-2); background: var(--surface-3); border: 1px solid var(--line) }
.audience svg { width: 14px; height: 14px; color: var(--honey) }
.btn-pair { display: flex; gap: 8px }
.btn-pair .btn.primary { flex: 1 }
.resource .row-actions { margin-left: auto; flex-wrap: nowrap }

/* ---------- Okno dialogowe ---------- */
.modal { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; background: none; color: var(--text); overflow: visible }
.modal.wide { width: min(680px, calc(100% - 24px)) }
.modal::backdrop { background: rgba(6, 5, 3, .72); backdrop-filter: blur(4px) }
.modal[open] { animation: pop .22s cubic-bezier(.2, .8, .2, 1) }
.modal-card { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); border-radius: 20px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255, 205, 103, .05), transparent 30%), #16140f; box-shadow: 0 30px 80px rgba(0, 0, 0, .55) }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px }
.modal-head h2 { font-size: 18px; letter-spacing: -.02em }
.modal-body { display: flex; flex-direction: column; gap: 14px; padding: 12px 20px 4px; overflow-y: auto }
.modal-error { margin: 0 20px; font-size: 13px; color: var(--danger) }
.modal-error:empty { display: none }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px 18px }
.confirm-text { color: var(--text-2); font-size: 14px }
.confirm-text b { color: var(--text) }
.form-row { display: flex; flex-direction: column; gap: 6px; min-width: 0 }
.form-row > span { font-size: 13px; font-weight: 600; color: #e6dece }
.form-row small, [data-aud-help] { font-size: 12px; color: var(--muted) }
.form-row.grow { flex: 1 }
.modal input:not([type=radio]):not([type=checkbox]), .modal select {
  height: 42px; width: 100%; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  outline: 0; transition: border-color .15s, box-shadow .15s; color-scheme: dark }
.modal input[type=file] { padding: 8px 10px; height: auto }
.modal input[type=file]::file-selector-button { margin-right: 10px; padding: 5px 12px; border-radius: 7px; border: 1px solid var(--line-2);
  background: var(--surface-3); color: var(--text); font: inherit; font-size: 13px; cursor: pointer }
.modal input:focus, .modal select:focus { border-color: var(--honey-line); box-shadow: 0 0 0 3px rgba(255, 205, 103, .08) }
.modal input:disabled { opacity: .45 }
.inline-fields { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap }
.inline-fields > * { flex: 1 1 140px }
.inline-fields > .check { flex: 0 0 auto; height: 42px }
.quick { display: flex; gap: 6px; margin-top: 2px }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--bg-2); flex-wrap: wrap }
.seg label { flex: 1; min-width: 0 }
.seg input { position: absolute; opacity: 0; pointer-events: none }
.seg span { display: grid; place-items: center; height: 34px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--text-2); cursor: pointer; white-space: nowrap; transition: .15s }
.seg span:hover { color: var(--text) }
.seg input:checked + span { background: var(--honey-soft); color: var(--honey); box-shadow: inset 0 0 0 1px rgba(255, 205, 103, .3) }
.seg input:focus-visible + span { outline: 2px solid var(--honey); outline-offset: 1px }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-2); cursor: pointer }
.check input { width: 17px; height: 17px; accent-color: var(--honey); margin: 0 }
.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--honey-deep), var(--honey)); transition: width .2s }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98) } }

@media (max-width: 1340px) {
  .license.admin { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px 20px }
  .license.admin .key-cell { grid-column: auto; grid-row: auto }
  .license.admin .status-cell { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center;
    padding-top: 12px; border-top: 1px dashed var(--line-2) }
}
@media (max-width: 1240px) {
  .user-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr) }
  .user-row > :nth-child(4) { display: none }
  .user-row .row-actions { grid-column: 1 / -1; justify-content: flex-start }
}
@media (max-width: 1100px) {
  .license.admin { grid-template-columns: 1fr 1fr }
  .license.admin .key-cell { grid-column: 1 / -1 }
}
@media (max-width: 860px) {
  .mobile-nav.four { grid-template-columns: repeat(4, 1fr) }
  .topbar-side { width: 100% }
  .topbar-side .search { flex: 1 }
}
@media (max-width: 560px) {
  .status-cell { flex-direction: row; justify-content: space-between; align-items: center }
  .license.admin, .user-row { grid-template-columns: 1fr }
  .modal-foot .btn { flex: 1 }
}

/* =========================================================
   Dopracowanie detali
   ========================================================= */
/* Pełny klucz licencji po odkryciu – bez ucinania */
.key { min-height: 38px; height: auto; padding-block: 3px }
.key code { white-space: normal; overflow-wrap: anywhere; font-size: 12px; line-height: 1.35; letter-spacing: .02em; padding-block: 4px }
.key.masked code { white-space: nowrap; overflow: hidden; text-overflow: clip; overflow-wrap: normal }
.license { grid-template-columns: minmax(180px, 1fr) minmax(290px, 1.55fr) minmax(150px, .8fr) minmax(112px, auto) }
.license.admin { grid-template-columns: minmax(160px, 1fr) minmax(140px, .9fr) minmax(270px, 1.5fr) minmax(140px, .8fr) minmax(130px, auto) }

/* Czytelniejsze drobne napisy */
.cell-label, .brand-sub, .label-mono { font-size: 11px }
.plugin-sub .tag { font-size: 11px }
.file-badge { font-size: 10.5px }
.version { font-size: 11.5px }
.stat-note, .plugin-sub, .expiry-row small { font-size: 12.5px }

/* Własna strzałka w polach wyboru i ładniejsze pola daty */
.modal select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b8af9d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center }
.modal input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.75) sepia(.4) saturate(2); cursor: pointer }

/* Spójne przyciski i fokus */
.btn { letter-spacing: .005em }
.btn:active { transform: translateY(1px) }
.icon-btn:focus-visible, .btn:focus-visible, .id-chip:focus-visible { outline-offset: 2px }
.status-cell .btn.sm { min-width: 96px }

/* Karty: delikatniejszy cień i płynniejszy hover */
.stat, .license, .user-row, .resource { box-shadow: 0 1px 0 rgba(255, 238, 200, .03) inset, 0 8px 24px rgba(0, 0, 0, .18) }
.license:hover, .user-row:hover { transform: translateY(-1px) }
.license, .user-row { transition: border-color .2s, background .2s, transform .2s }

/* Pasek przewijania i zaznaczenie w tonacji miodu */
html { scrollbar-color: #2a261d var(--bg) }

/* Szerokie ekrany: nie rozciągaj treści w nieskończoność */
@media (min-width: 1700px) { .content { max-width: 1240px } }

/* Warianty kolumn przy węższych oknach */
@media (max-width: 1340px) {
  .license { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(112px, auto) }
  .license .key-cell { grid-column: 1 / -1; grid-row: 2 }
  .license.admin { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) }
  .license.admin .key-cell { grid-column: 1 / -1; grid-row: auto }
}
@media (max-width: 560px) {
  .license, .license.admin { grid-template-columns: 1fr }
  .license .key-cell, .license.admin .key-cell { grid-row: auto }
}

/* --- karty dwoch stalych produktow na stronie "Pliki i wersje" --- */
.resource.product-file { border-color: rgba(255, 205, 103, .3);
  background: linear-gradient(165deg, rgba(255, 205, 103, .07), transparent 58%), var(--surface) }
.resource.product-file .resource-top > .tag { margin-left: auto; flex: none; align-self: center;
  padding: 2px 9px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface-2);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--honey) }
.resource.product-file .btn-pair { flex-wrap: wrap }
.resource.product-file .btn-pair .btn { flex: 1 1 auto }
.resource.product-file .btn-pair .btn.primary { flex: 1 1 100% }

/* --- lista JAR-ow produktu, po jednym na wersje Minecrafta --- */
.resource-grid.wide { grid-template-columns: 1fr }
.ver-list { display: flex; flex-direction: column; gap: 8px }
.ver-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2) }
.ver-row.empty { border-style: dashed; background: transparent }
.ver-tags { flex: none; display: flex; flex-wrap: wrap; gap: 4px; max-width: 46% }
.ver-tag { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255, 205, 103, .1); color: var(--honey); font-family: var(--mono);
  font-size: 11.5px; font-weight: 600; white-space: nowrap }
.ver-tag.any { font-family: inherit; font-size: 12px; color: var(--text-2); background: transparent }
.ver-file { min-width: 0; flex: 1; font-family: var(--mono); font-size: 12px; color: var(--text-2); overflow-wrap: anywhere }
.ver-file small { display: block; margin-top: 3px; font-family: inherit; font-size: 11.5px; color: var(--muted) }
.ver-row .row-actions { margin-left: auto; flex-wrap: nowrap }
@media (max-width: 560px) {
  .ver-row { flex-wrap: wrap; gap: 8px }
  .ver-tags { max-width: 100% }
  .ver-row .row-actions { width: 100%; justify-content: flex-start }
}
