/* Account operations: overview first, contextual detail, separate global settings. */
.console-workspace { --bg:#f5f6f8; --muted:#707782; }
.console-workspace .canvas { max-width:1510px; padding:32px; }
.console-workspace .page-heading { margin-bottom:28px; }
.console-workspace .page-heading h1 { font-size:26px; letter-spacing:-.5px; }
.console-workspace .page-heading p { margin-top:8px; font-size:13px; }
.console-workspace .card { padding:24px; border-radius:10px; }
.console-workspace .stack { gap:24px; min-width:0; }
.console-workspace .topbar { background:#fff; backdrop-filter:none; padding-inline:32px; }
.scope-picker { flex-direction:row; align-items:center; gap:12px; white-space:nowrap; }
.scope-picker select { width:190px; }
.scope-label { font-size:12px; color:#525a66; }
.environment-label { font-size:10px; color:var(--muted); padding:3px 8px; border:1px solid var(--line); border-radius:4px; white-space:nowrap; }
.text-button { border-color:transparent; background:transparent; color:#626a75; }
.eyebrow { color:var(--muted); font-size:11px; margin-bottom:5px; }
.account-summary { margin:24px 0; border-block:1px solid var(--line); grid-template-columns:repeat(4,minmax(0,1fr)); }
.account-summary .fleet-stat { display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; gap:4px; border:0; border-radius:0; background:transparent; padding:20px; min-width:0; text-align:left; }
.account-summary .fleet-stat + .fleet-stat { border-left:1px solid var(--line); }
.account-summary button:hover { background:var(--soft); }
.account-summary span { margin:0; font-size:12px; color:#555e6b; }
.account-summary strong { font-size:30px; line-height:1.4; font-weight:600; font-variant-numeric:tabular-nums; }
.account-summary small { font-size:11px; line-height:1.6; font-weight:400; }
.account-filters { display:flex; align-items:flex-end; gap:16px; margin:0 0 24px; }
.account-filters label:first-child { width:280px; }
.account-filters label:nth-child(2) { width:180px; }
.account-filters input,.account-filters select { min-height:40px; }
.account-filters .text-button { margin-left:auto; }
.account-list { min-width:0; }
.account-table { table-layout:fixed; width:100%; border-collapse:collapse; text-align:left; }
.account-table th { padding:12px; background:var(--soft); color:#7b828c; font-size:11px; font-weight:500; border-bottom:1px solid var(--line); }
.account-table th:nth-child(1) { width:20%; }
.account-table th:nth-child(2) { width:17%; }
.account-table th:nth-child(3) { width:17%; }
.account-table th:nth-child(4) { width:15%; }
.account-table th:nth-child(5) { width:17%; }
.account-table th:nth-child(6) { width:14%; }
.account-table td { padding:20px 12px; border-bottom:1px solid var(--line); vertical-align:middle; overflow-wrap:anywhere; font-size:12px; }
.account-table tbody tr:hover { background:#fcfcfd; }
.account-table small { display:block; font-size:11px; margin-top:5px; line-height:1.6; }
.account-name { justify-content:flex-start; padding:0; min-height:28px; border:0; background:transparent; max-width:100%; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; font-weight:600; }
.account-name:hover { background:transparent; text-decoration:underline; text-underline-offset:4px; }
.account-readiness { display:inline-block; padding:3px 7px; border-radius:4px; background:#f0f1f3; color:#59616d; font-size:11px; line-height:1.6; }
.account-readiness[data-state="blocked"] { color:#a3373d; background:#fbefef; }
.account-readiness[data-state="ready"] { color:#21754e; background:#edf6f0; }
.account-readiness[data-state="verify"],.account-readiness[data-state="login"] { color:#906314; background:#fbf5e9; }
.account-money>div { display:flex; justify-content:space-between; gap:8px; }
.account-money>div>span { color:var(--muted); font-size:11px; }
.account-money strong,.account-positions strong { font-weight:550; font-variant-numeric:tabular-nums; }
.account-network .mono { font-size:11px; }
.account-actions>div { display:flex; flex-direction:column; align-items:stretch; gap:3px; }
.account-primary { background:#fff; min-height:34px; padding:5px 8px; font-size:12px; }
.account-actions .text-button { font-size:11px; min-height:28px; padding:3px 8px; }
.account-footnote { color:var(--muted); font-size:11px; margin-top:20px; }
.account-empty { padding:56px 20px; text-align:center; }
.account-empty p { color:var(--muted); margin:8px 0 20px; }
.console-workspace dialog { color:var(--ink); background:#fff; }
.console-workspace dialog::backdrop { background:rgba(20,24,32,.32); }
.workspace-dialog { width:min(500px,calc(100vw - 32px)); padding:0; border:1px solid var(--line); border-radius:12px; max-height:calc(100dvh - 32px); overflow:auto; }
.dialog-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; padding:24px 24px 16px; }
.dialog-intro { padding:0 24px; color:var(--muted); font-size:12px; line-height:1.8; }
.workspace-dialog>.fields { padding:24px; gap:18px; }
.workspace-dialog>.hint { margin:0 24px 16px; }
.workspace-dialog .fields>.hint { margin:0; }
.workspace-dialog .fields>.text-button { justify-self:start; padding-left:0; }
.dialog-footer { border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px; padding:20px 24px; }
.account-sheet { position:fixed; inset:0 0 0 auto; margin:0 0 0 auto; width:560px; max-width:100vw; height:100dvh; max-height:100dvh; padding:0; border:0; border-left:1px solid var(--line); border-radius:0; }
.account-sheet[open] { display:flex; flex-direction:column; }
.sheet-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; padding:28px 28px 22px; }
.sheet-heading>div { min-width:0; }
.sheet-heading h2 { font-size:21px; overflow-wrap:anywhere; }
.sheet-heading button { flex-shrink:0; }
.sheet-tabs { display:flex; padding:0 28px; gap:24px; border-bottom:1px solid var(--line); flex-shrink:0; }
.sheet-tabs button { border:0; border-bottom:2px solid transparent; border-radius:0; padding:12px 0; color:var(--muted); background:transparent; }
.sheet-tabs [aria-selected="true"] { color:var(--ink); border-bottom-color:var(--ink); }
.sheet-body { overflow:auto; overscroll-behavior:contain; padding:28px; flex:1; min-height:0; }
.sheet-body h3 { margin:28px 0 12px; }
.sheet-metrics { display:grid; grid-template-columns:1fr 1fr; border-bottom:1px solid var(--line); padding-bottom:24px; gap:20px; }
.sheet-metrics span { display:block; color:var(--muted); font-size:12px; }
.sheet-metrics strong { display:block; font-size:22px; margin-top:8px; font-weight:600; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.wallet-list>div,.sheet-recent>div { display:flex; justify-content:space-between; gap:20px; padding:14px 0; border-bottom:1px solid var(--line); }
.wallet-list strong,.sheet-recent strong { font-size:13px; font-weight:550; font-variant-numeric:tabular-nums; }
.sheet-recent small { display:block; font-size:10px; }
.sheet-links { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:28px; }
.sheet-links button { min-height:42px; }
.sheet-links strong { font-weight:500; }
.connection-list { margin:16px 0 28px; }
.connection-list>div { display:grid; grid-template-columns:90px minmax(0,1fr); gap:12px; padding:16px 0; border-bottom:1px solid var(--line); }
.connection-list dt { font-size:12px; color:var(--muted); }
.connection-list dd { margin:0; font-size:13px; overflow-wrap:anywhere; }
.connection-list small { display:block; margin-top:5px; }
.connection-list strong { font-weight:550; }
.manage-actions,.settings-list { display:grid; gap:10px; }
.sheet-action { align-items:flex-start; flex-direction:column; text-align:left; padding:16px; gap:5px; }
.sheet-action strong { font-size:13px; font-weight:550; }
.sheet-action small { font-size:11px; font-weight:400; }
.account-sheet .account-delete-area { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-top:40px; padding-top:24px; border-top:1px solid var(--line); }
.account-sheet .account-delete-area strong { font-size:13px; }
.account-sheet .account-delete-area .hint { margin-top:5px; }
.console-workspace .login-workspace { grid-template-columns:minmax(0,1.5fr) minmax(280px,.75fr); gap:24px; }
.console-workspace .order-layout { grid-template-columns:340px minmax(0,1fr); gap:24px; }
.console-workspace .status strong { font-size:13px; }
.console-workspace .proxy-summary { margin:24px 0 12px; padding:16px 0; border-block:1px solid var(--line); gap:12px 24px; }
.console-workspace .proxy-row { padding:20px 0; }
@media(max-width:1200px) {
  .console-workspace .canvas { padding:24px; }
  .console-workspace .card { padding:20px; }
  .account-table td,.account-table th { padding-inline:8px; }
  .account-summary .fleet-stat { padding:18px 12px; }
  .console-workspace .login-workspace,.console-workspace .order-layout { grid-template-columns:minmax(0,1fr); }
  .console-workspace .order-layout>.ticket { order:0; }
}
@media(max-width:1050px) {
  .account-table,.account-table tbody { display:block; }
  .account-table thead { display:none; }
  .account-table tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-areas:"identity actions" "state state" "money positions" "network network"; gap:16px 24px; padding:24px 0; border-bottom:1px solid var(--line); }
  .account-table td { display:block; padding:0; border:0; min-width:0; }
  .account-identity { grid-area:identity; }
  .account-state { grid-area:state; }
  .account-money { grid-area:money; }
  .account-positions { grid-area:positions; }
  .account-network { grid-area:network; }
  .account-actions { grid-area:actions; justify-self:end; }
  .account-actions>div { flex-direction:row; gap:4px; }
  .account-actions button { min-height:40px; }
  .account-table .account-state { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
  .account-state small { margin:0; }
  .account-money::before,.account-positions::before { content:attr(data-label); display:block; color:var(--muted); font-size:10px; margin-bottom:8px; }
  .account-money>div { justify-content:flex-start; gap:16px; }
  .account-table .account-network { display:flex; align-items:baseline; flex-wrap:wrap; gap:8px; }
  .account-network::before { content:"出口"; color:var(--muted); font-size:11px; }
  .account-network small { margin:0; }
}
@media(max-width:760px) {
  .console-workspace .page-heading { margin:6px 0 20px; }
  .console-workspace .page-heading h1 { font-size:23px; }
  .console-workspace .page-heading p { font-size:12px; }
  .console-workspace .card { padding:18px; }
  .console-workspace .stack { gap:18px; }
  .console-workspace .environment-label { display:none; }
  .console-workspace .scope-picker { gap:6px; font-size:0; min-width:0; }
  .console-workspace .scope-picker #active-account { width:145px; max-width:40vw; font-size:12px; }
  .account-summary { grid-template-columns:repeat(2,minmax(0,1fr)); margin:20px 0; }
  .account-summary .fleet-stat { padding:16px 10px; }
  .account-summary .fleet-stat:nth-child(3) { border-left:0; }
  .account-summary .fleet-stat:nth-child(n+3) { border-top:1px solid var(--line); }
  .account-summary strong { font-size:27px; }
  .account-summary small { font-size:10px; }
  .account-filters { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; margin-bottom:8px; }
  .account-filters label:first-child,.account-filters label:nth-child(2) { width:auto; }
  .account-filters .text-button { grid-column:1 / -1; justify-self:end; min-height:32px; }
  .account-table tr { gap:14px 16px; padding:20px 0; }
  .account-actions .account-primary { padding:7px; font-size:11px; }
  .account-actions .text-button { padding:5px; }
  .account-name { font-size:14px; }
  .account-sheet { width:100%; border:0; }
  .sheet-heading { padding:22px 20px 18px; }
  .sheet-tabs { padding-inline:20px; justify-content:space-between; gap:12px; }
  .sheet-tabs button { font-size:12px; }
  .sheet-body { padding:20px 20px calc(24px + env(safe-area-inset-bottom)); }
  .sheet-metrics strong { font-size:19px; }
  .dialog-heading { padding:20px 20px 14px; }
  .dialog-intro { padding-inline:20px; }
  .workspace-dialog>.fields { padding:20px; }
  .dialog-footer { padding:18px 20px; }
  .dialog-footer button { min-height:44px; flex:1; font-size:12px; }
  .console-workspace [data-panel="accounts"]>.card>.section-head { flex-wrap:wrap; gap:16px; }
  .console-workspace [data-panel="accounts"]>.card>.section-head>.actions { width:100%; }
  #account-count { margin-right:auto; }
}
