/* public/css/app.css */

/* Глобальные стили для всего сайта */
body {
    background: radial-gradient(circle at top, #0f172a, #020617);
    color: #e2e8f0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Ссылки */
a {
    color: #60a5fa;
    text-decoration: none;
    transition: all 0.2s;
}

a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* Навигация */
.navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
}

.navbar-brand {
    color: #60a5fa !important;
    font-weight: bold;
}

.nav-link {
    color: #94a3b8 !important;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #60a5fa !important;
}

.nav-link.active {
    color: #60a5fa !important;
}

/* Увеличенный z-index для выпадающих меню */
.dropdown-menu {
    z-index: 1050 !important;
}

/* Фикс для навбара */
.navbar {
    z-index: 1030 !important;
    position: sticky;
    top: 0;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%2360a5fa' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-toggler {
    border-color: #60a5fa !important;
}

.navbar-toggler:hover {
    background-color: rgba(96, 165, 250, 0.1) !important;
}

.list-group-item {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(96, 165, 250, 0.2);
    color: #e2e8f0;
}

.list-group-item:hover {
    background: rgba(30, 41, 59, 0.9);
    color: #60a5fa;
}
.navbar .dropdown-toggle .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    margin-left: 4px;
}

.navbar .dropdown-item .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-item span:first-child {
    flex: 1;
}

.dropdown-item .badge {
    margin-left: 10px;
}

/* Убираем лишние отступы */
.navbar .nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Чтобы выпадающее меню не перекрывалось другими элементами */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
}

/* Карточки */
.card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(96, 165, 250, 0.2);
    transition: all 0.3s;
    border-radius: 16px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(100, 108, 255, 0.3);
    border-color: rgba(96, 165, 250, 0.5);
}

.card-header {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
    padding: 1rem 1.25rem;
}

.card-body {
    color: #e2e8f0;
    padding: 1.25rem;
}

/* Переопределение text-muted для темной темы */
.text-muted {
    color: #94a3b8 !important;
}

/* Альтернативные оттенки для muted текста */
.text-muted-light {
    color: #cbd5e1 !important;
}

.text-muted-dark {
    color: #64748b !important;
}

/* Для ссылок в muted тексте */
.text-muted a {
    color: #60a5fa !important;
}

.text-muted a:hover {
    color: #93c5fd !important;
}

/* Специально для мелкого текста в карточках */
.card .text-muted,
.card-footer .text-muted,
.card-header .text-muted {
    color: #94a3b8 !important;
}

/* Для подписей и вспомогательного текста */
.form-text,
.help-text,
.small-text {
    color: #94a3b8 !important;
}

/* Для disabled состояний */
.text-muted.disabled,
.text-muted:disabled {
    color: #64748b !important;
}

/* Переопределение bg-dark для вашей темы */
.bg-dark {
    background: #0f172a !important; /* slate-900 - глубокий темный */
}

/* Альтернативы для разных случаев */
.bg-dark-800 {
    background: #1e293b !important; /* slate-800 */
}

.bg-dark-700 {
    background: #334155 !important; /* slate-700 */
}

.bg-dark-600 {
    background: #475569 !important; /* slate-600 */
}

/* Для карточек и блоков */
.bg-card {
    background: rgba(30, 41, 59, 0.7) !important;
    backdrop-filter: blur(10px);
}

/* Для навбара */
.bg-navbar {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(10px);
}

/* Кастомные фоны для темной темы */
.bg-slate-900 {
    background: #0f172a !important;
}

.bg-slate-800 {
    background: #1e293b !important;
}

.bg-slate-700 {
    background: #334155 !important;
}

