/* Custom CSS for Trading Portfolio Dashboard */

/* Global styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Card styles */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* KPI Card styles */
.kpi-card {
    text-align: center;
    padding: 20px;
    border-left: 4px solid #007bff;
}

.kpi-value {
    font-size: 2rem;
    font-weight: bold;
    color: #212529;
}

.kpi-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Portfolio card styles */
.portfolio-card {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.portfolio-card:hover {
    transform: translateY(-2px);
}

/* Bot status badges */
.bot-status-active {
    background-color: #28a745;
}

.bot-status-inactive {
    background-color: #6c757d;
}

.bot-status-error {
    background-color: #dc3545;
}

/* Form styles */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Button styles */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}

/* Table styles */
.dash-table-container {
    border-radius: 8px;
    overflow: hidden;
}

.dash-spreadsheet {
    font-family: inherit;
}

.dash-spreadsheet-container .dash-spreadsheet-inner table {
    border-collapse: separate;
    border-spacing: 0;
}

/* Chart styles */
.plotly-graph-div {
    border-radius: 8px;
}

/* Loading spinner */
._dash-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Alert styles */
.alert {
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: #28a745;
}

.alert-danger {
    border-left-color: #dc3545;
}

.alert-warning {
    border-left-color: #ffc107;
}

.alert-info {
    border-left-color: #17a2b8;
}

/* Tab styles */
.nav-tabs .nav-link {
    color: #495057;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    color: #007bff;
    border-bottom: 3px solid #007bff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .kpi-value {
        font-size: 1.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Animation for new items */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-active {
    background-color: #28a745;
}

.status-inactive {
    background-color: #6c757d;
}

.status-error {
    background-color: #dc3545;
}

.status-warning {
    background-color: #ffc107;
}


/* Portfolio header clickable styles */
.portfolio-header-clickable {
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
    color: #212529 !important;
    font-weight: inherit;
    text-decoration: none !important;
}

.portfolio-header-clickable:hover {
    color: #007bff !important;
}

.portfolio-header-clickable:hover h5 {
    color: #007bff !important;
}

.portfolio-header-clickable h5 {
    margin: 0;
    transition: color 0.2s ease;
    color: inherit;
}
