* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

html {
    font-size: 16px;
}

body {
    background: linear-gradient(135deg, #b18cff, #d6b3ff);
    display: flex;
    min-height: 100vh;
    line-height: 1.5;
}

/* Sidebar */
.sidebar {
    width: 230px;
    background: #0f0f0f;
    color: #ffffff;
    padding: 24px;
}

.logo {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.4rem;
    color: #4fd1c5;
}

.sidebar nav a {
    display: block;
    padding: 14px;
    margin-bottom: 12px;
    color: #d1d1d1;
    text-decoration: none;
    border-radius: 10px;
}

.sidebar nav a:hover,
.sidebar nav .active {
    background: #1e1e1e;
    color: #4fd1c5;
}

/* Main */
.main {
    flex: 1;
    background: #111111;
    margin: 20px;
    border-radius: 18px;
    padding: 30px;
    color: #ffffff;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.header-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 35px;
}

.card {
    background: #1a1a1a;
    padding: 24px;
    border-radius: 16px;
}

.card p {
    color: #cfcfcf;
    margin-bottom: 12px;
}

.card h2 {
    font-size: 1.7rem;
}

.income {
    border-left: 5px solid #4caf50;
}

.expense {
    border-left: 5px solid #f44336;
}

.balance {
    border-left: 5px solid #2196f3;
}

/* Forms */
.forms {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 35px;
}

.form-box {
    background: #1a1a1a;
    padding: 24px;
    border-radius: 16px;
}

.form-box h3 {
    margin-bottom: 18px;
}

.form-box input,
.form-box select {
    width: 100%;
    padding: 14px;
    margin-bottom: 16px;
    border-radius: 10px;
    border: none;
}

.form-box button {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    background: #4fd1c5;
    font-weight: 600;
    cursor: pointer;
}

/* Recent Transactions */
.transactions {
    background: #1a1a1a;
    padding: 24px;
    border-radius: 16px;
    margin-top: 35px;
}

.transactions h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

#transactionList {
    list-style: none;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #111;
    border-radius: 10px;
    margin-bottom: 10px;
    gap: 16px;
}

.transaction-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.transaction-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.transaction-sign {
    font-weight: bold;
    font-size: 1.2rem;
}

.transaction-date {
    font-size: 0.85rem;
    color: #aaa;
    white-space: nowrap;
}

.income-sign {
    color: #4caf50;
}

.expense-sign {
    color: #f44336;
}

.transaction-category {
    text-transform: capitalize;
}

.transaction-amount {
    font-weight: 600;
}

.transaction-delete {
    background: transparent;
    border: none;
    color: #f44336;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Income section & Expense section */
.income-filter,
.expense-filter {
    margin: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.income-filter label,
.expense-filter label {
    font-size: 1.05rem;
    color: #e0e0e0;
    font-weight: 500;
}

.income-filter select,
.expense-filter select {
    padding: 10px 14px;
    font-size: 1rem;
    border-radius: 8px;
    background: #1a1a1a;
    color: #ffffff;
    border: 1px solid #444;
    cursor: pointer;
}

.income-filter select:focus,
.expense-filter select:focus {
    outline: none;
    border-color: #4fd1c5;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* Date Section */
.transaction-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.transaction-date {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.2;
}

/* Reports Bar Chart */
.report-chart {
    background: #1a1a1a;
    padding: 24px;
    border-radius: 16px;
    margin-top: 30px;
}

.report-chart h3 {
    margin-bottom: 20px;
}

/* Chart container */
.bar-chart {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 60px;
    height: 220px;
    margin-top: 20px;
}

.bar-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    gap: 8px;
}

.bar {
    width: 60px;
    min-height: 10px;
    border-radius: 8px;
    transition: height 0.4s ease;
}

.income-bar {
    background: #4caf50;
}

.expense-bar {
    background: #f44336;
}

/* Status text */
.report-status {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 500;
}

/* Settings part */
.settings-section {
    background: #1a1a1a;
    padding: 24px;
    border-radius: 16px;
    margin-top: 30px;
}

.settings-section h3 {
    color: #ff5252;
    margin-bottom: 10px;
}

.settings-section p {
    color: #ccc;
    margin-bottom: 20px;
}

.danger-btn {
    background: #f44336;
    color: #fff;
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
}

.danger-btn:hover {
    opacity: 0.9;
}

/* Settings card */
.settings-card {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 14px;
    margin-top: 24px;
}

.settings-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #ffffff;
}

.about-text {
    font-size: 1.05rem;
    color: #cccccc;
    line-height: 1.7;
}

.about-text strong {
    color: #ffffff;
}

.github-link {
    color: #4fd1c5;
    text-decoration: none;
    font-weight: 500;
}

.github-link:hover {
    text-decoration: underline;
}




/* Responsive */
@media (max-width: 1024px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .forms {
        grid-template-columns: 1fr;
    }

    .chart-box canvas {
        height: 260px !important;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        text-align: center;
    }

    .main {
        margin: 10px;
        padding: 20px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .header-icon {
        width: 40px;
        height: 40px;
    }

    .header h1 {
        font-size: 1.4rem;
    }

    .chart-box {
        padding: 20px;
    }

    .chart-box h3 {
        font-size: 1.1rem;
    }

    .chart-box canvas {
        height: 240px !important;
    }

    .income-filter {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .income-filter select {
        width: 100%;
    }

    .transaction-date {
        font-size: 0.9rem;
        align-self: flex-end;
    }

    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .transaction-right {
        align-self: flex-end;
    }

    .bar-chart {
        gap: 40px;
    }

    .bar {
        width: 50px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .transaction-date {
        font-size: 0.95rem;
    }
}