/* Definirea variabilelor de culori, pentru a putea fi refolosite pe parcursul CSSului. */
:root {
    --bg: #f6f7f9;
    --card: #ffffff;
    --primary: #2563eb;
    --positive: #16a34a;
    --negative: #dc2626;
    --muted: #6b7280;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: #111;
    padding: 1rem;
}

.app {
    max-width: 600px;
    margin: auto;
}

h1 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.balance {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1rem;
}

.balance-value {
    font-size: 2.5rem;
    font-weight: bold;
}

.card {
    background: var(--card);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

label {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.75rem;
}

input,
select,
button {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.25rem;
    font-size: 1rem;
    border-radius: 8px;
}

input,
select {
    border: 1px solid #d1d5db;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

button {
    background: var(--primary);
    color: white;
    border: none;
    margin-top: 1rem;
    cursor: pointer;
    user-select: none;
}

button:active {
    transform: scale(0.98);
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 0;
    flex-wrap: wrap;
}

/* Inlaturare linie de separare, pentru ultima inregistrare din sectiunea Istoric */
.history-item:last-child {
    border-bottom: none;
}

.amount-positive {
    color: var(--positive);
    font-weight: 600;
}

.amount-negative {
    color: var(--negative);
    font-weight: 600;
}

.delete-btn {
    background: none;
    border: none;
    color: var(--negative);
    font-size: 0.9rem;
    cursor: pointer;
    width: auto;
    padding: 0;
}

.note {
    font-size: 0.8rem;
    color: var(--muted);
    width: 100%;
}

/* Responsive design pentru ecrane mici */
@media (max-width: 480px) {
    .balance-value {
        font-size: 2rem;
    }
}

.footnote {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    margin: 20px 0;
}