/* Wallet Tester — app styles. Works with the Wallet Tester theme and with other themes. */
:root {
	--wtc-bg: #f6f7fb;
	--wtc-card: #ffffff;
	--wtc-ink: #0f172a;
	--wtc-ink-2: #475569;
	--wtc-muted: #64748b;
	--wtc-line: #e2e8f0;
	--wtc-brand: #2563eb;
	--wtc-brand-2: #7c3aed;
	--wtc-brand-soft: #eff4ff;
	--wtc-ok: #15803d;
	--wtc-ok-soft: #dcfce7;
	--wtc-warn: #b45309;
	--wtc-warn-soft: #fef3c7;
	--wtc-bad: #b91c1c;
	--wtc-bad-soft: #fee2e2;
	--wtc-missing: #fff1f1;
	--wtc-psp: #7c3aed;
	--wtc-psp-soft: #f3e8ff;
	--wtc-radius: 14px;
	--wtc-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
	--wtc-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
.wtc-app, .wtc-card, .wtc-modal, .wtc-toast, .wtc-search-wrap { box-sizing: border-box; color: var(--wtc-ink); }
.wtc-app *, .wtc-modal *, .wtc-search-wrap * { box-sizing: border-box; }
.wtc-muted { color: var(--wtc-muted); }
.wtc-mono { font-family: var(--wtc-mono); font-size: .92em; }
.wtc-break { word-break: break-all; }
.wtc-hp { position: absolute !important; left: -9999px !important; }
.wtc-loading { padding: 32px; text-align: center; color: var(--wtc-muted); }
.wtc-loading::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; border: 2px solid var(--wtc-line); border-top-color: var(--wtc-brand); border-radius: 50%; animation: wtc-spin .7s linear infinite; }
@keyframes wtc-spin { to { transform: rotate(360deg); } }
.wtc-spin { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: wtc-spin .7s linear infinite; }

