/**
 * Основные стили проекта
 */

/* CSS переменные */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
}

/* Базовые стили */
html, body {
    overflow-x: hidden;
}
body {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}

/* Убрать скругления (кроме rounded-full для бейджей) */
.rounded-2xl, .rounded-xl, .rounded-lg, .rounded-md, .rounded {
    border-radius: 0 !important;
}

/* Единый блок: шапка + контент + подвал */
.page-wrapper {
    min-height: calc(100vh - 3rem);
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.page-nav {
    background: rgba(30, 41, 59, 0.6);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.page-footer {
    background: rgba(30, 41, 59, 0.6);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

/* Glass-эффект для карточек */
.glass-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

/* Кнопки */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

.telegram-btn {
    background: linear-gradient(135deg, #0088cc 0%, #00a8e8 100%);
    transition: all 0.3s ease;
}

.telegram-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 136, 204, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 2px solid rgba(99, 102, 241, 0.6);
    color: #818cf8;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #6366f1;
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}

/* Кнопка Вход в шапке — более заметный цвет */
a.btn-header-login.btn-secondary {
    border-color: rgba(99, 102, 241, 0.8);
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.2);
}
a.btn-header-login.btn-secondary:hover {
    border-color: #6366f1;
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.35);
}
[data-theme="light"] a.btn-header-login.btn-secondary {
    border-color: rgba(79, 70, 229, 0.7);
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.12);
}
[data-theme="light"] a.btn-header-login.btn-secondary:hover {
    border-color: #4f46e5;
    color: #4338ca;
    background: rgba(99, 102, 241, 0.2);
}

.btn-hover {
    transition: all 0.3s ease;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-emerald {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #fff;
    transition: all 0.3s ease;
}

.btn-emerald:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(5, 150, 105, 0.3);
}

/* Эффект при наведении для всех кнопок */
button,
.btn-primary,
.telegram-btn,
.btn-secondary,
.btn-emerald,
a.btn-primary,
a.btn-secondary {
    transition: all 0.3s ease;
}

button:hover,
.btn-primary:hover,
.telegram-btn:hover,
.btn-secondary:hover,
.btn-emerald:hover,
a.btn-primary:hover,
a.btn-secondary:hover {
    transform: translateY(-2px);
}

/* Поля ввода */
.input-field {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: all 0.3s ease;
}

