/* Dashboard Styles */
.dashboard-container {
    padding: 1rem;
    background-color: #f8fafc;
    min-height: 100vh;
}

.dashboard-header h2 {
    color: #1e293b;
    font-weight: 600;
}

/* Metric Cards */
.metric-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.06);
    border: 1px solid #cbd5e1; /* stronger border */
    outline: 2px solid rgba(226,232,240,0.4); /* subtle outer ring */
    height: 100%;
    text-align: center;
    position: relative;
}

.metric-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.metric-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Remove metric description - only show on tooltip */
.metric-description {
    display: none;
}

/* Progress Circles */
.metric-progress {
    position: relative;
    margin-top: 0.75rem;
}

.progress-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(#10b981 0deg, #e2e8f0 0deg);
    margin: 0 auto 0.5rem;
    position: relative;
}

.progress-circle::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
}

.progress-stats {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Stat Bars */
.stat-bar {
    display: flex;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.stat-green {
    background: #10b981;
    transition: width 0.3s ease;
}

.stat-red {
    background: #ef4444;
    transition: width 0.3s ease;
}

.stat-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Cards */
.card {
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0,0,0,0.04);
    background: #ffffff;
    outline: 2px solid rgba(203,213,225,0.35);
}

.card-header {
    background: linear-gradient(135deg,#f1f5f9 0%,#f8fafc 60%);
    border-bottom: 1px solid #cbd5e1;
    border-radius: 14px 14px 0 0 !important;
    padding: 1rem 1.25rem;
}

.card-header h6 {
    color: #374151;
    font-weight: 600;
    margin: 0;
}

/* Balance Info */
.balance-info {
    text-align: center;
}

.current-balance {
    display: block;
}

.balance-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.balance-currency {
    font-size: 0.875rem;
    color: #64748b;
    margin-left: 0.25rem;
}

/* Table Styles */
.table th {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 0.5rem;
}

.table td {
    font-size: 0.875rem;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

/* Trading Calendar */
#tradingCalendar {
    min-height: 400px;
}

.calendar-grid {
    display: flex;
    flex-direction: column;
}

.calendar-week-header {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.week-stat-header {
    /* placeholder empty header cell */
}

.calendar-week {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.week-stat {
    display: flex;
}

.week-stat-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    background: transparent;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.day-header {
    background: #ffffff;
    padding: 0.5rem 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    background: transparent;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.calendar-day {
    background: #ffffff;
    min-height: 95px;
    padding: 0.5rem 0.6rem;
    position: relative;
    transition: background-color 0.2s ease;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.calendar-day.empty {
    background: #f1f5f9;
}

.calendar-day.today {
    background: #dbeafe;
    border: 2px solid #3b82f6;
}

.calendar-day.profit-day {
    background: #e7f8f1;
    border-color: #10b981;
    outline: 2px solid rgba(16, 185, 129, 0.15);
}

.calendar-day.loss-day {
    background: #fdecec;
    border-color: #ef4444;
    outline: 2px solid rgba(239, 68, 68, 0.20);
}

.day-number {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.25rem;
}

.day-profit {
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.day-profit.positive {
    color: #059669;
}

.day-profit.negative {
    color: #dc2626;
}

.day-trades {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.day-winrate {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

/* Trades page */
.trades-page .metric-card.small { padding: 1rem; text-align: left; }
.trades-table tbody tr.row-win { background: #f0fdf4; }
.trades-table tbody tr.row-loss { background: #fef2f2; }
.trades-table tbody tr:hover { filter: brightness(0.97); }
/* Clickable row styles - applies to both dashboard and trades pages */
.clickable-row {
    transition: all 0.2s ease;
}

.clickable-row:hover {
    background-color: #e0f2fe !important;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.clickable-row:active {
    transform: scale(0.99);
}

/* Badge styling for consistent status display */
.badge.bg-warning {
    background-color: #fbbf24 !important;
}

.badge.bg-warning.text-dark {
    color: #1f2937 !important;
    font-weight: 600;
}

.badge.bg-success {
    background-color: #10b981 !important;
    color: #ffffff !important;
    font-weight: 600;
}

.badge.bg-danger {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    font-weight: 600;
}

.badge.bg-secondary {
    background-color: #6b7280 !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* Progress circle animations */
@keyframes progressCircle {
    from { 
        background: conic-gradient(#10b981 0deg, #e2e8f0 0deg);
    }
}

.progress-circle.animate {
    animation: progressCircle 1s ease-out;
}

/* Gauge Styles */
.gauge-container { 
    display: flex; 
    justify-content: center; 
    align-items: center;
    width: 60px;
    height: 60px;
}

.gauge { 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    position: relative; 
    background: conic-gradient(from 270deg, #dc2626 0deg 180deg, transparent 180deg 360deg); 
    --gauge-track: #e5e7eb;
}

.gauge::before { 
    content: ''; 
    position: absolute; 
    top: 8px; 
    left: 8px; 
    width: 44px; 
    height: 44px; 
    background: #ffffff; 
    border-radius: 50%; 
    z-index: 1;
}

/* Mask to show only bottom half as horizontal semi-circle */
.gauge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 30px; /* Show bottom 30px only */
    background: #ffffff;
    z-index: 0;
}

.gauge-label { 
    position: absolute; 
    top: 70%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    font-size: 0.65rem; 
    font-weight: 600; 
    color: #374151;
    z-index: 3;
}

.gauge.animate { 
    transition: background 0.6s ease; 
}

/* Info Icon Circles */
.info-icon { 
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    background: #eef2f7 !important;
    color: #475569 !important;
    border-radius: 50% !important;
    border: 1px solid #cbd5e1 !important;
    cursor: help !important;
    margin-left: 4px !important;
    text-decoration: none !important;
    line-height: 1 !important;
}

.info-icon:hover { 
    background: #e0e7ef !important;
    color: #475569 !important;
}

/* Tooltip styling */
.tooltip {
    font-size: 0.75rem;
}

.tooltip-inner {
    background-color: #1f2937;
    color: white;
    border-radius: 6px;
    padding: 6px 10px;
    max-width: 200px;
    text-align: left;
    line-height: 1.4;
}

/* Performance Table Styles */
.performance-table {
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    background-color: #1e293b;
    color: #e2e8f0;
}

.performance-table thead th {
    background-color: #334155;
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.75rem 0.5rem;
    border-bottom: 2px solid #475569;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.performance-table tbody td {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid #374151;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.performance-table tbody tr:hover td {
    background-color: #334155;
}

.performance-table tbody tr:first-child td {
    border-top: 1px solid #475569;
}

.performance-table .performance-cell {
    font-weight: 600;
    position: relative;
}

.performance-table .text-success {
    color: #10b981 !important;
    background-color: rgba(16, 185, 129, 0.1);
}

.performance-table .text-danger {
    color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.1);
}

.performance-table .text-muted {
    color: #64748b !important;
}

.performance-table .table-dark td {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
    border-top: 2px solid #475569;
    font-weight: 700;
}

.performance-table .table-dark .text-success {
    color: #22c55e !important;
}

.performance-table .table-dark .text-danger {
    color: #f87171 !important;
}

.performance-table .table-dark .text-light {
    color: #9ca3af !important;
}

/* Card styling for performance table container */
.card:has(.performance-table) .card-header {
    background: linear-gradient(135deg, #334155 0%, #475569 60%);
    color: #f1f5f9;
    border-bottom: 2px solid #475569;
}

.card:has(.performance-table) .card-header h6 {
    color: #f1f5f9;
}

.card:has(.performance-table) .card-header .text-muted {
    color: #cbd5e1 !important;
}