/* /home/mnsgtx/dtx/static/news/news.css */
/* Home nav (как в globalnews_list, но без inline) */

.gn-hero {
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.news-hero-lead {
  margin-top: 0.25rem;
}

.gn-list-search{
  display:flex;
  gap:.5rem;
  margin-top:1rem;
  align-items:center;
}
.gn-list-search .form-control{ flex:1 1 auto; }

.gn-list-items{ margin-top: .75rem; }

.news-confirm-card {
  padding: 1.25rem 1.5rem;
}

.news-confirm-lead {
  margin-top: 0.35rem;
}

.news-confirm-title {
  margin-top: 0;
}

.news-confirm-actions {
  margin-top: 1rem;
  flex-wrap: wrap;
}

.pagination{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: .75rem;
}

/* Short card (переносим из globalnews/_short_card.html) */
.gn-card{
  background:#11141b;
  border-radius:12px;
  padding:1rem 1.1rem 0.9rem;
  border:1px solid var(--border);
  box-shadow:0 4px 14px rgba(0,0,0,0.45);
  margin-bottom:1rem;
}

.gn-card-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:.75rem;
  margin-bottom:.6rem;
}

.gn-card-author{
  display:flex;
  align-items:center;
  gap:.75rem;
  min-width:0;
}

.gn-card-avatar{
  width:42px;
  height:42px;
  border-radius:50%;
  object-fit:cover;
  flex-shrink:0;
  border:2px solid rgba(255,255,255,0.12);
}

