/* Qtum CBridge 运营工作台 — Uniswap Light Theme (Airy Pearl & Unicorn Pink).
   Presentation-only refactor: every DOM ID, hook, ARIA semantic and business flow stays unchanged. */

:root {
  --bg: #ffffff;
  --bg-login: #ffffff;
  --surface: #ffffff;
  --surface-2: #f9f9f9;
  --surface-3: #f2f2f2;
  --drawer: #ffffff;
  --line: rgb(34 34 34 / 8%);
  --line-soft: rgb(34 34 34 / 6%);
  --line-strong: rgb(34 34 34 / 13%);
  --input-border: rgb(34 34 34 / 13%);

  --text: #131313;
  --text-bright: #131313;
  --text-2: #4b5563;
  --text-3: #7d7d7d;
  --text-4: #9b9b9b;

  --accent: #f50db4;
  --accent-bright: #d90aa0;
  --accent-grad: linear-gradient(135deg, #f50db4, #ff4cd2);
  --accent-light: #c20a8e;
  --accent-pale: #b50885;
  --accent-soft: rgb(252 114 255 / 12%);
  --accent-line: rgb(245 13 180 / 22%);
  --accent-glow: none;
  --accent-ring: rgb(252 114 255 / 26%);
  /* Unselected sidebar item hover: half of the primary accent over white. */
  --nav-hover-bg: #fa86da;
  --nav-hover-text: #131313;

  --cyan: #0284c7;
  --sky: #0284c7;
  --eth: #2563eb;
  --eth-soft: rgb(59 130 246 / 10%);
  --qtum: #0284c7;
  --qtum-soft: rgb(14 165 233 / 10%);

  --success: #0c8911;
  --success-soft: rgb(33 201 94 / 11%);
  --success-line: rgb(33 201 94 / 26%);
  --progress: #2563eb;
  --progress-soft: rgb(59 130 246 / 10%);
  --progress-line: rgb(59 130 246 / 24%);
  --warning: #b45309;
  --warning-soft: rgb(245 158 11 / 10%);
  --warning-line: rgb(245 158 11 / 24%);
  --danger: #dc2626;
  --danger-soft: rgb(239 68 68 / 9%);
  --danger-line: rgb(239 68 68 / 24%);

  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow-pop: 0 24px 56px -14px rgb(19 19 19 / 16%);

  --font-sans: "Plus Jakarta Sans", "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  font-family: var(--font-sans);
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light;
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  background: transparent;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(ellipse 68% 44% at 50% -12%, rgb(252 114 255 / 11%) 0, transparent 62%),
    radial-gradient(ellipse 46% 36% at 88% 8%, rgb(152 161 192 / 8%) 0, transparent 58%),
    #ffffff;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body:not([data-connected=true]) {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 22% 18%, rgb(252 114 255 / 15%) 0, transparent 46%),
    radial-gradient(circle at 80% 82%, rgb(255 159 251 / 12%) 0, transparent 48%),
    radial-gradient(circle at 74% 22%, rgb(138 116 249 / 6%) 0, transparent 42%),
    #ffffff;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body:not([data-connected=true]) main {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 24px 64px;
}

body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }

/* ---------- top glass header ---------- */
header.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 12px max(24px, calc((100% - 1600px) / 2 + 24px));
  border-bottom: 1px solid rgb(34 34 34 / 7%);
  background: rgb(255 255 255 / 86%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
body:not([data-connected=true]) header.app-header {
  background: rgb(255 255 255 / 72%);
  border-bottom-color: rgb(34 34 34 / 6%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand .brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgb(252 114 255 / 14%);
  border: 1px solid rgb(245 13 180 / 22%);
}
.brand .brand-mark svg {
  width: 26px;
  height: 26px;
  display: block;
}
.brand .brand-mark svg path { fill: #f50db4; }
.brand .brand-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #131313;
}
.brand small {
  margin: 0;
  width: fit-content;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.header-sep {
  width: 1px;
  height: 30px;
  flex: none;
  margin: 0 6px;
  background: rgb(34 34 34 / 10%);
}
body:not([data-connected=true]) .header-sep { display: none; }

.header-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.header-title h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #131313;
}
.header-title p {
  margin: 0;
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.3;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid rgb(33 201 94 / 28%);
  border-radius: 999px;
  background: rgb(33 201 94 / 11%);
  color: #0c8911;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.header-actions .badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
}
body:not([data-connected=true]) .header-actions .badge {
  border-color: rgb(245 13 180 / 24%);
  background: rgb(252 114 255 / 12%);
  color: #c20a8e;
}
body:not([data-connected=true]) .header-actions .badge::before {
  background: #f50db4;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

#identity {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 4px 0 12px;
  border: 1px solid rgb(34 34 34 / 9%);
  border-radius: 999px;
  background: #f9f9f9;
}
.identity-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #16a34a;
}
.identity-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.identity-copy strong {
  font-size: 13.5px;
  font-weight: 600;
  color: #131313;
  line-height: 1.2;
  white-space: nowrap;
}
.identity-copy p {
  margin: 0;
  color: #7d7d7d;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.identity-copy p::before {
  content: '·';
  margin-right: 6px;
  color: rgb(34 34 34 / 24%);
}
.identity-copy p:empty { display: none; }
.identity-sep {
  width: 1px;
  height: 16px;
  flex: none;
  margin-left: 2px;
  background: rgb(34 34 34 / 10%);
}
.identity-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6b7280;
  box-shadow: none;
}
.identity-exit svg {
  width: 15px;
  height: 15px;
  display: block;
}
.identity-exit:hover:enabled {
  border-color: transparent;
  background: rgb(239 68 68 / 10%);
  color: #dc2626;
}

/* ---------- main layout & dark sidebar shell ---------- */
main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

#workspace:not([hidden]) {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.workspace-nav {
  grid-column: 1;
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 16px 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 2px 14px rgb(19 19 19 / 4%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.workspace-nav::before {
  content: 'CONSOLE PAGES';
  display: block;
  padding: 2px 12px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #7d7d7d;
}
.workspace-nav button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #6b7280;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.workspace-nav .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #6b7280;
  transition: color 0.15s ease;
}
.workspace-nav button:hover:enabled {
  background: var(--nav-hover-bg);
  border-color: transparent;
  color: var(--nav-hover-text);
}
.workspace-nav button:hover:enabled .nav-icon {
  color: var(--nav-hover-text);
}
.workspace-nav button[aria-selected=true],
.workspace-nav button[aria-selected=true]:hover:enabled {
  background: var(--accent);
  border-color: transparent;
  color: #ffffff;
  font-weight: 600;
  box-shadow: none;
}
.workspace-nav button[aria-selected=true] .nav-icon,
.workspace-nav button[aria-selected=true]:hover:enabled .nav-icon {
  color: #ffffff;
}

#approval-view,
#operations-view {
  grid-column: 2;
  min-width: 0;
}

/* ---------- AEGIS cyber-console login screen ---------- */
.login-view {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
}
.login-card {
  position: relative;
  padding: 36px 32px 30px;
  border: 1px solid rgb(34 34 34 / 9%);
  border-radius: 24px;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 18px 46px -14px rgb(19 19 19 / 10%);
  overflow: hidden;
}
.login-lock {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border: 1px solid rgb(245 13 180 / 24%);
  border-radius: 16px;
  background: rgb(252 114 255 / 12%);
  color: #f50db4;
}
.login-lock svg {
  width: 24px;
  height: 24px;
}
.login-card .eyebrow {
  text-align: center;
  margin-bottom: 6px;
  color: #f50db4;
}
.login-card h1 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #131313;
}
.login-copy {
  margin: 0 0 28px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}
.login-card #connect-form { margin: 0; }
.login-card #connect-form label {
  margin-bottom: 10px;
  color: #374151;
  font-size: 13.5px;
  letter-spacing: 0.04em;
}
.login-card #connect-form .inline {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}
.login-card #connect-form input {
  flex: none;
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgb(34 34 34 / 12%);
  border-radius: 14px;
  background: #f9f9f9;
  color: #131313;
  font-family: var(--font-mono);
  font-size: 14.5px;
}
.login-card #connect-form input:hover:not(:disabled) {
  border-color: rgb(34 34 34 / 22%);
  background: #f4f4f6;
}
.login-card #connect-form input:focus {
  border-color: #f50db4;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgb(252 114 255 / 24%);
}
.login-card #connect-form button {
  flex: none;
  width: 100%;
  height: 48px;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: none;
}
.login-card #connect-form button:hover:enabled {
  background: var(--accent-bright);
  filter: none;
}
.login-card #connect-form small {
  margin-top: 12px;
  color: #7d7d7d;
  font-size: 13px;
}
.login-card .intro-note { margin-top: 24px; }

.intro-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid rgb(245 13 180 / 16%);
  border-radius: 14px;
  background: rgb(252 114 255 / 6%);
  color: #6b7280;
  font-size: 13.5px;
  line-height: 1.6;
}
.intro-note strong {
  display: block;
  margin-bottom: 2px;
  color: #b50885;
  font-size: 13px;
  font-weight: 700;
}
.intro-note p {
  margin: 0;
  color: #6b7280;
  font-size: 13.5px;
}
.intro-dot {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #f50db4;
}

/* ---------- shared dark cards & typography ---------- */
.eyebrow {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-3);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.notice {
  padding: 13px 16px;
  border: 1px solid var(--warning-line);
  border-radius: var(--radius-md);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 14.5px;
  line-height: 1.65;
}

.info {
  margin: 20px 0;
  padding: 16px 18px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-md);
  background: rgb(245 13 180 / 7%);
}
.info h3 {
  margin: 0 0 6px;
  color: #b50885;
}
.info p {
  margin: 6px 0;
  color: var(--text-2);
  font-size: 14.5px;
}
.info ol {
  margin: 8px 0 6px;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.65;
}
.info li { margin: 4px 0; }

h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-bright);
}
h3 {
  margin: 0 0 12px;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text-bright);
}

.inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inline input {
  flex: 1;
  min-width: 0;
}

/* ---------- dark form controls ---------- */
label {
  display: block;
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-3);
}

input, textarea, select {
  width: 100%;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
input:hover:not(:disabled), textarea:hover:not(:disabled), select:hover:not(:disabled) {
  border-color: #9ca3af;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
input:disabled, textarea:disabled, select:disabled {
  background: #f4f4f6;
  border-color: rgb(34 34 34 / 7%);
  color: #7d7d7d;
  cursor: not-allowed;
}
textarea {
  resize: vertical;
  min-height: 82px;
  line-height: 1.6;
}
select {
  appearance: none;
  cursor: pointer;
  padding-right: 34px;
}
input::placeholder, textarea::placeholder { color: #9b9b9b; }

small {
  display: block;
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--text-3);
}
.muted {
  display: block;
  color: var(--text-3);
  font-size: 14px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #f9f9f9;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
}
.check input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--accent-bright);
}

/* ---------- buttons ---------- */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
button:hover:enabled {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
}
button:active:enabled { opacity: 0.92; }
button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  box-shadow: none;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

button.secondary {
  background: #f5f5f7;
  color: #222222;
  border-color: rgb(34 34 34 / 10%);
  box-shadow: none;
}
button.secondary:hover:enabled {
  background: #ebebef;
  border-color: rgb(34 34 34 / 16%);
  color: #131313;
}

#deliver {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
  box-shadow: none;
}
#deliver:hover:enabled {
  background: #15803d;
  border-color: #15803d;
  color: #ffffff;
}

button.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger-line);
  box-shadow: none;
}
button.danger:hover:enabled {
  background: rgb(220 38 38 / 14%);
  border-color: rgb(220 38 38 / 38%);
  color: #b91c1c;
}

