/* Shared styles for all pages */

:root {
    --background: oklch(0.13 0.005 285);
    --foreground: oklch(0.95 0 0);
    --card: oklch(0.18 0.005 285);
    --card-foreground: oklch(0.95 0 0);
    --muted: oklch(0.22 0.005 285);
    --muted-foreground: oklch(0.65 0 0);
    --accent: oklch(0.65 0.18 250);
    --accent-foreground: oklch(0.95 0 0);
    --border: oklch(0.28 0.005 285);
    --success: oklch(0.7 0.18 160);
    --radius: 0.5rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
header {
    border-bottom: 1px solid var(--border);
    background: color-mix(in oklch, var(--card) 50%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
}

.header-meta {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Layout */
.app-container {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--card);
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
    flex-shrink: 0;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
}

.sidebar-nav-item {
    margin: 0;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav-link:hover {
    background: var(--muted);
    color: var(--foreground);
}

.sidebar-nav-link.active {
    background: var(--muted);
    color: var(--accent);
    border-left-color: var(--accent);
}

.sidebar-nav-link svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Main */
main {
    flex: 1;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

/* Section */
.section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th {
    background: var(--muted);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--foreground);
}

tr:hover {
    background: var(--muted);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: calc(var(--radius) - 4px);
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--muted);
    color: var(--foreground);
}

.badge-yes {
    background: oklch(0.7 0.18 250);
    color: var(--primary-foreground);
}

.badge-no {
    background: oklch(0.7 0.18 160);
    color: var(--primary-foreground);
}

.pnl-positive {
    color: var(--success);
}

.pnl-negative {
    color: oklch(0.65 0.2 25);
}

/* Button */
.btn {
    background: var(--accent);
    color: var(--accent-foreground);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

/* Stats */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
}

/* Error */
.error {
    color: oklch(0.65 0.2 25);
    padding: 0.5rem;
    background: oklch(0.13 0.2 25);
    border-radius: var(--radius);
    margin: 0.5rem 0;
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
}
