﻿/* ==========================================================================
   БАЗОВЫЙ СТИЛЬ КНОПОК (Механическая тактильная клавиша)
   ========================================================================== */
.btn {
    padding: 8px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    border: 1px solid rgba(0, 0, 0, 0.25) !important;
    border-top-color: rgba(255, 255, 255, 0.4) !important;
    border-bottom-color: rgba(0, 0, 0, 0.4) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 2px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.18) !important;
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease !important;
}

    /* Верхний линзовый блик (эффект полированного пластика/стекла) */
    .btn::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 48%;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 100%);
        pointer-events: none;
        border-radius: 7px 7px 0 0;
    }

    /* Наведение: кнопка слегка приподнимается над поверхностью */
    .btn:hover {
        filter: brightness(1.03) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -1px 2px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.22) !important;
    }

    /* Механическое нажатие (кнопка продавливается внутрь) */
    .btn:active,
    .btn.active {
        transform: translateY(2px) !important;
        box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.15) !important;
    }

    .btn:focus-visible {
        outline: none !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 0 3px rgba(13, 110, 253, 0.4), 0 3px 6px rgba(0, 0, 0, 0.2) !important;
    }

/* ==========================================================================
   ОСНОВНЫЕ ВАРИАНТЫ КНОПОК
   ========================================================================== */

.btn-primary {
    background: linear-gradient(180deg, #2b8aff 0%, #0056b3 100%) !important;
    border-color: #003d80 !important;
    color: #ffffff !important;
    text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.5);
}

.btn-danger {
    background: linear-gradient(180deg, #ff5349 0%, #c82333 100%) !important;
    border-color: #8b101c !important;
    color: #ffffff !important;
    text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.5);
}

.btn-warning {
    background: linear-gradient(180deg, #ffb74d 0%, #f57c00 100%) !important;
    border-color: #b25900 !important;
    color: #ffffff !important;
    text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.4);
}

.btn-light {
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%) !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Состояние Disabled (Обесточенная/запавшая кнопка) */
.btn:disabled,
.btn.disabled {
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1) !important;
    color: #94a3b8 !important;
    border-color: #94a3b8 !important;
    filter: none !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    transform: none !important;
    cursor: not-allowed;
    opacity: 0.75;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

    .btn:disabled::after,
    .btn.disabled::after {
        display: none;
    }

/* ==========================================================================
   КАСТОМНЫЕ ИСПЕЦИАЛИЗИРОВАННЫЕ КНОПКИ
   ========================================================================== */

