:root{color-scheme:light;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:#eef1ee;color:#1f2927;--bg: #eef1ee;--surface: #ffffff;--surface-muted: #f6f8f6;--surface-strong: #e8f3ed;--border: #d5dfda;--text: #1f2927;--muted: #667772;--primary: #1d7b5f;--primary-strong: #145844;--safe: #2c8c68;--notice: #bb8a15;--tight: #cf6f1d;--over: #c03b2b;--shadow: 0 14px 36px rgba(22, 44, 36, .08);--radius-lg: 18px;--radius-md: 14px;--radius-sm: 10px}*{box-sizing:border-box}html,body,#root{min-height:100%;margin:0}body{min-height:100vh;background:linear-gradient(180deg,#f8fbf8,#eef1ee);overflow-x:hidden}body,button,input,select,textarea{font:inherit}button,input,select,textarea{border:0}h1,h2,h3,p{margin:0}.app-shell{min-height:100vh;padding:18px 16px calc(112px + env(safe-area-inset-bottom));display:flex;justify-content:center}.screen{width:min(100%,480px);display:flex;flex-direction:column;gap:16px}.screen--centered{justify-content:center}.loading-card,.hero-card,.panel,.stat-card,.category-card,.expense-row,.editor-row,.settings-card,.sync-placeholder{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow)}.loading-card{padding:28px 20px;text-align:center}.topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-width:0}.eyebrow,.field-label{font-size:12px;line-height:1.3;font-weight:700;color:var(--muted)}.eyebrow{margin-bottom:6px}h1{font-size:28px;line-height:1.15;overflow-wrap:anywhere}h2{font-size:30px;line-height:1.1;overflow-wrap:anywhere}h3{font-size:18px;line-height:1.2}.project-chip{display:inline-flex;align-items:center;min-height:34px;max-width:132px;padding:0 12px;border-radius:999px;background:var(--surface-strong);color:var(--primary-strong);font-size:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.screen-content,.settings-stack,.editor-list,.list-stack,.category-list,.expense-form{display:grid;gap:16px;min-width:0}.hero-card{padding:18px;background:linear-gradient(180deg,#f4fbf7,#fff)}.hero-copy{display:grid;gap:8px}.hero-remaining-label{color:var(--muted);font-size:14px}.hero-remaining-value{font-size:34px;line-height:1.05;font-weight:800;color:var(--primary-strong)}.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}.stat-card{padding:12px;background:var(--surface-muted);border-radius:var(--radius-sm);box-shadow:none;min-width:0}.stat-card strong,.settings-card strong,.sync-placeholder strong{display:block;margin-top:6px;font-size:16px;color:var(--text);overflow-wrap:anywhere}.panel{padding:16px}.section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.section-heading p,.expense-row p,.editor-footer p,.settings-card p,.empty-state p{color:var(--muted);font-size:14px;line-height:1.45}.primary-button,.secondary-button,.ghost-button{min-height:48px;border-radius:12px;padding:0 16px;font-weight:700;cursor:pointer;line-height:1.2;overflow-wrap:anywhere}.primary-button{width:100%;margin-top:18px;background:linear-gradient(180deg,#2a8d6a,#1d7b5f);color:#fff}.secondary-button{width:100%;background:#eff6f2;color:var(--primary-strong);border:1px solid #d4e5dc}.ghost-button{min-height:40px;background:#f3f6f4;color:var(--text)}.ghost-button:disabled,.primary-button:disabled{cursor:not-allowed;opacity:.72}.category-card,.expense-row,.editor-row,.settings-card,.sync-placeholder,.empty-state{padding:14px}.category-card,.editor-row{display:grid;gap:12px}.category-header,.expense-row,.editor-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}.category-header strong,.expense-row strong,.empty-state strong{color:var(--text);overflow-wrap:anywhere}.category-header>div,.expense-row>div,.editor-footer>p{min-width:0}.status-tag{display:inline-flex;align-items:center;justify-content:center;min-width:54px;min-height:28px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:700;background:#e8f3ed;color:var(--safe)}.status-tag--notice{background:#f8efcf;color:var(--notice)}.status-tag--tight{background:#fbe4d1;color:var(--tight)}.status-tag--over{background:#f8ddd9;color:var(--over)}.progress-track{height:10px;border-radius:999px;background:#dfe7e2;overflow:hidden}.progress-fill{display:block;height:100%;border-radius:inherit}.progress-fill--safe{background:linear-gradient(90deg,#2f936d,#49b07f)}.progress-fill--notice{background:linear-gradient(90deg,#bb8a15,#e1b12d)}.progress-fill--tight{background:linear-gradient(90deg,#cf6f1d,#ef9343)}.progress-fill--over{background:linear-gradient(90deg,#c03b2b,#df5945)}.expense-row{background:var(--surface-muted);box-shadow:none}.expense-row span{flex:0 0 auto;font-weight:700;white-space:nowrap}.expense-header{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px}.expense-actions{display:flex;gap:8px;flex-shrink:0}.icon-button{min-width:32px;min-height:32px;padding:6px;border-radius:8px;background:var(--surface-muted);color:var(--muted);border:1px solid var(--border);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.icon-button:hover{background:var(--surface-strong);color:var(--primary-strong)}.icon-button--danger:hover{background:#f8ddd9;color:var(--over)}.receipt-thumbnail{max-width:80px;max-height:60px;object-fit:cover;border-radius:8px;border:1px solid var(--border);cursor:pointer}.receipt-container{margin-top:8px}.filter-bar{display:grid;gap:12px;margin-bottom:16px}.search-box{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;border:1px solid var(--border);border-radius:10px;background:#f8fbf9;color:var(--muted)}.search-input{flex:1;min-height:44px;border:0;background:transparent;color:var(--text);outline:none}.search-input::placeholder{color:var(--muted)}.clear-button{min-width:28px;min-height:28px;padding:4px;border-radius:6px;background:transparent;color:var(--muted);border:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.clear-button:hover{background:var(--surface-muted);color:var(--text)}.filter-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.filter-select{min-height:40px;padding:0 12px;border:1px solid var(--border);border-radius:10px;background:#f8fbf9;color:var(--text)}.monthly-stats{display:grid;gap:12px;margin-top:14px}.monthly-stat-row{display:flex;align-items:center;gap:12px}.monthly-stat-label{flex:0 0 72px;font-size:14px;font-weight:600;color:var(--muted)}.monthly-stat-bar-container{flex:1;height:12px;border-radius:999px;background:var(--surface-muted);overflow:hidden}.monthly-stat-bar{height:100%;border-radius:inherit;transition:width .3s ease}.monthly-stat-value{flex:0 0 90px;text-align:right;font-size:14px;font-weight:700;color:var(--text)}.password-card{text-align:center}.password-icon{margin:0 auto 16px;color:var(--primary)}.password-subtitle{margin-bottom:20px;color:var(--muted);font-size:14px}.password-settings{display:grid;gap:12px}.expense-row--stacked{align-items:flex-start}.expense-main,.expense-meta{display:grid;gap:4px;min-width:0}.expense-meta{justify-items:end;max-width:42%}.expense-main p,.expense-meta span,.expense-meta strong{overflow-wrap:anywhere}.empty-state{display:grid;gap:6px;background:var(--surface-muted);border:1px dashed var(--border);border-radius:var(--radius-sm);box-shadow:none}.budget-banner{margin-bottom:14px;padding:12px 14px;border-radius:var(--radius-sm);background:#edf6f1;color:var(--primary-strong);font-weight:700}.budget-banner--warn{background:#fde7e3;color:var(--over)}.editor-fields,.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.field-group{display:grid;gap:8px}.text-input{min-height:44px;width:100%;min-width:0;padding:0 12px;border:1px solid var(--border);border-radius:10px;background:#f8fbf9;color:var(--text)}.text-input--multiline{min-height:88px;padding:12px;resize:vertical}.text-input--error{border-color:#c03b2ba6;background:#fff7f5}.field-error{color:var(--over);font-size:13px;line-height:1.4}.upload-button{min-height:44px;display:inline-flex;align-items:center;justify-content:center;padding:0 14px;border:1px dashed var(--border);border-radius:10px;background:#f8fbf9;color:var(--primary-strong);font-weight:700;cursor:pointer}.receipt-preview{width:100%;max-width:180px;aspect-ratio:4 / 3;object-fit:cover;border-radius:10px;border:1px solid var(--border)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.text-input:focus-visible,.primary-button:focus-visible,.secondary-button:focus-visible,.ghost-button:focus-visible,.tab:focus-visible,.upload-button:focus-visible{outline:3px solid rgba(29,123,95,.24);outline-offset:2px}.settings-card,.sync-placeholder{display:grid;gap:10px}.sync-placeholder{background:var(--surface-muted)}.modal-backdrop{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:24px 24px calc(96px + env(safe-area-inset-bottom));background:#1f29276b}.modal-card{width:min(100%,360px);display:grid;gap:12px;padding:20px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow)}.modal-card p{color:var(--muted);font-size:14px;line-height:1.5}.modal-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.modal-primary,.modal-actions .secondary-button{margin-top:0;width:100%}.tabbar{position:fixed;left:50%;bottom:0;transform:translate(-50%);width:min(100%,480px);display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:#fffffff5;border-top:1px solid rgba(213,223,218,.92);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}.tab{min-height:56px;display:grid;place-items:center;gap:4px;background:transparent;border-radius:12px;color:var(--muted)}.tab span{font-size:12px;line-height:1;font-weight:700}.tab.active{background:var(--surface-strong);color:var(--primary-strong)}@media(min-width:700px){.app-shell{padding-top:28px}.screen{width:min(100%,520px)}}@media(max-width:520px){.editor-fields,.form-grid{grid-template-columns:minmax(0,1fr)}h1{font-size:24px}h2{font-size:28px}.stats-grid{gap:8px}.stat-card{padding:10px}}
