/* admin/assets/admin.css — ručně psané, značkové barvy webu.
   Žádný build krok (SCSS) pro adminku záměrně — viz plan.md.

   Stavební kameny stránky (stejné všude, ať je adminka jednotná):
     .page-head        nadpis stránky + krátký popis + akce vpravo
     .card             bílý blok přes celou šířku obsahu (hlavička + tělo)
     .admin-table      tabulka v .card (obalit .table-wrap kvůli mobilu)
     .field-group      popisek + pole, .field-row = 2 pole vedle sebe
     .switch           přepínač zapnuto/vypnuto
     .modal            <dialog> pro rychlé přidání/úpravu
     .form-actions--sticky  lišta s tlačítkem Uložit přilepená dole */

:root {
  --brand: #ff7400;
  --brand-dark: #d05500;
  --brand-tint: #fff5ec;
  --ink: #111111;
  --body: #4a4a4a;
  --muted: #777777;
  --line: #efefef;
  --line-strong: #e2e2e2;
  --surface: #ffffff;
  --bg: #fbf7f2;
  --danger: #c0392b;
  --danger-tint: #fff0f0;
  --success: #1e8a5f;
  --success-tint: #eafff7;

  --blue: #3a86ff;   --blue-tint: #eef4ff;   --blue-dark: #0e5e8a;
  --green: #06d6a0;  --green-tint: #eafff7;  --green-dark: #1e8a5f;
  --pink: #ff5d8f;   --pink-tint: #fff0f6;   --pink-dark: #c05580;
  --yellow: #ffd166; --yellow-tint: #fffae6; --yellow-dark: #9a6b00;
  --violet: #9b6bff; --violet-tint: #f2ecff; --violet-dark: #5a3a8a;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .04);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, .18);
  --topbar-h: 60px;
  --content-w: 1040px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.has-modal { overflow: hidden; }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); text-decoration: underline; }

h1, h2, h3 { color: var(--ink); line-height: 1.25; }

:focus-visible { outline: 3px solid rgba(255, 116, 0, .35); outline-offset: 2px; }

/* =========================================================
   Přihlašovací stránka
   ========================================================= */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--brand-tint), var(--pink-tint) 55%, var(--yellow-tint));
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .13);
  padding: 40px 32px;
}
.login-card__logo { display: block; height: 52px; margin: 0 auto 20px; }
.login-card h1 { font-size: 22px; font-weight: 700; text-align: center; margin: 0 0 24px; }
.login-card .field-group input { padding: 12px 14px; }
.turnstile-wrap { margin-bottom: 16px; min-height: 65px; }

.btn-submit {
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.btn-submit:hover { background: var(--brand-dark); }

.form-error {
  background: var(--danger-tint);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* =========================================================
   Horní lišta adminky
   ========================================================= */
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--topbar-h);
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
}
.admin-topbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--pink), var(--blue), var(--green), var(--yellow));
}
.admin-topbar__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.admin-topbar__brand:hover { color: var(--ink); text-decoration: none; }
.admin-topbar__logo { height: 34px; width: auto; }
.admin-topbar__user { display: flex; align-items: center; gap: 14px; margin-left: auto; font-size: 14px; color: var(--muted); }
.admin-topbar__site { font-weight: 600; font-size: 14px; }
.admin-topbar__name { font-weight: 600; color: var(--ink); }

.admin-topbar__menu {
  display: none;
  flex-direction: column; justify-content: center; gap: 4px;
  width: 40px; height: 40px; padding: 0 9px;
  background: none; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer;
}
.admin-topbar__menu span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

