*{box-sizing:border-box} :root{--bg:#ededf6;--card:#efeff8;--ink:#17192b;--muted:#555b73;--accent:#6342b8;--shadow:5px 7px 12px #a6a9c080,-3px -3px 8px #ffffffd9;--line:#fff;--field:#f8f8fc}html{background:var(--bg);color:var(--ink);font-family:Tahoma,Arial,sans-serif}body{margin:0;background:linear-gradient(125deg,#f4f2fa,var(--bg) 65%);min-height:100vh}body.dark{--bg:#242635;--card:#303344;--ink:#f5f4ff;--muted:#b7bbcf;--accent:#c2aaff;--shadow:4px 5px 12px #131421,-2px -2px 6px #41465a;--line:#41465a;--field:#242635;background:var(--bg)}main{max-width:760px;margin:auto;padding:12px 12px 100px}h1,h2,h3,p{margin:0 0 12px}h1{font-size:25px}h2{font-size:19px}h3{font-size:16px}small,.muted{color:var(--muted);font-size:12px}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer;border:0}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #8870d6}button:disabled{opacity:.55;cursor:wait}.soft,.panel,.tile,.stat,.navbtn,.iconbtn{background:linear-gradient(145deg,var(--card),var(--bg));border:1px solid var(--line);box-shadow:var(--shadow);border-radius:17px}.panel{padding:14px;margin-bottom:14px}.header{display:flex;align-items:center;justify-content:space-between;gap:10px;direction:ltr;margin:2px 0 10px}.brand{display:flex;align-items:center;gap:8px}.brand img{width:25vw;max-width:146px;height:auto;object-fit:contain}.brand span{border-left:1px solid #9497aa;padding-left:10px;direction:rtl;text-align:left;white-space:nowrap}.brand b{font-size:clamp(23px,5.2vw,43px);display:block}.brand small{font-size:clamp(10px,2.6vw,18px)}.headbuttons{display:flex;gap:8px}.iconbtn{position:relative;width:clamp(32px,8.3vw,61px);height:clamp(36px,8.3vw,61px);display:grid;place-items:center;padding:4px}.iconbtn img{width:100%;height:100%;object-fit:contain}.badge{position:absolute;top:-4px;right:-3px;background:#d74648;color:#fff;border-radius:100px;padding:2px 5px;font-size:11px}.budget{display:flex;align-items:center;gap:10px;direction:ltr;padding:10px 12px;background:radial-gradient(ellipse at 9% 20%,#b5ecd9 0%,transparent 43%),linear-gradient(130deg,var(--card),var(--bg));width:100%;text-align:right}.budget>img{width:34%;object-fit:contain}.budgetcontent{flex:1;direction:rtl;min-width:0}.budget h2{margin:0 0 5px}.money{font-weight:800;color:#29762b;font-size:clamp(19px,5vw,36px);white-space:nowrap;direction:ltr;text-align:right}.dark .money{color:#a3e3a1}.progress{height:12px;border-radius:20px;background:#d6d9e9;box-shadow:inset 2px 2px 5px #adb2c3;margin:9px 0;overflow:hidden}.progress i{display:block;height:100%;border-radius:20px;background:linear-gradient(#85d7a4,#3d9c69)}.split{display:grid;grid-template-columns:1fr 1fr;gap:5px;font-size:clamp(10px,2.6vw,16px)}.split>div+div{border-right:1px solid #9fa4ba;padding-right:8px}.split strong{display:block;margin-top:3px;white-space:nowrap}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:14px 0}.stat{padding:8px 2px;text-align:center;min-width:0}.stat img{width:43px;height:35px;object-fit:contain}.stat small{display:block;color:var(--ink);font-size:clamp(9px,2.5vw,15px);font-weight:bold;white-space:normal}.stat b{display:block;font-size:clamp(12px,3.1vw,23px);margin-top:4px;overflow-wrap:anywhere}.mint{background:linear-gradient(135deg,#c9f4e3,#e8f4f2);color:#161e25}.peach{background:linear-gradient(135deg,#ffe5c3,#f7f0ed);color:#561d12}.blue{background:linear-gradient(135deg,#cde7ff,#e9effb);color:#171d34}.purple{background:linear-gradient(135deg,#e5d3fa,#f3ecff);color:#27184b}.stat small{color:inherit}.tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:15px}.tile{min-height:83px;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:5px 4px 9px;gap:2px;font-weight:bold;font-size:clamp(12px,3.2vw,20px);line-height:1.3;text-align:center}.tile img{width:clamp(50px,13vw,100px);height:clamp(45px,12vw,86px);object-fit:contain}.recent{padding:10px}.row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.entry{padding:10px;margin:8px 0;display:flex;justify-content:space-between;align-items:center;gap:8px;border-radius:14px;background:var(--field);border:1px solid var(--line);width:100%;text-align:right}.entry strong{font-size:14px}.status{font-size:11px;padding:4px 7px;border-radius:20px;background:#dedeea;color:#37364e}.status.ok{background:#d9eee3;color:#23673e}.status.warn{background:#ffead0;color:#885300}.status.bad{background:#fae2e3;color:#9e3030}nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:760px;background:var(--card);box-shadow:0 -3px 13px #a8abc04d;border-radius:20px 20px 0 0;border:1px solid var(--line);padding:6px 5px max(9px,env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(6,1fr);z-index:5;gap:2px}.navbtn{background:none;box-shadow:none;border:0;display:flex;flex-direction:column;align-items:center;gap:4px;padding:7px 1px;font-size:clamp(9px,2.7vw,15px);border-radius:14px}.navbtn img{width:28px;height:26px;object-fit:contain}.navbtn.active{background:#e8dffa;color:#5632ae;font-weight:bold}.pagehead{display:flex;align-items:center;justify-content:space-between;margin:3px 0 16px;gap:10px}.pagehead h1{margin:0}.btn{padding:11px 14px;background:var(--accent);color:white;border-radius:12px;font-weight:bold;min-height:44px}.dark .btn{color:#191528}.btn.secondary{color:var(--ink);background:var(--card);box-shadow:var(--shadow);border:1px solid var(--line)}.btn.danger{background:#a43a49;color:white}.btn.green{background:#347a51;color:white}.actions{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.actions>.btn{flex:1}.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.field{display:flex;flex-direction:column;gap:5px;font-size:13px;margin-bottom:9px;min-width:0}.field.full{grid-column:1/-1}input,select,textarea{width:100%;padding:11px 9px;border:1px solid #b9bccb;border-radius:10px;background:var(--field);min-height:42px}input[type=checkbox]{width:20px;height:20px;min-height:0}input[type=number],input[type=date]{direction:ltr;text-align:right}textarea{resize:vertical}.sum{padding:12px 0;border-top:1px solid #bfc2d0;margin-top:12px}.sum .row{margin:8px 0}.error{color:#a52a38}.notice{padding:10px;background:#fff1d8;color:#674400;border-radius:10px;margin:10px 0;font-size:13px}.tablewrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:12px}th,td{padding:8px;border-bottom:1px solid #c6c8d2;text-align:right;white-space:nowrap}#toast{position:fixed;bottom:85px;left:50%;transform:translateX(-50%);background:#29283c;color:white;padding:12px 16px;border-radius:12px;z-index:20;display:none;max-width:90%;width:max-content}#toast.show{display:block}.print-only{display:none}.lockscreen{max-width:420px;margin:12vh auto}.previewimg{max-width:130px;max-height:100px;border-radius:10px;object-fit:contain}details summary{cursor:pointer;margin-bottom:12px;font-weight:bold}@media(min-width:600px){main{padding:18px 22px 120px}.tile{min-height:145px}.stat img{width:65px;height:52px}.budget{padding:18px}.navbtn img{width:38px;height:36px}}@media print{@page{size:A4;margin:12mm}body{background:#fff!important;color:#000!important}#nav,#toast,.no-print,.btn,.pagehead{display:none!important}main{max-width:none;padding:0}.panel{box-shadow:none;border:0;background:#fff;break-inside:avoid}.print-only{display:block}table{font-size:11px}td,th{white-space:normal;border:1px solid #999}.tablewrap{overflow:visible}}
@media(max-width:420px){.brand{gap:4px}.brand span{padding-left:6px}.headbuttons{gap:5px}.budget{padding:8px}.stats{gap:6px}.tiles{gap:8px}.tile{font-size:12px}.stat small{font-size:9px}}.recent .btn{min-height:32px;font-size:12px;padding:5px 9px}.panel> .row>img{max-width:105px;max-height:90px;object-fit:contain}.panel img{max-width:100%}.dark .budget{background:radial-gradient(ellipse at 8% 20%,#24564c 0%,transparent 43%),linear-gradient(130deg,var(--card),var(--bg))}nav[hidden]{display:none}
.budgettitle,.budgetvalue,.subbudget,.historytitle{display:flex;align-items:center;gap:5px}.budgettitle img,.budgetvalue>img{width:clamp(22px,5vw,37px);height:clamp(22px,5vw,37px);object-fit:contain}.budgettitle h2{margin:0}.budgetvalue{justify-content:flex-start}.budgetvalue .money{flex:1}.subbudget>img{width:clamp(17px,4vw,34px);height:clamp(17px,4vw,34px);object-fit:contain}.subbudget span{min-width:0}.subbudget strong{white-space:normal}.historytitle img{width:23px;height:23px;object-fit:contain}.invoiceentry>img{width:18px;height:20px;object-fit:contain}.invoiceentry>div{flex:1;min-width:0}.invoiceentry strong{overflow-wrap:anywhere}.invoiceentry>strong{white-space:nowrap;font-size:12px}.invoiceentry .status{white-space:nowrap}.historytitle{margin:0}.budgetcontent h2{font-size:clamp(15px,3.6vw,23px)}
