/* CSS Variables */
:root {
    --primary-color: #7c9fff;
    --accent-color: #7c9fff;
    --income-color: #10b981;
    --expense-color: #ef4444;
    --bg-primary: #eef3ff;
    --bg-secondary: rgba(255,255,255,0.38); /* lighter glass */
    --bg-card: rgba(255,255,255,0.38);
    --text-primary: #0f172a;
    --text-secondary: #52607a;
    --border-color: rgba(255,255,255,0.45);
    --glass-border: rgba(255,255,255,0.45);
    --shadow: 0 18px 50px rgba(31, 38, 135, 0.18);
    --shadow-hover: 0 28px 70px rgba(31, 38, 135, 0.25);
    --glass-blur: saturate(180%) blur(22px);
}

[data-theme="dark"] {
    --primary-color: #8ab4ff;
    --accent-color: #8ab4ff;
    --bg-primary: #0b1020;
    --bg-secondary: rgba(17,25,40,0.48); /* moderate glass */
    --bg-card: rgba(17,25,40,0.48);
    --text-primary: #e6ebff;
    --text-secondary: #a5b4cf;
    --border-color: rgba(255,255,255,0.20);
    --glass-border: rgba(255,255,255,0.18);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    --shadow-hover: 0 28px 70px rgba(0, 0, 0, 0.7);
    --glass-blur: saturate(180%) blur(20px);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.6s ease, color 0.3s ease;
    position: relative;
    overflow-x: hidden;
}

/* Live background layers */
body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
}

