body {
    font-family: Arial;
    background: #0b1220;
    color: #eef;
    margin: 0
}

nav {
    display: flex;
    gap: 12px;
    background: #111a33;
    padding: 10px 16px;
    border-bottom: 1px solid #223
}

nav a {
    color: #cde;
    text-decoration: none;
    background: #152042;
    padding: 6px 10px;
    border-radius: 8px
}

nav a:hover {
    background: #1b2a57
}

main {
    padding: 16px
}

.card {
    background: #0f1526;
    border: 1px solid #1f2b46;
    border-radius: 12px;
    padding: 16px;
    margin: 12px
}




.inline {
    display: inline
}

.badge {
    padding: 2px 6px;
    border: 1px solid #38496e;
    border-radius: 6px;
    background: #27304d
}

.badge.ok {
    background: #203b28;
    border-color: #366246
}
:root{
  --actions-w: 0px;
  --bg-card: #0f1526;
  --bg-table-head: #111a33;
  --bg-table-row: #0f1526;
  --bg-table-row-alt: #101a33;
  --bg-sticky: #0f1526;
  --border-1: #1f2b46;
  --text-1: #eef;
}

/* Контейнер со скроллом БЕЗ внутренних отступов справа */
.table-wrap{
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-1);
  background: var(--bg-card);
}

/* Ключевой трюк: отступ по ПРАВОМУ краю у самой таблицы,
   чтобы полотно таблицы заканчивалось ровно перед actions-колонкой */
table.table{
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;       /* весь текст виден, скроллим по X */
  white-space: nowrap;
  background: var(--bg-card);
  color: var(--text-1);
  margin-right: var(--actions-w);   /* << вот это двигает край таблицы влево на ширину actions */
}

.table th, .table td{
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-1);
  text-align: left;
  vertical-align: top;
}

.table th{
  background: var(--bg-table-head);
  position: sticky;
  top: 0;
  z-index: 2;
}

/* зебра */
.table-striped tbody tr:nth-child(odd){ background: var(--bg-table-row); }
.table-striped tbody tr:nth-child(even){ background: var(--bg-table-row-alt); }

/* Липкая колонка действий справа — остаётся частью таблицы,
   но прилипает к правому краю видимой области */
th.actions, td.actions{
  position: sticky;
  right: 0;
  background: var(--bg-sticky);
  z-index: 3;
  width: var(--actions-w);
  min-width: var(--actions-w);
  border-left: 1px solid var(--border-1); /* визуальная «кромка» между данными и кнопками */
}

/* Вертикальный стек кнопок */
td.actions .stack{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Кнопки */
.btn{background:#254080;border:1px solid #3851a6;border-radius:8px;color:#fff;padding:6px 10px;text-decoration:none}

.btn_user{
  display: inline-block;
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.2;
  border: 1px solid var(--border-1);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  color: var(--text-1);
  background: #152042;
}
.btn_user.btn_user:hover{ filter: brightness(1.05); }
.btn_user.primary{ background:#21408f; }
.btn_user.success{ background:#1d5f3b; }
.btn_user.warn{    background:#7a5b0a; }
.btn_user.err{     background:#7a1d1d; }
.btn_user.muted{   background:#1a223e; }

/* Адаптив — можно чуть сузить колонку действий */
@media (max-width: 1200px){
  :root{ --actions-w: 140px; }
}
@media (max-width: 900px){
  :root{ --actions-w: 128px; }
  .btn{ font-size: 11px; padding: 5px 6px; }
}
@media (max-width: 720px){
  :root{ --actions-w: 112px; }
  .btn{ font-size: 10px; padding: 4px 6px; }
}

.filter-form {
    margin-bottom: 12px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: flex-end;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.filter-field label {
    font-size: 12px;
    opacity: 0.8;
}

.filter-field input,
.filter-field select {
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid #2b3550;
    background: #0b1220;
    color: #eef;
}

.filter-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
.title-cell { display:flex; align-items:center; gap:6px; max-width: 520px; }
  .title-short { display:inline-block; line-height: 1.2; }

  .title-arrow{
    border:none;
    background:transparent;
    cursor:pointer;
    padding: 0 4px;
    font-size: 12px;
    opacity: .65;
  }
  .title-arrow:hover{ opacity: 1; transform: translateX(1px); }

  /* modal */
  .modal-backdrop{
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    display:none;
    align-items:center; justify-content:center;
    z-index: 9999;
  }
  .modal-card{
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  color: var(--text-1);
  width: min(760px, 92vw);
  border-radius: 14px;
  padding: 18px 18px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.modal-title{
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-1);
}

.modal-body{
  white-space: pre-wrap;
  max-height: 60vh;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--border-1);
  border-radius: 10px;
  background: #0b1220; /* как у input background */
  color: var(--text-1);
}
.modal-actions{ display:flex; justify-content:flex-end; gap:8px; margin-top: 12px; }

a.disabled { pointer-events:none; opacity:.45; }
