/* Renolink – rámec aplikace (navigace, seznam, přihlášení). Barvy a písmo stejné jako kalkulačky v public/calc. */
:root {
  --bg: #f3f5f2; --surface: #ffffff; --fg: #17201b; --muted: #56635b; --line: #d3dad4;
  --accent: #0d6a4b; --accent-fg: #ffffff; --accent-soft: #e1efe7; --danger: #b3261e;
  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111613; --surface: #18201b; --fg: #e4ebe6; --muted: #9aa89f; --line: #2b3530; --accent: #55c495; --accent-fg: #0b1a12; --accent-soft: #1b3127; --danger: #ff7a70; color-scheme: dark; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 15.5px; line-height: 1.5; }
a { color: var(--accent); }

.topnav { display: flex; align-items: center; gap: 18px; padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.topnav .brand { font-family: var(--f-display); font-weight: 800; font-size: 20px; color: var(--fg); text-decoration: none; letter-spacing: -.01em; }
.topnav .brand b { color: var(--accent); }
.topnav a { text-decoration: none; font-weight: 600; }
.topnav .spacer { flex: 1; }
.topnav .who { color: var(--muted); font-size: 13.5px; }
.topnav form { margin: 0; }

.btn, .topnav button { font: inherit; font-weight: 600; font-size: 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); padding: 8px 13px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn.small, .topnav button { padding: 5px 10px; font-size: 13px; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }

.flashes { max-width: 1160px; margin: 12px auto 0; padding-inline: 18px; }
.flash { padding: 9px 13px; border-radius: 8px; font-size: 14px; }
.flash.ok { background: var(--accent-soft); }
.flash.err { background: rgba(179, 38, 30, .12); color: var(--danger); }

.page { max-width: 1160px; margin: 0 auto; padding: 22px 18px 60px; }
.page h1 { font-family: var(--f-display); font-stretch: 85%; font-weight: 800; font-size: clamp(28px, 4vw, 40px); margin: 0 0 4px; }
.page .lead { color: var(--muted); margin: 0 0 18px; max-width: 70ch; }
.new-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 22px; }
.new-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.new-card h2 { font-family: var(--f-display); font-size: 17px; margin: 0 0 4px; }
.new-card p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.new-card .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.new-card form { margin: 0; }

.list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14.5px; }
.list th { text-align: left; font-family: var(--f-display); font-weight: 650; font-size: 12.5px; background: var(--accent-soft); padding: 8px 10px; }
.list td { padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.list td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list .name a { font-weight: 700; text-decoration: none; color: var(--fg); }
.list .muted, .muted { color: var(--muted); font-size: 13px; }
.list form { margin: 0; display: inline; }
.tw { overflow-x: auto; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: 24px; text-align: center; color: var(--muted); }

.chip { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 4px; font-family: var(--f-display); font-weight: 800; font-size: 13.5px; }
.cA { background: #1a7f3c; color: #fff; } .cB { background: #4ea734; color: #fff; } .cC { background: #b8d12e; color: #1b2410; } .cD { background: #f2cf17; color: #2a2300; }
.cE { background: #f4a428; color: #2b1800; } .cF { background: #e5641f; color: #fff; } .cG { background: #c51f2a; color: #fff; }
.zeb { font-family: var(--f-display); font-weight: 800; font-size: 11px; color: #1a7f3c; border: 1px solid #1a7f3c; border-radius: 3px; padding: 0 4px; margin-left: 4px; }

.editbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 1200px; margin: 10px auto 0; padding-inline: 18px; font-size: 14px; }
.editbar .status { color: var(--muted); }
.editbar .status[data-state="ok"] { color: var(--accent); }
.editbar .status[data-state="error"] { color: var(--danger); font-weight: 700; }

.auth { max-width: 380px; margin: 9vh auto; padding: 0 18px; }
.auth .card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 12px; }
.auth h1 { font-family: var(--f-display); font-weight: 800; font-size: 28px; margin: 0; }
.auth h1 b { color: var(--accent); }
.auth label { display: grid; gap: 4px; font-size: 13.5px; color: var(--muted); }
.auth input[type=email], .auth input[type=password] { font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); }
.auth input[type=submit] { font: inherit; font-weight: 700; background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 8px; padding: 10px; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