/* Light: sky + subtle sun glow */
body::before {
    background: 
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400" preserveAspectRatio="none"><defs><linearGradient id="sky" x1="0" x2="0" y1="0" y2="1"><stop offset="0%" stop-color="%23bfe9ff"/><stop offset="100%" stop-color="%23ffffff"/></linearGradient></defs><rect width="1200" height="400" fill="url(%23sky)"/><g opacity="0.9"><path d="M0 330 C 200 280, 400 360, 600 320 C 800 280, 1000 340, 1200 300 L 1200 400 L 0 400 Z" fill="%2399d98c"/><path d="M0 360 C 250 330, 450 370, 700 350 C 900 340, 1100 360, 1200 340 L 1200 400 L 0 400 Z" fill="%2377c28c"/></g></svg>') repeat-x bottom / 1200px 40vh,
        radial-gradient(1200px 600px at 10% 10%, rgba(255,255,255,0.8), transparent 60%),
        linear-gradient(180deg, #bfe9ff 0%, #ffffff 60%);
    animation: farmland 90s linear infinite;
}

/* Light: floating clouds */
body::after {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="600" height="200" viewBox="0 0 600 200"><g fill="%23ffffff" opacity="0.35"><ellipse cx="100" cy="90" rx="90" ry="34"/><ellipse cx="300" cy="60" rx="120" ry="40"/><ellipse cx="520" cy="110" rx="110" ry="36"/></g></svg>') repeat-x 0 10%;
    animation: clouds 60s linear infinite;
    opacity: 0.5;
}

@keyframes clouds { from { background-position-x: 0; } to { background-position-x: 600px; } }
@keyframes farmland { from { background-position-x: 0, 0, 0; } to { background-position-x: -1200px, 0, 0; } }

/* Dark: starry night */
html[data-theme="dark"] body::before,
body[data-theme="dark"]::before {
    background: radial-gradient(1000px 500px at 80% -10%, rgba(138,180,255,0.15), transparent 60%),
                linear-gradient(180deg, #0b1020 0%, #0b1228 60%);
}

html[data-theme="dark"] body::after,
body[data-theme="dark"]::after {
    background: 
        radial-gradient(1px 1px at 20% 30%, #ffffff 90%, transparent 100%),
        radial-gradient(1px 1px at 60% 20%, #ffffff 90%, transparent 100%),
        radial-gradient(1px 1px at 80% 70%, #ffffff 90%, transparent 100%),
        radial-gradient(1px 1px at 10% 80%, #ffffff 90%, transparent 100%),
        radial-gradient(1px 1px at 35% 55%, #ffffff 85%, transparent 100%),
        radial-gradient(1px 1px at 72% 42%, #ffffff 85%, transparent 100%),
        radial-gradient(1px 1px at 15% 25%, #ffffff 85%, transparent 100%),
        radial-gradient(1px 1px at 25% 75%, #ffffff 85%, transparent 100%),
        radial-gradient(1px 1px at 40% 65%, #ffffff 85%, transparent 100%),
        radial-gradient(1px 1px at 52% 48%, #ffffff 85%, transparent 100%),
        radial-gradient(1px 1px at 67% 33%, #ffffff 85%, transparent 100%),
        radial-gradient(1px 1px at 74% 76%, #ffffff 85%, transparent 100%),
        radial-gradient(1px 1px at 85% 58%, #ffffff 85%, transparent 100%),
        radial-gradient(1px 1px at 28% 18%, #ffffff 85%, transparent 100%),
        radial-gradient(1px 1px at 92% 22%, #ffffff 85%, transparent 100%);
    opacity: 0.64;
    animation: stars 9s linear infinite;
}

@keyframes stars { from { transform: translateY(0); } to { transform: translateY(20px); } }

/* Dark: shooting stars layer */
html::after {
    content: '';
    position: fixed;
    top: -10vh; left: -10vw;
    width: 2px; height: 2px;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
}

html[data-theme="dark"]::after {
    opacity: 0.72;
    background: transparent;
    box-shadow: 
        20vw 15vh #ffffff,
        50vw 18vh #ffffff,
        80vw 12vh #ffffff,
        35vw 8vh #ffffff,
        65vw 22vh #ffffff,
        12vw 28vh #ffffff,
        28vw 38vh #ffffff,
        44vw 10vh #ffffff,
        58vw 30vh #ffffff,
        88vw 20vh #ffffff; /* +5 tracks */
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.5));
    transform: rotate(-20deg);
    animation: shooting 16s linear infinite;
}

@keyframes shooting {
    0% { transform: translate(0,0) rotate(-20deg); opacity: 0.9; }
    80% { opacity: 0.9; }
    100% { transform: translate(120vw, 60vh) rotate(-20deg); opacity: 0; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid var(--border-color);
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

#currency-select {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.view-toggle {
    display: flex;
    gap: 10px;
    background-color: var(--bg-secondary);
    padding: 5px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.view-btn {
    padding: 10px 20px;
    border: 1px solid transparent;
    background-color: rgba(255,255,255,0.06);
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: saturate(140%) blur(8px);
}

.view-btn.active {
    background: linear-gradient(135deg, var(--accent-color), #9ec2ff);
    color: white;
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 8px 20px rgba(124, 159, 255, 0.35);
}

.view-btn:hover {
    background-color: rgba(255,255,255,0.14);
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 10px 25px rgba(0,0,0,0.15);
}

.theme-toggle:hover {
    background-color: var(--accent-color);
    color: white;
    transform: rotate(180deg);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background-color: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 18px 45px rgba(0,0,0,0.15);
    background-image: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.08));
    background-clip: padding-box;
    position: relative;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.summary-card h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card .amount {
    font-size: 2rem;
    font-weight: 700;
}

.summary-card.income .amount {
    color: var(--income-color);
}

.summary-card.expenses .amount {
    color: var(--expense-color);
}

.summary-card.balance .amount {
    color: var(--accent-color);
}

.summary-card.date-balance .subtext {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Content Area */
.content {
    margin-top: 30px;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* Timeline View - REDESIGNED for dynamic width */
.timeline-container {
    width: 100%;
    position: relative;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--bg-secondary);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow);
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}

.timeline-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.timeline-nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-nav:hover {
    background-color: var(--accent-color);
    color: white;
}

#current-period {
    font-size: 1.5rem;
    font-weight: 500;
    min-width: 200px;
    text-align: center;
}

/* New Timeline Layout */
.timeline-main-container {
    position: relative;
    width: 100%;
    height: 300px;
    margin: 40px 0;
}

.timeline-axis-horizontal {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
    pointer-events: none;
}

.timeline-bars-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.timeline-date-label {
    position: absolute;
    bottom: -30px;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: var(--text-secondary);
    z-index: 2;
    font-weight: 500;
}

.timeline-date-label.clickable-date {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.timeline-date-label.clickable-date:hover {
    background-color: var(--bg-secondary);
    color: var(--accent-color);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-date-label.today-date-label {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1rem;
}

/* Alternating weekly bands */
.week-band {
    position: absolute;
    top: 0;
    bottom: 0;
    /* Light purple */
    background: rgba(167, 139, 250, 0.12); /* #a78bfa */
    z-index: 0;
}

.week-band.alt {
    /* Slightly darker purple */
    background: rgba(139, 92, 246, 0.20); /* #8b5cf6 */
}

/* Today Marker with Pointy Tip */
.today-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: none;
}

.today-marker-tip {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid var(--accent-color);
    z-index: 2;
}

.today-marker-highlight {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, 
        var(--accent-color) 0%, 
        transparent 100%);
    opacity: 0.3;
}

.timeline-bar {
    position: absolute;
    width: 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    z-index: 2;
}

.timeline-bar:hover {
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.timeline-bar.income {
    background-color: var(--income-color);
}

.timeline-bar.expense {
    background-color: var(--expense-color);
}

/* Prevent bars from invading header/cards by capping height */
.timeline-main-container {
    --max-bar-height-percent: 38; /* keep within the plot area */
}

.bar-tooltip {
    position: absolute;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    box-shadow: var(--shadow);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    z-index: 10;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-bar.income .bar-tooltip {
    bottom: calc(100% + 10px);
}

.timeline-bar.expense .bar-tooltip {
    top: calc(100% + 10px);
}

.timeline-bar:hover .bar-tooltip {
    opacity: 1;
}

/* Week Summary */
.week-summary {
    margin-top: 40px;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}

.week-summary h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.week-balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 1rem;
}

.week-balance-item .positive {
    color: var(--income-color);
    font-weight: 600;
}

.week-balance-item .negative {
    color: var(--expense-color);
    font-weight: 600;
}

/* List View */
.list-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.add-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-color), #9ec2ff);
    color: white;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(124,159,255,0.35);
    backdrop-filter: saturate(160%) blur(8px);
}

.add-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.filter-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-controls select,
.filter-controls input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Table */
.transactions-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}

.transactions-table th {
    background-color: var(--bg-secondary);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transactions-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.transactions-table tbody tr:hover {
    background-color: var(--bg-secondary);
}

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

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

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 5px;
}

.edit-btn {
    background-color: var(--accent-color);
    color: white;
}

.delete-btn {
    background-color: var(--expense-color);
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 24px 60px rgba(0,0,0,0.25);
    background-image: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.08));
    background-clip: padding-box;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-row.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .form-row.two-col {
        grid-template-columns: 1fr;
    }
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

/* Mobile-friendly inline labels with checkboxes */
.modal .form-group > label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;        /* allow wrapping on small screens */
    word-break: break-word; /* avoid overflow */
}

.modal .form-group > label input[type="checkbox"] {
    flex: 0 0 auto;
}

@media (max-width: 480px) {
    .modal-content {
        width: 94%;
        padding: 22px;
    }
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

/* Recurrence controls */
.recurrence-section {
    padding: 12px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: opacity .2s ease, max-height .25s ease;
}

.btn-cancel,
.btn-save {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-save {
    background-color: var(--accent-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .controls {
        flex-direction: column;
        width: 100%;
    }
    
    .view-toggle {
        width: 100%;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .list-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .transactions-table {
        font-size: 0.85rem;
    }
}

/* Additional Styling for Better Visual Match */

/* Timeline Improvements */
.timeline-chart {
    background: linear-gradient(to bottom, 
        transparent 0%, 
        transparent 49.5%, 
        var(--border-color) 49.5%, 
        var(--border-color) 50.5%, 
        transparent 50.5%, 
        transparent 100%
    );
}

/* Add grid lines for better visual clarity */
.timeline-main-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(90deg, 
            transparent, 
            transparent calc(100% / 31 - 1px), 
            var(--border-color) calc(100% / 31 - 1px), 
            var(--border-color) calc(100% / 31)
        );
    opacity: 0.1;
    pointer-events: none;
}

/* Labels for income/expense */
.timeline-main-container::after {
    content: 'Income';
    position: absolute;
    left: -60px;
    top: 20%;
    color: var(--income-color);
    font-size: 0.85rem;
    font-weight: 500;
}

.timeline-main-container::before {
    content: 'Expense';
    position: absolute;
    left: -60px;
    bottom: 20%;
    color: var(--expense-color);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Better bar styling */
.timeline-bar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 20px;
}

.timeline-bar.income {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.timeline-bar.expense {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .timeline-main-container {
        margin-left: 40px;
    }
    
    .timeline-date-label {
        font-size: 0.65rem;
    }
    
    .timeline-bar {
        width: 10px;
    }
}

/* Dark Mode Fixes */
[data-theme="dark"] .bar-tooltip {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Modal Improvements */
.modal input:focus,
.modal select:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Scrollable Timeline */
.timeline-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 50px;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    scroll-behavior: smooth;
}

.timeline-wrapper:active {
    cursor: grabbing;
}

.timeline-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

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

/* Transaction amount display */
.amount {
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

/* Better hover states */
.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.edit-btn:hover {
    background-color: #2563eb;
}

.delete-btn:hover {
    background-color: #dc2626;
}