/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f6fa;
    margin: 0;
    padding: 0;
}

/* Navbar Styling */
.navbar-brand {
    font-weight: bold;
}

/* Card Styling */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    font-weight: 500;
}

/* Button Styling */
.btn {
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}


/* Color coding for income and expense */
.income {
    color: #198754; /* Bootstrap success color */
    font-weight: bold;
}

.expense {
    color: #dc3545; /* Bootstrap danger color */
    font-weight: bold;
}

/* Form Styling */
#transaction-form .form-label {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Table Styling */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.table th, .table td {
    vertical-align: middle;
}

/* Capitalize text for type column */
.type-cell {
    text-transform: capitalize;
}

/* Custom Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    transition: opacity 0.3s ease;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    text-align: center;
}

.modal-buttons {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

#love{
    text-align: center;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: #6c757d; 
}

/* --- Responsive Design for Mobile --- */

@media (max-width: 767.98px) {
    h2 {
        font-size: 1.75rem;
    }
    .card-title {
        font-size: 1.25rem;
    }

    /* Table to Card List Transformation */
    .table thead { display: none; }
    .table tr {
        display: block;
        margin-bottom: 1.25rem;
        border: 1px solid #dee2e6;
        border-radius: 0.5rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        padding: 0.5rem;
    }
    .table td {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        text-align: right;
        font-size: 0.95rem;
        border: none;
        border-bottom: 1px solid #e9ecef;
        padding-left: 40%;
        position: relative;
        min-height: 2.5rem;
        white-space: normal;
        word-break: break-word;
    }
    .table td:last-child { border-bottom: 0; }
    .table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.75rem;
        width: 35%;
        padding-right: 0.75rem;
        font-weight: bold;
        text-align: left;
    }
    .table td[data-label="Action"] { padding: 0.5rem 0; justify-content: center; }
    .table td[data-label="Action"]::before { display: none; }
    .table td[data-label="Action"] .btn { width: 50%; }
}