/* Custom styles for Funding Arbitrage Dashboard */

:root {
    --primary-color: #667eea;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

main {
    flex: 1;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

/* Cards */
.card {
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
}

/* Summary cards */
.card.bg-primary,
.card.bg-success,
.card.bg-info,
.card.bg-warning {
    border: none;
}

.card.bg-primary h3,
.card.bg-success h3,
.card.bg-info h3,
.card.bg-warning h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: bold;
}

.card.bg-primary h6,
.card.bg-success h6,
.card.bg-info h6,
.card.bg-warning h6 {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Tables */
.table {
    font-size: 0.9rem;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: #f1f3f5;
}

.sortable {
    user-select: none;
}

.sortable:hover {
    background-color: #e9ecef !important;
}

.sortable i {
    font-size: 0.75rem;
    margin-left: 0.25rem;
    opacity: 0.5;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Buttons */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Forms */
.form-control-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Alert banners */
.alert {
    border-radius: 8px;
}

/* Calculator form */
#calculatorForm {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card.bg-primary h3,
    .card.bg-success h3,
    .card.bg-info h3,
    .card.bg-warning h3 {
        font-size: 1.5rem;
    }

    .table {
        font-size: 0.8rem;
    }

    .table thead th {
        padding: 0.5rem;
    }

    .table tbody td {
        padding: 0.5rem;
    }

    /* Stack table on mobile for better readability */
    .table-responsive {
        border: 1px solid #dee2e6;
        border-radius: 8px;
    }
}

@media (max-width: 576px) {
    .navbar-text {
        display: none;
    }

    #calculatorForm .col-6 {
        margin-bottom: 0.5rem;
    }
}

/* Loading spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Footer */
.footer {
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid #dee2e6;
}

/* Profit/Loss colors */
.text-profit {
    color: var(--success-color);
    font-weight: 600;
}

.text-loss {
    color: var(--danger-color);
    font-weight: 600;
}

/* Utility classes */
.fw-bold {
    font-weight: 600 !important;
}

/* Login page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chart containers */
canvas {
    max-width: 100%;
    height: auto !important;
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn,
    #calculatorForm,
    #toggleCalculator,
    #refreshBtn {
        display: none !important;
    }

    .card {
        page-break-inside: avoid;
    }
}
