@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Improve touch targets on mobile */
@media (max-width: 767px) {

    button,
    .btn,
    .nav-btn,
    input[type="submit"],
    select,
    .form-input,
    .form-select {
        min-height: 44px;
        /* Apple's recommended minimum touch target size */
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%);
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2 0%, #667eea 100%);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header/Navbar */
.header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-btn {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0;
    font-weight: 500;
}

.nav-btn:hover {
    background: none;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: none;
}

.nav-btn img {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.nav-btn span,
.nav-btn .nav-text {
    display: none !important;
}

/* Main content */
.main-content {
    padding: 2rem 0;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 160px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    line-height: 1;
}

.stat-currency {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Daily change indicator styles */
.stat-currency.increase {
    color: #10b981;
}

.stat-currency.decrease {
    color: #ef4444;
}

.stat-currency.no-change {
    color: rgba(255, 255, 255, 0.6);
}

/* Content Layout */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
}

/* Form Section */
.form-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1rem;
    height: fit-content;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: .5rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: .5rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23667eea' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5em;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-select option {
    background: #1a1a2e;
    color: #ffffff;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Transactions Section */
.transactions-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1rem;
}

/* Older Transactions Section */
.older-transactions-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1rem;
    margin-top: 2rem;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.date-filter .form-label {
    margin-bottom: 0;
    white-space: nowrap;
}

.date-filter .form-select {
    max-width: 200px;
}

.load-more-container {
    margin-top: 2rem;
    text-align: center;
}

.load-more-container .btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    padding: 0.8rem 1.5rem;
}

.load-more-container .btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

#remainingCount {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .date-filter {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .date-filter .form-select {
        max-width: none;
        width: 100%;
    }
}

