/* Основные стили для DPO CRM */

/* Стили для таблицы физлиц */
.person-row {
    transition: all 0.3s ease;
    border-bottom: 1px solid #dee2e6;
}

.person-row:hover {
    background-color: #f8f9fa !important;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 10;
    position: relative;
}

.person-row:nth-child(even) {
    background-color: #f8f9fa;
}

.person-row:nth-child(odd) {
    background-color: #ffffff;
}

.person-row:hover:nth-child(even),
.person-row:hover:nth-child(odd) {
    background-color: #e3f2fd !important;
}

/* Стили для кнопок в таблице */
.person-row .btn-group {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.person-row:hover .btn-group {
    opacity: 1;
}

/* Анимация для иконок */
.person-row i {
    transition: color 0.3s ease;
}

.person-row:hover i {
    color: #007bff !important;
}

/* Стили для таблицы */
.table-hover tbody tr:hover {
    background-color: transparent;
}

.table-responsive {
    border-radius: 0.375rem;
    overflow: hidden;
}

/* Стили для заголовка таблицы */
.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Фиксированный сайдбар */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background-color: #343a40;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar .nav-link {
    color: #adb5bd;
    padding: 12px 20px;
    border-radius: 0;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: #495057;
    padding-left: 30px;
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: #007bff;
    border-left: 4px solid #0056b3;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* Основной контент */
.main-content {
    margin-left: 250px;
    padding: 20px;
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* Заголовки страниц */
.page-title-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.page-title {
    margin: 0;
    color: #495057;
    font-weight: 600;
}

/* Карточки */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0 !important;
}

.card-title {
    color: #495057;
    font-weight: 600;
}

/* Кнопки */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    background-color: #007bff;
    border-color: #007bff;
}

/* Формы */
.form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
}

/* Таблицы */
.table {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Алерты */
.alert {
    border: none;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Пагинация */
.pagination .page-link {
    color: #007bff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* Бейджи */
.badge {
    font-size: 0.75em;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 10px;
    }
    
    .page-title-box {
        padding: 15px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Стили для неподтвержденных аккаунтов */
.account-not-verified {
    position: relative;
}

.account-not-verified .main-content {
    filter: grayscale(0.7) brightness(0.6);
    pointer-events: none;
    user-select: none;
}

/* Сайдбар остается активным */
.account-not-verified .sidebar {
    filter: none;
    pointer-events: auto;
    user-select: auto;
}

/* Страница организации полностью доступна - блокировка не применяется */

/* Анимация пульсации для кнопки редактирования */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0.1);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
        transform: scale(1);
    }
}

/* Класс для пульсирующей кнопки */
.btn-pulse {
    animation: pulse-glow 2s infinite;
    background: linear-gradient(45deg, #0d6efd, #0b5ed7);
    border: none;
    color: white;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn-pulse::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-pulse:hover::before {
    left: 100%;
}

.btn-pulse:hover {
    background: linear-gradient(45deg, #0b5ed7, #0a58ca);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Информационные блоки для статуса подтверждения */
.verification-status-block {
    position: fixed;
    top: 0;
    left: 250px; /* Отступ от сайдбара */
    right: 0;
    z-index: 9998;
    padding: 15px 20px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.verification-status-block.warning {
    background-color: rgba(255, 193, 7, 0.9);
    color: #856404;
    border-bottom: 3px solid #ffc107;
}

.verification-status-block.danger {
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    border-bottom: 3px solid #dc3545;
}

.verification-status-block .btn {
    margin-left: 15px;
    font-size: 0.9rem;
    padding: 8px 20px;
}

/* Смещение контента при наличии информационного блока */
body.has-verification-block .main-content {
    margin-top: 60px;
}

/* Сайдбар остается на своем месте */
body.has-verification-block .sidebar {
    top: 0;
    height: 100vh;
}

/* Адаптивность для смещения контента */
@media (max-width: 768px) {
    body.has-verification-block .main-content {
        margin-top: 60px;
    }
}

/* Фиксированное уведомление о необходимости заполнить данные организации */
.verification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.verification-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 500px;
    margin: 20px;
    animation: pulse 2s infinite;
}

.verification-notice h2 {
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 700;
}

.verification-notice p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.verification-notice .btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.verification-notice .btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }
}

/* Адаптивность для уведомления */
@media (max-width: 768px) {
    .verification-status-block {
        left: 0;
        right: 0;
    }
    
    .verification-notice {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .verification-notice h2 {
        font-size: 1.5rem;
    }
    
    .verification-notice p {
        font-size: 1rem;
    }
}

/* Утилиты */
.text-primary { color: #007bff !important; }
.text-secondary { color: #6c757d !important; }
.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #ffc107 !important; }
.text-info { color: #17a2b8 !important; }
.text-muted { color: #6c757d !important; }

.bg-primary { background-color: #007bff !important; }
.bg-secondary { background-color: #6c757d !important; }
.bg-success { background-color: #28a745 !important; }
.bg-danger { background-color: #dc3545 !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-info { background-color: #17a2b8 !important; }
