/* Správa obsahu ČFB – navazuje na scheme.css a font.css webu */

:root {
    --m-canvas: var(--color-white-alter, #f1f1f1);
    --m-panel: #FFFFFF;
    --m-line: var(--color-border-alter, #d3d3d3);
    --m-line-strong: var(--color-border, #ADADAD);
    --m-muted: #5c5c5c;
    --m-gold: linear-gradient(180deg, var(--color-gold-light) 0%, var(--color-gold-dark) 100%);
    --m-ok: #2f7a3d;
    --m-ok-bg: #e3f1e5;
    --m-focus: 0 0 0 3px rgba(22, 84, 173, .35);
    --m-sidebar: 248px;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
    font-family: 'Work Sans', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--m-canvas);
}

a { color: var(--color-main); }
h1, h2, h3, b, strong, legend { font-weight: 600; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

:focus-visible { outline: none; box-shadow: var(--m-focus); border-radius: 5px; }

/* ---------- Layout ---------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
    position: sticky;
    top: 0;
    flex: 0 0 var(--m-sidebar);
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-main-alter);
    color: var(--color-white);
    padding: 22px 14px;
    overflow-y: auto;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 0 10px 22px;
    text-decoration: none;
    color: var(--color-gold-light);
    font-size: 13px;
}
.brand img { height: 56px; width: auto; background: var(--color-white); border-radius: 10px; padding: 6px 10px; }

.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
}
.sidebar nav a i { width: 18px; text-align: center; color: var(--color-gold-light); opacity: .75; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .08); color: var(--color-white); }
.sidebar nav a.active {
    background: var(--m-gold);
    color: var(--color-text);
    font-weight: 600;
}
.sidebar nav a.active i { color: var(--color-main-alter); opacity: 1; }

.nav-group {
    margin: 18px 12px 6px;
    font-size: 12px;
    color: rgba(253, 231, 182, .6);
}

.sidebar-foot {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-top: 14px;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-foot a, .sidebar-foot button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: rgba(255, 255, 255, .75);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.sidebar-foot a:hover, .sidebar-foot button:hover { background: rgba(255, 255, 255, .08); color: var(--color-white); }
.sidebar-foot i { width: 18px; text-align: center; }
.sidebar-foot button span { margin-left: auto; font-size: 12px; opacity: .6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }

.main {
    flex: 1;
    min-width: 0;
    padding: 24px 32px 120px;
    max-width: 1400px;
}

.menu-toggle { display: none; }

/* ---------- Hlavička stránky (zlatá lišta jako na webu) ---------- */

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    min-height: 92px;
    padding: 18px 28px;
    margin-bottom: 24px;
    border-radius: 20px;
    background: var(--m-gold);
}
.page-head h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
    color: var(--color-white);
    text-shadow: 0 1px 2px rgba(80, 50, 20, .35);
    overflow-wrap: anywhere;
}
.page-head p { margin: 4px 0 0; color: var(--color-main-alter); font-size: 14px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.page-head .btn:not(.btn-primary) { background: rgba(255, 255, 255, .85); border-color: transparent; }
.page-head .btn-ghost { background: transparent !important; color: var(--color-main-alter); }
.page-head .btn-ghost:hover { background: rgba(255, 255, 255, .35) !important; }

/* ---------- Tlačítka ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 42px;
    padding: 0 18px;
    border: 1px solid var(--m-line-strong);
    border-radius: 5px;
    background: var(--color-white);
    color: var(--color-main-alter);
    font: 600 15px 'Work Sans', sans-serif;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--color-main); color: var(--color-main); }
.btn-primary { background: var(--color-main); border-color: var(--color-main); color: var(--color-white); }
.btn-primary:hover { background: var(--color-main-light); border-color: var(--color-main-light); color: var(--color-white); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--color-special); border-color: transparent; }
.btn-small { height: 34px; padding: 0 12px; font-size: 14px; }
.btn-wide { width: 100%; }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--color-alter); }
.btn-danger-ghost:hover { background: var(--color-error); color: var(--color-alter-hover); border-color: transparent; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--m-muted);
    text-decoration: none;
    cursor: pointer;
}
.icon-btn:hover { background: var(--color-special); color: var(--color-main); }
.icon-danger:hover { background: var(--color-error); color: var(--color-alter); }

.link-btn {
    border: 0;
    background: none;
    padding: 0;
    color: var(--color-main);
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

form.inline { display: inline; margin: 0; }

/* ---------- Hlášky ---------- */

.flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.flash {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px 12px 16px;
    border-radius: 8px;
    background: var(--color-white);
    border-left: 4px solid var(--color-main);
}
.flash span { flex: 1; }
.flash-ok { border-color: var(--m-ok); background: var(--m-ok-bg); }
.flash-ok > i { color: var(--m-ok); }
.flash-error { border-color: var(--color-alter); background: var(--color-error); }
.flash-error > i { color: var(--color-alter); }
.flash-info > i { color: var(--color-main); }
.flash-close { border: 0; background: none; cursor: pointer; color: var(--m-muted); padding: 4px 6px; }

.notice {
    display: flex;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 10px;
    background: #fff6e0;
    border: 1px solid var(--color-gold-light);
}
.notice > i { color: var(--color-gold-dark); margin-top: 3px; }
.notice ul { margin: 8px 0 0; padding-left: 18px; }
.notice small { color: var(--m-muted); }
.notice-soft { background: var(--color-white); border-color: var(--m-line); }
.notice-soft > i { color: var(--color-main); }
.notice-error { background: var(--color-error); border-color: #e9b4b1; }
.notice-error > i { color: var(--color-alter); }

/* ---------- Panely ---------- */

.panel {
    background: var(--m-panel);
    border: 1px solid var(--m-line);
    border-radius: 10px;
    padding: 20px 22px;
    margin: 0 0 20px;
    min-width: 0;
}
.panel h2 { margin: 0 0 12px; font-size: 18px; }
fieldset.panel { padding-top: 6px; }
legend {
    float: left;
    width: 100%;
    padding: 12px 0 10px;
    margin-bottom: 8px;
    font-size: 17px;
    border-bottom: 1px solid var(--m-line);
}
legend + * { clear: both; }

.empty { color: var(--m-muted); }
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state p { margin: 0 0 16px; color: var(--m-muted); }

/* ---------- Přehled ---------- */

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stats a {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 18px 22px;
    border-radius: 10px;
    background: var(--m-panel);
    border: 1px solid var(--m-line);
    text-decoration: none;
    color: var(--color-text);
}
.stats a:hover { border-color: var(--color-gold-dark); }
.stats b { font-size: 34px; line-height: 1; color: var(--color-main); }
.stats span { color: var(--m-muted); }

.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 10px 0; border-top: 1px solid var(--m-line); display: flex; flex-direction: column; }
.plain-list li:first-child { border-top: 0; }
.plain-list a { text-decoration: none; font-weight: 600; }
.plain-list a:hover { text-decoration: underline; }
.plain-list small { color: var(--m-muted); }

/* ---------- Seznam ---------- */

.toolbar { display: flex; gap: 10px; margin-bottom: 16px; }

.search { position: relative; flex: 0 1 420px; display: block; }
.search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--m-muted); pointer-events: none; }
.search input { padding-left: 40px !important; }

