﻿:root {
    --navy: #142238;
    --teal: #0d9488;
    --bg: #f3f6fa;
    --text: #26364a;
    --muted: #8491a3;
    --border: #e8edf3;
    --green: #079b72;
    --red: #e15b66;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
}
.topbar {
    background: var(--navy);
    color: white;
    padding: 19px max(calc((100% - 1050px)/2), 20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand { font-weight: 900; font-size: 22px; letter-spacing: 2px; }
.brand span { color: #36c5b5; }
.topbar p { margin: 5px 0 0; color: #aebdce; font-size: 12px; }
.offline-status {
    font-size: 11px;
    color: #b8f2e5;
    border: 1px solid #37635f;
    padding: 8px 11px;
    border-radius: 20px;
}
.offline-status span {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #42d5a7;
    border-radius: 50%;
    margin-right: 5px;
}
.container { max-width: 1050px; margin: auto; padding: 25px 20px; }
.welcome { margin: 5px 0 20px; }
.welcome h1 { margin: 5px 0; font-size: 27px; }
.welcome p { color: var(--muted); font-size: 13px; }
.welcome .muted-light { color: var(--teal); font-weight: 800; letter-spacing: 1.5px; font-size: 10px; }
.balance-card {
    padding: 27px;
    color: white;
    border-radius: 18px;
    background: linear-gradient(120deg, #142238, #20516a);
    box-shadow: 0 10px 25px #1422381b;
}
.balance-heading { display: flex; justify-content: space-between; color: #c3d4e3; font-size: 13px; }
.currency-tag { background: #ffffff20; padding: 5px 12px; border-radius: 20px; }
.balance-card h2 { font-size: clamp(32px, 7vw, 43px); margin: 15px 0 25px; letter-spacing: 1px; }
.balance-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; border-top: 1px solid #ffffff30; padding-top: 17px; }
.balance-footer span { display: block; color: #c3d4e3; font-size: 12px; margin-bottom: 7px; }
.balance-footer strong { font-size: 15px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin: 18px 0; }
.stat-card, .panel { background: white; border: 1px solid var(--border); border-radius: 14px; }
.stat-card { padding: 17px; }
.stat-card span { display: block; color: var(--muted); font-size: 11px; margin: 10px 0; }
.stat-card strong { font-size: 16px; overflow-wrap: anywhere; }
.stat-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; }
.income-icon { background: #e2f7ef; color: var(--green); }
.expense-icon { background: #ffebed; color: var(--red); }
.savings-icon { background: #e4f4f8; color: #1889a4; }
.count-icon { background: #f0ebff; color: #7958b7; }
.panel { padding: 22px; margin: 18px 0; box-shadow: 0 3px 12px #14223806; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section-heading h2 { margin: 5px 0 0; font-size: 19px; }
.eyebrow { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: 1.3px; }
.section-symbol { color: var(--teal); font-size: 26px; }
.record-count { color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.field input, .field select, .filter-grid input, .filter-grid select {
    width: 100%; min-width: 0; padding: 12px;
    border: 1px solid #dce3eb; border-radius: 8px;
    background: #fff; color: var(--text); font-size: 14px;
}
.field input:focus, .field select:focus, .filter-grid input:focus, .filter-grid select:focus {
    outline: 2px solid #0d948833; border-color: var(--teal);
}
.full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; }
button { cursor: pointer; border: 0; border-radius: 8px; font-weight: 700; }
.primary-btn, .secondary-btn, .cancel-btn {
    padding: 13px 17px; font-size: 13px;
}
.primary-btn { background: var(--teal); color: white; }
.secondary-btn { background: #eaf0f5; color: var(--navy); }
.cancel-btn { background: #fff0e7; color: #a44e18; }
.filter-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.transaction-row {
    display: grid; grid-template-columns: 1fr auto auto;
    align-items: center; gap: 12px;
    padding: 14px 0; border-bottom: 1px solid var(--border);
}
.transaction-name { font-size: 13px; font-weight: 700; }
.transaction-detail { color: var(--muted); font-size: 11px; margin-top: 5px; }
.transaction-amount { font-weight: 800; font-size: 13px; white-space: nowrap; }
.green { color: var(--green); }
.red { color: var(--red); }
.row-actions { display: flex; gap: 5px; }
.row-actions button { padding: 7px 9px; font-size: 11px; background: #edf2f7; color: var(--navy); }
.row-actions .delete-btn { background: #fff0f0; color: #bc414c; }
.empty-state { text-align: center; padding: 30px 10px; color: var(--muted); font-size: 13px; }
.report-date { max-width: 250px; margin-bottom: 18px; }
.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.report-item { background: #f5f8fb; border-radius: 10px; padding: 14px; }
.report-item span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 9px; }
.report-item strong { font-size: 14px; overflow-wrap: anywhere; }
.subheading { font-size: 14px; margin-top: 25px; }
.category-row { margin: 14px 0; }
.category-info { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 7px; gap: 10px; }
.bar-bg { height: 8px; background: #edf1f5; border-radius: 10px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--teal); border-radius: 10px; }
.help-text { font-size: 12px; line-height: 1.6; color: var(--muted); }
.backup-grid { display: flex; flex-wrap: wrap; gap: 10px; }
footer { text-align: center; padding: 28px 15px; color: var(--muted); font-size: 12px; }
footer strong { color: var(--navy); letter-spacing: 2px; }
footer p { margin: 7px; }
[hidden] { display: none !important; }

@media(max-width:700px) {
    .container { padding: 17px 13px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 13px; }
    .panel { padding: 16px; }
    .filter-grid { grid-template-columns: 1fr 1fr; }
    .filter-grid input[type="search"] { grid-column: 1 / -1; }
    .transaction-row { grid-template-columns: 1fr auto; gap: 8px; }
    .row-actions { grid-column: 1 / -1; justify-content: flex-end; }
    .report-grid { grid-template-columns: 1fr; }
    .backup-grid { flex-direction: column; }
    .balance-card { padding: 21px; }
    .balance-footer strong { font-size: 13px; }
}
