/* Основные стили приложения - Темная тема */

/* Основные стили */
body {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

/* Навигация */
.navbar-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.navbar-brand {
    font-weight: bold;
}

.navbar-nav .nav-link {
    color: #ffffff !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #f8f9fa !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* Карточки */
.card-custom {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    color: #ffffff;
}

.card-header-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 15px 15px 0 0;
    padding: 2rem;
    text-align: center;
}

/* Формы */
.form-control {
    background-color: #3a3a3a;
    border: 1px solid #404040;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    color: #ffffff;
}

.form-control:focus {
    background-color: #3a3a3a;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    color: #ffffff;
}

.form-control::placeholder {
    color: #808080;
}

.form-label {
    color: #b0b0b0;
    font-weight: 500;
}

.input-group-text {
    background-color: #3a3a3a;
    border-color: #404040;
    color: #b0b0b0;
}

/* Кнопки */
.btn-primary-custom {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    color: #ffffff;
    font-weight: 500;
    transition: transform 0.2s;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-secondary-custom {
    background: linear-gradient(45deg, #3a3a3a 0%, #4a4a4a 100%);
    border: 1px solid #404040;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    color: #ffffff;
    font-weight: 500;
    transition: transform 0.2s;
}

.btn-secondary-custom:hover {
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-danger-custom {
    background: linear-gradient(45deg, #dc3545 0%, #c82333 100%);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    color: #ffffff;
    font-weight: 500;
    transition: transform 0.2s;
}

.btn-danger-custom:hover {
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-success-custom {
    background: linear-gradient(45deg, #28a745 0%, #218838 100%);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    color: #ffffff;
    font-weight: 500;
    transition: transform 0.2s;
}

.btn-success-custom:hover {
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-server-refresh {
    background: linear-gradient(45deg, #28a745 0%, #218838 100%);
    border: none;
    height: 30;
    width: 100%;
    border-radius: 25px;
    padding: 0.1rem 2rem;
    color: #ffffff;
    font-weight: 500;
    transition: transform 0.2s;
}

.btn-server-refresh:hover {
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-outline-primary,
.btn-outline-secondary {
    background-color: transparent;
    border-color: #404040;
    color: #ffffff;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover {
    background-color: #198754;
    border-color: #667eea;
    color: #ffffff;
}

/* Статус оплаты */
.payment-status {
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
}

.payment-active {
    background-color: rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(40, 167, 69, 0.4);
    color: #6bcf7f;
}

.payment-expired {
    background-color: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #f1a2a8;
}

.payment-warning {
    background-color: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #ffd43b;
}

/* История входов */
.login-history {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 1.5rem;
}

.login-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #404040;
}

.login-item:last-child {
    border-bottom: none;
}

/* Требования к паролю */
.password-requirements {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.requirement {
    font-size: 0.9rem;
    margin: 0.25rem 0;
    color: #b0b0b0;
}

.requirement.valid {
    color: #28a745;
}

.requirement.invalid {
    color: #dc3545;
}

/* Админ панель */
.admin-nav {
    background-color: #2d2d2d;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.admin-nav .nav-pills .nav-link {
    border-radius: 20px;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
    color: #b0b0b0;
}

.admin-nav .nav-pills .nav-link:hover {
    color: #ffffff;
    background-color: #3a3a3a;
}

.admin-nav .nav-pills .nav-link.active {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

/* Таблицы */
.table-custom {
    background: #2d2d2d;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.table-custom thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.table-custom tbody tr {
    background-color: #2d2d2d;
    color: #ffffff;
}

.table-custom tbody tr:hover {
    background-color: #3a3a3a;
}

.table-custom td,
.table-custom th {
    border-color: #404040;
}

/* Статусы */
.status-active {
    color: #28a745;
    font-weight: bold;
}

.status-inactive {
    color: #dc3545;
    font-weight: bold;
}

.status-online {
    color: #28a745;
}

.status-offline {
    color: #dc3545;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Адаптивность */
@media (max-width: 768px) {
    .card-header-custom {
        padding: 1.5rem;
    }
    
    .btn-primary-custom,
    .btn-secondary-custom,
    .btn-danger-custom,
    .btn-server-refresh,
    .btn-success-custom {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
}

/* Уведомления */
.alert {
    border-radius: 10px;
    border: none;
    background-color: #2d2d2d;
    color: #ffffff;
}

.alert-success {
    background: linear-gradient(45deg, rgba(40, 167, 69, 0.2) 0%, rgba(40, 167, 69, 0.1) 100%);
    color: #6bcf7f;
}

.alert-danger {
    background: linear-gradient(45deg, rgba(220, 53, 69, 0.2) 0%, rgba(220, 53, 69, 0.1) 100%);
    color: #f1a2a8;
}

.alert-info {
    background: linear-gradient(45deg, rgba(23, 162, 184, 0.2) 0%, rgba(23, 162, 184, 0.1) 100%);
    color: #7dd3fc;
}

/* Загрузка */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Футер */
footer {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
}

footer .text-muted {
    color: #808080 !important;
}

/* Общие цвета */
.text-primary {
    color: #667eea !important;
}

.text-secondary {
    color: #b0b0b0 !important;
}

.text-muted {
    color: #808080 !important;
}

/* Карточки с границами */
.border-success {
    border-color: #28a745 !important;
}

.border-info {
    border-color: #17a2b8 !important;
}

.border-primary {
    border-color: #667eea !important;
}

.country-dropdown {
    position: relative;
}

.country-select {
    display: none !important;
}

.country-display {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border: 1px solid #495057;
    border-radius: 0.375rem;
    background-color: #212529;
    color: #fff;
    cursor: pointer;
    min-height: 38px;
}

.country-display:hover {
    border-color: #86b7fe;
}

.country-display:focus,
.country-display:focus-within {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: none;
}

.country-flag {
    width: 24px;
    height: 16px;
    margin-right: 8px;
    object-fit: cover;
    border-radius: 2px;
}

.country-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #343a40;
    border: 1px solid #495057;
    border-radius: 0.375rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.country-dropdown-menu.show {
    display: block;
}

.country-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #495057;
    color: #fff;
    transition: background-color 0.15s ease-in-out;
}

.country-option:hover {
    background-color: #495057;
}

.country-option:last-child {
    border-bottom: none;
}

.dropdown-arrow {
    margin-left: auto;
    transition: transform 0.3s;
    color: #adb5bd;
}

.dropdown-arrow.open {
    transform: rotate(180deg);
}