:root {
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --asset-color: #10B981;
    --liability-color: #EF4444;
    --bg-color: #F8FAFC;
    --surface: #FFFFFF;
    --border: #E2E8F0;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
}

.private-mode .private-text {
    filter: blur(8px);
    transition: filter 0.2s ease;
}

.private-mode .private-value {
    color: transparent;
    text-shadow: 0 0 8px var(--text-main);
    transition: all 0.2s ease;
}

/* Header */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
}

.header-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Controls */
.control {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-main);
    font-size: 0.875rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s ease;
}

.control:hover {
    background: var(--bg-color);
}

.btn-icon {
    font-size: 1.125rem;
    padding: 0.4rem 0.6rem;
}

.btn {
    padding: 0.5rem 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-large {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

/* Layout */
.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

@media (min-width: 1024px) {
    .main-grid {
        grid-template-columns: 350px 1fr;
    }
    .dashboard {
        position: sticky;
        top: 6rem;
        height: max-content;
    }
}

.dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.data-entry {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Text Colors */
.positive { color: var(--asset-color); font-weight: 600; }
.negative { color: var(--liability-color); font-weight: 600; }
.text-muted { color: var(--text-muted); font-size: 0.875rem; }

/* Dashboard Display */
.net-worth-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.nw-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.nw-change {
    margin-bottom: 1.5rem;
}

/* Goal Progress */
.goal-section {
    width: 100%;
    text-align: left;
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 8px;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.goal-input {
    width: 100px;
    text-align: right;
    border: none;
    border-bottom: 1px dashed var(--text-muted);
    background: transparent;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-main);
}
.goal-input:focus { outline: none; border-bottom-color: var(--primary); }

.progress-bar-container {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.goal-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
}

/* Charts */
.charts-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.chart-container {
    width: 100%;
}

.chart-container h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

canvas {
    width: 100% !important;
    height: 200px !important;
}

/* Data Entry Form */
.entry-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.entry-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.entry-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.entry-value-wrap {
    position: relative;
    width: 150px;
}

.currency-prefix {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.entry-input {
    width: 100%;
    padding: 0.5rem 0.5rem 0.5rem 1.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.875rem;
    text-align: right;
    transition: border-color 0.2s;
}

.entry-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