.table-wrap { background: var(--m-panel); border: 1px solid var(--m-line); border-radius: 10px; overflow-x: auto; }

table.list { width: 100%; border-collapse: collapse; }
.list th {
    text-align: left;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--m-muted);
    border-bottom: 1px solid var(--m-line);
    white-space: nowrap;
}
.list th a { color: inherit; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.list th a i { font-size: 11px; opacity: .45; }
.list th[aria-sort] a { color: var(--color-main-alter); }
.list th[aria-sort] a i { opacity: 1; }
.list td { padding: 10px 14px; border-bottom: 1px solid var(--m-line); vertical-align: middle; }
.list tbody tr:last-child td { border-bottom: 0; }
.list tbody tr:hover { background: #fafafa; }
.col-narrow { width: 1%; }
.col-actions { width: 1%; white-space: nowrap; text-align: right; }

.row-title { font-weight: 600; text-decoration: none; color: var(--color-text); }
.row-title:hover { color: var(--color-main); text-decoration: underline; }

.thumb {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-special);
    vertical-align: middle;
}
.thumb-empty { color: var(--m-line-strong); }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    border: 0;
    font: 600 12px 'Work Sans', sans-serif;
    cursor: pointer;
    white-space: nowrap;
}
.badge-on { background: var(--m-ok-bg); color: var(--m-ok); }
.badge-off { background: var(--color-special); color: var(--m-muted); }
.badge:hover { box-shadow: inset 0 0 0 1px currentColor; }

.warn { color: var(--color-alter); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }

.pager { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    text-decoration: none;
    border: 1px solid var(--m-line);
    background: var(--m-panel);
}
.pager .current { background: var(--color-main); border-color: var(--color-main); color: var(--color-white); font-weight: 600; }

/* ---------- Formulář ---------- */

