/* Hobluj — základní vizuální systém.
   Princip: obsah je rozhraní (à la TikTok web) — tmavý základ, jedna akcentová
   barva, minimum chromu, velké mediální prvky, žádné bannery. */

/* Výchozí: SVĚTLÉ téma (à la TikTok web). Tmavé = <html data-theme="dark">,
   přepíná se v Nastavení, ukládá do localStorage (hobluj_theme). */
:root {
  --bg: #ffffff;
  --bg-raised: #f5f5f7;
  --line: #e4e4ea;
  --text: #16161a;
  --text-muted: #75757f;
  --accent: #ff4d2e;       /* energie koncertu — jediný akcent */
  --accent-press: #e03c1f;
  --ok: #1f9d55;
  --err: #d8372a;
  --msg-err-bg: #fdecea;  --msg-err-line: #f3c7c2; --msg-err-fg: #a1281f;
  --msg-ok-bg: #e9f7ee;   --msg-ok-line: #bfe6cd;  --msg-ok-fg: #16884a;
  --msg-info-bg: #eaf2fc; --msg-info-line: #cfe0f5;--msg-info-fg: #1d4f85;
  --pill-napad-bg: #efe7fb;  --pill-napad-fg: #6c3fb5;
  --pill-delame-bg: #fdf3d7; --pill-delame-fg: #9a6b00;
  --pill-hotova-bg: #e2f6e9; --pill-hotova-fg: #1f7a43;
  --sans: "Helvetica Neue", Arial, system-ui, sans-serif;
  --radius: 14px;
  --maxw: 680px;
}

:root[data-theme="dark"] {
  --bg: #0e0e11;
  --bg-raised: #17171c;
  --line: #26262e;
  --text: #f5f5f7;
  --text-muted: #9a9aa5;
  --ok: #3ecf6a;
  --err: #ff5c5c;
  --msg-err-bg: #2a1513;  --msg-err-line: #5c2a24; --msg-err-fg: #ff5c5c;
  --msg-ok-bg: #12241a;   --msg-ok-line: #22513a;  --msg-ok-fg: #3ecf6a;
  --msg-info-bg: #14202e; --msg-info-line: #27415c;--msg-info-fg: #8fc1ff;
  --pill-napad-bg: #2a2435;  --pill-napad-fg: #c9a7ff;
  --pill-delame-bg: #332a14; --pill-delame-fg: #ffc94d;
  --pill-hotova-bg: #12241a; --pill-hotova-fg: #3ecf6a;
}

* { box-sizing: border-box; }
.ico-svg { vertical-align: -3px; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }

/* ---------- Top bar (úzká navigace) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 22px;
  padding: 14px 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .logo {
  font-weight: 900; font-size: 20px; letter-spacing: .04em;
  color: var(--text);
}
.topbar .logo em { color: var(--accent); font-style: normal; }
.topbar nav { display: flex; gap: 18px; flex: 1; }
.topbar nav a { color: var(--text-muted); font-weight: 600; font-size: 15px; }
.topbar nav a:hover, .topbar nav a.active { color: var(--text); }
.topbar .auth-slot a { font-weight: 700; font-size: 15px; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 28px 20px 80px; }
.wrap-wide { max-width: 1040px; }

h1 { font-size: 32px; line-height: 1.15; margin: 0 0 10px; font-weight: 800; }
h2 { font-size: 21px; margin: 34px 0 12px; font-weight: 700; }
.muted { color: var(--text-muted); }

/* ---------- Tlačítka ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  font-family: var(--sans); font-weight: 700; font-size: 15px;
  padding: 13px 22px; border-radius: var(--radius);
  background: var(--bg-raised); color: var(--text);
  border: 1px solid var(--line);
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--text-muted); }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-press); border-color: var(--accent-press); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Karty ---------- */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

/* ---------- Formuláře ---------- */
.fld { margin-bottom: 16px; }
.fld label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 7px; }
.fld input, .fld textarea, .fld select {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-family: var(--sans); font-size: 15px;
  outline: none; transition: border-color .15s;
}
.fld input:focus, .fld textarea:focus, .fld select:focus { border-color: var(--accent); }

/* ---------- Zprávy ---------- */
.msg { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; line-height: 1.5; }
.msg.err  { background: var(--msg-err-bg); border: 1px solid var(--msg-err-line); color: var(--msg-err-fg); }
.msg.ok   { background: var(--msg-ok-bg); border: 1px solid var(--msg-ok-line); color: var(--msg-ok-fg); }
.msg.info { background: var(--msg-info-bg); border: 1px solid var(--msg-info-line); color: var(--msg-info-fg); }
.hide { display: none; }

/* ---------- Chips (žánry, město) ---------- */
.chip {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--bg-raised); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--text-muted);
}

