/* Financial Asset Data Generator - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --secondary-color: #6c757d;
}

/* Global Styles */
body {
    background-color: #0d1117;
    color: #c9d1d9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.1rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

/* Cards */
.card {
    border-radius: 0.5rem;
    border: 1px solid #30363d;
    background-color: #161b22;
    transition: all 0.2s ease;
}

.card:hover {
    border-color: #444c56;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
}

.card-header {
    border-bottom: 1px solid #30363d;
    border-radius: 0.5rem 0.5rem 0 0 !important;
    font-weight: 600;
}

/* Tables */
.table {
    --bs-table-bg: #161b22;
    --bs-table-color: #c9d1d9;
    --bs-table-striped-bg: #1c2128;
    --bs-table-hover-bg: #21262d;
    border-color: #30363d;
}

.table thead th {
    border-bottom: 2px solid #30363d;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.table tbody tr {
    border-top: 1px solid #30363d;
}

/* DataTables Styling */
.dataTables_wrapper {
    color: #c9d1d9;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background-color: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.375rem 0.75rem;
    margin: 0 0.125rem;
    border-radius: 0.375rem;
    background-color: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9 !important;
    text-decoration: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #30363d;
    border-color: #444c56;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white !important;
}

/* Forms */
.form-control,
.form-select {
    background-color: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    border-radius: 0.375rem;
}

.form-control:focus,
.form-select:focus {
    background-color: #21262d;
    border-color: var(--primary-color);
    color: #c9d1d9;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    color: #f0f6fc;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-btn-focus-shadow-rgb), 0.5);
}

/* Badges */
.badge {
    font-weight: 500;
    font-size: 0.75em;
}

/* Progress bars */
.progress {
    background-color: #21262d;
    border-radius: 0.375rem;
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    border: 1px solid;
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    border-color: rgba(13, 202, 240, 0.2);
    color: #0dcaf0;
}

/* Chart containers */
canvas {
    background-color: transparent;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #30363d;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom gradient for hero sections */
.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0b5394 100%);
}

/* Print styles */
@media print {
    body {
        background-color: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        background-color: white !important;
    }
    
    .navbar,
    .btn,
    .alert-dismissible .btn-close {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