.bg-slate-600 {
    background: #475569 !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

.bg-gradient-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

/* Для карточек с прозрачностью */
.bg-glass {
    background: rgba(30, 41, 59, 0.7) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.bg-glass-dark {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(96, 165, 250, 0.1);
}

/* Хлебные крошки */
.breadcrumb {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 10px 15px;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.breadcrumb-item {
    color: #94a3b8;
}

.breadcrumb-item a {
    color: #60a5fa;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: #93c5fd;
}

.breadcrumb-item.active {
    color: #e2e8f0;
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #64748b;
    content: "›";
    font-size: 18px;
    font-weight: bold;
}

/* Таблицы */
.table {
    color: #e2e8f0;
    margin-bottom: 0;
}

.table thead th {
    color: #94a3b8;
    border-bottom-color: #475569;
}

.table td, .table th {
    border-top-color: #334155;
}

/* Алерты */
.alert {
    border: none;
    border-radius: 12px;
}

.alert-info {
    background: rgba(59, 130, 246, 0.2);
    border-left: 4px solid #3b82f6;
    color: #93c5fd;
}

.alert-success {
    background: rgba(34, 197, 94, 0.2);
    border-left: 4px solid #22c55e;
    color: #86efac;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.2);
    border-left: 4px solid #f59e0b;
    color: #fde047;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    border-left: 4px solid #ef4444;
    color: #fca5a5;
}

.alert-secondary {
    background: rgba(51, 65, 85, 0.5);
    border-left: 4px solid #64748b;
    color: #cbd5e1;
}

/* Кнопки */
.btn {
    border-radius: 10px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-outline-secondary {
    color: #94a3b8;
    border-color: #475569;
}

.btn-outline-secondary:hover {
    background: #60a5fa;
    border-color: #60a5fa;
    color: white;
    transform: translateY(-2px);
}

/* Формы */
.form-control {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(96, 165, 250, 0.2);
    color: #e2e8f0;
    border-radius: 10px;
}

.form-control:focus {
    background: rgba(30, 41, 59, 0.9);
    border-color: #60a5fa;
    color: #e2e8f0;
    box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.25);
}

.form-control::placeholder {
    color: #64748b;
}

.form-label {
    color: #94a3b8;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Прогресс-бары */
.progress {
    background: rgba(51, 65, 85, 0.5);
    border-radius: 10px;
    overflow: hidden;
}

/* Переопределение стилей DaData */
/* Dark theme wrapper for DaData suggestions */
.suggestions-suggestions {
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

/* Individual suggestion item */
.suggestions-suggestion {
    padding: 10px 15px;
    border-bottom: 1px solid #2a2a2a;
    color: #d1d1d1;
}

/* Highlighted or hovered item - ИСПРАВЛЕННЫЙ ЦВЕТ */
.suggestions-suggestion:hover,
.suggestions-suggestion.suggestions-suggestion-current {
    background-color: #334155;
    color: #ffffff;
}

/* Bold matched text within the suggestion */
.suggestions-suggestion strong {
    color: #66b2ff;
}

/* Additional elements like the DaData label/branding */
.suggestions-addon {
    background-color: #1a1a1a;
    color: #888888;
}

.suggestions-suggestions {
    background: #1e293b !important;
    border: 1px solid #475569 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    z-index: 1060 !important;
}

/* Каждый элемент списка */
.suggestions-suggestions .suggestions-item {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid #334155 !important;
    cursor: pointer !important;
    transition: none !important;
}

/* Последний элемент */
.suggestions-suggestions .suggestions-item:last-child {
    border-bottom: none !important;
}

/* При наведении */
.suggestions-suggestions .suggestions-item:hover {
    background: #334155 !important;
    color: #60a5fa !important;
}

/* Все элементы внутри при наведении */
.suggestions-suggestions .suggestions-item:hover * {
    background: transparent !important;
    color: inherit !important;
}

/* Жирное совпадение */
.suggestions-suggestions .suggestions-item strong,
.suggestions-suggestions .suggestions-item b {
    color: #60a5fa !important;
    background: transparent !important;
    font-weight: 600 !important;
}

/* При наведении жирное совпадение */
.suggestions-suggestions .suggestions-item:hover strong,
.suggestions-suggestions .suggestions-item:hover b {
    color: #60a5fa !important;
}

/* Описание города */
.suggestions-suggestions .suggestions-item .suggestions-description,
.suggestions-suggestions .suggestions-item small,
.suggestions-suggestions .suggestions-item .description {
    color: #94a3b8 !important;
    display: block !important;
    font-size: 12px !important;
    margin-top: 4px !important;
}

/* При наведении описание */
.suggestions-suggestions .suggestions-item:hover .suggestions-description,
.suggestions-suggestions .suggestions-item:hover small,
.suggestions-suggestions .suggestions-item:hover .description {
    color: #cbd5e1 !important;
}

/* Стилизация скроллбара */
.suggestions-suggestions::-webkit-scrollbar {
    width: 8px;
}

.suggestions-suggestions::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 4px;
}

.suggestions-suggestions::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

.suggestions-suggestions::-webkit-scrollbar-thumb:hover {
    background: #60a5fa;
}

.btn-outline-info {
    color: #22d3ee;
    border-color: #22d3ee;
}

.btn-outline-info:hover {
    background: #22d3ee;
    color: #0f172a;
}

.btn-outline-primary {
    color: #60a5fa;
    border-color: #60a5fa;
}

.btn-outline-primary:hover {
    background: #60a5fa;
    color: #0f172a;
}

.btn-outline-success {
    color: #4ade80;
    border-color: #4ade80;
}

.btn-outline-success:hover {
    background: #4ade80;
    color: #0f172a;
}

/* Модальное окно для темной темы */
.modal-content.bg-dark {
    background: #1e293b !important;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.bg-dark-800 {
    background: #0f172a !important;
}

/* Адаптивность */
@media (max-width: 767.98px) {
    .card-body {
        padding: 1rem;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .breadcrumb {
        font-size: 0.9rem;
    }
}
