:root { --fg:#19323B; --muted:#5f6d72; --line:#dde2e4; --bg:#F4F5F6; --surface:#ffffff; --soft:#F8FAF7;
        --accent:#22434C; --accent-dark:#19323B; --accent-2:#335E6E; --brand:#6E2739; --brand-2:#8C374A; --plum:#513A44;
        --ok:#1e7d45; --okbg:#e7f5ec; --err:#a32020; --errbg:#fbeaea; --warn:#8a5a00; --warnbg:#fff4d6; }
* { box-sizing: border-box; }
body { margin:0; font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color:var(--fg); background:var(--bg); }
.envbar { background:var(--warnbg); color:var(--warn); text-align:center; font-size:12px; padding:2px; letter-spacing:.05em; }
header.top { display:flex; gap:1.5rem; align-items:center; padding:.7rem 1.4rem; background:var(--accent); color:#fff; border-bottom:3px solid var(--brand); }
.brand { font-family: Cardo, Georgia, "Times New Roman", serif; font-weight:700; font-size:1.15rem; color:#fff; text-decoration:none; letter-spacing:.01em; }
.brand .amp { color:#e8b9c4; } .brand .sub { font-family:Inter, system-ui, sans-serif; font-size:.75rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase; margin-left:.5rem; padding:.1rem .45rem; border-radius:3px; background:var(--brand); color:#fff; vertical-align:middle; }
nav { display:flex; gap:1rem; flex:1; }
nav a { color:#e4ecee; text-decoration:none; padding:.2rem 0; border-bottom:2px solid transparent; }
nav a:hover { color:#fff; border-bottom-color:var(--brand-2); }
.logout { display:flex; gap:.6rem; align-items:center; margin-left:auto; }
.who { color:#c9d6d9; font-size:13px; }
header.top button.link { color:#fff; }
main { max-width:1100px; margin:1.5rem auto; padding:0 1.2rem; }
h1 { font-family: Cardo, Georgia, "Times New Roman", serif; font-size:1.6rem; color:var(--accent); margin:.2rem 0 1rem; }
h1::after { content:''; display:block; width:48px; height:3px; background:var(--brand); margin-top:.35rem; border-radius:2px; } h2 { font-size:1.05rem; margin:0 0 .8rem; }
.card { background:#fff; border:1px solid var(--line); border-radius:8px; padding:1.2rem; margin-bottom:1.2rem; }
.card.narrow { max-width:420px; margin:3rem auto; }
label { display:flex; flex-direction:column; gap:.25rem; font-size:13px; color:var(--muted); margin-bottom:.8rem; }
input, select { font:inherit; color:var(--fg); padding:.45rem .55rem; border:1px solid var(--line); border-radius:6px; background:#fff; }
input:focus, select:focus { outline:2px solid var(--accent); outline-offset:0; }
button { font:inherit; padding:.45rem .9rem; border:0; border-radius:6px; background:var(--accent); color:#fff; cursor:pointer; }
button:hover { background:var(--accent-dark); }
a { color:var(--accent-2); }
button.small { padding:.2rem .55rem; font-size:12px; background:var(--soft); color:var(--accent); border:1px solid var(--line); }
button.small:hover { background:#e9eeef; }
button.link { background:none; color:var(--accent); padding:0; }
form.inline { display:flex; flex-wrap:wrap; gap:.8rem; align-items:flex-end; }
form.inline label { margin-bottom:0; } form.inline .grow { flex:1; min-width:220px; }
.actions { display:flex; gap:.4rem; } .actions form { margin:0; }
table { width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
th, td { text-align:left; padding:.5rem .7rem; border-bottom:1px solid var(--line); vertical-align:top; }
th { font-size:12px; color:var(--accent); font-weight:600; background:var(--soft); text-transform:uppercase; letter-spacing:.03em; }
table.dense td { padding:.3rem .6rem; font-size:13px; }
tr.muted td { color:var(--muted); }
tr.r-fail td, tr.r-denied td { background:var(--errbg); }
.msg { padding:.6rem .8rem; border-radius:6px; } .msg.ok { background:var(--okbg); color:var(--ok); } .msg.err { background:var(--errbg); color:var(--err); }
.hint { color:var(--muted); font-size:13px; } .small { font-size:12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break:break-all; }
.tiles { display:flex; gap:1rem; margin-bottom:1rem; }
.tile { display:flex; flex-direction:column; background:#fff; border:1px solid var(--line); border-radius:8px; padding:1rem 1.4rem; text-decoration:none; color:var(--fg); }
.tile .num { font-size:1.8rem; font-weight:700; color:var(--accent); }
.tile:hover { border-color:var(--accent-2); }
/* 2. fázis: állapotok, ideiglenes nyers tárolás (SPEC 7a.) */
.st { font-size:12px; padding:.1rem .45rem; border-radius:10px; background:#eef1f6; white-space:nowrap; }
.st-ok { background:var(--okbg); color:var(--ok); }
.st-new, .st-draft { background:var(--warnbg); color:var(--warn); }
.st-auth_error, .st-signature_error, .st-relation_error, .st-forbidden, .st-customer_error, .st-unknown_error { background:var(--errbg); color:var(--err); }
.rawbar { background:#b3261e; color:#fff; text-align:center; padding:.45rem; font-weight:600; font-size:14px; }
.rawbar a { color:#fff; }
nav a.rawlink { color:#ffd2cc; font-weight:600; }
.rawbadge { font-size:11px; font-weight:700; color:#fff; background:#b3261e; padding:.05rem .35rem; border-radius:4px; margin-left:.3rem; }
.card.raw { border:2px dashed #b3261e; background:#fff8f7; }
.rawwarn { background:#fde2df; color:#8c1d18; border-left:4px solid #b3261e; padding:.6rem .8rem; font-weight:600; border-radius:4px; }
label.rawfield { color:#8c1d18; font-weight:600; }
label.rawfield input { border:2px solid #b3261e; background:#fff8f7; }
.rawtag { font-weight:400; font-size:12px; }
label.check { flex-direction:row; align-items:flex-start; gap:.5rem; color:var(--fg); }
.secret { font-size:1.15rem; background:#fff; border:1px solid var(--line); padding:.5rem .7rem; border-radius:6px; display:inline-block; user-select:all; }
dl.kv { display:grid; grid-template-columns:max-content 1fr; gap:.35rem 1rem; margin:0 0 .8rem; }
dl.kv dt { color:var(--muted); font-size:13px; } dl.kv dd { margin:0; }
.note { background:#eef3fb; color:#24426e; border-left:4px solid var(--accent); padding:.5rem .8rem; border-radius:4px; font-size:13px; }
button.danger { background:#b3261e; color:#fff; border:0; }
button.danger:hover { background:#8f1d17; }
/* köteg-nézet */
.filters { display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; margin-bottom:1rem; }
.filters input[type=search] { min-width:260px; }
.chips { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:.6rem; width:100%; }
.chip { font-size:13px; padding:.2rem .6rem; border:1px solid var(--line); border-radius:14px; background:#fff; color:var(--fg); text-decoration:none; }
.chip.active { background:var(--accent); color:#fff; border-color:var(--accent); }
.chip .cnt { font-size:11px; opacity:.75; margin-left:.2rem; }
td.sel, th.sel { width:2rem; }
.batchbar { display:flex; gap:.8rem; align-items:flex-end; flex-wrap:wrap; margin:.8rem 0 1.4rem; }
.batchbar label { margin:0; }
.progress { display:flex; height:10px; width:100%; min-width:160px; border-radius:5px; overflow:hidden; background:#eef1f6; }
.seg { display:block; height:100%; } .seg-done { background:var(--ok); } .seg-in_progress { background:#d9a400; } .seg-error { background:var(--err); } .seg-todo { background:#c9ced8; }
.legend { display:flex; gap:.8rem; margin-top:.3rem; color:var(--muted); }
.lg::before { content:''; display:inline-block; width:8px; height:8px; border-radius:2px; margin-right:.3rem; }
.lg-done::before { background:var(--ok); } .lg-in_progress::before { background:#d9a400; } .lg-error::before { background:var(--err); } .lg-todo::before { background:#c9ced8; }
.w0 { width:0%; }
.w5 { width:5%; }
.w10 { width:10%; }
.w15 { width:15%; }
.w20 { width:20%; }
.w25 { width:25%; }
.w30 { width:30%; }
.w35 { width:35%; }
.w40 { width:40%; }
.w45 { width:45%; }
.w50 { width:50%; }
.w55 { width:55%; }
.w60 { width:60%; }
.w65 { width:65%; }
.w70 { width:70%; }
.w75 { width:75%; }
.w80 { width:80%; }
.w85 { width:85%; }
.w90 { width:90%; }
.w95 { width:95%; }
.w100 { width:100%; }
.tiles { flex-wrap:wrap; } .tile-err { border-color:var(--err); color:var(--err); }
.card.danger-zone { border-color:#e3b4b0; }

/* Leírás oldal */
.doc { max-width:820px; } .doc h2 { font-family: Cardo, Georgia, serif; color:var(--accent); font-size:1.25rem; margin-top:1.6rem; }
.doc p, .doc li { line-height:1.6; } .doc .tag { font-size:11px; font-weight:700; padding:.08rem .4rem; border-radius:3px; margin-left:.4rem; vertical-align:middle; }
.tag-done { background:var(--okbg); color:var(--ok); } .tag-plan { background:#eef1f6; color:var(--accent-2); }
.toc { background:var(--soft); border:1px solid var(--line); border-left:4px solid var(--brand); padding:.8rem 1.2rem; border-radius:6px; }
.chip.active { background:var(--accent); border-color:var(--accent); }
