/* ETHBot Performance Dashboard Styles */

.ethbot-container {
    display: flex;
    height: calc(100vh - 80px);
    background: #0f172a;
    color: #e2e8f0;
}

/* Sidebar */
.ethbot-sidebar {
    width: 240px;
    background: #1e293b;
    border-right: 1px solid #334155;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.ethbot-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 20px;
    border-bottom: 1px solid #334155;
    margin-bottom: 20px;
}

.ethbot-icon {
    font-size: 24px;
}

.ethbot-title {
    font-size: 18px;
    font-weight: 600;
    color: #f8fafc;
}

.ethbot-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
    flex: 1;
}

.ethbot-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    text-align: left;
}

.ethbot-nav-item:hover {
    background: #334155;
    color: #e2e8f0;
}

.ethbot-nav-item.active {
    background: #3b82f6;
    color: #fff;
}

.ethbot-nav-item span {
    font-size: 16px;
}

.ethbot-status {
    padding: 16px 20px;
    border-top: 1px solid #334155;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #94a3b8;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
}

.status-indicator.active {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

/* Main Content */
.ethbot-main {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

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

.ethbot-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #f8fafc;
}

.ethbot-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.last-updated {
    font-size: 12px;
    color: #64748b;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s, border-color 0.2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: #475569;
}

.kpi-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 4px;
}

.kpi-change {
    font-size: 13px;
    font-weight: 500;
}

.kpi-change.positive {
    color: #10b981;
}

.kpi-change.negative {
    color: #ef4444;
}

.kpi-sub {
    font-size: 13px;
    color: #64748b;
}

.regime-trend {
    color: #3b82f6;
}

.regime-range {
    color: #f59e0b;
}

.regime-hold {
    color: #6b7280;
}

.hedge-open {
    color: #ef4444;
}

.hedge-none {
    color: #10b981;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.chart-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
}

.chart-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 16px;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-container {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container.large {
    height: 250px;
}

.chart-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.chart-filters input {
    padding: 8px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 13px;
}

.simple-chart {
    width: 100%;
    height: 100%;
}

.no-data {
    color: #64748b;
    font-size: 14px;
    text-align: center;
}

/* Activity Section */
.activity-section {
    margin-top: 24px;
}

.activity-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 16px;
}

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

.activity-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 16px;
}

.activity-card h4 {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-table-wrapper {
    overflow-x: auto;
}

.activity-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

.activity-table th,
.activity-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #334155;
}

.activity-table th {
    color: #64748b;
    font-weight: 500;
}

.activity-table td {
    color: #e2e8f0;
}

.activity-table tr.current-week {
    background: rgba(59, 130, 246, 0.1);
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
}

.data-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #334155;
}

.data-table th {
    background: #0f172a;
    color: #94a3b8;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: #334155;
}

.data-table td {
    color: #e2e8f0;
}

.data-table .truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.regime-trend {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.badge.regime-range {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.badge.regime-hold {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.badge.side-buy {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.badge.side-hold {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.badge.action-hedge_on,
.badge.action-hedge-on {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge.action-hedge_off,
.badge.action-hedge-off {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.badge.action-hold {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.badge.status-planned {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.badge.status-completed {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

/* Positive/Negative colors */
.positive {
    color: #10b981;
}

.negative {
    color: #ef4444;
}

/* View Header with Filters */
.view-header {
    margin-bottom: 20px;
}

.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filters input,
.filters select {
    padding: 10px 14px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 13px;
}

.filters input:focus,
.filters select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Open Position Card */
.open-position-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #10b981;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.open-position-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #10b981;
    margin-bottom: 16px;
}

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

.position-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.position-item label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
}

.position-item value {
    font-size: 18px;
    font-weight: 600;
    color: #f8fafc;
}

.position-item value.truncate {
    font-size: 13px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-position-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.no-position-card h3 {
    font-size: 16px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.no-position-card p {
    font-size: 13px;
    color: #64748b;
}

/* Hedge Tables */
.hedge-charts,
.hedge-tables {
    margin-bottom: 24px;
}

.hedge-tables {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.table-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
}

.table-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 16px;
}

/* DCA View */
.dca-header {
    margin-bottom: 24px;
}

.this-week-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 24px;
}

.this-week-card.active {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, #1e293b 100%);
}

.this-week-card.inactive {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, #1e293b 100%);
}

.this-week-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.this-week-card.active h3 {
    color: #10b981;
}

.this-week-card.inactive h3 {
    color: #f59e0b;
}

.this-week-card p {
    color: #64748b;
    font-size: 14px;
}

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

.dca-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dca-item label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
}

.dca-item value {
    font-size: 18px;
    font-weight: 600;
    color: #f8fafc;
}

.dca-chart-section,
.dca-table-section {
    margin-bottom: 24px;
}

.dca-table-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 16px;
}

/* Portfolio View */
.portfolio-chart-section,
.portfolio-table-section {
    margin-bottom: 24px;
}

.portfolio-table-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 16px;
}

/* Loading & Error States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #94a3b8;
    font-size: 14px;
}

.error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #ef4444;
    font-size: 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    border-radius: 12px;
}

/* Responsive */
@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .activity-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ethbot-sidebar {
        width: 200px;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .position-grid,
    .dca-details {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hedge-tables {
        grid-template-columns: 1fr;
    }
}

/* Button overrides for ETHBot theme */
.ethbot-main .btn-secondary {
    background: #334155;
    border: 1px solid #475569;
    color: #e2e8f0;
}

.ethbot-main .btn-secondary:hover {
    background: #475569;
}

.ethbot-main .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}
