/* ========== ПОЛНЫЙ АДАПТИВНЫЙ ДИЗАЙН ========== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

:root {
--primary: #4361ee;
--primary-light: #4895ef;
--primary-dark: #3f37c9;
--secondary: #4cc9f0;
--success: #4ade80;
--success-dark: #22c55e;
--warning: #fbbf24;
--warning-dark: #f59e0b;
--danger: #f87171;
--danger-dark: #ef4444;
--info: #38bdf8;
--dark: #1e293b;
--darker: #0f172a;
--light: #f8fafc;
--gray: #94a3b8;
--gray-dark: #475569;
--gray-light: #cbd5e1;

--gradient-primary: linear-gradient(135deg, #4361ee, #4cc9f0);
--gradient-success: linear-gradient(135deg, #22c55e, #86efac);
--gradient-warning: linear-gradient(135deg, #f59e0b, #fbbf24);
--gradient-danger: linear-gradient(135deg, #ef4444, #f87171);
--gradient-info: linear-gradient(135deg, #0f2b3d, #1e4b8a);

--shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);

--font-mono: 'Courier New', monospace;
}

body {
background: linear-gradient(135deg, #0f172a, #1e293b);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
padding: 20px;
color: white;
min-height: 100vh;
}

/* ========== АДАПТИВНЫЙ КОНТЕЙНЕР ========== */
.adaptive-container {
max-width: 1400px;
margin: 0 auto;
width: 100%;
}

/* ========== АДАПТИВНЫЕ ЗАГОЛОВКИ ========== */
.adaptive-title {
color: white;
font-weight: 800;
font-size: clamp(1.5rem, 5vw, 2rem);
margin: 0;
letter-spacing: -0.5px;
line-height: 1.2;
word-break: break-word;
}

.adaptive-subtitle {
color: #38bdf8;
margin: 5px 0 0 0;
font-size: clamp(0.9rem, 3vw, 1rem);
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 5px;
}

/* ========== АДАПТИВНЫЕ СЕТКИ ========== */
.grid-3 {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 25px;
margin-bottom: 30px;
}

.grid-2 {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 25px;
margin-bottom: 25px;
}

.grid-4 {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
}

.grid-auto {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 25px;
}

/* ========== АДАПТИВНЫЕ КАРТОЧКИ ========== */
.card {
background: rgba(255,255,255,0.05);
border-radius: 20px;
padding: clamp(15px, 3vw, 25px);
backdrop-filter: blur(10px);
border: 1px solid rgba(56,189,248,0.2);
height: fit-content;
width: 100%;
overflow: hidden;
}

.card-header {
display: flex;
align-items: center;
gap: clamp(10px, 2vw, 15px);
margin-bottom: 20px;
flex-wrap: wrap;
}

