/* Heimdall – rozhraní pro produkci ve stylu gen live (černá, hairlines, červená jen jako signál, radius 0). */
@font-face { font-family: 'Rift'; src: url(/fonts/Rift-Demi.otf) format('opentype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Rift'; src: url(/fonts/Rift-Bold.otf) format('opentype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Bely Display'; src: url(/fonts/BelyDisplay-Regular.otf) format('opentype'); font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url(/fonts/Nunito-Variable.ttf) format('truetype'); font-weight: 200 1000; font-display: swap; }

:root {
  --bg: #000; --surface: #0a0a0a; --surface-2: #141414; --line: #262626; --line-2: #3a3a3a;
  --ink: #F2F3F4; --muted: #8c8c8c; --faint: #5a5a5a;
  --red: #FF0033; --red-press: #D90029; --red-wash: rgba(255, 0, 51, .12);
  --green: #2bd96b; --amber: #ffb020;
  --label: 'Rift', 'Arial Narrow', sans-serif; --head: 'Bely Display', Georgia, serif; --body: 'Nunito Sans', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.label { font-family: var(--label); font-weight: 600; text-transform: uppercase; letter-spacing: .18em; font-size: 12px; color: var(--muted); }
h1, h2, .head { font-family: var(--head); font-weight: 400; text-transform: lowercase; letter-spacing: -.01em; line-height: .95; margin: 0; }
h1 { font-size: 34px; } h2 { font-size: 24px; }
.muted { color: var(--muted); }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); vertical-align: middle; }
.dot.ok { background: var(--green); } .dot.warn { background: var(--amber); } .dot.off { background: var(--faint); }

/* tlačítka */
button, .btn {
  font: 600 12px/1 var(--label); text-transform: uppercase; letter-spacing: .14em; color: var(--ink);
  background: transparent; border: 1px solid var(--line-2); border-radius: 0; padding: 9px 12px; cursor: pointer;
  transition: color 120ms var(--ease), border-color 120ms var(--ease), background 120ms var(--ease); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
button:hover, .btn:hover { border-color: var(--ink); }
button:active, .btn:active { transform: translateY(1px); }
button.primary, .btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
button.primary:hover, .btn.primary:hover { background: var(--red-press); border-color: var(--red-press); }
button.ghost { border-color: transparent; color: var(--muted); padding: 6px 8px; }
button.ghost:hover { color: var(--ink); border-color: var(--line-2); }
button.danger:hover { color: var(--red); border-color: var(--red); }
button:disabled { opacity: .35; cursor: default; transform: none; }
button.big, .btn.big { font-size: 15px; padding: 14px 18px; }
button.on { background: var(--ink); color: #000; border-color: var(--ink); }

input, textarea, select {
  font: 15px/1.4 var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 0; padding: 8px 10px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); }
textarea { resize: vertical; min-height: 64px; }
label.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 6px 0; }
label.check input { width: auto; margin-top: 3px; accent-color: var(--red); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* horní lišta */
.topbar { display: flex; align-items: center; gap: 18px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: #000; position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 26px; height: 26px; }
.brand span { font: 700 15px/1 var(--label); letter-spacing: .22em; text-transform: uppercase; }
.topbar .spacer { flex: 1; }

/* karty a tabulky */
.card { background: var(--surface); border: 1px solid var(--line); padding: 20px; }
.card.active { border-top: 2px solid var(--red); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font: 600 11px/1 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); }
td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }

.tag { display: inline-block; font: 600 10px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; padding: 4px 6px 3px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.tag.red { border-color: var(--red); color: var(--red); }
.tag.solid { background: var(--red); border-color: var(--red); color: #fff; }
.tag.ink { background: var(--ink); color: #000; border-color: var(--ink); }
.tag.green { border-color: var(--green); color: var(--green); }
.tag.amber { border-color: var(--amber); color: var(--amber); }

/* modal */
dialog { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 0; padding: 0; max-width: min(860px, 94vw); width: 100%; }
dialog::backdrop { background: rgba(0, 0, 0, .72); }
dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
dialog .dlg-body { padding: 20px; max-height: 76vh; overflow: auto; }

.copy { display: flex; gap: 6px; align-items: center; }
.copy input { font: 12px/1.3 ui-monospace, Menlo, monospace; color: var(--muted); }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #000; padding: 10px 16px; font: 600 12px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; z-index: 100; animation: toast 2.6s var(--ease) forwards; }
.toast.err { background: var(--red); color: #fff; }
.toast.undo { display: flex; gap: 14px; align-items: center; animation-duration: 6.2s; padding: 6px 6px 6px 16px; }
.toast.undo button { background: #000; color: #fff; border-color: #000; padding: 8px 12px; }
@keyframes toast { 0% { opacity: 0; } 8%, 85% { opacity: 1; } 100% { opacity: 0; } }

.conn { font: 600 11px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.empty { color: var(--faint); padding: 28px 12px; text-align: center; font-size: 14px; }

@media (max-width: 720px) {
  .topbar { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
}
