/* brokerage-styles.css */
/* Styles for Brokerage Dashboard page that integrates with the main platform */

/* Hide only the components container when brokerage page is active, KEEP the header visible */
.main-content.brokerage-active .components-container {
    display: none;
}

/* Brokerage Page Container - adjusted to work with existing header */
.brokerage-page {
    display: none; /* Hidden by default */
    width: 100%;
    height: calc(100% - 70px); /* Account for header height */
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    color: #ffffff;
    overflow-y: auto;
    padding: 15px; /* Reduced padding */
    margin-top: 0; /* No top margin since header is above */
}

.brokerage-page.active {
    display: block;
}

/* Reuse the same grid system as market info */
.brokerage-page .market-info-container {
    max-width: 95%; /* Increased from 1400px to use 95% of available width */
    margin: 0 auto;
    width: 100%;
}

/* Grid System - Same as market info */
.brokerage-page .market-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px; /* Reduced gap to use more space */
    margin-bottom: 20px; /* Reduced margin */
}

.brokerage-page .market-col-1 {
    grid-column: span 1;
}

.brokerage-page .market-col-2 {
    grid-column: span 2;
}

.brokerage-page .market-col-3 {
    grid-column: span 3;
}

.brokerage-page .market-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 20px; /* Slightly reduced padding */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
    width: 100%; /* Ensure full width usage */
}

.brokerage-page .market-card:hover {
    transform: translateY(-5px);
    border-color: rgba(135, 206, 235, 0.3);
}

.brokerage-page .market-card h3 {
    margin-bottom: 15px; /* Reduced margin */
    color: #87ceeb;
    font-size: 18px;
    border-bottom: 2px solid rgba(135, 206, 235, 0.3);
    padding-bottom: 8px; /* Reduced padding */
}

/* Tables - Same styling as market info tables with proper sticky headers */
.brokerage-page .market-tenor-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}

.brokerage-page .market-tenor-table th,
.brokerage-page .market-tenor-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
}

.brokerage-page .market-tenor-table th {
    background: rgba(255, 255, 255, 0.1);
    color: #87ceeb;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brokerage-page .market-tenor-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.brokerage-page .market-tenor-table tbody tr {
    transition: background-color 0.15s ease;
}

/* Table wrapper styling for proper scrolling */
.brokerage-page .table-wrapper {
    padding: 0 10px 10px 10px;
    width: 100%;
    box-sizing: border-box;
    overflow: auto;
}

/* Scrollbar styling for table wrapper */
.brokerage-page .table-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background-color: transparent;
}

.brokerage-page .table-wrapper::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.brokerage-page .table-wrapper::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.brokerage-page .table-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Stats Grid - Same as market info */
.brokerage-page .market-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 12px 0; /* Reduced margin */
}

.brokerage-page .market-stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.brokerage-page .market-stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #87ceeb;
    margin-bottom: 5px;
}

.brokerage-page .market-stat-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}

/* Responsive - Same breakpoints as market info */
@media (max-width: 1200px) {
    .brokerage-page .market-info-container {
        max-width: 98%; /* Even wider on medium screens */
    }
    
    .brokerage-page .market-row {
        gap: 15px; /* Reduced gap on smaller screens */
    }
}

/* Minimal scrollbar for brokerage page */
.brokerage-page::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background-color: transparent;
}

.brokerage-page::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.brokerage-page::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.brokerage-page::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 1000px) {
    .brokerage-page .market-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .brokerage-page .market-col-2 {
        grid-column: span 2;
    }
    
    .brokerage-page .market-col-3 {
        grid-column: span 2;
    }
    
    .brokerage-page .market-info-container {
        max-width: 98%;
    }
}

@media (max-width: 600px) {
    .brokerage-page .market-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .brokerage-page .market-col-1,
    .brokerage-page .market-col-2,
    .brokerage-page .market-col-3 {
        grid-column: span 1;
    }
    
    .brokerage-page {
        padding: 10px;
    }
    
    .brokerage-page .market-info-container {
        max-width: 100%;
    }
}