.card-icon {
width: clamp(40px, 8vw, 50px);
height: clamp(40px, 8vw, 50px);
background: linear-gradient(135deg, #4361ee, #4cc9f0);
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}

.card-icon i {
color: white;
font-size: clamp(18px, 4vw, 24px);
}

.card-title {
color: white;
font-weight: 700;
font-size: clamp(1.1rem, 4vw, 1.3rem);
margin: 0;
word-break: break-word;
}

.card-icon-warning {
background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.card-icon-success {
background: linear-gradient(135deg, #22c55e, #86efac);
}

.card-icon-danger {
background: linear-gradient(135deg, #ef4444, #f87171);
}

/* ========== ИНФО-БЛОКИ ========== */
.info-block {
margin-bottom: 15px;
padding: clamp(10px, 2vw, 12px);
background: rgba(0,0,0,0.3);
border-radius: 12px;
width: 100%;
}

.info-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 5px;
flex-wrap: wrap;
gap: 8px;
}

.info-label {
color: #a5d8ff;
font-size: clamp(0.8rem, 2.5vw, 0.9rem);
word-break: break-word;
flex: 1;
}

.info-badge {
color: #4ade80;
font-family: monospace;
font-size: clamp(0.8rem, 2.5vw, 0.9rem);
white-space: nowrap;
}

.info-desc {
font-size: clamp(0.75rem, 2.2vw, 0.85rem);
color: #94a3b8;
word-break: break-word;
}

.info-detail {
font-size: clamp(0.7rem, 2vw, 0.8rem);
color: #64748b;
margin-top: 5px;
}

/* ========== КАРТОЧКИ ОШИБОК ========== */
.error-card {
margin-bottom: 15px;
padding: 12px;
background: rgba(239,68,68,0.15);
border-radius: 12px;
border-left: 4px solid #f87171;
}

.error-header {
display: flex;
justify-content: space-between;
margin-bottom: 8px;
flex-wrap: wrap;
gap: 8px;
}

.error-code {
color: white;
font-weight: 600;
font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.error-index {
color: #f87171;
font-family: monospace;
}

.error-desc {
font-size: clamp(0.8rem, 2.2vw, 0.9rem);
color: #cbd5e1;
}

.error-symptom {
font-size: clamp(0.75rem, 2vw, 0.85rem);
color: #94a3b8;
margin-top: 5px;
}

/* ========== СОЛЕНОИДЫ ========== */
.solenoid-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 15px;
}

.solenoid-item {
background: rgba(255,255,255,0.05);
padding: 12px;
border-radius: 12px;
}

.solenoid-name {
color: #a5d8ff;
font-weight: 600;
margin-bottom: 5px;
font-size: clamp(0.8rem, 2.2vw, 0.9rem);
}

.solenoid-index {
font-family: monospace;
color: #4ade80;
font-size: clamp(0.75rem, 2vw, 0.85rem);
}

.solenoid-type {
font-size: clamp(0.7rem, 1.8vw, 0.8rem);
color: #94a3b8;
}

/* ========== ИНСТРУКЦИЯ ========== */
.instruction-card {
background: linear-gradient(135deg, #1e293b, #0f172a);
border-radius: clamp(24px, 5vw, 48px);
padding: clamp(20px, 4vw, 40px);
margin: 40px 0;
color: white;
border: 1px solid rgba(255,255,255,0.1);
width: 100%;
overflow: hidden;
}

.instruction-header {
display: flex;
align-items: center;
gap: clamp(15px, 3vw, 20px);
margin-bottom: 30px;
border-bottom: 2px solid rgba(76,201,240,0.3);
padding-bottom: 20px;
flex-wrap: wrap;
}

.instruction-icon {
width: clamp(60px, 12vw, 80px);
height: clamp(60px, 12vw, 80px);
background: linear-gradient(135deg, #4361ee, #4cc9f0);
border-radius: clamp(20px, 4vw, 30px);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}

.instruction-icon i {
color: white;
font-size: clamp(30px, 6vw, 40px);
}

.instruction-title {
color: white;
font-weight: 800;
font-size: clamp(1.5rem, 5vw, 2.5rem);
margin: 0;
letter-spacing: -0.5px;
line-height: 1.2;
}

/* ========== КАРТОЧКИ ШАГОВ ========== */
.step-card {
background: rgba(0,0,0,0.3);
border-radius: 24px;
padding: clamp(15px, 3vw, 25px);
position: relative;
overflow: hidden;
height: 100%;
}

.step-number {
position: absolute;
top: 10px;
right: 10px;
width: 40px;
height: 40px;
background: var(--primary);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 800;
font-size: 1.5rem;
}

.step-number.warning {
background: var(--warning);
color: black;
}

.step-number.success {
background: var(--success);
color: black;
}

.step-icon {
width: clamp(50px, 8vw, 60px);
height: clamp(50px, 8vw, 60px);
background: linear-gradient(135deg, #4361ee, #4cc9f0);
border-radius: 20px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 15px;
}

.step-icon i {
color: white;
font-size: clamp(22px, 4vw, 28px);
}

.step-title {
color: white;
font-weight: 700;
font-size: clamp(1.1rem, 3.5vw, 1.4rem);
margin-bottom: 15px;
}

/* ========== РЕЖИМЫ ========== */
.mode-card {
background: linear-gradient(135deg, rgba(67,97,238,0.2), rgba(76,201,240,0.1));
border-radius: 24px;
padding: clamp(15px, 3vw, 25px);
border-left: 6px solid var(--primary);
}

.mode-card.medium {
background: linear-gradient(135deg, rgba(74,222,128,0.2), rgba(34,197,94,0.1));
border-left-color: var(--success);
}

.mode-card.hard {
background: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(248,113,113,0.1));
border-left-color: var(--danger);
}

.mode-header {
display: flex;
align-items: center;
gap: 15px;
margin-bottom: 15px;
flex-wrap: wrap;
}

.mode-name {
color: white;
font-weight: 700;
font-size: clamp(1.2rem, 4vw, 1.5rem);
margin: 0;
}

.mode-pressure-box {
background: rgba(255,255,255,0.1);
border-radius: 12px;
padding: 12px;
margin-bottom: 15px;
}

.mode-pressure {
display: flex;
justify-content: space-between;
color: #a5d8ff;
font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.mode-pressure-value {
color: #4ade80;
font-weight: 700;
}

.mode-cars {
color: #cbd5e1;
margin-bottom: 10px;
font-size: clamp(0.8rem, 2.2vw, 0.9rem);
}

.mode-desc {
color: #94a3b8;
font-size: clamp(0.8rem, 2.2vw, 0.9rem);
}

/* ========== СЦЕНАРИИ ========== */
.scenario-card {
background: #1e293b;
border-radius: 24px;
padding: clamp(15px, 3vw, 25px);
}

.scenario-icon {
width: 40px;
height: 40px;
background: var(--primary);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 15px;
}

.scenario-icon.warning {
background: var(--warning);
}

.scenario-icon.danger {
background: var(--danger);
}

.scenario-icon i {
color: white;
}

.scenario-title {
color: white;
font-weight: 700;
font-size: clamp(1rem, 3vw, 1.2rem);
margin-bottom: 15px;
}

.scenario-desc {
color: #cbd5e1;
margin-bottom: 15px;
font-size: clamp(0.8rem, 2.2vw, 0.9rem);
}

.scenario-solution {
background: #0f172a;
border-radius: 50px;
padding: clamp(10px, 2vw, 12px) clamp(15px, 3vw, 20px);
color: #4ade80;
font-size: clamp(0.8rem, 2.2vw, 0.9rem);
word-break: break-word;
}

/* ========== КНОПКИ ========== */
.badge {
display: inline-block;
padding: 4px 12px;
border-radius: 50px;
font-size: clamp(0.7rem, 2vw, 0.8rem);
font-weight: 600;
}

.badge-warning {
background: var(--warning);
color: black;
}

.badge-info {
background: var(--info);
color: black;
}

.tag {
background: rgba(74,222,128,0.1);
padding: 8px 15px;
border-radius: 60px;
border: 1px solid rgba(74,222,128,0.3);
color: #4ade80;
font-size: clamp(0.75rem, 2vw, 0.85rem);
display: inline-flex;
align-items: center;
gap: 8px;
white-space: nowrap;
}

.tag i {
color: #4ade80;
}

/* ========== ПРИМЕР ========== */
.example-card {
background: linear-gradient(135deg, #0f172a, #1e293b);
border-radius: 32px;
padding: clamp(20px, 4vw, 30px);
border: 1px solid rgba(76,201,240,0.3);
}

.crc-box {
background: #0a0f1a;
border-radius: 16px;
padding: clamp(15px, 3vw, 20px);
text-align: center;
border: 1px solid #4ade80;
}

.crc-label {
color: #4ade80;
font-size: clamp(0.8rem, 2.2vw, 0.9rem);
margin-bottom: 10px;
}

.crc-value {
font-family: monospace;
color: #4ade80;
font-size: clamp(2rem, 8vw, 3rem);
font-weight: 700;
line-height: 1;
}

/* ========== ЦЕНТРОВКА И ОБЩИЕ СТИЛИ ========== */
.text-center {
text-align: center;
}

.flex-wrap {
display: flex;
gap: 20px;
justify-content: center;
flex-wrap: wrap;
}

.mt-4 {
margin-top: 25px;
}

.mb-4 {
margin-bottom: 25px;
}

.w-100 {
width: 100%;
}

hr {
border: none;
height: 1px;
background: rgba(255,255,255,0.1);
margin: 30px 0;
}

/* ========== МЕДИА-ЗАПРОСЫ ========== */
@media (max-width: 1200px) {
.grid-4 {
grid-template-columns: repeat(2, 1fr);
}
}

@media (max-width: 992px) {
.grid-3 {
grid-template-columns: repeat(2, 1fr);
gap: 20px;
}

.grid-2 {
gap: 20px;
}

body {
padding: 15px;
}
}

@media (max-width: 768px) {
.grid-3,
.grid-2,
.grid-4 {
grid-template-columns: 1fr;
gap: 15px;
}

body {
padding: 10px;
}

.card-header {
flex-direction: column;
align-items: flex-start;
text-align: left;
}

.instruction-header {
flex-direction: column;
align-items: flex-start;
}

.info-row {
flex-direction: column;
align-items: flex-start;
}

.tag {
width: 100%;
justify-content: center;
white-space: normal;
}

body {
overflow-x: hidden;
}

.step-number {
width: 35px;
height: 35px;
font-size: 1.2rem;
}
}

@media (max-width: 480px) {
.adaptive-title {
font-size: 1.3rem;
}

.instruction-title {
font-size: 1.3rem;
}

.card-icon {
width: 35px;
height: 35px;
}

.card-icon i {
font-size: 16px;
}

.card {
padding: 12px;
}

.step-icon {
width: 45px;
height: 45px;
}

.step-icon i {
font-size: 20px;
}
}

@media (max-height: 600px) and (orientation: landscape) {
.grid-3,
.grid-2 {
grid-template-columns: repeat(2, 1fr);
}
}

/* Фикс для иконок */
.fas, .far {
display: inline-block;
min-width: 20px;
}

.me-2 {
margin-right: 0.5rem;
}

.ms-2 {
margin-left: 0.5rem;
}

/* Стили для Telegram кнопки в едином стиле */
.telegram-container {
    position: relative;
    text-align: center;
    margin: 20px auto;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.1), rgba(0, 162, 255, 0.05));
    border-radius: 20px;
    border: 1px solid rgba(0, 162, 255, 0.3);
    backdrop-filter: blur(5px);
    max-width: 500px;
}

.cyber-telegram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: linear-gradient(135deg, #1e96c9, #0088cc);
    border-radius: 60px;
    padding: 16px 35px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1.4rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 136, 204, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 15px 0;
}

.cyber-telegram:hover {
    transform: scale(1.03);
    box-shadow: 0 0 30px rgba(0, 136, 204, 0.8);
    background: linear-gradient(135deg, #00a2ff, #0088cc);
}

.cyber-telegram:active {
    transform: scale(0.98);
}

.telegram-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 5px white);
}

.telegram-text {
    letter-spacing: 1px;
    font-family: monospace;
}

.telegram-text .digit {
    display: inline-block;
    animation: telegramPulse 1.5s infinite;
}

.telegram-text .digit:nth-child(odd) {
    animation-delay: 0.3s;
}

@keyframes telegramPulse {
    0%, 100% { opacity: 1; text-shadow: 0 0 5px white; }
    50% { opacity: 0.9; text-shadow: 0 0 15px white; }
}

.telegram-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: scanMove 3s infinite;
}

@keyframes scanMove {
    0% { left: -100%; }
    100% { left: 200%; }
}

.telegram-hint {
    font-size: 0.85rem;
    color: #00a2ff;
    margin-top: 15px;
    letter-spacing: 1px;
    font-family: monospace;
}

.telegram-hint i {
    margin-right: 5px;
    animation: hintBlink 1s infinite;
}

@keyframes hintBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Адаптивность */
@media (max-width: 768px) {
    .cyber-telegram {
        padding: 12px 25px;
        font-size: 1.1rem;
    }
    
    .telegram-icon {
        font-size: 1.5rem;
    }
    
    .telegram-container {
        margin: 20px 10px;
        padding: 15px;
    }
}

/* Дополнительные эффекты при наведении */
.cyber-telegram::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.cyber-telegram:hover::before {
    opacity: 1;
}

/* Импорт иконок Font Awesome (если ещё не подключен) */
@import url(' https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');
/* Скрыть окно с выводом списка */
.training-grid {
display: none !important;
}

 

 

 

 

 

 

 

 

/* ========== MANUAL EDIT TOGGLE - ГИБРИДНЫЙ СТИЛЬ v2.0 ========== */
.manual-edit-toggle {
display: flex;
align-items: center;
gap: var(--spacing-sm);
margin: var(--spacing-md) 0;
padding: clamp(var(--spacing-sm), 2vw, var(--spacing-md)) clamp(var(--spacing-md), 3vw, var(--spacing-lg));
background: var(--color-bg-input);
border-radius: var(--border-radius-lg);
border: 2px solid var(--color-border);
transition: all var(--transition-normal);
flex-wrap: wrap;
width: 100%;
position: relative;
overflow: hidden;
cursor: pointer;
}

/* Эффект свечения при наведении */
.manual-edit-toggle::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: radial-gradient(circle at center, rgba(74, 255, 158, 0.1), transparent 70%);
opacity: 0;
transition: opacity var(--transition-normal);
pointer-events: none;
}

.manual-edit-toggle:hover::before {
opacity: 1;
}

.manual-edit-toggle:hover {
border-color: var(--color-primary);
transform: translateY(-2px);
box-shadow: var(--shadow-glow);
}

/* ========== СОСТОЯНИЕ ВКЛЮЧЕНО (АКТИВНО) ========== */
.manual-edit-toggle:has(input:checked) {
background: linear-gradient(135deg,
rgba(74, 255, 158, 0.15),
rgba(139, 185, 254, 0.1)
);
border-color: var(--color-primary);
box-shadow: var(--shadow-glow), 0 0 0 3px rgba(74, 255, 158, 0.2);
animation: toggleGlowPulse 2s infinite;
}

/* Анимация пульсации для активного состояния */
@keyframes toggleGlowPulse {
0%, 100% {
box-shadow: var(--shadow-glow), 0 0 0 3px rgba(74, 255, 158, 0.2);
}
50% {
box-shadow: 0 0 25px rgba(74, 255, 158, 0.6), 0 0 0 5px rgba(74, 255, 158, 0.3);
}
}

/* ========== КАСТОМНЫЙ ЧЕКБОКС ========== */
.manual-edit-toggle input[type="checkbox"] {
position: absolute;
opacity: 0;
width: 0;
height: 0;
pointer-events: none;
}

/* Кастомный чекбокс (визуальный элемент) */
.manual-edit-toggle .checkmark {
width: 24px;
height: 24px;
border: 2px solid var(--color-border-light);
border-radius: var(--border-radius-sm);
background: var(--color-bg-dark);
display: inline-flex;
align-items: center;
justify-content: center;
transition: all var(--transition-bounce);
position: relative;
flex-shrink: 0;
cursor: pointer;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Если нет отдельного элемента .checkmark в HTML, используем псевдоэлемент */
.manual-edit-toggle input + label::before {
content: '';
width: 24px;
height: 24px;
border: 2px solid var(--color-border-light);
border-radius: var(--border-radius-sm);
background: var(--color-bg-dark);
display: inline-flex;
align-items: center;
justify-content: center;
transition: all var(--transition-bounce);
margin-right: var(--spacing-sm);
flex-shrink: 0;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Состояние checked - галочка */
.manual-edit-toggle input:checked + label::before {
background: var(--gradient-primary);
border-color: var(--color-primary);
box-shadow: 0 0 15px var(--color-primary-glow);
content: '✓';
font-size: 16px;
font-weight: bold;
color: var(--color-text-dark);
text-align: center;
line-height: 20px;
}

/* Анимация при клике */
.manual-edit-toggle input:checked + label::before {
animation: checkPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkPop {
0% {
transform: scale(0.8);
opacity: 0.5;
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1);
opacity: 1;
}
}

/* ========== ЛЕЙБЛ ========== */
.manual-edit-toggle label {
color: var(--color-secondary);
cursor: pointer;
display: flex;
align-items: center;
gap: var(--spacing-xs);
font-size: clamp(0.9rem, 3vw, 1rem);
word-break: break-word;
transition: all var(--transition-normal);
user-select: none;
font-weight: 500;
letter-spacing: 0.3px;
}

/* Активный лейбл - зеленый с свечением */
.manual-edit-toggle:has(input:checked) label {
color: var(--color-primary);
text-shadow: 0 0 8px var(--color-primary-glow);
font-weight: 600;
}

/* ========== ХИНТ (ПОДСКАЗКА) ========== */
.manual-edit-toggle .hint {
color: var(--color-text-muted);
font-size: clamp(0.75rem, 2.5vw, 0.85rem);
font-style: italic;
transition: all var(--transition-normal);
background: rgba(0, 0, 0, 0.2);
padding: 2px var(--spacing-sm);
border-radius: var(--border-radius-full);
margin-left: var(--spacing-xs);
}

/* Активный хинт */
.manual-edit-toggle:has(input:checked) .hint {
color: var(--color-primary);
background: rgba(74, 255, 158, 0.15);
box-shadow: 0 0 8px rgba(74, 255, 158, 0.3);
}

/* ========== ИКОНКА КАРАНДАША ========== */
.manual-edit-toggle label span:first-child {
font-size: 1.1rem;
transition: all var(--transition-normal);
display: inline-block;
}

.manual-edit-toggle:has(input:checked) label span:first-child {
transform: rotate(15deg) scale(1.1);
filter: drop-shadow(0 0 5px var(--color-primary));
}

/* ========== АНИМИРОВАННЫЙ ИНДИКАТОР СТАТУСА ========== */
.manual-edit-toggle::after {
content: '';
position: absolute;
right: clamp(var(--spacing-sm), 2vw, var(--spacing-md));
top: 50%;
transform: translateY(-50%);
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--color-border);
transition: all var(--transition-normal);
box-shadow: 0 0 5px currentColor;
}

/* Активный индикатор - зеленый с пульсацией */
.manual-edit-toggle:has(input:checked)::after {
background: var(--color-primary);
box-shadow: 0 0 12px var(--color-primary);
animation: indicatorPulse 1.5s infinite;
}

@keyframes indicatorPulse {
0%, 100% {
opacity: 1;
transform: translateY(-50%) scale(1);
box-shadow: 0 0 8px var(--color-primary);
}
50% {
opacity: 0.7;
transform: translateY(-50%) scale(1.2);
box-shadow: 0 0 20px var(--color-primary);
}
}

/* ========== ВАРИАНТ С ДОПОЛНИТЕЛЬНЫМ БАДЖЕМ ========== */
.manual-edit-toggle .status-badge {
display: none;
background: var(--gradient-primary);
color: var(--color-text-dark);
padding: 2px var(--spacing-sm);
border-radius: var(--border-radius-full);
font-size: 0.7rem;
font-weight: bold;
margin-left: var(--spacing-sm);
text-transform: uppercase;
letter-spacing: 0.5px;
}

.manual-edit-toggle:has(input:checked) .status-badge {
display: inline-block;
animation: badgePop 0.3s ease-out;
}

@keyframes badgePop {
from {
opacity: 0;
transform: scale(0.8);
}
to {
opacity: 1;
transform: scale(1);
}
}

/* ========== ДОПОЛНИТЕЛЬНЫЙ ЭФФЕКТ ГЛИТЧА ПРИ АКТИВАЦИИ ========== */
.manual-edit-toggle:has(input:checked) {
animation: glitchEffect 0.2s ease-in-out;
}

@keyframes glitchEffect {
0% {
transform: translate(0, 0);
}
20% {
transform: translate(-2px, 1px);
}
40% {
transform: translate(2px, -1px);
}
60% {
transform: translate(-1px, 2px);
}
80% {
transform: translate(1px, -2px);
}
100% {
transform: translate(0, 0);
}
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 600px) {
.manual-edit-toggle {
padding: var(--spacing-sm) var(--spacing-md);
gap: var(--spacing-xs);
}

.manual-edit-toggle label {
font-size: 0.85rem;
flex-wrap: wrap;
}

.manual-edit-toggle .hint {
width: 100%;
margin-left: 0;
margin-top: var(--spacing-xs);
text-align: center;
}

.manual-edit-toggle::after {
width: 8px;
height: 8px;
right: var(--spacing-sm);
}

.manual-edit-toggle input + label::before {
width: 20px;
height: 20px;
}

.manual-edit-toggle input:checked + label::before {
font-size: 12px;
line-height: 16px;
}
}

/* Для touch-устройств увеличиваем область касания */
@media (hover: none) and (pointer: coarse) {
.manual-edit-toggle {
min-height: 52px;
}

.manual-edit-toggle label {
padding: var(--spacing-xs) 0;
}
}

/* Для пользователей с reduced motion */
@media (prefers-reduced-motion: reduce) {
.manual-edit-toggle,
.manual-edit-toggle::after,
.manual-edit-toggle label span:first-child,
.manual-edit-toggle input:checked + label::before {
animation: none !important;
transition: none !important;
}

.manual-edit-toggle:has(input:checked) {
animation: none;
}
}

 

 

 

/* ===== БАЗОВАЯ СЕТКА ===== */
.grid-container {
display: grid;
width: 100%;
margin-bottom: 30px;
box-sizing: border-box;
transition: all 0.3s ease;
}

/* Модификаторы отступов */
.grid-gap-lg {
gap: clamp(15px, 3vw, 25px); /* Для gap: 25px */
}

.grid-gap-md {
gap: clamp(15px, 2.5vw, 25px); /* Для gap: 25px (второй вариант) */
}

.grid-gap-sm {
gap: clamp(12px, 2.5vw, 20px); /* Для gap: 20px */
}

/* Модификаторы колонок */
.grid-cols-3 {
grid-template-columns: repeat(3, 1fr);
}

.grid-cols-2 {
grid-template-columns: repeat(2, 1fr);
}

.grid-cols-1 {
grid-template-columns: 1fr;
}

/* Нижний отступ */
.mb-30 {
margin-bottom: clamp(20px, 4vw, 30px);
}

/* ============================================= */
/* ============== МЕДИА-ЗАПРОСЫ ================ */
/* ============================================= */

/* Планшеты (вертикальная ориентация) */
@media screen and (max-width: 992px) {
.grid-container {
grid-template-columns: repeat(2, 1fr) !important;
}

.grid-gap-lg {
gap: clamp(12px, 2.5vw, 20px);
}

.grid-gap-md {
gap: clamp(12px, 2.5vw, 20px);
}

.grid-gap-sm {
gap: clamp(10px, 2vw, 16px);
}
}

/* Мобильные устройства */
@media screen and (max-width: 640px) {
.grid-container {
grid-template-columns: 1fr !important;
}

.grid-gap-lg,
.grid-gap-md,
.grid-gap-sm {
gap: clamp(12px, 3vw, 16px);
}

.mb-30 {
margin-bottom: 20px;
}
}

/* Очень маленькие экраны */
@media screen and (max-width: 360px) {
.grid-gap-lg,
.grid-gap-md,
.grid-gap-sm {
gap: 10px;
}

.mb-30 {
margin-bottom: 15px;
}
}

/* Большие десктопы */
@media screen and (min-width: 1440px) {
.grid-gap-lg {
gap: 30px;
}

.grid-gap-md {
gap: 28px;
}

.grid-gap-sm {
gap: 24px;
}
}




/* ===== АДАПТИВНЫЕ СТИЛИ ДЛЯ ФОРМЫ (БЕЗ ИЗМЕНЕНИЯ HTML) ===== */

/* Сброс box-sizing для всей формы */
.random-calibration-section,
.random-calibration-section * {
    box-sizing: border-box !important;
}

/* Базовая мобильная адаптация контейнера */
@media (max-width: 640px) {
    .random-calibration-section {
        margin: 20px 0 !important;
        padding: 16px 12px !important;
        border-radius: 20px !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
    
    /* Заголовок — перенос строк и размер */
    .section-header h3 {
        font-size: 17px !important;
        flex-wrap: wrap !important;
        line-height: 1.4 !important;
    }
    
    .section-header h3 span {
        margin-left: 0 !important;
        display: inline-block !important;
        margin-top: 6px !important;
        font-size: 12px !important;
        padding: 4px 12px !important;
    }
    
    .section-header p {
        margin-left: 0 !important;
        font-size: 12px !important;
        line-height: 1.5 !important;
    }
    
    /* ВСЕ ПОЛЯ ВВОДА — крупные и удобные для пальца */
    .random-calibration-section input:not([type="file"]),
    .random-calibration-section select,
    .random-calibration-section textarea {
        width: 100% !important;
        padding: 16px 14px !important;
        font-size: 16px !important;  /* предотвращает зум на iOS */
        border-radius: 12px !important;
        background: #0d1328 !important;
        border: 1px solid #f97316 !important;
        color: #fff !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        line-height: 1.4 !important;
        margin-bottom: 4px !important;
    }
    
    /* Селекты — кастомная стрелка */
    .random-calibration-section select {
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23f97316" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>') !important;
        background-repeat: no-repeat !important;
        background-position: right 15px center !important;
        background-size: 16px !important;
        padding-right: 40px !important;
    }
    
    /* Сетка из 2 колонок — ПРЕВРАЩАЕМ В 1 КОЛОНКУ */
    .random-calibration-section div[style*="grid-template-columns: repeat(2, 1fr)"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        grid-template-columns: 1fr !important; /* переопределяем */
    }
    
    /* VIN — убираем span 2, так как теперь всё в колонку */
    .random-calibration-section div[style*="grid-column: span 2"] {
        grid-column: span 1 !important;
        width: 100% !important;
    }
    
    /* Все дочерние div'ы внутри бывшей сетки — ширина 100% */
    .random-calibration-section div[style*="display: grid"] > div {
        width: 100% !important;
        min-width: 100% !important;
    }
    
    /* Лейблы */
    .random-calibration-section label {
        display: block !important;
        margin-bottom: 6px !important;
        font-size: 14px !important;
        color: #ffaa66 !important;
    }
    
    /* Блок с чеком и телефоном — В КОЛОНКУ */
    .random-calibration-section div[style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        grid-template-columns: 1fr !important;
    }
    
    /* Карточка файла */
    .random-file-card {
        padding: 16px !important;
        width: 100% !important;
    }
    
    .random-file-card input[type="file"] {
        padding: 12px 10px !important;
        font-size: 14px !important;
        width: 100% !important;
    }
    
    /* Поле телефона */
    .random-calibration-section input[type="tel"] {
        width: 100% !important;
    }
    
    /* Блок с QR и предупреждением — ПЕРЕСТРАИВАЕМ ВЕРТИКАЛЬНО */
    .random-calibration-section div[style*="display: flex; align-items: center; gap: 20px; background: rgba(249, 115, 22, 0.1)"] {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 20px 15px !important;
        gap: 15px !important;
    }
    
    /* Изображение QR — центрируем */
    .random-calibration-section div[style*="display: flex; align-items: center; gap: 20px; background: rgba(249, 115, 22, 0.1)"] img {
        width: 130px !important;
        height: 130px !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    /* Текст цены и "Отсканируйте" — центрируем */
    .random-calibration-section div[style*="display: flex; align-items: center; gap: 20px; background: rgba(249, 115, 22, 0.1)"] > div:not([style*="border-left"]) {
        text-align: center !important;
    }
    
    /* Убираем левую границу у предупреждения, добавляем верхнюю */
    .random-calibration-section div[style*="border-left: 2px solid #f97316"] {
        border-left: none !important;
        border-top: 2px solid #f97316 !important;
        padding-left: 0 !important;
        padding-top: 15px !important;
        margin-top: 5px !important;
        width: 100% !important;
    }
    
    /* КНОПКА ОТПРАВКИ — ОГРОМНАЯ И АДАПТИВНАЯ */
    #randomSubmitBtn {
        width: 100% !important;
        padding: 20px 20px !important;
        font-size: 18px !important;
        font-weight: 800 !important;
        border-radius: 60px !important;
        background: linear-gradient(135deg, #f97316 0%, #cc5500 100%) !important;
        border: 1px solid #f97316 !important;
        box-shadow: 0 0 25px rgba(249, 115, 22, 0.4) !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        margin-top: 15px !important;
        -webkit-tap-highlight-color: transparent !important;
        transition: all 0.15s !important;
        cursor: pointer !important;
        line-height: 1.2 !important;
    }
    
    /* Эффект нажатия */
    #randomSubmitBtn:active {
        transform: scale(0.97) !important;
        background: linear-gradient(135deg, #cc5500 0%, #a34400 100%) !important;
        box-shadow: 0 0 15px #f97316 !important;
    }
    
    /* Статус */
    #randomFormStatus {
        font-size: 15px !important;
        padding: 15px !important;
        border-radius: 12px !important;
    }
    
    /* Подвал */
    .random-calibration-section div[style*="border-top: 1px solid #3a1a0a"] {
        font-size: 11px !important;
        padding-top: 15px !important;
        margin-top: 5px !important;
    }
}

/* Дополнительная адаптация для очень маленьких экранов (до 380px) */
@media (max-width: 380px) {
    .random-calibration-section {
        padding: 12px 10px !important;
    }
    
    .section-header h3 {
        font-size: 16px !important;
    }
    
    .random-calibration-section input:not([type="file"]),
    .random-calibration-section select,
    .random-calibration-section textarea {
        padding: 14px 12px !important;
        font-size: 15px !important;
    }
    
    #randomSubmitBtn {
        padding: 18px 15px !important;
        font-size: 16px !important;
    }
    
    .random-calibration-section div[style*="display: flex; align-items: center; gap: 20px; background: rgba(249, 115, 22, 0.1)"] img {
        width: 110px !important;
        height: 110px !important;
    }
}

/* Фикс для планшетов (641px - 900px) — плавный переход */
@media (min-width: 641px) and (max-width: 900px) {
    .random-calibration-section {
        padding: 20px !important;
    }
    
    .random-calibration-section input:not([type="file"]),
    .random-calibration-section select,
    .random-calibration-section textarea {
        padding: 14px 16px !important;
    }
    
    /* На планшете оставляем 2 колонки, но увеличиваем отступы */
    #randomSubmitBtn {
        padding: 18px 25px !important;
    }
}

/* Убираем обводку при фокусе на мобильных (заменяем на свечение) */
.random-calibration-section input:focus,
.random-calibration-section select:focus,
.random-calibration-section textarea:focus,
#randomSubmitBtn:focus {
    outline: none !important;
    border-color: #ff9500 !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.3) !important;
}

/* Стилизация плейсхолдеров */
.random-calibration-section input::placeholder,
.random-calibration-section textarea::placeholder {
    color: #6a7a8a !important;
    opacity: 0.7 !important;
    font-size: 0.95em !important;
}

/* Делаем file input более кликабельным */
.random-calibration-section input[type="file"] {
    cursor: pointer !important;
    min-height: 52px !important;
}

/* Исправляем возможные смещения у иконок в заголовке */
.section-header h3 i {
    margin-right: 4px !important;
}