/* DJIVA — обновлённый UI счетов и истории операций (21.10.2026).
   Только представление: финансовые данные и расчёты не изменяются. */
.gup-fn-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:3px 0 14px}
.gup-fn-stat{border-radius:17px;border:1px solid;padding:14px 12px;min-width:0;min-height:116px;display:flex;gap:9px;align-items:flex-start;text-align:left;font:inherit;color:var(--tx);cursor:pointer}
.gup-fn-stat-owned{background:linear-gradient(145deg,rgba(17,107,87,.25),rgba(12,54,50,.15));border-color:rgba(46,184,146,.29)}
.gup-fn-stat-debt{background:linear-gradient(145deg,rgba(143,54,68,.22),rgba(80,32,48,.13));border-color:rgba(234,103,117,.28)}
.gup-fn-stat-icon{flex:0 0 33px;width:33px;height:35px;display:grid;place-items:center;border-radius:11px;background:rgba(51,198,153,.15);font-size:21px}
.gup-fn-stat-debt .gup-fn-stat-icon{background:rgba(239,105,117,.16)}
.gup-fn-stat-text{min-width:0;display:flex;flex-direction:column;gap:5px;flex:1}
.gup-fn-stat-name{font-size:13px;font-weight:650;white-space:nowrap}
.gup-fn-stat-name span{opacity:.65}
.gup-fn-stat-value{display:block;font-size:clamp(12px,3.7vw,21px);font-weight:770;letter-spacing:-.035em;font-variant-numeric:tabular-nums;white-space:nowrap}
.gup-fn-stat-debt .gup-fn-stat-value{color:#f27982}
.gup-fn-stat small{color:var(--mu);font-size:11px}
.gup-fn-excluded{grid-column:1/-1;color:var(--mu);font-size:11px;margin:-2px 3px 0}
.gup-fn-panel.card{padding:14px!important;border-radius:20px!important;border:1px solid var(--line)!important}
.gup-fn-panel-head{display:flex;justify-content:space-between;align-items:center;gap:9px;margin:0 1px 13px}
.gup-fn-panel-head h2{font-size:18px;font-weight:740;letter-spacing:-.02em;margin:0;line-height:1.22;display:flex;align-items:center;gap:7px}
.gup-fn-tools{display:flex;gap:9px;align-items:center}
.gup-fn-tools button{font:inherit;color:var(--bl);font-size:12px;font-weight:650;border:0;background:transparent;padding:9px 2px;min-height:38px;white-space:nowrap}
.gup-fn-acc-group{border:1px solid var(--line);background:rgba(6,12,19,.19);border-radius:16px;margin-top:10px;overflow:hidden}
.gup-fn-group-head{width:100%;min-width:0;display:grid;grid-template-columns:32px minmax(0,1fr) auto 12px;gap:9px;align-items:center;padding:12px 9px;border:0;background:rgba(110,153,204,.075);color:var(--tx);text-align:left;font:inherit;cursor:pointer}
.gup-fn-group-icon{font-size:19px;width:30px;height:30px;display:grid;place-items:center;border-radius:10px;background:rgba(65,205,166,.13)}
.gup-fn-group-icon.credit{background:rgba(243,175,71,.13)}
.gup-fn-group-title{min-width:0;font-size:13px;font-weight:720;line-height:1.22;overflow-wrap:break-word}
.gup-fn-group-title small{display:block;color:var(--mu);font-size:10px;font-weight:450;margin-top:4px}
.gup-fn-group-sum{font-size:clamp(11px,3.1vw,15px);letter-spacing:-.03em;font-weight:750;white-space:nowrap;font-variant-numeric:tabular-nums}
.gup-fn-group-sum.is-debt,.gup-fn-account-amount.is-debt{color:#ef727c}
.gup-fn-chevron{color:var(--mu);font-size:17px;line-height:1}
.gup-fn-acc-rows{padding:0 9px 4px}
.gup-fn-account-row{width:100%;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--tx);display:grid;grid-template-columns:30px minmax(0,1fr) auto 11px;gap:9px;align-items:center;padding:11px 0;text-align:left;font:inherit;cursor:pointer;min-height:52px}
.gup-fn-account-row:last-of-type{border-bottom:0}
.gup-fn-account-icon{font-size:19px;width:30px;height:32px;display:grid;place-items:center;border-radius:10px;background:rgba(94,147,208,.12)}
.gup-fn-account-icon.owned{background:rgba(88,182,155,.11)}
.gup-fn-account-icon.credit{background:rgba(236,157,86,.1)}
.gup-fn-account-label{min-width:0;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gup-fn-account-label small{display:block;margin-top:3px;color:var(--mu);font-size:10px;white-space:normal}
.gup-fn-account-amount{font-size:13px;font-weight:660;letter-spacing:-.02em;white-space:nowrap;font-variant-numeric:tabular-nums}
.gup-fn-account-order{display:flex;align-items:center;gap:8px;min-height:52px;border-bottom:1px solid var(--line)}
.gup-fn-account-order .gup-fn-account-label{flex:1}
.gup-fn-account-order .gh{min-width:34px;padding:3px!important;font-size:19px}
.gup-fn-order-note{color:var(--mu);font-size:12px;margin:6px 0}
.gup-fn-more,.gup-fn-history-more{width:100%;padding:12px;border:0;background:rgba(110,168,255,.08);color:var(--bl);font-size:13px;font-weight:660;border-radius:11px;margin-top:7px}
.gup-fn-history .gup-fn-panel-head{margin-bottom:10px}
.gup-fn-history-count{font-size:12px;color:var(--mu);font-weight:650}
.gup-fn-filters{display:flex;gap:6px;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:7px;scrollbar-width:none}
.gup-fn-filters::-webkit-scrollbar{display:none}
.gup-fn-filter{flex:0 0 auto;min-height:36px;padding:6px 12px;border:1px solid var(--line);background:rgba(110,168,255,.025);border-radius:999px;font-size:12px;font-weight:570;color:var(--mu);font-family:inherit}
.gup-fn-filter.active{background:rgba(80,147,235,.2);border-color:rgba(101,162,244,.6);color:#a9ceff}
.gup-fn-day-group{margin-top:11px}
.gup-fn-day-title{font-size:14px;font-weight:720;margin:4px 2px 9px;color:var(--tx)}
.gup-fn-tx-list{display:flex;flex-direction:column;gap:5px}
.gup-fn-tx-row{border:1px solid rgba(110,143,183,.17);background:rgba(7,14,23,.27);color:var(--tx);width:100%;border-radius:13px;display:grid;grid-template-columns:37px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 9px;min-height:65px;text-align:left;font:inherit;cursor:pointer}
.gup-fn-tx-icon{width:37px;height:39px;border-radius:12px;background:rgba(102,152,225,.12);display:grid;place-items:center;font-size:22px}
.gup-fn-tx-icon.income{background:rgba(41,185,124,.15)}
.gup-fn-tx-icon.expense{background:rgba(216,87,108,.12)}
.gup-fn-tx-icon.transfer{background:rgba(238,160,42,.17)}
.gup-fn-tx-body{display:flex;min-width:0;flex-direction:column;gap:3px}
.gup-fn-tx-body strong{display:block;font-size:14px;font-weight:680;overflow-wrap:anywhere;line-height:1.24}
.gup-fn-tx-body small{font-size:12px;color:var(--mu);line-height:1.27;overflow-wrap:anywhere}
.gup-fn-tx-body .gup-fn-tx-note{font-size:11px;opacity:.83}
.gup-fn-tx-amount{font-size:14px;font-weight:730;font-variant-numeric:tabular-nums;white-space:nowrap;letter-spacing:-.02em}
.gup-fn-tx-amount.income{color:#2bcc87}
.gup-fn-tx-amount.expense{color:#ef717b}
.gup-fn-tx-amount.transfer{color:var(--tx)}
.gup-fn-empty{font-size:13px;color:var(--mu);padding:12px 0}
.gup-fn-tx-row:active,.gup-fn-account-row:active,.gup-fn-stat:active{transform:scale(.993)}
.gup-fn-tx-shade{position:fixed;inset:0;background:rgba(0,0,0,.68);z-index:510;display:flex;align-items:flex-end;justify-content:center;padding:0 10px}
.gup-fn-tx-sheet{width:min(100%,540px);max-height:90dvh;overflow:auto;background:var(--surface);color:var(--tx);border:1px solid var(--line);border-radius:23px 23px 0 0;padding:11px 20px calc(20px + env(safe-area-inset-bottom,0px));box-shadow:0 -18px 55px rgba(0,0,0,.35);position:relative}
.gup-fn-sheet-grip{width:44px;height:5px;border-radius:10px;background:var(--line);margin:0 auto 18px}
.gup-fn-sheet-close{position:absolute;right:14px;top:14px;border:0;background:var(--surface-3);color:var(--tx);width:36px;height:36px;border-radius:11px}
.gup-fn-sheet-category{font-size:17px;font-weight:700;padding-right:37px}
.gup-fn-sheet-sum{font-size:30px;font-weight:800;letter-spacing:-.03em;margin:10px 0 20px}
.gup-fn-sheet-sum.income{color:var(--gr)}
.gup-fn-sheet-sum.expense{color:var(--rd)}
.gup-fn-sheet-detail{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:12px 0;font-size:13px}
.gup-fn-sheet-detail span{color:var(--mu);flex:0 0 30%}
.gup-fn-sheet-detail b{text-align:right;font-weight:600;overflow-wrap:anywhere}
.gup-fn-sheet-actions{display:flex;gap:10px;margin-top:15px}
.gup-fn-sheet-actions button{border:1px solid var(--line);border-radius:13px;min-height:49px;padding:12px 8px;flex:1;font-weight:700}
.gup-fn-sheet-edit{background:var(--am);color:#231900}
.gup-fn-sheet-delete{background:rgba(226,84,90,.1);color:var(--rd)}
@media(max-width:385px){
 .gup-fn-stat{padding:12px 9px;gap:7px;min-height:106px}
 .gup-fn-stat-icon{flex-basis:27px;width:27px;font-size:18px}
 .gup-fn-stat-value{font-size:clamp(12px,3.5vw,17px)}
 .gup-fn-panel.card{padding:11px!important}
 .gup-fn-account-row,.gup-fn-group-head{gap:6px}
 .gup-fn-account-label{font-size:13px}
 .gup-fn-account-amount{font-size:12px}
 .gup-fn-tx-row{gap:7px;padding:9px 7px}
 .gup-fn-tx-amount{font-size:13px}
 .gup-fn-tx-body strong{font-size:13px}
}
html[data-theme="light"] .gup-fn-acc-group{background:#f8fafd}
html[data-theme="light"] .gup-fn-group-head{background:#f0f5fb}
html[data-theme="light"] .gup-fn-tx-row{background:#f8fafd;border-color:#e3eaf2}
html[data-theme="light"] .gup-fn-stat-owned{background:linear-gradient(145deg,#e3f9ef,#f3fcf8);border-color:#a4dec4}
html[data-theme="light"] .gup-fn-stat-debt{background:linear-gradient(145deg,#ffeaed,#fff7f8);border-color:#ebc4cb}
html[data-theme="light"] .gup-fn-stat-debt .gup-fn-stat-value{color:#be3e50}
html[data-theme="light"] .gup-fn-group-sum.is-debt,
html[data-theme="light"] .gup-fn-account-amount.is-debt,
html[data-theme="light"] .gup-fn-tx-amount.expense{color:#c03f51}
html[data-theme="light"] .gup-fn-filter.active{background:#dcecff;color:#255eac}
html[data-theme="light"] .gup-fn-tx-amount.income{color:#168b53}
html[data-theme="light"] .gup-fn-tx-sheet{background:#fff}