/* ---------- top-center notifications ---------- */
.status-toasts {
  position: fixed; inset: max(22px, env(safe-area-inset-top)) auto auto 50%;
  z-index: 10000; display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  width: min(480px, calc(100vw - 32px)); max-width: none; margin: 0; padding: 0;
  border: 0; overflow: visible; background: transparent; color: var(--text);
  transform: translateX(-50%); pointer-events: none;
}
.status-toasts[popover]:not(:popover-open) { display: none; }
.status-toasts::backdrop { background: transparent; pointer-events: none; }
.notification-toast {
  --toast-color: var(--accent-light); --toast-soft: var(--accent-soft);
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 14px 16px 16px; overflow: hidden; border: 1px solid var(--line-strong);
  border-radius: 18px; background: rgb(255 255 255 / 97%); backdrop-filter: blur(20px);
  box-shadow: 0 20px 55px -18px rgb(30 20 45 / 24%), 0 4px 14px -6px rgb(30 20 45 / 12%), inset 0 1px 0 rgb(255 255 255 / 80%);
  pointer-events: auto; transform-origin: top center;
}
.notification-toast[data-tone=error] { --toast-color: var(--danger); --toast-soft: var(--danger-soft); }
.toast-symbol { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 11px; background: var(--toast-soft); color: var(--toast-color); }
.toast-symbol svg { width: 20px; height: 20px; }
.toast-error-icon,.notification-toast[data-tone=error] .toast-info-icon { display: none; }
.notification-toast[data-tone=error] .toast-error-icon { display: block; }
.toast-content { flex: 1; min-width: 0; padding-top: 1px; }
.toast-content strong { display: block; color: var(--text); font-size: 13px; font-weight: 650; line-height: 1.5; }
.notification-toast #feedback { margin: 3px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; color: var(--text-2); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; max-height: min(32vh, 180px); overflow-y: auto; }
.notification-toast #feedback::before { content: none; }
.notification-toast .toast-close { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; min-height: 26px; margin: -3px -2px 0 0; padding: 4px; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); box-shadow: none; }
.notification-toast .toast-close:hover { background: var(--surface-3); color: var(--text); }
.toast-close svg { width: 16px; height: 16px; }
.toast-lifetime { position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--toast-color); opacity: .3; transform-origin: left; }
.notification-toast.is-entering { animation: notice-enter 460ms cubic-bezier(.16, 1, .3, 1) both; }
.notification-toast.is-entering .toast-lifetime { animation: notice-lifetime 3s linear both; }
.notification-toast.is-leaving { animation: notice-leave 220ms cubic-bezier(.4, 0, 1, 1) both; }
@keyframes notice-enter { from { opacity: 0; transform: translateY(-26px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes notice-leave { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-12px) scale(.98); } }
@keyframes notice-lifetime { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.status-toasts #approval-loading { align-self: center; max-width: 100%; margin: 0; padding: 10px 15px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--text-2); box-shadow: 0 10px 30px -10px rgb(20 20 30 / 18%); font-size: 12px; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .notification-toast.is-entering,.notification-toast.is-leaving,.notification-toast.is-entering .toast-lifetime { animation: none; } }

/* ---------- workspace toolbars & approval panel ---------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}
#approval-view .toolbar {
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 2px 12px rgb(19 19 19 / 3%);
}
#pair {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  color: #f50db4;
}

.approval-panel { padding: 0; overflow: hidden; }
.approval-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 16px 22px 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.approval-panel #rows { padding: 0; min-height: 220px; }
.approval-panel #rows > .muted {
  padding: 44px 20px;
  text-align: center;
  color: var(--text-3);
}
.approval-panel .pager {
  padding: 14px 22px;
  border-top: 1px solid rgb(34 34 34 / 8%);
  background: var(--surface-2);
}

.tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
}
.tabs button {
  flex: none;
  min-height: 40px;
  padding: 0 2px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #6b7280;
  font-size: 15px;
  font-weight: 500;
  box-shadow: none;
}
.tabs button:hover:enabled {
  background: transparent;
  color: #131313;
}
.tabs button[aria-pressed=true],
.tabs button[aria-pressed=true]:hover:enabled {
  background: transparent;
  color: #131313;
  border-bottom-color: #f50db4;
  font-weight: 600;
}

.approval-lookup {
  display: flex;
  align-items: center;
  flex: 0 1 360px;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
}
.approval-lookup input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 13.5px;
}
.approval-lookup button {
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 13.5px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
}
.pager button {
  min-height: 32px;
  padding: 5px 13px;
  font-size: 13.5px;
}
#next:not(:disabled),
#operations-next:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}
#next:not(:disabled):hover,
#operations-next:not(:disabled):hover {
  border-color: var(--accent-bright);
  background: var(--accent-bright);
}
.pager span {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- operations panel & filters ---------- */
.operations-panel {
  padding: 24px;
}
.operations-panel > .toolbar {
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.operations-panel > .toolbar h2 {
  margin: 0;
  font-size: 20px;
  color: #131313;
}

#operations-feedback {
  margin: 0 0 14px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #f9f9f9;
  color: var(--text-2);
  font-size: 13.5px;
}
#operations-feedback:empty { display: none; }

.operations-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
  align-items: end;
  margin: 0 0 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #f9f9f9;
}
.operations-filters label {
  position: relative;
  display: grid;
  gap: 7px;
  margin-bottom: 0;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: #6b7280;
}
.operations-filters label:focus-within {
  color: #c20a8e;
}
/* CSP blocks data: images, so the select chevron is drawn with CSS borders. */
.operations-filters label:not(.operations-query-label)::after {
  content: '';
  position: absolute;
  right: 13px;
  bottom: 14px;
  width: 6px;
  height: 6px;
  border-right: 1.6px solid #6b7280;
  border-bottom: 1.6px solid #6b7280;
  transform: rotate(45deg);
  pointer-events: none;
}
.operations-filters select,
.operations-filters input {
  height: 36px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 14px;
}
.operations-filters input {
  font-family: var(--font-mono);
  font-size: 13.5px;
}
.operations-query-label { grid-column: span 2; }
.operations-filters button {
  height: 36px;
  min-height: 36px;
}

#operations-coverage {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #7d7d7d;
}
#operations-coverage:empty { display: none; }

#operations-rows {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}
#operations-rows:has(.operations-empty) {
  border-style: dashed;
  border-color: var(--line-strong);
  background: #f9f9f9;
}
.operations-empty {
  margin: 0;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 14.5px;
}

/* ---------- dark tables (orders & approval) ---------- */
.operations-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.operations-table thead th {
  padding: 13px 16px;
  border-bottom: 1px solid rgb(34 34 34 / 8%);
  background: var(--surface-2);
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}
.operations-table th:nth-child(1) { width: 24%; }
.operations-table th:nth-child(2) { width: 17%; }
.operations-table th:nth-child(3) { width: 13%; }
.operations-table th:nth-child(4) { width: 13%; }
.operations-table th:nth-child(5) { width: 21%; }
.operations-table th:nth-child(6) { width: 12%; }

.operations-table.approval-table th:nth-child(1) { width: 24%; }
.operations-table.approval-table th:nth-child(2) { width: 17%; }
.operations-table.approval-table th:nth-child(3) { width: 13%; }
.operations-table.approval-table th:nth-child(4) { width: 16%; }
.operations-table.approval-table th:nth-child(5) { width: 18%; }
.operations-table.approval-table th:nth-child(6) { width: 12%; }

.operations-table th:first-child,
.operations-table td:first-child { padding-left: 20px; }
.operations-table th:last-child,
.operations-table td:last-child { padding-right: 20px; }

.operations-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgb(34 34 34 / 7%);
  background: var(--surface);
  vertical-align: middle;
  transition: background 0.14s ease;
}
.operations-table tbody tr:last-child td { border-bottom: 0; }
.operations-table tr.operation-row { cursor: pointer; }
.operations-table tr.operation-row:hover td { background: rgb(252 114 255 / 6%); }
.operations-table tr.operation-row[aria-disabled=true] {
  cursor: default;
  opacity: 0.55;
}
.operations-table tr.operation-row[aria-disabled=true]:hover td { background: var(--surface); }
.operations-table tr.operation-row:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: -2px;
}

.approval-table tr.row.selected td { background: rgb(252 114 255 / 12%); }
.approval-table tr.row.selected td:first-child {
  box-shadow: inset 3px 0 0 #f50db4;
}
.approval-table .approval-admin {
  color: #222222;
  font-size: 14px;
  font-weight: 500;
}

.operations-table .operation-id {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: #c20a8e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.operations-table .operation-sub {
  display: block;
  margin-top: 3px;
  color: #6b7280;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.operations-table .operation-sub .mono { font-family: var(--font-mono); color: #6b7280; }

.operations-table .operation-route {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f5f5f7;
}
.operations-table .net-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
}
.operations-table .net-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #6b7280;
}
.operations-table .net-tag[data-chain=ethereum] { color: #2563eb; }
.operations-table .net-tag[data-chain=ethereum]::before { background: #2563eb; }
.operations-table .net-tag[data-chain=qtum] { color: #0284c7; }
.operations-table .net-tag[data-chain=qtum]::before { background: #0284c7; }
.operations-table .route-arrow {
  color: #7d7d7d;
  font-size: 12.5px;
}

.operations-table .operation-amount {
  display: inline;
  font-family: var(--font-mono);
  color: #131313;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.operations-table .operation-unit {
  margin-left: 5px;
  color: #c20a8e;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.operations-table .status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.55;
  white-space: nowrap;
}
.operations-table .status-chip::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.operations-table .status-chip[data-tone=success] {
  color: var(--success);
  background: var(--success-soft);
  border-color: var(--success-line);
}
.operations-table .status-chip[data-tone=progress] {
  color: var(--progress);
  background: var(--progress-soft);
  border-color: var(--progress-line);
}
.operations-table .status-chip[data-tone=warning] {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: var(--warning-line);
}
.operations-table .status-chip[data-tone=danger] {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger-line);
}
.operations-table .status-chip[data-tone=neutral] {
  color: #5e5e5e;
  background: #f3f4f6;
  border-color: rgb(34 34 34 / 10%);
}

.operations-table .operation-reason {
  display: block;
  margin-top: 5px;
  color: #6b7280;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.operations-table .operation-time {
  color: #c20a8e;
  font-family: var(--font-mono);
  font-size: 13.5px;
  white-space: nowrap;
}
.operations-table .row-chevron {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: 10px;
  border-radius: 7px;
  background: #f2f2f5;
  color: #6b7280;
  font-size: 0;
  line-height: 0;
  vertical-align: middle;
  transition: background 0.14s ease, color 0.14s ease;
}
.operations-table .row-chevron::before {
  content: '';
  box-sizing: border-box;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  border-top-right-radius: 1px;
  transform: translateX(-1.5px) rotate(45deg);
}
.operations-table tr.operation-row:hover .row-chevron {
  background: var(--accent);
  color: #ffffff;
}
.operations-table tr[aria-busy=true] td:last-child::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid rgb(245 13 180 / 24%);
  border-top-color: #f50db4;
  border-radius: 50%;
  vertical-align: -2px;
  animation: ops-spin 0.8s linear infinite;
}
.operations-table tr[aria-busy=true] .row-chevron { display: none; }

/* button-based operation rows (finance / wallet recovery) */
button.operation-row {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 15px 18px;
  border: 1px solid rgb(34 34 34 / 8%);
  border-radius: 12px;
  background: #f9f9f9;
  color: var(--text);
  text-align: left;
  white-space: normal;
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
button.operation-row:hover:enabled {
  background: rgb(252 114 255 / 7%);
  border-color: rgb(245 13 180 / 28%);
}
button.operation-row strong {
  display: block;
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: #131313;
}
button.operation-row span {
  display: block;
  margin: 2px 0;
  font-size: 13.5px;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

/* ---------- funds & runtime overview dashboard ---------- */
.operations-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.operations-overview.overview-dashboard {
  display: block;
  margin-top: 0;
}

.overview-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 18px;
}
.overview-context {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text-3);
  font-size: 14px;
}
.overview-eyebrow {
  padding: 3px 9px;
  border: 1px solid rgb(245 13 180 / 24%);
  border-radius: 7px;
  background: rgb(252 114 255 / 12%);
  color: #b50885;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.overview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.overview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid rgb(34 34 34 / 10%);
  border-radius: 999px;
  background: rgb(34 34 34 / 5%);
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
}
.overview-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.overview-badge[data-tone=success] {
  color: var(--success);
  background: var(--success-soft);
  border-color: var(--success-line);
}
.overview-badge[data-tone=warning] {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: var(--warning-line);
}

.overview-attention {
  margin: 0 0 18px;
  padding: 13px 16px;
  border: 1px solid var(--warning-line);
  border-radius: var(--radius-md);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 14.5px;
}
.overview-attention[data-tone=danger] {
  background: var(--danger-soft);
  border-color: var(--danger-line);
  color: var(--danger);
}
.overview-attention strong { display: block; margin-bottom: 3px; font-weight: 700; }
.overview-attention ul { margin: 4px 0 0; padding-left: 18px; }
.overview-attention li { margin: 3px 0; }

.overview-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.overview-stat {
  position: relative;
  min-width: 0;
  padding: 20px;
  border: 1px solid rgb(34 34 34 / 9%);
  border-radius: var(--radius-lg);
  background: #f9f9f9;
  overflow: hidden;
}
.overview-stat[data-key=assets] {
  border-color: rgb(245 13 180 / 24%);
  background:
    radial-gradient(circle at 100% 0, rgb(252 114 255 / 14%), transparent 12rem),
    #ffffff;
}
.overview-stat[data-tone=warning] {
  border-color: rgb(245 158 11 / 32%);
  background:
    radial-gradient(circle at 100% 0, rgb(245 158 11 / 10%), transparent 12rem),
    #ffffff;
}
.overview-stat h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.overview-stat h3::before {
  content: '';
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #7d7d7d;
}
.overview-stat[data-key=assets] h3::before {
  background: #f50db4;
  box-shadow: none;
}
.overview-stat[data-tone=warning] h3::before {
  background: #d97706;
  box-shadow: none;
}
.overview-stat-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}
.overview-stat-value {
  min-width: 0;
  font-family: var(--font-mono);
  font-size: clamp(32px, 2.7vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #131313;
  overflow-wrap: anywhere;
}
.overview-stat[data-key=assets] .overview-stat-value { color: #b50885; }
.overview-stat[data-tone=warning] .overview-stat-value { color: var(--warning); }

.overview-unit {
  color: #7aa2ff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.overview-stat-note {
  margin: 12px 0 0;
  color: #6b7280;
  font-size: 14px;
}
.overview-stat-extra {
  margin: 4px 0 0;
  color: #7d7d7d;
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.overview-snapshot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 14px 0 0;
  font-family: var(--font-mono);
  color: #7d7d7d;
  font-size: 13px;
}

.overview-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.overview-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 16px;
}
.overview-section-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 650;
  color: #131313;
}
.overview-section-head p {
  margin: 0;
  color: var(--text-3);
  font-size: 14px;
}

.overview-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 16px;
  border: 1px solid rgb(34 34 34 / 8%);
  border-radius: var(--radius-md);
  background: #f9f9f9;
  overflow: hidden;
}
.overview-counts > div {
  padding: 13px 18px;
  border-left: 1px solid rgb(34 34 34 / 7%);
}
.overview-counts > div:first-child { border-left: 0; }
.overview-counts span {
  display: block;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
}
.overview-counts strong {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  color: #131313;
}
.overview-counts small {
  display: inline;
  margin: 0 0 0 4px;
  color: #7d7d7d;
  font-size: 13.5px;
}
.overview-counts [data-tone=success] strong { color: var(--success); }
.overview-counts [data-tone=danger] strong { color: var(--danger); }

