/* AukcjeZamkniete.org.pl — premium, ciemny motyw z akcentem złota. Bez zewnętrznych fontów (CSP: 'self'). */
:root {
    --bg: #0d0e11;
    --bg-2: #14161b;
    --card: #181a20;
    --card-2: #1f2229;
    --line: #2b2f38;
    --text: #ece7dd;
    --muted: #9a958b;
    --gold: #c9a86a;
    --gold-2: #e3c88f;
    --gold-dark: #8f7442;
    --ok: #7fbf8e;
    --warn: #d9a55b;
    --danger: #d9695b;
    --info: #7aa7d9;
    --radius: 14px;
    --serif: "Cormorant Garamond", "Playfair Display", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: radial-gradient(1200px 600px at 80% -10%, rgba(201, 168, 106, .08), transparent 60%), var(--bg);
    color: var(--text);
    font: 16px/1.6 var(--sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--gold-2); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); }
h2 { font-size: 1.45rem; color: var(--gold-2); }
h3 { font-size: 1.25rem; }
img { max-width: 100%; display: block; }
code, .mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.ok { color: var(--ok); font-weight: 600; }
.warn { color: var(--warn); font-weight: 600; }

.wrap { width: min(1240px, 100% - 2rem); margin-inline: auto; }
.main { flex: 1; padding: 2rem 0 4rem; }

/* Nagłówek */
.site-header { border-bottom: 1px solid var(--line); background: rgba(13, 14, 17, .85); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 70px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); }
.brand-mark { color: var(--gold); font-size: 1.6rem; }
.brand-text { font-family: var(--serif); font-size: 1.45rem; letter-spacing: .02em; }
.brand-text strong { color: var(--gold); font-weight: 600; }
.brand-text small { color: var(--muted); font-size: .8rem; margin-left: .15rem; }
.main-nav { display: flex; align-items: center; gap: .3rem 1.1rem; flex-wrap: wrap; }
.main-nav a { color: var(--muted); font-size: .93rem; padding: .3rem 0; border-bottom: 1px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--text); border-bottom-color: var(--gold); }
.main-nav a.btn { color: #16130d; border: 0; padding: .45rem .9rem; }
.logout-form { margin: 0; }
.link-button { background: none; border: 0; color: var(--muted); font: inherit; font-size: .93rem; cursor: pointer; padding: .3rem 0; }
.link-button:hover { color: var(--danger); }
.nav-toggle { display: none; }
.notice-bar { background: linear-gradient(90deg, rgba(201,168,106,.18), rgba(201,168,106,.05)); border-bottom: 1px solid var(--gold-dark); padding: .6rem 0; font-size: .92rem; }

/* Przyciski */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: 999px; padding: .7rem 1.4rem;
    font: 600 .95rem/1 var(--sans); letter-spacing: .02em; border: 1px solid transparent; cursor: pointer; transition: all .15s ease; }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, var(--gold-dark)); color: #16130d; box-shadow: 0 6px 18px rgba(201,168,106,.25); }
