/* SunDrift AI API Console — Light Theme Styles */

:root {
    /* SunDrift Brand Colors */
    --sundrift-blue: #4A90E2;
    --sundrift-blue-light: #6BA3E7;
    --sundrift-blue-dark: #3A7BC8;
    --sundrift-gold: #F5A623;
    --sundrift-gold-light: #F7B84E;
    
    /* Primary Colors */
    --primary-blue: #4A90E2;
    --primary-blue-hover: #3A7BC8;
    --primary-gold: #F5A623;
    --bg-main: #F9FAFB;
    --bg-white: #FFFFFF;
    --sidebar-text: #4B5563;
    --sidebar-active-bg: rgba(74, 144, 226, 0.1);
    --sidebar-active-text: #4A90E2;
    --border-color: #E5E7EB;
    --border-light: #F3F4F6;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    
    /* Chart Colors - SunDrift Theme */
    --chart-blue: #4A90E2;
    --chart-gold: #F5A623;
    --chart-blue-light: rgba(74, 144, 226, 0.6);
    --chart-gold-light: rgba(245, 166, 35, 0.6);
    
    /* Spacing */
    --sidebar-width: 240px;
    --topnav-height: 60px;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
}

/* Top Navigation */
.topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topnav-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-name {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    letter-spacing: 0.5px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-home {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.breadcrumb-home:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

.breadcrumb-dropdown {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.breadcrumb-dropdown:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Layout */
.layout {
    display: flex;
    margin-top: var(--topnav-height);
    min-height: calc(100vh - var(--topnav-height));
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-white);
    border-right: 1px solid var(--border-color);
    padding: 24px 0;
    position: fixed;
    height: calc(100vh - var(--topnav-height));
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 0 16px 8px;
    margin-bottom: 4px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin: 2px 0;
}

.sidebar-link {
    display: block;
    padding: 10px 16px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 14px;
    border-radius: 0 20px 20px 0;
    margin-right: 16px;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
    max-width: calc(100% - var(--sidebar-width));
}

/* Dashboard Cards */
.dashboard-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

/* Hero Card (Account Overview) */
.hero-card {
    padding: 32px;
}

.hero-header {
    margin-bottom: 24px;
}

.hero-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.balance-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.balance-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.balance-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.balance-value {
    font-size: 42px;
    font-weight: 700;
    font-family: var(--font-family);
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    line-height: 1;
}

.balance-currency {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-secondary);
}

.balance-secondary {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-blue-hover);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

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

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    font-family: var(--font-family);
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.stat-currency {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.info-icon {
    color: var(--text-muted);
    cursor: help;
    font-size: 14px;
}

.card-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.year-selector {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.toggle-group {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.toggle-btn {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.toggle-btn.active {
    background: var(--bg-white);
    color: var(--primary-blue);
    box-shadow: inset 0 0 0 1px var(--primary-blue);
}

.toggle-btn:not(.active):hover {
    background: var(--bg-main);
}

/* Chart Container */
.chart-container {
    height: 280px;
    position: relative;
}

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

/* Consumption List */
.consumption-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.consumption-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.consumption-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.consumption-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.consumption-bar {
    height: 8px;
    background: var(--bg-main);
    border-radius: 4px;
    overflow: hidden;
}

.consumption-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sundrift-blue), var(--sundrift-blue-light));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Table */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-main);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-primary);
}

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

.data-table .numeric {
    font-family: var(--font-family);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    text-align: right;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .breakdown-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-right {
        display: none;
    }
}