.btn-primary-custom {
    background: linear-gradient(180deg, #8b5cf6 0%, #5b21b6 100%);
    color: #ffffff !important;
    border: 1px solid #4c1d95 !important;
    border-top-color: #a78bfa !important;
    border-radius: 12px !important;
    font-weight: 700;
    padding: 0.8rem 1.5rem !important;
    letter-spacing: 0.5px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 12px rgba(91, 33, 182, 0.35);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.6);
}

    .btn-primary-custom:hover:not(:disabled) {
        background: linear-gradient(180deg, #9333ea 0%, #6b21a8 100%);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 6px 16px rgba(91, 33, 182, 0.45);
    }

    .btn-primary-custom:not(:disabled):hover .rotate-icon {
        transform: rotate(90deg);
        transition: transform 0.3s ease;
    }

.btn-add-custom,
.btn-blue-grey,
.btn-blue-grey-action {
    background: linear-gradient(180deg, var(--slate-blue-light, #627d98) 0%, var(--slate-blue, #486581) 100%);
    color: #ffffff !important;
    border: 1px solid #243b53 !important;
    border-top-color: #829ab1 !important;
    border-radius: 8px !important;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 6px rgba(16, 42, 67, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.4);
}

.btn-blue-grey-action {
    height: 3.5rem;
    padding: 0 25px !important;
}

    .btn-add-custom:hover,
    .btn-blue-grey:hover,
    .btn-blue-grey-action:hover {
        background: linear-gradient(180deg, #7592ad 0%, var(--slate-blue-light, #627d98) 100%);
        color: #ffffff !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 4px 8px rgba(16, 42, 67, 0.3);
    }

.btn-filter-action {
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1 !important;
    border-top-color: #ffffff !important;
    color: #475569;
    padding: 8px 15px !important;
    border-radius: 8px !important;
    box-shadow: inset 0 1px 0 #ffffff, 0 2px 4px rgba(0, 0, 0, 0.08);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

    .btn-filter-action:hover {
        background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
        color: #ffffff !important;
        border-color: #1e40af !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 3px 8px rgba(29, 78, 216, 0.3);
        text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.4);
    }

.btn-outline-clear {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1 !important;
    border-top-color: #ffffff !important;
    color: #64748b;
    box-shadow: inset 0 1px 0 #ffffff, 0 2px 4px rgba(0, 0, 0, 0.05);
}

    .btn-outline-clear:hover {
        color: #dc2626 !important;
        background: linear-gradient(180deg, #fef2f2 0%, #fecaca 100%);
        border-color: #fca5a5 !important;
        box-shadow: inset 0 1px 0 #ffffff, 0 3px 6px rgba(220, 38, 38, 0.2);
    }

.btn-unbind {
    background: transparent !important;
    border: none !important;
    color: #94a3b8;
    font-size: 1.2rem;
    line-height: 1;
    box-shadow: none !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

    .btn-unbind::after {
        display: none;
    }

    .btn-unbind:hover {
        color: #dc2626 !important;
        transform: scale(1.15) !important;
        box-shadow: none !important;
    }

.btn-outline-violet {
    background: linear-gradient(180deg, #ffffff 0%, #f3e8ff 100%);
    color: var(--violet-brand, #7c3aed);
    border: 1px solid var(--violet-brand, #7c3aed) !important;
    border-top-color: #ffffff !important;
    box-shadow: inset 0 1px 0 #ffffff, 0 2px 4px rgba(124, 58, 237, 0.12);
}

.btn-check:checked + .btn-outline-violet {
    background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%) !important;
    border-color: #4c1d95 !important;
    color: #ffffff !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.4);
}

/* Панель печати */
.printBtn {
    position: absolute;
    top: 65px;
    right: 10px;
    z-index: 2;
}

    .printBtn .btn-group {
        gap: 8px;
    }

    .printBtn .btn {
        border-radius: 8px !important;
        padding: 8px 16px !important;
        font-weight: 600;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
    }

.btn-purple {
    background: linear-gradient(180deg, #9333ea 0%, #6b21a8 100%);
    color: #ffffff !important;
    border: 1px solid #4c1d95 !important;
    border-top-color: #c084fc !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 3px 6px rgba(107, 33, 168, 0.3);
    text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.5);
}

    .btn-purple:hover {
        background: linear-gradient(180deg, #a855f7 0%, #7e22ce 100%);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 10px rgba(107, 33, 168, 0.4);
    }

.btn-deluxe-outline {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1 !important;
    border-top-color: #ffffff !important;
    color: #334155;
    padding: 8px 20px !important;
    border-radius: 8px !important;
    font-size: 0.9rem;
    box-shadow: inset 0 1px 0 #ffffff, 0 2px 4px rgba(0, 0, 0, 0.06);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

    .btn-deluxe-outline:hover {
        background: linear-gradient(180deg, #ffffff 0%, #e0e7ff 100%);
        border-color: #3b82f6 !important;
        color: #1d4ed8;
        box-shadow: inset 0 1px 0 #ffffff, 0 3px 6px rgba(59, 130, 246, 0.2);
    }

.btn-link-danger {
    background: transparent !important;
    border: none !important;
    color: #94a3b8;
    box-shadow: none !important;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

    .btn-link-danger::after {
        display: none;
    }

    .btn-link-danger:hover {
        color: #ef4444 !important;
        text-shadow: 0 0 6px rgba(239, 68, 68, 0.3);
    }

/* ==========================================================================
   БЛОК ДЕЙСТВИЙ И СОВРЕМЕННЫЕ КНОПКИ
   ========================================================================== */

/* Контейнер для группы кнопок с правильным разделением */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px;
}

/* Флагманская скевоморфная кнопка (.btn-modern) */
.btn-modern {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 40%, #e2e8f0 100%) !important;
    border: 1px solid #94a3b8 !important;
    border-top-color: #ffffff !important;
    border-bottom-color: #64748b !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 1px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.12) !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

    .btn-modern:hover {
        background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 40%, #cbd5e1 100%) !important;
        box-shadow: inset 0 1px 0 #ffffff, 0 6px 12px rgba(0, 0, 0, 0.16) !important;
    }

    .btn-modern:active {
        background: linear-gradient(180deg, #cbd5e1 0%, #e2e8f0 100%) !important;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.08) !important;
    }















.btn-modern {
    border-radius: 8px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.1s ease !important;
    /* Базовая выпуклая форма */
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 4px 6px rgba(0,0,0,0.2) !important;
}

    /* Механическое нажатие (кнопка уходит вниз, тень пропадает) */
    .btn-modern:active:not(:disabled) {
        transform: translateY(3px);
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.4) !important;
    }

    /* Вторичная кнопка (Cancel) - Матовый алюминий */
    .btn-modern.btn-secondary {
        background: linear-gradient(to bottom, #f0f2f5, #ccd1d7) !important;
        border: 1px solid #969ca3 !important;
        color: #3b4045 !important;
        text-shadow: 0 1px 0 rgba(255,255,255,0.8) !important;
    }

    /* Кнопка успеха (Save) - Выпуклый зеленый пластик/акрил */
    .btn-modern.btn-success {
        background: linear-gradient(to bottom, #5cb85c, #3d8b3d) !important;
        border: 1px solid #2b662b !important;
        color: #ffffff !important;
        /* Тень сверху черная, чтобы казалось, что буквы вдавлены в мягкий пластик */
        text-shadow: 0 -1px 1px rgba(0,0,0,0.6) !important;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 0 4px rgba(255,255,255,0.2), 0 4px 6px rgba(0,0,0,0.2) !important;
    }

    /* Кнопка предупреждения (OK) - Янтарный пластик */
    .btn-modern.btn-warning {
        background: linear-gradient(to bottom, #f0ad4e, #d58512) !important;
        border: 1px solid #985f0d !important;
        color: #ffffff !important;
        text-shadow: 0 -1px 1px rgba(0,0,0,0.6) !important;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 4px 6px rgba(0,0,0,0.2) !important;
    }

    /* Заблокированное состояние (Отключенное питание / Серый монолит) */
    .btn-modern:disabled {
        background: linear-gradient(to bottom, #dce0e5, #c7ccd2) !important;
        border: 1px solid #b1b6bc !important;
        color: #90979e !important;
        /* Текст почти сливается с фоном, но имеет легкий блик */
        text-shadow: 0 1px 0 rgba(255,255,255,0.6) !important;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 1px 2px rgba(0,0,0,0.1) !important;
        cursor: not-allowed;
        transform: none !important;
    }
    .btn-modern:not(:disabled):hover {
        background: linear-gradient(to bottom, #f8fafc, #cbd5e1);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 8px rgba(0, 0, 0, 0.25);
    }

    .btn-modern:not(:disabled):active {
        transform: translateY(2px) !important;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    }



.myInput {
    display: none;
}

/* Контейнер тумблера: вдавленная в металл дорожка */
.consent-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.switch-icon-box {
    display: inline-block;
    width: 52px;
    height: 26px;
    background: linear-gradient(to bottom, #1a1c20, #2b2e33);
    border-radius: 13px;
    border: 1px solid #0a0a0c;
    position: relative;
    /* Глубокая внутренняя тень + белый блик на нижней кромке (утопленный эффект) */
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.9), 0 1px 1px rgba(255,255,255,0.4);
    transition: all 0.3s ease;
}

/* Сам ползунок тумблера (Выпуклая металлическая кнопка) */
.switch-icon {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: linear-gradient(to bottom, #f8f9fa, #cfd4d9);
    border: 1px solid #8e959c;
    border-radius: 50%;
    /* Тень от ползунка и внутренний круговой блик */
    box-shadow: inset 0 1px 1px #ffffff, 0 2px 4px rgba(0,0,0,0.5);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Состояние "ВКЛЮЧЕНО": дорожка загорается, как LED-индикатор, ползунок едет вправо */
.myInput:checked + .consent-label .switch-icon-box {
    background: linear-gradient(to bottom, #1b4d22, #2e7d32);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.8), 0 1px 1px rgba(255,255,255,0.4), inset 0 0 10px rgba(76, 175, 80, 0.4);
    border-color: #143d1a;
}

.myInput:checked + .consent-label .switch-icon {
    transform: translateX(26px);
}

/* Выгравированный текст лейбла */
.switch-text {
    font-weight: 700;
    color: #4a5056;
    text-shadow: 0 1px 1px rgba(255,255,255,0.9);
}