/* === Light Corporate Theme (Blue Header) — Modern UI Refresh === */
:root{
  --bg:#f4f8fc;
  --card:#ffffff;
  --text:#000000;
  --muted:#5f6b7a;
  --line:#d9e2ef;
  --accent:#1e88e5;      /* blue */
  --accent-soft:#e3f2fd;
  --radius:14px;
  --radius-sm:10px;
  --shadow:0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-sm:0 2px 10px rgba(15, 23, 42, 0.06);
}

*{ box-sizing:border-box; }

html, body{
  background: var(--bg);
  color: var(--text);
}

body{
  margin:0;
  font-size:16.5px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height:1.45;
}

/* Links */
a{ color: var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }

/* Layout */
.container{ max-width:1200px; margin:0 auto; padding: 18px 18px; }

/* Header */
.topbar{
  position: sticky;
  top:0;
  z-index: 20;
  background: linear-gradient(90deg, #1e88e5 0%, #2f9bff 100%);
  color:#ffffff;
  border-bottom:1px solid rgba(255,255,255,0.18);
  backdrop-filter:saturate(1.2);
}
.topbar .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 18px;
}
.brand a{
  font-weight: 800;
  letter-spacing: 0.2px;
  color:#ffffff;
}
.topbar .muted{ color:#eaf4ff; }
.nav{
  display:flex;
  align-items:center;
  gap: 12px;
}
.nav a{
  color:#ffffff;
  padding: 8px 10px;
  border-radius: 10px;
}
.nav a:hover{
  background: rgba(255,255,255,0.14);
  text-decoration:none;
}

/* Typography */
h1{ font-size: 20px; margin: 14px 0 12px; letter-spacing:-0.2px; }
h2{ font-size: 20px; margin: 12px 0 10px; }
h3{ font-size: 17.5px; margin: 10px 0 8px; }
.muted{ color: var(--muted); }

/* Cards */
.card{
  background: var(--card);
  border: 1px solid rgba(217,226,239,0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin: 14px 0;
}
.card:hover{
  box-shadow: var(--shadow);
  transition: box-shadow .2s ease;
}

/* Rows / grids */
.row{
  display:flex;
  gap: 12px;
  align-items:center;
}
.row.space{ justify-content: space-between; }
.actions{ margin-top: 12px; justify-content:flex-end; }
.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
@media (max-width: 860px){
  .grid2{ grid-template-columns: 1fr; }
  .nav{ flex-wrap: wrap; justify-content:flex-end; }
}

/* Forms */
label{
  display:block;
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 6px;
}
input, select, textarea{
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #ffffff;
  color: #000000;
  transition: border-color .15s ease, box-shadow .15s ease, transform .06s ease;
}
textarea{ min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus{
  outline:none;
  border-color: rgba(30,136,229,0.9);
  box-shadow: 0 0 0 4px rgba(30,136,229,0.16);
}
input:active, select:active, textarea:active{
  transform: translateY(0.5px);
}

/* Buttons */
button, .btn{
  font-family: inherit;
  font-size: inherit;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--accent);
  color:#fff;
  font-weight: 400;
  cursor:pointer;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  box-shadow: 0 5px 5px rgba(30,136,229,0.22);
}

button:hover, .btn:hover{
  transform: translateY(-1px);
  text-decoration:none;
  box-shadow: 0 10px 12px rgba(30,136,229,0.28);
}
button:active, .btn:active{ transform: translateY(0px); }
.btn.secondary{
  background:#ffffff;
  color:#000000;
  border-color: var(--line);
  box-shadow: 0 6px 10px rgba(15,23,42,0.08);
}
.btn.secondary:hover{
  background:#f5f9ff;
  box-shadow: 0 10px 22px rgba(15,23,42,0.10);
}

/* Tables */
.table-wrap{ overflow:auto; border-radius: var(--radius); }
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}
thead th{
  text-align:left;
  font-size:12px;
  letter-spacing:0.2px;
  text-transform: none;
  background: #f0f6ff;
  color:#000;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
tbody td{
  padding: 12px;
  border-bottom: 1px solid rgba(217,226,239,0.7);
}
tbody tr:hover td{
  background: rgba(227,242,253,0.35);
}
tbody tr:last-child td{ border-bottom: none; }

/* Badges */
.badge{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #0d47a1;
  border: 1px solid rgba(30,136,229,0.18);
  font-size: 12px;
  font-weight: 650;
}

/* Lists */
.list{ margin:0; padding-left: 18px; }
.list li{ margin: 6px 0; }

/* Flash */
.flash{
  background:#ffffff;
  border:1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 12px 0;
  color: var(--muted);
}

/* Footer */
.footer{
  padding: 18px 18px 28px;
  color: var(--muted);
}

/* Small tweaks */
hr{ border:0; border-top:1px solid var(--line); margin: 12px 0; }

/* ===== Report / Tables ===== */
.page-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
.page-head .actions{ display:flex; gap:10px; }

.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  margin: 14px 0;
}

.kpi{
  font-size: 34px;
  font-weight: 800;
  margin-top: 6px;
}

.table{
  width:100%;
  border-collapse:collapse;
  margin-top:10px;
}
.table th, .table td{
  padding:10px 10px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
  text-align:left;
}
.table th{
  font-size:13px;
  color: var(--muted);
  font-weight:700;
}
.table tr:hover td{
  background: rgba(30,136,229,0.04);
}

@media (max-width: 900px){
  .grid2{ grid-template-columns: 1fr; }
}
/* ===== Выполненные работы: отдельный блок, сетка как в PDF ===== */
.work-done-box {
  width: 300mm;           /* “полоса текста” как в PDF */
  max-width: 100%;
  padding: 14px 16px;
  margin-top: 8px;

  border: 2px solid #4fa3d1;   /* под цвет шапки */
  border-radius: 12px;
  background: #f5faff;
}

/* Автобалансированный список работ */
.checkbox-list.checkbox-grid {
  column-count: 3;
  column-gap: 10mm;
}

/* Строка чекбокса */
.checkbox-row {
  display: grid;
  grid-template-columns: 1fr 20px; /* фиксированная колонка под чекбокс */
  align-items: center;

  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;

  break-inside: avoid;
  page-break-inside: avoid;
}

/* Текст */
.checkbox-text {
  min-width: 0;
  font-size: 14px;
  line-height: 1.2;
}

/* Сам чекбокс */
.checkbox-row input[type="checkbox"] {
  margin: 0;
  justify-self: end;
  transform: scale(1.1);
  accent-color: #4fa3d1;
}

/* Disabled чуть приглушаем */
.checkbox-row input[type="checkbox"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hint-text {
  margin-top: 10px;
  font-size: 12.5px;
  color: #6c7a89;
}

.app-title {
  text-align: center;
  margin-bottom: 12px;
}

.app-title-main {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff; /* тёмный, читаемый */
}

.app-title-sub {
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  margin-top: 4px;
}

/* Sortable table headers */
th .th-link{
  color: inherit;
  text-decoration: none;
}
th .th-link:hover{
  text-decoration: underline;
}
/* контейнер всё так же в колонках */
.checkbox-list.checkbox-grid.grouped{
  column-count: 3;
  column-gap: 10mm;
}

/* группа целиком не рвётся между колонками */
.work-group{
  break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 12px;
}

.work-group-title{
  font-weight: 700;
  margin: 0 0 6px 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(15,23,42,0.06);
}
/* === Combo styled like native <select> in this project === */
.combo{
  position: relative;
  width: 100%;
  display: flex;
}

/* Само поле (как select) */
.combo > input{
  width: 100%;
  height: 44px;                 /* подгони под высоту select (если у тебя другой размер — поменяй тут) */
  padding: 0 44px 0 14px;       /* справа место под стрелку */
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  outline: none;
}

/* Кнопка-стрелка: визуально прячем как отдельную кнопку,
   оставляем только "стрелку", чтобы выглядело как select */
.combo-btn{
  position: absolute;
  right: 0;
  top: 0;
  height: 44px;
  width: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 12px;
}

/* Рисуем стрелку как у select */
.combo-btn::before{
  content: "▾";
  display: block;
  font-size: 16px;
  line-height: 44px;
  text-align: center;
  color: inherit;
  opacity: .75;
}

.combo > input:focus{
  box-shadow: 0 0 0 3px rgba(0,0,0,.06); /* если у тебя есть свой focus-ring — замени */
}

/* Dropdown контейнер (как меню select) */
.combo-dropdown{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  max-height: 260px;
  overflow: auto;
  z-index: 50;
}

/* Список пунктов */
.combo-list{
  list-style: none;
  margin: 0;
  padding: 6px;
}

/* Пункт (как option в select меню) */
.combo-item{
  padding: 8px 12px;     /* чуть плотнее, как у select */
  border-radius: 10px;
  cursor: pointer;
  user-select: none;

  font-size: 13px;       /* ← КЛЮЧЕВО */
  line-height: 1.3;
}


/* Hover / active */
.combo-item:hover,
.combo-item[aria-selected="true"]{
  background: var(--accent-soft);
}
/* === Static arrow inside combo input === */
.combo{
  position: relative;
}

.combo::after{
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted, #6b7280);
  border-bottom: 2px solid var(--text-muted, #6b7280);
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
}

/* место под стрелку */
.combo > input{
  padding: 0 32px 0 14px;
}
/* Скрываем select после "combo-enhance" */
select.combo-select.combo-select-enhanced{
  display: none;
}
/* === Combo dropdown: always visible above cards/grids === */
.combo{
  position: relative;
}

/* когда раскрыто — поднимаем слой */
.combo.combo-open{
  z-index: 2000;
}

.combo-dropdown{
  z-index: 2001;
}

/* На страницах с карточками/сетками dropdown часто режется overflow-ом */
.card,
.grid2{
  overflow: visible;
}
/* --- Combo: всегда поверх и без обрезания --- */
.combo{ position: relative; }

.combo-dropdown{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 3000;
}

/* Поднимаем весь combo, когда открыт */
.combo.combo-open{ z-index: 2999; }

/* В сложных сетках dropdown часто режется overflow-ом */
.grid2, .card, .table-wrap{ overflow: visible; }

/* Скрыть исходный select (важно, чтобы не мешал клику) */
select.combo-select{
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
}
/* === FIX: combo dropdown visibility (same as earlier ticket fix) === */

/* Карточки и сетки не должны резать dropdown */
.card,
.grid2{
  overflow: visible;
}

/* combo всегда локальный stacking context */
.combo{
  position: relative;
}

/* при открытии — поверх всего */
.combo.combo-open{
  z-index: 3000;
}

.combo-dropdown{
  z-index: 3001;
}
.date-range {
  max-width: 320px;
}

.date-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.date-row input {
  width: 140px;
}

.date-sep {
  color: #6b7280;
  font-weight: 500;
}

/* === OPLP UI v2: responsive navigation, tables and authentication === */
.user-chip{display:inline-flex;align-items:center;min-height:36px;padding:7px 11px;border-radius:999px;background:rgba(255,255,255,.14);font-size:14px;white-space:nowrap}
.nav-logout{background:rgba(255,255,255,.1)}
.page-head{align-items:center}
.page-head h1{margin-bottom:3px}
.page-actions{display:flex;gap:8px;flex-wrap:wrap}
.filter-bar{display:grid;grid-template-columns:minmax(240px,1fr) 220px auto;gap:12px;align-items:end}
.filter-bar label{margin-top:0}
.filter-actions{display:flex;gap:8px}
.list-meta{display:flex;justify-content:space-between;align-items:center;margin:12px 0}
.pager{display:flex;align-items:center;gap:8px}
.pager .btn{min-width:42px}
.disabled{pointer-events:none;opacity:.45}
.ticket-link{font-weight:700}
.small{font-size:12px}
.notes-cell{max-width:280px;color:var(--muted);overflow:hidden;text-overflow:ellipsis}
.table-actions{text-align:right;white-space:nowrap}
.btn.danger{background:#fff;color:#b91c1c;border-color:#fecaca;box-shadow:none}
.btn.danger:hover{background:#fef2f2;box-shadow:none}
.empty-state{text-align:center;padding:30px!important;color:var(--muted)}
.auth-page{min-height:calc(100vh - 190px);display:flex;align-items:center;justify-content:center;padding:32px 0}
.auth-card{width:min(440px,100%);background:#fff;border:1px solid var(--line);border-radius:20px;padding:30px;box-shadow:var(--shadow)}
.auth-brand{display:inline-flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:15px;background:var(--accent);color:#fff;font-weight:800;font-size:18px;letter-spacing:.5px;margin-bottom:12px}
.auth-card h1{font-size:27px;margin:0 0 4px}
.auth-subtitle{margin:0 0 22px;color:var(--muted)}
.auth-form{display:grid;gap:16px}
.auth-submit{width:100%;min-height:46px;font-size:16px}
.password-field{position:relative}
.password-field input{padding-right:90px}
.password-toggle{position:absolute;right:7px;top:7px;height:calc(100% - 14px);padding:0 10px;background:transparent;color:var(--muted);border:0;box-shadow:none;font-size:13px}
.password-toggle:hover{transform:none;box-shadow:none;color:var(--accent)}
.auth-hint{margin-top:18px;padding-top:16px;border-top:1px solid var(--line);font-size:13px;color:var(--muted);line-height:1.5}
.alert-error{border-left:4px solid #dc2626;background:#fef2f2;color:#991b1b}
button:disabled,.btn.is-loading{cursor:wait;opacity:.65;transform:none!important}

@media (max-width:760px){
  .container{padding:14px 12px}
  .topbar .container{align-items:flex-start;gap:10px;flex-direction:column}
  .app-title-main{font-size:14px}
  .app-title-sub{font-size:12px}
  .nav{width:100%;gap:5px;flex-wrap:wrap;justify-content:flex-start}
  .nav a{padding:7px 9px}
  .user-chip{order:3;font-size:12px}
  .page-head{align-items:flex-start;flex-direction:column}
  .page-actions{width:100%}
  .page-actions .btn{flex:1}
  .filter-bar{grid-template-columns:1fr}
  .filter-actions{width:100%}
  .filter-actions>*{flex:1}
  .list-meta{align-items:flex-start;gap:10px;flex-direction:column}
  .table-card{padding:8px}
  .tickets-table,.tickets-table tbody,.tickets-table tr,.tickets-table td{display:block;width:100%}
  .tickets-table thead{display:none}
  .tickets-table tr{margin:8px 0;padding:13px;border:1px solid var(--line);border-radius:14px;background:#fff}
  .tickets-table tbody tr:hover td{background:transparent}
  .tickets-table td{display:grid;grid-template-columns:94px minmax(0,1fr);gap:10px;padding:8px 4px;border:0;max-width:none!important;overflow:visible}
  .tickets-table td::before{content:attr(data-label);font-size:12px;font-weight:700;color:var(--muted)}
  .tickets-table td:first-child{padding-top:2px}
  .tickets-table td:last-child{padding-bottom:2px}
  .table-actions{text-align:left}
  .table-actions form,.table-actions button{width:100%}
  .auth-page{min-height:calc(100vh - 160px);padding:18px 0}
  .auth-card{padding:24px 18px;border-radius:16px}
}


/* === OPLP UI v2.1: unified controls === */
button, .btn{
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 9px;
  font-weight: 400;
  line-height: 1.2;
  box-shadow: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
button:hover, .btn:hover{
  transform: none;
  box-shadow: none;
}
.btn.secondary{
  box-shadow: none;
}
.btn.secondary:hover{
  box-shadow: none;
}
.btn.danger{
  background:#fff;
  color:#b91c1c;
  border-color:#e5c7c7;
  box-shadow:none;
}
.btn.danger:hover{
  background:#fff7f7;
  border-color:#dca8a8;
  box-shadow:none;
}
.btn.primary{
  background:var(--accent);
  color:#fff;
  border-color:var(--accent);
}
button:focus-visible, .btn:focus-visible{
  outline: 2px solid rgba(30,136,229,.45);
  outline-offset: 2px;
}

/* Page action groups have deliberate breathing room. */
.page-actions,
.page-head .actions,
.actions,
.filter-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.page-actions{ flex-wrap:wrap; }
.actions{ margin-top:12px; }
.table-card{
  padding:18px;
}
.table-card .table-wrap{
  border-radius:10px;
}
.tickets-table .table-actions{
  padding-left:18px;
  padding-right:18px;
}
.tickets-table .table-actions form{
  margin:0;
}
.tickets-table .table-actions .btn{
  min-width:88px;
}
.ticket-link{
  font-weight:400;
}


/* Keep headings/labels distinct, but controls themselves stay regular weight. */
button, .btn, input, select, textarea{
  font-weight:400;
}

@media (max-width:760px){
  .table-card{padding:12px;}
  .tickets-table tr{margin:10px 0;}
  .tickets-table .table-actions{
    padding-left:4px;
    padding-right:4px;
    margin-top:4px;
  }
}


/* === OPLP UI v2.2: consistent breathing room around action controls === */
.filter-actions{
  margin-top: 6px;
}

.auth-submit{
  margin-top: 4px;
}

.page-actions{
  margin-top: 4px;
}

.actions{
  margin-top: 14px;
}

@media (max-width:760px){
  .filter-actions{
    margin-top: 4px;
  }

  .page-actions{
    margin-top: 4px;
  }

  .auth-submit{
    margin-top: 4px;
  }
}




/* ===== Выполненные работы: адаптивная компоновка ===== */
@media (max-width: 700px) {
  /* На телефоне категории идут строго вертикально. */
  .work-done-box {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .checkbox-list.checkbox-grid.grouped {
    display: block;
    width: 100%;
    column-count: auto;
    column-width: auto;
    columns: auto;
  }

  .work-group {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 16px;
    break-inside: auto;
    page-break-inside: auto;
  }

  .work-group-title {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 8px;
    padding: 8px 10px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  /* Каждый пункт: чекбокс слева, текст справа. */
  .checkbox-row {
    display: grid !important;
    grid-template-columns: 20px minmax(0, 1fr) !important;
    align-items: start;
    gap: 9px;
    width: 100%;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    padding: 7px 10px;
  }

  .checkbox-row input[type="checkbox"] {
    grid-column: 1;
    grid-row: 1;
    width: 16px;
    height: 16px;
    margin: 3px 0 0;
    justify-self: start;
    align-self: start;
    transform: none;
  }

  .checkbox-text {
    grid-column: 2;
    grid-row: 1;
    display: block;
    width: auto !important;
    max-width: 100%;
    min-width: 0;
    font-size: 14px;
    line-height: 1.35;
    white-space: normal !important;
    writing-mode: horizontal-tb !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }
}


/* === Admin users: mobile-friendly table === */
.users-table .user-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.users-table .user-actions form{margin:0;}

@media (max-width:760px){
  .users-table,
  .users-table tbody,
  .users-table tr,
  .users-table td{
    display:block;
    width:100%;
    box-sizing:border-box;
  }

  .users-table thead{display:none;}

  .users-table tr{
    margin:10px 0;
    padding:12px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
  }

  .users-table td{
    display:grid;
    grid-template-columns:110px minmax(0,1fr);
    gap:10px;
    align-items:start;
    padding:8px 2px;
    border:0;
    min-width:0;
    overflow-wrap:anywhere;
  }

  .users-table td::before{
    content:attr(data-label);
    color:var(--muted);
    font-size:12px;
    font-weight:400;
  }

  .users-table td:first-child{padding-top:2px;}

  .users-table .user-actions{
    display:grid;
    grid-template-columns:1fr;
    justify-content:stretch;
    gap:7px;
    padding-top:10px;
    margin-top:4px;
    border-top:1px solid var(--line);
  }

  .users-table .user-actions::before{
    margin-bottom:1px;
  }

  .users-table .user-actions .btn,
  .users-table .user-actions form,
  .users-table .user-actions form .btn{
    width:100%;
    box-sizing:border-box;
  }
}

/* ===== Testing / Learning ===== */
.test-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.test-card h2{margin:0 0 7px}
.test-card .pre{white-space:pre-wrap}
.test-meta{margin-top:14px;color:var(--muted);font-size:14px}
.test-question-number{font-size:13px;color:var(--muted);margin-bottom:8px}
.test-question h2{font-size:18px;margin:0 0 16px}
.test-options{display:grid;gap:9px}
.test-option{display:flex;align-items:flex-start;gap:10px;margin:0;padding:12px 13px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--text);font-size:15px;cursor:pointer}
.test-option:hover{background:#f7fbff;border-color:#c7d9ed}
.test-option input{width:18px;height:18px;margin:1px 0 0;flex:0 0 auto}
.test-option span{min-width:0;overflow-wrap:anywhere}
.result-summary{display:flex;align-items:center;justify-content:space-between;gap:16px}
.result-score{font-size:38px;font-weight:700;line-height:1.1;margin:5px 0}
.result-item{padding:12px 0;border-bottom:1px solid var(--line)}
.result-item:last-child{border-bottom:0}
.result-correct{border-left:4px solid #16a34a;padding-left:12px}
.result-wrong{border-left:4px solid #dc2626;padding-left:12px}
.admin-test-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;white-space:nowrap}
.admin-test-actions form{margin:0}
.answer-editor{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px;margin:10px 0}
.admin-question h2{margin:0}

@media (max-width:760px){
  .test-card-head,.result-summary{display:block}
  .test-card-head .badge{margin-top:12px}
  .result-summary .btn{margin-top:14px;width:100%}
  .answer-editor{grid-template-columns:1fr}
  .admin-test-actions{display:grid;grid-template-columns:1fr;justify-content:stretch;gap:7px;white-space:normal}
  .admin-test-actions .btn,.admin-test-actions form,.admin-test-actions form .btn{width:100%;box-sizing:border-box}
}

.leaderboard-inline{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.leaderboard-inline h3{margin:0 0 8px;font-size:16px}
.leaderboard-table th,.leaderboard-table td{padding:9px 10px}
