:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; color: #182019; background: #f4f6f1; font-synthesis: none; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 210px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 22px 14px; background: #fff; border-right: 1px solid #dfe5dc; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 800; line-height: 1.35; letter-spacing: .02em; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: #176b45; }
nav { display: grid; gap: 4px; }
.nav-item { border: 0; border-radius: 9px; padding: 10px 12px; text-align: left; color: #667067; background: transparent; }
.nav-item:hover, .nav-item.active { color: #182019; background: #e1f0e7; }
.sidebar-footer { margin-top: auto; display: grid; gap: 8px; }
.bot-state { padding: 10px; border-radius: 9px; color: #667067; background: #f2f4f0; font-size: 12px; line-height: 1.4; }.bot-state span { display: block; }.bot-state button { width: 100%; margin-top: 8px; padding: 7px; border: 0; border-radius: 7px; color: #176b45; background: #dfeee5; }
.logout-button { border: 1px solid #d9e0d7; border-radius: 8px; padding: 8px 10px; color: #667067; background: #fff; }
.logout-button:hover { color: #182019; background: #f2f4f0; }
.security-link { display: block; text-align: center; text-decoration: none; }
main { min-width: 0; padding: 28px; }
.mobile-header { display: none; }
.mobile-actions { display: flex; align-items: center; gap: 6px; }
.mobile-actions select { width: auto; max-width: 150px; padding: 8px; }
.auth-page { min-height: 100vh; background: radial-gradient(circle at 50% 0, #e5f2e9 0, #f4f6f1 45%); }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 430px); padding: 34px; border: 1px solid #dfe5dc; border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: 0 24px 70px rgba(26,55,37,.10); }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 38px; font-size: 11px; font-weight: 800; line-height: 1.35; letter-spacing: .02em; }
.auth-copy h1 { margin-bottom: 8px; }
.auth-copy p { color: #667067; line-height: 1.5; }
.auth-kicker { margin-bottom: 8px; color: #176b45 !important; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.auth-form { display: grid; gap: 16px; margin-top: 24px; }
.auth-form label { display: grid; gap: 7px; font-size: 13px; font-weight: 650; }
.auth-form input { width: 100%; padding: 12px 13px; border: 1px solid #ccd5ca; border-radius: 10px; color: #182019; background: #fff; outline: none; }
.auth-form input:focus { border-color: #176b45; box-shadow: 0 0 0 3px rgba(23,107,69,.12); }
.auth-submit { width: 100%; padding: 12px; }
.auth-submit:disabled { cursor: wait; opacity: .65; }
.passkey-login-block { margin-top: 18px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: #8a928b; font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: #e1e5df; }
.auth-note { margin: 20px 0 0; color: #7b847c; font-size: 12px; line-height: 1.45; }
.security-card { width: min(100%, 520px); }
.security-back { display: inline-block; margin-bottom: 28px; color: #176b45; text-decoration: none; font-size: 13px; font-weight: 650; }
.security-success { display: grid; gap: 5px; margin-top: 24px; padding: 16px; border-radius: 12px; color: #176b45; background: #e1f0e7; }
.security-success span { color: #52705d; font-size: 13px; }
.passkey-settings { margin-top: 32px; padding-top: 28px; border-top: 1px solid #e1e5df; }
.passkey-settings h2 { margin-bottom: 8px; }
.passkey-list { margin: 18px 0 12px; padding: 12px; border-radius: 10px; color: #526057; background: #f2f4f0; font-size: 13px; }
.passkey-name { display: grid; gap: 7px; margin-bottom: 12px; font-size: 13px; font-weight: 650; }
.passkey-name input { width: 100%; padding: 12px 13px; border: 1px solid #ccd5ca; border-radius: 10px; color: #182019; background: #fff; }
.security-steps { padding-left: 20px; color: #4f5a51; line-height: 1.55; }
.security-steps li + li { margin-top: 7px; }
.totp-qr { display: block; width: 260px; max-width: 100%; margin: 20px auto; border-radius: 12px; }
.totp-manual { margin: 16px 0; color: #667067; font-size: 13px; }
.totp-manual code { display: block; margin-top: 8px; padding: 10px; overflow-wrap: anywhere; border-radius: 8px; color: #182019; background: #f2f4f0; font-size: 14px; letter-spacing: .08em; }
.page { display: none; max-width: 1240px; margin: 0 auto; }
.page.active { display: block; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.client-search { width: 190px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: 26px; }
h2 { margin-bottom: 0; font-size: 16px; }
p { margin-bottom: 0; color: #69736b; font-size: 13px; }
.primary, .secondary, .success, .danger { border: 0; border-radius: 9px; padding: 10px 14px; }
.primary { color: #fff; background: #176b45; }
.secondary { color: #263029; background: #e9ede7; }
.success { color: #0f5b38; background: #daf0e3; }
.danger { color: #a03632; background: #f6e1df; }
.full { width: 100%; }
.horizon, .filters { display: flex; width: fit-content; gap: 5px; padding: 4px; margin-bottom: 16px; border-radius: 10px; background: #e9ede7; }
.horizon button, .filters button { border: 0; border-radius: 8px; padding: 8px 13px; color: #687269; background: transparent; }
.horizon button.active, .filters button.active { color: #182019; background: #fff; box-shadow: 0 1px 4px #17201a14; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.account-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.account-summary article { padding: 12px 14px; border-radius: 11px; color: #21402f; background: #e4f1e9; }
.account-summary span { display: block; margin-bottom: 5px; font-size: 11px; }.account-summary strong { font-size: 17px; }
.metrics article, .panel { border: 1px solid #dfe5dc; border-radius: 13px; background: #fff; }
.metrics article { padding: 15px; }
.metrics span { display: block; margin-bottom: 8px; color: #687269; font-size: 12px; }
.metrics strong { display: block; font-size: 20px; }
.metrics small { display: block; margin-top: 7px; color: #788279; font-size: 11px; }
.metric-action { display: block; margin-top: 7px; padding: 0; border: 0; color: #176b45; background: transparent; font-size: 11px; text-align: left; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .75fr); gap: 14px; }
.panel { padding: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.legend { display: flex; gap: 12px; color: #737d75; font-size: 11px; }
.legend i { width: 8px; height: 8px; display: inline-block; margin-right: 5px; border-radius: 50%; }
.legend .income { background: #218458; }.legend .expense { background: #bd4841; }
.legend .balance-positive { background: #315f7d; }.legend .balance-scenario { border: 1px dashed #8d7136; background: #fff; }.legend .balance-negative { background: #d27a35; }
.text-button { border: 0; color: #176b45; background: transparent; }
.flow-chart { min-height: 310px; overflow-x: auto; border-bottom: 1px solid #dfe5dc; }
.balance-chart { display: block; width: 100%; min-width: 560px; height: auto; }
.negative-zone { fill: #fbefe5; }
.balance-grid { stroke: #e3e7e2; stroke-width: 1; }
.balance-grid.zero { stroke: #465149; stroke-width: 1.5; stroke-dasharray: 5 4; }
.balance-line { fill: none; stroke: #315f7d; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.scenario-line { fill: none; stroke: #9a7a35; stroke-width: 2.5; stroke-dasharray: 8 6; stroke-linecap: round; stroke-linejoin: round; }
.balance-point { stroke-width: 2.5; outline: none; }
.balance-point.positive { fill: #fff; stroke: #315f7d; }
.balance-point.negative { fill: #d27a35; stroke: #9a4f1d; }
.balance-point:focus { stroke-width: 5; }
.scenario-point { fill: #fff8df; stroke: #9a7a35; stroke-width: 2.5; outline: none; }
.scenario-point:focus { stroke-width: 5; }
.balance-axis-label { fill: #6d776f; font-size: 11px; }
.cash-gaps { display: grid; gap: 8px; padding-top: 14px; }
.cash-gap-title { color: #7d4826; font-size: 12px; font-weight: 700; }
.cash-gap-item { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 11px 12px; border-left: 4px solid #d27a35; border-radius: 8px; background: #fbf1e8; }
.cash-gap-item div, .cash-gap-ok { display: grid; gap: 3px; }
.cash-gap-item strong { color: #6f3e20; font-size: 12px; }
.cash-gap-item span, .cash-gap-ok span { color: #746b63; font-size: 10px; }
.cash-gap-item .scenario-hint { margin-top: 3px; color: #71581f; font-weight: 700; }
.cash-gap-ok { padding: 11px 12px; border-left: 4px solid #315f7d; border-radius: 8px; color: #284c64; background: #edf3f6; font-size: 12px; }
.possible-payments { display: grid; gap: 7px; margin-top: 4px; }
.possible-payment { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 9px 12px; border: 1px dashed #cdbb88; border-radius: 8px; background: #fffdf6; }
.possible-payment div { display: grid; gap: 2px; }
.possible-payment div:last-child { text-align: right; }
.possible-payment strong { color: #5e4a1d; font-size: 11px; }
.possible-payment span { color: #7c735e; font-size: 10px; }
.possible-delete { justify-self: end; margin-top: 3px; padding: 0; border: 0; color: #a13b36; background: transparent; font-size: 10px; }
.upcoming { display: grid; gap: 10px; }
.upcoming-item { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid #e4e8e1; }
.upcoming-item:last-child { border-bottom: 0; }
.item-mark { width: 7px; height: 34px; border-radius: 4px; background: #218458; }.item-mark.expense { background: #bd4841; }.item-mark.overdue { background: #e08a25; }.item-mark.invoice { background: #3973ad; }
.item-mark.possible { border: 1px dashed #8d7136; background: #fff3c9; }
.item-title { font-size: 12px; }.item-meta { margin-top: 3px; color: #737d75; font-size: 10px; }.item-sum { white-space: nowrap; font-size: 12px; font-weight: 600; }
.empty { margin: auto; color: #7a847c; font-size: 13px; text-align: center; }
.overdue-panel { margin-top: 14px; border-color: #ebc9c6; }
.overdue-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid #f0dfdd; font-size: 13px; }
.overdue-row button, .row-action { border: 0; border-radius: 7px; padding: 6px 9px; color: #176b45; background: #e1f0e7; }
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 12px; }
.account-card { padding: 16px; border: 1px solid #dfe5dc; border-radius: 13px; background: #fff; }
.account-card-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 16px; }.account-kind { color: #748078; font-size: 11px; }
.account-value { margin-bottom: 5px; font-size: 22px; font-weight: 700; }.account-value.debt { color: #a53b36; }.account-meta { min-height: 18px; color: #717b73; font-size: 11px; }
.account-card-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 15px; padding-top: 12px; border-top: 1px solid #e4e8e1; }.account-card-actions button { border: 0; color: #176b45; background: transparent; }.accounts-note { margin-top: 14px; }
.client-documents-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.client-document-card { padding: 16px; border: 1px solid #dfe5dc; border-radius: 13px; background: #fff; }
.client-document-card h2 { margin-bottom: 0; }
.client-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.client-status { flex: none; padding: 4px 7px; border-radius: 999px; color: #687269; background: #edf0eb; font-size: 10px; }
.client-status.active { color: #176b45; background: #ddf0e5; }
.client-status.completed { color: #6f6550; background: #f0ece3; }
.client-details { display: grid; gap: 8px; margin-bottom: 14px; }
.client-details div { display: grid; grid-template-columns: minmax(90px, .8fr) minmax(0, 1.2fr); gap: 10px; font-size: 11px; }
.client-details span { color: #778078; }
.client-details strong { overflow-wrap: anywhere; font-weight: 600; }
.client-details a { color: #176b45; text-decoration: none; }
.document-links { display: grid; gap: 7px; min-height: 35px; padding-top: 12px; border-top: 1px solid #e5e9e3; }
.document-links a { color: #176b45; font-size: 12px; text-decoration: none; }
.document-links a:hover { text-decoration: underline; }
.client-document-card button { margin-top: 14px; padding: 0; border: 0; color: #176b45; background: transparent; }
.payment-documents-panel { margin-top: 18px; }
.unit-layout { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(0, 1.35fr); gap: 14px; align-items: start; }
.unit-calculator { position: sticky; top: 20px; }
.unit-calculator form { display: grid; gap: 13px; }
.unit-calculator label { display: grid; gap: 6px; color: #5d675f; font-size: 12px; }
.unit-check { display: flex !important; align-items: center; grid-template-columns: auto 1fr; }
.unit-check input { width: auto; }
.unit-settings { border: 1px solid #e0e5de; border-radius: 10px; background: #f8faf7; }
.unit-settings summary { padding: 11px 12px; color: #315f46; font-size: 12px; font-weight: 700; cursor: pointer; }
.unit-settings[open] summary { border-bottom: 1px solid #e0e5de; }
.unit-settings > div, .unit-settings > button { margin: 12px; }
.rate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.unit-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.unit-result div { padding: 11px; border-radius: 10px; background: #f0f3ee; }
.unit-result .profit { color: #145d3b; background: #dff1e6; }
.unit-result span, .unit-result small { display: block; color: #6e786f; font-size: 10px; }
.unit-result strong { display: block; margin: 5px 0 2px; font-size: 16px; }
.unit-result strong.negative, .unit-profit-cell.negative { color: #a13b36; }
.unit-breakdown { display: grid; gap: 6px; padding: 10px 12px; border-radius: 9px; background: #fafbf9; }
.unit-breakdown div { display: flex; justify-content: space-between; gap: 12px; color: #69736b; font-size: 11px; }
.unit-breakdown strong { color: #424d45; font-weight: 600; }
.unit-table td strong, .unit-table td small, .unit-profit-cell small { display: block; }
.unit-table td small, .unit-profit-cell small { margin-top: 3px; color: #788178; font-size: 10px; font-weight: 400; }
.unit-project-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #dfe5dc; }
.unit-project-summary div { min-width: 0; padding: 10px; border-radius: 9px; background: #f0f3ee; }
.unit-project-summary .profit { color: #145d3b; background: #dff1e6; }
.unit-project-summary span { display: block; margin-bottom: 5px; color: #6e786f; font-size: 10px; }
.unit-project-summary strong { display: block; overflow-wrap: anywhere; font-size: 14px; }
.unit-project-summary strong.negative { color: #a13b36; }
.unit-saved-panel { margin-top: 14px; }
.document-state { display: inline-block; border-radius: 999px; padding: 4px 7px; color: #7b4533; background: #f7e8df; font-size: 10px; white-space: nowrap; }
.document-state.ready { color: #176b45; background: #ddf0e5; }
.document-state a { color: inherit; text-decoration: none; }
.document-month td { color: #3d4c42; background: #f0f5f1; font-size: 12px; font-weight: 700; text-transform: capitalize; }
.month-picker { color: #667067; font-size: 12px; }.month-picker input { display: block; margin-top: 5px; border: 1px solid #d4dbd2; border-radius: 8px; padding: 8px; background: #fff; }
.calendar-panel { overflow: hidden; padding: 0; }
.weekdays, .calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekdays { padding: 10px 0; color: #737d75; font-size: 11px; text-align: center; border-bottom: 1px solid #dfe5dc; }
.calendar-day { min-height: 118px; padding: 8px; border-right: 1px solid #e1e6de; border-bottom: 1px solid #e1e6de; }
.calendar-day:nth-child(7n) { border-right: 0; }.calendar-day.muted { background: #f8f9f7; color: #9ca49d; }.calendar-day.today { background: #eef7f1; }
.day-number { margin-bottom: 6px; font-size: 11px; }
.calendar-event { display: block; width: 100%; margin-top: 4px; padding: 4px 5px; overflow: hidden; border: 0; border-radius: 5px; color: #176b45; background: #def0e5; font-size: 10px; text-align: left; white-space: nowrap; text-overflow: ellipsis; }
.calendar-event.expense { color: #a93c37; background: #f6e2df; }.calendar-event.overdue { color: #934a0d; background: #f9ead8; }.calendar-event.invoice { color: #2d6197; background: #e2ecf7; }
.calendar-event.possible { color: #6b531d; border: 1px dashed #b89a52; background: #fff8dd; }
.table-wrap { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }th, td { padding: 12px 14px; border-bottom: 1px solid #e3e8e0; text-align: left; }th { color: #69736b; font-size: 11px; font-weight: 500; }td.amount { white-space: nowrap; font-weight: 600; }
.status { display: inline-block; border-radius: 999px; padding: 4px 8px; color: #556057; background: #edf0eb; font-size: 10px; }.status.paid { color: #176b45; background: #ddf0e5; }.status.overdue { color: #a13b36; background: #f5e1df; }.status.partial { color: #8a5a08; background: #f8edcf; }
.status.possible { color: #6b531d; border: 1px dashed #c4aa6c; background: #fff8dd; }
.row-action.possible { color: #6b531d; background: #fff3c9; }
.row-actions { display: flex; gap: 6px; }
.row-action.delete { color: #a13b36; background: #f5e1df; }
dialog { width: min(520px, calc(100% - 24px)); max-height: calc(100vh - 30px); overflow-y: auto; padding: 0; border: 0; border-radius: 16px; box-shadow: 0 25px 80px #1820193d; }dialog::backdrop { background: #17201966; }
dialog form { display: grid; gap: 14px; padding: 20px; }.dialog-head { display: flex; justify-content: space-between; gap: 14px; }.dialog-head h2 { margin-bottom: 5px; font-size: 20px; }.close { border: 0; color: #6c766e; background: transparent; font-size: 26px; }
dialog label { display: grid; gap: 6px; color: #5d675f; font-size: 12px; }input, select { width: 100%; border: 1px solid #d5dcd3; border-radius: 8px; padding: 10px; color: #182019; background: #fff; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.type-switch input { position: absolute; opacity: 0; }.type-switch span { display: block; padding: 10px; border: 1px solid #d8ded5; border-radius: 9px; text-align: center; }.type-switch input:checked + span { color: #176b45; border-color: #176b45; background: #e4f2e9; }
.check { display: flex; grid-template-columns: auto 1fr; align-items: center; }.check input { width: auto; }.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }.form-error { min-height: 18px; color: #a73531; font-size: 12px; }.payment-actions { display: grid; gap: 8px; }
.form-section-title { padding-top: 4px; color: #3f4b42; font-weight: 700; }
.setup-steps { display: grid; gap: 8px; padding: 12px; border-radius: 9px; color: #59645b; background: #f2f5f0; font-size: 12px; }.setup-steps a { color: #176b45; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; max-width: 320px; padding: 11px 14px; border-radius: 9px; color: #fff; background: #182019; box-shadow: 0 8px 25px #18201933; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; }.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 900px) { .app-shell { grid-template-columns: 1fr; }.sidebar { display: none; }.mobile-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }.metrics { grid-template-columns: repeat(2, 1fr); }.overview-grid, .unit-layout { grid-template-columns: 1fr; }.unit-calculator { position: static; }main { padding: 18px; } }
@media (max-width: 560px) { main { padding: 12px; }.brand span:last-child { font-size: 10px; }.mobile-header button { border: 0; border-radius: 8px; padding: 8px; }.horizon, .filters { width: 100%; overflow-x: auto; }.horizon button, .filters button { flex: 1; white-space: nowrap; padding: 8px; }.metrics { gap: 8px; }.account-summary { grid-template-columns: 1fr 1fr; }.metrics article { padding: 11px; }.metrics strong { font-size: 16px; }.calendar-day { min-height: 70px; padding: 4px; }.calendar-event { height: 7px; padding: 0; font-size: 0; }.two-cols, .rate-grid, .unit-result { grid-template-columns: 1fr; }.unit-project-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }.unit-project-summary .profit { grid-column: 1 / -1; }.page-head { align-items: stretch; flex-direction: column; }.page-actions { justify-content: stretch; }.page-actions > * { flex: 1 1 auto; }.client-search { width: 100%; }.cash-gap-item { grid-template-columns: 1fr; }th:nth-child(3), td:nth-child(3) { display: none; } }
