/* Clean Corporate Plus Theme */
/* Laravel Flux-inspired clean corporate design */

/* ================================
   RESET AND BASE STYLES
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, 'Segoe UI', system-ui, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ================================
   LAYOUT CONTAINERS
   ================================ */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* ================================
   CARD COMPONENTS
   ================================ */
.card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    transition: all 0.2s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border-color: #cbd5e1;
}

/* ================================
   HEADER COMPONENTS
   ================================ */
.header {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 32px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.header .subtitle {
    color: #64748b;
    font-size: 1.125rem;
    font-weight: 500;
}

/* ================================
   METRIC CARDS
   ================================ */
.metric-card {
    padding: 24px;
    position: relative;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 12px 12px 0 0;
}

.metric-card.positive::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.metric-card.negative::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.metric-card.neutral::before {
    background: linear-gradient(90deg, #64748b, #475569);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}

.metric-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.metric-change {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 8px;
}

.metric-change.positive {
    color: #059669;
}

.metric-change.negative {
    color: #dc2626;
}

.metric-change.neutral {
    color: #64748b;
}

/* ================================
   POSITION CARDS
   ================================ */
.position-card {
    padding: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.position-card:last-child {
    border-bottom: none;
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.position-symbol {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
}

.position-pnl {
    font-weight: 600;
    font-size: 0.875rem;
}

.position-pnl.positive {
    color: #059669;
}

.position-pnl.negative {
    color: #dc2626;
}

.position-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-bottom: 8px;
}

.position-detail {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.position-detail-label {
    color: #64748b;
    font-weight: 500;
}

.position-detail-value {
    color: #1e293b;
    font-weight: 600;
}

/* ================================
   GRID LAYOUTS
   ================================ */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ================================
   SECTION COMPONENTS
   ================================ */
.section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
    letter-spacing: -0.025em;
}

.section-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 24px;
    font-weight: 500;
}

/* ================================
   CHART CONTAINERS
   ================================ */
.chart-section {
    margin: 24px 0;
    padding: 24px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 16px;
    text-align: center;
}

.chart-container-fixed {
    width: 100%;
    height: 400px;
    position: relative;
    margin: 0 auto;
}

.chart-container-fixed canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ================================
   STATUS INDICATORS
   ================================ */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.success {
    background: #dcfce7;
    color: #166534;
}

.status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.info {
    background: #dbeafe;
    color: #1e40af;
}

/* ================================
   PROGRESS INDICATORS
   ================================ */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-bar-fill.positive {
    background: linear-gradient(90deg, #10b981, #059669);
}

.progress-bar-fill.negative {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* ================================
   INTERACTIVE STATES
   ================================ */
.interactive {
    transition: all 0.2s ease;
    cursor: pointer;
}

.interactive:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.interactive:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ================================
   RESPONSIVE BREAKPOINTS
   ================================ */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 16px;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 1.875rem;
    }
    
    .position-details {
        grid-template-columns: 1fr;
    }
    
    .chart-container-fixed {
        height: 300px;
    }
}

/* ================================
   UTILITY CLASSES
   ================================ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }