/* Общие стили */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header h1 i {
    color: #3b82f6;
    font-size: 26px;
}

/* Кнопки */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: 2px solid #3b82f6;
    color: white;
    padding: 12px 24px;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #2563eb;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    border: 2px solid #64748b;
    color: white;
    padding: 10px 20px;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.25);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    border-color: #475569;
    color: white;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.35);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 2px solid #ef4444;
    color: white;
    padding: 10px 20px;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #dc2626;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
    transform: translateY(-2px);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid #3b82f6;
    color: #3b82f6;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
    transform: translateY(-1px);
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid #64748b;
    color: #64748b;
    padding: 10px 20px;
    font-size: 15px;
}

.btn-outline-secondary:hover {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    border-color: #64748b;
    color: white;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.25);
    transform: translateY(-1px);
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid #ef4444;
    color: #ef4444;
    padding: 10px 20px;
    font-size: 15px;
}

.btn-outline-danger:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

/* Карточки клиентов */
.card {
    border: none;
    border-radius: 12px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.card-body {
    padding: 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: #3b82f6;
    font-size: 20px;
}

.card-text {
    color: #64748b;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.card-text i {
    width: 18px;
    color: #94a3b8;
    margin-right: 8px;
}

/* Таблицы */
.table-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: visible;
}

.table {
    margin: 0;
    border-collapse: collapse;
}

.table thead {
    background: #f1f5f9;
}

.table thead th {
    color: #0f172a !important;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 20px;
    border: none;
    vertical-align: middle;
}

.table thead th i {
    margin-right: 6px;
    opacity: 1;
    color: #3b82f6 !important;
}

.table tbody td {
    padding: 16px 20px;
    vertical-align: middle;
    color: #1e293b;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
}

.table tbody td strong {
    color: #0f172a;
    font-weight: 600;
}

.table thead th {
    text-align: center;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Бейджи статусов */
.badge {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.input-group .btn:not(:last-child) {
    border-radius: 0;
}

.input-group .btn:last-child {
    border-radius: 0 8px 8px 0 rgba(59, 130, 246, 0.1);
}

.input-group .form-control {
    border-right: 2px solid #e5e7eb;
    border-radius: 8px 0 0 8px;
}

.input-group .btn {
    border-radius: 0;
    padding: 12px 20px;
    font-weight: 500;
}

.input-group .btn:not(:last-child) {
    border-radius: 0;
}

.input-group .btn:last-child {
    border-radius: 0 8px 8px 0;
}

.input-group .btn-outline-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    border: 2px solid #64748b;
    color: white;
}

.input-group .btn-outline-secondary:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    border-color: #475569;
}

.input-group .btn-outline-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 2px solid #ef4444;
    color: white;
}

.input-group .btn-outline-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #dc2626;
}

/* Модальные окна */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 20px 24px;
    border: none;
}

.modal-title {
    font-weight: 600;
    color: #1e293b;
}

.modal-body label {
    color: #0f172a;
    font-weight: 500;
    margin-bottom: 8px;
}

.modal-body .form-control,
.modal-body .form-select {
    color: #1e293b;
}

.modal-body .form-check-label {
    color: #1e293b;
    font-size: 18px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-footer .btn {
    flex: 0 0 auto;
    max-width: 200px;
    justify-content: center;
    white-space: nowrap;
}

.modal-footer .btn-secondary,
.modal-footer .btn-primary,
.modal-footer .btn-danger {
    padding: 10px 20px;
    font-size: 15px;
    min-width: 180px;
}

.btn-close {
    filter: brightness(0) invert(1);
}

/* Алерты */
.alert {
    border: none;
    border-radius: 12px;
    padding: 20px;
    font-size: 15px;
}

.alert-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #075985;
}

.alert-info i {
    margin-right: 10px;
    font-size: 18px;
}

/* Утилиты */
.text-muted {
    color: #94a3b8 !important;
}

.mb-4 {
    margin-bottom: 24px !important;
}

/* Мигающие индикаторы статуса */
.status-indicator {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px currentColor;
    margin-left: -20px;
}

.status-good {
    background-color: #10b981;
    color: #10b981;
}

.status-warning {
    background-color: #f59e0b;
    color: #f59e0b;
}

.status-critical {
    background-color: #ef4444;
    color: #ef4444;
    animation: blink 0.8s ease-in-out infinite;
}

.status-expired {
    background-color: #6b7280;
    color: #6b7280;
    animation: none;
}

.status-suspended {
    background-color: #9ca3af;
    color: #9ca3af;
    animation: none;
    opacity: 0.6;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.9);
    }
}

/* Скрыть стрелку у dropdown статусов */
.dropdown-toggle::after {
    display: none !important;
}