/* ===================================
   BASE STYLES & VARIABLES
   =================================== */

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

:root {
    --primary-color: #2D5F5D;
    --secondary-color: #3A7B78;
    --accent-green: #5FB5A6;
    --light-green: #E8F5F3;
    --bg-gray: #F7F9FA;
    --white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-gray: #6B7280;
    --border-color: #E5E7EB;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ===================================
   HEADER
   =================================== */

.header {
    background: var(--white);
    padding: 1.25rem 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 40px;
    width: auto;
}

.balance-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 3rem;
}

.balance-label {
    font-size: 0.875rem;
    color: var(--text-gray);
    font-weight: 500;
}

.balance-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-gray);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
    width: 300px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-profile:hover {
    background: var(--bg-gray);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-green), var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ===================================
   MAIN LAYOUT
   =================================== */

.main-container {
    display: flex;
    min-height: calc(100vh - 80px);
}

.dashboard-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.dashboard-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

/* ===================================
   CHARTS SECTION
   =================================== */

.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.period-selector {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-dark);
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s;
}

.period-selector:hover {
    border-color: var(--accent-green);
}

.chart-container {
    position: relative;
    height: 300px;
}

/* ===================================
   TRANSACTIONS TABLE
   =================================== */

.transactions-section {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

.transactions-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.table-container {
    overflow-x: auto;
}

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

thead {
    background: var(--bg-gray);
}

th {
    padding: 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

tbody tr:hover {
    background: var(--light-green);
}

.transaction-type {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.type-income {
    background: #D1FAE5;
    color: #065F46;
}

.type-expense {
    background: #FEE2E2;
    color: #991B1B;
}

.amount-positive {
    color: var(--success);
    font-weight: 600;
}

.amount-negative {
    color: var(--danger);
    font-weight: 600;
}

/* ===================================
   EMPTY STATE
   =================================== */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-gray);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    opacity: 0.5;
}