:root{--tg-theme-bg-color: #ffffff;--tg-theme-text-color: #000000;--tg-theme-hint-color: #999999;--tg-theme-link-color: #2481cc;--tg-theme-button-color: #2481cc;--tg-theme-button-text-color: #ffffff;--tg-theme-secondary-bg-color: #f4f4f5;--income: #22c55e;--expense: #ef4444;--radius: 12px;--shadow: 0 2px 8px rgba(0,0,0,.08)}@media(prefers-color-scheme:dark){:root{--tg-theme-bg-color: #18222d;--tg-theme-text-color: #ffffff;--tg-theme-hint-color: #8e8e93;--tg-theme-secondary-bg-color: #2c2c2e}}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--tg-theme-bg-color);color:var(--tg-theme-text-color);min-height:100vh;-webkit-font-smoothing:antialiased}.error-boundary{padding:24px;text-align:center;min-height:60vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px}.error-boundary-title{font-size:1.25rem;margin:0}.error-boundary-message{margin:0;color:var(--tg-theme-hint-color);font-size:.9rem}.page-loading{padding:24px;text-align:center;color:var(--tg-theme-text-color);font-size:1rem}.page-skeleton{padding:16px 4px}.skeleton-line,.skeleton-tile{background:linear-gradient(90deg,#8080801f 25%,#80808038,#8080801f 75%);background-size:200% 100%;animation:skeleton-shimmer 1.2s ease-in-out infinite;border-radius:10px}.skeleton-line{height:20px;margin-bottom:10px}.skeleton-line.wide{width:75%}.skeleton-line.medium{width:50%}.skeleton-grid{margin-top:14px;display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.skeleton-tile{height:92px;border-radius:14px}@keyframes skeleton-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}#root{min-height:100vh;padding-bottom:env(safe-area-inset-bottom,0)}button{font:inherit;cursor:pointer;border:none;background:none}input,select{font:inherit}a{color:var(--tg-theme-link-color)}.app{max-width:480px;margin:0 auto;padding:12px 12px 24px}.page-title{font-size:1.25rem;font-weight:600;margin:0 0 16px;padding:0 4px}.card{background:var(--tg-theme-secondary-bg-color);border-radius:var(--radius);padding:16px;margin-bottom:12px;box-shadow:var(--shadow)}.btn{display:inline-flex;align-items:center;justify-content:center;padding:12px 20px;border-radius:var(--radius);font-weight:600;transition:opacity .2s}.btn:active{opacity:.85}.btn-primary{background:var(--tg-theme-button-color);color:var(--tg-theme-button-text-color);width:100%}.btn-ghost{background:transparent;color:var(--tg-theme-link-color)}.btn-danger{background:#dc2626;color:#fff}.input-group{margin-bottom:12px}.input-group label{display:block;font-size:.875rem;color:var(--tg-theme-hint-color);margin-bottom:4px}.input-group input,.input-group select{width:100%;padding:12px;border-radius:8px;border:1px solid var(--tg-theme-hint-color);background:var(--tg-theme-bg-color);color:var(--tg-theme-text-color)}.amount-expense{color:var(--expense)}.amount-income{color:var(--income)}.nav-tabs{display:flex;gap:4px;margin-bottom:16px;background:var(--tg-theme-secondary-bg-color);padding:4px;border-radius:var(--radius)}.nav-tabs button{flex:1;padding:10px;border-radius:8px;font-weight:500;color:var(--tg-theme-hint-color)}.nav-tabs button.active{background:var(--tg-theme-bg-color);color:var(--tg-theme-text-color);box-shadow:var(--shadow)}.list-item{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid rgba(0,0,0,.06)}.list-item:last-child{border-bottom:none}.empty-state{text-align:center;padding:32px 16px;color:var(--tg-theme-hint-color);font-size:.95rem}.bottom-nav{position:fixed;bottom:0;left:0;right:0;max-width:480px;margin:0 auto;display:flex;background:var(--tg-theme-secondary-bg-color);padding:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom,0));box-shadow:0 -2px 10px #00000014;z-index:100}.nav-link{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 4px;text-decoration:none;color:var(--tg-theme-hint-color);font-size:.75rem;border-radius:8px;transition:background .2s,color .2s}.app-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 4px 16px}.app-header-text{display:flex;flex-direction:column;gap:2px}.app-header-text strong{font-size:1rem}.app-header-text span{color:var(--tg-theme-hint-color);font-size:.8rem}.account-link{text-decoration:none;font-weight:600}.auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px}.auth-card{width:100%}.auth-title{padding:0;margin-bottom:8px}.auth-subtitle{margin:0 0 16px;color:var(--tg-theme-hint-color);line-height:1.45}.auth-tabs{margin-bottom:20px}.auth-error,.auth-success,.account-note{margin:12px 4px;font-size:.9rem}.auth-error{color:#dc2626}.auth-success{color:#16a34a}.section-title{margin:0 0 12px;font-size:1rem}.account-row{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid rgba(0,0,0,.06)}.account-row:last-child{border-bottom:none}.account-row span{color:var(--tg-theme-hint-color)}.account-household-list{display:flex;flex-direction:column;gap:12px}.account-household{border:1px solid rgba(0,0,0,.08);border-radius:12px;padding:12px;background:color-mix(in srgb,var(--tg-theme-secondary-bg-color) 70%,var(--tg-theme-bg-color))}.account-household.active{border-color:#2481cc73;background:#2481cc14}.account-household-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.account-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}.account-badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:#00000014;color:var(--tg-theme-hint-color);font-size:.78rem;font-weight:600}.account-badge.primary{background:#2481cc29;color:var(--tg-theme-button-color)}.account-meta{color:var(--tg-theme-hint-color);font-size:.84rem;line-height:1.4}.account-actions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}.account-owner-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-bottom:12px}.account-owner-toolbar .btn,.account-modal-actions{width:auto}.account-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.account-modal-actions .btn{width:auto}.account-inline-note{margin:0 0 12px;font-size:.85rem;color:var(--tg-theme-hint-color);line-height:1.45;word-break:break-word}.account-member-list{display:flex;flex-direction:column;gap:8px}.account-member-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid rgba(0,0,0,.06)}.account-member-item:last-child{border-bottom:none}.account-member-item div,.account-member-item strong,.account-member-item span{min-width:0}.account-member-item div{display:flex;flex-direction:column;gap:2px}.account-member-item span{color:var(--tg-theme-hint-color);font-size:.84rem;line-height:1.35}.account-logout{width:100%;margin-bottom:80px}.nav-link.active{color:var(--tg-theme-button-color);background:#2481cc1f}.nav-icon{font-size:1.25rem}.app main{padding-bottom:80px}.balance-card .balance-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0}.balance-card .balance-row.secondary{font-size:.9rem;color:var(--tg-theme-hint-color)}.balance-card .balance-row strong{font-size:1.5rem}.list-item-icon{margin-right:8px}.list-item-note{font-size:.85rem;color:var(--tg-theme-hint-color)}.list-item-date{font-size:.8rem;color:var(--tg-theme-hint-color)}.list-item-right{display:flex;align-items:center;gap:8px}.btn-ghost.small{padding:4px 8px;font-size:.85rem}.btn-ghost.small.danger{color:#dc2626}.section-label{margin:0 0 8px;font-size:.9rem;color:var(--tg-theme-hint-color)}.categories-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.categories-toolbar .section-label{margin:0}.category-row{display:flex;align-items:center;gap:8px}.category-row.edit-mode{justify-content:flex-start}.category-drag-handle{cursor:grab;padding:4px 6px;color:var(--tg-theme-hint-color);-webkit-user-select:none;user-select:none}.category-drag-handle:active{cursor:grabbing}.category-row-name{flex:1;min-width:0}.category-delete-btn{background:none;border:none;color:var(--tg-theme-hint-color);font-size:.9rem;padding:4px 8px;cursor:pointer}.category-delete-btn:hover{color:var(--expense, #dc3545)}.category-row.dragging{opacity:.6}.list-item.edit-mode{justify-content:flex-start}.category-edit{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px 0}.icon-input{width:3rem;padding:8px;border-radius:8px;border:1px solid var(--tg-theme-hint-color);background:var(--tg-theme-bg-color);color:var(--tg-theme-text-color)}.name-input{flex:1;min-width:100px;padding:8px;border-radius:8px;border:1px solid var(--tg-theme-hint-color);background:var(--tg-theme-bg-color);color:var(--tg-theme-text-color)}.btn.small{padding:8px 12px;font-size:.9rem}.icon-picker{display:flex;flex-wrap:wrap;gap:6px}.icon-picker button{width:40px;height:40px;border-radius:8px;font-size:1.2rem;border:1px solid var(--tg-theme-hint-color);background:var(--tg-theme-bg-color)}.icon-picker button.active{border-color:var(--tg-theme-button-color);background:#2481cc26}.icon-picker-block{display:flex;flex-direction:column;gap:8px;align-items:flex-start}.icon-picker-toggle{align-self:stretch;text-align:center;margin-top:2px}.icon-picker-rest{margin-top:4px;max-height:200px;overflow-y:auto;padding:4px 0;-webkit-overflow-scrolling:touch}.icon-picker-current-hint{margin:0;font-size:.8rem;color:var(--tg-theme-hint-color)}.category-tile-wrap{position:relative}.category-tile-wrap .category-tile{width:100%}.category-tile-edit-btn{position:absolute;top:6px;right:6px;width:30px;height:30px;border-radius:10px;border:1px solid rgba(0,0,0,.08);background:var(--tg-theme-secondary-bg-color);color:var(--tg-theme-text-color);font-size:.95rem;line-height:1;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:3;box-shadow:0 1px 4px #0000001f}.category-tile-edit-btn:active{opacity:.88}.empty-state.small{padding:16px;font-size:.9rem}.btn-outline{background:transparent;border:2px solid var(--tg-theme-button-color);color:var(--tg-theme-button-color)}.home-actions{display:flex;flex-direction:column;gap:10px;margin-top:16px}.home-actions .btn{text-align:center}.screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.home-categories{padding-bottom:24px}.home-header{padding:16px 0;border-bottom:1px solid rgba(0,0,0,.06)}.home-header-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.home-header-top-right{display:flex;align-items:center;gap:6px;flex-shrink:0}.home-header-title{font-size:1rem;color:var(--tg-theme-hint-color)}.budget-limits-icon-btn{flex-shrink:0;width:36px;height:36px;padding:0;border-radius:50%;border:none;background:var(--tg-theme-secondary-bg-color);color:var(--tg-theme-hint-color);font-size:1rem;line-height:1;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:color .15s,background .15s}.budget-limits-icon-btn:hover{color:var(--tg-theme-link-color);background:#2481cc1a}.budget-limits-icon-btn:active{opacity:.88}.budget-edit-mode-btn.active{color:var(--tg-theme-link-color);background:#2481cc29}.page-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px;padding:0 4px}.page-title-row__title{margin:0;flex:1;min-width:0}.home-header-budget{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.budget-pill{min-width:0;padding:8px 10px;border-radius:14px;background:var(--tg-theme-secondary-bg-color);text-align:left;border:1px solid rgba(255,255,255,.05)}.budget-pill-editable{cursor:pointer;transition:transform .15s ease,border-color .15s ease}.budget-pill-editable:active{transform:scale(.98)}.budget-pill-label{display:block;font-size:.74rem;color:var(--tg-theme-hint-color);margin-bottom:4px;letter-spacing:.01em}.budget-pill-value{display:block;font-size:1.25rem;font-weight:700;line-height:1.05}.month-switch-inline{display:inline-flex;align-items:center;gap:6px}.month-switch-inline .month-selector{width:32px;height:32px;font-size:1.05rem}.month-switch-inline .month-label{margin:0;font-size:.9rem;color:var(--tg-theme-hint-color);font-weight:600;white-space:nowrap}.budget-progress-wrap{margin-top:10px;width:100%;height:7px;background:#ffffff14;border-radius:999px;overflow:hidden}.budget-progress{height:100%;background:var(--tg-theme-button-color);border-radius:999px;transition:width .2s ease-out}.budget-progress.over{background:var(--expense)}.budget-status-row{display:flex;align-items:center;gap:8px}.budget-status-text{flex:1;min-width:0;text-align:left}.budget-type-tabs{display:flex;gap:6px;margin-bottom:8px}.budget-type-tabs button{flex:1;padding:6px 8px;border-radius:999px;font-size:.8rem;background:var(--tg-theme-secondary-bg-color);color:var(--tg-theme-hint-color)}.budget-type-tabs button.active{background:var(--tg-theme-button-color);color:var(--tg-theme-button-text-color)}.named-budget-header{margin-top:4px;display:flex;align-items:center;gap:8px}.named-budget-overview{margin-top:12px}.named-budget-plan-row{margin-top:10px}.named-budget-info{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.named-budget-name{font-size:.9rem;font-weight:600}.named-budget-dates{font-size:.8rem;color:var(--tg-theme-hint-color)}.named-budget-select-btn{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 10px;border-radius:10px;border:1px solid rgba(0,0,0,.1);background:var(--tg-theme-secondary-bg-color);color:var(--tg-theme-text-color);cursor:pointer;text-align:left;font:inherit}.named-budget-select-name{font-size:.9rem;font-weight:600;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.named-budget-select-dates{font-size:.78rem;color:var(--tg-theme-hint-color)}.named-budget-select-btn:active{opacity:.92}.named-budget-add{background:none;border:none;color:var(--tg-theme-link-color);font-size:1.1rem;padding:4px 6px;cursor:pointer}.named-budget-add:hover{color:var(--tg-theme-button-color)}.named-budget-edit{background:none;border:none;color:var(--tg-theme-link-color);font-size:1rem;padding:4px 6px;cursor:pointer;line-height:1}.named-budget-edit:hover{color:var(--tg-theme-button-color)}.named-budget-delete{background:none;border:none;color:var(--tg-theme-hint-color);font-size:.9rem;padding:4px 6px;cursor:pointer}.named-budget-delete:hover{color:var(--expense)}.budget-confirm-modal .premium-modal-text strong{font-weight:600}.budget-edit-modal .input-group{margin-bottom:0}.budget-edit-modal .input-group+.input-group{margin-top:10px}.budget-limits-page{padding:4px 0 28px;max-width:480px;margin:0 auto}.budget-limits-topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:8px 4px 14px}.budget-limits-topbar-text{min-width:0;flex:1}.budget-limits-topbar-title{margin:0;font-size:1.15rem;font-weight:600;line-height:1.25}.budget-limits-topbar-sub{margin:4px 0 0;font-size:.88rem;color:var(--tg-theme-hint-color)}.budget-limits-x{flex-shrink:0;width:40px;height:40px;border-radius:50%;border:none;background:var(--tg-theme-secondary-bg-color);color:var(--tg-theme-hint-color);font-size:1.2rem;line-height:1;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:color .15s,background .15s}.budget-limits-x:hover{color:var(--tg-theme-text-color);background:#0000000f}.budget-limits-progress-card{margin-bottom:12px}.budget-limits-progress-meta{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;font-size:.85rem;margin-bottom:10px}.budget-limits-progress-meta-sep{color:var(--tg-theme-hint-color)}.budget-limits-progress-meta-pct{color:var(--tg-theme-hint-color);font-size:.8rem}.budget-limits-alloc-wrap{margin-top:0}.budget-limits-over-hint{margin:8px 0 0;font-size:.8rem;color:#ff3b30}.budget-limits-remainder{margin:0 0 10px;font-size:.88rem;color:var(--tg-theme-hint-color);line-height:1.35}.budget-limits-remainder strong{color:var(--tg-theme-text-color);font-weight:600}.budget-limits-hint{margin:0 4px 10px;padding:0 4px}.budget-limits-cat-list{--budget-cat-icon-col: 32px;--budget-cat-input-col: 96px;--budget-cat-pct-col: 3.4rem;--budget-cat-col-gap: 10px;list-style:none;margin:0 0 10px;padding:0 clamp(14px,5vw,28px);background:var(--tg-theme-secondary-bg-color);border-radius:var(--radius);box-shadow:var(--shadow)}.budget-limits-cat-list .budget-cat-settings-row:last-child{border-bottom:none}.budget-limits-save-bar{display:flex;justify-content:center;padding:0 clamp(12px,4vw,24px) 12px;margin:8px 0 18px}.budget-limits-save-btn{width:min(100%,320px)}.budget-limits-total-block{margin:0 4px 16px;padding:0 8px}.budget-limits-copy-section{margin-bottom:12px}.budget-limits-copy-heading{margin:0 0 4px;font-size:.95rem;font-weight:600}.budget-limits-copy-desc{margin:0 0 10px;font-size:.8rem;color:var(--tg-theme-hint-color)}.budget-limits-source-list{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-direction:column;gap:6px}.budget-limits-source-item{width:100%;text-align:left;padding:12px 14px;border-radius:12px;border:1px solid rgba(0,0,0,.08);background:var(--tg-theme-bg-color);color:var(--tg-theme-text-color);font:inherit;cursor:pointer;display:flex;flex-direction:column;align-items:flex-start;gap:4px}.budget-limits-source-item.active{border-color:var(--tg-theme-link-color);background:#2481cc1f}.budget-limits-source-item-name{font-weight:600;font-size:.9rem}.budget-limits-source-item-dates{font-size:.78rem;color:var(--tg-theme-hint-color)}.budget-limits-copy-actions{display:flex;justify-content:flex-start}.budget-limits-copy-btn-compact{padding:10px 22px;min-width:auto;width:auto}.budget-limits-page-spacer{height:12px}.budget-limits-error{padding:16px 8px;color:var(--expense)}.budget-cat-settings-hint{margin:0 0 10px;font-size:.85rem;color:var(--tg-theme-hint-color);line-height:1.35}.budget-cat-settings-list{list-style:none;margin:0;padding:0}.budget-cat-settings-row{display:grid;grid-template-columns:var(--budget-cat-icon-col) minmax(0,1fr) var(--budget-cat-input-col) var(--budget-cat-pct-col);column-gap:var(--budget-cat-col-gap);align-items:center;padding:3px 0;border-bottom:1px solid rgba(0,0,0,.06)}.budget-cat-settings-icon{font-size:1.1rem;text-align:center;line-height:1;justify-self:center}.budget-cat-settings-name{min-width:0;font-size:.88rem;font-weight:500;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.budget-cat-settings-input-wrap{display:contents}.budget-cat-settings-input{box-sizing:border-box;grid-column:3;width:100%;min-width:0;min-height:34px;padding:5px 8px;border-radius:10px;border:1px solid rgba(0,0,0,.12);background:var(--tg-theme-bg-color);color:var(--tg-theme-text-color);text-align:center;font-size:.88rem;line-height:1.25;justify-self:start}.budget-cat-settings-pct{grid-column:4;font-size:.7rem;color:var(--tg-theme-hint-color);white-space:nowrap;line-height:1.2;text-align:right;justify-self:start;align-self:center;padding-left:6px}.budget-cat-settings-row--add{display:flex;justify-content:flex-start;align-items:center;padding:10px 0 8px 4px;border-bottom:none}.budget-cat-settings-add-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin:0;padding:10px 18px;border-radius:12px;border:1px dashed color-mix(in srgb,var(--tg-theme-hint-color) 55%,transparent);background:color-mix(in srgb,var(--tg-theme-secondary-bg-color) 65%,var(--tg-theme-bg-color));color:var(--tg-theme-text-color);font:inherit;font-size:.88rem;font-weight:500;cursor:pointer;transition:background .15s,border-color .15s}.budget-cat-settings-add-btn:hover{border-color:var(--tg-theme-link-color);background:#2481cc14}.budget-cat-settings-add-btn:active{opacity:.92}.budget-cat-settings-add-btn:disabled{opacity:.5;cursor:not-allowed}.budget-cat-settings-add-icon{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:var(--tg-theme-hint-color);opacity:.35;font-size:1.1rem;line-height:1;font-weight:300}.budget-cat-settings-total{margin-top:12px;padding-top:10px;border-top:1px solid rgba(0,0,0,.08);font-size:.9rem}.budget-cat-settings-total-pct{color:var(--tg-theme-hint-color);font-weight:400}.budget-picker-card{padding-top:4px}.budget-picker-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:8px;padding-bottom:8px;border-bottom:1px solid rgba(0,0,0,.06)}.budget-picker-back{flex-shrink:0;padding-left:0!important;padding-right:8px!important}.budget-picker-heading{flex:1;text-align:center;font-weight:600;font-size:.95rem;min-width:0}.budget-picker-add{flex-shrink:0}.budget-picker-list{list-style:none;margin:0;padding:0}.budget-picker-item{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;padding:12px 4px;border:none;border-bottom:1px solid rgba(0,0,0,.06);background:transparent;color:var(--tg-theme-text-color);font:inherit;text-align:left;cursor:pointer;border-radius:8px}.budget-picker-list li:last-child .budget-picker-item{border-bottom:none}.budget-picker-item.active{background:#2481cc1f}.budget-picker-item-name{font-weight:600;font-size:.95rem}.budget-picker-item-dates{font-size:.8rem;color:var(--tg-theme-hint-color)}.month-selector{background:var(--tg-theme-secondary-bg-color);border:none;width:36px;height:36px;border-radius:50%;font-size:1.2rem;color:var(--tg-theme-text-color);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.month-selector:disabled{opacity:.5;cursor:not-allowed}.month-selector+.month-label{margin-left:8px}.month-label{font-size:.95rem;font-weight:600;color:var(--tg-theme-hint-color);margin-right:8px}.categories-grid-section{padding:20px 0}.categories-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.category-tile{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 8px;border-radius:16px;background:var(--tg-theme-secondary-bg-color);text-decoration:none;color:var(--tg-theme-text-color);border:1px solid rgba(0,0,0,.04);transition:transform .15s}button.category-tile{font:inherit;cursor:pointer;width:100%;box-sizing:border-box}.category-tile:active{transform:scale(.98)}@keyframes category-wiggle{0%,to{transform:scale(1) rotate(-.5deg)}50%{transform:scale(1) rotate(.5deg)}}.category-tile-wiggle{animation:category-wiggle .12s ease-in-out infinite;cursor:grab}.category-tile-wiggle:active{cursor:grabbing}.category-tile-dragging{opacity:.7}.category-tile-delete{position:absolute;top:6px;right:6px;width:22px;height:22px;border-radius:50%;background:var(--tg-theme-bg-color);border:1px solid var(--tg-theme-hint-color);color:var(--tg-theme-hint-color);font-size:1rem;line-height:1;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:2;box-shadow:0 1px 3px #0003}.category-tile-delete:hover{color:var(--expense);border-color:var(--expense)}.category-grid-edit-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px;padding:8px 0}.category-grid-edit-hint{font-size:.8rem;color:var(--tg-theme-hint-color)}.category-tile-icon-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center;touch-action:manipulation}.category-tile-ios-minus{position:absolute;top:-5px;left:-5px;width:22px;height:22px;border-radius:50%;border:2px solid var(--tg-theme-bg-color, #fff);background:#ff3b30;color:#fff;font-size:1.05rem;font-weight:600;line-height:1;padding:0;margin:0;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:3;box-shadow:0 1px 4px #00000040}.category-tile-ios-minus:disabled{opacity:.5;cursor:not-allowed}.category-tile-icon{width:48px;height:48px;border-radius:50%;background:var(--tile-color, var(--tg-theme-button-color));opacity:.9;display:flex;align-items:center;justify-content:center;font-size:1.5rem}.category-tile-more .category-tile-icon{background:var(--tg-theme-hint-color);opacity:.3;font-size:1.4rem}.category-tile-name{font-size:.8rem;font-weight:500;text-align:center;line-height:1.2;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:1.92rem}.category-tile-amount{font-size:.95rem;font-weight:600;color:var(--tg-theme-text-color)}.category-tile-amount.over{color:var(--expense)}.category-tile-more .category-tile-amount{color:var(--tg-theme-hint-color);font-weight:500}.category-tile-progress-wrap{width:100%;height:6px;background:#0000001f;border-radius:3px;overflow:hidden;margin-top:6px}.category-tile-progress{height:100%;min-width:2px;background:var(--tg-theme-button-color);border-radius:3px;transition:width .2s ease-out;max-width:100%}.category-tile-progress.over{background:var(--expense)}.category-tile-budget{font-size:.75rem;color:var(--tg-theme-hint-color);margin-top:2px;text-align:center}.category-tile-budget.over{color:var(--expense)}.budget-plan-section{margin-bottom:16px}.budget-plan-header-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.budget-plan-label{display:block;font-size:.9rem;color:var(--tg-theme-hint-color)}.budget-copy-section{margin-bottom:16px}.budget-copy-section .input-group:last-of-type{margin-bottom:8px}.budget-copy-section .btn{width:100%}.budget-plan-row{display:flex;gap:10px;align-items:stretch}.budget-plan-input{flex:1;height:44px;padding:0 12px;border-radius:8px;border:1px solid var(--tg-theme-hint-color);background:var(--tg-theme-bg-color);color:var(--tg-theme-text-color);font-size:1rem;box-sizing:border-box;line-height:44px}.budget-plan-row .budget-plan-btn{flex:0 0 auto;width:auto;min-width:100px;height:44px;padding:0 20px;margin:0;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;font-weight:600;box-sizing:border-box;line-height:1}.budget-plan-hint{font-size:.8rem;color:var(--tg-theme-hint-color);margin:8px 0 0}.expenses-summary-planned{font-size:.85rem;color:var(--tg-theme-hint-color);margin-top:4px}.expenses-summary-card{text-align:center;padding:16px;margin-bottom:16px;background:var(--tg-theme-secondary-bg-color);border-radius:var(--radius)}.expenses-summary-label{font-size:.85rem;color:var(--tg-theme-hint-color);margin-bottom:4px}.expenses-summary-value{font-size:1.5rem;font-weight:700;color:var(--expense)}.section-card{margin-bottom:16px}.section-title{margin:0 0 4px;font-size:1rem;font-weight:600}.section-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.section-link{font-size:.9rem;color:var(--tg-theme-link-color);text-decoration:none}.tx-list{list-style:none;margin:0;padding:0}.tx-item{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid rgba(0,0,0,.06);text-decoration:none;color:inherit}.tx-item:last-child{border-bottom:none}.tx-icon{font-size:1.5rem}.tx-info{flex:1;min-width:0}.tx-cat{display:block;font-weight:500}.tx-date{font-size:.8rem;color:var(--tg-theme-hint-color)}.tx-amount{font-weight:600}.tx-amount.expense{color:var(--expense)}.tx-amount.income{color:var(--income)}.empty-inline{margin:0;font-size:.9rem;color:var(--tg-theme-hint-color)}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}.fund-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000059;display:flex;justify-content:center;align-items:flex-start;padding:16px;z-index:120;overflow-y:auto}.fund-modal{width:100%;max-width:480px;max-height:calc(100vh - 32px)}.fund-modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.fund-modal-close{width:34px;height:34px;border-radius:50%;border:1px solid var(--tg-theme-hint-color);color:var(--tg-theme-hint-color);background:var(--tg-theme-secondary-bg-color);display:inline-flex;align-items:center;justify-content:center;font-size:1rem}.fund-modal-content{max-height:calc(100vh - 120px);overflow-y:auto}.premium-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000059;display:flex;justify-content:center;align-items:center;padding:16px;z-index:130}.premium-modal{width:100%;max-width:420px;margin:0}.premium-modal-text{margin:8px 0;font-size:.95rem}.premium-modal-hint{margin:0 0 12px;font-size:.85rem;color:var(--tg-theme-hint-color)}.add-1money{max-width:400px;margin:0 auto}.add-form{padding:0 4px}.amount-block{display:flex;flex-direction:column;align-items:stretch;justify-content:center;margin-bottom:20px}.amount-input{font-size:2.5rem;font-weight:700;text-align:center;border:none;background:transparent;color:var(--tg-theme-text-color);width:100%;max-width:100%;box-sizing:border-box;letter-spacing:-.02em;direction:ltr}.amount-input::placeholder{color:var(--tg-theme-hint-color);opacity:.7}.amount-currency{font-size:1.5rem;color:var(--tg-theme-hint-color);font-weight:500}.type-toggle{display:flex;gap:8px;margin-bottom:20px;align-items:stretch}.type-toggle-main{display:flex;flex:1;gap:8px;min-width:0}.type-toggle-main button{flex:1;padding:12px;border-radius:var(--radius);font-weight:600;background:var(--tg-theme-secondary-bg-color);color:var(--tg-theme-hint-color)}.type-toggle-main button.active{background:var(--tg-theme-bg-color);box-shadow:var(--shadow)}.type-toggle-main button.active.expense{color:var(--expense)}.type-toggle-main button.active.income{color:var(--income)}.type-toggle-edit{flex:0 0 48px;padding:12px 8px;border-radius:var(--radius);font-weight:600;font-size:1.1rem;background:var(--tg-theme-secondary-bg-color);color:var(--tg-theme-text-color);border:1px solid rgba(255,255,255,.06)}.type-toggle-edit:disabled{opacity:.45}.category-grid-label{font-size:.9rem;color:var(--tg-theme-hint-color);margin-bottom:10px}.category-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:16px}.category-chip{display:flex;flex-direction:column;align-items:center;gap:6px;padding:14px 8px;border-radius:var(--radius);background:var(--tg-theme-secondary-bg-color);border:2px solid transparent;font-size:.85rem;color:var(--tg-theme-text-color)}.category-chip.selected{border-color:var(--tg-theme-button-color);background:#2481cc14}.category-chip-icon{font-size:1.6rem}.category-chip-name{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.link-more{background:none;color:var(--tg-theme-link-color);font-size:.9rem;padding:8px 0;margin-bottom:12px}.add-more{margin-bottom:16px;padding:12px;background:var(--tg-theme-secondary-bg-color);border-radius:var(--radius)}.btn-submit{margin-top:8px}.form-message{margin:12px 0 0;padding:10px 12px;border-radius:var(--radius);font-size:.9rem}.form-message-error{background:#dc354526;color:var(--expense, #dc3545)}.form-message-success{background:#28a74526;color:#28a745}.hint-inline{font-size:.9rem;color:var(--tg-theme-hint-color);margin:0 0 16px}.hint-inline a{color:var(--tg-theme-link-color)}.selected-category-line{font-size:.95rem;margin-bottom:16px;padding:10px 12px;background:var(--tg-theme-secondary-bg-color);border-radius:var(--radius)}.selected-category-name{font-weight:600}