.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.form-grid.has-aside { grid-template-columns: minmax(0, 1fr) 360px; }
.form-aside { position: sticky; top: 20px; }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 4px; }
.field > label, .field > .label { display: block; }
.label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.label em { color: var(--color-alter); font-style: normal; }
.help { display: block; margin-top: 6px; color: var(--m-muted); font-size: 13px; }
.error { display: block; margin-top: 6px; color: var(--color-alter); font-size: 13px; font-weight: 600; }

input[type="text"], input[type="email"], input[type="url"], input[type="number"], input[type="search"],
input[type="password"], input[type="tel"], input[type="datetime-local"], select, textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--m-line-strong);
    border-radius: 5px;
    background: var(--color-white);
    font: 15px 'Work Sans', sans-serif;
    color: var(--color-text);
}
textarea { line-height: 1.55; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--color-main); box-shadow: var(--m-focus); outline: none; }
.has-error input, .has-error select, .has-error textarea, label.has-error input { border-color: var(--color-alter); background: #fffafa; }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; font-size: 14px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track {
    width: 42px;
    height: 24px;
    border-radius: 12px;
    background: var(--m-line-strong);
    position: relative;
    flex: none;
    transition: background-color .15s;
}
.switch .track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-white);
    transition: transform .15s;
}
.switch input:checked + .track { background: var(--color-main); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: var(--m-focus); }

.input-row { display: flex; gap: 8px; }
.input-row .btn { height: 42px; }

.slug { display: flex; align-items: stretch; }
.slug-prefix {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid var(--m-line-strong);
    border-right: 0;
    border-radius: 5px 0 0 5px;
    background: var(--color-special);
    color: var(--m-muted);
    font-size: 14px;
    white-space: nowrap;
}
.slug input { border-radius: 0 5px 5px 0; }

/* Editor */
.editor { border: 1px solid var(--m-line-strong); border-radius: 5px; overflow: hidden; background: var(--color-white); }
.editor:focus-within { border-color: var(--color-main); box-shadow: var(--m-focus); }
.editor textarea { border: 0; border-radius: 0; min-height: 0; box-shadow: none !important; font-size: 14px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.editor-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 6px;
    border-bottom: 1px solid var(--m-line);
    background: #fafafa;
}
.editor-tools button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    min-width: 32px;
    padding: 0 9px;
    border: 0;
    border-radius: 5px;
    background: none;
    color: var(--color-main-alter);
    font: 500 13px 'Work Sans', sans-serif;
    cursor: pointer;
}
.editor-tools button:hover { background: var(--color-special); color: var(--color-main); }
.editor-tools button[aria-pressed="true"] { background: var(--color-main); color: var(--color-white); }
.editor-tools .sep { width: 1px; height: 20px; background: var(--m-line); margin: 0 4px; }
.editor-tools .grow { flex: 1; }
.has-error .editor { border-color: var(--color-alter); }

/* Dny */
.days { display: grid; grid-template-columns: 1fr; gap: 6px; }
.days label { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; font-size: 14px; }
.days input { min-height: 36px; padding: 6px 10px; }
.days-tools { display: flex; gap: 16px; margin-top: 8px; }

/* Obrázek */
.image-field { display: flex; flex-direction: column; gap: 8px; }
.image-preview {
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    background: var(--color-special) repeating-conic-gradient(#e6e6e6 0 25%, transparent 0 50%) 0 0 / 16px 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-preview img { width: 100%; height: 100%; object-fit: contain; }
.image-preview span { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--m-muted); font-size: 13px; }
.image-preview span i { font-size: 26px; color: var(--m-line-strong); }
.image-name { margin: 0; font-size: 12px; color: var(--m-muted); overflow-wrap: anywhere; }
.image-name:empty { display: none; }
.image-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.images-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 10px; }
.images-grid figure { margin: 0; position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--color-special); }
.images-grid img { width: 100%; height: 100%; object-fit: cover; }
.images-grid button {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .65);
    color: var(--color-white);
    cursor: pointer;
}

/* Kontaktní osoby */
.child-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.child-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1.4fr auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border-radius: 8px;
    background: #fafafa;
    border: 1px solid var(--m-line);
}
.child-row label span { display: block; font-size: 13px; color: var(--m-muted); margin-bottom: 4px; }
.child-row .icon-btn { margin-bottom: 4px; }

/* Lišta pro uložení */
.save-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px -32px 0;
    padding: 14px 32px;
    background: rgba(241, 241, 241, .94);
    backdrop-filter: blur(6px);
    border-top: 1px solid var(--m-line);
}
.save-hint { margin-left: auto; font-size: 12px; color: var(--m-muted); }
.danger-zone { margin-top: 28px; }

