/* ============================================
   DataHelperKapBot — Тёмная тема админ-панели
   ============================================ */

/* --- CSS-переменные --- */
:root {
    --bg-body: #0d1117;
    --bg-surface: #161b22;
    --bg-surface-hover: #1c2128;
    --bg-input: #0d1117;
    --border: #30363d;
    --border-hover: #484f58;
    --text-primary: #e6edf3;
    --text-secondary: #c9d1d9;
    --text-muted: #8b949e;
    --text-faint: #484f58;
    --text-heading: #f0f6fc;
    --accent: #58a6ff;
    --accent-hover: #79c0ff;
    --accent-bg: rgba(88, 166, 255, .15);
    --primary: #1f6feb;
    --primary-hover: #388bfd;
    --green: #3fb950;
    --green-bg: rgba(46, 160, 67, .15);
    --red: #f85149;
    --red-bg: rgba(248, 81, 73, .15);
    --yellow: #d29922;
    --yellow-bg: rgba(210, 153, 34, .15);
    --purple: #bc8cff;
    --purple-bg: rgba(188, 140, 255, .15);
    --radius: 10px;
    --radius-sm: 6px;
    --shadow-card: 0 1px 3px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.15);
    --shadow-card-hover: 0 4px 16px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.2);
    --transition: .2s ease;
}

/* --- Сброс и базовые стили --- */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Кастомный скроллбар */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #484f58; }

::selection { background: rgba(88, 166, 255, .3); color: #fff; }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4 { color: var(--text-heading); margin-top: 0; font-weight: 600; }
h1 { font-size: 24px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
h2 { font-size: 18px; margin-bottom: 14px; }
h3 { font-size: 16px; margin-bottom: 10px; }
h4 { margin: 0 0 10px; }

/* --- Верхняя панель --- */
.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    height: 56px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(22, 27, 34, .92);
}
.topbar .brand {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-heading);
    white-space: nowrap;
    margin-right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--transition);
}
.topbar .brand:hover { text-decoration: none; color: var(--accent); }
.topbar .links {
    flex: 1;
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.topbar .links::-webkit-scrollbar { display: none; }
.topbar .links a {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
    position: relative;
}
.topbar .links a:hover {
    background: rgba(255,255,255,.06);
    color: var(--text-heading);
    text-decoration: none;
}
.topbar .links a.nav-active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 1px 4px rgba(31, 111, 235, .3);
}
.topbar .user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}
.topbar .user span {
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255,255,255,.06);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

/* --- Контейнер --- */
.container {
    padding: 28px 24px 40px;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn .3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Хлебные крошки --- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 16px;
    color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-faint); }

/* --- Карточки --- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.card {
    background: var(--bg-surface);
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-card);
}
.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}
.card .label {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}
.card .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.1;
}
.card .value.small { font-size: 16px; font-weight: 500; }
.card .value.accent { color: var(--accent); }
.card .value.green { color: var(--green); }
.card .value.red { color: var(--red); }

/* --- Таблицы --- */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
}
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
    font-size: 13px;
}
th, td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #21262d;
    white-space: nowrap;
}
th {
    background: var(--bg-surface-hover);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    position: sticky;
    top: 0;
    z-index: 2;
}
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(255,255,255,.03); }
tbody tr:last-child td { border-bottom: none; }
td a { font-weight: 600; }

/* --- Формы и поля ввода --- */
input, select, textarea {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, .12);
}
input::placeholder { color: var(--text-faint); }
select { cursor: pointer; appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }

/* --- Кнопки --- */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #21262d;
    color: var(--text-primary);
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
    font-family: inherit;
    text-decoration: none;
}
button:hover, .btn:hover {
    background: #30363d;
    border-color: var(--border-hover);
    text-decoration: none;
}
button:active, .btn:active { transform: scale(.97); }

button.primary, .btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 1px 4px rgba(31, 111, 235, .25);
}
button.primary:hover, .btn.primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 2px 8px rgba(31, 111, 235, .35);
}

button.danger, .btn.danger {
    background: #da3633;
    border-color: #da3633;
    color: #fff;
}
button.danger:hover, .btn.danger:hover {
    background: var(--red);
    border-color: var(--red);
}

button.success, .btn.success {
    background: #238636;
    border-color: #238636;
    color: #fff;
}
button.success:hover, .btn.success:hover {
    background: #2ea043;
    border-color: #2ea043;
}

