/* Valeris Media – grafit, biel i Geist, jak valerisrp.pl i panel bota. Kolor tylko tam, gdzie coś znaczy: kategoria i ważność. */
@font-face { font-family: "Geist"; font-weight: 100 900; font-display: swap; src: url("/static/fonts/Geist-Variable.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 100 900; font-display: swap; src: url("/static/fonts/GeistMono-Variable.woff2") format("woff2"); }
:root {
  --bg: #141519; --side: #17181c; --card: #1b1c21; --card-2: #23252b; --line: rgba(255,255,255,.075); --line-2: rgba(255,255,255,.12);
  --glass: rgba(255,255,255,.045); --text: #f2f3f5; --muted: #9a9ca5; --dim: #7d808a;
  --info: #5aa9ff; --warn: #f5b83d; --bad: #ef5a5f; --ok: #3dd68c;
  --sans: "Geist", "Segoe UI", system-ui, sans-serif; --mono: "Geist Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; letter-spacing: -.025em; line-height: 1.2; }
h1 { font-size: 22px; font-weight: 650; } h2 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
a { color: inherit; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .mono { font-family: var(--mono); font-size: 12.5px; }
:focus-visible { outline: 2px solid rgba(255,255,255,.55); outline-offset: 2px; }
.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* układ */
.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); height: 100vh; height: 100dvh; }
.sidebar { display: flex; flex-direction: column; background: var(--side); border-right: 1px solid var(--line); min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; font: 650 16px var(--sans); letter-spacing: -.03em; text-decoration: none; }
.brand img { width: 34px; height: 34px; margin: -4px 0; } .brand span { color: var(--muted); font-weight: 450; }
.org { display: flex; align-items: center; gap: 10px; margin: 0 12px 8px; padding: 8px 12px 8px 8px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--glass); }
.org i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.07); color: var(--muted); flex: none; } .org b { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .org small { color: var(--dim); font-size: 12px; }
.nav { flex: 1; overflow-y: auto; padding: 0 10px 12px; scrollbar-width: thin; scrollbar-color: #2a2c33 transparent; }
.sep { display: flex; align-items: center; justify-content: space-between; color: var(--dim); font: 500 11px var(--mono); padding: 14px 10px 5px; text-transform: uppercase; letter-spacing: .04em; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--muted); text-decoration: none; min-width: 0; }
.nav a .icon { color: var(--c, currentColor); }
.nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.nav a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav a.active { color: var(--text); background: rgba(255,255,255,.08); }
.side-foot { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.side-foot img, .side-foot .noava { width: 30px; height: 30px; border-radius: 50%; background: var(--card-2); }
.side-foot .who { flex: 1; min-width: 0; line-height: 1.25; } .side-foot b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.page { overflow-y: auto; padding: 24px 28px 60px; flex: 1; }
.page > * { max-width: 1100px; }
.banner { padding: 9px 28px; background: rgba(239,90,95,.1); border-bottom: 1px solid rgba(239,90,95,.35); color: #ff9a9d; }
.icon-btn.menu-btn { display: none; }

/* nagłówek i pasek filtrów */
.head { display: flex; align-items: center; gap: 12px; padding: 20px 28px 14px; }
.head .grow { flex: 1; min-width: 0; } .head p { color: var(--muted); margin-top: 3px; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); } .pill.off::before { background: var(--bad); }
.toolbar { display: flex; gap: 8px; padding: 0 28px 14px; flex-wrap: wrap; align-items: center; }
.search { position: relative; flex: 1 1 280px; min-width: 200px; } .search .icon { position: absolute; left: 13px; top: 11px; color: var(--dim); pointer-events: none; }
.search input { padding-left: 38px; }
input, textarea { width: 100%; min-height: 38px; background: var(--glass); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 12px; font: inherit; }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:hover { border-color: rgba(255,255,255,.2); }
.dd { position: relative; min-width: 0; }
.dd-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 38px; padding: 7px 10px 7px 13px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--glass); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.dd-btn:hover, .dd.open .dd-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
.dd-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn .icon { width: 15px; height: 15px; color: var(--muted); transition: transform .15s; } .dd.open .dd-btn .icon { transform: rotate(180deg); }
.dd-menu { position: absolute; z-index: 8; top: calc(100% + 6px); left: 0; min-width: 100%; width: max-content; max-width: min(340px, calc(100vw - 32px)); max-height: 320px; overflow-y: auto; padding: 5px; border: 1px solid var(--line-2); border-radius: 12px; background: #1f2026; box-shadow: 0 18px 44px rgba(0,0,0,.55); scrollbar-width: thin; scrollbar-color: #3a3c44 transparent; animation: dd .13s ease-out; }
.dd.right .dd-menu { left: auto; right: 0; }
@keyframes dd { from { opacity: 0; transform: translateY(-4px); } }
.dd-opt { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 36px; padding: 6px 10px; border-radius: 8px; color: var(--muted); cursor: pointer; }
.dd-opt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-opt .icon { width: 15px; height: 15px; visibility: hidden; }
.dd-opt.hot { background: rgba(255,255,255,.07); color: var(--text); }
.dd-opt[aria-selected=true] { color: var(--text); font-weight: 500; } .dd-opt[aria-selected=true] .icon { visibility: visible; }
.toolbar .dd-btn { min-width: 168px; }
input[type=checkbox] { width: 16px; height: 16px; min-height: 0; accent-color: #f2f3f5; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 7px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--glass); color: var(--text); font: 500 13.5px var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2); } .btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: #f4f4f5; border-color: #f4f4f5; color: #141519; } .btn.primary:hover { background: #fff; }
.btn.danger { color: #ff8a8e; border-color: rgba(239,90,95,.4); }
.btn.small { min-height: 30px; padding: 3px 11px; font-size: 12.5px; }
.btn.on { border-color: rgba(61,214,140,.45); color: var(--ok); background: rgba(61,214,140,.07); }
.icon-btn { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { background: rgba(255,255,255,.08); color: var(--text); }
.adv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 0 28px 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.field { display: block; min-width: 0; } .field > span { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 5px; }
.adv .row { grid-column: 1 / -1; } .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 5px 3px 11px; border-radius: 999px; background: var(--card-2); font-size: 12.5px; }
.chip .icon-btn { width: 20px; height: 20px; }

/* galeria */
.grid { flex: 1; overflow-y: auto; min-height: 0; border-top: 1px solid var(--line); scrollbar-color: #2a2c33 transparent; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; padding: 14px 28px 20px; }
.tile { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.tile:hover { border-color: rgba(255,255,255,.2); } .tile.sel, .tile.picked { border-color: rgba(255,255,255,.55); }
.shot { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 0; background: #0f1013; color: var(--muted); cursor: pointer; overflow: hidden; }
.shot img, .shot video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.sound .icon { width: 34px; height: 34px; stroke-width: 1.4; }
.play { position: absolute; inset: 0; margin: auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; }
.tick { position: absolute; top: 4px; left: 4px; display: grid; place-items: center; width: 36px; height: 36px; cursor: pointer; opacity: 0; } .tick input { width: 18px; height: 18px; cursor: pointer; }
.tile:hover .tick, .tile.picked .tick, .tick:focus-within, .picking .tick { opacity: 1; }
@media (hover: none) { .tick { opacity: 1; } }
.cap { padding: 9px 12px 10px; } .cap b, .cap span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cap b { font-weight: 550; } .cap span { color: var(--muted); font-size: 12.5px; }
.day { padding: 14px 28px 0; color: var(--muted); font-size: 12.5px; }
.pickbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 28px; border-top: 1px solid var(--line); background: var(--card); } .pickbar b { margin-right: 6px; font-weight: 600; }
.empty { padding: 60px 28px; text-align: center; color: var(--muted); } .more { display: flex; justify-content: center; padding: 18px; }
.pill.plain::before { display: none; } .card .two { margin-top: 12px; }
.nav a small { color: var(--dim); font-size: 12px; }
.space { padding: 10px 16px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); } .space > div { display: flex; justify-content: space-between; margin-bottom: 6px; }
progress { display: block; width: 100%; height: 6px; border: 0; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.09); appearance: none; } progress::-webkit-progress-bar { background: rgba(255,255,255,.09); } progress::-webkit-progress-value { background: #e8e9ec; } progress::-moz-progress-bar { background: #e8e9ec; }
progress.full::-webkit-progress-value { background: var(--bad); } progress.full::-moz-progress-bar { background: var(--bad); }
#uploads { position: fixed; right: 20px; bottom: 20px; z-index: 20; display: grid; gap: 8px; width: 300px; max-width: calc(100vw - 40px); } .upcard { padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: #1f2026; box-shadow: 0 18px 44px rgba(0,0,0,.5); } .upcard span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 8px; font-size: 13px; }
.drop .grid { outline: 2px dashed rgba(255,255,255,.5); outline-offset: -10px; background: rgba(255,255,255,.03); }
.view { display: block; border-radius: 12px; overflow: hidden; background: #0f1013; margin-bottom: 12px; } .view img, .view video { display: block; width: 100%; max-height: 320px; object-fit: contain; } .view audio { display: block; width: 100%; }
.ask { margin: 8px 0 18px; } .gap { margin-top: 26px; } .secret { padding: 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #0f1013; overflow-wrap: anywhere; user-select: all; }
.checks.wide { grid-template-columns: 1fr; }
/* szczegóły */
.detail { position: absolute; right: 16px; top: 16px; bottom: 16px; width: 400px; max-width: calc(100% - 32px); display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.55); z-index: 5; }
.detail header { display: flex; gap: 10px; padding: 16px 16px 12px 18px; border-bottom: 1px solid var(--line); }
.detail header h2 { flex: 1; overflow-wrap: anywhere; line-height: 1.35; }
.detail .body { overflow-y: auto; padding: 14px 18px 20px; scrollbar-width: thin; }
.tagline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.lvl { font-size: 12.5px; color: var(--muted); } .lvl.notice { color: var(--info); } .lvl.warning { color: var(--warn); } .lvl.critical { color: var(--bad); }
.sect { color: var(--dim); font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .04em; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; margin: 10px 0 0; } .kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.detail textarea { margin: 12px 0 8px; min-height: 60px; resize: vertical; }

.detail-actions { margin-top: 10px; } .card-actions { margin-top: 14px; }

/* karty, tabele */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-top: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; } .stat b { display: block; font-size: 22px; letter-spacing: -.03em; margin-top: 2px; }
.tw { overflow-x: auto; } table { width: 100%; border-collapse: collapse; } th { text-align: left; color: var(--dim); font: 500 11px var(--mono); text-transform: uppercase; padding: 8px 10px; }
td { padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; } tr.link { cursor: pointer; } tr.link:hover td { background: rgba(255,255,255,.03); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 14px; } .checks label, label.check { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
dialog { background: var(--card); color: var(--text); border: 1px solid var(--line-2); border-radius: 16px; padding: 22px; overflow: visible; width: 400px; max-width: calc(100vw - 32px); } dialog::backdrop { background: rgba(0,0,0,.6); }
dialog .field { margin: 14px 0; }

/* logowanie */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(900px 500px at 50% -10%, rgba(255,255,255,.07), transparent 65%); }
.login > div { width: 100%; max-width: 420px; } .login img { width: 84px; margin-bottom: 26px; }
.login h1 { font-size: 40px; font-weight: 700; letter-spacing: -.045em; line-height: 1.05; } .login p { color: var(--muted); font-size: 15px; margin: 14px 0 26px; }
.login .err { color: #ff9a9d; border: 1px solid rgba(239,90,95,.35); background: rgba(239,90,95,.08); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 18px; }
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 20; } .toast { background: #f4f4f5; color: #141519; border-radius: 10px; padding: 9px 16px; font-weight: 500; } .toast.error { background: var(--bad); color: #fff; }

@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 10; transform: translateX(-100%); visibility: hidden; transition: transform .18s, visibility .18s; } .sidebar.open { transform: none; visibility: visible; box-shadow: 0 0 80px #000; }
  .icon-btn.menu-btn { display: grid; border: 1px solid var(--line-2); width: 36px; height: 36px; }
  .head { padding: 14px 16px 12px; flex-wrap: wrap; } .head p { display: none; } .toolbar { padding: 0 16px 12px; } .toolbar .dd, .toolbar .btn { flex: 1 1 auto; } .adv { margin: 0 16px 12px; } .page { padding: 16px 16px 60px; } .two { grid-template-columns: 1fr; }
  .head .pill { display: none; } .head h1 { font-size: 19px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 16px 18px; } .pickbar { padding: 9px 16px; }
  .detail { inset: 0; width: auto; max-width: none; border-radius: 0; }
  .day { padding: 12px 16px 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
