/* =============================================
   BONZUJ.ONLINE — hlavni stylesheet
   Tmavy motiv je vychozi, prepinac nahore vpravo
   prepina na svetly motiv (ulozi se do prohlizece).
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #17181a;
  --surface: #1f2023;
  --surface-2: #26272a;
  --border: #2c2d30;
  --text: #f2f1ee;
  --text-2: #9a9ca1;
  --text-3: #6f7176;
  --accent: #f0a13c;
  --accent-contrast: #1a1204;
  --danger: #e5605c;
  --danger-contrast: #2a0d0b;
  --success: #6bbf78;
  --success-contrast: #0c2210;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(0,0,0,.35);
}

:root[data-theme="light"] {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --border: #e6e2d9;
  --text: #232220;
  --text-2: #6b6860;
  --text-3: #8b877d;
  --accent: #c97a17;
  --accent-contrast: #ffffff;
  --danger: #b7382f;
  --danger-contrast: #ffffff;
  --success: #2f7d3d;
  --success-contrast: #ffffff;
  --shadow: 0 2px 14px rgba(0,0,0,.08);
}

html, body { height: 100%; }

body {
  font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 72px; /* misto pro spodni mobilni navigaci */
}

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

/* ---- HORNI LISTA ---- */
.top-bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.top-bar-inner {
  max-width: 720px; margin: 0 auto;
  padding: .9rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.brand { display: flex; align-items: center; gap: .5rem; font-weight: 500; font-size: 1.05rem; color: var(--text); }
.brand .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }

.desktop-nav { display: none; gap: .25rem; }
.desktop-nav a {
  color: var(--text-2); font-size: .9rem; padding: .5rem .8rem; border-radius: var(--radius);
}
.desktop-nav a:hover, .desktop-nav a.active { color: var(--text); background: var(--surface-2); }

.theme-toggle {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer;
}

/* ---- SPODNI MOBILNI NAVIGACE ---- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; justify-content: space-around;
  padding: .5rem 0 .6rem;
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--text-3); font-size: .68rem; padding: .2rem .6rem;
}
.bottom-nav a svg { width: 20px; height: 20px; }
.bottom-nav a.active { color: var(--accent); }

/* ---- HLAVNI OBSAH ---- */
main { max-width: 720px; margin: 1.5rem auto 2rem; padding: 0 1.25rem; }

.page-title { font-size: 1.3rem; font-weight: 500; margin-bottom: .3rem; }
.page-subtitle { color: var(--text-2); font-size: .92rem; margin-bottom: 1.5rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--accent); color: var(--accent-contrast);
  border: none; font-weight: 500; font-size: .92rem;
  padding: .7rem 1.3rem; border-radius: var(--radius); cursor: pointer;
}
.btn:active { transform: scale(.98); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: var(--danger-contrast); }
.btn-sm { padding: .45rem .8rem; font-size: .8rem; }
.btn-block { width: 100%; }

/* ---- BONZ KARTY ---- */
.bonzy-list { display: flex; flex-direction: column; gap: 1rem; }

.bonz-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}

.bonz-meta { display: flex; gap: .8rem; align-items: center; margin-bottom: .5rem; flex-wrap: wrap; font-size: .78rem; color: var(--text-3); }
.bonz-number { background: var(--surface-2); color: var(--text-2); padding: .15rem .5rem; border-radius: 6px; font-weight: 500; }

.bonz-text { font-size: .97rem; white-space: pre-wrap; word-break: break-word; margin-bottom: .7rem; }

.bonz-media { margin-bottom: .7rem; }
.bonz-media img, .bonz-media video { max-width: 100%; border-radius: 10px; display: block; }
.bonz-media audio { width: 100%; }

.bonz-footer { display: flex; align-items: center; gap: 1rem; }
.comment-toggle { background: none; border: none; color: var(--text-3); font-size: .82rem; cursor: pointer; display: flex; align-items: center; gap: .3rem; }
.comment-toggle:hover { color: var(--accent); }

.comments-box { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--border); display: none; }
.comments-box.open { display: block; }
.comment-item { padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .87rem; }
.comment-item:last-child { border-bottom: none; }
.comment-date { color: var(--text-3); font-size: .72rem; margin-top: .15rem; }

.comment-form { display: flex; gap: .5rem; margin-top: .7rem; }
.comment-form input { flex: 1; }

/* ---- FORMULARE ---- */
.form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem;
}
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: .4rem; }
.hint { font-size: .78rem; color: var(--text-3); margin-top: .3rem; }
.optional { font-size: .74rem; color: var(--text-3); font-weight: 400; }

input[type="text"], input[type="password"], textarea {
  width: 100%; padding: .65rem .8rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: .95rem;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 140px; }

.file-drop {
  border: 1px dashed var(--border); border-radius: 10px; padding: 1rem; text-align: center;
  font-size: .85rem; color: var(--text-3); cursor: pointer;
}
.file-drop.has-file { color: var(--text); border-color: var(--accent); }

.alert { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .9rem; }
.alert-success { background: rgba(107,191,120,.12); color: var(--success); border: 1px solid var(--success); }
.alert-error { background: rgba(229,96,92,.12); color: var(--danger); border: 1px solid var(--danger); }
.alert-info { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-3); }
.hidden-field { display: none; }
.hint-spaced { margin-top: 1rem; }

/* ---- KODEX ---- */
.kodex-list { list-style: none; counter-reset: kodex; display: flex; flex-direction: column; gap: .7rem; margin: 1.2rem 0; }
.kodex-list li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .9rem 1rem .9rem 3.2rem; position: relative; font-size: .93rem;
}
.kodex-list li::before {
  counter-increment: kodex; content: counter(kodex);
  position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-contrast);
  display: flex; align-items: center; justify-content: center; font-weight: 500; font-size: .82rem;
}

/* ---- ADMIN ---- */
.stats-row { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.stat-box { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .7rem 1rem; min-width: 90px; text-align: center; }
.stat-box .num { font-size: 1.4rem; font-weight: 500; }
.stat-box .lbl { font-size: .72rem; color: var(--text-3); }

.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.filter-btn {
  padding: .4rem .8rem; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font-size: .82rem; cursor: pointer;
}
.filter-btn.active { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }

.admin-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; margin-bottom: .8rem;
}
.admin-item-meta { display: flex; justify-content: space-between; gap: .5rem; font-size: .76rem; color: var(--text-3); margin-bottom: .5rem; flex-wrap: wrap; }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 6px; font-size: .72rem; font-weight: 500; }
.badge-pending { background: rgba(240,161,60,.15); color: var(--accent); }
.badge-approved { background: rgba(107,191,120,.15); color: var(--success); }
.badge-rejected { background: rgba(229,96,92,.15); color: var(--danger); }
.admin-actions { display: flex; gap: .5rem; margin-top: .7rem; flex-wrap: wrap; }

.login-wrap { max-width: 360px; margin: 3rem auto 0; }
.admin-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.admin-header-title { margin: 0; }
.admin-section-title { margin-top: 2rem; }

footer { text-align: center; padding: 2rem 1rem; color: var(--text-3); font-size: .78rem; }

@media (min-width: 720px) {
  .desktop-nav { display: flex; }
  .bottom-nav { display: none; }
  body { padding-bottom: 0; }
}