.overview-directions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.overview-direction {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid rgb(34 34 34 / 8%);
  border-radius: var(--radius-md);
  background: #f9f9f9;
}
.overview-direction h4 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgb(34 34 34 / 7%);
  font-family: var(--font-mono);
  color: #b50885;
  font-size: 14.5px;
  font-weight: 600;
}
.overview-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.overview-flow-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.overview-flow-cell span {
  color: #6b7280;
  font-size: 13.5px;
}
.overview-flow-cell strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 26px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #131313;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.overview-direction-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgb(34 34 34 / 7%);
}
.overview-direction-foot dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  margin: 0;
  padding: 0;
  gap: 6px 10px;
  border: 0;
  background: transparent;
  font-size: 14px;
}
.overview-direction-foot dt,
.overview-direction-foot dd {
  padding: 0;
  border: 0;
}
.overview-direction-foot dt { color: #6b7280; font-weight: 500; }
.overview-direction-foot dd {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  text-align: right;
  color: #222222;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}
.overview-direction-foot dd::before {
  content: '';
  flex: 1;
  min-width: 12px;
  border-bottom: 1px dotted #d1d5db;
  transform: translateY(-4px);
}
.overview-direction-foot[data-pending=true] dt:first-child,
.overview-direction-foot[data-pending=true] dd:first-of-type {
  color: var(--warning);
  font-weight: 700;
}

.overview-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.overview-balance {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid rgb(34 34 34 / 8%);
  border-radius: var(--radius-md);
  background: #f9f9f9;
}
.overview-balance-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgb(34 34 34 / 7%);
}
.overview-balance-head h4 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 650;
  color: #131313;
}
.overview-balance-unit {
  color: #c20a8e;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.overview-balance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.overview-balance-cell { min-width: 0; }
.overview-balance-label {
  display: block;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
}
.overview-balance-value {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #131313;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.overview-balance-cell[data-tone=warning] .overview-balance-label { color: var(--warning); font-weight: 600; }
.overview-difference[data-tone=warning] { color: var(--warning); }
.overview-difference[data-tone=muted] { color: #7d7d7d; }

.overview-explanation {
  margin: 12px 0 0;
  color: #6b7280;
  font-size: 14px;
}
.overview-scope {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgb(34 34 34 / 8%);
  border-radius: var(--radius-sm);
  background: #f9f9f9;
}
.overview-scope dl {
  margin: 10px 0 2px;
  padding: 8px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  grid-template-columns: minmax(150px, 1fr) 2fr;
}

.overview-limit-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 22px;
  padding: 13px 16px;
  border: 1px solid var(--success-line);
  border-radius: var(--radius-md);
  background: var(--success-soft);
  color: var(--text-2);
  font-size: 14.5px;
}
.overview-limit-note::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: none;
  transform: translateY(-1px);
}
.overview-limit-note strong { flex-shrink: 0; color: var(--success); font-weight: 700; }
.overview-limit-note small {
  width: 100%;
  margin-top: 2px;
  padding-left: 17px;
  color: #6b7280;
  font-size: 13.5px;
}
.overview-limit-note[data-tone=warning] {
  background: var(--warning-soft);
  border-color: var(--warning-line);
}
.overview-limit-note[data-tone=warning]::before {
  background: var(--warning);
  box-shadow: none;
}
.overview-limit-note[data-tone=warning] strong { color: var(--warning); }
.overview-limit-note[data-tone=danger] {
  background: var(--danger-soft);
  border-color: var(--danger-line);
}
.overview-limit-note[data-tone=danger]::before {
  background: var(--danger);
  box-shadow: none;
}
.overview-limit-note[data-tone=danger] strong { color: var(--danger); }

.overview-dashboard .overview-config {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgb(34 34 34 / 9%);
  border-radius: var(--radius-md);
  background: #f9f9f9;
}
.overview-dashboard .overview-config > summary {
  padding: 0;
  color: #222222;
  font-size: 15px;
  font-weight: 600;
}

.operation-metric {
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid rgb(245 13 180 / 16%);
  border-radius: var(--radius-md);
  background: #f9f9f9;
}
.operation-metric h3 {
  margin: 0 0 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgb(34 34 34 / 7%);
  font-size: 14.5px;
  color: #c20a8e;
  font-weight: 650;
}
.operation-metric dl {
  grid-template-columns: 140px minmax(0, 1fr);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.operation-metric dt,
.operation-metric dd {
  padding: 6px 0;
}

/* ---------- structured dark <dl>, details & pre ---------- */
dl {
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr);
  gap: 2px 18px;
  margin: 16px 0;
  padding: 12px 18px;
  border: 1px solid rgb(34 34 34 / 8%);
  border-radius: var(--radius-md);
  background: #f9f9f9;
  font-size: 14.5px;
}
dt {
  padding: 7px 0;
  color: #6b7280;
  font-size: 13.5px;
  font-weight: 500;
}
dd {
  margin: 0;
  padding: 7px 0;
  color: #131313;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

details { font-size: 14.5px; }
summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #374151;
  font-weight: 600;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: '';
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-top: 1.7px solid currentColor;
  border-right: 1.7px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}
details[open] > summary::before { transform: rotate(135deg); }
summary:hover { color: #b50885; }

pre {
  margin: 10px 0 0;
  padding: 13px 15px;
  border: 1px solid rgb(34 34 34 / 9%);
  border-radius: var(--radius-sm);
  background: #f6f7fb;
  color: #4b5563;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 360px;
  overflow: auto;
}

/* ---------- wallet exceptions & refund desk ---------- */
.exception-wallet {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgb(217 119 6 / 16%);
  border-radius: var(--radius-md);
  background: rgb(245 158 11 / 5%);
}
.exception-wallet > summary {
  font-weight: 600;
  color: #b45309;
}
.exception-wallet > .muted { margin-top: 10px; color: #92400e; opacity: 0.9; }
.exception-wallet > .actions { margin: 12px 0; }
.exception-admissions { margin-top: 12px; }
.admission-hold { border-top: 1px solid rgba(146, 64, 14, 0.25); padding: 10px 0; }
.admission-hold dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0 0 8px; }
.admission-hold dt { color: inherit; opacity: 0.75; }
.admission-hold dd { margin: 0; overflow-wrap: anywhere; }
.admission-hold details label { display: block; margin: 8px 0; }
.admission-hold details input:not([type=checkbox]) { width: 100%; max-width: 480px; box-sizing: border-box; }
.exception-wallet #wallet-recovery-panel {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgb(34 34 34 / 9%);
  border-radius: var(--radius-sm);
  background: #ffffff;
}
#wallet-recovery-panel > .actions { margin: 12px 0 14px; }

#finance-panel > .actions { margin: 0 0 16px; }
#finance-panel h3 { margin: 22px 0 10px; }
#finance-panel .pager { margin: 4px 0 8px; }
#finance-panel > .notice { margin: 0 0 14px; }
#finance-panel .finance-empty {
  margin: 8px 0 14px;
  padding: 36px 18px;
  border: 1px dashed rgb(34 34 34 / 12%);
  border-radius: var(--radius-md);
  background: #f9f9f9;
  color: var(--text-3);
  font-size: 14.5px;
  text-align: center;
}
#finance-panel .finance-row { padding: 15px 18px; }
#finance-panel .finance-row-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}
#finance-panel .finance-row-head strong {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 16.5px;
  font-weight: 600;
  color: #131313;
}
#finance-panel .finance-row-head .finance-row-meta {
  margin: 0;
  padding: 2px 8px;
  border: 1px solid rgb(34 34 34 / 9%);
  border-radius: 8px;
  background: #f5f5f7;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #4b5563;
}
#finance-panel .finance-row-head .finance-pill { margin: 0 0 0 auto; }
#finance-panel .finance-row-id {
  display: block;
  margin: 8px 0 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: #c20a8e;
  overflow-wrap: anywhere;
}

.finance-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border: 1px solid rgb(34 34 34 / 12%);
  border-radius: 999px;
  background: rgb(34 34 34 / 6%);
  color: #374151;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.finance-pill[data-tone=success] {
  background: var(--success-soft);
  border-color: var(--success-line);
  color: var(--success);
}
.finance-pill[data-tone=warning] {
  background: var(--warning-soft);
  border-color: var(--warning-line);
  color: var(--warning);
}
.finance-pill[data-tone=danger] {
  background: var(--danger-soft);
  border-color: var(--danger-line);
  color: var(--danger);
}

