/* A small newsroom: one list, one editor, no extra administration modules. */
.admin-body { background: #f5f7fa; color: #192b3d; }
.admin-header { position: relative; background: #fff; }
.cms-main { --container: 1220px; padding-block: 36px 64px; }
.cms-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.cms-heading h1 { margin: 0 0 10px; min-height: 0; font-size: 2.15rem; line-height: 1.2; }
.cms-heading p { margin: 0; font-size: .93rem; }
.cms-heading .cms-kicker { color: #64809a; margin-bottom: 14px; font-size: .82rem; }
.cms-heading > .button { flex-shrink: 0; }
.cms-status { min-height: 0; margin: 0; }
.cms-status:not(:empty) { position: sticky; top: 12px; z-index: 30; padding: 12px 16px; margin-bottom: 20px; border: 1px solid currentColor; border-radius: 8px; background: #fff; box-shadow: 0 4px 14px #1e5b8410; }
.cms-library { border: 1px solid #dce4ec; border-radius: 12px; background: #fff; overflow: hidden; }
.cms-library__toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; padding: 20px 24px; }
.cms-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cms-filters button { background: none; border: 0; padding: 9px 12px; border-radius: 7px; color: #566b80; cursor: pointer; font-size: .85rem; }
.cms-filters button.is-active { color: #0763a7; background: #eaf4fd; font-weight: 700; }
.cms-filters span { margin-left: 6px; font-size: .75rem; }
.cms-search { display: flex; gap: 10px; }
.cms-search input, .cms-search select, .cms-editor-layout input, .cms-editor-layout select, .cms-editor-layout textarea { border: 1px solid #cbd5e1; background: #fff; padding: 11px 12px; border-radius: 7px; color: #26384a; font: inherit; font-size: .9rem; min-width: 0; }
.cms-search input { width: 220px; }
.cms-search select { max-width: 150px; }
.cms-table-head, .cms-news-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 115px 135px; gap: 24px; align-items: center; padding: 16px 24px; }
.cms-table-head { border-block: 1px solid #e5ebf1; background: #fafbfd; color: #6b7d8f; font-size: .78rem; }
.cms-news-row { border-bottom: 1px solid #edf0f4; transition: background 120ms ease; }
.cms-news-row:hover { background: #f4f9fe; }
.cms-news-row__main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.cms-news-row__main > span:last-child { min-width: 0; }
.cms-news-row strong { display: block; font-size: .95rem; line-height: 1.45; overflow-wrap: anywhere; }
.cms-news-row small { display: block; color: #7c8b99; margin-top: 6px; font-size: .75rem; }
.cms-news-row__cover { width: 72px; height: 52px; flex-shrink: 0; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #07598f, #138bce); font-weight: 800; font-size: 1.35rem; border-radius: 6px; overflow: hidden; }
.cms-news-row__cover img { width: 100%; height: 100%; object-fit: cover; }
.cms-news-row .admin-badge { justify-self: start; }
.cms-news-row time { color: #6b7d8f; font-size: .8rem; }
.cms-row-edit { color: #086eae; font-size: .8rem; text-align: right; }
.cms-list-footer { display: flex; justify-content: space-between; padding: 14px 24px; color: #758698; font-size: .78rem; }
.cms-empty { margin: 0; padding: 64px 24px; text-align: center; color: #6b7d8f; }
.cms-empty h2 { color: #26384a; font-size: 1.3rem; min-height: 0; }
.cms-empty p { max-width: 440px; margin: 12px auto 24px; font-size: .9rem; }
.cms-hint { color: #758698; font-size: .8rem; margin-top: 18px; }
.cms-back { display: inline-flex; margin-bottom: 24px; color: #607890; font-size: .85rem; }
.cms-back:hover { color: var(--blue); }
.cms-heading--editor { margin-bottom: 24px; }
.cms-heading--editor h1 { font-size: 1.9rem; }
.cms-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.cms-editor-layout fieldset { margin: 0; min-width: 0; }
.cms-editor-fields { padding: 0; border: 0; }
.cms-editor-layout .admin-panel { border-color: #dce4ec; padding: 24px; border-radius: 10px; }
.cms-editor-layout label { display: block; color: #3c4f62; font-size: .85rem; font-weight: 600; margin-bottom: 10px; }
.cms-editor-layout input, .cms-editor-layout select, .cms-editor-layout textarea { width: 100%; }
.cms-editor-layout textarea { resize: vertical; }
.cms-editor-layout .cms-title-input { font-size: 1.2rem; font-weight: 600; padding-block: 14px; margin-bottom: 26px; }
.cms-field-hint { color: #748495; font-size: .76rem; line-height: 1.55; margin: 8px 0 22px; }
.cms-writing > .cms-field-hint:last-child { margin-bottom: 0; }
.cms-editor-sidebar { display: grid; gap: 20px; }
.cms-panel-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; }
.cms-editor-sidebar h2 { font-size: 1rem; min-height: 0; margin: 0; }
.cms-publish-actions { display: grid; gap: 10px; }
.cms-publish-fields .cms-field-hint:last-child { text-align: center; margin: 14px 0 0; }
.cms-public-link { color: var(--blue); text-align: center; font-size: .85rem; padding-top: 4px; }
.cms-editor-layout .cms-upload { display: grid; gap: 5px; text-align: center; padding: 24px 12px; margin: 0; border: 1px dashed #a9bfd2; border-radius: 8px; background: #f7fbff; cursor: pointer; }
.cms-upload:hover, .cms-cover-fields:focus-within .cms-upload { border-color: var(--blue); }
.cms-upload > span { color: var(--blue); font-size: 1.7rem; }
.cms-upload strong { color: var(--blue); font-weight: 600; font-size: .85rem; }
.cms-upload small { color: #748495; font-size: .72rem; font-weight: 400; }
.cms-cover-preview { margin: 16px 0 12px; border-radius: 8px; overflow: hidden; background: #edf4f8; }
.cms-cover-preview img { width: 100%; max-height: 180px; object-fit: cover; }
.cms-cover-url { margin-top: 16px; font-size: .78rem; }
.cms-cover-url summary { color: #607890; cursor: pointer; }
.cms-cover-url input { margin-top: 10px; }
.cms-delete { margin: 0; justify-self: center; color: #b54141; font-size: .8rem; }
.cms-rich-editor { border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; }
.cms-rich-editor .ql-toolbar.ql-snow { border: 0; border-bottom: 1px solid #e1e7ee; background: #fafbfd; padding: 12px; }
.cms-rich-editor .ql-container.ql-snow { border: 0; font-family: inherit; font-size: 1rem; }
.cms-rich-editor .ql-editor { min-height: 340px; line-height: 1.7; padding: 20px; overflow-wrap: anywhere; }
.cms-rich-editor .ql-editor h2 { min-height: 0; font-size: 1.5em; margin-bottom: .6em; }
.cms-rich-editor .ql-editor p { margin-bottom: .6em; }
.cms-rich-editor .ql-editor.ql-blank::before { left: 20px; right: 20px; color: #8a97a4; font-style: normal; }
.cms-rich-editor .ql-toolbar.ql-snow .ql-formats { margin-right: 10px; }
.cms-rich-editor .ql-toolbar button { width: 32px; height: 30px; border-radius: 4px; }
.cms-rich-editor .ql-toolbar button.ql-active { background: #e6f2fc; }
.cms-rich-editor .ql-tooltip { display: none !important; }
.cms-preview-dialog { width: min(1000px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 12px; box-shadow: var(--shadow); }
.cms-preview-dialog::backdrop { background: #14283d99; }
.cms-preview-toolbar { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 24px; background: #fff; border-bottom: 1px solid var(--border); }
.cms-preview-toolbar span { display: block; color: var(--muted); font-size: .76rem; }
.cms-icon-button { border: 1px solid var(--border); border-radius: 8px; width: 38px; height: 38px; background: #fff; cursor: pointer; font-size: 1.5rem; }
.cms-preview-content { margin: auto; padding: 40px; }
.news-rich-content { white-space: normal; }
.news-rich-content :is(h2,h3) { min-height: 0; margin: 28px 0 12px; line-height: 1.4; }
.news-rich-content h2 { font-size: 1.65rem; }
.news-rich-content h3 { font-size: 1.3rem; }
.news-rich-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.news-rich-content blockquote { margin: 24px 0; padding: 10px 20px; border-left: 3px solid var(--blue); background: #f3f8fc; }
.news-rich-content ul, .news-rich-content ol { padding-left: 28px; margin-block: 20px; }
.news-rich-content li { margin-block: 8px; }
.news-rich-content li p { margin-bottom: 8px; }
@media (max-width: 1050px) {
  .cms-table-head, .cms-news-row { grid-template-columns: minmax(0, 1fr) 120px 95px; gap: 16px; }
  .cms-row-edit { display: none; }
  .cms-editor-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; }
}
@media (max-width: 760px) {
  .cms-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
  .cms-heading h1 { font-size: 1.8rem; }
  .cms-main { padding-top: 24px; }
  .cms-library__toolbar { padding: 16px; gap: 16px; }
  .cms-filters { gap: 3px; }
  .cms-filters button { font-size: .76rem; padding: 8px; }
  .cms-search { width: 100%; }
  .cms-search input { flex: 1; width: 0; }
  .cms-search select { width: 115px; }
  .cms-table-head { display: none; }
  .cms-news-row { grid-template-columns: 1fr auto; padding: 18px 16px; gap: 12px; }
  .cms-news-row__main { grid-column: 1 / -1; }
  .cms-news-row time { text-align: right; font-size: .75rem; }
  .cms-editor-layout { grid-template-columns: 1fr; }
  .cms-editor-layout .admin-panel { padding: 20px; }
  .cms-rich-editor .ql-editor { min-height: 300px; padding: 16px; }
  .cms-preview-content { padding: 24px 20px; }
  .cms-preview-toolbar { padding: 14px 20px; }
  .cms-rich-editor .ql-toolbar.ql-snow { padding: 8px; }
  .cms-rich-editor .ql-toolbar.ql-snow .ql-formats { margin-right: 4px; }
  .cms-rich-editor .ql-toolbar button { width: 29px; }
}

.cms-editor-layout input.sr-only { width: 1px; padding: 0; border: 0; }
