/* Auta PRL Chicago, panel klubu. */
:root {
  --red: #d40000; --red-dk: #9c0000; --cream: #f4ead5; --cream-2: #e9dcbd; --paper: #faf6ee;
  --ink: #1b1714; --ink-2: #3a332c; --muted: #6d6253; --line: #d9ccb0; --ok: #1d7a46; --mustard: #e5a41b;
  --f-display: 'APRL Plate Heavy', 'Arial Narrow', Impact, sans-serif;
  --f-cond: 'APRL Plate Condensed', 'Arial Narrow', sans-serif;
  --f-text: 'APRL Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.5 var(--f-text); }
img { max-width: 100%; display: block; }
a { color: var(--red-dk); }
h1, h2 { margin: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.err { color: var(--red); font-weight: 700; }
[hidden] { display: none !important; }

.adm-ver { position: fixed; left: 10px; top: 6px; z-index: 90; font: 700 12px/1 var(--f-cond); letter-spacing: .08em; color: var(--cream); background: var(--ink); padding: 4px 7px; border-radius: 4px; opacity: .9; }
.is-out .adm-ver { color: var(--ink); background: var(--cream-2); }

/* przyciski */
.b { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .55em 1em; border: 2px solid var(--ink); border-radius: 6px; background: #fff; color: var(--ink); font: 700 .95rem/1.1 var(--f-cond); text-transform: uppercase; letter-spacing: .05em; text-decoration: none; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.b:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.b:disabled { opacity: .35; cursor: default; transform: none; box-shadow: none; }
.b--red { background: var(--red); color: #fff; }
.b--cream { background: var(--cream); color: var(--red-dk); }
.b--ghost { background: #fff; }
.b--danger { color: var(--red); border-color: var(--red); box-shadow: 2px 2px 0 var(--red); }
.b--lg { font-size: 1.1rem; padding: .7em 1.3em; }
.b--sm { font-size: .8rem; padding: .35em .6em; box-shadow: 1px 1px 0 var(--ink); }
.b--block { width: 100%; }
.is-busy { opacity: .6; pointer-events: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row--end { margin-top: 18px; }
.grow { flex: 1; }

/* logowanie */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--red); background-image: repeating-conic-gradient(rgba(0,0,0,.08) 0 8deg, transparent 8deg 16deg); }
.login__card { width: min(380px, 100%); background: var(--cream); border: 4px solid var(--ink); border-radius: 12px; box-shadow: 8px 8px 0 var(--ink); padding: 28px; display: grid; gap: 10px; text-align: center; }
.login__card img { justify-self: center; background: #fff; border-radius: 50%; border: 3px solid var(--ink); }
.login__card h1 { font: 400 2.2rem/1 var(--f-display); text-transform: uppercase; color: var(--red); }
.login__card p { margin: 0; }
.login__card label { text-align: left; font-weight: 700; margin-top: 8px; }
.login__card input { font: inherit; font-size: 1.1rem; padding: .6em; border: 2px solid var(--ink); border-radius: 6px; }
.login__err { color: var(--red); font-weight: 700; min-height: 1.2em; }
.login__hint { font-size: .85rem; color: var(--muted); }
.login__back { font-size: .9rem; }

/* uklad */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: var(--cream); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding-top: 22px; }
.side__brand { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.side__brand img { background: #fff; border-radius: 50%; }
.side__brand strong { display: block; font: 400 1.35rem/1 var(--f-display); text-transform: uppercase; color: #fff; }
.side__brand small { font: 700 .8rem/1 var(--f-cond); text-transform: uppercase; letter-spacing: .1em; color: var(--mustard); }
.side__plates { margin: 8px 14px 6px; padding: 12px 14px; text-align: left; background: var(--red); color: #fff; border: 2px solid var(--cream); border-radius: 8px; cursor: pointer; display: grid; gap: 2px; box-shadow: 3px 3px 0 var(--mustard); }
.side__plates:hover { background: #ec0d0d; }
.side__plates-k { font: 400 1.35rem/1 var(--f-display); text-transform: uppercase; }
.side__plates-s { font: 700 .8rem/1 var(--f-cond); text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
.side__nav { display: grid; padding: 6px 8px; }
.side__group { margin: 14px 10px 4px; font: 700 .72rem/1 var(--f-cond); text-transform: uppercase; letter-spacing: .14em; color: #a4977f; }
.side__nav a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; color: var(--cream); text-decoration: none; border-radius: 6px; font-weight: 600; }
.side__nav a i { width: 20px; text-align: center; font-style: normal; color: var(--mustard); }
.side__nav a:hover { background: rgba(255,255,255,.08); }
.side__nav a.is-on { background: var(--cream); color: var(--ink); }
.side__nav a.is-on i { color: var(--red); }
.side__foot { margin-top: auto; padding: 14px 16px; display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid #3c352e; }
.side__foot a, .side__foot button { color: var(--cream); background: none; border: 0; font: inherit; font-size: .9rem; cursor: pointer; text-decoration: none; padding: 0; }
.main { min-width: 0; }
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 16px 26px; background: var(--paper); border-bottom: 3px solid var(--ink); }
.bar__title h1 { font: 400 1.9rem/1 var(--f-display); text-transform: uppercase; }
.bar__title p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.bar__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.bar__menu { display: none; width: 42px; height: 40px; border: 2px solid var(--ink); background: #fff; border-radius: 6px; position: relative; cursor: pointer; }
.bar__menu span:first-child, .bar__menu span:first-child::before, .bar__menu span:first-child::after { position: absolute; left: 9px; right: 9px; height: 3px; background: var(--ink); content: ''; }
.bar__menu span:first-child { top: 17px; } .bar__menu span:first-child::before { left: 0; right: 0; top: -7px; } .bar__menu span:first-child::after { left: 0; right: 0; top: 7px; }
.view { padding: 24px 26px 60px; max-width: 1100px; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 39; }

/* karty */
.card { background: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 18px 20px; margin-bottom: 18px; box-shadow: 3px 3px 0 var(--ink); }
.card h2 { font: 400 1.4rem/1.1 var(--f-display); text-transform: uppercase; margin-bottom: .5em; }
.card--plates { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--red); color: #fff; box-shadow: 5px 5px 0 var(--ink); }
.card--plates h2 { font-size: 2rem; color: #fff; }
.card--plates p { margin: .3em 0 0; max-width: 46em; }
.card__k { margin: 0 0 6px; font: 700 .85rem/1 var(--f-cond); text-transform: uppercase; letter-spacing: .12em; color: var(--mustard); }
.card--import { border-color: var(--mustard); box-shadow: 3px 3px 0 var(--mustard); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--cream); border: 2px solid var(--ink); border-radius: 10px; padding: 12px 14px; text-decoration: none; color: var(--ink); display: grid; }
.stat b { font: 400 1.8rem/1 var(--f-display); color: var(--red); }
.stat span { font: 700 .82rem/1.2 var(--f-cond); text-transform: uppercase; letter-spacing: .06em; }
.progress { height: 14px; background: var(--cream); border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; margin: 8px 0 14px; }
.progress span { display: block; height: 100%; background: var(--red); transition: width .3s; }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.log span { color: var(--muted); font-size: .85rem; margin-right: 6px; }
.help { background: var(--cream); border-left: 5px solid var(--mustard); padding: 10px 14px; border-radius: 4px; }
.empty { padding: 18px; border: 2px dashed var(--line); border-radius: 10px; color: var(--muted); background: #fff; }
.tag { font-style: normal; font: 700 .72rem/1 var(--f-cond); text-transform: uppercase; letter-spacing: .06em; background: var(--mustard); color: var(--ink); padding: 2px 6px; border-radius: 3px; }
.tag--off { background: var(--cream-2); }

/* lista */
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.item { display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: 6px 10px 6px 6px; }
.item--off { opacity: .6; }
.item__main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-decoration: none; color: var(--ink); }
.item__img { width: 64px; height: 48px; flex-shrink: 0; background: var(--cream-2); border-radius: 5px; overflow: hidden; }
.item__img img { width: 100%; height: 100%; object-fit: cover; }
.item__txt { min-width: 0; display: grid; }
.item__txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__txt small { color: var(--muted); }
.item__tools { display: flex; gap: 6px; flex-shrink: 0; }

/* formularze */
.form { display: block; }
.fld { margin-bottom: 16px; }
.fld__l { display: block; font-weight: 700; margin-bottom: 5px; }
.req { color: var(--red); font-style: normal; }
input[type=text], input[type=url], input[type=date], input[type=time], input[type=search], textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .55em .65em; border: 2px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
input:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(229,164,27,.4); }
textarea { resize: vertical; line-height: 1.45; }
.fld--date input, .fld--time input { max-width: 220px; }
.bi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bi__box { position: relative; }
.bi__lang { position: absolute; right: 8px; top: 8px; font: 700 .7rem/1 var(--f-cond); letter-spacing: .1em; background: var(--ink); color: var(--cream); padding: 3px 5px; border-radius: 3px; pointer-events: none; }
.bi__box input, .bi__box textarea { padding-right: 38px; }
.check { display: inline-flex; gap: 10px; align-items: center; font-weight: 700; cursor: pointer; padding: 8px 12px; background: var(--cream); border-radius: 6px; border: 2px solid var(--line); }
.check input { width: 20px; height: 20px; accent-color: var(--red); }
.imgf { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.imgf__prev { width: 160px; height: 110px; border: 2px dashed var(--line); border-radius: 8px; display: grid; place-items: center; color: var(--muted); overflow: hidden; background: var(--paper); }
.imgf__prev img { width: 100%; height: 100%; object-fit: cover; }
.search { margin-bottom: 14px; max-width: 420px; }

/* teksty */
.tgroup summary { cursor: pointer; font: 400 1.3rem/1.2 var(--f-display); text-transform: uppercase; }
.tgroup summary small { font: 600 .9rem var(--f-text); color: var(--muted); text-transform: none; }
.trow { padding: 12px 0; border-top: 1px solid var(--cream-2); }
.trow__k { margin-bottom: 6px; }
.trow code { font-size: .8rem; background: var(--cream); padding: 2px 6px; border-radius: 4px; }
.trow .b { margin-top: 6px; }

/* zdjecia albumu */
.drop.is-over { background: var(--cream); border-style: dashed; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ph { background: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: 6px; display: grid; gap: 5px; }
.ph--cover { border-color: var(--red); box-shadow: 0 0 0 3px var(--mustard); }
.ph__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 5px; background: var(--cream-2); }
.ph__img img { width: 100%; height: 100%; object-fit: cover; }
.ph input { padding: .35em .5em; font-size: .85rem; }
.ph__tools { display: flex; gap: 4px; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 100; background: var(--ink); color: var(--cream); padding: 12px 20px; border-radius: 8px; font-weight: 700; box-shadow: 4px 4px 0 var(--mustard); max-width: calc(100% - 30px); }
.toast--bad { background: var(--red); color: #fff; box-shadow: 4px 4px 0 var(--ink); }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; z-index: 40; width: 270px; transform: translateX(-105%); transition: transform .2s; }
  .side.is-open { transform: none; }
  .bar__menu { display: block; }
  .bar { padding: 26px 14px 12px; flex-wrap: wrap; }
  .bar__actions { width: 100%; margin: 0; }
  .view { padding: 16px 14px 60px; }
  .bi { grid-template-columns: 1fr; }
  .item { flex-wrap: wrap; }
  .item__tools { width: 100%; justify-content: flex-end; }
}