/* ---------- Modální okna ---------- */

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--color-modal-background);
}
.modal-box {
    width: min(1040px, 100%);
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: 14px;
    overflow: hidden;
}
.modal-wide { width: min(1200px, 100%); height: calc(100vh - 48px); }
.modal-box > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 14px 22px;
    background: var(--m-gold);
}
.modal-box > header h2 { margin: 0; font-size: 19px; color: var(--color-white); text-shadow: 0 1px 2px rgba(80, 50, 20, .35); }
.modal-box > header .icon-btn { color: var(--color-main-alter); }
.modal-box > header .icon-btn:hover { background: rgba(255, 255, 255, .4); }
.modal-box > footer { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--m-line); }
.modal-box > footer span { flex: 1; font-size: 14px; color: var(--m-muted); }
.modal-box iframe { flex: 1; width: 100%; border: 0; background: var(--color-white); }

.media-bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 18px; }
.media-drop { flex: 1; overflow-y: auto; padding: 0 18px 18px; position: relative; min-height: 240px; }
.media-drop.dragging { background: #eef4fc; outline: 2px dashed var(--color-main); outline-offset: -10px; }
.media-hint { text-align: center; color: var(--m-muted); font-size: 13px; margin: 14px 0 0; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media-item {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: var(--color-special);
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    font: inherit;
}
.media-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.media-item span { padding: 6px 8px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--color-white); }
.media-item:hover { border-color: var(--color-gold-dark); }
.media-item[aria-pressed="true"] { border-color: var(--color-main); }
.media-item[aria-pressed="true"]::after {
    content: attr(data-order);
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border-radius: 13px;
    background: var(--color-main);
    color: var(--color-white);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Přihlášení ---------- */

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-box {
    width: min(420px, 100%);
    padding: 36px 34px 28px;
    border-radius: 20px;
    background: var(--m-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.login-box > img { height: 84px; width: auto; }
.login-box h1 { margin: 14px 0 22px; font-size: 24px; color: var(--color-white); text-shadow: 0 1px 2px rgba(80, 50, 20, .35); }
.login-box form { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.login-box label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; color: var(--color-main-alter); }
.login-box input { border-color: transparent; min-height: 46px; }
.login-box .btn { height: 48px; margin-top: 6px; }
.login-box .flashes { width: 100%; }
.login-back { margin-top: 18px; color: var(--color-main-alter); font-size: 14px; }

/* ---------- Responzivita ---------- */

@media (max-width: 1100px) {
    .form-grid.has-aside { grid-template-columns: minmax(0, 1fr); }
    .form-aside { position: static; }
    .stats { grid-template-columns: 1fr; }
    .columns { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .shell { display: block; }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 40;
        width: 280px;
        transform: translateX(-100%);
        transition: transform .2s;
    }
    .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); }
    .main { padding: 14px 14px 120px; }
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
        padding: 8px 14px;
        border: 1px solid var(--m-line);
        border-radius: 8px;
        background: var(--color-white);
        font: 600 15px 'Work Sans', sans-serif;
        cursor: pointer;
    }
    .page-head { padding: 16px 18px; min-height: 0; }
    .page-head h1 { font-size: 22px; }
    .save-bar { margin: 8px -14px 0; padding: 12px 14px; }
    .save-hint { display: none; }
    .child-row { grid-template-columns: 1fr; }

    table.list thead { display: none; }
    table.list, .list tbody, .list tr, .list td { display: block; width: 100%; }
    .list tr { padding: 10px 14px; border-bottom: 1px solid var(--m-line); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
    .list td { border: 0; padding: 0; width: auto; }
    .list td.col-actions { margin-left: auto; }
    .list td[data-label]:not(:has(.row-title)):not(:has(img)):not(:has(.thumb)):not(:has(form))::before {
        content: attr(data-label) ': ';
        color: var(--m-muted);
        font-size: 13px;
    }
    .list td:has(.row-title) { width: 100%; order: -1; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

.no-scroll { overflow: hidden; }

/* přepínač uvnitř .field musí zůstat flex (jinak ho přebije .field > label) */
.field > label.switch { display: inline-flex; }
.form-main .image-field { max-width: 420px; }

/* štítky článku */
.tag-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-check { position: relative; cursor: pointer; }
.tag-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tag-check span {
    display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px;
    border: 1px solid var(--m-line-strong); border-radius: 16px;
    font-size: 13px; font-weight: 500; background: var(--color-white);
}
.tag-check input:checked + span { background: var(--color-main); border-color: var(--color-main); color: var(--color-white); }
.tag-check input:focus-visible + span { box-shadow: var(--m-focus); }

/* pole dokumentu */
.file-field { display: flex; gap: 8px; }
.file-field select { flex: 1; min-width: 0; }
.file-field .btn { height: 42px; flex: none; }
.file-current { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
