/* Растянуть DLE-форму addnews на всю ширину */
@media (min-width: 1024px) {
    .mt-6.grid form[name="entryform"] { grid-column: 1 / -1; }
  }
  
  /* Карточка/обёртка */
  .addnews-card{
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:16px;
    padding:16px;
  }
  @media (min-width: 640px){ .addnews-card{ padding:24px; } }
  
  /* Заголовок */
  .addnews-title{
    font-size:1.5rem;
    line-height:2rem;
    font-weight:800;
    letter-spacing:-.01em;
    margin:0;
  }
  .addnews-subtitle{
    margin-top:4px;
    font-size:.875rem;
    line-height:1.25rem;
    color:#64748b;
  }
  
  /* Поля */
  .addnews-grid{
    margin-top:16px;
    display:grid;
    grid-template-columns:1fr;
    gap:14px;
  }
  @media (min-width: 768px){
    .addnews-grid{ grid-template-columns:1fr 1fr; }
    .addnews-span-2{ grid-column:1 / -1; }
  }
  
  /* label */
  .addnews-label{
    display:block;
    font-size:.875rem;
    font-weight:700;
    color:#334155;
    margin-bottom:6px;
  }
  .addnews-required::after{
    content:" *";
    color:#e11d48;
    font-weight:800;
  }
  
  /* inputs/textarea/select */
  .addnews-input,
  .addnews-textarea,
  .addnews-select,
  .addnews-card input[type="text"],
  .addnews-card input[type="password"],
  .addnews-card input[type="file"],
  .addnews-card textarea,
  .addnews-card select{
    width:100%;
    border:1px solid #e2e8f0;
    background:#fff;
    border-radius:12px;
    padding:10px 14px;
    font-size:.95rem;
    outline:none;
    transition: box-shadow .15s ease, border-color .15s ease;
    box-sizing:border-box;
  }
  .addnews-textarea,
  .addnews-card textarea{ min-height:140px; resize:vertical; }
  
  .addnews-card input:focus,
  .addnews-card textarea:focus,
  .addnews-card select:focus{
    border-color:#3b82f6;
    box-shadow:0 0 0 3px rgba(59,130,246,.18);
  }
  
  /* DLE category/tags widths */
  .addnews-card .wide{ width:100% !important; }
  
  /* bb-editor box */
  .addnews-bb{
    border:1px solid #e2e8f0;
    border-radius:12px;
    overflow:hidden;
    background:#fff;
  }
  .addnews-bb .bb-editor{ padding:10px; }
  
  /* xfields table */
  .addnews-card table{ width:100%; }
  .addnews-card table td{ padding:6px 0; vertical-align:top; }
  
  /* подсказки */
  .addnews-help{
    font-size:.75rem;
    color:#64748b;
    margin-top:6px;
  }
  .addnews-note{
    margin-top:14px;
    padding:10px 12px;
    border:1px dashed #e2e8f0;
    border-radius:12px;
    background:#f8fafc;
    font-size:.875rem;
    color:#475569;
  }
  .addnews-note b{ color:#e11d48; }
  
  /* кнопки */
  .addnews-actions{
    margin-top:16px;
    padding-top:16px;
    border-top:1px solid #e2e8f0;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
    justify-content:flex-end;
  }
  .btn-primary{
    background:#2563eb;
    color:#fff;
    border:none;
    border-radius:12px;
    padding:10px 16px;
    font-weight:700;
    cursor:pointer;
    transition: background .2s ease, transform .1s ease;
  }
  .btn-primary:hover{ background:#1d4ed8; }
  .btn-primary:active{ transform: translateY(1px); }
  
  .btn-secondary{
    background:#fff;
    color:#0f172a;
    border:1px solid #e2e8f0;
    border-radius:12px;
    padding:10px 16px;
    font-weight:700;
    cursor:pointer;
    transition: background .2s ease, transform .1s ease;
  }
  .btn-secondary:hover{ background:#f8fafc; }
  .btn-secondary:active{ transform: translateY(1px); }
  
  /* captcha */
  .addnews-captcha{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
  }
  
  /* Контейнер */
  .ms2 {
    position: relative;
    width: 100%;
  }
  
  /* Основной блок (как input) */
  .ms2-control {
    width: 100%;
    min-height: 48px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 8px 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    cursor: text;
    transition: border-color .15s ease, box-shadow .15s ease;
  }
  
  .ms2-control:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.18);
  }
  
  /* Теги ВНУТРИ */
  .ms2-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: #eef2ff;
    border-radius: 999px;
    font-size: .85rem;
    line-height: 1;
    max-width: 100%;
  }
  
  .ms2-tag span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .ms2-tag button {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    padding: 0;
  }
  
  /* Инпут растягивается на всю ширину */
  .ms2-input {
    flex: 1 0 100%;
    border: 0;
    outline: 0;
    font-size: .95rem;
    padding: 6px 2px;
    min-width: 120px;
  }
  
  /* Placeholder */
  .ms2-placeholder {
    color: #94a3b8;
    font-size: .95rem;
    padding: 6px 2px;
  }
  
  /* Dropdown */
  .ms2-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15,23,42,.12);
    max-height: 320px;
    overflow: auto;
    z-index: 50;
    display: none;
  }
  
  .ms2.open .ms2-dropdown {
    display: block;
  }
  
  .ms2-item {
    padding: 10px 12px;
    font-size: .9rem;
    cursor: pointer;
  }
  
  .ms2-item:hover {
    background: #f8fafc;
  }
  
  .ms2-item[aria-selected="true"] {
    background: #e0e7ff;
  }
  
  .ms2-hidden {
    display: none !important;
  }

  