.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.transactions-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.download-btn {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-btn:hover {
    background: none;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: none;
}

.download-btn img {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

/* Transaction Groups */
.transaction-group {
    margin-bottom: 2rem;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.group-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
}

.group-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

/* Dropdown functionality for older dates */
.dropdown-header {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 1rem;
    margin: -1rem 0 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.dropdown-btn svg {
    transition: transform 0.3s ease;
}

.dropdown-content {
    overflow: hidden;
}

.transaction-group.collapsed .dropdown-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.transaction-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.transaction-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.delete-button {
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 100%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 0 12px 12px 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 1;
    cursor: pointer;
    opacity: 0;
}

.delete-button:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* Show delete button on hover/touch */
.transaction-item.show-delete .transaction-content {
    transform: translateX(-80px);
}

.transaction-item.show-delete .delete-button {
    transform: translateX(0);
    opacity: 1;
}

.transaction-item:hover {
    background: transparent;
    border-color: transparent;
    transform: translateX(4px);
}

.transaction-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.allowance {
    padding: .5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.allowance:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.transaction-info {
    flex: 1;
}

.transaction-category {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.transaction-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.transaction-amount {
    font-weight: 700;
    color: #ffffff;
    font-size: 1.1rem;
}



/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 5rem;
    right: 0.5rem;
    z-index: 3000;
}

.toast {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive Design */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
        padding: 0 30px;
    }

    .page-title {
        font-size: 3rem;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .content-layout {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Desktop (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .container {
        max-width: 1000px;
        padding: 0 25px;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .page-title {
        font-size: 2.2rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .content-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .form-section,
    .transactions-section {
        padding: 1.5rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .nav-btn img {
        width: 32px;
        height: 32px;
    }

    .form-input,
    .form-select {
        font-size: 0.95rem;
        padding: 0.8rem;
    }

    .btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }

    .stat-card {
        padding: 1.2rem;
        min-height: 140px;
    }

    .stat-value {
        font-size: 2rem;
    }

    .stat-title {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
    }

    .stat-currency {
        font-size: 0.85rem;
    }
}

/* Mobile (480px - 767px) */
@media (max-width: 767px) and (min-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .page-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        margin-bottom: 1rem;
    }

    .toast-container {
        right: 0.5rem;
    }

    .content-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-section,
    .transactions-section {
        padding: 1rem;
    }

    .header {
        padding: 0.8rem 0;
    }

    .navbar {
        flex-direction: row;
        gap: 0.8rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    .nav-actions {
        justify-content: flex-end;
        gap: 0.8rem;
    }

    .nav-btn span {
        display: none;
    }

    .nav-btn {
        padding: 0;
        background: none;
        border: none;
        border-radius: 0;
    }

    .nav-btn img {
        width: 30px;
        height: 30px;
    }

    .download-btn img {
        width: 30px;
        height: 30px;
    }

    .form-input,
    .form-select {
        font-size: 0.9rem;
        padding: 0.7rem;
        border-radius: 8px;
    }

    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .stat-card {
        padding: 1rem;
        border-radius: 12px;
        min-height: 120px;
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .stat-title {
        font-size: 0.8rem;
        margin-bottom: 0.6rem;
    }

    .stat-currency {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .transaction-group {
        margin-bottom: 1rem;
    }

    .group-header {
        padding: 0.8rem;
        border-radius: 8px;
    }

    .group-date {
        font-size: 0.9rem;
    }

    .group-total {
        font-size: 0.9rem;
    }

    .transaction-item {
        padding: 0.3rem;
        border-radius: 8px;
        margin-bottom: 0;
        background: transparent;
        border: none;
        cursor: pointer;
    }

    .transaction-item:hover {
        background: transparent;
        border-color: transparent;
        transform: translateX(4px);
    }

    .allowance {
        padding: 0.3rem;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.03);
        transition: all 0.3s ease;
    }

    .allowance:hover {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.12);
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    }

    .transaction-category {
        font-size: 0.9rem;
    }

    .transaction-description {
        font-size: 0.8rem;
    }

    .transaction-amount {
        font-size: 0.9rem;
    }

    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: 12px;
    }

    .modal-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .toast {
        margin: 0.5rem;
        padding: 0.8rem;
        border-radius: 8px;
    }

    .toast-message {
        font-size: 0.85rem;
    }
}

/* Small Mobile (320px - 479px) */
@media (max-width: 479px) {
    .container {
        padding: 0 10px;
    }

    /* Ensure proper spacing for mobile */
    .main-content {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }

    .page-title {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        margin-bottom: 1rem;
    }

    .content-layout {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .form-section,
    .transactions-section {
        padding: 0.8rem;
    }

    .header {
        padding: 0.6rem 0;
    }

    .navbar {
        flex-direction: row;
        gap: 0.6rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav-actions {
        justify-content: flex-end;
        gap: 0.6rem;
    }

    .nav-btn span {
        display: none;
    }

    .nav-btn {
        padding: 0;
        background: none;
        border: none;
        border-radius: 0;
        min-width: auto;
    }

    .nav-btn img {
        width: 30px;
        height: 30px;
    }

    .download-btn img {
        width: 30px;
        height: 30px;
    }

    .form-input,
    .form-select {
        font-size: 0.85rem;
        padding: 0.6rem;
        border-radius: 6px;
    }

    .form-label {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }

    .btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
        border-radius: 6px;
        width: 100%;
    }

    .stat-card {
        padding: 0.8rem;
        border-radius: 8px;
        min-height: 100px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-title {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .stat-currency {
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }

    .transaction-group {
        margin-bottom: 0.8rem;
    }

    .group-header {
        padding: 0.6rem;
        border-radius: 6px;
    }

    .group-date {
        font-size: 0.8rem;
    }

    .group-total {
        font-size: 0.8rem;
    }

    .transaction-item {
        padding: 0.3rem;
        border-radius: 6px;
        margin-bottom: 0;
        background: transparent;
        border: none;
        cursor: pointer;
    }

    .transaction-item:hover {
        background: transparent;
        border-color: transparent;
        transform: translateX(4px);
    }

    .allowance {
        padding: 0.3rem;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.03);
        transition: all 0.3s ease;
        margin-bottom: .5rem;

    }

    .allowance:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .transaction-category {
        font-size: 0.8rem;
    }

    .transaction-description {
        font-size: 0.75rem;
    }

    .transaction-amount {
        font-size: 0.8rem;
    }

    .modal-content {
        margin: 0.5rem;
        padding: 1rem;
        border-radius: 8px;
    }

    .modal-title {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .toast {
        margin: 0.3rem;
        padding: 0.6rem;
        border-radius: 6px;
    }

    .toast-message {
        font-size: 0.8rem;
    }
}



/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}