:root{color:#211f1c;background:#f7f3ea;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;--tg-viewport-height: 100dvh;--tg-safe-area-top: env(safe-area-inset-top, 0px);--tg-safe-area-right: env(safe-area-inset-right, 0px);--tg-safe-area-bottom: env(safe-area-inset-bottom, 0px);--tg-safe-area-left: env(safe-area-inset-left, 0px);--tg-content-safe-area-top: 0px;--tg-content-safe-area-right: 0px;--tg-content-safe-area-bottom: 0px;--tg-content-safe-area-left: 0px}*{box-sizing:border-box}html,body,#root{min-height:100%;margin:0}body{min-width:320px;background:linear-gradient(180deg,#f7f3eaeb,#ecf1eef5),#f7f3ea}button,input,select,textarea{font:inherit}button{-webkit-tap-highlight-color:transparent}.app-shell{min-height:var(--tg-viewport-height);padding:calc(12px + var(--tg-safe-area-top)) max(14px,var(--tg-safe-area-right)) calc(88px + var(--tg-safe-area-bottom)) max(14px,var(--tg-safe-area-left))}.app-main{width:min(100%,760px);margin:0 auto}.page-layout{display:flex;flex-direction:column;gap:18px}.page-header{display:flex;align-items:flex-end;justify-content:space-between;min-height:74px;gap:16px}.page-eyebrow{margin:0 0 6px;color:#716a5d;font-size:.85rem;font-weight:700}.page-header h1,.state-screen h1{margin:0;color:#1e1c18;font-size:2rem;line-height:1.05;letter-spacing:0}.page-action{flex:0 0 auto}.page-content{display:flex;flex-direction:column;gap:14px}.summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.metric-card,.panel,.empty-state,.operation-form,.settings-list{border:1px solid rgba(33,31,28,.09);border-radius:8px;background:#ffffffc2;box-shadow:0 10px 24px #342d2114}.metric-card{display:flex;min-height:112px;flex-direction:column;justify-content:space-between;padding:15px}.metric-card-primary{grid-column:1 / -1;min-height:142px;color:#fff;background:#2e5e52}.metric-card span,.metric-card small{color:inherit;opacity:.72;font-size:.86rem;font-weight:700}.metric-card strong{display:block;margin-top:16px;font-size:1.7rem;line-height:1}.metric-card-primary strong{font-size:2.75rem}.panel,.empty-state,.operation-form,.settings-list{padding:16px}.panel h2,.empty-state h2{margin:0 0 8px;font-size:1rem}.panel p,.empty-state p{margin:0;color:#716a5d;line-height:1.45}.panel-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.status-dot{width:13px;height:13px;flex:0 0 auto;border-radius:999px;background:#caa538;box-shadow:0 0 0 6px #caa5381f}.status-dot.ok{background:#2e8f67;box-shadow:0 0 0 6px #2e8f671f}.bottom-navigation{position:fixed;right:max(10px,var(--tg-safe-area-right));bottom:max(10px,var(--tg-safe-area-bottom));left:max(10px,var(--tg-safe-area-left));z-index:10;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;width:min(calc(100% - 20px),760px);min-height:70px;margin:0 auto;padding:7px;border:1px solid rgba(33,31,28,.1);border-radius:8px;background:#ffffffe8;box-shadow:0 18px 34px #27231d2e;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}.nav-button{position:relative;display:flex;min-width:0;min-height:56px;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:0;border-radius:8px;color:#6f6a60;background:transparent;cursor:pointer}.nav-button.is-active{color:#245348;background:#2e5e521a}.nav-button.is-add{color:#fff;background:#2e5e52}.nav-button.is-add.is-active{background:#244d43}.nav-label{max-width:100%;overflow:hidden;font-size:.68rem;font-weight:800;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}.nav-icon{display:grid;width:27px;height:27px;place-items:center}.fallback-notice{display:flex;width:min(100%,760px);margin:0 auto 12px;gap:10px;padding:12px;border:1px solid rgba(125,83,20,.2);border-radius:8px;color:#6f4b16;background:#fff6df}.fallback-notice div{display:flex;min-width:0;flex-direction:column;gap:2px}.fallback-notice strong,.fallback-notice span{font-size:.86rem;line-height:1.25}.state-screen{display:flex;min-height:var(--tg-viewport-height);flex-direction:column;align-items:center;justify-content:center;gap:13px;padding:28px;color:#211f1c;text-align:center}.auth-screen{display:flex;min-height:var(--tg-viewport-height);align-items:center;justify-content:center;padding:calc(24px + var(--tg-safe-area-top)) max(16px,var(--tg-safe-area-right)) calc(24px + var(--tg-safe-area-bottom)) max(16px,var(--tg-safe-area-left))}.auth-panel{display:flex;width:min(100%,520px);flex-direction:column;gap:16px}.auth-panel h1{margin:0;color:#1e1c18;font-size:2rem;line-height:1.08;letter-spacing:0}.auth-panel p{margin:0;color:#716a5d;line-height:1.45}.state-screen p{max-width:320px;margin:0;color:#716a5d;line-height:1.45}.state-icon{color:#2e5e52}.is-spinning{animation:spin 1s linear infinite}.primary-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 18px;border:0;border-radius:8px;color:#fff;background:#2e5e52;font-weight:800;cursor:pointer}.icon-button{display:inline-grid;width:46px;height:46px;place-items:center;border:0;border-radius:8px;color:#fff;background:#2e5e52;cursor:pointer}.secondary-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 16px;border:1px solid rgba(33,31,28,.13);border-radius:8px;color:#245348;background:#fff;font-weight:800;cursor:pointer}.danger-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 16px;border:0;border-radius:8px;color:#fff;background:#a13d2d;font-weight:800;cursor:pointer}.primary-button:disabled,.secondary-button:disabled,.danger-button:disabled,.category-grid button:disabled,.field input:disabled{cursor:not-allowed;opacity:.58}.operation-form{display:flex;flex-direction:column;gap:14px}.segmented-control{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;border-radius:8px;background:#ece7dc}.segmented-control button,.category-grid button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;border:0;border-radius:7px;color:#454039;background:transparent;font-weight:800}.segmented-control .is-selected{color:#fff;background:#2e5e52}.field{display:flex;flex-direction:column;gap:8px}.field span{color:#716a5d;font-size:.86rem;font-weight:800}.field input,.field select,.field textarea{width:100%;min-height:62px;border:1px solid rgba(33,31,28,.11);border-radius:8px;padding:0 14px;color:#211f1c;background:#fff;font-size:1.8rem;font-weight:800}.field select,.field textarea,.compact-field input{min-height:48px;font-size:1rem;font-weight:700}.field textarea{min-height:96px;padding:13px 14px;resize:vertical}.auth-panel .field input,.copy-box input{min-height:50px;font-size:1rem;font-weight:700}.form-error{margin:0;color:#a13d2d;font-weight:700;line-height:1.35}.invite-panel{display:flex;flex-direction:column;gap:14px}.invite-actions,.copy-box,.member-list{display:flex;flex-direction:column;gap:10px}.copy-box input{width:100%;border:1px solid rgba(33,31,28,.11);border-radius:8px;padding:0 12px;color:#211f1c;background:#fff}.copy-box small{color:#716a5d}.button-row{display:flex;flex-wrap:wrap;gap:10px}.state-inline{display:flex;align-items:flex-start;gap:10px;padding:12px;border-radius:8px}.state-inline p,.state-inline strong{margin:0;line-height:1.35}.state-inline.warning{color:#6f4b16;background:#fff6df}.state-inline.success{color:#245348;background:#2e5e521a}.state-inline.neutral{color:#454039;background:#f1eee6}.category-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.category-grid button{background:#f1eee6}.category-grid button.is-selected{color:#1e1c18;background:#2e5e5226;box-shadow:inset 0 0 0 2px #2e5e52}.category-dot,.transaction-icon{display:inline-grid;width:30px;height:30px;flex:0 0 auto;place-items:center;border-radius:8px;color:#fff;font-size:1rem}.form-section,.transaction-groups,.transaction-list{display:flex;flex-direction:column;gap:10px}.section-title{display:flex;align-items:center;justify-content:space-between;color:#716a5d;font-size:.86rem;font-weight:800}.section-title h2{margin:0;color:#1e1c18;font-size:1rem}.form-submit{width:100%}.filters-panel{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:14px;border:1px solid rgba(33,31,28,.09);border-radius:8px;background:#ffffffc2}.filters-panel .field:nth-child(3),.filters-panel .field:nth-child(4){grid-column:1 / -1}.transaction-group{display:flex;flex-direction:column;gap:8px}.transaction-group h2{margin:6px 2px 0;color:#716a5d;font-size:.9rem;text-transform:capitalize}.transaction-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;padding:12px;border:1px solid rgba(33,31,28,.09);border-radius:8px;background:#ffffffd1}.transaction-main,.transaction-side{display:flex;min-width:0;flex-direction:column;gap:4px}.transaction-main strong,.transaction-main span,.transaction-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.transaction-main span,.transaction-main small{color:#716a5d;font-size:.82rem}.transaction-side{align-items:flex-end}.money-expense{color:#a13d2d}.money-income{color:#2e8f67}.icon-actions{display:flex;gap:4px}.icon-actions button,.modal-header button{display:inline-grid;width:34px;height:34px;place-items:center;border:0;border-radius:8px;color:#6f6a60;background:#f1eee6;cursor:pointer}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;display:flex;align-items:flex-end;justify-content:center;padding:calc(20px + var(--tg-safe-area-top)) max(12px,var(--tg-safe-area-right)) calc(96px + var(--tg-safe-area-bottom)) max(12px,var(--tg-safe-area-left));background:#211f1c52}.modal-panel{width:min(100%,560px);max-height:calc(var(--tg-viewport-height) - 40px);overflow:auto;border-radius:8px;background:#fff;box-shadow:0 22px 52px #211f1c42}.compact-modal{display:flex;flex-direction:column;gap:14px;padding:16px}.compact-modal p{margin:0;color:#716a5d}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 16px 0}.modal-header h2{margin:0;font-size:1.2rem}.flat-form{border:0;box-shadow:none}.progress-list,.settings-list{display:flex;flex-direction:column;gap:12px}.progress-row{display:grid;grid-template-columns:minmax(72px,1fr) 1.2fr minmax(42px,auto);align-items:center;gap:10px;color:#454039;font-size:.9rem}.progress-track{height:8px;overflow:hidden;border-radius:999px;background:#e6e1d6}.progress-track span{display:block;height:100%;border-radius:inherit;background:#2e5e52}.month-switcher{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:8px;padding:8px;border:1px solid rgba(33,31,28,.09);border-radius:8px;background:#ffffffc2}.month-switcher button{display:inline-grid;width:44px;height:44px;place-items:center;border:0;border-radius:8px;color:#245348;background:#f1eee6;cursor:pointer}.month-switcher div{display:inline-flex;min-width:0;align-items:center;justify-content:center;gap:8px;color:#454039;text-transform:capitalize}.month-switcher strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-summary .metric-card{min-height:104px}.dashboard-summary .metric-card-primary{min-height:134px}.dashboard-limit{display:flex;flex-direction:column;gap:12px}.dashboard-limit strong{color:#245348}.dashboard-limit.is-warning strong,.dashboard-limit.is-warning .dashboard-limit-side span{color:#8a6417}.dashboard-limit.is-exceeded strong,.dashboard-limit.is-exceeded .dashboard-limit-side span{color:#a13d2d}.dashboard-limit.is-warning .progress-track span{background:#caa538}.dashboard-limit.is-exceeded .progress-track span{background:#a13d2d}.dashboard-limit .secondary-button{width:100%}.dashboard-limit-side{display:flex;flex:0 0 auto;flex-direction:column;align-items:flex-end;gap:3px;text-align:right}.dashboard-limit-side span{color:#716a5d;font-size:.78rem;font-weight:800}.compact-section{display:flex;flex-direction:column;gap:12px}.dashboard-list{display:flex;flex-direction:column;gap:8px}.dashboard-list-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid rgba(33,31,28,.08)}.dashboard-list-item:last-child{padding-bottom:0;border-bottom:0}.dashboard-list-item>strong{white-space:nowrap}.dashboard-transaction-side{display:flex;min-width:0;flex-direction:column;align-items:flex-end;gap:4px}.dashboard-transaction-side span{display:inline-flex;align-items:center;gap:4px;color:#716a5d;font-size:.78rem;font-weight:800}.dashboard-transaction-side strong{white-space:nowrap}.dashboard-empty-inline{display:flex;flex-direction:column;gap:12px}.analytics-date-field{padding:14px;border:1px solid rgba(33,31,28,.09);border-radius:8px;background:#ffffffc2}.analytics-total-card{min-height:132px}.analytics-total-card small{margin-top:10px}.analytics-list{display:flex;flex-direction:column;gap:8px}.analytics-category-item{display:grid;width:100%;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:12px 0;border:0;border-bottom:1px solid rgba(33,31,28,.08);color:inherit;background:transparent;text-align:left;cursor:pointer}.analytics-category-item:last-child{padding-bottom:0;border-bottom:0}.analytics-category-main,.analytics-category-side{display:flex;min-width:0;flex-direction:column;gap:4px}.analytics-category-main strong,.analytics-category-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.analytics-category-main small,.analytics-category-side small,.analytics-category-side em{color:#716a5d;font-size:.8rem;font-style:normal;font-weight:700}.analytics-category-main .progress-track{width:100%;margin-top:4px}.analytics-category-side{align-items:flex-end;text-align:right}.analytics-category-side strong{white-space:nowrap}.analytics-category-side .delta-up{color:#6f4b16}.analytics-category-side .delta-down{color:#2e8f67}.analytics-detail-head{display:flex;flex-direction:column;gap:14px}.analytics-detail-head strong{color:#a13d2d;font-size:2rem;line-height:1}.settings-list div{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:12px;border-bottom:1px solid rgba(33,31,28,.08)}.settings-list div:last-child{padding-bottom:0;border-bottom:0}.settings-list span{color:#716a5d}.settings-action-panel{display:flex;align-items:center;justify-content:space-between;gap:14px}.settings-action-panel div{min-width:0}.settings-action-panel .secondary-button{flex:0 0 auto}.member-count{display:inline-flex;min-width:52px;min-height:34px;align-items:center;justify-content:center;border-radius:8px;color:#245348;background:#2e5e521a}.member-item{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid rgba(33,31,28,.08)}.member-item:last-child{border-bottom:0}.member-item div{display:flex;min-width:0;flex-direction:column;gap:3px}.member-item strong,.member-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.member-item span,.member-item small{color:#716a5d}.limit-overview,.limit-category-item{display:flex;flex-direction:column;gap:12px}.limit-card-header,.limit-category-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px}.limit-category-head{grid-template-columns:auto minmax(0,1fr) auto;align-items:center}.limit-card-header p,.limit-category-head small{margin:4px 0 0;color:#716a5d}.limit-category-head strong,.limit-category-head small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.limit-status{display:inline-flex;min-height:30px;align-items:center;justify-content:center;border-radius:8px;padding:0 10px;font-size:.78rem;font-weight:800;white-space:nowrap}.limit-status-none{color:#6f6a60;background:#f1eee6}.limit-status-ok{color:#245348;background:#2e8f6721}.limit-status-warning{color:#7d5714;background:#fff1c5}.limit-status-exceeded{color:#8f2f23;background:#ffe4dd}.limit-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.limit-facts span{min-width:0;border-radius:8px;padding:10px;background:#f7f3ea}.limit-facts small,.limit-facts strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.limit-facts small{color:#716a5d;font-size:.76rem;font-weight:800}.limit-facts strong{margin-top:4px;color:#1e1c18;font-size:.95rem}.limit-progress-ok span{background:#2e8f67}.limit-progress-warning span{background:#caa538}.limit-progress-exceeded span{background:#a13d2d}.limit-progress-none span{background:#9a9488}.limits-category-list{display:flex;flex-direction:column;gap:10px}.limit-category-item{padding:12px;border:1px solid rgba(33,31,28,.09);border-radius:8px;background:#ffffffb8}.limit-category-item.limit-card-warning{border-color:#caa53857}.limit-category-item.limit-card-exceeded{border-color:#a13d2d52}.limit-category-item .button-row{display:grid;grid-template-columns:1fr 1fr}.limit-category-item .secondary-button,.limit-category-item .danger-button{min-width:0;padding:0 10px}.empty-inline p{margin:0;color:#716a5d}@keyframes spin{to{transform:rotate(360deg)}}@media(min-width:640px){.app-shell{padding-top:calc(24px + var(--tg-safe-area-top))}.summary-grid{grid-template-columns:1.2fr .9fr .9fr}.metric-card-primary{grid-column:auto}.category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.filters-panel{grid-template-columns:repeat(4,minmax(0,1fr))}.filters-panel .field:nth-child(3),.filters-panel .field:nth-child(4){grid-column:auto}.modal-backdrop{align-items:center}.limit-facts{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:420px){.settings-action-panel{align-items:stretch;flex-direction:column}.settings-action-panel .secondary-button{width:100%}.limit-card-header,.limit-category-head{grid-template-columns:auto minmax(0,1fr)}.limit-card-header .limit-status{grid-column:1 / -1;justify-self:start}.limit-category-head .limit-status{grid-column:1 / -1;justify-self:start;margin-left:40px}.limit-category-item .button-row{grid-template-columns:1fr}}
