
/* --- Admin UI (only admin pages) --- */

/* Container & cards */
.admin-container{max-width:1100px;margin:24px auto;padding:0 16px;}
.section{background:#fff;border-radius:16px;box-shadow:0 6px 18px rgba(20,20,43,.06);padding:20px;margin-bottom:20px;}
.section h1,.section h2,.section h3{margin:0 0 14px;font-weight:800}

/* Topbar */
.topbar-actions{display:flex;gap:12px;margin-bottom:12px;justify-content:flex-end}
.topbar-actions .btn{background:#4f46e5;color:#fff;border:1px solid transparent;box-shadow:0 10px 20px rgba(79,70,229,.15)}
.topbar-actions .btn:hover{background:#4338ca}

/* Form grid */
.form-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:12px}
.form-item{grid-column:span 6;display:flex;align-items:center;gap:10px}
.form-item--full{grid-column:span 12}
.form-item label{min-width:180px;color:#111827;font-size:14px}

/* Inputs */
.form-item input,.form-item select,.form-item textarea{
  flex:1 1 auto;width:100%;min-width:0;box-sizing:border-box;
  padding:10px 12px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;font-size:14px;line-height:1.4
}
.form-item textarea{min-height:90px}

/* Buttons */
.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
.btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:12px;border:1px solid transparent;background:#4f46e5;color:#fff;font-weight:600;cursor:pointer;transition:.2s;box-shadow:0 10px 20px rgba(79,70,229,.15)}
.btn:hover{background:#4338ca}
.btn.secondary{background:#f3f4f6;color:#111827;border:1px solid #e5e7eb;box-shadow:none}
.btn.danger{background:#ef4444;box-shadow:0 10px 20px rgba(239,68,68,.15)}

/* Helper text */
.help{margin-top:6px;color:#6b7280;font-size:12px}

/* Logo card */
.logo-card{display:grid;grid-template-columns:120px 1fr;gap:12px;align-items:center}
.logo-card img{max-width:120px;height:auto;border-radius:10px;border:1px solid #e5e7eb}

/* Report table */
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:10px 12px;border-bottom:1px solid #f1f5f9;text-align:left;vertical-align:top}
.table th{color:#6b7280;font-weight:700}
.table .num{text-align:right;white-space:nowrap}

/* Prevent overflow */
.section *{max-width:100%}

/* Responsive */
@media (max-width:1024px){
  .form-item{grid-column:span 12}
  .logo-card{grid-template-columns:1fr}
}
.survey-bg .container-card .btn{
  height:52px; padding:0 22px; border-radius:14px; font-weight:600;
}

.table.table-fixed { table-layout: fixed; width: 100%; }
.table .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-right { text-align: right; }
.actions-right { display: inline-flex; gap: 8px; justify-content: flex-end; flex-wrap: nowrap; }
.actions-right .btn { white-space: nowrap; }
@media (max-width: 960px) {
  .table .ellipsis { white-space: normal; }
  .ta-right { white-space: nowrap; }
}
.table.table-fixed { table-layout: fixed; width: 100%; }
.table .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-right { text-align: right; }
@media (max-width: 960px) {
  .table .ellipsis { white-space: normal; }
}
.table.table-fixed { table-layout: fixed; width: 100%; }
.table .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-right { text-align: right; }

/* Горизонтальный скролл для широких таблиц */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Таблица пошире, чтобы влезли все колонки */
.table--wide { min-width: 1400px; } /* при необходимости увеличь */

/* Не переносим, режем многоточием */
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Немного больше места под UA */
.col-ua { width: 520px; }     /* можно 480–640 по вкусу */
.col-cookie { width: 320px; } /* если cookie тоже длинный */
/* Вертикальная укладка инпута с подсказкой */
.form-item .field {
  display: flex;
  flex-direction: column;
  gap: 6px;             /* расстояние между input и .help */
  width: 100%;
}

/* чтобы label остался слева, как и было */
.form-item { align-items: flex-start; }  /* вместо center, чтоб help не пытался выровняться по вертикали */
.form-item { align-items: flex-start; }          /* чтобы блоки выравнивались сверху */
.form-item .field {
  display: flex;
  flex-direction: column;                        /* инпут → help вертикально */
  gap: 6px;
  width: 100%;
}