/* pixsmelt admin. Served from /static/ only: the CSP forbids inline styles. */
:root {
  --fg: #1d2125;
  --muted: #6b737b;
  --bg: #f6f7f8;
  --panel: #ffffff;
  --line: #d9dde1;
  --accent: #3f8f63;
  --danger: #b3261e;
}
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; color: var(--fg); background: var(--bg); }
body { margin: 0; }
a { color: var(--accent); }
h1 { font-size: 1.4rem; margin: 0 0 1rem; }

.top { display: flex; align-items: center; gap: 1.5rem; padding: .75rem 1.25rem; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; }
.menu { display: flex; align-items: center; gap: 1rem; flex: 1; }
.menu a { color: var(--fg); text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.menu a.active { font-weight: 600; border-bottom-color: var(--accent); }
.logout { margin: 0 0 0 auto; }
.logout button { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.logout button:hover { color: var(--fg); text-decoration: underline; }

main { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1.25rem; }
.muted { color: var(--muted); }
.error { color: var(--danger); background: #fdecea; border: 1px solid #f5c2bd; padding: .5rem .75rem; border-radius: 4px; }

.login { max-width: 22rem; margin: 3rem auto; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1.5rem; }
.login form { display: flex; flex-direction: column; gap: .4rem; }
.login label { font-size: .9rem; color: var(--muted); margin-top: .5rem; }
input, button { font: inherit; }
input { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 4px; }
.login button[type=submit] { margin-top: 1rem; padding: .5rem; background: var(--accent); color: #fff; border: 0; border-radius: 4px; cursor: pointer; }

table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1rem; }
.card h2 { font-size: .85rem; font-weight: 600; color: var(--muted); margin: 0 0 .5rem; }
.card .big { font-size: 1.8rem; font-weight: 700; margin: 0 0 .5rem; }
.card p.muted { margin: .4rem 0 0; font-size: .85rem; }
progress { width: 100%; height: .6rem; accent-color: var(--accent); }
progress.over { accent-color: var(--danger); }
.grid { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); }
.grid th, .grid td { padding: .5rem .75rem; text-align: left; border-bottom: 1px solid var(--line); }
.grid .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Projektek (browse): folder tree, tiles, details. */
.crumbs a { color: var(--fg); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { color: var(--muted); font-weight: 400; }
.browse { display: grid; grid-template-columns: 15rem minmax(0, 1fr) 18rem; gap: 1rem; align-items: start; }
@media (max-width: 60rem) { .browse { grid-template-columns: 1fr; } }
.tree, .files, .details { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: .75rem; }
.tree ul { list-style: none; margin: 0; padding: 0 0 0 .9rem; }
.tree > ul { padding-left: 0; }
.tree li { margin: .15rem 0; overflow-wrap: anywhere; }
.tree a { color: var(--fg); text-decoration: none; }
.tree a::before { content: "\1F4C1\00A0"; }
.tree a.active { font-weight: 700; color: var(--accent); }
.tree .count { color: var(--muted); font-size: .8rem; }
.search { display: flex; gap: .5rem; margin-bottom: .75rem; }
.search input[type=search] { flex: 1; }
.search button, .copy { padding: .45rem .8rem; background: var(--accent); color: #fff; border: 0; border-radius: 4px; cursor: pointer; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: .6rem; }
.tile { display: flex; flex-direction: column; gap: .3rem; padding: .3rem; border: 1px solid var(--line); border-radius: 4px; color: var(--fg); text-decoration: none; }
.tile.sel { outline: 3px solid var(--accent); }
.tile img, .tile .icon { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--bg); border-radius: 3px; }
.icon { display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; background: var(--bg); }
.tile .name { font-size: .8rem; overflow-wrap: anywhere; }
.pager { margin: .75rem 0 0; }
.details .preview img, .details .preview .icon { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: var(--bg); border-radius: 4px; }
.details .pid { font-weight: 700; overflow-wrap: anywhere; }
.details dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .6rem; font-size: .85rem; margin: 0 0 .75rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }

/* Kulcsok */
.actions { margin: 0 0 1rem; }
.btn { display: inline-block; padding: .45rem .8rem; background: var(--accent); color: #fff; border: 0; border-radius: 4px; cursor: pointer; text-decoration: none; font: inherit; }
.keys tr.revoked td { text-decoration: line-through; color: var(--muted); }
.keys tr.revoked td span { text-decoration: none; display: inline-block; }
.form { max-width: 34rem; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1rem; }
.form label { display: block; margin: 0 0 .75rem; }
.form input[type=text] { display: block; width: 100%; padding: .4rem; margin-top: .25rem; font: inherit; }
.form fieldset { border: 1px solid var(--line); border-radius: 4px; margin: 0 0 .75rem; }
.form label.check { display: block; margin: .2rem 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.envlines { list-style: none; padding: 0; }
.envlines li { margin: .5rem 0; overflow-wrap: anywhere; }
