:root {
    --bg: #f0f2f5;
    --card: #ffffff;
    --text: #1c1e21;
    --accent: #007bff;
    --border: #ced4da;
    --step-bg: #e7f3ff;
    --fix-bg: #fff9e6;
    --text-dim: #65676b;
    --success: #2ecc71;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --card: #1e293b;
    --text: #f8fafc;
    --accent: #38bdf8;
    --border: #334155;
    --step-bg: rgba(56, 189, 248, 0.1);
    --fix-bg: rgba(255, 193, 7, 0.1);
    --text-dim: #94a3b8;
}

body {
    font-family: -apple-system, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 15px;
    transition: 0.3s;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 80px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.theme-btn {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 16px;
    box-sizing: border-box;
    outline: none;
}

.filter-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-dim);
    margin: 15px 0 5px;
    display: block;
    text-transform: uppercase;
}

.filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.f-pill {
    flex: 1;
    text-align: center;
    padding: 10px 5px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.f-pill.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    font-weight: bold;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.brand-chip {
    padding: 12px 5px;
    background: var(--card);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--text);
}

.brand-chip.selected {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

.card {
    background: var(--card);
    padding: 20px;
    border-radius: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    display: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    position: relative;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.error-code {
    font-size: 36px;
    font-weight: 900;
    color: var(--accent);
    margin: 5px 0;
}

.led-results {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
}

.led-tag {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.steps-container {
    margin: 15px 0;
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

.step-item {
    background: var(--step-bg);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 6px;
    border-left: 4px solid var(--accent);
    line-height: 1.4;
}

.fix {
    background: var(--fix-bg);
    padding: 15px;
    border-radius: 14px;
    font-size: 14px;
    border-left: 4px solid #ffc107;
}

.admin-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 12px;
    text-align: center;
    z-index: 1000;
}

.admin-btn {
    display: inline-block;
    padding: 10px 25px;
    background: var(--accent);
    color: white !important;
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
}

.universal-badge {
    background: var(--accent);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    margin-left: 5px;
}
.btn-save {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.btn-save:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(46, 204, 113, 0.2);
}

/* Иконка внутри кнопки (опционально) */
.btn-save::before {
    content: "💾";
    font-size: 20px;
}
.btn-delete {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: #e74c3c;
    border: 2px solid #e74c3c;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-delete:hover {
    background: #e74c3c;
    color: white;
}

.btn-delete:active {
    transform: scale(0.98);
}
.logout-btn {
    padding: 8px 15px;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid #e74c3c;
    border-radius: 10px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    transition: 0.2s;
}

.logout-btn:hover {
    background: #e74c3c;
    color: white;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}
/* --- Стили для Админ-панели 2026 --- */

/* Контейнеры форм */
.section {
    background: var(--card);
    padding: 20px;
    border-radius: 18px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

/* Поля ввода в админке */
textarea {
    min-height: 100px;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
}

/* Сетка для выбора светодиодов */
.led-row {
    display: grid;
    grid-template-columns: 100px 1fr 80px;
    gap: 10px;
    margin-bottom: 8px;
    align-items: center;
    background: rgba(0, 0, 0, 0.03);
    padding: 8px 12px;
    border-radius: 10px;
}

/* Адаптация сетки под темную тему */
[data-theme="dark"] .led-row {
    background: rgba(255, 255, 255, 0.05);
}

/* Кнопка удаления */
.btn-delete {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: #e74c3c;
    border: 2px solid #e74c3c;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 15px;
}

.btn-delete:hover {
    background: #e74c3c;
    color: white;
}

/* Навигация вверху админки */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}