/* ---------- dark drawers & modal dialogs ---------- */
dialog {
  width: calc(100% - 32px);
  max-width: 560px;
  padding: 24px 26px 24px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-xl);
  background: var(--drawer);
  color: var(--text);
  box-shadow: var(--shadow-pop);
}
dialog::backdrop {
  background: rgb(19 19 19 / 42%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
dialog h2 { font-size: 20px; color: #131313; }
dialog p { font-size: 14.5px; color: var(--text-2); }

#confirmation {
  border-color: rgb(245 13 180 / 28%);
  background:
    radial-gradient(circle at 100% 0, rgb(252 114 255 / 12%), transparent 14rem),
    #ffffff;
}
#confirmation dl { grid-template-columns: 116px minmax(0, 1fr); }
#confirmation-note {
  padding: 10px 12px;
  border: 1px solid var(--warning-line);
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 14px;
}
#confirmation-note:empty { display: none; }

#operations-dialog,
#finance-dialog,
#wallet-recovery-dialog,
#approval-dialog {
  max-width: 920px;
  max-height: 88svh;
  padding: 0;
  overflow: hidden;
}
#operations-dialog[open],
#finance-dialog[open],
#wallet-recovery-dialog[open],
#approval-dialog[open] {
  display: flex;
  flex-direction: column;
}

.operations-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
}
.operations-dialog-header h2 {
  margin: 0;
  font-size: 18.5px;
  font-weight: 700;
}
.approval-dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.operations-dialog-body {
  padding: 22px 24px 28px;
  overflow: auto;
  overscroll-behavior: contain;
}
.operations-dialog-body p { line-height: 1.65; }
.operations-dialog-body > .actions:first-child { margin-top: 0; margin-bottom: 14px; }

#operations-dialog-feedback {
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--danger-line);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: #fda4af;
  font-size: 14px;
}
#operations-dialog-feedback:empty { display: none; }
#operations-detail > dl,
#approval-dialog dl,
#finance-dialog .operations-dialog-body > dl,
#wallet-recovery-dialog .operations-dialog-body > dl,
#confirmation dl {
  row-gap: 0;
  padding-block: 8px;
}
#operations-detail > dl dt,
#operations-detail > dl dd,
#approval-dialog dl dt,
#approval-dialog dl dd,
#finance-dialog .operations-dialog-body > dl dt,
#finance-dialog .operations-dialog-body > dl dd,
#wallet-recovery-dialog .operations-dialog-body > dl dt,
#wallet-recovery-dialog .operations-dialog-body > dl dd,
#confirmation dl dt,
#confirmation dl dd {
  padding: 4px 0;
  line-height: 1.4;
}

#finance-dialog > p[role=status]:not(:empty),
#wallet-recovery-dialog > p[role=status]:not(:empty) {
  margin: 12px 24px 0;
  padding: 10px 14px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: #b50885;
  font-size: 14px;
}
#finance-dialog > #finance-loading,
#wallet-recovery-dialog > #wallet-recovery-loading {
  margin: 10px 24px 0;
}

/* approval dialog interior */
#empty { padding: 72px 16px; text-align: center; color: var(--text-3); }
#empty h2 { color: #131313; }
.detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.detail-heading h2 { margin: 0; }
.detail-heading .badge {
  background: rgb(252 114 255 / 12%);
  border-color: rgb(245 13 180 / 28%);
  color: #b50885;
}
.evidence {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}
.evidence h3 { margin-bottom: 6px; }
.evidence p { font-size: 14.5px; color: var(--text-2); margin: 0 0 10px; }
.evidence details { margin-bottom: 14px; }

#action-summary {
  margin: 20px 0 0;
  padding: 13px 15px;
  border: 1px solid rgb(34 34 34 / 9%);
  border-radius: var(--radius-md);
  background: #f9f9f9;
  color: var(--text-2);
  font-size: 14.5px;
}
#action-form {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgb(34 34 34 / 9%);
  border-radius: var(--radius-md);
  background: #f9f9fb;
}
.action-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.action-heading { min-width: 0; }
#action-form h3 { margin: 0; font-size: 15.5px; }
.action-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-3);
}
.action-steps {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 4px 10px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}
.action-steps li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.action-steps .step-arrow {
  color: var(--text-4);
  font-weight: 400;
}
.action-steps .step-dot {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.action-steps li[data-state=active] { color: var(--accent-light); }
.action-steps li[data-state=active] .step-dot { background: var(--accent); color: #ffffff; }
.action-steps li[data-state=done] { color: var(--success); }
.action-steps li[data-state=done] .step-dot { background: var(--success-soft); color: var(--success); }
.action-steps li[data-state=warning] { color: var(--warning); }
.action-steps li[data-state=warning] .step-dot { background: var(--warning-soft); color: var(--warning); }
.action-steps li[data-state=danger] { color: var(--danger); }
.action-steps li[data-state=danger] .step-dot { background: var(--danger-soft); color: var(--danger); }

.action-deliver-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--success-line);
  border-radius: var(--radius-sm);
  background: var(--success-soft);
}
.action-deliver-box[data-tone=warning] {
  border-color: var(--warning-line);
  background: var(--warning-soft);
}
.action-deliver-copy { min-width: 0; }
.action-deliver-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--success);
}
.action-deliver-box[data-tone=warning] .action-deliver-copy strong { color: var(--warning); }
.action-deliver-copy p {
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-2);
}
.action-deliver-box #deliver {
  min-height: 38px;
  padding: 8px 18px;
  flex-shrink: 0;
}

.action-fields {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.action-fields[data-mode=secondary-revoke] {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
}
.action-fields-heading {
  margin: 0;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-3);
}
#action-form .action-field label,
#action-form .action-ttl-row label {
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-2);
}
#action-form textarea,
#action-form input[type=number] {
  background: #ffffff;
}
#action-form textarea {
  min-height: 70px;
  font-size: 14px;
  line-height: 1.55;
}
.action-ttl-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.action-ttl-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#ttl {
  width: 112px;
  font-family: var(--font-mono);
  font-size: 14px;
}
.action-ttl-unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
}
#ttl-help {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-3);
}
#action-form .action-check {
  margin: 0;
  padding: 10px 12px;
  background: #ffffff;
  border-color: var(--line-strong);
  font-size: 13.5px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
#action-form .action-check:has(input:checked) {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
#action-form .action-fields[data-mode=secondary-revoke] .action-check:has(input:checked),
#action-form .action-fields[data-mode=revoke-only] .action-check:has(input:checked) {
  border-color: var(--danger-line);
  background: var(--danger-soft);
}

.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.action-primary-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.action-bar #revoke { margin-left: auto; }
#action-form[data-only-revoke=true] .action-bar #revoke { margin-left: 0; }
.action-help {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.audit-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}
#audit .audit-empty {
  padding: 6px 0;
  color: var(--text-3);
  font-size: 13px;
}

/* recovery panel inside operations dialog */
.recovery-panel {
  margin: 22px 0;
  padding: 18px 20px;
  border: 1px solid rgb(245 13 180 / 22%);
  border-radius: var(--radius-md);
  background: #f9f9f9;
}
.recovery-panel h3 { margin-bottom: 6px; }
.recovery-panel textarea { margin: 8px 0 4px; background: #f6f7fb; }
.recovery-panel #operations-confirm { margin-top: 14px; }
.recovery-panel #operations-confirm p { color: var(--warning); margin: 0 0 10px; }

/* finance & wallet dialog interior */
#finance-dialog label,
#wallet-recovery-dialog label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}
#wallet-recovery-dialog label:has(input[type=checkbox]),
.admission-hold label:has(input[type=checkbox]) {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #f9f9f9;
}
#wallet-recovery-dialog label input[type=checkbox],
.admission-hold label input[type=checkbox] {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--accent-bright);
}
#finance-dialog .operations-dialog-body > dl:first-child { margin-top: 0; }
#finance-dialog .operations-dialog-body > h3 {
  margin: 24px 0 10px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}
#finance-dialog .operations-dialog-body > .notice { margin: 16px 0; }
#finance-dialog .operations-dialog-body > .actions { margin: 14px 0 12px; }
#finance-dialog .operations-dialog-body > label { margin-top: 14px; }
#finance-dialog .operations-dialog-body > details { margin-top: 14px; }
#finance-dialog .operations-dialog-body > .operation-metric { margin-top: 12px; }
#finance-dialog .operation-metric details { margin: 10px 0; }
#finance-dialog .operation-metric h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: #131313;
}
#finance-dialog textarea.finance-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgb(244 63 94 / 22%);
}