button.sm, .btn.sm { padding: 4px 10px; font-size: 12px; }

/* Legacy compat */
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-danger { background: #da3633; border-color: #da3633; color: #fff; }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }

form.inline { display: inline-flex; }

/* --- Формы-группы --- */
.form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 16px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.form-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* --- Секции с разделителями --- */
.settings-section {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}
.settings-section h2 {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #21262d;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-section .hint {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 8px;
    font-style: italic;
}

/* --- Бейджи --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
    white-space: nowrap;
}
.badge.active, .badge.status-assigned, .badge.status-waiting-code {
    background: rgba(46, 160, 67, .2);
    color: var(--green);
    border: 1px solid rgba(46, 160, 67, .3);
}
.badge.status-queued {
    background: var(--accent-bg);
    color: var(--accent);
    border: 1px solid rgba(88, 166, 255, .25);
}
.badge.status-success {
    background: rgba(46, 160, 67, .25);
    color: var(--green);
    border: 1px solid rgba(46, 160, 67, .4);
}
.badge.status-hold, .badge.status-code-received {
    background: var(--yellow-bg);
    color: var(--yellow);
    border: 1px solid rgba(210, 153, 34, .3);
}
.badge.terminal, .badge.status-cancelled, .badge.status-closed,
.badge.status-too-many, .badge.status-immediate-drop,
.badge.status-cancelled-by-cold, .badge.status-cancelled-by-supplier,
.badge.status-too-many-attempts {
    background: rgba(139, 148, 158, .15);
    color: var(--text-muted);
    border: 1px solid rgba(139, 148, 158, .25);
}
.badge.status-invalid, .badge.status-expired, .badge.status-replaced,
.badge.status-invalid-code, .badge.status-expired-code {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(248, 81, 73, .25);
}
.badge.status-repeat, .badge.status-repeat-requested {
    background: var(--purple-bg);
    color: var(--purple);
    border: 1px solid rgba(188, 140, 255, .25);
}

/* Роли */
.badge.role-admin {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(248, 81, 73, .25);
}
.badge.role-team-lead, .badge.role-team\_lead {
    background: var(--yellow-bg);
    color: var(--yellow);
    border: 1px solid rgba(210, 153, 34, .25);
}
.badge.role-cold {
    background: var(--accent-bg);
    color: var(--accent);
    border: 1px solid rgba(88, 166, 255, .25);
}
.badge.role-supplier {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(46, 160, 67, .25);
}

/* Да/Нет */
.badge.yes {
    background: rgba(46, 160, 67, .2);
    color: var(--green);
    border: 1px solid rgba(46, 160, 67, .3);
}
.badge.no {
    background: rgba(139, 148, 158, .15);
    color: var(--text-muted);
    border: 1px solid rgba(139, 148, 158, .25);
}
.badge.warn {
    background: var(--yellow-bg);
    color: var(--yellow);
    border: 1px solid rgba(210, 153, 34, .3);
}

/* --- Уведомления --- */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown .25s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.alert.error, .alert.alert-danger {
    background: rgba(248, 81, 73, .1);
    border-color: rgba(248, 81, 73, .3);
    color: var(--red);
}
.alert.ok, .alert.success, .alert.alert-success {
    background: rgba(46, 160, 67, .1);
    border-color: rgba(46, 160, 67, .3);
    color: var(--green);
}
.alert.info {
    background: rgba(88, 166, 255, .1);
    border-color: rgba(88, 166, 255, .3);
    color: var(--accent);
}

/* --- Live events --- */
.live-feed {
    background: var(--bg-surface);
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    height: 260px;
    overflow: auto;
    font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.8;
    color: var(--text-muted);
    box-shadow: var(--shadow-card);
}
.live-feed .event-line {
    color: var(--text-secondary);
    padding: 2px 0;
    animation: slideDown .2s ease;
}
.live-feed .event-time { color: var(--text-faint); }
.live-feed .event-type { color: var(--accent); font-weight: 600; }

/* --- Фильтры --- */
.filters {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filters a {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: all .15s;
}
.filters a:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: #21262d;
    text-decoration: none;
}
.filters a.filter-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 1px 4px rgba(31, 111, 235, .25);
}