.btn-gold:hover { filter: brightness(1.08); color: #000; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-danger { background: transparent; border-color: rgba(217,105,91,.5); color: var(--danger); }
.btn-danger:hover { background: rgba(217,105,91,.12); }
.btn-sm { padding: .45rem .9rem; font-size: .85rem; }
.btn-block { width: 100%; }

/* Karty i układ */
.card { background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card + .card, .card + .table-wrap, section.card { margin-bottom: 1.25rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { margin: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 2rem 0 1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; color: var(--gold); margin: 0 0 .4rem; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 1.25rem; align-items: start; }
.breadcrumbs { margin: 0 0 1rem; font-size: .9rem; }
.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }

/* Landing */
.landing .main { padding-top: 0; }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: center; padding: 5rem 0 3rem; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
.hero h1 em { color: var(--gold); font-style: italic; font-weight: 500; }
.lead { font-size: 1.12rem; color: #cfc9bd; max-width: 60ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-visual { display: grid; place-items: center; }
.watch-face { width: min(340px, 70vw); aspect-ratio: 1; border-radius: 50%; position: relative;
    background: radial-gradient(circle at 35% 30%, #2a2d35, #0b0c0f 70%);
    border: 10px solid #1c1e24; box-shadow: 0 0 0 2px var(--gold-dark), 0 0 0 14px #121317, 0 0 0 16px var(--gold-dark), 0 30px 80px rgba(0,0,0,.6);
    background-image: repeating-conic-gradient(from 0deg, rgba(201,168,106,.55) 0 1deg, transparent 1deg 30deg), radial-gradient(circle at 35% 30%, #2a2d35, #0b0c0f 70%); }
.hand { position: absolute; left: 50%; bottom: 50%; transform-origin: 50% 100%; background: linear-gradient(var(--gold-2), var(--gold-dark)); border-radius: 4px; }
.hand-h { width: 8px; height: 26%; margin-left: -4px; transform: rotate(-50deg); }
.hand-m { width: 5px; height: 38%; margin-left: -2.5px; transform: rotate(62deg); }
.hand-dot { position: absolute; width: 18px; height: 18px; left: 50%; top: 50%; margin: -9px; border-radius: 50%; background: var(--gold); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature h3 { color: var(--gold-2); }

/* Formularze */
.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-size: .9rem; color: #d8d2c6; }
input, select, textarea { width: 100%; background: #0f1014; border: 1px solid var(--line); border-radius: 10px; padding: .72rem .85rem;
    color: var(--text); font: inherit; transition: border-color .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,106,.15); }
input:disabled { opacity: .5; }
input[type="file"] { padding: .55rem; }
textarea { resize: vertical; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: end; }
.span-2 { grid-column: span 2; }
.field-error { color: var(--danger); font-size: .84rem; margin: 0; }
.inline-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-form input, .inline-form select { width: auto; min-width: 160px; }
.auth-panel { max-width: 460px; margin: 3rem auto; }
.auth-wide { max-width: 820px; }
.form-actions { display: flex; justify-content: flex-end; }

/* Komunikaty */
.flash { border-radius: 10px; padding: .85rem 1rem; margin: 0 0 1rem; border: 1px solid var(--line); background: var(--card-2); }
.flash-success { border-color: rgba(127,191,142,.5); background: rgba(127,191,142,.08); }
.flash-error { border-color: rgba(217,105,91,.55); background: rgba(217,105,91,.08); }
.flash-info { border-color: rgba(122,167,217,.45); background: rgba(122,167,217,.07); }
.winner-box { border: 1px solid var(--gold); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 0 0 1.25rem;
    background: linear-gradient(135deg, rgba(201,168,106,.18), rgba(201,168,106,.04)); }
.winner-box h2 { margin-bottom: .3rem; }

/* Odznaki */
.badge { display: inline-block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px;
    border: 1px solid var(--line); color: var(--muted); background: rgba(0,0,0,.35); }
.badge-active { color: var(--ok); border-color: rgba(127,191,142,.5); }
.badge-published { color: var(--info); border-color: rgba(122,167,217,.5); }
.badge-ended { color: var(--gold-2); border-color: var(--gold-dark); }
.badge-cancelled, .badge-blocked, .badge-rejected { color: var(--danger); border-color: rgba(217,105,91,.5); }
.badge-pending, .badge-draft { color: var(--warn); border-color: rgba(217,165,91,.5); }
.badge-code-active { color: var(--ok); border-color: rgba(127,191,142,.5); }
.pill { display: inline-block; font-size: .75rem; padding: .15rem .6rem; border-radius: 999px; margin: .3rem 0 0; font-weight: 600; }
.pill-gold { background: rgba(201,168,106,.18); color: var(--gold-2); }
.pill-ok { background: rgba(127,191,142,.15); color: var(--ok); }
.pill-danger { background: rgba(217,105,91,.15); color: var(--danger); font-family: var(--sans); font-size: .7rem; vertical-align: middle; }

/* Siatka aukcji */
.auction-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1.25rem; }
.auction-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; margin: 0 !important; }
.auction-cover { position: relative; aspect-ratio: 4 / 3; background: #0b0c0f; display: grid; place-items: center; overflow: hidden; }
.auction-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.auction-card:hover .auction-cover img { transform: scale(1.04); }
.auction-cover .badge { position: absolute; top: .8rem; left: .8rem; }
.cover-placeholder { font-size: 3rem; color: var(--gold-dark); }
.auction-card-body { padding: 1.1rem 1.25rem 1.3rem; }
.auction-card-body h3 { margin-bottom: .7rem; }
.auction-card-body h3 a { color: var(--text); }
.kv { margin: 0; display: grid; gap: .3rem; font-size: .9rem; }
.kv div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed rgba(255,255,255,.06); padding-bottom: .25rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }
.price { color: var(--gold-2); font-weight: 700; }

/* Szczegóły aukcji */
.auction-detail { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; align-items: start; }
.gallery-main { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #0b0c0f; aspect-ratio: 4/3; display: grid; place-items: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-main.placeholder span { font-size: 5rem; color: var(--gold-dark); }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .6rem; margin-top: .75rem; }
.thumb { padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: none; cursor: pointer; aspect-ratio: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover, .thumb.active { border-color: var(--gold); }
.bid-panel { position: sticky; top: 90px; }
.price-block { margin: 1.25rem 0; padding: 1rem 0; border-block: 1px solid var(--line); }
.price-block .label { margin: 0; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; }
.big-price { font-family: var(--serif); font-size: 2.6rem; color: var(--gold-2); margin: .1rem 0; }
.reserve { margin: .4rem 0 0; }
.countdown-box { font-size: 1.05rem; margin: .5rem 0 .2rem; }
.countdown { font-variant-numeric: tabular-nums; color: var(--gold-2); }
.leader-note { color: var(--ok); font-weight: 600; }
.bid-form input { font-size: 1.3rem; font-weight: 600; }
.description { white-space: normal; color: #d9d3c7; }
.spec { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0 0 1.25rem; }
.spec div { display: grid; grid-template-columns: 190px 1fr; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; }
.confidential { border-color: rgba(217,105,91,.35); }

/* Tabele */
.table-wrap { overflow-x: auto; padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: rgba(0,0,0,.2); }
.table tbody tr:hover { background: rgba(201,168,106,.04); }
.table.compact th, .table.compact td { padding: .5rem .6rem; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr.mine td { color: var(--gold-2); }
.table tr.top-bid { background: rgba(201,168,106,.06); }
.details { max-width: 420px; word-break: break-all; color: var(--muted); }

/* Statystyki */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { display: flex; flex-direction: column; gap: .2rem; margin: 0 !important; color: var(--text); }
.stat-value { font-family: var(--serif); font-size: 2.3rem; color: var(--gold-2); line-height: 1; }
.stat-label { color: var(--muted); font-size: .85rem; }

/* Admin */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.tabs a { padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .9rem; }
.tabs a.active, .tabs a:hover { border-color: var(--gold); color: var(--gold-2); }
.admin-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.admin-images figure { margin: 0; display: grid; gap: .4rem; }
.admin-images img { aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.code-reveal { border-color: var(--gold); text-align: center; }
.code-value { font-size: clamp(1.2rem, 3.5vw, 2rem); letter-spacing: .12em; color: var(--gold-2); margin: .5rem 0; word-break: break-all; }
.log-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; font-size: .88rem; }
.pager { display: flex; gap: .5rem; justify-content: center; margin-top: 1rem; }
.error-page { max-width: 640px; margin: 4rem auto; text-align: center; }

/* Stopka */
.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0; font-size: .86rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-inner p { margin: 0; }

/* Responsywność */
@media (max-width: 960px) {
    .hero { grid-template-columns: 1fr; padding-top: 3rem; }
    .hero-visual { order: -1; }
    .features { grid-template-columns: 1fr; }
    .auction-detail { grid-template-columns: 1fr; }
    .bid-panel { position: static; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .nav-toggle { display: inline-flex; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: .4rem .8rem; font: inherit; }
    .main-nav:not(.guest-nav) { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding-bottom: 1rem; }
    .main-nav.open { display: flex; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .spec div { grid-template-columns: 1fr; gap: .1rem; }
    .card { padding: 1.1rem; }
    .big-price { font-size: 2.1rem; }
    .table th, .table td { padding: .55rem .6rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
