:root {
    /* Refined Palette */
    --primary: #6366f1; /* Indigo */
    --primary-hover: #4f46e5;
    --secondary: #ec4899; /* Pink */
    --secondary-hover: #db2777;
    --accent: #f59e0b; /* Amber */
    --success: #10b981; /* Emerald */
    --danger: #ef4444; /* Red */
    --warning: #f59e0b;
    
    /* Neutral Colors */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', 'Open Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Background Gradients */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent),
                radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.05), transparent);
    z-index: -1;
}

.container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Pacifico', cursive;
    color: var(--text-main);
    margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; text-align: center; color: var(--primary); }
h2 { font-size: 1.5rem; margin-bottom: 1.25rem; }

p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

/* Form Elements */
.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.input-group input, 
.input-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #fff;
    transition: all 0.2s ease;
    outline: none;
}

.input-group input:focus, 
.input-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Buttons */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

button {
    background-color: var(--primary);
    color: white;
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

button:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--secondary);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.alert-danger {
    background-color: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #ecfdf5;
    color: var(--success);
    border: 1px solid #a7f3d0;
}

/* Dashboard Grid */
.app-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 2rem;
}

@media (min-width: 480px) {
    .app-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.app-icon {
    font-size: 2.5rem;
}

.app-card strong {
    font-size: 1.1rem;
}

/* Navigation Links */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.nav-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* Budget Specifics */
.hero-metric {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.hero-metric h2 {
    color: white;
    font-size: 3rem;
    margin: 0.5rem 0;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
}

.unassigned-bubble {
    background: var(--accent);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.875rem;
    display: inline-block;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.transaction-list {
    list-style: none;
}

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

.transaction-item:last-child {
    border-bottom: none;
}

.amount-income { color: var(--success); font-weight: 700; }
.amount-expense { color: var(--danger); font-weight: 700; }

/* Progress Bars */
.progress-container {
    width: 100%;
    background-color: #f1f5f9;
    border-radius: 999px;
    height: 0.625rem;
    margin-top: 0.75rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Envelope Management */
.envelope-item {
    background: #fff;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.envelope-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    width: auto;
}

/* Animations */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.container {

    animation: slideUp 0.4s ease-out;

}



/* Site Header */

.site-header {

    width: 100%;

    max-width: 600px;

    margin: 1.5rem auto 0;

    padding: 0 1.5rem;

    width: 100%;

}



.header-content {

    display: flex;

    justify-content: space-between;

    align-items: center;

    background: var(--bg-card);

    padding: 0.75rem 1.5rem;

    border-radius: 1rem;

    border: 1px solid var(--border);

    box-shadow: var(--shadow);

}



.header-content .logo {

    font-family: 'Pacifico', cursive;

    font-size: 1.5rem;

    color: var(--primary);

    text-decoration: none;

}



.header-actions {

    display: flex;

    gap: 1.25rem;

}



.header-icon {

    font-size: 1.25rem;

    text-decoration: none;

    transition: transform 0.2s ease;

    display: flex;

    align-items: center;

    justify-content: center;

}



.header-icon:hover {

    transform: scale(1.15);

}
