/* ==========================
   RESET
========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
    line-height: 1.6;
}

.app-container {
    max-width: 1200px;
    margin: auto;
    padding: 40px 20px;
}

/* ==========================
   HERO SECTION
========================== */

.hero-section {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
    color: white;
    padding: 55px;
    border-radius: 22px;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,.15);
    box-shadow: 0 20px 45px rgba(37,99,235,.25);
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
    text-shadow: 0 4px 12px rgba(0,0,0,.20);
}

.hero-text {
    max-width: 900px;
    font-size: 1.15rem;
    line-height: 1.8;
    opacity: .96;
    white-space: nowrap;
}

/* ==========================
   SUMMARY CARDS
========================== */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    transition: .25s;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.card-label {
    display: block;
    font-size: .95rem;
    color: #6b7280;
    margin-bottom: 10px;
}

.summary-card strong {
    font-size: 2rem;
}

.income-card {
    border-left: 8px solid #16a34a;
}

.expense-card {
    border-left: 8px solid #dc2626;
}

.balance-card {
    border-left: 8px solid #2563eb;
}

/* ==========================
   MAIN GRID
========================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 25px;
}

.panel {
    background: white;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

.section-heading h2 {
    margin-bottom: 6px;
    font-size: 1.6rem;
}

.section-heading p {
    color: #6b7280;
    margin-bottom: 24px;
}

.transaction-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

/* ==========================
   FORM
========================== */

.form-group {
    margin-bottom: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

input,
select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    transition: .2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

.primary-btn {
    width: 100%;
    margin-top: 12px;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: .25s;
}

.primary-btn:hover {
    background: #1d4ed8;
}

.form-message {
    min-height: 20px;
    color: #dc2626;
    font-size: .9rem;
}

/* ==========================
   RESET BUTTON
========================== */

.reset-btn {
    border: none;
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: .25s;
}

.reset-btn:hover {
    background: #dc2626;
    color: white;
}

/* ==========================
   SEARCH & FILTER
========================== */

.controls {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}

/* ==========================
   TRANSACTIONS
========================== */

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.transaction {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    border-radius: 14px;
    background: #f9fafb;
    border-left: 6px solid #2563eb;
}

.transaction.income {
    border-left-color: #16a34a;
}

.transaction.expense {
    border-left-color: #dc2626;
}

.transaction-info h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.transaction-meta {
    font-size: .9rem;
    color: #6b7280;
}

.transaction-right {
    text-align: right;
}

.amount {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.income-text {
    color: #16a34a;
}

.expense-text {
    color: #dc2626;
}

.delete-btn {
    border: none;
    background: #dc2626;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: .2s;
}

.delete-btn:hover {
    background: #b91c1c;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #6b7280;
}

.empty-state h3 {
    margin-bottom: 10px;
}

/* ==========================
   RESPONSIVE
========================== */

@media (max-width: 900px) {

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .controls {
        grid-template-columns: 1fr;
    }

    .hero-text {
        white-space: normal;
    }
}

@media (max-width: 600px) {

    .hero-section {
        padding: 35px 25px;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .transaction-heading {
        flex-direction: column;
    }

    .reset-btn {
        width: 100%;
    }

    .transaction {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .transaction-right {
        width: 100%;
        text-align: left;
    }

    .summary-card strong {
        font-size: 1.7rem;
    }
}