@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --primary: #3B82F6;
    --primary-hover: #2563EB;
    --success: #10B981;
    --danger: #EF4444;
    --border: #E2E8F0;
    --radius: 20px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.03), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    padding: 2rem;
    min-height: 100vh;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 900px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    margin-top: 1rem;
}

.logo {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--primary);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Layout Elements */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.mt-2 {
    margin-top: 2rem;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .layout-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Stat Box Layout */
.stat-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: #E2E8F0;
}

.stat-box.highlight {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    color: white;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4);
}

.stat-box.highlight .stat-label {
    color: #DBEAFE;
}

.stat-box.highlight .currency {
    color: #DBEAFE;
}

.stat-box.highlight .stat-desc {
    color: #DBEAFE;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    line-height: 1;
}

.stat-desc {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.currency {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.stat-value.success {
    color: var(--success);
}

.stat-value.danger {
    color: var(--danger);
}

/* Typography Forms */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
    background: #F8FAFC;
    color: var(--text-main);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="password"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #FFFFFF;
}

input::placeholder {
    color: #94A3B8;
}

/* Buttons */
button {
    border: none;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: #E2E8F0;
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: #CBD5E1;
}

/* Lists and Items */
.expense-list {
    list-style: none;
    margin-top: 1rem;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.expense-list::-webkit-scrollbar {
    width: 6px;
}

.expense-list::-webkit-scrollbar-track {
    background: #F1F5F9;
    border-radius: 10px;
}

.expense-list::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

.expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border);
    margin-bottom: 0.75rem;
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.2s;
}

.expense-item:hover {
    border-color: #CBD5E1;
    transform: translateX(3px);
    box-shadow: var(--shadow-sm);
}

.expense-info {
    display: flex;
    flex-direction: column;
}

.expense-title {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1.05rem;
}

.expense-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.expense-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.expense-amount {
    font-weight: 700;
    color: var(--danger);
    background: #FEE2E2;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

.delete-btn {
    color: #94A3B8;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    border-radius: 8px;
}

.delete-btn:hover {
    color: var(--danger);
    background: #FEE2E2;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 1rem;
    background: #F8FAFC;
    border-radius: 12px;
    border: 1px dashed #CBD5E1;
    font-size: 1.05rem;
}

/* Utility Helpers */
.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
}