* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f9fafb;
    color: #111827;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar {
    width: 100%;
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem;
}

.sidebar-header {
    margin-bottom: 2rem;
}

.sidebar-header h1 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #111827;
}

.budget-section {
    margin-bottom: 1rem;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.budget-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.budget-item {
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
    background-color: white;
}

.budget-item:hover {
    background-color: #f9fafb;
}

.budget-item.active {
    background-color: #f3f4f6;
    border-color: #111827;
}

.budget-item-title {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.budget-item-info {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.main-content {
    flex: 1;
    padding: 1.5rem;
}

.welcome-screen {
    text-align: center;
    padding: 5rem 1rem;
}

.welcome-screen h2 {
    font-size: 1.875rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1rem;
}

.welcome-screen p {
    color: #6b7280;
}

.budget-view {
    max-width: 56rem;
    margin: 0 auto;
}

.card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #374151;
}

.card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.budget-title-input {
    width: 100%;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    outline: none;
    background-color: transparent;
    color: #111827;
    padding: 0.5rem;
}

.budget-title-input:focus {
    outline: 2px solid #111827;
    border-radius: 0.25rem;
}

.salary-input-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.currency {
    color: #6b7280;
    margin-right: 0.5rem;
}

.salary-input {
    flex: 1;
    font-size: 1.875rem;
    font-weight: bold;
    border: none;
    outline: none;
    background-color: transparent;
    color: #111827;
    padding: 0.5rem;
}

.salary-input:focus {
    outline: 2px solid #111827;
    border-radius: 0.25rem;
}

.balance-display {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-label {
    font-weight: 600;
    color: #374151;
}

.balance-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: #111827;
}

.expenses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.expenses-buttons {
    display: flex;
    gap: 0.5rem;
}

.quick-add-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.expenses-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.expense-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.expense-item-locked {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: #111827;
    border-radius: 0.5rem;
}

.expense-name-locked {
    font-weight: 500;
    color: white;
    font-size: 1.125rem;
}

.expense-amount-locked {
    font-weight: bold;
    color: white;
    font-size: 1.125rem;
}

.expense-input {
    flex: 1;
    background-color: transparent;
    border: none;
    outline: none;
    color: #111827;
    text-transform: uppercase;
    padding: 0.5rem;
}

.expense-input:focus {
    outline: 2px solid #111827;
    border-radius: 0.25rem;
}

.expense-amount-wrapper {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.expense-amount-input {
    width: 7rem;
    background-color: transparent;
    border: none;
    outline: none;
    color: #111827;
    padding: 0.5rem;
}

.expense-amount-input:focus {
    outline: 2px solid #111827;
    border-radius: 0.25rem;
}

.btn-delete {
    color: #6b7280;
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0.25rem;
}

.btn-delete:hover {
    color: #111827;
}

.total-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 1rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.total-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: #111827;
}

.btn-primary {
    background-color: #111827;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.875rem;
}

.btn-primary:hover {
    background-color: #1f2937;
}

.btn-secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-secondary:hover {
    background-color: #f9fafb;
}

.btn-quick {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-quick:hover {
    background-color: #f9fafb;
}

.btn-full {
    width: 100%;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
}

.hidden {
    display: none !important;
}

.empty-state {
    color: #6b7280;
    font-size: 0.875rem;
}

.menu-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background-color: #111827;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.875rem;
    cursor: pointer;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
}

.menu-toggle:active {
    background-color: #374151;
}

.menu-icon {
    width: 1.75rem;
    height: 1.75rem;
    display: block;
}

.close-sidebar {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: #111827;
    cursor: pointer;
    padding: 0;
    line-height: 0.8;
    font-weight: 300;
}

.close-sidebar:hover {
    color: #374151;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.modal-content {
    background-color: white;
    border: 2px solid #111827;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1rem;
    text-align: center;
}

.modal-message {
    color: #374151;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-align: center;
    font-size: 0.9375rem;
}

.modal-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-buttons button {
    min-width: 6rem;
    padding: 0.625rem 1.25rem;
}

@media (min-width: 768px) {
    .container {
        flex-direction: row;
    }

    .sidebar {
        width: 20rem;
        border-bottom: none;
        border-right: 1px solid #e5e7eb;
        padding: 1.5rem;
    }

    .main-content {
        padding: 2.5rem;
    }

    .welcome-screen {
        padding: 8rem 2rem;
    }

    .welcome-screen h2 {
        font-size: 3rem;
    }

    .budget-title-input {
        font-size: 2rem;
    }

    .expense-item {
        flex-wrap: nowrap;
    }

    .menu-toggle {
        display: none;
    }
}

@media (max-width: 767px) {
    .menu-toggle {
        display: flex;
    }

    .main-content {
        padding-top: 5rem;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 22rem;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .close-sidebar {
        display: block;
    }

    .expenses-header {
        flex-direction: column;
        align-items: stretch;
    }

    .expenses-buttons {
        width: 100%;
    }

    .expenses-buttons button {
        flex: 1;
    }

    .expense-item {
        flex-wrap: wrap;
    }

    .expense-input {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .expense-amount-wrapper {
        flex: 1;
    }

    .modal-content {
        padding: 1.25rem;
        width: 95%;
        max-width: 340px;
    }

    .modal-title {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }

    .modal-message {
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
    }

    .modal-buttons {
        flex-direction: row;
    }

    .modal-buttons button {
        flex: 1;
        padding: 0.625rem 1rem;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .quick-add-buttons {
        flex-direction: column;
    }

    .btn-quick {
        width: 100%;
    }

    .total-row,
    .balance-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}