/* Wallet sidebar: search, sort/filter, rows with amounts and states, menus,
   batch bar and list dialogs. Plain CSS, no animation loops. */
.pnl-page .wallet-layout{grid-template-columns:276px minmax(0,1fr)}
@media(max-width:1250px){.pnl-page .wallet-layout{grid-template-columns:240px minmax(0,1fr)}}
@media(max-width:900px){.pnl-page .wallet-layout{grid-template-columns:minmax(0,1fr)}}
.wl-toolbar{display:grid;gap:6px;margin:10px 0 4px}
.wl-search{position:relative}
.wl-search input{width:100%;height:30px;padding:4px 26px 4px 8px;border:1px solid #333;border-radius:5px;background:#1b1b1b;color:#e6e6e6;font-size:12px}
.wl-search input:focus-visible{outline:1px solid #f2bb55;border-color:#6b5730}
.wl-search kbd{position:absolute;right:6px;top:6px;padding:0 5px;border:1px solid #3a3a3a;border-radius:3px;color:#7d7d7d;font:10px/16px ui-monospace,monospace;pointer-events:none}
.wl-search input:not(:placeholder-shown)+kbd{display:none}
.wl-controls{display:flex;flex-wrap:wrap;gap:4px}
.wl-controls select,.wl-controls button{height:26px;min-height:26px;padding:2px 6px;border:1px solid #333;border-radius:4px;background:#1b1b1b;color:#cfcfcf;font-size:11px;margin:0;width:auto}
.wl-controls select{flex:1 1 92px;min-width:0}
.wl-controls button[aria-pressed=true]{border-color:#f2bb55;color:#f2bb55}
.wl-controls #wl-unit{font:600 11px ui-monospace,monospace;min-width:40px}
.wl-views{display:flex;flex-wrap:wrap;gap:4px}
.wl-views:empty{display:none}
.wl-view{display:inline-flex;align-items:center;border:1px solid #333;border-radius:12px;background:#1a1a1a;overflow:hidden}
.wl-view.active{border-color:#f2bb55}
.wl-view button,.wl-view-add,.wl-view-draft button{margin:0;min-height:22px;height:22px;padding:0 8px;border:0;background:transparent;color:#cfcfcf;font-size:11px;width:auto}
.wl-view.active button:first-child{color:#f2bb55}
.wl-view .wl-view-x{padding:0 6px;color:#7d7d7d}
.wl-view-add{border:1px dashed #3a3a3a;border-radius:12px;color:#8f8f8f}
.wl-view-draft{display:flex;gap:3px;width:100%}
.wl-view-draft input{flex:1;min-width:0;height:24px;padding:2px 6px;border:1px solid #d5a94f;border-radius:4px;background:#202020;color:#eee;font-size:11px}
.wl-view-draft button{border:1px solid #333;border-radius:4px}
.wl-meta{margin:4px 2px 6px;font-size:10px;line-height:1.5;color:#8f8f8f}
.wl-meta .wl-warn{color:#ee9b91}
.wl-link{display:inline;margin:0;min-height:0;height:auto;padding:0;border:0;background:none;color:#f2bb55;font-size:inherit;text-decoration:underline;text-underline-offset:2px;width:auto;cursor:pointer}
.wl-batch{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin:0 0 6px;padding:6px;border:1px solid #4a3d22;border-radius:5px;background:#1d1a13;font-size:11px;color:#e6d3a8}
.wl-batch select,.wl-batch button{height:24px;min-height:24px;margin:0;padding:1px 6px;border:1px solid #3a3a3a;border-radius:4px;background:#1b1b1b;color:#ddd;font-size:11px;width:auto}
.wl-batch select{max-width:110px}
.wl-batch button:disabled{opacity:.45}
.wl-undo{position:sticky;bottom:0;display:flex;gap:8px;align-items:center;justify-content:space-between;margin-top:6px;padding:7px 8px;border:1px solid #3d4a36;border-radius:5px;background:#18200f;color:#cfe3b5;font-size:11px;line-height:1.4}
.wl-undo button{margin:0;min-height:24px;height:24px;padding:0 8px;border:1px solid #6a8a4a;border-radius:4px;background:transparent;color:#bce58a;font-size:11px;width:auto}
.wallet-sidebar .wl-list .nav-group{margin:0 0 6px;display:block}
.wl-group-head{position:relative;display:flex;align-items:center;gap:4px;margin:8px 0 2px;padding:2px 0;border-bottom:1px solid #262626}
.wallet-sidebar .nav-group .wl-group-toggle{display:flex;align-items:center;gap:5px;flex:0 1 auto;min-width:0;width:auto;min-height:24px;margin:0;padding:2px 4px;border:0;background:transparent;color:#bdbdbd;font-size:11px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wl-group-toggle span{color:#777;font-size:10px;width:9px}
.wl-pinned .wl-group-toggle{color:#f2bb55;padding-left:6px}
.wallet-sidebar .wl-group-head small{flex:1;min-width:0;text-align:right;font:10px/1.4 system-ui,sans-serif;color:#888;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wl-group-head small b{display:inline;font:600 10px ui-monospace,monospace}
.wl-group-head[draggable=true]{cursor:grab}
.wl-empty{margin:4px 6px;font-size:10px}
.wallet-sidebar .wallet-nav-row{align-items:flex-start;gap:4px;padding:5px 3px}
.wallet-nav-row[draggable=true]{cursor:grab}
.wallet-nav-row .nav-avatar{margin-top:3px;background:color-mix(in srgb,var(--wl-color,#303030) 30%,#262626);color:var(--wl-color,#ddd);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--wl-color,#444) 55%,transparent)}
.wallet-nav-row[data-color]{box-shadow:inset 2px 0 0 var(--row-color,transparent)}
.wallet-nav-row[data-color=red]{--row-color:#f18c8c}.wallet-nav-row[data-color=amber]{--row-color:#dfbc75}.wallet-nav-row[data-color=green]{--row-color:#87dcb0}.wallet-nav-row[data-color=teal]{--row-color:#6fd3d0}.wallet-nav-row[data-color=blue]{--row-color:#8db4ff}.wallet-nav-row[data-color=violet]{--row-color:#c4a2ff}
.wl-check{margin:7px 0 0;accent-color:#f2bb55}
.wallet-sidebar .nav-group .wallet-nav-label{display:block;padding:1px 0}
.wl-line{display:flex;align-items:baseline;gap:5px;min-width:0}
.wl-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e8e8e8;font-size:12px;font-weight:600}
.wl-amount{flex:0 0 auto;font:600 11px ui-monospace,monospace;color:#bdbdbd}
.wl-amount.pos,.wl-group-head .pos,.wl-dialog .pos{color:#87dcb0}.wl-amount.neg,.wl-group-head .neg,.wl-dialog .neg{color:#f18c8c}.wl-amount.unknown{color:#7d7d7d;font-weight:400}
.wl-amount.partial{opacity:.8;font-style:italic}
.wl-amount sup,.wl-compare sup,.wl-rank sup{font:normal 8px system-ui,sans-serif;color:#dfbc75;margin-left:2px}
.wl-sub{font-size:10px;color:#8f8f8f;line-height:1.5}
.wallet-nav-label .wl-sub .wallet-display{flex:1 1 auto;min-width:0;display:block}
.wallet-nav-label .wl-sub .wallet-display.has-note{font-size:11px}
.wl-addr{flex:0 0 auto;font:10px ui-monospace,monospace;color:#7d7d7d}
.wl-state{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wl-state::before{content:'';display:inline-block;width:6px;height:6px;margin-right:4px;border-radius:50%;background:#666;vertical-align:1px}
.wl-state[data-state=current]::before{background:#87dcb0}.wl-state[data-state=running]::before,.wl-state[data-state=paused]::before,.wl-state[data-state=pending]::before{background:#8db4ff}.wl-state[data-state=partial]::before{background:#dfbc75}.wl-state[data-state=error]::before{background:#f18c8c}
.wl-time{flex:0 0 auto;color:#8a8a8a}
.wl-tags{display:flex;flex-wrap:wrap;gap:3px;margin-top:2px}
.wl-tags i{font:normal 9px/15px system-ui,sans-serif;padding:0 5px;border-radius:8px;background:#232a33;color:#a9c3e6}
.wl-tags .wl-group-tag{background:#262626;color:#9a9a9a}
.wl-pin,.wl-new{flex:0 0 auto;font:normal 9px/14px system-ui,sans-serif;padding:0 4px;border-radius:3px}
.wl-pin{background:#3a3020;color:#f2bb55}
.wl-new{background:#20342a;color:#87dcb0}
.wl-row-main{position:relative;display:flex;align-items:flex-start;gap:4px;flex:1 1 0;min-width:0}.wl-actions{position:absolute;right:0;bottom:0;display:flex}.wl-row-main:has(.wallet-note-input) .wl-actions{position:static}.wl-row-main:has(.wallet-note-input){align-items:center}.wl-status{padding-right:70px}.wl-fill{flex:1}.wallet-nav-label .wl-sub .wallet-display{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wallet-sidebar .nav-group .wl-actions .wallet-nav-icon{flex:0 0 22px;width:22px;min-width:22px;height:20px;min-height:20px;padding:2px}
.wl-more{font-size:15px;line-height:1;letter-spacing:-1px}
.wallet-nav-row:not(:hover):not(:focus-within):not([data-selected=true]) .wl-actions .wallet-nav-icon:not([aria-expanded=true]){opacity:.55}
.wl-menu{flex-basis:100%;display:grid;gap:5px;margin:4px 0 2px 25px;padding:7px;border:1px solid #3a3a3a;border-radius:6px;background:#1c1c1c;font-size:11px;color:#cfcfcf;cursor:default}
.wl-group-head .wl-menu{position:absolute;right:0;top:100%;z-index:5;margin:2px 0;min-width:180px;box-shadow:0 6px 18px rgba(0,0,0,.45)}
.wl-menu-row{display:flex;flex-wrap:wrap;gap:4px}
.wallet-sidebar .wl-menu button,.wl-menu select{flex:1 1 auto;width:auto;min-height:26px;height:26px;margin:0;padding:2px 8px;border:1px solid #333;border-radius:4px;background:#232323;color:#ddd;font-size:11px;justify-content:center}
.wallet-sidebar .wl-menu button:disabled{opacity:.4}
.wl-menu label{display:grid;gap:3px;color:#9a9a9a;font-size:10px}
.wl-menu-move{grid-template-columns:auto 1fr;align-items:center}
.wl-menu input{height:26px;padding:3px 6px;border:1px solid #d5a94f;border-radius:4px;background:#202020;color:#eee;font-size:12px}
.wallet-sidebar .wl-menu .wl-danger{border-color:#5a3434;color:#f1a3a3}
.wl-menu small{font-size:10px;line-height:1.4}
.wl-colors{display:flex;gap:5px;align-items:center}
.wallet-sidebar .wl-colors button{flex:0 0 18px;width:18px;min-width:18px;height:18px;min-height:18px;padding:0;border-radius:50%;background:var(--wl-color,#2a2a2a);border:1px solid #444;font-size:10px;color:#888}
.wallet-sidebar .wl-colors button[aria-pressed=true]{outline:2px solid #f2bb55;outline-offset:1px}
.wl-drop{outline:1px dashed #f2bb55;outline-offset:-1px;background:#221d12}
.wl-dragging{opacity:.45}
.wl-dialog{width:min(920px,calc(100vw - 32px));max-height:calc(100vh - 48px);padding:16px;border:1px solid #333;border-radius:8px;background:#141414;color:#e3e3e3}
.wl-dialog::backdrop{background:rgba(0,0,0,.6)}
.wl-dialog .dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:6px}
.wl-dialog h2{margin:0;font-size:16px}
.wl-dialog .tablewrap{overflow:auto;margin-top:10px}
.wl-compare,.wl-rank{border-collapse:collapse;width:100%;font-size:12px}
.wl-compare th,.wl-compare td,.wl-rank th,.wl-rank td{padding:6px 8px;border-bottom:1px solid #262626;text-align:left;vertical-align:top}
.wl-compare thead th small{display:block;font:10px ui-monospace,monospace;color:#7d7d7d}
.wl-compare tbody th{color:#9a9a9a;font-weight:500;white-space:nowrap}
.wl-compare td,.wl-rank td:nth-child(3){font-family:ui-monospace,monospace}
.wl-bar{display:inline-block;width:70px;height:6px;margin-right:6px;border-radius:3px;background:linear-gradient(90deg,currentColor var(--w),#262626 var(--w));vertical-align:middle}
.wl-export{width:100%;margin-top:8px;padding:8px;border:1px solid #333;border-radius:5px;background:#101010;color:#ddd;font:11px/1.5 ui-monospace,monospace}
.manager-import{margin:12px 0;border:1px solid #2a2a2a;border-radius:6px;padding:8px 10px}
.manager-import summary{cursor:pointer;font-size:13px}
.manager-import textarea{width:100%;margin:6px 0;padding:6px;border:1px solid #333;border-radius:5px;background:#101010;color:#ddd;font:11px/1.5 ui-monospace,monospace}
@media(max-width:900px){.wallet-sidebar .wl-list .nav-group{display:block}.wl-controls select{flex-basis:120px}.wl-menu{margin-left:0}}
/* Group switcher (opens on the default group) and multi-group membership toggles. */
.wl-scope{width:100%;height:30px;padding:3px 8px;border:1px solid #4a3d22;border-radius:5px;background:#1d1a13;color:#f2d79a;font-size:12px;font-weight:600}
.wl-scope:focus-visible{outline:1px solid #f2bb55}
.wl-menu-groups{display:flex;flex-wrap:wrap;gap:4px;align-items:center}
.wl-menu-groups .caption{flex-basis:100%;font-size:10px}
.wallet-sidebar .wl-menu .wl-menu-groups button{flex:0 1 auto}
.wallet-sidebar .wl-menu .wl-menu-groups button[aria-pressed=true]{border-color:#f2bb55;color:#f2bb55}
.wallet-sidebar .wl-menu button[data-menu-act=akbot][aria-pressed=true]{border-color:#87dcb0;color:#87dcb0}
/* GMGN amount: a small note shows at once on hover (no native tooltip delay). */
.wl-amount[data-tip]{position:relative;cursor:help}
.wl-amount[data-tip]:hover::after{content:attr(data-tip);position:absolute;right:0;top:calc(100% + 3px);z-index:30;width:max-content;max-width:230px;white-space:pre-line;padding:5px 7px;border:1px solid #4a3d22;border-radius:4px;background:#1d1a13;color:#e6d3a8;font:400 10px/1.5 system-ui,sans-serif;font-style:normal;text-align:left;box-shadow:0 4px 12px rgba(0,0,0,.45);pointer-events:none}
