/* Вкладки «Новости» и «Редактор новостей». */

.news-tab-page, .news-studio-page { display: flex; flex-direction: column; gap: 14px; }
.news-tab-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px; }
.news-tab-eyebrow { margin: 0 0 6px; color: var(--accent); font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
.news-tab-title { margin: 0; font-size: 30px; line-height: 1.1; color: var(--ink); }
.news-tab-lead { max-width: 760px; margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.news-tab-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.news-tab-filters button {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.news-tab-filters button.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.news-tab-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.news-tab-card { overflow: hidden; padding: 0; }
.news-tab-image { display: block; aspect-ratio: 16 / 9; background: #1a1e23; text-decoration: none; }
.news-tab-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-tab-image span { display: grid; place-items: center; height: 100%; color: var(--muted); font-family: var(--mono); font-size: 22px; }
.news-tab-body { padding: 13px 14px 15px; }
.news-tab-meta { display: flex; gap: 9px; align-items: center; color: var(--muted); font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; }
.news-tab-meta b { color: var(--accent); font-weight: 500; }
.news-tab-body h2 { margin: 7px 0 7px; font-size: 16px; line-height: 1.3; color: var(--ink); }
.news-tab-body p { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.news-tab-more { color: var(--accent); font-size: 11px; text-decoration: none; }
.news-tab-empty { display: flex; flex-direction: column; gap: 5px; padding: 26px; color: var(--muted); font-size: 12px; text-align: center; }
.news-tab-empty b { color: var(--ink); }

.news-studio-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 18px 20px; }
.news-studio-ai { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; max-width: 310px; text-align: right; }
.news-studio-ai small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.news-ai-ok, .news-ai-warn { padding: 4px 8px; border-radius: 3px; font-family: var(--mono); font-size: 10px; }
.news-ai-ok { color: #9fd0ae; border: 1px solid rgba(97, 168, 121, .35); background: rgba(97, 168, 121, .1); }
.news-ai-warn { color: #e0c090; border: 1px solid rgba(224, 180, 120, .4); background: rgba(224, 180, 120, .08); }
html[data-theme="light"] .news-ai-ok { color: #1d6b4a; border-color: rgba(31, 120, 80, .35); background: rgba(31, 120, 80, .08); }
html[data-theme="light"] .news-ai-warn { color: #8a5a00; border-color: rgba(160, 110, 20, .35); background: rgba(200, 150, 40, .1); }
html[data-theme="light"] .news-status.published { color: #1d6b4a; border-color: rgba(31, 120, 80, .4); background: rgba(31, 120, 80, .08); }
html[data-theme="light"] .news-editor-note { color: #8a5a00; }
.news-studio-notice { padding: 10px 14px; border-left: 3px solid var(--accent); color: var(--ink); background: var(--accent-soft); font-size: 12px; }

.news-studio-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.news-studio-plan, .news-studio-editor { padding: 15px; min-width: 0; }
.news-studio-plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.news-studio-hint { margin: 3px 0 0; color: var(--muted); font-size: 10.5px; }
.news-studio-horizon { display: flex; flex-wrap: wrap; gap: 4px; }
.news-studio-horizon button { padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.news-studio-horizon button.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.news-studio-plan-scroll { max-height: 72vh; margin-top: 10px; overflow-y: auto; padding-right: 4px; }
.news-plan-month > h3 { margin: 12px 0 6px; color: var(--ink); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.news-plan-week { margin-bottom: 8px; }
.news-plan-week > span { display: block; margin: 7px 0 5px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.news-plan-card { padding: 9px 10px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255, 255, 255, .02); margin-bottom: 6px; }
.news-plan-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.news-plan-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.news-plan-card-top b { font-size: 12px; font-weight: 500; color: var(--ink); line-height: 1.35; }
.news-plan-card-top em { flex: 0 0 auto; color: var(--muted); font-family: var(--mono); font-size: 8.5px; font-style: normal; text-transform: uppercase; }
.news-plan-card p { margin: 5px 0 6px; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.news-plan-queries { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 5px; }
.news-plan-queries span { padding: 2px 5px; border-radius: 3px; background: rgba(127, 180, 214, .09); color: var(--accent); font-size: 9px; }
.news-plan-card details { color: var(--muted); font-size: 10px; }
.news-plan-card details summary { cursor: pointer; color: var(--muted); }
.news-plan-card details ul { margin: 5px 0; padding-left: 16px; line-height: 1.5; }
.news-plan-why { margin: 5px 0; color: var(--ink); line-height: 1.45; }
.news-plan-generate { margin-top: 7px; padding: 5px 8px; border: 1px solid rgba(127, 180, 214, .35); border-radius: 3px; background: transparent; color: var(--accent); font-size: 10px; cursor: pointer; }
.news-plan-generate:disabled { opacity: .45; cursor: default; }

.news-wordstat { margin-top: 8px; padding: 8px; border: 1px dashed var(--line); border-radius: 4px; }
.news-wordstat summary { cursor: pointer; color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.news-wordstat summary span { margin-left: 5px; color: var(--accent); }
.news-wordstat textarea { width: 100%; margin-top: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: rgba(0, 0, 0, .18); color: var(--ink); font-family: var(--mono); font-size: 10.5px; resize: vertical; }
html[data-theme="light"] .news-wordstat textarea { background: #fbfcfd; }
.news-wordstat div { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 5px; }
.news-wordstat small { color: var(--muted); font-size: 9px; line-height: 1.4; }

.news-studio-editor { position: sticky; top: 84px; }
.news-studio-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.news-studio-editor-actions { display: flex; align-items: center; gap: 6px; }
.news-status { padding: 3px 7px; border-radius: 3px; border: 1px solid var(--line); color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.news-status.published { color: #9fd0ae; border-color: rgba(97, 168, 121, .4); background: rgba(97, 168, 121, .1); }
.news-studio-progress { display: flex; flex-direction: column; gap: 5px; margin: 10px 0; padding: 10px 12px; border: 1px solid rgba(127, 180, 214, .35); border-radius: 5px; background: var(--accent-soft); color: var(--ink); font-size: 11px; line-height: 1.5; }
.news-studio-progress span { color: var(--muted); font-size: 10px; }
.news-studio-progress.error { border-color: rgba(224, 140, 140, .45); background: rgba(224, 140, 140, .08); color: #e0a0a0; }
.news-studio-empty { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; padding: 16px; border: 1px dashed var(--line); border-radius: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }
.news-studio-empty b { color: var(--ink); }

.news-editor-form { display: flex; flex-direction: column; gap: 9px; margin-top: 10px; }
.news-editor-form label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase; }
.news-editor-form input, .news-editor-form textarea, .news-editor-section input, .news-editor-section textarea, .news-editor-faq input, .news-editor-faq textarea, .news-editor-image-add input {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0, 0, 0, .18);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  resize: vertical;
}
html[data-theme="light"] .news-editor-form input,
html[data-theme="light"] .news-editor-form textarea,
html[data-theme="light"] .news-editor-section input,
html[data-theme="light"] .news-editor-section textarea,
html[data-theme="light"] .news-editor-faq input,
html[data-theme="light"] .news-editor-faq textarea,
html[data-theme="light"] .news-editor-image-add input { background: #fbfcfd; }
.news-editor-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.news-editor-row label { min-width: 0; }
.news-editor-note { padding: 9px 11px; border-left: 3px solid #e0c090; background: rgba(224, 180, 120, .08); color: #d9c98e; font-size: 11px; line-height: 1.45; }
.news-editor-sections { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.news-editor-sections-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.news-editor-section, .news-editor-faq { display: flex; flex-direction: column; gap: 5px; margin-top: 7px; padding: 8px; border: 1px solid var(--line); border-radius: 4px; }
.news-editor-why { padding: 6px 7px; border-left: 2px solid var(--accent); background: var(--accent-soft); border-radius: 2px; }
.news-editor-why b { display: block; margin-bottom: 3px; color: var(--accent); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.news-editor-why textarea { background: transparent !important; border: 0; padding: 0; color: var(--ink); font-size: 10.5px; }
.news-editor-remove { align-self: flex-start; border: 0; background: transparent; color: #d99a9a; font-size: 9.5px; cursor: pointer; padding: 0; }
.news-editor-images { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.news-editor-image-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 7px 0; }
.news-editor-image-grid figure { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; border: 1px solid var(--line); }
.news-editor-image-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-editor-image-grid button { position: absolute; top: 2px; right: 2px; border: 0; border-radius: 2px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; cursor: pointer; }
.news-editor-image-add { display: flex; gap: 5px; }
.news-editor-preview { margin-top: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 4px; }
.news-editor-preview span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; }
.news-editor-preview b { display: block; color: #9fc7e0; font-size: 14px; font-weight: 500; line-height: 1.3; }
html[data-theme="light"] .news-editor-preview b { color: #1d628c; }
.news-editor-preview small { display: block; margin: 2px 0; color: #9fd0ae; font-size: 9px; }
.news-editor-preview p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.news-editor-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.news-editor-save { min-width: 150px; padding: 12px 18px; font-size: 12px; letter-spacing: .12em; }
.news-editor-actions .ghost-btn { text-decoration: none; }

.news-studio-drafts { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.news-draft-row { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; width: 100%; padding: 7px 8px; border: 1px solid transparent; border-bottom-color: var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.news-draft-row:hover, .news-draft-row.active { border-color: var(--accent); background: var(--accent-soft); }
.news-draft-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.news-draft-row em { color: var(--muted); font-size: 8.5px; font-style: normal; text-transform: uppercase; }
.news-draft-row small { grid-column: 1 / -1; color: var(--muted); font-family: var(--mono); font-size: 8.5px; }

@media (max-width: 1250px) {
  .news-tab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-studio-grid { grid-template-columns: 1fr; }
  .news-studio-editor { position: static; }
}
@media (max-width: 700px) {
  .news-tab-grid { grid-template-columns: 1fr; }
  .news-tab-hero, .news-studio-head { flex-direction: column; }
  .news-studio-ai { align-items: flex-start; text-align: left; }
  .news-editor-row { grid-template-columns: 1fr; }
  .news-editor-image-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
