:root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;line-height:1.5;font-weight:400;color:#0f172a;background-color:#f1f5f9;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,*:before,*:after{box-sizing:border-box}body{margin:0;min-height:100vh;background-color:#f1f5f9}#root{min-height:100vh}a{color:inherit;text-decoration:none}button{border-radius:999px;border:none;padding:.65rem 1.25rem;font-size:1rem;font-weight:600;font-family:inherit;background-color:#2563eb;color:#fff;cursor:pointer;transition:transform .1s ease,box-shadow .1s ease;box-shadow:0 8px 16px -10px #2563ebcc}button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 12px 20px -12px #2563ebe6}button:disabled{opacity:.6;cursor:not-allowed;box-shadow:none}input{border-radius:10px;border:1px solid #cbd5f5;padding:.65rem .75rem;font-size:1rem;font-family:inherit;transition:border-color .2s ease,box-shadow .2s ease;background:#fff}input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px #2563eb26}.app-shell{min-height:100vh;background:#f8fafc;display:flex;flex-direction:column}.app-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;background:#fffc;border-bottom:1px solid #e2e8f0;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);position:sticky;top:0;z-index:10}.app-brand{display:flex;align-items:center;gap:.5rem;font-weight:700;font-size:1.1rem;color:#0f172a}.app-nav{display:flex;gap:.5rem}.nav-link{padding:.5rem .85rem;border-radius:999px;color:#1e293b;font-weight:600;transition:background-color .2s ease,color .2s ease}.nav-link:hover{background:#e2e8f0}.nav-link.active{background:#2563eb;color:#fff}.app-main{flex:1;width:min(960px,100%);margin:0 auto;padding:2rem 1rem 3rem;display:flex;flex-direction:column;gap:1.5rem}.stack{display:flex;flex-direction:column;gap:1.5rem}.card{background:#fff;border-radius:16px;padding:1.75rem;box-shadow:0 12px 32px -16px #0f172a33;border:1px solid #e2e8f0}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem}.page-heading{display:flex;flex-direction:column;gap:.35rem}.page-heading h1{margin:0}.muted{color:#64748b;margin:0}.text-link{color:#2563eb;font-weight:600}.text-link:hover{text-decoration:underline}.piggy-form{display:flex;flex-direction:column;gap:1rem;margin-top:1.5rem}.input-control{display:flex;flex-direction:column;gap:.5rem}.input-control label{font-weight:600;color:#0f172a}.form-error{margin:0;color:#dc2626;font-weight:600}.status-text{margin:0;color:#475569}.status-text.error{color:#dc2626}.piggy-bank-grid{list-style:none;padding:0;margin:1.5rem 0 0;display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.piggy-bank-card{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:1.25rem}.piggy-bank-name{font-weight:700;font-size:1.05rem;color:#0f172a}.piggy-bank-balance{font-size:1.4rem;font-weight:700;color:#1d4ed8;margin-top:.35rem}.piggy-bank-spendable{font-size:.95rem;font-weight:600;color:#16a34a;margin-top:.25rem}.piggy-bank-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;align-items:center}.piggy-bank-actions button{padding:.55rem .75rem}.piggy-bank-footer{display:flex;justify-content:flex-end}.balance-display{font-weight:700;text-align:center;color:#0f172a}.history-summary{display:flex;align-items:flex-start;justify-content:space-between;gap:1.5rem}.history-balance{margin:.4rem 0 0;font-size:2rem;font-weight:700;color:#1d4ed8}.history-child{margin:.35rem 0 0;font-weight:600;color:#0f172a}.history-spendable{margin:.35rem 0 0;font-size:1.1rem;font-weight:600;color:#16a34a}.history-list{list-style:none;margin:1.5rem 0 0;padding:0;display:flex;flex-direction:column;gap:.85rem}.history-item{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.85rem 1rem;border-radius:14px;border:1px solid #e2e8f0;background:#f8fafc}.history-details{display:flex;flex-direction:column;gap:.25rem}.history-date{font-weight:600;color:#0f172a}.history-meta{color:#64748b;font-size:.95rem}.history-change{font-weight:700}.history-change.positive{color:#16a34a}.history-change.negative{color:#dc2626}.footnote{margin-top:1rem;font-size:.9rem;color:#94a3b8}.modal-overlay{position:fixed;inset:0;background:#0f172a80;display:flex;align-items:center;justify-content:center;padding:1rem;z-index:100}.modal-content{background:#fff;border-radius:16px;padding:1.75rem;width:min(440px,100%);max-height:calc(100vh - 2rem);overflow-y:auto;box-shadow:0 24px 48px -12px #0f172a4d}.modal-header{margin-bottom:1.5rem}.modal-header h2{margin:0 0 .25rem}.modal-form{display:flex;flex-direction:column;gap:1.25rem}.modal-actions{display:flex;gap:.75rem;justify-content:flex-end;margin-top:.5rem}.type-buttons{display:flex;flex-wrap:wrap;gap:.5rem}.type-button{padding:.5rem 1rem;border:1px solid #e2e8f0;border-radius:999px;background:#f8fafc;color:#475569;font-weight:600;cursor:pointer;transition:all .15s ease}.type-button:hover{background:#e2e8f0}.type-button.selected{background:#2563eb;border-color:#2563eb;color:#fff}.amount-presets{display:flex;flex-wrap:wrap;gap:.5rem}.amount-button{padding:.5rem 1rem;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;color:#475569;font-weight:600;cursor:pointer;transition:all .15s ease}.amount-button:hover{background:#e2e8f0}.amount-button.selected{background:#1d4ed8;border-color:#1d4ed8;color:#fff}.custom-amount-input{display:flex;align-items:center;margin-top:.75rem}.currency-prefix{padding:.65rem .75rem;background:#f1f5f9;border:1px solid #e2e8f0;border-right:none;border-radius:8px 0 0 8px;color:#64748b;font-weight:600}.custom-amount-input input{flex:1;border-radius:0 8px 8px 0}.balance-preview{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:1rem;display:flex;flex-direction:column;gap:.5rem}.preview-row{display:flex;justify-content:space-between;align-items:center}.preview-row .positive{color:#16a34a;font-weight:600}.preview-row .negative{color:#dc2626;font-weight:600}.preview-total{border-top:1px solid #e2e8f0;padding-top:.5rem;margin-top:.25rem;font-weight:700}button.secondary{background:#f1f5f9;color:#475569;border:1px solid #e2e8f0}button.secondary:hover:not(:disabled){background:#e2e8f0}.piggy-bank-detailed-actions{display:flex;gap:.5rem}.piggy-bank-detailed-actions button{flex:1;padding:.5rem .75rem;font-size:.9rem}.history-row{display:flex;align-items:center;gap:.5rem}.history-type-badge{display:inline-block;padding:.2rem .6rem;border-radius:999px;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.025em}.badge-positive{background:#dcfce7;color:#166534}.badge-negative{background:#fee2e2;color:#991b1b}.badge-neutral{background:#f1f5f9;color:#475569}.history-label{font-style:italic;color:#64748b;font-size:.9rem;margin-top:.25rem}@media (max-width: 640px){.app-header{flex-direction:column;align-items:flex-start;gap:.75rem}.app-nav{width:100%;justify-content:flex-start}.piggy-bank-grid{margin-top:1rem;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.history-summary{flex-direction:column}.history-item{flex-direction:column;align-items:flex-start}.modal-content{padding:1.25rem}.type-buttons,.amount-presets{flex-direction:column}.type-button,.amount-button{width:100%;text-align:center}}