.btn-logout {
  background: none;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.btn-logout:hover { border-color: var(--brand); color: var(--brand); }

/* =========================================================
   Layout: boční menu + obsah
   ========================================================= */
.admin-shell { display: flex; align-items: stretch; min-height: calc(100vh - var(--topbar-h)); }

.admin-sidebar {
  position: sticky;
  top: var(--topbar-h);
  flex: 0 0 248px;
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 18px 0 24px;
}
.admin-sidebar__group { margin-bottom: 14px; }
.admin-sidebar__group-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); padding: 0 20px; margin-bottom: 4px;
}
.admin-sidebar__link {
  display: flex; align-items: center; gap: 11px;
  margin: 1px 10px; padding: 6px 10px;
  font-size: 14px; font-weight: 500; color: var(--body);
  border-radius: var(--radius-sm);
  transition: background .15s ease, color .15s ease;
}
.admin-sidebar__link:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.admin-sidebar__icon-wrap {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--bg); color: var(--muted);
}
.admin-sidebar__icon-svg { width: 15px; height: 15px; }
.admin-sidebar__group[data-accent="brand"] .admin-sidebar__icon-wrap { background: var(--brand-tint); color: var(--brand-dark); }
.admin-sidebar__group[data-accent="blue"] .admin-sidebar__icon-wrap { background: var(--blue-tint); color: var(--blue-dark); }
.admin-sidebar__group[data-accent="green"] .admin-sidebar__icon-wrap { background: var(--green-tint); color: var(--green-dark); }
.admin-sidebar__group[data-accent="pink"] .admin-sidebar__icon-wrap { background: var(--pink-tint); color: var(--pink-dark); }
.admin-sidebar__group[data-accent="yellow"] .admin-sidebar__icon-wrap { background: var(--yellow-tint); color: var(--yellow-dark); }
.admin-sidebar__group[data-accent="violet"] .admin-sidebar__icon-wrap { background: var(--violet-tint); color: var(--violet-dark); }
.admin-sidebar__group[data-accent="ink"] .admin-sidebar__icon-wrap { background: var(--line); color: var(--ink); }
.admin-sidebar__link.is-active { background: var(--brand-tint); color: var(--brand-dark); font-weight: 700; }
.admin-sidebar__link.is-active .admin-sidebar__icon-wrap { background: var(--brand); color: #fff; }

.admin-sidebar-backdrop { display: none; }

.admin-main { flex: 1 1 auto; min-width: 0; padding: 32px 36px 48px; }
.admin-main__inner { max-width: var(--content-w); margin: 0 auto; }

/* =========================================================
   Hlavička stránky
   ========================================================= */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  margin-bottom: 24px;
}
.page-head h1 { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.page-head__lead { margin: 6px 0 0; max-width: 680px; color: var(--muted); font-size: 14px; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }
.back-link { display: inline-block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.back-link:hover { color: var(--brand-dark); }

/* =========================================================
   Karty
   ========================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.card__head { padding: 18px 24px 0; }
.card__head h2 { font-size: 17px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 8px; }
.card__head p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.card__head--row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.card__body { padding: 18px 24px 22px; }
.card__head + .card__body { padding-top: 16px; }
.card__head--row + .card__body { padding-top: 18px; }
.card--sticky { position: sticky; top: calc(var(--topbar-h) + 20px); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.split .card { margin-bottom: 20px; }

.empty-state { margin: 0; padding: 12px 0; text-align: center; color: var(--muted); }

/* =========================================================
   Flash zprávy
   ========================================================= */
.admin-flash {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  border-radius: var(--radius-sm);
  padding: 13px 44px 13px 16px;
  font-size: 14px; font-weight: 500;
  margin-bottom: 20px;
  transition: opacity .4s ease, transform .4s ease;
}
.admin-flash::before { font-size: 16px; }
.admin-flash--success { background: var(--success-tint); color: var(--success); border: 1px solid #c6f1df; }
.admin-flash--success::before { content: "✓"; font-weight: 700; }
.admin-flash--error { background: var(--danger-tint); color: var(--danger); border: 1px solid #f6d2d2; }
.admin-flash--error::before { content: "⚠"; }
.admin-flash.is-leaving { opacity: 0; transform: translateY(-6px); }
.admin-flash__close {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: 0; background: none; border-radius: 6px;
  font-size: 20px; line-height: 1; color: inherit; opacity: .6; cursor: pointer;
}
.admin-flash__close:hover { opacity: 1; background: rgba(0, 0, 0, .05); }

/* =========================================================
   Tlačítka
   ========================================================= */
.btn-primary, .btn-secondary, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn-primary:hover, .btn-secondary:hover, .btn-danger:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(255, 116, 0, .25); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-danger { background: #fff; border-color: #f3c9c9; color: var(--danger); }
.btn-danger:hover { background: var(--danger-tint); color: var(--danger); }
.btn-sm { font-size: 13px; padding: 6px 12px; border-radius: 8px; }
button:disabled { opacity: .6; cursor: progress; }

/* =========================================================
   Tabulky
   ========================================================= */
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.admin-table th, .admin-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.admin-table th:first-child, .admin-table td:first-child { padding-left: 24px; }
.admin-table th:last-child, .admin-table td:last-child { padding-right: 24px; }
.admin-table thead th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #fcfbf9; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover td { background: #fffaf5; }
.admin-table td strong { color: var(--ink); font-weight: 600; }
.admin-table .is-narrow { width: 1%; white-space: nowrap; }
.admin-table td.is-actions { text-align: right; white-space: nowrap; width: 1%; }
.admin-table td.is-actions > * { margin-left: 6px; }
.admin-table td.is-actions form { display: inline; }
.admin-table__empty { padding: 32px 24px !important; text-align: center !important; color: var(--muted); }
.admin-table__thumb { width: 52px; height: 38px; object-fit: cover; border-radius: 6px; background: var(--bg); display: block; }
.is-muted { color: var(--muted); }

.admin-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 20px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.admin-badge--on { background: var(--success-tint); color: var(--success); }
.admin-badge--off { background: var(--danger-tint); color: var(--danger); }
.admin-badge--draft { background: var(--yellow-tint); color: var(--yellow-dark); }
.admin-badge--info { background: var(--blue-tint); color: var(--blue-dark); }

/* Záložky nad kartou (Logy: Aktivita / Přihlášení) */
.admin-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.admin-tabs__tab { padding: 8px 16px; border-radius: 20px; font-size: 14px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line-strong); }
.admin-tabs__tab:hover { color: var(--ink); text-decoration: none; }
.admin-tabs__tab.is-active { color: #fff; background: var(--ink); border-color: var(--ink); }

/* Filtr a stránkování logů */
.log-filter { flex-wrap: wrap; align-items: flex-end; }
.log-filter__fields { display: flex; gap: 12px; flex-wrap: wrap; }
.log-filter__fields .field-group { margin: 0; min-width: 180px; }
.log-filter__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px 24px; border-top: 1px solid var(--line); font-size: 14px; }
.admin-badge--on::before, .admin-badge--off::before, .admin-badge--draft::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 6px; }
.color-dot--brand { background: var(--brand); }
.color-dot--blue { background: var(--blue); }
.color-dot--green { background: var(--green); }
.color-dot--yellow { background: var(--yellow); }
.color-dot--pink { background: var(--pink); }

/* =========================================================
   Formuláře
   ========================================================= */
.field-group { margin-bottom: 18px; }
.field-group:last-child { margin-bottom: 0; }
.field-group > label, .field-label {
  display: block;
  font-size: 13px; font-weight: 600; color: var(--ink);
  margin-bottom: 6px;
}
.req { color: var(--brand); }
.field-group--narrow { max-width: 220px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.field-row > .field-group { margin-bottom: 0; }

.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="password"],
.field-group input[type="date"],
.field-group input[type="datetime-local"],
.field-group input[type="url"],
.field-group input[type="tel"],
.field-group input[type="number"],
.field-group select,
.field-group textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 10px 12px;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field-group input::placeholder, .field-group textarea::placeholder { color: #b0b0b0; }
.field-group input:focus, .field-group select:focus, .field-group textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 116, 0, .12);
}
.field-group input:invalid:not(:placeholder-shown):not(:focus) { border-color: #f3a5a5; }
.field-group textarea { resize: vertical; min-height: 80px; }
.field-group select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23777' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
.field-group input[type="number"] { max-width: 160px; }

.field-hint, .admin-form .field-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }
.char-counter { display: block; text-align: right; font-size: 11px; color: var(--muted); margin-top: 3px; }
.char-counter.is-near { color: var(--danger); font-weight: 600; }

.field-checkbox, .field-group > label.field-checkbox { display: flex; font-weight: 400; align-items: center; gap: 9px; font-size: 14px; color: var(--ink); margin-bottom: 6px; cursor: pointer; }
.field-checkbox input { width: 17px; height: 17px; accent-color: var(--brand); flex: none; }

.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 16px; }
.checkbox-grid .field-checkbox { padding: 8px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); margin: 0; transition: border-color .15s, background .15s; }
.checkbox-grid .field-checkbox:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }

.admin-form fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.admin-form legend { font-size: 13px; font-weight: 600; color: var(--ink); padding: 0; margin-bottom: 8px; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.form-actions--sticky {
  position: sticky; bottom: 0; z-index: 20;
  margin: 0 -4px; padding: 14px 4px;
  background: linear-gradient(to bottom, rgba(251, 247, 242, 0), var(--bg) 35%);
}
.form-actions__note { font-size: 13px; color: var(--muted); }

/* Přepínač zapnuto / vypnuto */
.switch, .field-group > label.switch { display: flex; align-items: flex-start; gap: 14px; margin: 0; font-weight: 400; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track {
  position: relative; flex: none;
  width: 46px; height: 26px; margin-top: 1px;
  border-radius: 13px; background: #d9d9d9;
  transition: background .2s ease;
}
.switch__track::after {
  content: ""; position: absolute; left: 3px; top: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}
.switch input:checked + .switch__track { background: var(--green-dark); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 3px solid rgba(255, 116, 0, .35); outline-offset: 2px; }
.switch__label { display: flex; flex-direction: column; font-size: 14px; }
.switch__label strong { color: var(--ink); font-weight: 600; font-size: 15px; }
.switch__hint { color: var(--muted); font-size: 13px; }

/* Barevné volby (kalendář akcí) */
.color-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.color-choice label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px; border: 1.5px solid var(--line-strong); border-radius: 30px;
  font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer;
}
.color-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.color-choice label:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.color-choice label:has(input:focus-visible) { outline: 3px solid rgba(255, 116, 0, .35); outline-offset: 2px; }
.color-choice .color-dot { width: 16px; height: 16px; margin: 0; }

/* Výběr odkazu */
.link-picker.is-enhanced .link-picker__custom,
.link-picker.is-enhanced .link-picker__text { padding-left: 14px; border-left: 3px solid var(--brand-tint); }

/* Pole pro obrázek / soubor */
.file-field { display: flex; gap: 16px; align-items: flex-start; }
.file-field__preview { flex: none; width: 140px; height: 96px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.file-field__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-field.is-removing:not(.has-new) .file-field__preview { opacity: .3; filter: grayscale(1); }
.file-field__main { flex: 1; min-width: 0; }
.file-field__drop {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border: 2px dashed var(--line-strong); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--ink);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.file-field__drop:hover { border-color: var(--brand); background: var(--brand-tint); }
.file-field__drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-field.has-new .file-field__drop { border-style: solid; border-color: var(--green-dark); background: var(--green-tint); color: var(--success); }
.file-field__icon { font-size: 20px; }
.file-field__remove { margin-top: 8px; }
.file-field__error { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--danger-tint); color: var(--danger); font-size: 13px; }
.current-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 10px; border-radius: var(--radius-sm); background: var(--bg); font-size: 14px; }

