.brand .mark{width:37px;height:37px;background:transparent;overflow:hidden;flex:none;border-radius:10px}.brand .mark img{display:block;width:100%;height:100%;object-fit:contain}.topbar .brand>span:last-child{font-size:15px;letter-spacing:.025em;white-space:nowrap}.market-gold .color-icon{width:24px;height:24px}.market-gold{background:#30271c;border-color:#69532b}.market-usd{background:#16372d;border-color:#285748}.bottom-nav button .color-icon{width:24px;height:24px;display:block}.bottom-nav button[data-action="page:Accounts"]{color:#9fcaff}.bottom-nav button[data-action="page:Upcoming"]{color:#caafff}.bottom-nav button[data-action="page:Visa"]{color:#ffabd0}.bottom-nav button[data-action="page:Activity"]{color:#90e5b9}.bottom-nav button[data-action="page:Gold"]{color:#f9d17e}.bottom-nav button[data-action="page:More"]{color:#c7d5e9}.bottom-nav button.active{background:var(--blueDeep);box-shadow:inset 0 0 0 1px var(--line)}.bottom-nav button span{white-space:nowrap}.investment-name .item-with-icon{gap:5px;align-items:center}.investment-name .mini-icon{width:20px;height:20px;border-radius:6px;flex:0 0 20px}.investment-name .mini-icon svg{width:13px;height:13px}.investment-name .mini-icon.certificate{background:transparent}.investment-name .mini-icon.certificate .color-icon{width:19px;height:19px;fill:initial;stroke:none}.investment-return .mini-icon.return{width:18px;height:18px;border-radius:5px}.investment-return .mini-icon.return svg{width:12px;height:12px}.chart-refresh{margin-left:auto;flex:none;white-space:nowrap;min-height:32px;padding:5px 9px;font-size:11px}.sheet-title{gap:6px}.sheet-title h2{flex:1;min-width:0}.chart-refresh:disabled{opacity:.6}
:root[data-theme="emerald"]{--bg:#071611;--surface:#10231c;--surface2:#193228;--line:#2b493b;--text:#e7f5ed;--muted:#9bb9a9;--blue:#72d9aa;--blueDeep:#214b37;--yellow:#f4d35e;--green:#8ae1b4;--red:#ff9292}
:root[data-theme="royal"]{--bg:#110d1c;--surface:#1e182d;--surface2:#2c2440;--line:#443658;--text:#f3ebff;--muted:#b9aacd;--blue:#c4a1ff;--blueDeep:#453166;--yellow:#f4d35e;--green:#82dba8;--red:#ff9292}
:root[data-theme="gold"]{--bg:#0d0b08;--surface:#1b1710;--surface2:#272116;--line:#493b22;--text:#f5eedf;--muted:#bcaf96;--blue:#f1cb73;--blueDeep:#4b3b20;--yellow:#f4d35e;--green:#82dba8;--red:#ff9292}
:root[data-theme="light"]{color-scheme:light;--bg:#f0f4f8;--surface:#fff;--surface2:#e7eef6;--line:#c6d2e1;--text:#1b2e43;--muted:#52667d;--blue:#275aab;--blueDeep:#d7e5fb;--yellow:#8b6107;--green:#147746;--red:#bc263b;--orange:#a05707}
:root:not([data-theme="midnight"]) .panel,:root:not([data-theme="midnight"]) .account-card{background:var(--surface)}.topbar,.bottom-nav{border-color:var(--line)}:root:not([data-theme="midnight"]) :is(.bottom-nav,.modal,.method,.field input,.field select,.field textarea,.period input,.period select,.total-pills>div,.report-metrics>span,.backup-health,.account-flow-circle,.flow-circle-legend span,.up58-date,.gold-display-mode,.gold-card,.schedule-row,.row-actions button,.toast,.floating>div){background:var(--surface);border-color:var(--line);color:var(--text)}:root:not([data-theme="midnight"]) :is(.quick-entry,.secondary,.small-button,.primary,.outline,.dots,.icon-menu){background:var(--surface2);border-color:var(--line);color:var(--blue)}:root:not([data-theme="midnight"]) :is(.method button.active,.tabs button.active,.up58-filters button.active){background:var(--blueDeep);color:var(--blue);border-color:var(--line)}:root:not([data-theme="midnight"]) :is(.field label,.investment-fact span:last-child,.gold-history-compact-title,.report-category b){color:var(--text)}:root[data-theme="light"] .bottom-nav button[data-action="page:Accounts"]{color:#275aab}:root[data-theme="light"] .bottom-nav button[data-action="page:Upcoming"]{color:#7148ad}:root[data-theme="light"] .bottom-nav button[data-action="page:Visa"]{color:#b03c72}:root[data-theme="light"] .bottom-nav button[data-action="page:Activity"]{color:#147746}:root[data-theme="light"] .bottom-nav button[data-action="page:Gold"]{color:#8b6107}:root[data-theme="light"] .bottom-nav button[data-action="page:More"]{color:#52667d}:root[data-theme="light"] .donut>div{background:var(--surface);color:var(--text)}
.investment-name b.item-with-icon{display:flex;align-items:center;gap:7px;line-height:1.3;min-height:18px}.investment-name b.item-with-icon .mini-icon{display:flex;align-items:center;justify-content:center;width:17px;height:17px;flex:0 0 17px;margin:0;padding:0;background:transparent;vertical-align:initial}.investment-name b.item-with-icon .mini-icon svg.color-icon{display:block;width:16px;height:16px;flex:none;stroke:none;fill:initial}.up58-variance{margin-top:8px;padding-top:8px;border-top:1px solid var(--line)}.up58-variance b{color:var(--muted);font-size:13px}.up58-variance .variance-value{color:var(--orange)}
.up58-overview{background:var(--surface2);border:1px solid var(--line);border-radius:14px;padding:12px;margin:10px 0;color:var(--text)}
.up58-overview-head{display:flex;justify-content:space-between;align-items:center;gap:8px;padding-bottom:6px}.up58-overview-head strong{font-size:15px}.up58-overview-head small{color:var(--muted);font-size:11px;white-space:nowrap}
.up58-table-wrap{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}.up58-table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;font-size:13px}.up58-table th,.up58-table td{padding:6px 3px;text-align:right;white-space:nowrap}.up58-table th:first-child{text-align:left;padding-left:0}.up58-table thead th{color:var(--muted);font-weight:600;font-size:11px}.up58-table tbody th{color:var(--muted);font-weight:500}.up58-table td{font-weight:700}.up58-planned td{color:var(--yellow)}.up58-received td{color:var(--green)}.up58-remaining td{color:var(--blue)}.up58-breakdown tr:first-child th{border-top:1px solid var(--line);font-size:11px;padding-top:8px;color:var(--muted);font-weight:700}.up58-breakdown td{font-size:12px;font-weight:600}.up58-breakdown th{font-size:12px}
.up58-earlier,.up58-adjustments summary{display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap;font-size:11px;color:var(--muted);padding-top:8px;margin-top:6px;border-top:1px solid var(--line)}.up58-earlier b{color:var(--orange);font-size:12px}.up58-adjustments summary{cursor:pointer;list-style:none}.up58-adjustments summary::-webkit-details-marker{display:none}.up58-adjustments summary span{color:var(--orange);font-weight:700}.up58-adjustments summary::after{content:'⌄';color:var(--blue)}.up58-adjustments[open] summary::after{content:'⌃'}.up58-adjustments p{font-size:11px;color:var(--muted);margin:6px 0 0}
.fields-2.activity-date-range{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.fields-2.activity-date-range>.field{min-width:0;max-width:100%}.fields-2 #activity-from,.fields-2 #activity-to{display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;-webkit-appearance:none;appearance:none;padding-inline:8px;text-align:left}.fields-2 #activity-from::-webkit-date-and-time-value,.fields-2 #activity-to::-webkit-date-and-time-value{min-width:0;text-align:left}
.topbar{top:env(safe-area-inset-top,0px);background:var(--bg);-webkit-backdrop-filter:none;backdrop-filter:none}.topbar .market-shortcuts{align-self:center}@media(max-width:445px){.topbar{padding-top:11px}}
.up58-card{margin:5px 0;border-radius:10px}.up58-card summary{padding:7px 9px;gap:8px;min-height:48px}.up58-date{width:35px;padding:3px 4px;font-size:10px;line-height:1.15;border-radius:7px}.up58-date b{font-size:16px;line-height:1.1}.up58-name small,.up58-value small{margin-top:2px;line-height:1.15}.up58-value{font-size:13px}
.topbar::before{content:'';position:absolute;bottom:100%;left:calc((100% - 100vw)/2);width:100vw;height:env(safe-area-inset-top,0px);background:var(--bg);pointer-events:none}
#screen{touch-action:pan-y pinch-zoom}.up58-table-wrap{touch-action:auto}
.subcategory-row{position:relative;gap:7px;color:var(--text);margin-left:5px;padding-left:5px}.subcategory-row .subcategory-name{flex:1;min-width:0;overflow-wrap:anywhere}.subcategory-handle{display:grid;place-items:center;flex:0 0 36px;width:36px;height:44px;padding:0;border:0;border-radius:8px;background:var(--surface2);color:var(--muted);font-size:21px;line-height:1;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}.subcategory-handle:active{cursor:grabbing;color:var(--blue)}.subcategory-dragging{opacity:.48}.subcategory-drop-before::before,.subcategory-drop-after::after{content:'';position:absolute;left:0;right:0;height:3px;background:var(--blue);border-radius:2px;pointer-events:none}.subcategory-drop-before::before{top:-3px}.subcategory-drop-after::after{bottom:-5px}.subcategory-adder{display:flex;align-items:center;gap:6px;margin-top:7px}.subcategory-adder input{flex:1;min-width:0;width:0;max-width:100%}.subcategory-adder button{flex:none;white-space:nowrap;min-height:44px}.subcategory-adder .subcategory-cancel{min-width:36px;width:36px}