/* ---------- cross-service audit timeline ---------- */
#operations-audit-coverage {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.55;
}
#operations-audit,
#audit {
  position: relative;
  list-style: none;
  padding: 4px 0 4px 26px;
  margin: 12px 0 14px;
}
#audit:has(.audit-empty) { padding-left: 0; }
.audit-item {
  position: relative;
  margin-bottom: 10px;
  padding: 11px 14px;
  border: 1px solid rgb(34 34 34 / 8%);
  border-radius: var(--radius-sm);
  background: #ffffff;
  overflow-wrap: anywhere;
}
.audit-item:last-child { margin-bottom: 0; }
.audit-item::before {
  content: '';
  box-sizing: border-box;
  position: absolute;
  left: -22px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f50db4;
  box-shadow: 0 0 0 2px rgb(245 13 180 / 18%);
}
.audit-item::after {
  content: '';
  box-sizing: border-box;
  position: absolute;
  left: -18px;
  top: 32px;
  bottom: -22px;
  width: 2px;
  border-radius: 999px;
  background: #e2e4ea;
}
.audit-item:last-child::after { display: none; }
.audit-item[data-source=chain]::before { background: #2563eb; box-shadow: 0 0 0 2px rgb(37 99 235 / 16%); }
.audit-item[data-source=signer]::before { background: #0d9488; box-shadow: 0 0 0 2px rgb(13 148 136 / 16%); }
.audit-item[data-source=approval]::before { background: #16a34a; box-shadow: 0 0 0 2px rgb(22 163 74 / 16%); }
.audit-item[data-source=operations]::before { background: #d97706; box-shadow: 0 0 0 2px rgb(217 119 6 / 16%); }
#audit .audit-item[data-tone=accent]::before { background: var(--accent); box-shadow: 0 0 0 2px rgb(245 13 180 / 18%); }
#audit .audit-item[data-tone=success]::before { background: #16a34a; box-shadow: 0 0 0 2px rgb(22 163 74 / 16%); }
#audit .audit-item[data-tone=warning]::before { background: #d97706; box-shadow: 0 0 0 2px rgb(217 119 6 / 16%); }
#audit .audit-item[data-tone=danger]::before { background: #dc2626; box-shadow: 0 0 0 2px rgb(220 38 38 / 16%); }
.audit-item[data-event=REQUEST_FAILED] { opacity: 0.72; }

.audit-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.audit-source {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgb(34 34 34 / 8%);
  color: #374151;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.audit-source.source-chain { background: rgb(59 130 246 / 10%); color: #2563eb; }
.audit-source.source-backend { background: #f3f4f6; color: #4b5563; }
.audit-source.source-handoff { background: rgb(252 114 255 / 12%); color: #c20a8e; }
.audit-source.source-authorization { background: rgb(33 201 94 / 11%); color: #0c8911; }
.audit-source.source-operations { background: rgb(245 158 11 / 11%); color: #b45309; }
.audit-source.source-signer { background: rgb(20 184 166 / 11%); color: #0f766e; }
.audit-source.source-approval { background: rgb(33 201 94 / 11%); color: #0c8911; }

.audit-event {
  font-size: 13px;
  font-weight: 650;
  color: #131313;
}
.audit-code {
  padding: 1px 6px;
  border: 1px solid rgb(34 34 34 / 9%);
  border-radius: 5px;
  background: #f6f7fb;
  color: #6b7280;
  font-family: var(--font-mono);
  font-size: 11px;
}
.audit-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  margin-left: auto;
  text-align: right;
}
.audit-time time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: #c20a8e;
}
.audit-abs {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #7d7d7d;
}
.audit-note {
  margin: 5px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-2);
}
.audit-raw { margin-top: 7px; }
.audit-raw summary { font-size: 12px; color: #6b7280; }
button.audit-raw-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}
button.audit-raw-toggle::before {
  content: '';
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  border-top: 1.6px solid currentColor;
  border-right: 1.6px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}
button.audit-raw-toggle[aria-expanded=true]::before { transform: rotate(135deg); }
button.audit-raw-toggle:hover:enabled {
  background: transparent;
  border-color: transparent;
  color: #b50885;
}
.audit-raw pre { max-height: 220px; margin-top: 6px; font-size: 11.5px; line-height: 1.55; }

/* ---------- loading indicators & spinners ---------- */
@keyframes ops-spin { to { transform: rotate(360deg); } }

#operations-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 9px 13px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: #b50885;
}
#operations-loading::before {
  content: '';
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgb(245 13 180 / 24%);
  border-top-color: #f50db4;
  border-radius: 50%;
  animation: ops-spin 0.8s linear infinite;
}

/* Action indicators retain the original label and stop with the request. */
button[aria-busy="true"] {
  position: relative;
  padding-inline-end: 36px;
  cursor: wait;
  opacity: 0.85;
}
button[aria-busy="true"]::after {
  content: '';
  position: absolute;
  inset-inline-end: 11px;
  top: calc(50% - 7px);
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: ops-spin 0.8s linear infinite;
  pointer-events: none;
}

.request-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  font-size: 14px;
}
.request-loading::before {
  content: '';
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 2px solid rgb(245 13 180 / 24%);
  border-top-color: #f50db4;
  border-radius: 50%;
  animation: ops-spin 0.8s linear infinite;
}

/* ---------- dark scrollbars & overflow guard ---------- */
body, pre, .operations-dialog-body {
  scrollbar-width: thin;
  scrollbar-color: #28364a #f5f5f7;
}
body::-webkit-scrollbar, pre::-webkit-scrollbar, .operations-dialog-body::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
body::-webkit-scrollbar-track, pre::-webkit-scrollbar-track, .operations-dialog-body::-webkit-scrollbar-track {
  background: #f5f5f7;
}
body::-webkit-scrollbar-thumb, pre::-webkit-scrollbar-thumb, .operations-dialog-body::-webkit-scrollbar-thumb {
  background: #d4d7df;
  border: 3px solid #f5f5f7;
  border-radius: 10px;
}
body::-webkit-scrollbar-thumb:hover, pre::-webkit-scrollbar-thumb:hover, .operations-dialog-body::-webkit-scrollbar-thumb:hover {
  background: #b6bcc8;
}

main, #workspace, #approval-view, #operations-view, .operations-panel, .operation-metric { min-width: 0; }
dd, pre, .operation-row, #feedback { overflow-wrap: anywhere; }

/* ---------- responsive breakpoints ---------- */
@media (max-width: 1180px) {
  .overview-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  #workspace:not([hidden]) {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .workspace-nav {
    grid-column: 1;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
  }
  .workspace-nav::before { display: none; }
  .workspace-nav button {
    flex: 1 1 auto;
    width: auto;
    min-height: 38px;
    justify-content: center;
    padding: 0 12px;
    font-size: 14px;
  }
  #approval-view,
  #operations-view { grid-column: 1; }
  .operations-overview { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .overview-compare { grid-template-columns: 1fr; }

  #operations-rows {
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .operations-table { display: block; }
  .operations-table thead { display: none; }
  .operations-table tbody { display: block; }
  .operations-table tr.operation-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "order time" "amount route" "source source" "job job";
    gap: 9px 12px;
    margin: 0 0 10px;
    padding: 14px 15px;
    border: 1px solid rgb(34 34 34 / 9%);
    border-radius: var(--radius-md);
    background: #f9f9f9;
  }
  .approval-panel .operations-table { padding: 14px; }
  .operations-table tr.operation-row:last-child { margin-bottom: 0; }
  .operations-table tbody td {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
  }
  .operations-table tbody td:first-child,
  .operations-table tbody td:last-child { padding: 0; }
  .operations-table tr.operation-row:hover td,
  .operations-table tr.operation-row[aria-disabled=true]:hover td { background: transparent; }
  .operations-table .c-order { grid-area: order; display: block; min-width: 0; }
  .operations-table .c-time { grid-area: time; justify-content: flex-end; align-self: start; }
  .operations-table .c-amount { grid-area: amount; }
  .operations-table .c-route { grid-area: route; justify-content: flex-end; }
  .operations-table .c-source { grid-area: source; }
  .operations-table .c-job { grid-area: job; flex-wrap: wrap; }
  .operations-table .c-source::before,
  .operations-table .c-job::before {
    flex-shrink: 0;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
  }
  .operations-table .c-source::before { content: '来源'; }
  .operations-table .c-job::before { content: '任务'; }
  .approval-table .c-source::before { content: '状态'; }
  .approval-table .c-job::before { content: '管理员'; }
  .operations-table .operation-reason {
    flex-basis: 100%;
    margin-top: 0;
    white-space: normal;
  }
  .operations-table .operation-id {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 820px) {
  header.app-header { min-height: 60px; padding: 8px 14px; gap: 10px; }
  .brand .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .brand .brand-mark svg { width: 22px; height: 22px; }
  .brand .brand-name { font-size: 15.5px; }
  body[data-connected=true] .brand .brand-name { display: none; }
  .header-actions .badge { display: none; }
  .header-sep { height: 24px; margin: 0 4px; }
  .header-title h1 { font-size: 16.5px; }
  .header-title p { display: none; }
  #identity { gap: 6px; height: 34px; padding: 0 3px 0 10px; }
  .identity-copy p { display: none; }
  .identity-exit { width: 26px; height: 26px; min-height: 26px; padding: 0; }
  .status-toasts { top: max(16px, env(safe-area-inset-top)); width: calc(100vw - 28px); }

  main { padding: 16px 14px 48px; }
  .login-view { margin-top: 4vh; }
  .login-card { padding: 26px 20px 24px; }
  .login-card h1 { font-size: 24px; }

  .workspace-nav button { flex: 1 1 44%; font-size: 14px; }
  .operations-panel { padding: 16px 14px 20px; }
  .operations-filters { grid-template-columns: 1fr; padding: 12px; }
  .operations-query-label { grid-column: auto; }
  .approval-toolbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px 0; }
  .approval-toolbar .tabs { width: 100%; border-bottom: 1px solid var(--line); }
  .approval-lookup { flex: 0 0 auto; width: 100%; margin-bottom: 12px; }

  dl { grid-template-columns: 112px minmax(0, 1fr); gap: 2px 12px; padding: 10px 14px; }
  .operation-metric dl { grid-template-columns: 108px minmax(0, 1fr); }
  .toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .detail-heading { flex-direction: column; align-items: flex-start; }

  .operations-dialog-header,
  .operations-dialog-body { padding: 14px 16px; }
  #finance-dialog > p[role=status]:not(:empty),
  #wallet-recovery-dialog > p[role=status]:not(:empty) { margin: 10px 16px 0; }
  .actions button { flex: 1 1 calc(50% - 8px); }
}

@media (max-width: 640px) {
  .action-deliver-box { flex-direction: column; align-items: stretch; }
  .action-deliver-box #deliver { width: 100%; }
  .action-bar #revoke { margin-left: 0; }
  .overview-topline { align-items: flex-start; }
  .overview-context { flex-wrap: wrap; gap: 6px; }
  .overview-hero { grid-template-columns: 1fr; gap: 12px; }
  .overview-stat { padding: 16px; }
  .overview-stat-value { font-size: 34px; }
  .overview-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-counts > div:nth-child(odd) { border-left: 0; }
  .overview-counts > div:nth-child(n+3) { border-top: 1px solid rgb(34 34 34 / 7%); }
  .overview-directions { grid-template-columns: 1fr; }
  .overview-balance-grid { grid-template-columns: 1fr; gap: 12px; }
  .overview-scope dl { grid-template-columns: 1fr; }
  .overview-scope dt { padding-bottom: 2px; border-bottom: 0; }
  .overview-scope dd { padding-top: 0; }
  .audit-time { margin-left: 0; align-items: flex-start; text-align: left; width: 100%; flex-direction: row; gap: 8px; }
}

@media (max-width: 560px) {
  #finance-panel .finance-row-head .finance-pill { margin-left: 0; }
}

@media (max-width: 420px) {
  .actions button { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  body:not([data-connected=true]) .header-actions .badge::before,
  #operations-loading::before,
  button[aria-busy="true"]::after,
  .request-loading::before,
  .operations-table tr[aria-busy=true] td:last-child::after { animation: none; }
}

/* ---------- theme toggle button (top-right header) ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 999px;
  box-shadow: none;
}
.theme-toggle .theme-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.theme-toggle .theme-icon-sun { display: none; }
:root[data-theme=dark] .theme-toggle .theme-icon-moon { display: none; }
:root[data-theme=dark] .theme-toggle .theme-icon-sun { display: block; }
.theme-toggle:hover:enabled {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-light);
}
@media (max-width: 820px) {
  .theme-toggle {
    width: 34px;
    height: 34px;
    min-height: 34px;
  }
}

/* ---------- dark theme override (Clean Slate & Qtum Sky) ---------- */
:root[data-theme=dark] {
  --bg: #0e1726;
  --bg-login: #0c1524;
  --surface: #162235;
  --surface-2: #121c2d;
  --surface-3: #1e2e46;
  --drawer: #142032;
  --line: rgb(148 163 184 / 15%);
  --line-soft: rgb(148 163 184 / 10%);
  --line-strong: rgb(148 163 184 / 24%);
  --input-border: #334863;
  --text: #f1f5f9;
  --text-bright: #f8fafc;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --text-4: #64748b;
  --accent: #0ea5e9;
  --accent-bright: #38bdf8;
  --accent-grad: linear-gradient(135deg, #0284c7, #0ea5e9);
  --accent-light: #7dd3fc;
  --accent-pale: #bae6fd;
  --accent-soft: rgb(14 165 233 / 12%);
  --accent-line: rgb(56 189 248 / 28%);
  --accent-ring: rgb(56 189 248 / 24%);
  /* Half of the dark-theme accent over the sidebar surface. */
  --nav-hover-bg: #12638f;
  --nav-hover-text: #f1f5f9;
  --cyan: #22d3ee;
  --sky: #7dd3fc;
  --eth: #60a5fa;
  --eth-soft: rgb(96 165 250 / 12%);
  --qtum: #22d3ee;
  --qtum-soft: rgb(34 211 238 / 12%);
  --success: #34d399;
  --success-soft: rgb(52 211 153 / 10%);
  --success-line: rgb(52 211 153 / 26%);
  --progress: #60a5fa;
  --progress-soft: rgb(96 165 250 / 10%);
  --progress-line: rgb(96 165 250 / 26%);
  --warning: #fbbf24;
  --warning-soft: rgb(251 191 36 / 10%);
  --warning-line: rgb(251 191 36 / 28%);
  --danger: #fb7185;
  --danger-soft: rgb(251 113 133 / 10%);
  --danger-line: rgb(251 113 133 / 28%);
  --shadow-pop: 0 24px 54px -14px rgb(4 10 22 / 72%);
  color-scheme: dark;
}
:root[data-theme=dark] body {
  background: radial-gradient(ellipse 65% 50% at 12% 0%, rgb(14 165 233 / 11%) 0, transparent 62%), radial-gradient(ellipse 55% 45% at 88% 8%, rgb(20 184 166 / 7%) 0, transparent 58%), linear-gradient(180deg, #101b2e 0%, #0e1726 55%, #0c1422 100%);
}
:root[data-theme=dark] body:not([data-connected=true]) {
  background: radial-gradient(circle at 18% 18%, rgb(14 165 233 / 14%) 0, transparent 48%), radial-gradient(circle at 82% 82%, rgb(20 184 166 / 11%) 0, transparent 50%), linear-gradient(160deg, #111f35 0%, #0d1727 52%, #0b1423 100%);
}
:root[data-theme=dark] header.app-header {
  border-bottom: 1px solid rgb(148 163 184 / 14%);
  background: rgb(18 29 46 / 84%);
}
:root[data-theme=dark] body:not([data-connected=true]) header.app-header {
  background: rgb(14 23 38 / 64%);
  border-bottom-color: rgb(148 163 184 / 12%);
}
:root[data-theme=dark] .brand .brand-mark {
  background: rgb(14 165 233 / 12%);
  border: 1px solid rgb(14 165 233 / 28%);
}
:root[data-theme=dark] .brand .brand-mark svg path {
  fill: #38bdf8;
}
:root[data-theme=dark] .brand .brand-name {
  color: #f8fafc;
}
:root[data-theme=dark] .brand small {
  color: #8d9bb0;
}
:root[data-theme=dark] .header-sep {
  background: rgb(148 163 184 / 16%);
}
:root[data-theme=dark] .header-title h1 {
  color: #f8fafc;
}
:root[data-theme=dark] .badge {
  border: 1px solid rgb(16 185 129 / 26%);
  background: rgb(16 185 129 / 10%);
  color: #34d399;
}
:root[data-theme=dark] .header-actions .badge::before {
  background: #34d399;
  box-shadow: 0 0 6px rgb(52 211 153 / 42%);
}
:root[data-theme=dark] body:not([data-connected=true]) .header-actions .badge {
  border-color: rgb(14 165 233 / 28%);
  background: rgb(14 165 233 / 12%);
  color: #7dd3fc;
}
:root[data-theme=dark] body:not([data-connected=true]) .header-actions .badge::before {
  background: #38bdf8;
  box-shadow: 0 0 6px rgb(56 189 248 / 55%);
}
:root[data-theme=dark] #identity {
  border: 1px solid rgb(148 163 184 / 16%);
  border-radius: 999px;
  background: rgb(30 41 59 / 60%);
}
:root[data-theme=dark] .identity-dot {
  background: #34d399;
  box-shadow: 0 0 5px rgb(52 211 153 / 36%);
}
:root[data-theme=dark] .identity-copy strong {
  color: #e8edf7;
}
:root[data-theme=dark] .identity-copy p {
  color: #94a3b8;
}
:root[data-theme=dark] .identity-copy p::before {
  color: rgb(148 163 184 / 32%);
}
:root[data-theme=dark] .identity-sep {
  background: rgb(148 163 184 / 18%);
}
:root[data-theme=dark] .identity-exit {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
}
:root[data-theme=dark] .identity-exit:hover:enabled {
  border-color: transparent;
  background: rgb(244 63 94 / 14%);
  color: #fb7185;
}
:root[data-theme=dark] .workspace-nav {
  background: rgb(22 34 53 / 88%);
  box-shadow: none;
}
:root[data-theme=dark] .workspace-nav::before {
  color: #64748b;
}
:root[data-theme=dark] .workspace-nav button {
  color: #8d9bb0;
}
:root[data-theme=dark] .workspace-nav .nav-icon {
  color: #718198;
}
:root[data-theme=dark] .workspace-nav button:hover:enabled {
  background: var(--nav-hover-bg);
  border-color: transparent;
  color: var(--nav-hover-text);
}
:root[data-theme=dark] .workspace-nav button:hover:enabled .nav-icon {
  color: var(--nav-hover-text);
}
:root[data-theme=dark] .workspace-nav button[aria-selected=true],
:root[data-theme=dark] .workspace-nav button[aria-selected=true]:hover:enabled {
  background: var(--accent);
  border-color: transparent;
  color: #ffffff;
  font-weight: 600;
  box-shadow: none;
}
:root[data-theme=dark] .workspace-nav button[aria-selected=true] .nav-icon,
:root[data-theme=dark] .workspace-nav button[aria-selected=true]:hover:enabled .nav-icon {
  color: #ffffff;
}
:root[data-theme=dark] .login-card {
  border: 1px solid rgb(148 163 184 / 18%);
  background: rgb(20 32 50 / 84%);
  box-shadow: 0 24px 48px -16px rgb(4 10 22 / 60%);
}
:root[data-theme=dark] .login-lock {
  border: 1px solid rgb(56 189 248 / 28%);
  background: rgb(56 189 248 / 14%);
  color: #38bdf8;
}
:root[data-theme=dark] .login-card .eyebrow {
  color: #38bdf8;
}
:root[data-theme=dark] .login-card h1 {
  color: #ffffff;
}
:root[data-theme=dark] .login-copy {
  color: #94a3b8;
}
:root[data-theme=dark] .login-card #connect-form label {
  color: #cbd5e1;
}
:root[data-theme=dark] .login-card #connect-form input {
  border: 1px solid rgb(148 163 184 / 18%);
  background: rgb(12 20 34 / 78%);
  color: #ffffff;
}
:root[data-theme=dark] .login-card #connect-form input:hover:not(:disabled) {
  border-color: rgb(255 255 255 / 20%);
  background: rgb(12 20 34 / 92%);
}
:root[data-theme=dark] .login-card #connect-form input:focus {
  border-color: #06b6d4;
  background: rgb(12 20 34 / 98%);
  box-shadow: 0 0 0 3px rgb(6 182 212 / 16%);
}
:root[data-theme=dark] .login-card #connect-form small {
  color: #64748b;
}
:root[data-theme=dark] .intro-note {
  border: 1px solid rgb(56 189 248 / 22%);
  background: rgb(15 23 42 / 55%);
  color: #94a3b8;
}
:root[data-theme=dark] .intro-note strong {
  color: #bae6fd;
}
:root[data-theme=dark] .intro-note p {
  color: #94a3b8;
}
:root[data-theme=dark] .intro-dot {
  background: #22d3ee;
  box-shadow: 0 0 10px rgb(34 211 238 / 65%);
}
:root[data-theme=dark] .info {
  background: linear-gradient(145deg, rgb(88 28 135 / 18%), rgb(15 23 42 / 30%)), #111724;
}
:root[data-theme=dark] .info h3 {
  color: #bae6fd;
}
:root[data-theme=dark] input:hover:not(:disabled),
:root[data-theme=dark] textarea:hover:not(:disabled),
:root[data-theme=dark] select:hover:not(:disabled) {
  border-color: #475569;
}
:root[data-theme=dark] input:disabled,
:root[data-theme=dark] textarea:disabled,
:root[data-theme=dark] select:disabled {
  background: rgb(15 23 42 / 50%);
  border-color: rgb(148 163 184 / 11%);
  color: #64748b;
}
:root[data-theme=dark] input::placeholder,
:root[data-theme=dark] textarea::placeholder {
  color: #526076;
}
:root[data-theme=dark] .check {
  background: rgb(15 23 42 / 60%);
}
:root[data-theme=dark] button.secondary {
  background: rgb(30 41 59 / 75%);
  color: #cbd5e1;
  border-color: rgb(148 163 184 / 20%);
}
:root[data-theme=dark] button.secondary:hover:enabled {
  background: #1e293b;
  border-color: rgb(148 163 184 / 38%);
  color: #ffffff;
}
:root[data-theme=dark] #deliver {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}
:root[data-theme=dark] #deliver:hover:enabled {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}
:root[data-theme=dark] button.danger:hover:enabled {
  background: rgb(244 63 94 / 18%);
  border-color: rgb(251 113 133 / 45%);
  color: #fda4af;
}
:root[data-theme=dark] .notification-toast { background: rgb(22 27 39 / 97%); border-color: rgb(255 255 255 / 12%); box-shadow: 0 22px 65px -16px rgb(0 0 0 / 60%), inset 0 1px 0 rgb(255 255 255 / 5%); }
:root[data-theme=dark] .status-toasts #approval-loading { background: rgb(22 27 39 / 97%); box-shadow: 0 12px 32px rgb(0 0 0 / 40%); }
:root[data-theme=dark] #approval-view .toolbar {
  box-shadow: none;
}
:root[data-theme=dark] #pair {
  color: #38bdf8;
}
:root[data-theme=dark] .approval-panel .pager {
  border-top: 1px solid rgb(148 163 184 / 15%);
}
:root[data-theme=dark] .tabs button {
  color: #8491a6;
}
:root[data-theme=dark] .tabs button:hover:enabled {
  color: #ffffff;
}
:root[data-theme=dark] .tabs button[aria-pressed=true],
:root[data-theme=dark] .tabs button[aria-pressed=true]:hover:enabled {
  color: #ffffff;
  border-bottom-color: #38bdf8;
}
:root[data-theme=dark] .operations-panel > .toolbar h2 {
  color: #edf4ff;
}
:root[data-theme=dark] #operations-feedback {
  background: rgb(30 41 59 / 45%);
}
:root[data-theme=dark] .operations-filters {
  background: rgb(17 24 39 / 75%);
}
:root[data-theme=dark] .operations-filters label {
  color: #8491a6;
}
:root[data-theme=dark] .operations-filters label:focus-within {
  color: #7dd3fc;
}
:root[data-theme=dark] .operations-filters label:not(.operations-query-label)::after {
  border-right: 1.6px solid #94a3b8;
  border-bottom: 1.6px solid #94a3b8;
}
:root[data-theme=dark] #operations-coverage {
  color: #64748b;
}
:root[data-theme=dark] #operations-rows:has(.operations-empty) {
  background: rgb(17 24 39 / 55%);
}
:root[data-theme=dark] .operations-table thead th {
  border-bottom: 1px solid rgb(148 163 184 / 15%);
  color: #8c99ad;
}
:root[data-theme=dark] .operations-table tbody td {
  border-bottom: 1px solid rgb(148 163 184 / 11%);
}
:root[data-theme=dark] .operations-table tr.operation-row:hover td {
  background: rgb(56 189 248 / 6%);
}
:root[data-theme=dark] .approval-table tr.row.selected td {
  background: rgb(56 189 248 / 12%);
}
:root[data-theme=dark] .approval-table tr.row.selected td:first-child {
  box-shadow: inset 3px 0 0 #38bdf8;
}
:root[data-theme=dark] .approval-table .approval-admin {
  color: #e2e8f0;
}
:root[data-theme=dark] .operations-table .operation-id {
  color: #7dd3fc;
}
:root[data-theme=dark] .operations-table .operation-sub {
  color: #718198;
}
:root[data-theme=dark] .operations-table .operation-sub .mono {
  color: #94a3b8;
}
:root[data-theme=dark] .operations-table .operation-route {
  border: 1px solid #263348;
  background: rgb(30 41 59 / 60%);
}
:root[data-theme=dark] .operations-table .net-tag {
  color: #cbd5e1;
}
:root[data-theme=dark] .operations-table .net-tag::before {
  background: #94a3b8;
}
:root[data-theme=dark] .operations-table .net-tag[data-chain=ethereum] {
  color: #93b4ff;
}
:root[data-theme=dark] .operations-table .net-tag[data-chain=ethereum]::before {
  background: #7aa2ff;
  box-shadow: 0 0 6px rgb(122 162 255 / 60%);
}
:root[data-theme=dark] .operations-table .net-tag[data-chain=qtum] {
  color: #7dd3fc;
}
:root[data-theme=dark] .operations-table .net-tag[data-chain=qtum]::before {
  background: #38bdf8;
  box-shadow: 0 0 6px rgb(56 189 248 / 60%);
}
:root[data-theme=dark] .operations-table .route-arrow {
  color: #64748b;
}
:root[data-theme=dark] .operations-table .operation-amount {
  color: #f8fafc;
}
:root[data-theme=dark] .operations-table .operation-unit {
  color: #7dd3fc;
}
:root[data-theme=dark] .operations-table .status-chip[data-tone=neutral] {
  color: #94a3b8;
  background: rgb(148 163 184 / 10%);
  border-color: rgb(148 163 184 / 22%);
}
:root[data-theme=dark] .operations-table .operation-reason {
  color: #8491a6;
}
:root[data-theme=dark] .operations-table .operation-time {
  color: #7dd3fc;
}
:root[data-theme=dark] .operations-table .row-chevron {
  background: rgb(30 46 70 / 75%);
  color: #94a3b8;
}
:root[data-theme=dark] .operations-table tr.operation-row:hover .row-chevron {
  background: var(--accent);
  color: #ffffff;
}
:root[data-theme=dark] .operations-table tr[aria-busy=true] td:last-child::after {
  border: 2px solid rgb(56 189 248 / 28%);
  border-top-color: #38bdf8;
}
:root[data-theme=dark] button.operation-row {
  border: 1px solid rgb(148 163 184 / 12%);
  background: rgb(17 24 39 / 75%);
}
:root[data-theme=dark] button.operation-row:hover:enabled {
  background: rgb(56 189 248 / 8%);
  border-color: rgb(56 189 248 / 32%);
}
:root[data-theme=dark] button.operation-row strong {
  color: #f8fafc;
}
:root[data-theme=dark] .overview-eyebrow {
  border: 1px solid rgb(56 189 248 / 28%);
  background: rgb(56 189 248 / 12%);
  color: #bae6fd;
}
:root[data-theme=dark] .overview-badge {
  border: 1px solid rgb(148 163 184 / 18%);
  background: rgb(148 163 184 / 8%);
  color: #94a3b8;
}
:root[data-theme=dark] .overview-stat {
  border: 1px solid rgb(148 163 184 / 16%);
  background: #121c2d;
}
:root[data-theme=dark] .overview-stat[data-key=assets] {
  border-color: rgb(56 189 248 / 28%);
  background: radial-gradient(circle at 100% 0, rgb(56 189 248 / 16%), transparent 12rem), #121c2d;
}
:root[data-theme=dark] .overview-stat[data-tone=warning] {
  background: radial-gradient(circle at 100% 0, rgb(245 158 11 / 12%), transparent 12rem), #121c2d;
}
:root[data-theme=dark] .overview-stat h3 {
  color: #718096;
}
:root[data-theme=dark] .overview-stat h3::before {
  background: #64748b;
}
:root[data-theme=dark] .overview-stat[data-key=assets] h3::before {
  background: #38bdf8;
}
:root[data-theme=dark] .overview-stat[data-tone=warning] h3::before {
  background: #f59e0b;
  box-shadow: 0 0 8px rgb(245 158 11 / 65%);
}
:root[data-theme=dark] .overview-stat-value {
  color: #edf4ff;
}
:root[data-theme=dark] .overview-stat[data-key=assets] .overview-stat-value {
  color: #e9d5ff;
}
:root[data-theme=dark] .overview-stat-note {
  color: #94a3b8;
}
:root[data-theme=dark] .overview-stat-extra {
  color: #64748b;
}
:root[data-theme=dark] .overview-snapshot {
  color: #64748b;
}
:root[data-theme=dark] .overview-section-head h3 {
  color: #e8edf7;
}
:root[data-theme=dark] .overview-counts {
  border: 1px solid rgb(148 163 184 / 15%);
  background: #121c2d;
}
:root[data-theme=dark] .overview-counts > div {
  border-left: 1px solid rgb(148 163 184 / 11%);
}
:root[data-theme=dark] .overview-counts span {
  color: #718096;
}
:root[data-theme=dark] .overview-counts strong {
  color: #edf4ff;
}
:root[data-theme=dark] .overview-counts small {
  color: #64748b;
}
:root[data-theme=dark] .overview-direction {
  border: 1px solid rgb(148 163 184 / 15%);
  background: #121c2d;
}
:root[data-theme=dark] .overview-direction h4 {
  border-bottom: 1px solid rgb(148 163 184 / 11%);
  color: #bae6fd;
}
:root[data-theme=dark] .overview-flow-cell span {
  color: #718096;
}
:root[data-theme=dark] .overview-flow-cell strong {
  color: #edf4ff;
}
:root[data-theme=dark] .overview-direction-foot {
  border-top: 1px solid rgb(148 163 184 / 11%);
}
:root[data-theme=dark] .overview-direction-foot dt {
  color: #8491a6;
}
:root[data-theme=dark] .overview-direction-foot dd {
  color: #e2e8f0;
}
:root[data-theme=dark] .overview-direction-foot dd::before {
  border-bottom: 1px dotted #334155;
}
:root[data-theme=dark] .overview-balance {
  border: 1px solid rgb(148 163 184 / 15%);
  background: #121c2d;
}
:root[data-theme=dark] .overview-balance-head {
  border-bottom: 1px solid rgb(148 163 184 / 11%);
}
:root[data-theme=dark] .overview-balance-head h4 {
  color: #edf4ff;
}
:root[data-theme=dark] .overview-balance-unit {
  color: #7dd3fc;
}
:root[data-theme=dark] .overview-balance-label {
  color: #718096;
}
:root[data-theme=dark] .overview-balance-value {
  color: #edf4ff;
}
:root[data-theme=dark] .overview-difference[data-tone=muted] {
  color: #64748b;
}
:root[data-theme=dark] .overview-explanation {
  color: #718096;
}
:root[data-theme=dark] .overview-scope {
  border: 1px solid rgb(148 163 184 / 15%);
  background: #121c2d;
}
:root[data-theme=dark] .overview-limit-note::before {
  box-shadow: 0 0 8px rgb(66 214 164 / 60%);
}
:root[data-theme=dark] .overview-limit-note small {
  color: #8491a6;
}
:root[data-theme=dark] .overview-limit-note[data-tone=warning]::before {
  box-shadow: 0 0 8px rgb(242 184 75 / 60%);
}
:root[data-theme=dark] .overview-limit-note[data-tone=danger]::before {
  box-shadow: 0 0 8px rgb(251 113 133 / 60%);
}
:root[data-theme=dark] .overview-dashboard .overview-config {
  border: 1px solid rgb(148 163 184 / 16%);
  background: #121c2d;
}
:root[data-theme=dark] .overview-dashboard .overview-config > summary {
  color: #e2e8f0;
}
:root[data-theme=dark] .operation-metric {
  border: 1px solid rgb(56 189 248 / 18%);
  background: rgb(15 23 42 / 65%);
}
:root[data-theme=dark] .operation-metric h3 {
  border-bottom: 1px solid rgb(148 163 184 / 11%);
  color: #7dd3fc;
}
:root[data-theme=dark] dl {
  border: 1px solid rgb(148 163 184 / 15%);
  background: #162235;
}
:root[data-theme=dark] dt {
  color: #8fa3bc;
}
:root[data-theme=dark] dd {
  color: #e8edf7;
}
:root[data-theme=dark] summary {
  color: #cbd5e1;
}
:root[data-theme=dark] summary:hover {
  color: #bae6fd;
}
:root[data-theme=dark] pre {
  border: 1px solid rgb(148 163 184 / 16%);
  background: #0e1726;
  color: #aebdd1;
}
:root[data-theme=dark] .exception-wallet {
  border: 1px solid rgb(251 191 36 / 14%);
  background: rgb(251 191 36 / 4%);
}
:root[data-theme=dark] .exception-wallet > summary {
  color: #e5b85c;
}
:root[data-theme=dark] .exception-wallet > .muted {
  color: #fde68a;
  opacity: 0.85;
}
:root[data-theme=dark] .exception-wallet #wallet-recovery-panel {
  border: 1px solid rgb(148 163 184 / 16%);
  background: #142032;
}
:root[data-theme=dark] #finance-panel .finance-empty {
  border: 1px dashed rgb(148 163 184 / 22%);
  background: rgb(17 24 39 / 55%);
}
:root[data-theme=dark] #finance-panel .finance-row-head strong {
  color: #f8fafc;
}
:root[data-theme=dark] #finance-panel .finance-row-head .finance-row-meta {
  border: 1px solid #263348;
  background: #1e293b;
  color: #93b4ff;
}
:root[data-theme=dark] #finance-panel .finance-row-id {
  color: #7dd3fc;
}
:root[data-theme=dark] .finance-pill {
  border: 1px solid rgb(148 163 184 / 22%);
  background: rgb(148 163 184 / 10%);
  color: #cbd5e1;
}
:root[data-theme=dark] dialog {
  border: 1px solid #202c3d;
}
:root[data-theme=dark] dialog::backdrop {
  background: rgb(0 3 8 / 74%);
}
:root[data-theme=dark] dialog h2 {
  color: #edf4ff;
}
:root[data-theme=dark] #confirmation {
  border-color: rgb(56 189 248 / 34%);
  background: radial-gradient(circle at 100% 0, rgb(56 189 248 / 14%), transparent 14rem), #142032;
}
:root[data-theme=dark] .operations-dialog-header {
  border-bottom: 1px solid #202c3d;
  background: rgb(16 22 34 / 96%);
}
:root[data-theme=dark] #finance-dialog > p[role=status]:not(:empty),
:root[data-theme=dark] #wallet-recovery-dialog > p[role=status]:not(:empty) {
  color: #bae6fd;
}
:root[data-theme=dark] #empty h2 {
  color: #edf4ff;
}
:root[data-theme=dark] .detail-heading .badge {
  background: rgb(56 189 248 / 14%);
  border-color: rgb(56 189 248 / 34%);
  color: #bae6fd;
}
:root[data-theme=dark] .evidence {
  border-top: 1px solid #202c3d;
}
:root[data-theme=dark] #action-summary {
  border: 1px solid rgb(148 163 184 / 16%);
  background: #162235;
}
:root[data-theme=dark] #action-form {
  border: 1px solid rgb(148 163 184 / 16%);
  background: #142032;
}
:root[data-theme=dark] .action-steps {
  border-color: rgb(148 163 184 / 16%);
  background: #0e1726;
}
:root[data-theme=dark] #action-form textarea,
:root[data-theme=dark] #action-form input[type=number],
:root[data-theme=dark] #action-form .action-check {
  background: #0e1726;
}
:root[data-theme=dark] .audit-section {
  border-top: 1px solid #202c3d;
}
:root[data-theme=dark] .recovery-panel {
  border: 1px solid rgb(56 189 248 / 24%);
  background: #162235;
}
:root[data-theme=dark] .recovery-panel textarea {
  background: #0e1726;
}
:root[data-theme=dark] #wallet-recovery-dialog label:has(input[type=checkbox]),
:root[data-theme=dark] .admission-hold label:has(input[type=checkbox]) {
  background: #162235;
}
:root[data-theme=dark] #finance-dialog .operations-dialog-body > h3 {
  border-top: 1px solid #202c3d;
}
:root[data-theme=dark] #finance-dialog .operation-metric h4 {
  color: #edf4ff;
}
:root[data-theme=dark] .audit-item {
  border: 1px solid rgb(148 163 184 / 15%);
  background: #162235;
}
:root[data-theme=dark] .audit-item::before {
  background: #38bdf8;
  box-shadow: 0 0 0 2px rgb(56 189 248 / 20%);
}
:root[data-theme=dark] .audit-item::after {
  background: #334a66;
}
:root[data-theme=dark] .audit-item[data-source=chain]::before {
  background: #60a5fa;
  box-shadow: 0 0 0 2px rgb(96 165 250 / 20%);
}
:root[data-theme=dark] .audit-item[data-source=signer]::before {
  background: #2dd4bf;
  box-shadow: 0 0 0 2px rgb(45 212 191 / 20%);
}
:root[data-theme=dark] .audit-item[data-source=approval]::before {
  background: #34d399;
  box-shadow: 0 0 0 2px rgb(52 211 153 / 20%);
}
:root[data-theme=dark] .audit-item[data-source=operations]::before {
  background: #fbbf24;
  box-shadow: 0 0 0 2px rgb(251 191 36 / 20%);
}
:root[data-theme=dark] #audit .audit-item[data-tone=accent]::before {
  background: #38bdf8;
  box-shadow: 0 0 0 2px rgb(56 189 248 / 20%);
}
:root[data-theme=dark] #audit .audit-item[data-tone=success]::before {
  background: #34d399;
  box-shadow: 0 0 0 2px rgb(52 211 153 / 20%);
}
:root[data-theme=dark] #audit .audit-item[data-tone=warning]::before {
  background: #fbbf24;
  box-shadow: 0 0 0 2px rgb(251 191 36 / 20%);
}
:root[data-theme=dark] #audit .audit-item[data-tone=danger]::before {
  background: #fb7185;
  box-shadow: 0 0 0 2px rgb(251 113 133 / 20%);
}
:root[data-theme=dark] .audit-source {
  background: rgb(148 163 184 / 12%);
  color: #cbd5e1;
}
:root[data-theme=dark] .audit-source.source-chain {
  background: rgb(91 140 255 / 14%);
  color: #93b4ff;
}
:root[data-theme=dark] .audit-source.source-backend {
  background: rgb(148 163 184 / 12%);
  color: #cbd5e1;
}
:root[data-theme=dark] .audit-source.source-handoff {
  background: rgb(56 189 248 / 14%);
  color: #7dd3fc;
}
:root[data-theme=dark] .audit-source.source-authorization {
  background: rgb(66 214 164 / 12%);
  color: #42d6a4;
}
:root[data-theme=dark] .audit-source.source-operations {
  background: rgb(245 158 11 / 14%);
  color: #f2b84b;
}
:root[data-theme=dark] .audit-source.source-signer {
  background: rgb(45 212 191 / 14%);
  color: #5eead4;
}
:root[data-theme=dark] .audit-source.source-approval {
  background: rgb(16 185 129 / 14%);
  color: #34d399;
}
:root[data-theme=dark] .audit-event {
  color: #edf4ff;
}
:root[data-theme=dark] .audit-code {
  border: 1px solid rgb(148 163 184 / 16%);
  background: #0e1726;
  color: #94a3b8;
}
:root[data-theme=dark] .audit-time time {
  color: #7dd3fc;
}
:root[data-theme=dark] .audit-abs {
  color: #64748b;
}
:root[data-theme=dark] .audit-raw summary,
:root[data-theme=dark] button.audit-raw-toggle {
  color: #8491a6;
}
:root[data-theme=dark] button.audit-raw-toggle:hover:enabled {
  color: #bae6fd;
}
:root[data-theme=dark] #operations-loading {
  color: #bae6fd;
}
:root[data-theme=dark] #operations-loading::before {
  border: 2px solid rgb(167 139 250 / 28%);
  border-top-color: #38bdf8;
}
:root[data-theme=dark] .request-loading {
  color: #cbd5e1;
}
:root[data-theme=dark] .request-loading::before {
  border: 2px solid rgb(167 139 250 / 28%);
  border-top-color: #38bdf8;
}
:root[data-theme=dark] body,
:root[data-theme=dark] pre,
:root[data-theme=dark] .operations-dialog-body {
  scrollbar-color: #28364a #080d15;
}
:root[data-theme=dark] body::-webkit-scrollbar-track,
:root[data-theme=dark] pre::-webkit-scrollbar-track,
:root[data-theme=dark] .operations-dialog-body::-webkit-scrollbar-track {
  background: #080d15;
}
:root[data-theme=dark] body::-webkit-scrollbar-thumb,
:root[data-theme=dark] pre::-webkit-scrollbar-thumb,
:root[data-theme=dark] .operations-dialog-body::-webkit-scrollbar-thumb {
  background: #28364a;
  border: 3px solid #080d15;
}
:root[data-theme=dark] body::-webkit-scrollbar-thumb:hover,
:root[data-theme=dark] pre::-webkit-scrollbar-thumb:hover,
:root[data-theme=dark] .operations-dialog-body::-webkit-scrollbar-thumb:hover {
  background: #3b4d68;
}
@media (max-width: 960px) {
  :root[data-theme=dark] .operations-table tr.operation-row {
    border: 1px solid rgb(148 163 184 / 16%);
    background: #121c2d;
  }
  :root[data-theme=dark] .operations-table .c-source::before,
  :root[data-theme=dark] .operations-table .c-job::before {
    color: #718096;
  }
}
@media (max-width: 640px) {
  :root[data-theme=dark] .overview-counts > div:nth-child(n+3) {
    border-top: 1px solid rgb(148 163 184 / 11%);
  }
}

