body {
    background: linear-gradient(135deg,
            #0f172a 0%,
            #1e293b 50%,
            #0f172a 100%);
    color: #e2e8f0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

html {
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.header {
    background: linear-gradient(90deg, #1e293b 0%, #334155 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1rem 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 50;
    flex-shrink: 0;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-back:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateX(-2px);
}

.btn-back svg {
    stroke: currentColor;
    flex-shrink: 0;
}

.navbar-title {
    margin: 0;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    white-space: nowrap;
}

.content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    padding: 1.5rem;
    height: calc(100vh - 72px);
}

.grid-container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    height: 95%;
    display: flex;
    flex-direction: column;
}

.grid-item {
    background: linear-gradient(135deg,
            rgba(30, 41, 59, 0.8) 0%,
            rgba(51, 65, 85, 0.8) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.grid-item:hover {
    box-shadow: 0 25px 50px rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.3);
}

.header-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(96, 165, 250, 0.3);
    flex-shrink: 0;
}

.header-section h1 {
    margin: 0 0 0.25rem 0;
    font-size: 1.75rem;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.subtitle {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Summary Section */
.summary-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.summary-card {
    background: linear-gradient(135deg,
            rgba(15, 23, 42, 0.6) 0%,
            rgba(30, 41, 59, 0.8) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1.25rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.summary-card:hover {
    border-color: rgba(148, 163, 184, 0.4);
    transform: translateY(-2px);
}

.summary-label {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: "Courier New", monospace;
}

/* Filter Section */
.filter-section {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.filter-controls {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #f1f5f9;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-group select:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.filter-info {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.transaction-count {
    font-size: 0.9rem;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 500;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding-right: 0.5rem;
    padding-bottom: 2.5rem;
}

.transaction-list::-webkit-scrollbar {
    width: 6px;
}

.transaction-list::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 10px;
}

.transaction-list::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.3);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.transaction-list::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.5);
}

.transaction-card {
    background: linear-gradient(135deg,
            rgba(71, 85, 105, 0.4) 0%,
            rgba(51, 65, 85, 0.4) 100%);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.transaction-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #60a5fa 0%, #a78bfa 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.transaction-card:hover {
    background: linear-gradient(135deg,
            rgba(71, 85, 105, 0.6) 0%,
            rgba(51, 65, 85, 0.6) 100%);
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 8px 16px rgba(96, 165, 250, 0.15);
    transform: translateY(-2px);
}

.transaction-card:hover::before {
    transform: scaleX(1);
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.transaction-details {
    display: flex;
    gap: 1.5rem;
    flex: 1;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 1.25rem;
    color: #f1f5f9;
    font-weight: 700;
}

.transaction-date {
    padding: 0.5rem 1rem;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #60a5fa;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.transaction-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.btn-primary:hover {
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.btn-secondary {
    background: rgba(148, 163, 184, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.btn-secondary:hover {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

.btn-secondary:active {
    background: rgba(96, 165, 250, 0.1);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-danger:active {
    background: rgba(239, 68, 68, 0.1);
}

.btn svg {
    stroke: currentColor;
}

.btn-add-transaction {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    padding: 0;
    margin-top: 0;
    flex-shrink: 0;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.btn-add-transaction:hover {
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4);
    transform: scale(1.1);
}

.btn-add-transaction:active {
    transform: scale(0.95);
}

.btn-add-transaction svg {
    width: 24px;
    height: 24px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
    flex: 1;
}

.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.5;
    stroke: #94a3b8;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: #cbd5e1;
    font-weight: 700;
}

.empty-state p {
    margin: 0;
    color: #64748b;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.modal {
    background: linear-gradient(135deg,
            rgba(30, 41, 59, 0.95) 0%,
            rgba(51, 65, 85, 0.95) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 900px;
    max-height: 85vh;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #f1f5f9;
    font-weight: 700;
}

.btn-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-close:hover {
    color: #f1f5f9;
}

.btn-close svg {
    stroke: currentColor;
}

.modal form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #f1f5f9;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    margin: 0 -1.5rem -1.5rem -1.5rem;
    padding: 1.5rem;
}

.modal-actions .btn {
    flex: 1;
}

.modal-content {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.options-section {
    margin-bottom: 1.5rem;
}

.options-section h4 {
    margin: 0 0 1rem 0;
    color: #cbd5e1;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.options-section select {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #f1f5f9;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.options-section select:focus {
    outline: none;
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.btn-block {
    width: 100%;
    display: block;
}

.chart-modal-content {
    padding: 1rem;
    max-height: 70vh;
    overflow-y: auto;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

@media (max-width: 768px) {
    .header {
        padding: 0.75rem 0;
    }

    .navbar-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0 1rem;
    }

    .navbar-title {
        font-size: 1.1rem;
    }

    .content {
        padding: 0.75rem;
        height: calc(100vh - 70px);
    }

    .grid-container {
        height: 100%;
    }

    .grid-item {
        padding: 1rem;
        padding-bottom: 4.5rem;
        overflow-y: auto;
    }

    .header-section {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .header-section h1 {
        font-size: 1.4rem;
        margin: 0 0 0.15rem 0;
    }

    .subtitle {
        font-size: 0.8rem;
    }

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

    .summary-card {
        padding: 1rem;
    }

    .summary-label {
        font-size: 0.75rem;
    }

    .summary-value {
        font-size: 1.4rem;
    }

    .transaction-list {
        padding-right: 0.25rem;
    }

    .transaction-card {
        padding: 1rem;
    }

    .transaction-details {
        flex-direction: column;
        gap: 0.75rem;
    }

    .transaction-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn {
        flex: 1 1 auto;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .detail-value {
        font-size: 1.1rem;
    }

    .modal {
        width: 95%;
    }

    .modal-large {
        max-width: 95%;
    }

    .chart-modal-content {
        max-height: 60vh;
    }
}