/* --- Таймлайн --- */
.timeline {
    position: relative;
    padding-left: 28px;
    margin-bottom: 24px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--border));
    border-radius: 1px;
}
.timeline-item {
    position: relative;
    padding: 14px 18px;
    margin-bottom: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color var(--transition);
    box-shadow: var(--shadow-card);
}
.timeline-item:hover { border-color: var(--border-hover); }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 18px;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg-body);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, .25);
}
.timeline-item .tl-time {
    font-size: 11px;
    color: var(--text-faint);
    margin-bottom: 4px;
}
.timeline-item .tl-event {
    font-weight: 600;
    color: var(--accent);
    font-size: 13px;
}
.timeline-item .tl-actor {
    font-size: 12px;
    color: var(--text-muted);
}
.timeline-item .tl-note {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #21262d;
}

/* --- Страница входа --- */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: radial-gradient(ellipse at 50% 0%, rgba(31,111,235,.08) 0%, transparent 60%);
}
.login-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 44px 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
    animation: fadeIn .4s ease;
}
.login-card h1 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 8px;
    justify-content: center;
}
.login-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 28px;
}
.login-card .form-field {
    margin-bottom: 16px;
}
.login-card .form-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.login-card .form-field input {
    width: 100%;
    padding: 10px 14px;
}
.login-card button {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    font-size: 14px;
}

/* --- Секции --- */
.section {
    margin-bottom: 28px;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.section-header h2 { margin-bottom: 0; }

/* --- Пустая таблица --- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-faint);
    font-size: 14px;
}
.empty-state .icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: .5;
}

/* --- Пагинация --- */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all .15s;
}
.pagination a:hover {
    background: #21262d;
    border-color: var(--border-hover);
    text-decoration: none;
}
.pagination .current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* --- Адаптивность --- */
@media (max-width: 768px) {
    .topbar { padding: 0 12px; gap: 8px; }
    .topbar .brand { font-size: 14px; }
    .topbar .links a { padding: 6px 10px; font-size: 12px; }
    .container { padding: 16px 12px; }
    .cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .card { padding: 14px; }
    .card .value { font-size: 24px; }
    .form-row { flex-direction: column; }
    .form-row > * { width: 100%; }
    .settings-section { padding: 16px; }
    h1 { font-size: 20px; }
}

@media (max-width: 480px) {
    .topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; }
    .topbar .links { order: 3; width: 100%; }
    .cards { grid-template-columns: 1fr 1fr; }
}

/* --- Утилиты --- */
.text-muted { color: var(--text-muted); }
.text-small { font-size: 12px; }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ===== СТАТИСТИКА ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    margin-top: 10px;
}
.stat-card {
    background: rgba(255,255,255,.03);
    border-radius: var(--radius);
    padding: 18px 14px;
    text-align: center;
    border: 1px solid var(--border);
    transition: border-color var(--transition), transform var(--transition);
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.stat-card.success { border-color: rgba(46, 160, 67, .4); }
.stat-card.danger  { border-color: rgba(248, 81, 73, .4); }
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.1;
}
.stat-card.success .stat-value { color: var(--green); }
.stat-card.danger  .stat-value { color: var(--red); }
.stat-label {
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: 6px;
}
.empty { color: var(--text-faint); font-style: italic; }

/* --- Фильтр периода статистики --- */
.period-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}
.date-range-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.date-range-form label {
    color: var(--text-muted);
    font-size: .85rem;
}
.date-range-form input[type="date"] {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: .85rem;
}
.date-range-form input[type="date"]:focus {
    border-color: var(--accent);
    outline: none;
}

/* --- Тултипы --- */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(.9);
    background: #2d333b;
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s, transform .15s;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* --- Прогресс-бары --- */
.progress-bar {
    height: 6px;
    background: rgba(255,255,255,.06);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}
.progress-bar .fill {
    height: 100%;
    border-radius: 3px;
    transition: width .5s ease;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.progress-bar .fill.green { background: linear-gradient(90deg, #238636, var(--green)); }
.progress-bar .fill.red { background: linear-gradient(90deg, #da3633, var(--red)); }

/* --- Действия в таблице --- */
.actions-cell {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* --- Пустая иконка --- */
.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: .3;
    display: block;
}

/* --- Back link --- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    transition: color var(--transition);
}
.back-link:hover { color: var(--accent); text-decoration: none; }

/* --- Info grid для деталей --- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.info-item {
    background: var(--bg-surface);
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}
.info-item .info-label {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.info-item .info-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-heading);
}
