
    /* 1. ЦВЕТА ДЛЯ СВЕТЛОЙ ТЕМЫ */
    :root {
        --reg-page-bg: #f4f5f8;
        --reg-card-bg: #ffffff;
        --reg-text-main: #1a1a1a;
        --reg-text-muted: #6c757d;
        --reg-input-bg: #fafbfc;
        --reg-border: #e1e4e8;
        --reg-btn-primary: #0d6efd;
        --reg-btn-primary-hover: #0b5ed7;
        --reg-btn-secondary-bg: #f1f3f5;
        --reg-btn-secondary-text: #495057;
    }

    /* 2. ЦВЕТА ДЛЯ ТЕМНОЙ ТЕМЫ */
    [data-bs-theme="dark"], 
    .dark-mode, 
    body.dark {
        --reg-page-bg: #121212;
        --reg-card-bg: #1e1e24;
        --reg-text-main: #f8f9fa;
        --reg-text-muted: #a0aab5;
        --reg-input-bg: #2b2b36;
        --reg-border: #3f3f4e;
        --reg-btn-primary: #3b82f6;
        --reg-btn-primary-hover: #2563eb;
        --reg-btn-secondary-bg: #2b2b36;
        --reg-btn-secondary-text: #e0e0e0;
    }

    /* 3. ПРИМЕНЕНИЕ ЦВЕТОВ */
    .reg-page-bg { background-color: var(--reg-page-bg) !important; transition: background 0.3s; }
    .reg-card { background-color: var(--reg-card-bg) !important; transition: background 0.3s; border-radius: 16px; }
    .reg-form-bg { background-color: var(--reg-card-bg) !important; transition: background 0.3s; }
    
    .reg-text-main { color: var(--reg-text-main) !important; transition: color 0.3s; }
    .reg-text-muted { color: var(--reg-text-muted) !important; transition: color 0.3s; }
    .reg-border-top { border-top: 1px solid var(--reg-border) !important; transition: border 0.3s; }

    /* 4. СБРОС СТИЛЕЙ DLE */
    .reg-form-wrapper form,
    .reg-form-wrapper .dashboard-card,
    .reg-form-wrapper .form-group,
    .reg-form-wrapper .row { 
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
        color: var(--reg-text-main) !important;
    }

    .reg-form-wrapper h1, .reg-form-wrapper h2, .reg-form-wrapper h3, .reg-form-wrapper h4,
    .reg-form-wrapper p, .reg-form-wrapper span, .reg-form-wrapper div {
        color: var(--reg-text-main) !important;
    }

    /* 5. ИНПУТЫ */
    .reg-form-wrapper .form-control, 
    .reg-form-wrapper input[type="text"], 
    .reg-form-wrapper input[type="password"], 
    .reg-form-wrapper input[type="email"],
    .reg-form-wrapper textarea { 
        width: 100%; 
        padding: 0.75rem 1rem; 
        border-radius: 10px; 
        border: 1px solid var(--reg-border) !important; 
        font-size: 0.95rem; 
        background-color: var(--reg-input-bg) !important;
        color: var(--reg-text-main) !important;
        transition: all 0.2s ease;
        height: auto;
        min-height: 46px;
    }

    .reg-form-wrapper .form-control:focus, 
    .reg-form-wrapper input:focus,
    .reg-form-wrapper textarea:focus {
        border-color: var(--reg-btn-primary) !important;
        background-color: var(--reg-card-bg) !important;
        box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
        outline: none;
    }

    /* 6. ЛЕЙБЛЫ И СЕТКА */
    .reg-form-wrapper label { 
        font-weight: 600; 
        font-size: 0.85rem; 
        margin-bottom: 0.4rem; 
        color: var(--reg-text-muted) !important; 
    }

    .reg-form-wrapper .row { 
        --bs-gutter-x: 1.25rem;
        --bs-gutter-y: 1.25rem;
        margin-top: 0;
        display: flex;
        flex-wrap: wrap;
    }
    
    .reg-form-wrapper .form-group, 
    .reg-form-wrapper .col-md-6 { 
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    @media (min-width: 768px) {
        .reg-form-wrapper .col-md-6 { width: 50%; }
    }

    /* 7. ЛОГИН + ПРОВЕРИТЬ */
    .reg-form-wrapper .input-group { display: flex; width: 100%; flex-wrap: nowrap; }
    .reg-form-wrapper .input-group input {
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        border-right: none !important;
        flex: 1;
    }

    .reg-form-wrapper #checkLoginBtn {
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
        border-top-right-radius: 10px !important;
        border-bottom-right-radius: 10px !important;
        border: 1px solid var(--reg-border) !important;
        border-left: none !important;
        background-color: var(--reg-btn-secondary-bg) !important;
        color: var(--reg-btn-secondary-text) !important;
        font-size: 0.9rem;
        font-weight: 500;
        padding: 0 1.25rem;
        white-space: nowrap;
        min-height: 46px;
        margin: 0;
    }

    .reg-form-wrapper #checkLoginBtn:hover {
        background-color: var(--reg-border) !important;
        color: var(--reg-btn-primary) !important;
    }

    /* 8. КНОПКИ ОТПРАВКИ */
    .reg-form-wrapper button[type="submit"],
    .reg-form-wrapper .btn-primary,
    .reg-form-wrapper input[type="submit"] { 
        width: auto !important; 
        min-width: 160px;
        padding: 0.75rem 1.5rem;
        border-radius: 10px;
        background-color: var(--reg-btn-primary) !important;
        color: #ffffff !important;
        border: 1px solid var(--reg-btn-primary) !important;
        font-size: 0.95rem;
        font-weight: 600;
        transition: all 0.2s;
        min-height: 46px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0 !important;
    }

    .reg-form-wrapper button[type="submit"]:hover,
    .reg-form-wrapper .btn-primary:hover,
    .reg-form-wrapper input[type="submit"]:hover {
        background-color: var(--reg-btn-primary-hover) !important;
        border-color: var(--reg-btn-primary-hover) !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    }

    /* 9. КНОПКА "НЕ ПРИНИМАЮ" */
    .reg-form-wrapper input[type="button"],
    .reg-form-wrapper .btn-secondary {
        background-color: var(--reg-btn-secondary-bg) !important;
        color: var(--reg-btn-secondary-text) !important;
        border: 1px solid var(--reg-border) !important;
        margin-left: 0.75rem !important;
    }

    .reg-form-wrapper input[type="button"]:hover,
    .reg-form-wrapper .btn-secondary:hover {
        background-color: var(--reg-border) !important;
        color: var(--reg-btn-primary) !important;
        border-color: var(--reg-btn-primary) !important;
    }

    /* 10. КАПЧА */
    .reg-form-wrapper .feedback-fieldset {
        border: 1px solid var(--reg-border) !important;
        border-radius: 10px;
        padding: 1.25rem;
        margin-top: 1.25rem;
        background: var(--reg-input-bg) !important;
    }
    
    .reg-form-wrapper .feedback-fieldset legend {
        float: none;
        width: auto;
        padding: 0 0.5rem;
        margin-bottom: 0;
        font-size: 0.85rem;
        color: var(--reg-text-muted) !important;
    }

    /* 11. ХОВЕР ДЛЯ ССЫЛОК */
    .reg-hover-primary:hover { color: var(--reg-btn-primary) !important; }