/* ---------- Patička ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 26px 20px; text-align: center;
  color: var(--text-muted); font-size: 13px;
}

/* ---------- Layout s levým panelem (à la TikTok web) ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  padding: 18px 12px 14px;
  box-sizing: border-box;
}
.sidebar .logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 20px; letter-spacing: .04em;
  padding: 4px 12px 20px; color: var(--text);
}
.sidebar .logo:hover { color: var(--accent); }
.logo-badge { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: block; }
.sidebar .logo em { color: var(--accent); font-style: normal; }
.sidebar .logo .mini { display: none; }
.snav { display: flex; flex-direction: column; gap: 2px; }
.snav a {
  display: flex; align-items: center; gap: 13px;
  padding: 12px; border-radius: 12px;
  font-weight: 700; font-size: 15.5px; color: var(--text);
}
.snav a .ico { font-size: 20px; width: 24px; text-align: center; flex-shrink: 0; }
.snav a:hover { background: var(--bg-raised); color: var(--text); }
.snav a.active { color: var(--accent); }
.snav a .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snav a.sub { padding-left: 26px; font-size: 14.5px; }
@media (max-width: 860px) { .snav a.sub { padding-left: 6px; } }
.sidebar .spacer { flex: 1; }
.sidebar .userbox {
  padding: 8px 12px; font-size: 12.5px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar .logout-btn { margin: 6px 4px 0; }
.content { flex: 1; min-width: 0; }
.content .wrap { padding-top: 34px; }

@media (max-width: 860px) {
  .sidebar { width: 64px; padding: 14px 8px; }
  .sidebar .logo { padding: 4px 6px 16px; justify-content: center; }
  .sidebar .logo .full { display: none; }
  .snav a { justify-content: center; padding: 12px 6px; }
  .snav a .lbl, .sidebar .userbox { display: none; }
  .sidebar .logout-btn { padding: 9px 6px; }
  .sidebar .logout-btn .lbl { display: none; }
}

/* ---------- Dílna: seznamy a řádky ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
  cursor: pointer; transition: border-color .15s;
}
.item-row:hover { border-color: var(--text-muted); }
.item-row .grow { flex: 1; min-width: 0; }
.item-row .title { font-weight: 700; font-size: 16px; }
.item-row .sub { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.item-row.hl { border-color: var(--accent); }
.item-row.hl .title::after { content: " •"; color: var(--accent); }

/* ---------- Dlaždice kapel + banner ---------- */
.band-tile {
  position: relative; display: block; height: 128px;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-raised);
  transition: border-color .15s;
}
.band-tile:hover { border-color: var(--text-muted); }
.band-tile .bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.band-tile .ovl { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,14,17,.1) 30%, rgba(14,14,17,.86)); }
.band-tile .initial {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 52px; font-weight: 900; color: rgba(245,245,247,.14); letter-spacing: .05em;
}
.band-tile .info { position: absolute; left: 16px; right: 16px; bottom: 12px; }
/* dlaždice má vždy tmavý overlay → text je bílý v obou tématech */
.band-tile .name { font-size: 20px; font-weight: 800; color: #fff; }
.band-tile .role { font-size: 12.5px; color: rgba(255,255,255,.75); margin-top: 1px; }

.band-banner {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-raised);
  margin-bottom: 14px; min-height: 110px; display: flex; align-items: flex-end;
}
.band-banner .bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.band-banner .ovl { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,14,17,.15) 20%, rgba(14,14,17,.88)); }
.band-banner .inner { position: relative; width: 100%; padding: 14px 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.band-banner h1 { margin: 0; flex: 1; min-width: 0; color: #fff; }

/* ---------- Stavy písní ---------- */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill-napad  { background: var(--pill-napad-bg); color: var(--pill-napad-fg); }
.pill-delame { background: var(--pill-delame-bg); color: var(--pill-delame-fg); }
.pill-hotova { background: var(--pill-hotova-bg); color: var(--pill-hotova-fg); }

/* ---------- Záložky ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0; }
.tabs button {
  background: none; border: 0; cursor: pointer; font-family: var(--sans);
  color: var(--text-muted); font-weight: 700; font-size: 15px;
  padding: 10px 14px; border-bottom: 2px solid transparent;
}
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- Části a příspěvky ---------- */
.part-block { margin-bottom: 22px; }
.part-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.part-head h3 { margin: 0; font-size: 16px; flex: 1; }
.post {
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 8px;
}
.post .meta { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.post .meta strong { color: var(--text); }
.post p { margin: 0; font-size: 14.5px; white-space: pre-wrap; }
.post audio { width: 100%; margin-top: 8px; height: 36px; }
.composer { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.composer textarea { min-height: 42px; resize: vertical; }
.composer .row2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.file-chip { font-size: 13px; color: var(--accent); font-weight: 600; }

/* ---------- Drobná tlačítka ---------- */
.btn-sm { padding: 7px 14px; font-size: 13.5px; border-radius: 10px; }
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--text-muted); font-size: 15px; padding: 4px 6px; }
.icon-btn:hover { color: var(--text); }

/* ---------- Historie verzí ---------- */
.ver-row { padding: 10px 12px; border-left: 2px solid var(--line); margin-bottom: 6px; cursor: pointer; }
.ver-row:hover { border-left-color: var(--accent); }
.ver-row.current { border-left-color: var(--ok); }
.ver-row .meta { font-size: 12.5px; color: var(--text-muted); }
pre.lyrics { white-space: pre-wrap; font-family: var(--sans); font-size: 15.5px; line-height: 1.7; margin: 0; }

/* ---------- Tisk (press kit) ---------- */
@media print {
  body { background: #fff; color: #111; }
  .topbar, .footer, .no-print { display: none !important; }
}
