/* ============================================
   BITFORWARD CRYPTO THEME - PROFESSIONAL DARK
   ============================================ */

/* === GLOBAL OVERRIDES === */
body {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%) !important;
    min-height: 100vh;
    color: #E2E8F0 !important;
    transition: all 0.3s ease;
}

/* === HERO SECTIONS === */
.bf-hero,
.hero-section,
.dashboard-hero,
.contracts-hero,
.lending-hero,
.analytics-hero,
.insurance-hero {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%) !important;
    border-bottom: 1px solid rgba(6, 182, 212, 0.2) !important;
    position: relative;
    overflow: hidden;
}

.bf-hero::before,
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
}

.bf-hero::after,
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    animation: float 10s ease-in-out infinite reverse;
    pointer-events: none;
}

/* === CARDS & CONTAINERS === */
.stat-card,
.contract-card,
.pool-card,
.subaccount-card,
.kpi-card,
.risk-card,
.insurance-card,
.metric-card,
.premium-card,
.card {
    background: rgba(15, 23, 42, 0.7) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(6, 182, 212, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 40px rgba(6, 182, 212, 0.05) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.stat-card:hover,
.contract-card:hover,
.pool-card:hover,
.subaccount-card:hover,
.kpi-card:hover,
.risk-card:hover,
.insurance-card:hover,
.metric-card:hover,
.premium-card:hover,
.card:hover {
    border-color: rgba(6, 182, 212, 0.5) !important;
    box-shadow: 0 20px 48px rgba(6, 182, 212, 0.2), 0 0 80px rgba(59, 130, 246, 0.15) !important;
    transform: translateY(-8px) !important;
}

/* === GRADIENT TEXT === */
.gradient-text,
.section-title,
h1, h2, h3 {
    background: linear-gradient(135deg, #06B6D4 0%, #3B82F6 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    filter: drop-shadow(0 0 30px rgba(6, 182, 212, 0.3));
}

/* === VALUES WITH NEON GLOW === */
.stat-value,
.metric-value,
.overview-value,
.kpi-value {
    color: #FFFFFF !important;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.4) !important;
}

/* === LABELS === */
.stat-label,
.metric-label,
.overview-label {
    color: #94A3B8 !important;
    letter-spacing: 1.5px !important;
}

/* === BUTTONS === */
.btn,
button,
.action-btn,
.btn-primary,
.apply-filters-btn {
    background: rgba(6, 182, 212, 0.1) !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
    color: #94A3B8 !important;
    transition: all 0.3s ease !important;
}

.btn:hover,
button:hover,
.action-btn:hover {
    background: rgba(6, 182, 212, 0.2) !important;
    border-color: #06B6D4 !important;
    color: #06B6D4 !important;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3) !important;
}

.btn-primary,
.btn.primary,
.action-btn.primary,
.btn-primary-premium {
    background: linear-gradient(135deg, #06B6D4 0%, #3B82F6 100%) !important;
    color: white !important;
    border: 1px solid #06B6D4 !important;
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.4) !important;
}

.btn-primary:hover {
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.6) !important;
    transform: translateY(-2px) !important;
}

/* === TABLES === */
table {
    background: transparent !important;
}

th {
    color: #94A3B8 !important;
    border-bottom-color: rgba(6, 182, 212, 0.2) !important;
}

td {
    color: #E2E8F0 !important;
    border-bottom-color: rgba(6, 182, 212, 0.1) !important;
}

tr:hover {
    background: rgba(6, 182, 212, 0.05) !important;
}

/* === ICONS === */
.stat-icon,
.icon-container,
.metric-icon {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 20px rgba(6, 182, 212, 0.2) !important;
}

/* === PROGRESS BARS === */
.progress-bar,
.allocation-bar {
    background: rgba(6, 182, 212, 0.1) !important;
}

.progress-fill,
.allocation-fill {
    background: linear-gradient(90deg, #06B6D4 0%, #3B82F6 100%) !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5) !important;
}

/* === BADGES === */
.badge,
.status-badge,
.contract-type,
.subaccount-badge {
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(6, 182, 212, 0.2) !important;
}

/* === INPUTS & SELECTS === */
input,
select,
textarea,
.form-input,
.form-select,
.filter-select {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
    color: #E2E8F0 !important;
}

input:focus,
select:focus,
textarea:focus,
.form-input:focus,
.form-select:focus {
    border-color: #06B6D4 !important;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3) !important;
}

/* === MODALS === */
.modal-content {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(30px) !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 80px rgba(6, 182, 212, 0.2) !important;
}

/* === CHARTS === */
.chart-container,
.chart-wrapper {
    background: rgba(15, 23, 42, 0.7) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(6, 182, 212, 0.2) !important;
}

/* === FILTERS BAR === */
.filters-bar {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(6, 182, 212, 0.2) !important;
    border-radius: 16px !important;
    padding: 1.5rem !important;
}

/* === ACTIVITIES & LISTS === */
.activity-item,
.permission-item,
.legend-item {
    background: rgba(6, 182, 212, 0.05) !important;
    border: 1px solid rgba(6, 182, 212, 0.1) !important;
}

.activity-item:hover,
.permission-item:hover,
.legend-item:hover {
    background: rgba(6, 182, 212, 0.1) !important;
    border-color: rgba(6, 182, 212, 0.3) !important;
}

/* === POOLS & SPECIAL CARDS === */
.overview-grid .overview-card::before {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%) !important;
}

/* === TEXT COLORS === */
.text-primary {
    color: #FFFFFF !important;
}

.text-secondary {
    color: #94A3B8 !important;
}

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

/* === SPECIAL EFFECTS === */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes neonPulse {
    0%, 100% {
        text-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
    }
    50% {
        text-shadow: 0 0 40px rgba(6, 182, 212, 0.8);
    }
}

/* === HEADER OVERRIDE === */
.bf-header {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(6, 182, 212, 0.2) !important;
}

.bf-nav-link {
    color: #94A3B8 !important;
}

.bf-nav-link:hover,
.bf-nav-link.active {
    color: #06B6D4 !important;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.5) !important;
}

/* === LOGO === */
.bitforward-brand {
    background: linear-gradient(135deg, #06B6D4 0%, #3B82F6 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.5));
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #06B6D4 0%, #3B82F6 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #3B82F6 0%, #06B6D4 100%);
}

/* === ANIMATIONS === */
.animate-fadeInUp,
.animate-fadeInLeft,
.animate-fadeInRight,
.animate-scaleIn {
    animation-fill-mode: both;
}

/* === NOTIFICATION PANEL === */
.notification-panel {
    background: rgba(15, 23, 42, 0.9) !important;
    backdrop-filter: blur(30px) !important;
    border-left: 1px solid rgba(6, 182, 212, 0.3) !important;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4), 0 0 80px rgba(6, 182, 212, 0.1) !important;
}

.notification-header {
    border-bottom: 1px solid rgba(6, 182, 212, 0.2) !important;
}

.notification-item {
    border-bottom: 1px solid rgba(6, 182, 212, 0.1) !important;
    transition: all 0.3s ease !important;
}

.notification-item:hover {
    background: rgba(6, 182, 212, 0.05) !important;
}

.notification-item.unread {
    background: rgba(6, 182, 212, 0.1) !important;
}

.notification-item .timestamp {
    color: rgba(148, 163, 184, 0.6) !important;
}

.notification-badge {
    background: #06B6D4 !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.6) !important;
    animation: notification-pulse 2s infinite;
}

@keyframes notification-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.6);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(6, 182, 212, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
    }
}