.gn-card-avatar-fallback{
  width:42px;
  height:42px;
  border-radius:50%;
  background:linear-gradient(135deg,#202636,#3b4258);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  color:#fff;
  border:2px solid rgba(255,255,255,0.12);
}

.gn-card-title-block{ min-width:0; }
.gn-card-title{
  font-size:1.05rem;
  margin:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.gn-card-title a{
  color:#f8f9fa;
  text-decoration:none;
}
.gn-card-title a:hover{ text-decoration:underline; }

.gn-card-meta{
  margin-top:.15rem;
  font-size:.8rem;
  color:#9aa0aa;
}

.gn-card-actions{
  display:flex;
  align-items:center;
  gap:.4rem;
  flex-shrink:0;
}

.gn-icon-btn{
  width:32px;
  height:32px;
  border-radius:50%;
  border:1px solid var(--border);
  background:rgba(15,18,26,0.95);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:1rem;
  padding:0;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
  text-decoration:none;
}
.gn-icon-btn:hover{
  transform:translateY(-1px) scale(1.05);
  border-color:#20c997;
  box-shadow:0 6px 16px rgba(0,0,0,0.55);
}
.gn-icon-btn-danger:hover{
  border-color:#dc3545;
  box-shadow:0 6px 16px rgba(220,53,69,0.55);
}

.gn-card-body{ margin:.2rem 0 .5rem; }

.gn-media-grid{
  margin-top:.45rem;
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:.4rem;
}

.gn-media-grid-detail{
  margin-top:.7rem;
  margin-bottom:.25rem;
}

.gn-media-thumb-link{
  display:block;
  border-radius:10px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
}

.gn-media-thumb{
  width:100%;
  aspect-ratio:1 / 1;
  object-fit:cover;
  display:block;
}

.gn-inline-media-grid{
  margin-top:.65rem;
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:.45rem;
}

.gn-inline-media-thumb{
  width:100%;
  aspect-ratio:1 / 1;
  object-fit:cover;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
}

.gn-card-image-link,
.gn-card-image-fallback{
  display:block;
  border-radius:12px;
  overflow:hidden;
  position:relative;
}

.gn-card-image{
  width:100%;
  display:block;
  border-radius:12px;
  object-fit:cover;
  max-height:380px;
}

.gn-card-image-fallback{
  min-height:140px;
  background:linear-gradient(135deg,#1a2030,#10131b);
  border:1px solid rgba(255,255,255,0.08);
  display:flex;
  align-items:flex-end;
  padding:1rem;
  color:#e9ecef;
}
.gn-card-image-fallback span{
  font-size:.95rem;
  line-height:1.25;
  opacity:.95;
}

.gn-card-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:.75rem;
  margin-top:.5rem;
  flex-wrap:wrap;
}

.gn-card-footer-right{ display:flex; align-items:center; gap:.5rem; }

.gn-card-slug-note {
  font-size: 0.8rem;
}

.gn-card-summary{
  flex: 1 1 240px;
  color: var(--text);
  font-size: .95rem;
  line-height: 1.45;
  opacity: .92;
}

/* news_list inline styles migrated */
.gn-article-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:.75rem;
    margin-bottom:.8rem;
  }

  .gn-article-author{
    display:flex;
    align-items:flex-start;
    gap:.8rem;
    min-width:0;
  }

  .gn-article-avatar{
    width:46px;
    height:46px;
    border-radius:50%;
    object-fit:cover;
    flex-shrink:0;
    border:2px solid rgba(255,255,255,0.14);
  }

  .gn-article-avatar-fallback{
    width:46px;
    height:46px;
    border-radius:50%;
    background:linear-gradient(135deg,#202636,#3b4258);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    color:#fff;
    border:2px solid rgba(255,255,255,0.14);
    flex-shrink:0;
  }

  .gn-article-title-block{min-width:0;}
  .gn-article-title{font-size:1.35rem;line-height:1.25;}
  .gn-article-meta{margin-top:.2rem;font-size:.85rem;}

  .gn-admin-actions{display:flex;gap:.35rem;flex-shrink:0;}
  .gn-admin-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:2rem;
    height:2rem;
    border-radius:999px;
    background:#151824;
    border:1px solid rgba(255,255,255,.08);
    text-decoration:none;
    font-size:1.1rem;
    cursor:pointer;
    transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
  }
  .gn-admin-btn:hover{
    border-color:rgba(255,255,255,.25);
    transform:translateY(-1px);
    box-shadow:0 4px 12px rgba(0,0,0,0.5);
  }
  .gn-admin-btn-danger{
    background:#3b1114;
    border-color:#ff4b63;
    color:#ff8a9a;
  }
  .gn-admin-btn-danger:hover{
    background:#55141a;
    border-color:#ff9aaa;
    color:#ffc0cb;
  }

  .gn-cover{margin:.6rem 0 .8rem;}
  .gn-cover-image{
    width:100%;
    max-height:460px;
    object-fit:cover;
    border-radius:12px;
    display:block;
  }
  .gn-cover-caption{margin-top:.3rem;font-size:.85rem;color:#9aa0aa;}

  .gn-article-body{margin-top:.4rem;line-height:1.6;}

  .news-article-footer{
    margin-top:1.1rem;
    padding-top:.6rem;
    border-top:1px solid rgba(255,255,255,0.07);
  }

  .gn-article-footer{
    margin-top:1.1rem;
    padding-top:.6rem;
    border-top:1px solid rgba(255,255,255,0.07);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:.75rem;
    flex-wrap:wrap;
  }

  .gn-reactions{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;}
  .gn-reaction{display:flex;align-items:center;gap:.18rem;}
  .gn-reaction-btn{
    border:none;
    background:transparent;
    cursor:pointer;
    font-size:1.35rem;
    line-height:1;
    padding:.12rem .22rem;
    border-radius:999px;
    transition:transform .12s ease, background .12s ease, box-shadow .12s ease;
  }
  .gn-reaction-btn:hover{
    transform:translateY(-1px) scale(1.1);
    background:rgba(255,255,255,0.06);
    box-shadow:0 3px 10px rgba(0,0,0,0.45);
  }
  .gn-reaction-count{font-size:.9rem;color:#ced4da;min-width:1.4rem;text-align:left;}

  .gn-comments-block{margin-top:1.3rem;}
  .gn-comments-list{display:grid;gap:1rem;}
  .gn-comment-card{
    padding:.75rem 1rem;
    background:#11141b;
    border-radius:.8rem;
    border:1px solid rgba(255,255,255,0.05);
  }
  .gn-comment-meta{font-size:.85rem;}
  .gn-comment-text{margin-top:.35rem;font-size:.95rem;}

  @media (max-width:720px){
    .gn-article-head{flex-direction:column;align-items:flex-start;}
    .gn-article-footer{flex-direction:column;align-items:flex-start;}
  }

/* news_form inline styles migrated */
/* Делаем поля читаемыми в тёмной теме */
  .card form input[type="text"],
  .card form input[type="file"],
  .card form textarea,
  .card form input[type="datetime-local"],
  .card form input[type="datetime"] {
    width:100%;
    background:var(--input-bg);
    color:var(--input-text);
  }
  .card form textarea {
    min-height:200px;
  }
  .form-group input,
  .form-group textarea,
  .form-group select {
    background:var(--input-bg);
    color:var(--input-text);
  }

/* news_short_card inline styles migrated */
.gn-card{
    background:#11141b;
    border-radius:12px;
    padding:1rem 1.1rem 0.9rem;
    border:1px solid var(--border);
    box-shadow:0 4px 14px rgba(0,0,0,0.45);
    margin-bottom:1rem;
  }

  .gn-card-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:.75rem;
    margin-bottom:.6rem;
  }

  .gn-card-author{
    display:flex;
    align-items:center;
    gap:.75rem;
    min-width:0;
  }

  .gn-card-avatar{
    width:42px;
    height:42px;
    border-radius:50%;
    object-fit:cover;
    flex-shrink:0;
    border:2px solid rgba(255,255,255,0.12);
  }

  .gn-card-avatar-fallback{
    width:42px;
    height:42px;
    border-radius:50%;
    background:linear-gradient(135deg,#202636,#3b4258);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    color:#fff;
    border:2px solid rgba(255,255,255,0.12);
  }

  .gn-card-title-block{min-width:0;}
  .gn-card-title{
    font-size:1.05rem;
    margin:0;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .gn-card-title a{
    color:#f8f9fa;
    text-decoration:none;
  }
  .gn-card-title a:hover{text-decoration:underline;}

  .gn-card-meta{
    margin-top:.15rem;
    font-size:.8rem;
    color:#9aa0aa;
  }

  .gn-card-actions{
    display:flex;
    align-items:center;
    gap:.4rem;
    flex-shrink:0;
  }

  .gn-icon-btn{
    width:32px;
    height:32px;
    border-radius:50%;
    border:1px solid var(--border);
    background:rgba(15,18,26,0.95);
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-size:1rem;
    padding:0;
    transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
    text-decoration:none;
  }
  .gn-icon-btn:hover{
    transform:translateY(-1px) scale(1.05);
    border-color:#20c997;
    box-shadow:0 6px 16px rgba(0,0,0,0.55);
  }
  .gn-icon-btn-danger:hover{
    border-color:#dc3545;
    box-shadow:0 6px 16px rgba(220,53,69,0.55);
  }

  .gn-card-body{
    margin:.2rem 0 .5rem;
  }

  .gn-card-image-link,
  .gn-card-image-fallback{
    display:block;
    border-radius:12px;
    overflow:hidden;
    position:relative;
  }

  .gn-card-image{
    width:100%;
    display:block;
    border-radius:12px;
    object-fit:cover;
    max-height:380px;
  }

  .gn-card-image-fallback{
    min-height:160px;
    background:linear-gradient(135deg,#1b1f2b,#252b3a);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:1rem;
    color:#e9ecef;
    text-align:center;
    font-size:.9rem;
  }

  .gn-card-footer{
    margin-top:.4rem;
    padding-top:.45rem;
    border-top:1px solid rgba(255,255,255,0.06);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:.5rem;
  }

  .gn-reactions{
    display:flex;
    align-items:center;
    gap:.4rem;
  }

  .gn-reaction{
    display:flex;
    align-items:center;
    gap:.16rem;
  }

  .gn-reaction-btn{
    border:none;
    background:transparent;
    cursor:pointer;
    font-size:1.2rem;
    line-height:1;
    padding:.1rem .2rem;
    border-radius:999px;
    transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
  }
  .gn-reaction-btn:hover:not(:disabled){
    transform:translateY(-1px) scale(1.1);
    background:rgba(255,255,255,0.06);
    box-shadow:0 3px 10px rgba(0,0,0,0.45);
  }

  .gn-reaction-count{
    font-size:.85rem;
    color:#ced4da;
    min-width:1.2rem;
    text-align:left;
  }

  .gn-card-footer-right{flex-shrink:0;}

  @media (max-width:640px){
    .gn-card-head{
      flex-direction:column;
      align-items:flex-start;
    }
    .gn-card-footer{
      flex-direction:column;
      align-items:flex-start;
    }
  }

html[data-theme="light"] .gn-card,
html[data-theme="light"] .gn-comment-card {
  background: color-mix(in srgb, var(--card) 96%, var(--card2));
  border-color: var(--border);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--shadow) 68%, transparent);
}

html[data-theme="light"] .gn-card-title a {
  color: var(--text);
}

html[data-theme="light"] .gn-card-meta,
html[data-theme="light"] .gn-cover-caption,
html[data-theme="light"] .gn-reaction-count {
  color: var(--muted);
}

html[data-theme="light"] .gn-icon-btn,
html[data-theme="light"] .gn-admin-btn {
  background: color-mix(in srgb, var(--card2) 86%, var(--card));
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="light"] .gn-card-image-fallback {
  background: linear-gradient(135deg, #e9eef8, #dfe7f5);
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  border-color: var(--border);
}

html[data-theme="light"] .gn-card-avatar,
html[data-theme="light"] .gn-article-avatar,
html[data-theme="light"] .gn-inline-media-thumb,
html[data-theme="light"] .gn-media-thumb-link {
  border-color: var(--border);
}

html[data-theme="light"] .gn-card-avatar-fallback,
html[data-theme="light"] .gn-article-avatar-fallback,
html[data-theme="light"] .gn-comment-avatar-wrap,
html[data-theme="light"] .gn-comment-avatar-fallback {
  background: color-mix(in srgb, var(--card2) 82%, #dce5f8);
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
}
