:root {
  --navy: #14263d;
  --navy-2: #1c3655;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --ink: #182230;
  --muted: #667085;
  --line: #e6eaf0;
  --panel: #ffffff;
  --canvas: #f5f7fa;
  --green: #15803d;
  --red: #c2413b;
  --amber: #b45309;
  --shadow: 0 8px 30px rgba(15, 23, 42, .07);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); font-size: 14px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); line-height: 1.55; }
.eyebrow { color: #697386; font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 226px; background: var(--navy); color: white; padding: 24px 16px; display: flex; flex-direction: column; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 26px; font-size: 18px; font-weight: 750; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: #fff; color: var(--navy); font-size: 22px; font-weight: 850; box-shadow: 0 7px 30px rgba(0,0,0,.13); }
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }
.nav-item { width: 100%; border: 0; color: #cbd5e1; background: transparent; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 9px; margin: 3px 0; text-align: left; }
.nav-item.active, .nav-item:hover { color: white; background: rgba(255,255,255,.09); }
.nav-item b { margin-left: auto; padding: 1px 7px; border-radius: 10px; background: #eab308; color: #25200c; font-size: 11px; }
.sidebar-bottom { margin-top: auto; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 14px 10px; border-top: 1px solid rgba(255,255,255,.12); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #e2e8f0; color: var(--navy); font-weight: 800; }
.user-card strong, .user-card span { display: block; max-width: 125px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-card span { color: #94a3b8; font-size: 11px; margin-top: 2px; }
.logout { font-size: 12px; }
.workspace { margin-left: 226px; min-width: 920px; }
.topbar { height: 94px; display: flex; align-items: center; justify-content: space-between; padding: 18px 30px; background: white; border-bottom: 1px solid var(--line); }
.company-line { display: flex; align-items: center; gap: 8px; }
.company-line select { border: 0; background: transparent; color: var(--ink); font-size: 21px; font-weight: 750; min-width: 280px; max-width: 520px; padding: 0 25px 0 0; }
.top-actions { display: flex; gap: 10px; }
.button { min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; font-weight: 650; transition: .15s ease; }
.button.primary { color: white; background: var(--blue); box-shadow: 0 4px 12px rgba(37,99,235,.18); }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { background: white; border-color: #ccd4df; color: #344054; }
.button.secondary:hover, .button.ghost:hover { background: #f1f5f9; }
.button.ghost { background: transparent; color: #667085; }
.button.wide { width: 100%; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.icon-button { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); background: white; border-radius: 8px; color: #475467; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 14px; padding: 22px 30px 18px; }
.summary-card { min-height: 118px; position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: 19px 20px; box-shadow: 0 2px 4px rgba(15,23,42,.02); }
.summary-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #94a3b8; }
.summary-card.income::before { background: #22a45d; }.summary-card.expense::before { background: #e0524d; }.summary-card.balance::before { background: #3979e8; }.summary-card.review::before { background: #e5a50a; }
.summary-card span, .summary-card small, .summary-card strong { display: block; }
.summary-card span { color: #667085; font-weight: 600; }
.summary-card strong { margin: 10px 0 6px; font-size: 25px; letter-spacing: -.02em; }
.summary-card small { color: #98a2b3; }
.summary-card.income strong { color: var(--green); }.summary-card.expense strong { color: var(--red); }.summary-card.review strong { color: var(--amber); }
.table-panel { margin: 0 30px 30px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; }
.table-toolbar { min-height: 66px; padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-box { width: 270px; height: 40px; display: flex; align-items: center; gap: 8px; border: 1px solid #d0d5dd; border-radius: 9px; padding: 0 11px; color: #98a2b3; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); }
.filters { display: flex; align-items: center; gap: 7px; }
.filters input, .filters select { height: 38px; border: 1px solid #d0d5dd; border-radius: 8px; padding: 0 9px; color: #475467; background: white; }
.add-row { margin-left: auto; background: #eef4ff; color: #2459b9; }
.grid-wrap { position: relative; min-height: 330px; max-height: calc(100vh - 360px); overflow: auto; }
.data-grid { width: 100%; min-width: 1510px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.data-grid th { position: sticky; top: 0; z-index: 2; height: 41px; background: #f8fafc; color: #667085; font-size: 11px; text-transform: uppercase; letter-spacing: .035em; font-weight: 750; text-align: left; border-bottom: 1px solid var(--line); padding: 0 9px; }
.data-grid td { height: 48px; border-bottom: 1px solid #edf0f4; padding: 0 5px; background: white; vertical-align: middle; }
.data-grid tr:hover td { background: #fbfdff; }
.data-grid tr.needs-review td:first-child { box-shadow: inset 3px 0 #e5a50a; }
.data-grid th:nth-child(1) { width: 24px; }.data-grid th:nth-child(2) { width: 115px; }.data-grid th:nth-child(3) { width: 108px; }.data-grid th:nth-child(4) { width: 135px; }.data-grid th:nth-child(5) { width: 190px; }.data-grid th:nth-child(6) { width: 225px; }.data-grid th:nth-child(7) { width: 135px; }.data-grid th:nth-child(8) { width: 310px; }.data-grid th:nth-child(9) { width: 160px; }.data-grid th:nth-child(10), .data-grid th:nth-child(11) { width: 85px; }.data-grid th:nth-child(12) { width: 230px; }.data-grid th:nth-child(13) { width: 48px; }
.row-delete { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: #b0b8c5; font-size: 18px; }.row-delete:hover { color: var(--red); background: #fff0ef; }
.grid-input, .grid-select { width: 100%; height: 35px; border: 1px solid transparent; border-radius: 6px; padding: 0 6px; color: #344054; background: transparent; outline: none; }
.grid-input:hover, .grid-select:hover { border-color: #e2e8f0; background: white; }.grid-input:focus, .grid-select:focus { border-color: #6b9df0; box-shadow: 0 0 0 2px #e8f0ff; background: white; }
.money-input { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }.kind-income { color: var(--green); }.kind-expense { color: var(--red); }
.review-dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: #22a45d; margin: auto; }.needs-review .review-dot { background: #e5a50a; box-shadow: 0 0 0 3px #fff7d6; }
.saving { opacity: .55; }
.empty-state, .loading-state { position: absolute; inset: 41px 0 0; display: grid; place-content: center; text-align: center; background: white; color: #667085; }
.empty-state > div { font-size: 34px; color: #98a2b3; }.empty-state h3 { color: var(--ink); margin: 12px 0 4px; }.empty-state p { margin: 0 0 18px; }
.table-footer { height: 52px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; color: #667085; border-top: 1px solid var(--line); }
.table-footer div { display: flex; align-items: center; gap: 10px; }
.modal { width: min(520px, calc(100vw - 30px)); border: 0; border-radius: 16px; padding: 28px; box-shadow: 0 30px 90px rgba(15,23,42,.28); color: var(--ink); }
.modal.compact { width: 440px; }.modal::backdrop { background: rgba(15,23,42,.52); backdrop-filter: blur(2px); }.modal h2 { margin: 0; font-size: 24px; }.modal-close { position: absolute; top: 14px; right: 16px; border: 0; background: transparent; color: #98a2b3; font-size: 24px; }
.modal label:not(.dropzone) { display: block; color: #475467; font-weight: 650; margin: 17px 0; }.modal label input { display: block; width: 100%; height: 43px; margin-top: 7px; border: 1px solid #d0d5dd; border-radius: 8px; padding: 0 11px; }
.dropzone { min-height: 190px; margin: 20px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed #9db8e8; border-radius: 13px; background: #f7faff; color: #344054; cursor: pointer; }.dropzone.drag { background: #edf4ff; border-color: var(--blue); }.dropzone input { display: none; }.dropzone small, .dropzone em { color: #667085; margin-top: 6px; font-style: normal; }.dropzone em { color: var(--blue); font-weight: 600; }.upload-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #e8f0ff; color: var(--blue); font-size: 21px; margin-bottom: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 100; display: grid; gap: 8px; }.toast { max-width: 390px; padding: 13px 16px; border-radius: 10px; color: white; background: #27364a; box-shadow: var(--shadow); animation: toast-in .18s ease; }.toast.error { background: #a93430; }.toast.success { background: #14783b; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.login-body { min-height: 100vh; background: #edf2f7; display: grid; place-items: center; padding: 28px; }
.login-shell { width: min(1040px, 100%); min-height: 620px; display: grid; grid-template-columns: 1.15fr .85fr; border-radius: 22px; overflow: hidden; background: white; box-shadow: 0 30px 90px rgba(15,23,42,.15); }
.login-brand { padding: 64px; display: flex; flex-direction: column; justify-content: center; color: white; background: radial-gradient(circle at 15% 15%, #315b88 0, transparent 32%), linear-gradient(145deg, #14263d, #1c3859); }.login-brand .eyebrow { color: #a9c3dd; margin-top: 34px; }.login-brand h1 { max-width: 520px; font-size: 42px; line-height: 1.1; letter-spacing: -.035em; margin: 8px 0 20px; }.login-brand > p:not(.eyebrow) { max-width: 500px; color: #c4d2e0; font-size: 16px; line-height: 1.6; }.login-points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }.login-points span { padding: 8px 11px; border: 1px solid rgba(255,255,255,.16); border-radius: 20px; color: #dce7f1; font-size: 12px; }
.login-card { padding: 64px 50px; display: flex; flex-direction: column; justify-content: center; }.login-card h2 { font-size: 29px; margin: 0; }.login-form label { display: block; margin: 19px 0; color: #475467; font-weight: 650; }.login-form input { display: block; width: 100%; height: 45px; margin-top: 8px; border: 1px solid #cfd6df; border-radius: 9px; padding: 0 12px; outline: 0; }.login-form input:focus { border-color: #6b9df0; box-shadow: 0 0 0 3px #eaf1ff; }.security-note { color: #98a2b3; font-size: 11px; text-align: center; margin-top: 20px; }.alert { padding: 11px 12px; border-radius: 8px; margin-top: 18px; }.alert.error { color: #8c2723; background: #fff0ef; border: 1px solid #f2c5c2; }
@media (max-width: 1050px) { .sidebar { width: 74px; }.brand span, .nav-item:not(.active), .user-card > div:last-child, .sidebar-bottom form { display: none; }.brand { padding-left: 4px; }.workspace { margin-left: 74px; }.summary-grid { grid-template-columns: repeat(2, 1fr); }.grid-wrap { max-height: none; }.login-brand { padding: 44px; }.login-brand h1 { font-size: 34px; } }
@media (max-width: 760px) { .login-shell { display: block; min-height: 0; }.login-brand { display: none; }.login-card { padding: 45px 28px; }.workspace { min-width: 860px; } }