.notification-toggle {
    position: relative;
    background: rgba(15, 23, 42, 0.5) !important;
    border: 1px solid rgba(6, 182, 212, 0.2) !important;
    transition: all 0.3s ease !important;
}

.notification-toggle:hover {
    border-color: rgba(6, 182, 212, 0.5) !important;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3) !important;
}

/* === CUSTOMIZABLE DASHBOARD === */
.dashboard-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.widget {
    cursor: move;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.widget.sortable-ghost {
    opacity: 0.4;
    transform: scale(0.95);
}

.widget.sortable-chosen {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 60px rgba(6, 182, 212, 0.3) !important;
    z-index: 10;
    border-color: rgba(6, 182, 212, 0.6) !important;
}

.widget-handle {
    cursor: move;
    color: rgba(148, 163, 184, 0.6);
    padding: 0.5rem;
    border-radius: 4px;
}

.widget-handle:hover {
    background: rgba(6, 182, 212, 0.1);
    color: #06B6D4;
}

.dashboard-customizer-controls {
    background: rgba(15, 23, 42, 0.7) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(6, 182, 212, 0.2) !important;
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-customizer-controls button {
    margin-right: 0.5rem;
}

/* === PAGE TRANSITIONS === */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.5s;
}

::view-transition-old(root) {
    animation: slide-out 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

::view-transition-new(root) {
    animation: slide-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slide-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-transition-fallback {
    animation: fade-in 0.4s ease forwards;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* === THEME SWITCHER STYLES === */
.theme-switcher-container {
    position: relative;
    margin-right: 10px;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(6, 182, 212, 0.3);
    transition: .4s;
    border-radius: 34px;
}

.theme-switch-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background: linear-gradient(135deg, #06B6D4 0%, #3B82F6 100%);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
    transition: .4s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

input:checked + .theme-switch-slider {
    background: rgba(6, 182, 212, 0.2);
}

input:checked + .theme-switch-slider:before {
    transform: translateX(26px);
    background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* === RESPONSIVE IMPROVEMENTS === */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .bf-hero::before,
    .bf-hero::after {
        display: none;
    }
    
    .notification-panel {
        width: 100% !important;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    table.responsive-table {
        display: block;
        overflow-x: auto;
    }
    
    .card, .stat-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .filters-bar {
        flex-direction: column;
    }
    
    .filters-bar > * {
        margin-bottom: 0.5rem;
        width: 100%;
    }
}
