
/* ===== Admin UI (v6) ===== */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
.admin-wrap{max-width:1040px;margin:30px auto;padding:0 16px;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;color:#111}
h1,h2{margin:.3rem 0 1rem}
.card{background:#f9fafb;border:1px solid #e5e7eb;border-radius:12px;
  padding:20px;margin:16px 0;overflow:hidden}
.card *{max-width:100%}
.card label{display:block;font-weight:600;margin-bottom:6px}
.card p{margin:0 0 14px 0}
.grid.two{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}
/* Důležité: v gridu povolit zmenšení obsahu, jinak pole přetékají */
.grid.two > *{min-width:0}

@media (max-width: 980px){ .grid.two{grid-template-columns:1fr} }

/* Vstupy */
input[type=text],input[type=date],input[type=password],input[type=file],textarea,select{
  width:100%;padding:10px 12px;border:1px solid #d1d5db;border-radius:8px;background:#fff;
  font-size:16px;line-height:1.4;display:block}
input.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,'Liberation Mono','Courier New',monospace;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
textarea{min-height:260px;resize:vertical}

/* Tlačítka */
button,.btn{display:inline-block;padding:10px 14px;border-radius:10px;border:1px solid #d1d5db;
  background:#fff;cursor:pointer;text-decoration:none;color:#111}
.btn.primary{border-color:#145c32;background:#198754;color:#fff}
.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;gap:10px;flex-wrap:wrap}
.notice{padding:10px 12px;border:1px solid #cfe0ff;background:#eef6ff;border-radius:8px;margin:10px 0}
.actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

/* Lepší vzhled pro file input ve sloupci */
input[type=file]{padding:8px;background:#fff}

/* Editor toolbar */
.editor-toolbar{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.etb{border:1px solid #d1d5db;background:#fff;border-radius:8px;padding:6px 10px;cursor:pointer}
.editor-code-mode textarea#editor-body{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,'Liberation Mono','Courier New',monospace;background:#fbfbff}
.editor-toolbar .sep{width:1px;background:#e5e7eb;margin:0 6px}

.tiny-note{color:#6b7280;font-size:.9rem;align-self:center}

.etb-h1,.etb-h2,.etb-h3{font-weight:700}
.etb-bold{font-weight:700}
.etb-italic{font-style:italic}
.editor-toolbar label.etb{display:flex;gap:6px;align-items:center}
.editor-toolbar select.etb-font{padding:4px 6px;border:1px solid #d1d5db;border-radius:6px}
.editor-toolbar input.etb-color{padding:0;border:1px solid #d1d5db;border-radius:6px;height:28px;width:38px}

/* vanilla toolbar */
.editor-toolbar{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.etb{border:1px solid #d1d5db;background:#fff;border-radius:8px;padding:6px 10px;cursor:pointer}
.editor-toolbar .sep{width:1px;background:#e5e7eb;margin:0 6px}
.etb.etb-color{padding:0;width:38px;height:32px}
.etb.etb-font{height:32px}

/* === tiny fixes appended === */
.editor-switch { display:none !important; } /* hide legacy duplicate toggle */
#editor-toggle-row{ display:flex; gap:8px; margin:6px 0 10px; align-items:center; flex-wrap:wrap; }
#editor-toggle-row .btn{ padding:.35rem .6rem; border-radius:8px; line-height:1.1; cursor:pointer; }
#editor-toggle-row .btn.active{ background:#eef2ff; border-color:#a5b4fc; color:#1f2937; }
.tox.tox-silver-sink, .tox { z-index: 100000 !important; } /* TinyMCE dialogs on top */
.table.posts th, .table.posts td { vertical-align: top; word-break: break-word; }


/* === tiny fixes v2 === */
.table th, .table td { vertical-align: top; word-break: break-word; }
.tox.tox-silver-sink, .tox { z-index: 100000 !important; }


/* === admin table tidy === */
.table.posts thead th { white-space: nowrap; }
.table.posts tbody td { word-break: break-word; vertical-align: top; }
.table.posts td.cover { width: 1%; white-space: nowrap; }
.table.posts td.cover img { max-height: 56px; width: auto; display: block; }
.table.posts td.actions { width: 1%; white-space: nowrap; }
.table.posts td.actions .btn { margin: 2px 0; }
.tox.tox-silver-sink, .tox { z-index: 100000 !important; }
/* responsive images */
img{max-width:100%;height:auto;display:block}.article img,.article-content img,.content img,.post img,figure img{max-width:100%;height:auto}.content figure,.article figure,.article-content figure,.post figure,figure{max-width:100%}@media (max-width:860px){.article img,.article-content img,.content img,.post img,figure img,img{width:auto!important;max-width:100%!important;height:auto!important}}