/* ---------- buttons & inputs ---------- */
.wtc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border: 1px solid transparent; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none !important; cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; white-space: nowrap; }
.wtc-btn:active { transform: translateY(1px); }
.wtc-btn:disabled { opacity: .6; cursor: default; }
.wtc-btn--primary { background: linear-gradient(135deg, var(--wtc-brand), var(--wtc-brand-2)); color: #fff !important; box-shadow: 0 4px 14px rgba(37, 99, 235, .25); }
.wtc-btn--primary:hover { box-shadow: 0 6px 20px rgba(37, 99, 235, .35); }
.wtc-btn--ghost { background: var(--wtc-card); color: var(--wtc-ink) !important; border-color: var(--wtc-line); }
.wtc-btn--ghost:hover { border-color: var(--wtc-brand); color: var(--wtc-brand) !important; }
.wtc-btn--sm { min-height: 32px; padding: 5px 12px; font-size: 13px; }
.wtc-btn--block { width: 100%; }
.wtc-link-btn { background: none; border: 0; padding: 4px 0; color: var(--wtc-brand); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.wtc-link-btn:hover { text-decoration: underline; }
.wtc-icon-btn { width: 32px; height: 32px; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; font-size: 14px; color: var(--wtc-ink-2); }
.wtc-icon-btn:hover { background: var(--wtc-bg); border-color: var(--wtc-line); }
.wtc-app input[type=text], .wtc-app input[type=search], .wtc-app input[type=email], .wtc-app input[type=password], .wtc-app input[type=date], .wtc-app select, .wtc-app textarea,
.wtc-modal input[type=text], .wtc-modal input[type=date], .wtc-modal select, .wtc-modal textarea, .wtc-form input[type=text], .wtc-form input[type=email], .wtc-form input[type=password], .wtc-form textarea, .wtc-search input {
	width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--wtc-line); border-radius: 10px; background: #fff; color: var(--wtc-ink); font: inherit; font-size: 14px; }
.wtc-app input:focus, .wtc-app select:focus, .wtc-app textarea:focus, .wtc-modal input:focus, .wtc-modal select:focus, .wtc-modal textarea:focus, .wtc-form input:focus, .wtc-search input:focus { outline: 0; border-color: var(--wtc-brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.wtc-app :focus-visible, .wtc-modal :focus-visible { outline: 2px solid var(--wtc-brand); outline-offset: 2px; }
.wtc-form { display: grid; gap: 14px; }
.wtc-form label, .wtc-field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--wtc-ink-2); }
.wtc-form label small { font-weight: 400; color: var(--wtc-muted); }
.wtc-check { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; }
.wtc-check input { width: 16px; height: 16px; }

/* ---------- cards, notices, badges ---------- */
.wtc-card { background: var(--wtc-card); border: 1px solid var(--wtc-line); border-radius: var(--wtc-radius); box-shadow: var(--wtc-shadow); padding: 20px; margin-bottom: 16px; }
.wtc-card--flush { padding: 0; overflow: hidden; }
.wtc-card h3 { margin: 0 0 12px; font-size: 16px; }
.wtc-card h4 { margin: 12px 0 6px; font-size: 14px; }
.wtc-card details > summary, details.wtc-card > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
details.wtc-card > summary::-webkit-details-marker { display: none; }
details.wtc-card > summary h3 { margin: 0; }
details.wtc-card[open] > summary { margin-bottom: 10px; }
.wtc-notice { padding: 12px 16px; border-radius: 12px; margin: 0 0 16px; font-size: 14px; border: 1px solid; }
.wtc-notice ul { margin: 6px 0 0 18px; padding: 0; }
.wtc-notice--error { background: var(--wtc-bad-soft); border-color: #fecaca; color: #7f1d1d; }
.wtc-notice--success { background: var(--wtc-ok-soft); border-color: #bbf7d0; color: #14532d; }
.wtc-notice--warn { background: var(--wtc-warn-soft); border-color: #fde68a; color: #78350f; }
.wtc-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; background: var(--wtc-bg); color: var(--wtc-ink-2); }
.wtc-badge--ok, .wtc-badge--cr { background: var(--wtc-ok-soft); color: var(--wtc-ok); }
.wtc-badge--warn { background: var(--wtc-warn-soft); color: var(--wtc-warn); }
.wtc-badge--bad, .wtc-badge--dr { background: var(--wtc-bad-soft); color: var(--wtc-bad); }
.wtc-badge--info { background: var(--wtc-brand-soft); color: var(--wtc-brand); }
.wtc-badge--psp { background: var(--wtc-psp-soft); color: var(--wtc-psp); }
.wtc-badge--muted { background: #f1f5f9; color: var(--wtc-muted); }
.is-cr { color: var(--wtc-ok) !important; }
.is-dr { color: var(--wtc-bad) !important; }
.wtc-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--wtc-missing); border: 1px solid #fecaca; vertical-align: -1px; }

/* address on hover (admins) */
.wtc-addr-tip { position: relative; cursor: help; border-bottom: 1px dashed currentColor; }
.wtc-addr-tip::after { content: attr(data-addr); position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 30; padding: 6px 10px; border-radius: 8px; background: var(--wtc-ink); color: #fff; font: 12px/1.4 var(--wtc-mono); white-space: nowrap; opacity: 0; transform: translateY(4px); pointer-events: none; transition: .15s; box-shadow: var(--wtc-shadow); }
.wtc-addr-tip:hover::after, .wtc-addr-tip:focus::after { opacity: 1; transform: none; }

/* ---------- dashboard shell ---------- */
.wtc-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.wtc-side { position: sticky; top: 90px; background: var(--wtc-card); border: 1px solid var(--wtc-line); border-radius: var(--wtc-radius); box-shadow: var(--wtc-shadow); padding: 14px; }
.wtc-hello { display: flex; gap: 10px; align-items: center; padding: 6px 6px 14px; border-bottom: 1px solid var(--wtc-line); margin-bottom: 10px; }
.wtc-hello strong { display: block; font-size: 14px; }
.wtc-hello small { color: var(--wtc-muted); font-size: 12px; }
.wtc-avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--wtc-brand), var(--wtc-brand-2)); color: #fff; font-weight: 700; flex: none; }
.wtc-tabs { display: grid; gap: 2px; }
.wtc-tab { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--wtc-ink-2); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.wtc-tab:hover { background: var(--wtc-bg); color: var(--wtc-ink); }
.wtc-tab.is-on { background: var(--wtc-brand-soft); color: var(--wtc-brand); }
.wtc-tab-ico { width: 20px; text-align: center; }
.wtc-tab-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; font-size: 11px; line-height: 20px; text-align: center; }
.wtc-tab-count.is-warn { background: var(--wtc-warn-soft); color: var(--wtc-warn); }
.wtc-tab-count.is-bad { background: var(--wtc-bad-soft); color: var(--wtc-bad); }
.wtc-side-link { display: block; margin-top: 10px; padding: 10px 12px; border-top: 1px solid var(--wtc-line); font-size: 13px; color: var(--wtc-muted); text-decoration: none; }
.wtc-main { min-width: 0; outline: 0; }
.wtc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.wtc-head h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.01em; }
.wtc-head p { margin: 0; max-width: 680px; font-size: 14px; }
.wtc-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* KPIs */
.wtc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.wtc-kpi { background: var(--wtc-card); border: 1px solid var(--wtc-line); border-radius: var(--wtc-radius); padding: 16px; box-shadow: var(--wtc-shadow); display: grid; gap: 2px; }
.wtc-kpi span { font-size: 13px; color: var(--wtc-muted); font-weight: 600; }
.wtc-kpi strong { font-size: 28px; letter-spacing: -.02em; }
.wtc-kpi small { color: var(--wtc-muted); font-size: 12px; }
.wtc-kpi.is-warn { border-color: #fde68a; background: linear-gradient(180deg, #fffbeb, #fff); }
.wtc-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wtc-grid2 > .wtc-card { margin-bottom: 16px; }
.wtc-stack { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: #f1f5f9; margin-bottom: 12px; }
.wtc-stack span.is-ok, .wtc-legend i.is-ok { background: #22c55e; }
.wtc-stack span.is-warn, .wtc-legend i.is-warn { background: #f59e0b; }
.wtc-stack span.is-bad, .wtc-legend i.is-bad { background: #ef4444; }
.wtc-stack span.is-muted, .wtc-legend i.is-muted { background: #cbd5e1; }
.wtc-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--wtc-ink-2); }
.wtc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.wtc-row-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--wtc-line); font-size: 14px; }
.wtc-row-line:last-child { border-bottom: 0; }
.wtc-log { list-style: none; margin: 0; padding: 0; font-size: 13px; max-height: 260px; overflow: auto; }
.wtc-log li { padding: 7px 0; border-bottom: 1px solid var(--wtc-line); }
.wtc-log time { display: inline-block; min-width: 82px; color: var(--wtc-muted); }

/* filters, chips, segments */
.wtc-filters { display: grid; gap: 14px; }
.wtc-period { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.wtc-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.wtc-chip { padding: 7px 14px; border: 1px solid var(--wtc-line); border-radius: 999px; background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: var(--wtc-ink-2); cursor: pointer; }
.wtc-chip.is-on { background: var(--wtc-ink); border-color: var(--wtc-ink); color: #fff; }
.wtc-custom { display: inline-flex; align-items: center; gap: 6px; }
.wtc-custom input { width: auto !important; }
.wtc-filter-row { display: grid; grid-template-columns: repeat(3, minmax(140px, 1fr)) minmax(200px, 2fr); gap: 12px; }
.wtc-filter-row label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--wtc-muted); }
.wtc-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #eef2f7; border-radius: 12px; margin-bottom: 16px; }
.wtc-seg button, .wtc-seg label { padding: 7px 14px; border: 0; border-radius: 9px; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--wtc-ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.wtc-seg button.is-on, .wtc-seg label:has(input:checked) { background: #fff; color: var(--wtc-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.wtc-seg--form { margin: 0; }
.wtc-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.wtc-toolbar .wtc-seg { margin: 0; }
.wtc-grow { flex: 1 1 220px; }
.wtc-toolbar input[type=search] { flex: 1 1 220px; width: auto; }

/* summary cards */
.wtc-sumcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 16px; }
.wtc-sumcard { display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: 12px; align-items: center; padding: 16px; background: var(--wtc-card); border: 1px solid var(--wtc-line); border-radius: var(--wtc-radius); box-shadow: var(--wtc-shadow); }
.wtc-sum-asset { font-weight: 800; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--wtc-brand-soft); color: var(--wtc-brand); }
.wtc-sumcard small { display: block; font-size: 11px; color: var(--wtc-muted); text-transform: uppercase; letter-spacing: .04em; }
.wtc-sumcard strong { font-size: 15px; word-break: break-word; }

/* tables */
.wtc-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wtc-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.wtc-table th { position: sticky; top: 0; background: #f8fafc; color: var(--wtc-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--wtc-line); white-space: nowrap; }
.wtc-table td { padding: 12px 14px; border-bottom: 1px solid var(--wtc-line); vertical-align: middle; }
.wtc-table tr:last-child td { border-bottom: 0; }
.wtc-table--compact td, .wtc-table--compact th { padding: 8px 10px; }
.wtc-table .num { text-align: right; white-space: nowrap; }
.wtc-table tbody tr:hover td { background: #fafbff; }
.wtc-table tr.is-missing td { background: var(--wtc-missing) !important; }
.wtc-table tr.is-missing td:first-child { box-shadow: inset 3px 0 0 #f87171; }
.wtc-table tr.is-failed td { opacity: .6; }
.wtc-table tr.is-pending td { background: #fffbeb; }
.wtc-table-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--wtc-line); }
.wtc-table-head h3 { margin: 0; }
.wtc-cp { min-width: 240px; }
.wtc-cp .wtc-badge { margin-right: 4px; }
.wtc-inline-name { display: flex; gap: 6px; margin-top: 6px; }
.wtc-inline-name input { min-height: 32px !important; padding: 4px 10px !important; border-color: #fca5a5 !important; background: #fff !important; }
.wtc-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; padding: 14px; border-top: 1px solid var(--wtc-line); }
.wtc-pager button { min-width: 34px; height: 34px; border: 1px solid var(--wtc-line); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.wtc-pager button.is-on { background: var(--wtc-ink); border-color: var(--wtc-ink); color: #fff; }
.wtc-pager span { align-self: center; color: var(--wtc-muted); }
.wtc-user-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* health */
.wtc-progress { position: relative; height: 26px; border-radius: 999px; background: #eef2f7; overflow: hidden; margin-bottom: 16px; }
.wtc-progress span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--wtc-brand), var(--wtc-brand-2)); transition: width .3s; }
.wtc-progress em { position: relative; display: block; text-align: center; font: 600 12px/26px inherit; font-style: normal; color: var(--wtc-ink); }
.wtc-health-grid, .wtc-sync-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.wtc-hcard { position: relative; display: grid; gap: 10px; padding: 18px; background: var(--wtc-card); border: 1px solid var(--wtc-line); border-radius: var(--wtc-radius); box-shadow: var(--wtc-shadow); border-top: 4px solid #cbd5e1; }
.wtc-hcard.is-ok { border-top-color: #22c55e; }
.wtc-hcard.is-warn { border-top-color: #f59e0b; }
.wtc-hcard.is-bad, .wtc-hcard.sec-bad { border-top-color: #ef4444; }
.wtc-hcard.sec-bad { background: linear-gradient(180deg, #fff5f5, #fff 60%); }
.wtc-hcard header, .wtc-sync header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.wtc-hcard h4, .wtc-sync h4 { margin: 6px 0 0; font-size: 16px; }
.wtc-hbadges { display: grid; gap: 4px; justify-items: end; }
.wtc-hcard dl, .wtc-sync dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.wtc-sync dl { grid-template-columns: repeat(2, 1fr); }
.wtc-hcard dt, .wtc-sync dt { font-size: 11px; color: var(--wtc-muted); text-transform: uppercase; letter-spacing: .04em; }
.wtc-hcard dd, .wtc-sync dd { margin: 0; font-weight: 600; font-size: 14px; }
.wtc-hnote { margin: 0; font-size: 13px; color: var(--wtc-ink-2); }
.wtc-findings { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.wtc-findings li { padding: 8px 10px; border-radius: 8px; font-size: 13px; line-height: 1.45; }
.wtc-findings li.is-bad { background: var(--wtc-bad-soft); color: #7f1d1d; }
.wtc-findings li.is-warn { background: var(--wtc-warn-soft); color: #78350f; }
.wtc-safe { margin: 0; font-size: 13px; color: var(--wtc-ok); }
.wtc-hcard footer, .wtc-sync footer { display: flex; gap: 16px; border-top: 1px solid var(--wtc-line); padding-top: 8px; }
.wtc-sync.is-off { opacity: .6; }

/* wallet DB */
.wtc-cust-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.wtc-cust { margin: 0; }
.wtc-cust summary h3 { margin: 0; }
.wtc-cust-act { display: inline-flex; gap: 2px; }
.wtc-wlist { list-style: none; margin: 0; padding: 0; }
.wtc-wrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "sw name act" ". meta meta"; gap: 6px 10px; align-items: center; padding: 10px 8px; border-radius: 10px; }
.wtc-wrow > .wtc-switch { grid-area: sw; }
.wtc-wrow-name { grid-area: name; }
.wtc-wrow-act { grid-area: act; }
.wtc-wrow-meta { grid-area: meta; }
.wtc-wrow + .wtc-wrow { border-top: 1px solid var(--wtc-line); }
.wtc-wrow.is-off .wtc-wrow-name { opacity: .55; }
.wtc-wrow.is-missing { background: var(--wtc-missing); }
.wtc-wrow-name { min-width: 0; overflow-wrap: anywhere; font-weight: 600; font-size: 14px; }
.wtc-wrow-meta { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-start; }
.wtc-wrow-act { display: flex; align-items: center; }
.wtc-wrow-act a.wtc-icon-btn { display: inline-grid; place-content: center; text-decoration: none; }
.wtc-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; cursor: pointer; }
.wtc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.wtc-switch span { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; transition: .2s; pointer-events: none; }
.wtc-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: .2s; }
.wtc-switch input:checked + span { background: #22c55e; }
.wtc-switch input:checked + span::after { transform: translateX(18px); }
.wtc-switch input:focus-visible + span { outline: 2px solid var(--wtc-brand); outline-offset: 2px; }

/* lookup + search */
.wtc-search { display: flex; gap: 8px; margin-bottom: 16px; }
.wtc-search input { flex: 1; min-height: 48px !important; font-size: 15px !important; }
.wtc-search select { width: auto !important; min-height: 48px; }
.wtc-search .wtc-btn { min-height: 48px; padding: 0 22px; }
.wtc-search--hero { padding: 8px; background: #fff; border: 1px solid var(--wtc-line); border-radius: 16px; box-shadow: 0 10px 30px rgba(15, 23, 42, .08); }
.wtc-search--hero input { border: 0 !important; box-shadow: none !important; }
.wtc-search-wrap { max-width: 820px; margin: 0 auto 32px; }
.wtc-search--locked .wtc-search { opacity: .75; }
.wtc-search--locked p { text-align: center; margin: 4px 0 0; }
.wtc-lookup-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 18px; align-items: center; }
.wtc-bal strong { display: block; font-size: 24px; }
.wtc-safety { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; }
.wtc-safety.is-ok { background: var(--wtc-ok-soft); color: #14532d; }
.wtc-safety.is-bad { background: var(--wtc-bad-soft); color: #7f1d1d; border: 1px solid #fecaca; }
.wtc-safety.is-muted { background: #f1f5f9; color: var(--wtc-muted); }
.wtc-app--single { max-width: 1100px; margin: 0 auto; }

/* auth forms */
.wtc-auth { max-width: 440px; margin: 24px auto; padding: 32px; }
.wtc-auth h2 { margin: 0 0 4px; font-size: 24px; }
.wtc-auth > p { margin-top: 0; }
.wtc-auth-foot { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--wtc-muted); }
.wtc-auth-btns { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.wtc-auth-btns--compact .wtc-btn { min-height: 36px; padding: 6px 14px; }

/* modal + toast */
.wtc-modal { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 16px; background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); animation: wtc-fade .15s; }
@keyframes wtc-fade { from { opacity: 0; } }
.wtc-modal__box { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(15, 23, 42, .3); }
.wtc-modal__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--wtc-line); }
.wtc-modal__head h3 { margin: 0; font-size: 18px; }
.wtc-modal__body { padding: 20px 22px; display: grid; gap: 14px; }
.wtc-modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px; }
.wtc-x { width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--wtc-bg); font-size: 20px; cursor: pointer; }
.wtc-toast { position: fixed; z-index: 100001; left: 50%; bottom: 24px; transform: translate(-50%, 20px); max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px; background: var(--wtc-ink); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); opacity: 0; transition: .25s; }
.wtc-toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.wtc-toast--bad { background: #b91c1c; }
.wtc-toast--warn { background: #b45309; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
	.wtc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wtc-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.wtc-shell { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.wtc-side { position: static; padding: 8px; }
	.wtc-hello, .wtc-side-link { display: none; }
	.wtc-tabs { display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.wtc-tabs::-webkit-scrollbar { display: none; }
	.wtc-tab { width: auto; flex: none; white-space: nowrap; padding: 9px 12px; }
	.wtc-grid2 { grid-template-columns: minmax(0, 1fr); }
	.wtc-lookup-head { grid-template-columns: 1fr auto; }
	.wtc-lookup-head .wtc-actions { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
	.wtc-card { padding: 16px; }
	.wtc-head h2 { font-size: 20px; }
	.wtc-head .wtc-actions { width: 100%; }
	.wtc-head .wtc-actions .wtc-btn { flex: 1; }
	.wtc-kpi strong { font-size: 22px; }
	.wtc-filter-row { grid-template-columns: minmax(0, 1fr); }
	.wtc-sumcard { grid-template-columns: 1fr 1fr 1fr; }
	.wtc-sum-asset { grid-column: 1 / -1; justify-self: start; }
	.wtc-search { flex-wrap: wrap; }
	.wtc-search input { flex-basis: 100%; }
	.wtc-search .wtc-btn { flex: 1; }
	.wtc-cust-grid, .wtc-health-grid, .wtc-sync-grid { grid-template-columns: minmax(0, 1fr); }
	.wtc-hcard dl { grid-template-columns: 1fr 1fr; }
	/* tables become cards */
	.wtc-table--tx thead, .wtc-table--users thead { display: none; }
	.wtc-table--tx, .wtc-table--tx tbody, .wtc-table--tx tr, .wtc-table--tx td,
	.wtc-table--users, .wtc-table--users tbody, .wtc-table--users tr, .wtc-table--users td { display: block; width: 100%; }
	.wtc-table--tx tr, .wtc-table--users tr { padding: 12px 16px; border-bottom: 1px solid var(--wtc-line); }
	.wtc-table--tx td, .wtc-table--users td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
	.wtc-table--tx td::before, .wtc-table--users td::before { content: attr(data-l); flex: none; font-size: 12px; font-weight: 700; color: var(--wtc-muted); text-align: left; text-transform: uppercase; letter-spacing: .04em; }
	.wtc-table--tx td.wtc-cp { display: block; text-align: left; min-width: 0; }
	.wtc-table--tx td.wtc-cp::before { display: block; margin-bottom: 4px; }
	.wtc-table tr.is-missing { background: var(--wtc-missing); box-shadow: inset 3px 0 0 #f87171; }
	.wtc-table tr.is-missing td { box-shadow: none !important; }
	.wtc-user-act { justify-content: flex-end; }
	.wtc-addr-tip::after { white-space: normal; word-break: break-all; width: 220px; }
	.wtc-auth { padding: 22px; }
	.wtc-modal { align-items: end; padding: 0; }
	.wtc-modal__box { border-radius: 18px 18px 0 0; max-height: 90vh; }
}

/* ---------- Wallet Health Checker ---------- */
.wtc-search--big { display: flex; gap: 10px; margin: 0 0 20px; }
.wtc-search--big input { min-height: 52px !important; font-size: 15px !important; border-radius: 12px !important; }
.wtc-search--big .wtc-btn { min-height: 52px; padding: 0 22px; border-radius: 12px; }
.wtc-verdict { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 24px; margin-bottom: 18px; border-radius: 18px; background: var(--wtc-card); border: 1px solid var(--wtc-line); box-shadow: var(--wtc-shadow); position: relative; overflow: hidden; }
.wtc-verdict::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--wtc-muted); }
.wtc-verdict.is-high::before { background: var(--wtc-bad); }
.wtc-verdict.is-caution::before { background: #f59e0b; }
.wtc-verdict.is-clean::before { background: #10b981; }
.wtc-verdict.is-high { background: linear-gradient(90deg, #fff5f5, var(--wtc-card) 45%); }
.wtc-verdict.is-caution { background: linear-gradient(90deg, #fffbeb, var(--wtc-card) 45%); }
.wtc-verdict.is-clean { background: linear-gradient(90deg, #f0fdf4, var(--wtc-card) 45%); }
.wtc-verdict h3 { margin: 4px 0 6px; font-size: 22px; }
.wtc-verdict h3 .wtc-badge { font-size: 16px; padding: 6px 14px; }
.wtc-verdict p { margin: 0 0 10px; }
.wtc-verdict__addr { word-break: break-all; font-size: 12px !important; margin: 10px 0 0 !important; }
.wtc-verdict__ring { --p: 0; --c: var(--wtc-muted); width: 112px; height: 112px; border-radius: 50%; display: grid; place-content: center; text-align: center;
	background: radial-gradient(closest-side, var(--wtc-card) 78%, transparent 79% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), #e2e8f0 0); }
.wtc-verdict.is-high .wtc-verdict__ring { --c: var(--wtc-bad); }
.wtc-verdict.is-caution .wtc-verdict__ring { --c: #f59e0b; }
.wtc-verdict.is-clean .wtc-verdict__ring { --c: #10b981; }
.wtc-verdict.is-pending .wtc-verdict__ring { background: #f1f5f9; color: var(--wtc-brand); }
.wtc-verdict__ring strong { font-size: 30px; line-height: 1; }
.wtc-verdict__ring small { color: var(--wtc-muted); font-size: 11px; }
.wtc-verdict__side { min-width: 190px; }
.wtc-verdict__counts { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wtc-verdict__counts li { padding: 8px 10px; border-radius: 10px; background: #f8fafc; font-size: 12px; color: var(--wtc-ink-2); }
.wtc-verdict__counts strong { display: block; font-size: 18px; color: var(--wtc-ink); }
.wtc-verdict__counts li.is-bad strong { color: var(--wtc-bad); }
.wtc-verdict__counts li.is-warn strong { color: var(--wtc-warn); }
.wtc-verdict__counts li.is-ok strong { color: var(--wtc-ok); }
.wtc-verdict .wtc-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.wtc-ck-tools { display: flex; justify-content: flex-end; gap: 14px; margin: 0 0 6px; }
.wtc-acc { display: grid; gap: 8px; }
.wtc-acc__group { margin: 14px 0 2px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--wtc-muted); }
.wtc-acc__item { background: var(--wtc-card); border: 1px solid var(--wtc-line); border-radius: 14px; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.wtc-acc__item[open] { box-shadow: var(--wtc-shadow); }
.wtc-acc__item.is-risk { border-color: #fecaca; }
.wtc-acc__item.is-warn { border-color: #fde68a; }
.wtc-acc__item > summary { list-style: none; display: grid; grid-template-columns: 34px minmax(150px, 220px) 1fr auto 18px; gap: 12px; align-items: center; padding: 14px 16px; cursor: pointer; }
.wtc-acc__item > summary::-webkit-details-marker { display: none; }
.wtc-acc__item > summary:hover { background: #fafbff; }
.wtc-acc__ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-content: center; font-weight: 800; font-size: 14px; background: #f1f5f9; color: var(--wtc-muted); }
.wtc-acc__ico .wtc-spin { margin: 0; }
.wtc-acc__ico.is-ok { background: var(--wtc-ok-soft); color: var(--wtc-ok); }
.wtc-acc__ico.is-warn { background: var(--wtc-warn-soft); color: var(--wtc-warn); }
.wtc-acc__ico.is-bad { background: var(--wtc-bad-soft); color: var(--wtc-bad); }
.wtc-acc__ico.is-info { background: var(--wtc-brand-soft); color: var(--wtc-brand); }
.wtc-acc__name { display: grid; line-height: 1.25; }
.wtc-acc__name small { color: var(--wtc-muted); font-size: 12px; }
.wtc-acc__title { color: var(--wtc-ink-2); font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wtc-acc__item[open] .wtc-acc__title { white-space: normal; }
.wtc-acc__chev { width: 10px; height: 10px; border-right: 2px solid var(--wtc-muted); border-bottom: 2px solid var(--wtc-muted); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.wtc-acc__item[open] .wtc-acc__chev { transform: rotate(225deg) translateY(-3px); }
.wtc-acc__body { padding: 4px 16px 16px 62px; display: grid; gap: 12px; }
.wtc-acc__about { margin: 0; font-size: 12px; }
.wtc-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 0; }
.wtc-kv div { padding: 8px 10px; border-radius: 10px; background: #f8fafc; }
.wtc-kv dt { font-size: 11px; color: var(--wtc-muted); text-transform: uppercase; letter-spacing: .04em; }
.wtc-kv dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; word-break: break-word; }
.wtc-raw summary { cursor: pointer; font-size: 12px; color: var(--wtc-brand); font-weight: 600; }
.wtc-raw pre { max-height: 260px; overflow: auto; padding: 10px; border-radius: 10px; background: #0f172a; color: #e2e8f0; font-size: 11px; white-space: pre-wrap; word-break: break-all; }
.wtc-ckmini { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12px; }
.wtc-ckmini li { padding: 6px 8px; border-radius: 8px; }
.wtc-ckmini li.is-bad { background: var(--wtc-bad-soft); color: #7f1d1d; }
.wtc-ckmini li.is-warn { background: var(--wtc-warn-soft); color: #78350f; }

/* ---------- alerts & sharing ---------- */
.wtc-wrow.is-alert-high { box-shadow: inset 3px 0 0 var(--wtc-bad); }
.wtc-wrow.is-alert-caution { box-shadow: inset 3px 0 0 #f59e0b; }
.wtc-wrow.is-shared .wtc-switch { opacity: .55; }
.wtc-share { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wtc-share li { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--wtc-line); }
.wtc-share li:last-child { border-bottom: 0; }
.wtc-share li div { display: grid; min-width: 0; }
.wtc-share li small { overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 900px) {
	.wtc-verdict { grid-template-columns: auto 1fr; }
	.wtc-verdict__side { grid-column: 1 / -1; }
	.wtc-verdict__counts { grid-template-columns: repeat(4, 1fr); }
	.wtc-acc__item > summary { grid-template-columns: 30px 1fr auto 14px; }
	.wtc-acc__title { grid-column: 2 / 4; grid-row: 2; white-space: normal; font-size: 13px; }
	.wtc-acc__item > summary .wtc-badge { grid-column: 3; grid-row: 1; }
}
@media (max-width: 600px) {
	.wtc-search--big { flex-direction: column; }
	.wtc-verdict { grid-template-columns: 1fr; text-align: left; padding: 18px; }
	.wtc-verdict__ring { width: 88px; height: 88px; }
	.wtc-verdict__counts { grid-template-columns: 1fr 1fr; }
	.wtc-acc__body { padding-left: 16px; }
}