/* Quill self-hosted — viz assets/vendor/quill/ */
.ql-toolbar.ql-snow { border: 1.5px solid var(--line-strong) !important; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: #fcfbf9; font-family: inherit !important; }
.ql-container.ql-snow { border: 1.5px solid var(--line-strong) !important; border-top: 0 !important; border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-family: inherit !important; }
.ql-editor { min-height: 200px; font-family: inherit; font-size: 15px; color: var(--ink); line-height: 1.6; }
.ql-editor.ql-blank::before { color: #b0b0b0; font-style: normal; }
[data-richtext="basic"] .ql-editor { min-height: 120px; }

/* =========================================================
   Modální okno (<dialog>)
   ========================================================= */
.modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  color: var(--body);
}
.modal::backdrop { background: rgba(17, 17, 17, .45); backdrop-filter: blur(2px); }
.modal[open] { animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal__form { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 14px; border-bottom: 1px solid var(--line); }
.modal__head h2 { margin: 0; font-size: 18px; }
.modal__close { width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; }
.modal__close:hover { background: var(--bg); color: var(--ink); }
.modal__body { padding: 20px 24px; overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid var(--line); background: #fcfbf9; }

/* =========================================================
   Náhledy horní lišty a pop-upu
   ========================================================= */
.preview-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 18px; border-radius: var(--radius-sm);
  background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 500;
  transition: opacity .2s, filter .2s;
}
.preview-bar__text { flex: 1; }
.preview-bar__text a { color: #fff; font-weight: 700; text-decoration: underline; margin-left: 4px; }
.preview-bar__close { font-size: 20px; opacity: .8; }
.preview-bar.is-off, .preview-popup.is-off { opacity: .45; filter: grayscale(.8); }
.is-placeholder { opacity: .7; font-style: italic; }
.preview-off-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

.preview-popup {
  position: relative;
  border-radius: 16px; overflow: hidden;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
  transition: opacity .2s, filter .2s;
}
.preview-popup__close { position: absolute; top: 8px; right: 10px; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .9); display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--ink); }
.preview-popup__image { display: block; width: 100%; max-height: 160px; object-fit: cover; }
.preview-popup__body { padding: 18px 18px 20px; }
.preview-popup__title { margin: 0 0 8px; font-size: 18px; }
.preview-popup__text { font-size: 13px; line-height: 1.6; }
.preview-popup__text p { margin: 0 0 8px; }
.preview-popup__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.preview-popup__btn { display: inline-block; padding: 8px 16px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; }
.preview-popup__btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

/* =========================================================
   Seznam zpráv (Kontakt)
   ========================================================= */
.message-list { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.message-list__item { padding: 16px 24px; border-bottom: 1px solid var(--line); }
.message-list__item:last-child { border-bottom: 0; }
.message-list__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-size: 14px; }
.message-list__meta strong { color: var(--ink); }
.message-list__meta .is-muted { margin-left: auto; font-size: 13px; }
.message-list__text { margin: 8px 0 10px; white-space: pre-wrap; color: var(--ink); font-size: 14px; }
.message-list__actions { display: flex; gap: 8px; }

/* =========================================================
   Dashboard
   ========================================================= */
.admin-welcome {
  background: linear-gradient(120deg, var(--brand-tint), var(--pink-tint) 60%, var(--yellow-tint));
  border-radius: 18px;
  padding: 26px 30px;
  margin-bottom: 22px;
}
.admin-welcome h1 { margin: 0 0 6px; font-size: 24px; }
.admin-welcome p { margin: 0; max-width: 640px; }
.admin-welcome__meta { color: var(--muted); font-size: 13px; margin-top: 8px !important; }

.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 26px; }
.status-tile {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--body);
  transition: transform .15s ease, box-shadow .15s ease;
}
.status-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, .08); text-decoration: none; color: var(--body); }
.status-tile__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.status-tile__value { font-size: 20px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.status-tile__hint { font-size: 13px; color: var(--muted); }

.section-title { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 12px; }

.admin-quicklinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.admin-quicklinks__item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
  font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
.admin-quicklinks__item:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, .08); color: var(--ink); text-decoration: none; border-color: var(--brand); }
.admin-quicklinks__emoji { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; font-size: 20px; flex: none; }
.admin-quicklinks__item small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.admin-quicklinks__item--brand .admin-quicklinks__emoji { background: var(--brand-tint); }
.admin-quicklinks__item--blue .admin-quicklinks__emoji { background: var(--blue-tint); }
.admin-quicklinks__item--pink .admin-quicklinks__emoji { background: var(--pink-tint); }
.admin-quicklinks__item--green .admin-quicklinks__emoji { background: var(--green-tint); }
.admin-quicklinks__item--yellow .admin-quicklinks__emoji { background: var(--yellow-tint); }
.admin-quicklinks__item--violet .admin-quicklinks__emoji { background: var(--violet-tint); }