/* Performance observations: shared chart scales, no inferred time series. */
.performance-dashboard {
  --perf-mint: #c20a8e;
  --perf-release: #2563eb;
  --perf-track: #f0f1f5;
  --perf-grid: #ffffff;
  --perf-card: var(--surface);
  color: var(--text);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.performance-dashboard > .perf-disclosure { margin: 0; padding: 20px 24px; cursor: pointer; list-style: none; font-weight: 400; }
.performance-dashboard > .perf-disclosure::before { content: none; }
.perf-disclosure::-webkit-details-marker { display: none; }
.perf-disclosure::marker { content: ''; }
.perf-disclosure:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 18px; }
.perf-disclosure > div { min-width: 0; }
.perf-disclosure-hint { display: inline-flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13px; flex-shrink: 0; }
.perf-disclosure-hint::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.performance-dashboard[open] > .perf-disclosure { border-bottom: 1px solid var(--line); }
.performance-dashboard[open] .perf-disclosure-hint::after { transform: rotate(225deg); }
.performance-dashboard:not([open]) .perf-when-open, .performance-dashboard[open] .perf-when-closed { display: none; }
.perf-body { padding: 20px 24px 24px; }
.perf-controls { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.perf-total-number { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.perf-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.perf-eyebrow { display: block; color: var(--accent-pale); font-size: 13px; font-weight: 750; letter-spacing: .12em; margin-bottom: 6px; }
.perf-heading h3 { color: var(--text); font-size: 21px; margin: 0 0 7px; letter-spacing: -.025em; }
.perf-description, .perf-method { color: var(--text-3); font-size: 14px; line-height: 1.7; margin: 0; }
.perf-method { margin-bottom: 18px; }
.perf-switch { display: inline-flex; gap: 3px; padding: 4px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; max-width: 100%; }
.perf-switch button { min-height: 32px; padding: 6px 11px; margin: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; box-shadow: none; color: var(--text-3); font-size: 14px; white-space: nowrap; }
.perf-switch button[aria-pressed=true] { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: 0 1px 4px rgb(0 0 0 / 5%); }
.perf-switch button[aria-pressed=false]:hover:enabled { color: #ffffff; }
.perf-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.perf-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.perf-direction { min-width: 0; padding: 21px 24px; background: linear-gradient(115deg, var(--accent-soft), var(--perf-card) 80%); border: 1px solid var(--accent-line); border-radius: 18px; }
.perf-direction[data-tone=release] { background: linear-gradient(115deg,var(--eth-soft),var(--perf-card) 80%); border-color: rgb(37 99 235 / 18%); }
.perf-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 20px; }
.perf-card-top h4 { margin: 0; font-size: 16px; font-weight: 650; color: var(--text); }
.perf-pill { padding: 3px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--perf-mint); font-size: 13px; font-weight: 750; letter-spacing: .05em; }
.perf-direction[data-tone=release] .perf-pill { background: var(--eth-soft); color: var(--perf-release); }
.perf-label { display: block; color: var(--text-3); font-size: 14px; margin-bottom: 4px; }
.perf-total { display: block; color: var(--perf-mint); font-size: clamp(23.4px,2.7vw,35.1px); font-weight: 650; letter-spacing: -.045em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.perf-direction[data-tone=release] .perf-total { color: var(--perf-release); }
.perf-card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 18px; font-size: 13px; color: var(--text-3); }
.perf-chart { min-width: 0; padding: 22px 24px; background: var(--perf-card); border: 1px solid var(--line); border-radius: 18px; }
.perf-chart-heading { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px 14px; margin-bottom: 20px; }
.perf-chart-heading h4 { margin: 0; color: var(--text); font-size: 16px; font-weight: 650; }
.perf-chart-heading > p { margin: 0; color: var(--text-3); font-size: 14px; }
.perf-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text-2); }
.perf-legend span::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--perf-mint); }
.perf-legend [data-tone=release]::before { background: var(--perf-release); }
.perf-axis { display: flex; justify-content: space-between; gap: 4px; margin: 0 0 16px; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.perf-axis > span { min-width: 0; text-align: center; line-height: 1.5; }
.perf-axis > span:first-child { text-align: left; }
.perf-axis > span:last-child { text-align: right; }
.perf-stage { display: grid; grid-template-columns: 185px minmax(0,1fr); column-gap: 24px; row-gap: 8px; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.perf-stage-title { grid-row: span 2; align-self: center; min-width: 0; }
.perf-stage-title strong { display: block; color: var(--text); font-size: 14px; font-weight: 650; }
.perf-stage-title > span { display: block; margin-top: 5px; color: var(--text-3); font-size: 13px; line-height: 1.6; }
.perf-series { min-width: 0; }
.perf-series-caption { display: flex; flex-wrap: wrap; line-height: 1.6; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; color: var(--text-3); font-size: 13px; }
.perf-series-caption > :last-child { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.perf-series-caption strong { color: var(--text-2); font-size: 14px; font-weight: 550; }
.perf-bar { display: block; width: 100%; height: 6px; overflow: hidden; border-radius: 3px; }
.perf-track { fill: var(--perf-track); }
.perf-grid-line { stroke: var(--perf-grid); stroke-width: 2; }
.perf-fill { fill: var(--perf-mint); }
.perf-bar[data-tone=release] .perf-fill { fill: var(--perf-release); }
.perf-note { margin: 12px 0 0; color: var(--text-3); font-size: 13px; line-height: 1.7; }
.perf-empty { margin: 14px 0; padding: 16px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--text-3); background: var(--surface-2); font-size: 14px; line-height: 1.7; text-align: center; }
.perf-bottom { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); align-items: start; gap: 18px; margin-top: 18px; }
.perf-queue-counts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.perf-queue-counts > div { padding: 16px; border: 1px solid var(--line-soft); background: var(--surface-2); border-radius: 12px; }
.perf-queue-counts span { display: block; font-size: 14px; line-height: 1.6; color: var(--text-3); }
.perf-queue-counts strong { display: block; margin-top: 8px; color: var(--text); font-size: 29px; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.perf-queue-row { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.perf-queue-row .perf-note { margin-top: 6px; font-size: 13px; }
.perf-queue-empty { padding: 25px 14px; text-align: center; font-size: 14px; color: var(--text-3); background: var(--surface-2); border-radius: 12px; }
.perf-queue-empty::before { content: '✓'; display: block; margin-bottom: 10px; color: var(--success); font-size: 20px; }
.perf-runtime .perf-chart-heading { margin-bottom: 14px; }
.perf-runtime .perf-chart-heading .perf-switch { width: 100%; }
.perf-runtime .perf-switch button { flex: 1; padding-inline: 8px; }
.perf-runtime .perf-axis { margin-top: 18px; }
.perf-runtime-row { margin: 18px 0; }
.perf-runtime-meta { display: flex; flex-wrap: wrap; line-height: 1.6; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text-3); margin-top: 6px; }
.perf-runtime-meta [data-errors=true] { color: var(--danger); font-weight: 600; }
.perf-technical { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.perf-technical > summary, .perf-scope > summary { color: var(--text-2); font-size: 14px; cursor: pointer; }
.perf-table-scroll { width: 100%; overflow-x: auto; margin-top: 12px; }
.perf-table-scroll table { width: 100%; margin: 0; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.perf-table-scroll caption { text-align: left; color: var(--text-3); padding: 6px 0 12px; }
.perf-table-scroll td, .perf-table-scroll th { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); }
.perf-table-scroll td:first-child, .perf-table-scroll th:first-child { text-align: left; }
.perf-scope { margin-top: 14px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.perf-scope p { color: var(--text-3); font-size: 13px; line-height: 1.8; margin: 12px 0 0; }
:root[data-theme=dark] .performance-dashboard { --perf-mint: #ff72d6; --perf-release: #8eb3ff; --perf-track: #2b2933; --perf-grid: #201e26; }
@media (min-width: 701px) {
  .perf-chart:has(.perf-stage) > .perf-axis { margin-left: 209px; }
}
@media (max-width: 1050px) {
  .perf-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .performance-dashboard > .perf-disclosure { padding: 18px 16px; }
  .perf-body { padding: 16px; }
  .perf-summary { grid-template-columns: 1fr; gap: 12px; }
  .perf-direction { padding: 18px; }
  .perf-chart { padding: 18px 16px; }
  .perf-stage { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .perf-stage-title { grid-row: auto; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
  .perf-stage-title > span { margin-top: 0; }
  .perf-heading h3 { font-size: 19px; }
  .perf-legend { width: 100%; }
  .perf-queue-counts { gap: 10px; }
  .perf-queue-counts > div { padding: 12px; }
}
