:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-hover: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    height: 100%;
}

.btn-light {
    background-color: white;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.2;
}

.text-caption {
    font-size: 0.75rem;
    line-height: 1.5;
}

.text-xs {
    font-size: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--border-radius);
}

.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.account-item {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
    animation: fadeIn 0.3s ease-out;
}

.account-item:hover {
    background-color: rgba(0, 123, 255, 0.03);
}

.account-item:last-child {
    border-bottom: none;
}

.badge {
    font-weight: 500;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
}

.badge.rounded-pill {
    padding: 0.35em 0.65em;
}

/* Progress bars */
.progress {
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), #0056b3);
    transition: width 0.6s ease;
}

.empty-state-icon {
    opacity: 0.4;
}


.btn:hover .fas, .btn:hover .fab {
    transform: scale(1.1);
}

.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    transform: translateY(-1px);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-switch .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.modal-content {
    border: none;
    border-radius: 0.75rem;
    box-shadow: var(--box-shadow-hover);
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.list-group-item:hover {
    background-color: rgba(0, 123, 255, 0.03);
}

.list-group-item:last-child {
    border: none;
}

.summary-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 80px;
}

.stat-item h5 {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-item p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.stat-item:hover p {
    animation: pulse 0.5s ease;
}

.user-info {
    position: relative;
}


.user-info-item {
    padding: 0.5rem 0;
}

.user-info-item h6 {
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.avatar-sm {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.scroll-container::-webkit-scrollbar {
    width: 6px;
}

.scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }

    .card-header .btn-group {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .account-item .btn-group-sm .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }

    .user-info {
        margin-top: 1rem;
        justify-content: center;
    }

    .stat-item p {
        font-size: 1.25rem;
    }

    .summary-stats {
        gap: 1rem;
    }

    .stat-item {
        min-width: 70px;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .btn-group {
        flex-wrap: wrap;
    }

    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }

    .col-md-4.text-end {
        text-align: left !important;
        margin-top: 1rem;
    }
}