:root{
  --bg:#f5f7fb;--app:#ffffff;--panel:#ffffff;--panel-2:#f8fafc;--card:#ffffff;--text:#0f172a;--muted:#64748b;--line:#e2e8f0;--accent:#2f7cff;--accent-2:#49a1ff;--green:#16a34a;--red:#ef4444;--orange:#f59e0b;--shadow:0 18px 50px rgba(15,23,42,.10);--soft:0 10px 30px rgba(15,23,42,.08);--glass:rgba(255,255,255,.75);--danger-bg:#fff1f2;--danger-border:#fecaca;--danger-text:#dc2626;
}
[data-theme="dark"]{
  --bg:#f3f6fb;--app:#07111f;--panel:#0d1a2b;--panel-2:#101f33;--card:#102138;--text:#f8fafc;--muted:#9aa9bd;--line:rgba(148,163,184,.18);--accent:#2f7cff;--accent-2:#55a6ff;--green:#67d36f;--red:#ff5d5d;--orange:#ffb84d;--shadow:0 22px 60px rgba(2,6,23,.38);--soft:0 10px 35px rgba(2,6,23,.25);--glass:rgba(16,31,51,.74);--danger-bg:rgba(127,29,29,.26);--danger-border:rgba(248,113,113,.42);--danger-text:#ff7676;
}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;background:radial-gradient(circle at top,#fff 0,var(--bg) 40%,#eef2f7 100%);color:var(--text)}body{padding:22px}.page-shell{max-width:480px;margin:0 auto}.phone{min-height:calc(100vh - 44px);max-width:430px;margin:auto;background:linear-gradient(160deg,var(--app),var(--panel));border:1px solid var(--line);border-radius:28px;box-shadow:var(--shadow);overflow:hidden;position:relative}.screen{min-height:calc(100vh - 44px);padding:18px 18px 92px;background:radial-gradient(circle at 50% 0%,rgba(47,124,255,.14),transparent 33%),var(--app)}.top-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.title-row{display:flex;align-items:center;gap:12px;margin-bottom:16px}.page-title{font-size:24px;line-height:1.15;margin:0 0 4px}.subtitle{font-size:13px;line-height:1.45;color:var(--muted);margin:0 0 16px}.icon-btn,.back-btn{border:1px solid var(--line);background:var(--panel-2);color:var(--text);height:40px;width:40px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;cursor:pointer;transition:.2s}.icon-btn:hover,.back-btn:hover{transform:translateY(-1px);border-color:rgba(47,124,255,.45)}.select,.field,.chip,.segmented,.action-card,.history-card,.setting-card,.summary-card,.table-card,.info-card,.modal-card,.dropdown-box{background:linear-gradient(180deg,var(--panel-2),var(--panel));border:1px solid var(--line);box-shadow:var(--soft)}.select{height:44px;border-radius:14px;padding:0 14px;display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--text);font-size:14px}.select.small{height:34px;font-size:12px;border-radius:11px;padding:0 10px}.chev{opacity:.8}.theme-toggle{font-size:18px}.balance-carousel{display:grid;grid-template-columns:1fr 1.35fr 1fr;gap:10px;align-items:center;margin:14px 0 8px}.balance-card{min-height:92px;border-radius:18px;background:linear-gradient(160deg,var(--panel-2),var(--panel));border:1px solid var(--line);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;box-shadow:var(--soft);position:relative}.balance-card.active{min-height:116px;border-color:var(--accent);box-shadow:0 0 0 1px rgba(47,124,255,.25),0 16px 36px rgba(47,124,255,.18)}.currency{font-size:26px;color:var(--muted);font-weight:700}.active .currency{color:var(--accent);font-size:34px}.amount{font-size:18px;font-weight:800;letter-spacing:-.02em}.active .amount{font-size:28px}.code{font-size:12px;color:var(--muted);font-weight:700}.dots{display:flex;justify-content:center;gap:8px;margin:10px 0 18px}.dot{width:8px;height:8px;border-radius:99px;background:#cbd5e1}.dot.active{background:var(--accent);width:18px}.segmented{display:grid;grid-template-columns:repeat(2,1fr);border-radius:14px;padding:4px;margin:12px 0}.segmented.three{grid-template-columns:repeat(3,1fr)}.segmented button{border:0;background:transparent;color:var(--muted);border-radius:11px;padding:9px 10px;font-weight:700;cursor:pointer}.segmented button.active{background:linear-gradient(135deg,var(--accent),#1768ff);color:#fff;box-shadow:0 8px 18px rgba(47,124,255,.28)}.actions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:14px 0 20px}.action-card{border-radius:18px;padding:14px 10px;text-align:center;color:var(--text);text-decoration:none;cursor:pointer}.action-card:hover{border-color:rgba(47,124,255,.5);transform:translateY(-1px)}.action-card .ico{font-size:25px;display:block;margin-bottom:8px}.action-card strong{display:block;font-size:12px}.action-card small{display:block;color:var(--muted);font-size:10px;line-height:1.25;margin-top:3px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0 10px}.section-head h2{font-size:18px;margin:0}.chip{border-radius:999px;padding:8px 10px;font-size:11px;color:var(--muted);display:inline-flex;gap:6px;align-items:center}.history-list{display:grid;gap:10px}.history-card{border-radius:18px;padding:12px;display:grid;grid-template-columns:56px 1fr;gap:10px}.time{font-size:12px;color:var(--muted);line-height:1.3}.op-title{font-weight:800;margin-bottom:2px}.op-sub{font-size:12px;color:var(--muted);margin-bottom:8px}.amount-row{display:flex;justify-content:space-between;gap:12px;font-size:13px;margin-top:5px}.pos{color:var(--green);font-weight:800}.neg{color:var(--red);font-weight:800}.muted{color:var(--muted)}.bottom-nav{position:absolute;left:0;right:0;bottom:0;height:76px;background:linear-gradient(180deg,rgba(255,255,255,.72),var(--panel));border-top:1px solid var(--line);backdrop-filter:blur(18px);display:grid;grid-template-columns:repeat(3,1fr);z-index:30}[data-theme="dark"] .bottom-nav{background:linear-gradient(180deg,rgba(13,26,43,.70),rgba(7,17,31,.96))}.nav-item{color:var(--muted);text-decoration:none;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;font-size:11px;font-weight:700}.nav-item .nav-ico{font-size:21px}.nav-item.active{color:var(--accent)}.modal-layer{position:absolute;inset:0;background:rgba(2,6,23,.56);display:flex;align-items:center;justify-content:center;padding:18px;z-index:20;backdrop-filter:blur(4px)}[data-theme="light"] .modal-layer{background:rgba(15,23,42,.20)}.modal-card{width:100%;border-radius:22px;padding:18px}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.modal-head h1{font-size:18px;margin:0}.close-modal{background:transparent;border:0;color:var(--muted);font-size:24px;cursor:pointer}.form{display:grid;gap:11px}.form-row{display:grid;grid-template-columns:95px 1fr;align-items:center;gap:10px}.form-row label,.label{font-size:12px;color:var(--muted)}.field{min-height:40px;border-radius:12px;color:var(--text);padding:0 12px;border:1px solid var(--line);width:100%;outline:none}.field:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(47,124,255,.16)}textarea.field{padding-top:12px;resize:none;min-height:72px}.btn{border:0;border-radius:13px;height:46px;padding:0 18px;font-weight:800;cursor:pointer;text-decoration:none;display:flex;align-items:center;justify-content:center;transition:.2s}.btn:hover{transform:translateY(-1px)}.btn-primary{background:linear-gradient(135deg,var(--accent),#1768ff);color:#fff;box-shadow:0 14px 24px rgba(47,124,255,.24)}.btn-secondary{background:var(--panel-2);border:1px solid var(--line);color:var(--text)}.btn-danger{background:linear-gradient(135deg,#ef4444,#dc2626);color:#fff}.helper{font-size:12px;color:var(--muted);line-height:1.45;margin:8px 0}.filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:6px 0 14px}.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:12px}.summary-card{border-radius:15px;padding:10px;text-align:center}.summary-card small{display:block;color:var(--muted);font-size:10px}.summary-card strong{display:block;font-size:13px;margin-top:3px}.table-card{border-radius:18px;overflow:hidden;margin-bottom:14px}.table-row{display:grid;grid-template-columns:1.35fr repeat(4,.75fr);gap:5px;padding:9px 10px;border-bottom:1px solid var(--line);font-size:11px;align-items:center}.table-row:last-child{border-bottom:0}.table-row.head{color:var(--muted);font-weight:800;background:var(--panel-2)}.status{font-weight:900;color:var(--green)}.status.bad{color:var(--red)}.collection-card,.row-card{background:var(--panel-2);border:1px solid var(--line);border-radius:16px;padding:12px;margin-bottom:10px}.collection-card{display:flex;align-items:center;justify-content:space-between;gap:10px}.btn-sm{height:32px;border-radius:10px;font-size:12px;padding:0 12px}.settings-list{display:grid;gap:12px;margin-top:16px}.setting-card{border-radius:18px;padding:14px;display:grid;grid-template-columns:44px 1fr auto;gap:12px;align-items:center;text-decoration:none;color:var(--text)}.setting-card:hover{border-color:rgba(47,124,255,.5)}.setting-card.danger{background:var(--danger-bg);border-color:var(--danger-border);color:var(--danger-text)}.setting-icon{height:42px;width:42px;border-radius:13px;display:flex;align-items:center;justify-content:center;background:rgba(47,124,255,.14);font-size:20px}.danger .setting-icon{background:rgba(239,68,68,.14)}.setting-card strong{display:block;font-size:14px}.setting-card small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.danger small{color:var(--danger-text);opacity:.8}.user-list{display:grid;gap:10px}.user-row{display:grid;grid-template-columns:44px 1fr auto;gap:10px;align-items:center;background:var(--panel-2);border:1px solid var(--line);border-radius:16px;padding:10px}.avatar{height:40px;width:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:900;background:linear-gradient(135deg,var(--accent),#7c3aed)}.badge{font-size:11px;font-weight:800;border-radius:999px;padding:6px 9px;background:rgba(47,124,255,.14);color:var(--accent)}.badge.green{background:rgba(22,163,74,.12);color:var(--green)}.badge.purple{background:rgba(124,58,237,.13);color:#a78bfa}.badge.gray{background:rgba(100,116,139,.13);color:var(--muted)}.role-card{border:1px solid var(--line);background:var(--panel-2);border-radius:18px;padding:13px;margin-bottom:12px}.role-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-weight:900}.chips{display:flex;flex-wrap:wrap;gap:7px}.account-chip{border:1px solid var(--line);border-radius:10px;padding:7px 9px;font-size:12px;background:var(--panel);display:inline-flex;gap:6px;align-items:center}.account-chip.ok:after{content:'✓';color:var(--green);font-weight:900}.account-chip.no:after{content:'×';color:var(--red);font-weight:900}.link-row,.hotkey-row{display:grid;grid-template-columns:42px 1fr auto;gap:10px;align-items:center;background:var(--panel-2);border:1px solid var(--line);border-radius:16px;padding:11px;margin-bottom:10px}.link-ico{height:38px;width:38px;border-radius:12px;background:rgba(47,124,255,.14);display:flex;align-items:center;justify-content:center}.switch{position:relative;width:43px;height:24px;display:inline-block}.switch input{display:none}.slider{position:absolute;inset:0;background:#94a3b8;border-radius:999px;cursor:pointer;transition:.2s}.slider:before{content:"";height:18px;width:18px;border-radius:50%;background:#fff;position:absolute;left:3px;top:3px;transition:.2s;box-shadow:0 2px 8px rgba(0,0,0,.25)}.switch input:checked+.slider{background:var(--accent)}.switch input:checked+.slider:before{transform:translateX(19px)}.keycap{min-width:58px;text-align:center;border:1px solid var(--line);border-radius:10px;padding:7px;background:var(--panel);font-weight:900;font-size:12px}.danger-panel{background:var(--danger-bg);border:1px solid var(--danger-border);border-radius:18px;padding:14px;color:var(--danger-text);margin-bottom:14px}.danger-head{display:flex;justify-content:space-between;align-items:center;font-weight:900;margin-bottom:8px}.dropdown-demo{display:grid;grid-template-columns:80px 1fr;gap:10px;align-items:start;margin-bottom:13px}.dropdown-box{border-radius:14px;overflow:hidden}.dropdown-trigger{padding:11px 12px;display:flex;justify-content:space-between;align-items:center;font-weight:800}.dropdown-menu{border-top:1px solid var(--line);padding:5px}.dropdown-option{padding:9px 10px;border-radius:10px;font-size:12px;display:flex;justify-content:space-between}.dropdown-option.active{background:rgba(47,124,255,.12);color:var(--accent);font-weight:900}.toast{position:fixed;left:50%;bottom:20px;transform:translateX(-50%) translateY(80px);background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:14px;padding:12px 16px;font-weight:800;z-index:200;opacity:0;transition:.25s}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}@media(max-width:520px){body{padding:0}.phone,.screen{min-height:100vh;border-radius:0}.phone{max-width:none;box-shadow:none;border:0}.screen{padding-left:16px;padding-right:16px}.amount{font-size:16px}.active .amount{font-size:24px}.summary-grid{grid-template-columns:repeat(2,1fr)}.table-row{grid-template-columns:1.25fr repeat(4,.7fr);font-size:10px;padding:8px}.form-row{grid-template-columns:82px 1fr}.actions{gap:8px}.action-card{padding:12px 7px}.bottom-nav{height:72px}}@media(min-width:880px){body{padding:32px}.page-shell{max-width:520px}.phone{min-height:860px}.screen{min-height:860px}}

/* Fixes and interactive states */
.modal-layer[hidden]{display:none!important}
.select{position:relative;cursor:pointer;text-align:left;border:1px solid var(--line)}
.select.is-open{border-color:var(--accent);box-shadow:0 0 0 3px rgba(47,124,255,.14)}
.select-popover{position:fixed;z-index:500;background:linear-gradient(180deg,var(--panel-2),var(--panel));border:1px solid var(--line);box-shadow:var(--shadow);border-radius:14px;padding:6px;max-height:260px;overflow:auto;animation:pop .12s ease-out;backdrop-filter:blur(16px)}
@keyframes pop{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
.select-option{width:100%;min-height:36px;border:0;background:transparent;color:var(--text);border-radius:10px;padding:8px 10px;display:flex;align-items:center;justify-content:space-between;gap:10px;font:inherit;font-size:12px;text-align:left;cursor:pointer}.select-option:hover,.select-option.active{background:rgba(47,124,255,.13);color:var(--accent)}.select-option b{font-weight:900}.table-card.freeze .table-row{grid-template-columns:1.25fr repeat(4,.68fr) .72fr}.frozen{color:var(--orange);font-weight:800}.role-select{border:0;cursor:pointer;display:inline-flex;align-items:center;gap:6px}.role-select span{opacity:.75}.account-chip[data-toggle-chip]{cursor:pointer;transition:.2s}.account-chip[data-toggle-chip]:hover{border-color:var(--accent);transform:translateY(-1px)}.hotkey-input{width:78px;min-height:34px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text);font-weight:900;font-size:11px;text-align:center;padding:6px;outline:none}.hotkey-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(47,124,255,.14)}.statement-period{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.period-btn{border:1px solid var(--line);background:var(--panel-2);color:var(--text);border-radius:12px;min-height:40px;font-weight:800;cursor:pointer}.period-btn.active{background:linear-gradient(135deg,var(--accent),#1768ff);color:#fff;border-color:transparent}.date-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}@media(max-width:520px){.table-card.freeze .table-row{grid-template-columns:1.12fr repeat(4,.66fr) .78fr;font-size:9px;gap:4px}.hotkey-input{width:70px}}

/* Revision 3: adaptive background, readable dark balances, dropdown polish, loader and errors */
html,body{min-height:100%;background:var(--bg);}
body{background:radial-gradient(circle at top,rgba(47,124,255,.16),transparent 34%),var(--bg);}
[data-theme="dark"]{--bg:#07111f;--app:#07111f;--panel:#0b1728;--panel-2:#101f33;--card:#132842;--text:#f8fbff;--muted:#b7c4d6;--line:rgba(191,211,238,.18);--glass:rgba(11,23,40,.82);--shadow:0 24px 70px rgba(0,0,0,.42);--soft:0 14px 42px rgba(0,0,0,.28);}
[data-theme="light"]{--bg:#eef3fa;--app:#f8fbff;--panel:#ffffff;--panel-2:#f4f7fb;--card:#ffffff;}
.phone{background:var(--app)}
.screen{background:linear-gradient(180deg,rgba(47,124,255,.05),transparent 23%),var(--app);}
[data-theme="dark"] .balance-card{background:linear-gradient(180deg,#163051,#0d1f35);border-color:rgba(104,166,255,.25);color:#f8fbff;box-shadow:0 12px 32px rgba(0,0,0,.25)}
[data-theme="dark"] .balance-card .amount,[data-theme="dark"] .balance-card .code{color:#fff;text-shadow:0 1px 10px rgba(0,0,0,.25)}
[data-theme="dark"] .balance-card .currency{color:#d8e8ff}.balance-card{touch-action:pan-y;cursor:pointer}.balance-card.active{transform:translateY(-2px)}
.account-slider{display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;margin:10px -4px 12px;padding:2px 4px 8px;scrollbar-width:none}.account-slider::-webkit-scrollbar{display:none}.account-chip-slider{scroll-snap-align:start;white-space:nowrap;border:1px solid var(--line);background:var(--panel-2);color:var(--muted);border-radius:999px;padding:9px 12px;font-weight:800;font-size:12px;cursor:pointer;transition:.2s}.account-chip-slider.active{background:linear-gradient(135deg,var(--accent),#1768ff);border-color:transparent;color:white;box-shadow:0 12px 24px rgba(47,124,255,.22)}
.select{display:flex;align-items:center;justify-content:space-between;gap:8px}.select-label{display:flex;align-items:center;gap:8px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-symbol,.select-option-icon{width:22px;height:22px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;background:rgba(47,124,255,.13);color:var(--accent);font-size:12px;font-weight:900;flex:0 0 22px}.chev{transition:.2s}.select.is-open .chev{transform:rotate(180deg)}.select-option-main{display:flex;align-items:center;gap:8px;min-width:0}.select-option-icon{background:rgba(47,124,255,.12)}
.select-popover{position:fixed;z-index:500;background:linear-gradient(180deg,var(--panel),var(--panel-2));border:1px solid var(--line);box-shadow:var(--shadow);border-radius:16px;padding:6px;max-height:260px;overflow:auto;animation:pop .12s ease-out;backdrop-filter:blur(18px)}
[data-theme="dark"] .select-popover{background:linear-gradient(180deg,rgba(16,31,51,.98),rgba(9,20,35,.98))}.select-option{font-weight:750}.select-option.active .select-option-icon{background:var(--accent);color:#fff}
.bottom-nav{grid-template-columns:repeat(3,1fr)}
.page-loader{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(7,17,31,.20);backdrop-filter:blur(6px);z-index:999;opacity:0;pointer-events:none;transition:.22s}.page-loader.show{opacity:1;pointer-events:auto}.loader-card{display:flex;align-items:center;gap:12px;border:1px solid var(--line);background:var(--panel);box-shadow:var(--shadow);border-radius:18px;padding:14px 18px;color:var(--text)}.spinner{width:24px;height:24px;border-radius:50%;border:3px solid rgba(47,124,255,.20);border-top-color:var(--accent);animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.error-screen{min-height:calc(100vh - 48px);display:flex;align-items:center;justify-content:center;padding:24px}.error-card{width:min(520px,100%);border:1px solid var(--line);background:linear-gradient(180deg,var(--panel),var(--panel-2));box-shadow:var(--shadow);border-radius:32px;padding:32px;text-align:center}.error-code{font-size:84px;line-height:1;font-weight:950;letter-spacing:-5px;background:linear-gradient(135deg,var(--accent),#8abaff);-webkit-background-clip:text;background-clip:text;color:transparent}.error-card h1{margin:12px 0 8px}.error-card p{color:var(--muted);line-height:1.55}.error-actions{display:flex;gap:10px;justify-content:center;margin-top:22px;flex-wrap:wrap}
@media(max-width:520px){body{background:var(--app);padding:0}.page-shell{width:100%;max-width:none}.phone,.screen{width:100%;min-height:100dvh;border-radius:0}.screen{overflow-y:auto}.modal-layer{position:fixed}.select-popover{max-width:calc(100vw - 16px)}.error-screen{min-height:100dvh;padding:16px;background:var(--app)}.error-card{border-radius:24px;padding:24px}.error-code{font-size:72px}}
@media(min-width:521px){.page-shell{max-width:430px}.phone{min-height:820px}.screen{min-height:820px;max-height:820px;overflow-y:auto}}

/* Revision 5: header parity, carousel, operation details, polished dropdowns */
.app-header{margin-bottom:16px}.app-header .chat-select{flex:1;max-width:none;font-weight:750}.app-header .theme-toggle{flex:0 0 40px}
.chev{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;line-height:1;font-size:18px;font-weight:950;transform-origin:center;color:var(--muted);margin-left:auto}.select.is-open .chev{transform:rotate(180deg);color:var(--accent)}
.balance-carousel{position:relative;display:block;height:132px;margin:10px 0 8px;overflow:hidden;touch-action:pan-y}.balance-card{position:absolute;top:10px;left:50%;width:47%;min-height:104px;opacity:.55;transform:translateX(-50%) scale(.84);transition:transform .38s cubic-bezier(.2,.8,.2,1),opacity .28s,border-color .28s,box-shadow .28s;z-index:1}.balance-card.is-prev{transform:translateX(-112%) scale(.86);opacity:.68}.balance-card.is-next{transform:translateX(12%) scale(.86);opacity:.68}.balance-card.is-active,.balance-card.active{transform:translateX(-50%) scale(1);opacity:1;z-index:3;min-height:118px}.balance-card.is-hidden{opacity:0;pointer-events:none;transform:translateX(-50%) scale(.65)}.balance-card.slide-left,.balance-card.slide-right{will-change:transform}.balance-card .amount{font-weight:720;letter-spacing:-.03em;font-size:clamp(15px,4vw,19px);line-height:1.04}.balance-card.is-active .amount,.balance-card.active .amount{font-weight:760;font-size:clamp(20px,6vw,26px)}.balance-card .code{font-weight:650}.currency{font-weight:650}.active .currency,.balance-card.is-active .currency{font-size:31px;font-weight:720}.dot{border:0;cursor:pointer;padding:0;transition:.2s}.dot:hover{transform:scale(1.12)}
.history-card{position:relative;display:block;padding:34px 12px 12px;cursor:pointer;transition:.2s}.history-card:hover{border-color:rgba(47,124,255,.45);transform:translateY(-1px)}.history-card .time{position:absolute;top:12px;right:12px;white-space:nowrap;text-align:right;font-size:11px}.history-card .op-title{padding-right:88px}.detail-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;border:1px solid var(--line);background:var(--panel-2);border-radius:14px;padding:11px 12px}.detail-row span{color:var(--muted);font-size:12px}.detail-row b{text-align:right;font-size:13px}.operation-details{max-width:100%}
.action-card .ico{width:34px;height:34px;margin:0 auto 8px;display:flex;align-items:center;justify-content:center;color:var(--accent);font-size:0}.action-card .ico svg{width:30px;height:30px;display:block;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.action-card .ico-truck svg{fill:none}
.scroll-top{position:absolute;right:18px;bottom:92px;width:44px;height:44px;border-radius:999px;border:1px solid rgba(47,124,255,.34);background:linear-gradient(135deg,var(--accent),#1768ff);color:#fff;font-size:20px;font-weight:900;box-shadow:0 16px 28px rgba(47,124,255,.28);z-index:45;opacity:0;pointer-events:none;transform:translateY(12px) scale(.92);transition:.24s;cursor:pointer}.scroll-top.show{opacity:1;pointer-events:auto;transform:translateY(0) scale(1)}
.select-symbol,.select-option-icon{font-family:inherit;font-size:10px;font-weight:950;letter-spacing:-.04em}.chat-select .select-symbol{display:none}.select-option{font-weight:720}.select-popover{scrollbar-width:none}.select-popover::-webkit-scrollbar{display:none}
.screen{scrollbar-width:none;-ms-overflow-style:none}.screen::-webkit-scrollbar{width:0;height:0;display:none}html::-webkit-scrollbar,body::-webkit-scrollbar{width:0;height:0;display:none}html,body{scrollbar-width:none;-ms-overflow-style:none}
@media(max-width:520px){.balance-carousel{height:130px}.balance-card{width:48%}.balance-card.is-prev{transform:translateX(-111%) scale(.85)}.balance-card.is-next{transform:translateX(11%) scale(.85)}.scroll-top{right:16px;bottom:88px}.history-card .op-title{padding-right:82px}}

/* Restore v4 compactness/adaptivity while preserving v5 carousel and details */
html,body{height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}
html::-webkit-scrollbar,body::-webkit-scrollbar,.screen::-webkit-scrollbar,.select-popover::-webkit-scrollbar{display:none;width:0;height:0}
.screen,.select-popover{-ms-overflow-style:none;scrollbar-width:none}
body{padding:18px;background:radial-gradient(circle at top,rgba(47,124,255,.13),transparent 32%),var(--bg)}
.page-shell{max-width:410px}.phone{max-width:400px;border-radius:25px}.screen{padding:16px 16px 86px;overflow-y:auto}
.top-row,.app-header{margin-bottom:14px}.page-title{font-size:21.5px}.subtitle{font-size:11.7px;margin-bottom:13px}.title-row{gap:10px;margin-bottom:13px}.icon-btn,.back-btn{height:36px;width:36px;border-radius:12px}.app-header .theme-toggle{flex:0 0 36px}.select{height:40px;border-radius:13px;padding:0 12px;font-size:12.8px}.select.small{height:31px;font-size:11px;border-radius:10px}.field{min-height:36px;border-radius:11px;font-size:12.6px}.btn{height:41px;border-radius:12px;font-size:12.8px}.btn-sm{height:29px;font-size:11px}
.balance-carousel{height:124px;margin:8px 0 6px}.balance-card{min-height:96px;border-radius:16px;gap:4px}.balance-card.is-active,.balance-card.active{min-height:110px}.currency{font-size:22px}.active .currency,.balance-card.is-active .currency{font-size:29px}.amount{font-weight:700;letter-spacing:-.03em;line-height:1.03;white-space:nowrap}.balance-card.is-active .amount,.balance-card.active .amount{font-weight:740}.code{font-size:10.5px}.dots{margin:8px 0 14px}.dot:focus-visible{outline:3px solid rgba(47,124,255,.25)}
.segmented{margin:10px 0}.segmented button{padding:8px 8px;font-size:12px}.actions{gap:8px;margin:12px 0 16px}.action-card{border-radius:16px;padding:12px 8px}.action-card strong{font-size:11px}.action-card small{font-size:9.5px}.section-head{margin:13px 0 9px}.section-head h2{font-size:16px}.history-list{gap:8px}.history-card{border-radius:16px;padding:32px 10px 10px}.history-card .time{top:10px;right:10px;font-size:10.8px}.time,.op-sub,.helper{font-size:10.8px}.op-title{font-size:13px}.amount-row{font-size:11.8px}.bottom-nav{height:68px}.nav-item{font-size:10px}.nav-item .nav-ico{font-size:18px}.modal-card{border-radius:20px;padding:16px}.modal-head h1{font-size:16px}.form{gap:9px}.form-row{grid-template-columns:86px 1fr;gap:8px}.form-row label,.label{font-size:10.8px}.filters{gap:7px}.summary-grid{gap:7px}.summary-card{padding:9px;border-radius:14px}.summary-card strong{font-size:11.8px}.table-row{font-size:10px;padding:8px 9px}.setting-card{border-radius:16px;padding:12px;grid-template-columns:39px 1fr auto}.setting-icon{height:37px;width:37px;border-radius:12px;font-size:16px}.setting-card strong{font-size:12.7px}.setting-card small{font-size:10px}.user-row,.link-row,.hotkey-row,.collection-card,.row-card{border-radius:15px;padding:10px}.avatar{height:36px;width:36px;font-size:12px}.badge{font-size:10px}.keycap{font-size:10.5px}.danger-panel{border-radius:16px;padding:12px}.toast{font-size:12px}.account-slider{display:none!important}
.select-symbol,.select-option-icon{font-size:10px;font-family:inherit;font-weight:900}.select-option{font-size:11.2px;min-height:33px}.select-popover{border-radius:15px;max-height:240px}.dropdown-box{border-radius:13px}.dropdown-option{font-size:11px}.chev{font-size:19px;font-weight:950;width:19px;height:19px;align-self:center;transform-origin:center}
@media(max-width:520px){body{padding:0;background:var(--app)}.page-shell{max-width:none}.phone{border-radius:0;max-width:none;min-height:100dvh}.screen{min-height:100dvh;max-height:none;padding:14px 14px 86px}.bottom-nav{position:fixed;left:0;right:0;bottom:0;height:70px;z-index:110;padding-bottom:env(safe-area-inset-bottom)}.modal-layer{position:fixed}.balance-carousel{height:124px}.balance-card{min-height:92px;width:48%}.balance-card.is-active,.balance-card.active{min-height:106px}.actions{grid-template-columns:repeat(3,minmax(0,1fr))}.form-row{grid-template-columns:78px 1fr}.table-card{overflow-x:auto}.table-card .table-row{min-width:560px}.table-card.freeze .table-row{min-width:640px}.summary-grid{grid-template-columns:repeat(2,1fr)}.scroll-top{position:fixed;right:16px;bottom:88px}}
@media(min-width:521px){.page-shell{max-width:410px}.phone{height:min(820px,calc(100vh - 36px));min-height:0}.screen{height:100%;min-height:0;max-height:none}.bottom-nav{position:absolute}.modal-layer{position:absolute}}

/* Revision 6: dropdown icons, history typography, modal stacking, nav icons */
.select-symbol{display:none!important}
.chev,.demo-chev{font-size:0!important;line-height:0;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin-left:auto;color:var(--muted);transform:none!important;background:transparent!important;border:0!important;flex:0 0 20px;position:relative;opacity:1}
.chev::before,.demo-chev::before{content:"";width:8px;height:8px;border-right:2.4px solid currentColor;border-bottom:2.4px solid currentColor;transform:rotate(45deg) translate(-1px,-2px);border-radius:1px;display:block;transition:transform .18s ease,color .18s ease}
.select.is-open .chev::before{transform:rotate(225deg) translate(-1px,-2px);color:var(--accent)}
.select-label{display:inline-flex;align-items:center;gap:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.select-option-main{display:flex;align-items:center;gap:10px;min-width:0}.select-option-main span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-option-icon{display:none!important}.chat-popover .select-option-icon,.dropdown-option.chat-demo .chat-avatar{display:inline-flex!important;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;flex:0 0 26px;background:linear-gradient(135deg,var(--accent),#7c3aed);color:#fff;font-size:11px;font-weight:900;box-shadow:0 8px 18px rgba(47,124,255,.2)}.chat-popover .select-option{min-height:40px}.select-option b{font-size:13px;color:var(--accent)}
.dropdown-trigger{display:flex;align-items:center;justify-content:space-between}.dropdown-option.chat-demo{display:flex;align-items:center;gap:10px}.dropdown-option.chat-demo span:last-child{margin-left:auto}.dropdown-menu .dropdown-option:not(.chat-demo){padding-left:12px}
.action-card small{display:none!important}.action-card{min-height:82px;display:flex;flex-direction:column;justify-content:center;align-items:center}.action-card strong{font-weight:760;line-height:1.12;letter-spacing:-.01em}.action-card .ico{margin-bottom:9px!important}
.history-card{padding:36px 12px 12px!important;display:block!important}.history-card .time{top:10px!important;right:12px!important;left:auto;display:inline-flex;align-items:center;gap:4px;max-width:none;min-width:max-content;white-space:nowrap!important;padding:3px 8px;border:1px solid var(--line);border-radius:999px;background:rgba(47,124,255,.08);color:var(--muted);font-size:10.5px!important;font-weight:720;line-height:1!important}.history-card .op-title{display:inline-flex;align-items:center;padding:4px 8px!important;margin:0 0 6px!important;border-radius:999px;background:rgba(47,124,255,.12);color:var(--accent);font-size:12.4px!important;font-weight:780;letter-spacing:-.01em}.history-card .op-sub{font-size:11.2px!important;line-height:1.35;margin-bottom:8px;color:var(--muted)}.amount-row{align-items:center;padding:7px 9px;margin-top:6px!important;border:1px solid var(--line);border-radius:12px;background:rgba(148,163,184,.06);font-size:11.2px!important}.amount-row span{color:var(--muted);font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.amount-row b{font-size:11.8px;font-weight:760;font-variant-numeric:tabular-nums;white-space:nowrap;letter-spacing:-.01em}.pos,.neg{font-weight:760!important}
.modal-layer{z-index:220!important}.modal-layer[hidden]{display:none!important}body.modal-open .bottom-nav{filter:blur(5px);opacity:.45;pointer-events:none}.modal-card.operation-details{width:min(360px,100%);max-height:min(650px,calc(100dvh - 32px));display:flex;flex-direction:column;padding:14px!important}.operation-details .modal-head{margin-bottom:10px}.operation-details .form{overflow:auto;max-height:calc(100dvh - 116px);padding-right:2px;scrollbar-width:none;gap:7px}.operation-details .form::-webkit-scrollbar{display:none}.operation-details .detail-row{padding:8px 10px;border-radius:12px;gap:10px}.operation-details .detail-row span{font-size:10.5px}.operation-details .detail-row b{font-size:11.4px;line-height:1.25}.operation-details .btn{height:38px;margin-top:2px}
.bottom-nav{z-index:90}.nav-item .nav-ico{font-size:0!important;width:24px;height:24px;display:flex;align-items:center;justify-content:center}.nav-item .nav-ico svg{width:23px;height:23px;display:block;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.nav-item.active .nav-ico svg{filter:drop-shadow(0 6px 10px rgba(47,124,255,.25))}
@media(max-width:520px){.modal-layer{z-index:220!important}.history-card .time{font-size:10px!important;right:10px!important}.history-card .op-title{font-size:12px!important}.modal-card.operation-details{max-height:calc(100dvh - 26px)}.operation-details .form{max-height:calc(100dvh - 108px)}}

/* Revision 7: balances page refinements, dropdown chevrons, history layout */
.balance-carousel{overflow:visible!important;padding:8px 0 20px!important;margin-bottom:-4px!important;isolation:isolate}.balance-card{box-shadow:0 12px 30px rgba(15,23,42,.10)!important}.balance-card.is-active,.balance-card.active{box-shadow:0 0 0 1px rgba(47,124,255,.22),0 22px 54px rgba(47,124,255,.23),0 20px 42px rgba(2,6,23,.18)!important}.dots{position:relative;z-index:2;background:transparent!important}
.chev,.demo-chev{width:1.35em!important;height:1.35em!important;flex-basis:1.35em!important}.chev::before,.demo-chev::before{width:.48em!important;height:.48em!important;border-right:.18em solid currentColor!important;border-bottom:.18em solid currentColor!important;border-radius:.08em!important;transform:rotate(45deg) translate(-.06em,-.12em)!important}.select.small .chev{width:1.15em!important;height:1.15em!important;flex-basis:1.15em!important}.select.small .chev::before{border-right:.17em solid currentColor!important;border-bottom:.17em solid currentColor!important}.chip .chev{width:1em!important;height:1em!important;flex-basis:1em!important}.select.is-open .chev::before{transform:rotate(225deg) translate(-.08em,-.12em)!important;color:var(--accent)}
.history-card{position:relative!important;padding:38px 11px 11px!important;cursor:pointer;transition:border-color .2s ease,transform .2s ease}.history-card:hover{border-color:rgba(47,124,255,.35);transform:translateY(-1px)}.history-card .op-title{position:absolute;left:11px;top:9px;max-width:calc(100% - 126px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0!important;padding:4px 9px!important}.history-card .time{position:absolute!important;right:11px!important;top:9px!important}.history-card .op-sub{margin-top:2px!important;font-weight:620}.amount-row{display:grid!important;grid-template-columns:1fr auto;gap:10px}.amount-row b{padding:2px 7px;border-radius:999px;background:rgba(148,163,184,.08)}.amount-row b.pos{background:rgba(22,163,74,.10)}.amount-row b.neg{background:rgba(239,68,68,.10)}
.nav-item .nav-ico svg{stroke-width:2!important}.nav-item .nav-ico svg circle{fill:none!important}
.balance-filters{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 36px!important;align-items:center!important;flex-wrap:nowrap!important}.balance-filters .refresh-btn{justify-self:end}.refresh-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.balances-summary{grid-template-columns:1fr 1fr 2fr!important}.balances-summary .rub-card{text-align:left;padding-left:14px}.balances-summary .rub-card strong{font-size:14px}.balance-content{min-height:245px}.project-empty{min-height:244px;border:1px dashed rgba(47,124,255,.32);border-radius:18px;background:linear-gradient(180deg,rgba(47,124,255,.08),rgba(47,124,255,.03));display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:22px;color:var(--text);margin-bottom:14px}.project-empty[hidden]{display:none!important}.empty-illustration{width:68px;height:68px;border-radius:22px;display:flex;align-items:center;justify-content:center;background:rgba(47,124,255,.12);color:var(--accent);margin-bottom:12px}.empty-illustration svg{width:42px;height:42px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.project-empty b{font-size:16px}.project-empty p{font-size:12px;line-height:1.45;color:var(--muted);margin:6px 0 0}.balances-table{margin-bottom:12px}.statement-main{width:100%;margin:-2px 0 14px}.collection-head{margin-top:12px!important}.collection-history{align-items:stretch!important}.collection-main{min-width:0;flex:1}.collection-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:4px}.collection-top b{font-size:13px;line-height:1;color:var(--accent);padding:4px 8px;border-radius:999px;background:rgba(47,124,255,.12)}.collection-top span{font-size:10.5px;color:var(--muted);white-space:nowrap}.collection-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}.collection-meta span{font-size:10px;color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:3px 7px}.collection-amount{font-size:12px;align-self:center;white-space:nowrap}.accept-modal .detail-row{display:grid;grid-template-columns:90px 1fr;align-items:center;background:var(--panel-2);border:1px solid var(--line);border-radius:12px;padding:9px 10px}.accept-modal .detail-row span{font-size:11px;color:var(--muted)}.accept-modal .detail-row b{font-size:12px}
@media(max-width:520px){.balance-filters{grid-template-columns:1fr 1fr 36px!important}.balances-summary{grid-template-columns:1fr 1fr!important}.balances-summary .rub-card{grid-column:1/-1}.balance-content{min-height:230px}.project-empty{min-height:230px}.collection-card.collection-history{display:grid;grid-template-columns:1fr auto;align-items:center}.collection-history .btn-sm{grid-column:1/-1;width:100%}.collection-amount{justify-self:end}.history-card .op-title{max-width:calc(100% - 112px)}}


/* Revision 8: dropdown chevrons, carousel dots, balances spacing */
.chev,.demo-chev{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  position:relative!important;
  color:currentColor!important;
  opacity:.95!important;
  line-height:1!important;
  flex-shrink:0!important;
}
.chev::before,.demo-chev::before{
  content:""!important;
  display:block!important;
  width:.56em!important;
  height:.56em!important;
  border:0!important;
  border-right:.18em solid currentColor!important;
  border-bottom:.18em solid currentColor!important;
  border-radius:.07em!important;
  transform:rotate(45deg) translate(-.02em,-.10em)!important;
  background:transparent!important;
  box-shadow:none!important;
}
.select.small .chev,.select.small .demo-chev{font-size:.82em!important;width:1.05em!important;height:1.05em!important;flex-basis:1.05em!important}
.chip .chev{font-size:.78em!important;width:1em!important;height:1em!important;flex-basis:1em!important}
.icon-btn .chev{font-size:.78em!important}
.select.is-open .chev::before{transform:rotate(225deg) translate(-.04em,-.10em)!important;color:var(--accent)!important}
.select-popover .select-option b,.dropdown-option > span:last-child:only-child{display:none!important}
.select-option{justify-content:flex-start!important}
.select-option-main{width:100%;justify-content:flex-start!important}
.dropdown-option{justify-content:flex-start!important;gap:8px!important}
.dropdown-option.active{box-shadow:inset 0 0 0 1px rgba(47,124,255,.10)}
.dots{
  width:max-content!important;
  min-width:58px!important;
  margin:8px auto 18px!important;
  padding:6px 9px!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.92)!important;
  box-shadow:0 10px 24px rgba(15,23,42,.12)!important;
  border:1px solid rgba(226,232,240,.78)!important;
  backdrop-filter:blur(12px)!important;
}
[data-theme="dark"] .dots{
  background:rgba(255,255,255,.90)!important;
  border-color:rgba(255,255,255,.56)!important;
  box-shadow:0 14px 30px rgba(2,6,23,.20)!important;
}
.dots .dot{background:#c7d2e3!important;box-shadow:none!important}
.dots .dot.active{background:var(--accent)!important}
.balance-content.has-project{min-height:0!important}
.balance-content.has-project .balances-table{margin-bottom:8px!important}
.statement-main{margin:0 0 14px!important}
.refresh-btn svg{width:19px!important;height:19px!important;stroke-width:2.15!important}
.balances-summary .rub-card{text-align:center!important;padding-left:10px!important;padding-right:10px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important}
.balances-summary .rub-card strong{text-align:center!important;width:100%!important}


/* Revision 9: settings simplification, chat arrows, static hotkeys */
.chat-select .chev{display:inline-flex!important;visibility:visible!important;opacity:.95!important;margin-left:auto!important;color:var(--muted)!important}
.chat-select .chev::before{content:""!important;display:block!important;width:.56em!important;height:.56em!important;border-right:.18em solid currentColor!important;border-bottom:.18em solid currentColor!important;border-radius:.07em!important;transform:rotate(45deg) translate(-.02em,-.10em)!important;background:transparent!important;box-shadow:none!important}
.chat-select.is-open .chev::before{transform:rotate(225deg) translate(-.04em,-.10em)!important;color:var(--accent)!important}
[data-theme="dark"] .dots{background:rgba(15,32,54,.72)!important;border-color:rgba(104,166,255,.22)!important;box-shadow:0 12px 28px rgba(0,0,0,.24)!important}
[data-theme="dark"] .dots .dot{background:rgba(148,163,184,.50)!important}
.setting-icon.svg svg{width:24px;height:24px;display:block;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.setting-icon.svg{color:var(--accent)}.setting-card{grid-template-columns:44px 1fr auto}.card-arrow{font-size:22px;color:var(--muted)}
.auto-orders-card{margin:14px 0 16px;border:1px solid var(--line);background:linear-gradient(180deg,var(--panel-2),var(--panel));box-shadow:var(--soft);border-radius:20px;padding:14px}.auto-orders-top{display:grid;grid-template-columns:44px 1fr;gap:12px;align-items:start}.auto-orders-top strong{font-size:14px}.auto-orders-top p{margin:4px 0 0;color:var(--muted);font-size:11.5px;line-height:1.45}.auto-orders-controls{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;margin-top:12px}.code-red-card{cursor:default}.code-red-card .switch{justify-self:end}.back-btn{height:46px!important;width:42px!important;font-size:28px!important;font-weight:700!important;line-height:1!important;flex:0 0 42px}.role-select .chev{display:inline-flex!important;visibility:visible!important;opacity:1!important;margin-left:6px!important}.badge.orange{background:rgba(245,158,11,.13);color:var(--orange)}.add-link-simple{margin-top:18px}.static-hotkeys{display:grid;gap:10px}.static-hotkeys .hotkey-row{grid-template-columns:minmax(86px,.45fr) 1fr!important}.static-hotkeys kbd{justify-self:start;min-width:76px;text-align:center;border:1px solid var(--line);background:var(--panel);border-radius:10px;padding:7px 10px;color:var(--accent);font-weight:850;font-family:inherit;font-size:12px;box-shadow:inset 0 -1px 0 rgba(148,163,184,.16)}.static-hotkeys .hotkey-row span{font-size:12.5px;line-height:1.35;color:var(--text)}
@media(max-width:520px){.auto-orders-controls{grid-template-columns:1fr auto}.setting-card{grid-template-columns:42px 1fr auto}.static-hotkeys .hotkey-row{grid-template-columns:82px 1fr!important}.back-btn{height:48px!important}}

/* Revision 10: dropdown arrows everywhere, balance limits modal, polished toasts/preloader */
.select .chev,
.js-select .chev,
.dropdown-trigger .demo-chev,
.role-select .chev,
.chat-select .chev{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 1.25em!important;
  width:1.25em!important;
  height:1.25em!important;
  margin-left:auto!important;
  color:var(--muted)!important;
  opacity:.95!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  font-size:1em!important;
  line-height:1!important;
  transform:none!important;
}
.select.small .chev{font-size:.82em!important;flex-basis:1.05em!important;width:1.05em!important;height:1.05em!important}
.select .chev::before,
.js-select .chev::before,
.dropdown-trigger .demo-chev::before,
.role-select .chev::before,
.chat-select .chev::before{
  content:""!important;
  display:block!important;
  width:.54em!important;
  height:.54em!important;
  border:0!important;
  border-right:.18em solid currentColor!important;
  border-bottom:.18em solid currentColor!important;
  border-radius:.08em!important;
  transform:rotate(45deg) translate(-.03em,-.11em)!important;
  background:transparent!important;
  box-shadow:none!important;
}
.select.is-open .chev::before,
.js-select.is-open .chev::before,
.dropdown-box:hover .demo-chev::before,
.chat-select.is-open .chev::before{
  transform:rotate(225deg) translate(-.04em,-.10em)!important;
  color:var(--accent)!important;
}
.select-option::after,.dropdown-option::after,.select-option.active::after,.dropdown-option.active::after{content:none!important;display:none!important}
.select-option.active,.dropdown-option.active{background:rgba(47,124,255,.12)!important;color:var(--accent)!important;box-shadow:inset 0 0 0 1px rgba(47,124,255,.10)!important}

.code-red-card .setting-icon{color:var(--red)!important;background:rgba(239,68,68,.14)!important}
.code-red-card .switch input:checked + .slider{background:var(--red)!important}
.code-red-card .switch input:checked + .slider:before{box-shadow:0 2px 10px rgba(239,68,68,.35)!important}

.back-btn{
  background:linear-gradient(180deg,var(--panel-2),var(--panel))!important;
  border-color:rgba(47,124,255,.22)!important;
  box-shadow:0 10px 22px rgba(15,23,42,.08)!important;
  color:var(--accent)!important;
  font-size:0!important;
  position:relative!important;
}
.back-btn::before{
  content:"";
  width:10px;height:10px;
  border-left:2.5px solid currentColor;
  border-bottom:2.5px solid currentColor;
  transform:rotate(45deg) translate(2px,-1px);
  border-radius:1px;
}
.back-btn:hover{box-shadow:0 14px 28px rgba(47,124,255,.14)!important;background:rgba(47,124,255,.10)!important}

.toast{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  min-width:min(330px,calc(100vw - 32px));
  max-width:calc(100vw - 32px);
  padding:12px 14px 12px 12px!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,var(--panel),var(--panel-2))!important;
  border:1px solid rgba(47,124,255,.22)!important;
  box-shadow:0 18px 44px rgba(2,6,23,.20),0 0 0 1px rgba(255,255,255,.04) inset!important;
  color:var(--text)!important;
  font-size:12.2px!important;
  font-weight:760!important;
  line-height:1.3!important;
  backdrop-filter:blur(18px)!important;
}
.toast::before{
  content:"";
  width:28px;height:28px;flex:0 0 28px;border-radius:50%;
  background:rgba(47,124,255,.14);
  border:1px solid rgba(47,124,255,.22);
  background-image:url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 14.5l4 4L20.5 10' fill='none' stroke='%232f7cff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:center;background-size:28px 28px;
}
.page-loader{background:rgba(7,17,31,.16)!important}.loader-card{padding:14px!important;border-radius:999px!important;gap:0!important}.loader-card b{display:none!important}.spinner{width:28px!important;height:28px!important;border-width:3px!important}

.balances-table .table-row:not(.head){cursor:pointer;transition:background .18s ease,border-color .18s ease,transform .18s ease}.balances-table .table-row:not(.head):hover{background:rgba(47,124,255,.08);transform:translateY(-1px)}
.limits-modal{width:min(372px,100%);max-height:min(680px,calc(100dvh - 28px));display:flex;flex-direction:column}.limits-modal .modal-head{margin-bottom:10px}.limits-modal .modal-head h1{font-size:15.5px}.limits-form{overflow:auto;scrollbar-width:none;padding-right:2px}.limits-form::-webkit-scrollbar{display:none}.limits-grid{display:grid;gap:9px}.limit-project{border:1px solid var(--line);background:var(--panel-2);border-radius:16px;padding:10px}.limit-project h3{margin:0 0 8px;font-size:12px;color:var(--accent);letter-spacing:.01em}.limit-row{display:grid;grid-template-columns:42px 1fr;gap:8px;align-items:center;margin-top:7px}.limit-row span{font-size:11px;color:var(--muted);font-weight:800}.limit-row .field{height:34px;min-height:34px;font-size:12px}.limits-modal .btn{height:39px}
@media(max-width:520px){.limits-modal{max-height:calc(100dvh - 24px)}.toast{bottom:84px}}

/* Revision 11: stable nav after modals + clean outline chevrons */
.chev,.demo-chev{font-size:0!important;line-height:0!important;color:var(--muted)!important;overflow:visible!important;text-indent:0!important}
.chev::before,.demo-chev::before{font-size:14px!important;color:var(--muted)!important}
.select.small .chev::before{font-size:11px!important}
.chat-select .chev::before{font-size:14px!important}
.select.is-open .chev::before,.js-select.is-open .chev::before,.chat-select.is-open .chev::before{color:var(--accent)!important}
body.modal-open .bottom-nav{filter:blur(5px);opacity:.45;pointer-events:auto!important}
body:not(.modal-open) .bottom-nav{filter:none!important;opacity:1!important;pointer-events:auto!important}
.modal-layer[hidden]{display:none!important;pointer-events:none!important}
.modal-layer:not([hidden]){pointer-events:auto!important}

/* Revision 12: keep bottom navigation clickable after closing large modals */
body:not(.modal-open) .modal-layer{pointer-events:none!important;display:none!important}
body:not(.modal-open) .bottom-nav,
body:not(.modal-open) .nav-item{pointer-events:auto!important;filter:none!important;opacity:1!important}
body.modal-open .bottom-nav{pointer-events:none!important;filter:blur(5px)!important;opacity:.45!important}

/* Revision 13: toast/nav stability + accounts and bot notification settings */
.toast{pointer-events:none!important;z-index:260!important}
.toast.show{pointer-events:none!important}
.page-loader:not(.show){pointer-events:none!important;opacity:0!important;visibility:hidden!important}
.bottom-nav{pointer-events:auto!important}
body:not(.modal-open) .bottom-nav{filter:none!important;opacity:1!important;pointer-events:auto!important}
body:not(.modal-open) .nav-item{pointer-events:auto!important}
.account-manager,.notification-settings{display:grid;gap:12px;margin-top:12px}.account-edit-list{display:grid;gap:10px}.account-edit-card,.notification-card{background:linear-gradient(180deg,var(--panel-2),var(--panel));border:1px solid var(--line);box-shadow:var(--soft);border-radius:18px;padding:13px}.inline-create{display:grid;gap:12px}.card-title-row{display:grid;grid-template-columns:42px 1fr;gap:11px;align-items:center}.card-title-row strong,.notification-head strong{display:block;font-size:13.5px}.card-title-row small,.notification-head small{display:block;color:var(--muted);font-size:11px;line-height:1.35;margin-top:3px}.create-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px}.create-row .btn{height:40px;padding:0 13px}.account-edit-list .account-edit-card{display:grid;grid-template-columns:minmax(0,1fr) 36px 36px;gap:9px;align-items:center}.account-edit-main{min-width:0}.account-edit-main b{display:block;font-size:13.5px;outline:none;border-radius:8px;padding:2px 4px;margin-left:-4px}.account-edit-main b:focus{background:rgba(47,124,255,.10);box-shadow:0 0 0 2px rgba(47,124,255,.16)}.account-edit-main small{display:block;color:var(--muted);font-size:11px;margin-top:2px}.btn-icon-action{height:36px;width:36px;border-radius:12px;border:1px solid var(--line);background:var(--panel-2);color:var(--accent);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:.18s}.btn-icon-action:hover{transform:translateY(-1px);border-color:rgba(47,124,255,.35)}.btn-icon-action.danger{color:var(--red);background:rgba(239,68,68,.08)}.btn-icon-action svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.notification-card{display:grid;gap:11px}.notification-head{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:center}.notification-head .warn{color:var(--red);background:rgba(239,68,68,.12)}.notification-text{min-height:108px!important;padding:12px!important;line-height:1.45;font-size:12.2px}.danger-switch input:checked + .slider{background:var(--red)!important}.danger-switch input:checked + .slider:before{box-shadow:0 2px 10px rgba(239,68,68,.35)!important}@media(max-width:520px){.create-row{grid-template-columns:1fr}.create-row .btn{width:100%}.notification-head{grid-template-columns:40px 1fr auto}.account-edit-list .account-edit-card{grid-template-columns:minmax(0,1fr) 34px 34px}.btn-icon-action{height:34px;width:34px}}

/* Revision 15: final UI polish */
.collection-card.collection-history{position:relative;padding-top:36px!important;align-items:center!important}.collection-history .collection-top{display:block!important;margin:0!important}.collection-history .collection-top b{display:inline-flex;align-items:center}.collection-history .collection-top span{position:absolute;top:12px;right:12px;line-height:1!important;text-align:right}.collection-history .op-sub{margin-top:5px}.nav-item .nav-ico svg{width:23px!important;height:23px!important;stroke-width:2!important}.nav-item .nav-ico svg *{vector-effect:non-scaling-stroke}.error-icon{width:78px;height:78px;margin:0 auto 16px;border-radius:26px;background:rgba(47,124,255,.12);display:flex;align-items:center;justify-content:center;color:var(--accent);box-shadow:0 14px 34px rgba(47,124,255,.12)}.error-icon svg{width:46px;height:46px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}.lock-icon{color:#35a6ff;background:rgba(53,166,255,.14)}.broken-server{color:#9db2cc;background:rgba(148,163,184,.14)}.compact-error .error-code{font-size:74px}.compact-error h1{margin:6px 0 0}.compact-error p{max-width:360px;margin:10px auto 0}.compact-error .error-actions{margin-top:20px}.compact-error .error-actions .btn{min-width:160px}@media(max-width:520px){.collection-card.collection-history{padding-top:34px!important}.collection-history .collection-top span{top:11px;right:10px}.error-icon{width:70px;height:70px;border-radius:23px}.error-icon svg{width:42px;height:42px}.compact-error .error-code{font-size:66px}}


/* Revision 16: final micro-fixes */

.collection-card.collection-history{
  padding-top:12px!important;
  align-items:center!important;
}
.collection-history .collection-main{min-width:0;flex:1 1 auto;}
.collection-history .collection-top{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  width:100%!important;
  margin:0 0 4px!important;
}
.collection-history .collection-top b,
.collection-history .collection-top span{
  display:block!important;
  position:static!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}
.collection-history .collection-top b{
  font-size:13.5px!important;
  font-weight:800!important;
  color:var(--text)!important;
  flex:1 1 auto!important;
  min-width:0!important;
}
.collection-history .collection-top span{
  font-size:11px!important;
  color:var(--muted)!important;
  flex:0 0 auto!important;
  text-align:right!important;
  margin-left:auto!important;
}
.collection-history .op-sub{margin-top:0!important;}
.collection-history .collection-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px 12px;
  margin-top:6px;
}
.collection-history .collection-amount{align-self:center!important; white-space:nowrap;}
.collection-history .btn-sm{align-self:center!important; flex:0 0 auto;}
.server-icon{color:var(--accent)!important;background:rgba(47,124,255,.12)!important;box-shadow:0 14px 34px rgba(47,124,255,.12)!important;}
.server-icon svg{stroke:currentColor!important;fill:none!important;stroke-width:2.4!important;stroke-linecap:round!important;stroke-linejoin:round!important;}
.nav-item .nav-ico svg{overflow:visible;}
@media (max-width:520px){
  .collection-card.collection-history{padding:12px!important;}
  .collection-history .collection-top{gap:8px!important;}
  .collection-history .collection-top b{font-size:12.6px!important;}
  .collection-history .collection-top span{font-size:10.4px!important;}
}


/* Revision 17: person icon + collection header alignment */

.nav-item .nav-ico svg{
  width:22px!important;
  height:22px!important;
  stroke-width:2.1!important;
}

.collection-card.collection-history{
  position:relative!important;
  padding-top:12px!important;
  align-items:center!important;
}
.collection-history .collection-main{
  min-width:0;
  flex:1 1 auto;
}
.collection-history .collection-top{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  width:100%!important;
  margin:0 0 6px!important;
  position:relative!important;
}
.collection-history .collection-top b{
  display:inline-flex!important;
  align-items:center!important;
  flex:0 0 auto!important;
  width:auto!important;
  max-width:max-content!important;
  line-height:1!important;
  font-size:13px!important;
  color:var(--accent)!important;
  padding:4px 8px!important;
  border:1px solid rgba(47,124,255,.28)!important;
  background:rgba(47,124,255,.08)!important;
  border-radius:999px!important;
  white-space:nowrap!important;
  box-shadow:none!important;
}
.collection-history .collection-top span{
  display:block!important;
  position:static!important;
  top:auto!important;
  right:auto!important;
  margin-left:auto!important;
  flex:0 0 auto!important;
  text-align:right!important;
  white-space:nowrap!important;
  font-size:10.8px!important;
  line-height:1!important;
  color:var(--muted)!important;
}
.collection-history .op-sub{margin-top:0!important;}
@media (max-width:520px){
  .collection-history .collection-top{gap:8px!important;}
  .collection-history .collection-top b{font-size:12.2px!important;padding:3px 7px!important;}
  .collection-history .collection-top span{font-size:10.2px!important;}
}


/* Revision 18: replace settings nav icon and pin collection date */

.nav-item .nav-ico svg{
  width:22px!important;
  height:22px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:2.05!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  transform:none!important;
  overflow:visible!important;
}

.collection-card.collection-history{
  position:relative!important;
  padding:12px!important;
  padding-top:12px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
}
.collection-history .collection-main{
  min-width:0!important;
  flex:1 1 auto!important;
  padding-right:96px!important;
}
.collection-history .collection-top{
  display:block!important;
  width:auto!important;
  margin:0 0 6px!important;
  line-height:1!important;
}
.collection-history .collection-top b{
  display:inline-flex!important;
  width:auto!important;
  max-width:max-content!important;
  flex:0 0 auto!important;
  align-items:center!important;
  line-height:1!important;
  font-size:13px!important;
  font-weight:800!important;
  color:var(--accent)!important;
  padding:4px 8px!important;
  border:1px solid rgba(47,124,255,.28)!important;
  background:rgba(47,124,255,.08)!important;
  border-radius:999px!important;
  white-space:nowrap!important;
  box-shadow:none!important;
}
.collection-history .collection-top span{
  position:absolute!important;
  top:12px!important;
  right:12px!important;
  display:block!important;
  line-height:1!important;
  font-size:10.8px!important;
  color:var(--muted)!important;
  white-space:nowrap!important;
  text-align:right!important;
  margin:0!important;
}
.collection-history .collection-amount{
  margin-top:18px!important;
}
.collection-history .btn-sm{
  margin-top:18px!important;
}
@media (max-width:520px){
  .collection-history .collection-main{padding-right:86px!important;}
  .collection-history .collection-top span{top:12px!important;right:12px!important;font-size:10.2px!important;}
  .collection-history .collection-top b{font-size:12.2px!important;padding:3px 7px!important;}
}

/* Revision 19: restore collection history layout */
.collection-card.collection-history{
  position:relative!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto auto!important;
  grid-template-areas:"main amount action"!important;
  column-gap:10px!important;
  row-gap:6px!important;
  align-items:center!important;
  padding:14px 12px 12px!important;
  padding-top:14px!important;
}
.collection-history .collection-main{
  grid-area:main!important;
  min-width:0!important;
  padding-right:0!important;
  flex:none!important;
}
.collection-history .collection-top{
  display:block!important;
  width:auto!important;
  margin:0 0 6px!important;
  line-height:1!important;
  position:static!important;
}
.collection-history .collection-top b{
  display:inline-flex!important;
  align-items:center!important;
  width:auto!important;
  max-width:max-content!important;
  flex:0 0 auto!important;
  padding:4px 8px!important;
  line-height:1!important;
  font-size:13px!important;
  font-weight:800!important;
  color:var(--accent)!important;
  background:rgba(47,124,255,.08)!important;
  border:1px solid rgba(47,124,255,.28)!important;
  border-radius:999px!important;
  white-space:nowrap!important;
  box-shadow:none!important;
}
.collection-history .collection-top span{
  position:absolute!important;
  top:14px!important;
  right:12px!important;
  display:block!important;
  margin:0!important;
  padding:0!important;
  line-height:1!important;
  font-size:10.8px!important;
  color:var(--muted)!important;
  white-space:nowrap!important;
  text-align:right!important;
}
.collection-history .op-sub{
  margin-top:0!important;
  margin-bottom:7px!important;
}
.collection-history .collection-meta{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:6px!important;
  margin-top:0!important;
}
.collection-history .collection-amount{
  grid-area:amount!important;
  align-self:center!important;
  justify-self:end!important;
  margin:20px 0 0!important;
  white-space:nowrap!important;
  font-size:12px!important;
}
.collection-history .btn-sm{
  grid-area:action!important;
  align-self:center!important;
  justify-self:end!important;
  margin:20px 0 0!important;
  flex:0 0 auto!important;
}
@media(max-width:520px){
  .collection-card.collection-history{
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"main amount" "main action"!important;
    padding:13px 10px 11px!important;
  }
  .collection-history .collection-top span{top:12px!important;right:10px!important;font-size:10px!important;}
  .collection-history .collection-top b{font-size:12.2px!important;padding:3px 7px!important;}
  .collection-history .collection-amount{margin:18px 0 0!important;font-size:11.5px!important;}
  .collection-history .btn-sm{margin:2px 0 0!important;}
}


/* Revision 20: role dropdown arrow reset */
.role-select:not(.is-open) .chev::before{transform:rotate(45deg) translate(-.04em,-.10em)!important;color:var(--muted)!important;}
.role-select.is-open .chev::before{transform:rotate(225deg) translate(-.04em,-.10em)!important;color:var(--accent)!important;}


/* Revision 21: visible accounts role blocks */
.visible-accounts-page .role-title span{display:none!important;}

/* Backend v7: chat dropdown avatars */
.chat-popover .select-option-icon.chat-avatar{
  color:#fff!important;
  font-size:10.5px!important;
  font-weight:850!important;
  letter-spacing:-.03em!important;
  text-transform:uppercase!important;
  background:linear-gradient(135deg,var(--accent),#7c3aed)!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:cover!important;
}


/* Backend v9: strict admin visibility and red-code realtime */
[hidden]{display:none!important}
.admin-only{display:none!important}
.admin-only.is-visible{display:grid!important}
.code-red-card .setting-icon,
.code-red-card .setting-icon svg{color:var(--red)!important}
.code-red-card .switch input:checked + .slider{background:var(--red)!important}

/* Backend v13 data loading and live UI */
body.backend-loading .screen > *:not(.top-row){filter:blur(5px);opacity:.45;pointer-events:none}
body.backend-ready .screen > *{transition:opacity .16s ease,filter .16s ease}
.backend-icon-action{
  height:36px;width:36px;border-radius:12px;border:1px solid var(--line);
  background:var(--panel-2);color:var(--accent);display:inline-flex;align-items:center;justify-content:center;
  cursor:pointer;transition:.18s
}
.backend-icon-action:hover{transform:translateY(-1px);border-color:rgba(47,124,255,.35)}
.backend-icon-action.danger{color:var(--red);background:rgba(239,68,68,.08)}
.backend-icon-action:disabled{opacity:.35;cursor:not-allowed;transform:none}
.backend-icon-action svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.role-native-select{
  appearance:none;border:1px solid var(--line);border-radius:999px;padding:7px 24px 7px 10px;
  background:var(--panel-2);color:var(--accent);font:inherit;font-size:11px;font-weight:850;outline:none;
  background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);
  background-position:calc(100% - 12px) 50%,calc(100% - 7px) 50%;
  background-size:5px 5px,5px 5px;background-repeat:no-repeat
}
.select-option-icon.chat-avatar{
  background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important
}

/* Backend v14 permissions, avatars and empty balances */
.account-manager-only{display:none!important}
.account-manager-only.is-visible{display:grid!important}
.backend-role-select{
  appearance:none;
  border:1px solid rgba(47,124,255,.28)!important;
  background:rgba(47,124,255,.10)!important;
  color:var(--accent)!important;
  padding:7px 28px 7px 12px!important;
  min-width:82px;
  justify-content:center;
}
.backend-role-select:disabled{
  opacity:.55;
  cursor:not-allowed;
  filter:saturate(.7);
}
.user-avatar{
  background-size:cover!important;
  background-position:center!important;
  color:transparent!important;
}
.project-empty:not([hidden]){
  display:flex!important;
}
.balances-project-select .select-label:empty::after{content:'Выберите проект'}

/* Backend v16 anti-flicker and live balances */
html.backend-booting .screen{opacity:0;visibility:hidden}
html.backend-booting .page-loader.show{opacity:1;visibility:visible}
.balances-summary[hidden]{display:none!important}
body.backend-loading .screen{opacity:0!important;visibility:hidden!important}
body.backend-ready .screen{opacity:1;visibility:visible}

/* Backend v17 fixes */
.balances-summary .summary-card strong.zero{color:var(--text)!important}
#balanceModal input[name="amount"]{font-variant-numeric:tabular-nums}

/* Backend v18 collection and transfer */
.select-popover{max-height:min(360px,60vh);overflow:auto}
.backend-collections-list{display:grid;gap:10px;margin-top:10px}
#collectionModal input[name="amount"],#transferModal input[name="amount"],#acceptCollectionModal input[name="amount"]{font-variant-numeric:tabular-nums}

/* Backend v21 operation history */
.backend-collections-list{display:grid;gap:10px;margin-top:10px}
.empty-state.collection-empty,.empty-state.history-empty{
  min-height:132px;border:1px solid var(--line);border-radius:22px;
  background:var(--panel);display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;padding:18px;color:var(--muted);box-shadow:var(--shadow-soft)
}
.empty-state .empty-ico{font-size:28px;margin-bottom:8px}
.empty-state b{color:var(--text);font-size:15px}
.empty-state p{margin:6px 0 0;font-size:12px;max-width:240px}
.collection-meta{display:flex;flex-wrap:wrap;gap:6px 10px}
.collection-history .op-sub{font-weight:700;color:var(--text);margin:4px 0}

/* Backend v22 operations fixes */
.op-status{display:inline-flex;margin-left:6px;padding:2px 7px;border-radius:999px;font-size:10px;font-weight:800;vertical-align:middle}
.op-status.pending{color:var(--accent);background:rgba(47,124,255,.10);border:1px solid rgba(47,124,255,.25)}
.op-status.cancelled{color:var(--muted);background:rgba(128,128,128,.10);border:1px solid var(--line)}
.collection-card.is-cancelled{opacity:.62;filter:saturate(.7)}
.collection-empty,.history-empty{padding:18px;border:1px solid var(--line);border-radius:22px;background:var(--panel-2);text-align:center;display:grid;gap:6px}
.empty-ico{font-size:26px}
button:disabled{opacity:.45;cursor:not-allowed}

/* Backend v23 updates */
.select-search{width:calc(100% - 16px);margin:8px;padding:9px 10px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);outline:none}
@media (max-width:520px){.date-grid{grid-template-columns:1fr!important}.date-grid .field{width:100%;box-sizing:border-box}}
.link-empty,.history-empty,.collection-empty{padding:18px;border:1px dashed var(--line);border-radius:18px;text-align:center;background:var(--panel-2)}

/* Backend v24 fixes */
.range-field{accent-color:var(--accent);padding:0!important;height:34px}
.link-row{align-items:center}
.link-row small,.link-empty p{text-align:center}
.link-ico.svg-link{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:14px;background:rgba(47,124,255,.12);color:var(--accent)}
.link-ico.svg-link svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.auto-orders-card.autoconduct-card{display:grid}
.auto-orders-card.autoconduct-card[hidden]{display:none!important}
.select-popover{overscroll-behavior:contain}

/* Backend v25 fixes */
.link-empty{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important}
.link-empty p,.link-empty b{width:100%!important;text-align:center!important;margin-left:auto!important;margin-right:auto!important}
.link-empty-ico{display:flex;align-items:center;justify-content:center;width:54px;height:54px;border-radius:18px;background:rgba(47,124,255,.12);color:var(--accent);margin:0 auto 8px}
.link-empty-ico svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Backend v27 balance limit */
.table-row .limit-exceeded{color:var(--red)!important;font-weight:850}
.table-row.has-limit-exceeded{border-color:rgba(239,68,68,.35)}
.table-row .status.neg{color:var(--red)!important}