/* =========================================================
   Responzivita
   ========================================================= */
@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; }
  .card--sticky { position: static; }
}

@media (max-width: 900px) {
  .admin-topbar { padding: 0 14px; }
  .admin-topbar__menu { display: flex; }
  .admin-topbar__name, .admin-topbar__site { display: none; }
  .admin-sidebar {
    position: fixed; left: 0; top: var(--topbar-h); bottom: 0; z-index: 35;
    width: 270px; height: auto;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: var(--shadow-lg);
  }
  .is-sidebar-open .admin-sidebar { transform: none; }
  .is-sidebar-open .admin-sidebar-backdrop { display: block; position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 30; background: rgba(0, 0, 0, .35); }
  .admin-main { padding: 22px 16px 40px; }
}

@media (max-width: 640px) {
  .page-head { flex-direction: column; }
  .page-head h1 { font-size: 22px; }
  .card__head, .card__body { padding-left: 16px; padding-right: 16px; }
  .card__head--row { flex-direction: column; align-items: stretch; }
  .field-row { grid-template-columns: 1fr; }
  .file-field { flex-direction: column; }
  .file-field__preview { width: 100%; height: 160px; }
  .admin-table th:first-child, .admin-table td:first-child { padding-left: 16px; }
  .admin-table th:last-child, .admin-table td:last-child { padding-right: 16px; }
  .message-list__item { padding: 14px 16px; }
  .modal__head, .modal__body, .modal__foot { padding-left: 18px; padding-right: 18px; }
}

/* Informační hláška (nápověda na stránce, ne výsledek akce) */
.admin-flash--info { background: var(--blue-tint); color: var(--blue-dark); border: 1px solid #d6e5ff; }
.admin-flash--info::before { content: none; }
.admin-flash--info a { color: var(--blue-dark); font-weight: 600; text-decoration: underline; }