.input-field:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    outline: none;
}

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

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* ========== Светлая тема (мягкая) ========== */
[data-theme="light"] body {
    background: linear-gradient(135deg, #f5f4f1 0%, #e8e6e1 100%);
}

[data-theme="light"] .page-wrapper {
    background: rgba(232, 230, 224, 0.95);
    border-color: rgba(148, 163, 184, 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .page-nav {
    background: rgba(220, 218, 212, 0.9);
    border-bottom-color: rgba(148, 163, 184, 0.3);
}

[data-theme="light"] .page-footer {
    background: rgba(220, 218, 212, 0.9);
    border-top-color: rgba(148, 163, 184, 0.3);
}

[data-theme="light"] .glass-card {
    background: rgba(232, 230, 224, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

[data-theme="light"] .input-field {
    background: rgba(250, 249, 247, 0.9);
    border-color: rgba(148, 163, 184, 0.25);
}

[data-theme="light"] .input-field:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Переопределение Tailwind-цветов для светлой темы */
[data-theme="light"] .text-slate-100,
[data-theme="light"] .text-slate-200,
[data-theme="light"] .text-slate-300 {
    color: #475569 !important;
}

[data-theme="light"] .text-slate-400,
[data-theme="light"] .text-slate-500 {
    color: #64748b !important;
}

[data-theme="light"] .text-white {
    color: #334155 !important;
}

[data-theme="light"] .bg-slate-700,
[data-theme="light"] .bg-slate-800 {
    background-color: #e4e2dc !important;
}

[data-theme="light"] .bg-slate-600 {
    background-color: #d8d6d0 !important;
}

[data-theme="light"] .border-slate-600,
[data-theme="light"] .border-slate-700 {
    border-color: #d6d4d0 !important;
}

[data-theme="light"] .border-slate-600\/40,
[data-theme="light"] .border-slate-600\/30 {
    border-color: rgba(148, 163, 184, 0.25) !important;
}

[data-theme="light"] .bg-slate-700\/50,
[data-theme="light"] .bg-slate-600\/50,
[data-theme="light"] .bg-slate-700\/30 {
    background-color: rgba(220, 218, 212, 0.95) !important;
}

[data-theme="light"] .hover\:bg-slate-700\/50:hover,
[data-theme="light"] .hover\:bg-slate-600\/50:hover,
[data-theme="light"] .hover\:bg-slate-700\/30:hover {
    background-color: rgba(208, 205, 198, 0.95) !important;
}

[data-theme="light"] .hover\:bg-slate-600:hover {
    background-color: #c4c2bc !important;
}

[data-theme="light"] .hover\:text-white:hover {
    color: #334155 !important;
}

/* Акцентные цвета для светлой темы (контраст на светлом фоне) */
[data-theme="light"] .text-indigo-400,
[data-theme="light"] .text-indigo-300 { color: #4f46e5 !important; }
[data-theme="light"] .text-green-400,
[data-theme="light"] .text-emerald-400 { color: #059669 !important; }
[data-theme="light"] .text-red-400,
[data-theme="light"] .text-red-500 { color: #dc2626 !important; }
[data-theme="light"] .text-cyan-400 { color: #0891b2 !important; }
[data-theme="light"] .text-pink-400,
[data-theme="light"] .text-pink-300 { color: #db2777 !important; }
[data-theme="light"] .text-amber-400,
[data-theme="light"] .text-yellow-400 { color: #d97706 !important; }
[data-theme="light"] .text-blue-400 { color: #2563eb !important; }

[data-theme="light"] .hover\:text-indigo-400:hover,
[data-theme="light"] .hover\:text-indigo-300:hover { color: #4f46e5 !important; }
[data-theme="light"] .group:hover .group-hover\:text-indigo-300 { color: #4f46e5 !important; }
[data-theme="light"] .group:hover .group-hover\:text-pink-300 { color: #db2777 !important; }
[data-theme="light"] .hover\:text-red-400:hover,
[data-theme="light"] .hover\:text-red-300:hover { color: #dc2626 !important; }

/* Кнопки — текст белый на акцентном фоне (работает в обеих темах) */
[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff !important;
}
[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 10px 40px rgba(79, 70, 229, 0.35);
}

[data-theme="light"] .btn-secondary {
    border-color: rgba(99, 102, 241, 0.6);
    color: #4f46e5;
}

[data-theme="light"] .btn-secondary:hover {
    border-color: #4f46e5;
    color: #4338ca;
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.2);
}

[data-theme="light"] .btn-emerald:hover {
    box-shadow: 0 10px 40px rgba(5, 150, 105, 0.25);
}

/* Модальные окна в светлой теме */
[data-theme="light"] .modal-panel {
    background-color: #e4e2dc !important;
    border-color: #d6d4d0 !important;
}

/* Блоки, адаптированные к темам */
.info-card-block {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.4);
}
.info-card-block .info-card-label { color: #94a3b8; }
.info-card-block .info-card-text { color: #e2e8f0; }
.info-card-block .info-card-muted { color: #94a3b8; }
.info-card-block .info-card-dot { background-color: #64748b; }
.info-card-item {
    background: rgba(51, 65, 85, 0.4);
}
.profile-code-block {
    background: rgba(30, 41, 59, 0.8);
    color: #cbd5e1;
    border: 1px solid rgba(71, 85, 105, 0.3);
}

[data-theme="light"] .info-card-block {
    background: rgba(226, 232, 240, 0.9);
    border-color: rgba(148, 163, 184, 0.5);
}
[data-theme="light"] .info-card-block .info-card-label { color: #64748b !important; }
[data-theme="light"] .info-card-block .info-card-text { color: #334155 !important; }
[data-theme="light"] .info-card-block .info-card-muted { color: #64748b !important; }
[data-theme="light"] .info-card-block .info-card-dot { background-color: #94a3b8 !important; }
[data-theme="light"] .info-card-item {
    background: rgba(241, 245, 249, 0.9);
}
[data-theme="light"] .profile-code-block {
    background: rgba(248, 250, 252, 0.95);
    color: #334155 !important;
    border-color: rgba(148, 163, 184, 0.4);
}

/* Блок напоминания о записи экрана при покупке — выделяется на обеих темах */
.purchase-reminder-block {
    background: rgba(245, 158, 11, 0.4) !important;
    border: 2px solid #f59e0b !important;
    color: #fef3c7 !important;
    font-weight: 600 !important;
}
[data-theme="light"] .purchase-reminder-block {
    background: rgba(217, 119, 6, 0.35) !important;
    border: 2px solid #d97706 !important;
    color: #78350f !important;
    font-weight: 600 !important;
}

/* ========== Seller: таблица и карточки аккаунтов — адаптация под темы ========== */
.seller-table-block {
    border-color: rgba(71, 85, 105, 0.5);
}
.seller-table-block .seller-table-header {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(71, 85, 105, 0.4);
}
.seller-table-block .seller-thead th {
    color: #94a3b8;
}
.seller-table-block .seller-thead a:hover {
    color: #f8fafc;
}
.seller-table-block .seller-tbody {
    color: #e2e8f0;
}
.seller-table-block .seller-tbody tr {
    border-top: 1px solid rgba(71, 85, 105, 0.5);
}
.seller-table-block .seller-tbody tr:first-child {
    border-top: none;
}
.seller-table-block .seller-tbody tr:hover {
    background: rgba(51, 65, 85, 0.2);
}
.seller-table-block .account-card-row {
    background: rgba(30, 41, 59, 0.3);
    border-left-color: transparent;
}
.seller-table-block .account-card-row.account-card-expanded {
    background: rgba(30, 41, 59, 0.6) !important;
    border-left-color: rgba(99, 102, 241, 0.7) !important;
}
.seller-table-block .account-card-row.account-card-expanded .account-card-inner {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
}
.account-card-inner {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(71, 85, 105, 0.4);
}
.account-card-inner .seller-card-label { color: #94a3b8; }
.account-card-inner .seller-card-value { color: #e2e8f0; }
.account-card-inner .seller-card-muted { color: #64748b; }

[data-theme="light"] .seller-table-block {
    border-color: rgba(148, 163, 184, 0.5);
}
[data-theme="light"] .seller-table-block .seller-table-header {
    background: rgba(226, 232, 240, 0.9);
    border-color: rgba(148, 163, 184, 0.4);
}
[data-theme="light"] .seller-table-block .seller-thead th {
    color: #64748b !important;
}
[data-theme="light"] .seller-table-block .seller-thead a:hover {
    color: #334155 !important;
}
[data-theme="light"] .seller-table-block .seller-tbody {
    color: #334155 !important;
}
[data-theme="light"] .seller-table-block .seller-tbody tr {
    border-top-color: rgba(148, 163, 184, 0.4);
}
[data-theme="light"] .seller-table-block .seller-tbody tr:hover {
    background: rgba(241, 245, 249, 0.9);
}
[data-theme="light"] .seller-table-block .account-card-row {
    background: rgba(241, 245, 249, 0.5);
}
[data-theme="light"] .seller-table-block .account-card-row.account-card-expanded {
    background: rgba(226, 232, 240, 0.95) !important;
    border-left-color: rgba(99, 102, 241, 0.6) !important;
}
[data-theme="light"] .seller-table-block .account-card-row.account-card-expanded .account-card-inner {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}
[data-theme="light"] .account-card-inner {
    background: rgba(248, 250, 252, 0.95);
    border-color: rgba(148, 163, 184, 0.5);
}
[data-theme="light"] .account-card-inner .seller-card-label { color: #64748b !important; }
[data-theme="light"] .account-card-inner .seller-card-value { color: #334155 !important; }
[data-theme="light"] .account-card-inner .seller-card-muted { color: #64748b !important; }

/* Бейджи в таблице seller (MFA, На продаже) */
[data-theme="light"] .seller-table-block .bg-amber-500\/20 {
    background-color: rgba(217, 119, 6, 0.2) !important;
}
[data-theme="light"] .seller-table-block .bg-slate-600\/30 {
    background-color: rgba(148, 163, 184, 0.25) !important;
}
[data-theme="light"] .seller-table-block .bg-emerald-500\/20 {
    background-color: rgba(5, 150, 105, 0.2) !important;
}
