:root {
    --s-active-dot: #1D9E75;
    --s-active-bg: rgba(29, 158, 117, .1);
    --s-active-val: #1D9E75;
    --s-connected-dot: #378ADD;
    --s-connected-bg: rgba(55, 138, 221, .1);
    --s-connected-val: #378ADD;
    --s-submitted-dot: #BA7517;
    --s-submitted-bg: rgba(186, 117, 23, .1);
    --s-submitted-val: #BA7517;
    --s-action-dot: #D4537E;
    --s-action-bg: rgba(212, 83, 126, .1);
    --s-action-val: #D4537E;
    --s-suspended-dot: #E24B4A;
    --s-suspended-bg: rgba(226, 75, 74, .1);
    --s-suspended-val: #E24B4A;
    --s-not-dot: #888780;
    --s-not-bg: rgba(136, 135, 128, .1);
    --s-not-val: #5F5E5A;

    --db-border: var(--bs-border-color);
    --db-card-bg: var(--bs-body-bg);
    --db-track: rgba(0, 0, 0, .06);
    --db-hover: rgba(0, 0, 0, .015);
}

[data-bs-theme="dark"] {
    --s-active-dot: #5DCAA5;
    --s-active-bg: rgba(93, 202, 165, .15);
    --s-active-val: #5DCAA5;
    --s-connected-dot: #85B7EB;
    --s-connected-bg: rgba(133, 183, 235, .15);
    --s-connected-val: #85B7EB;
    --s-submitted-dot: #EF9F27;
    --s-submitted-bg: rgba(239, 159, 39, .15);
    --s-submitted-val: #EF9F27;
    --s-action-dot: #ED93B1;
    --s-action-bg: rgba(237, 147, 177, .15);
    --s-action-val: #ED93B1;
    --s-suspended-dot: #F09595;
    --s-suspended-bg: rgba(240, 149, 149, .15);
    --s-suspended-val: #F09595;
    --s-not-dot: #B4B2A9;
    --s-not-bg: rgba(180, 178, 169, .15);
    --s-not-val: #B4B2A9;

    --db-border: rgba(255, 255, 255, 0.08);
    --db-card-bg: rgba(255, 255, 255, 0.02);
    --db-track: rgba(255, 255, 255, .08);
    --db-hover: rgba(255, 255, 255, .015);
}

.ea-db { display: flex; flex-direction: column; gap: 20px; padding: 4px 0 8px; }

.ea-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ea-head-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: var(--bs-heading-color, var(--bs-body-color)); margin: 0; }
.ea-head-sub { font-size: 13px; color: var(--bs-secondary-color); margin: 3px 0 0; }
.ea-head-total { font-size: 13px; color: var(--bs-secondary-color); }
.ea-head-total strong { color: var(--bs-body-color); font-weight: 700; }

.ea-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }

.ea-card {
    background: var(--db-card-bg);
    border: 1px solid var(--db-border);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.ea-kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; transition: border-color .2s, box-shadow .2s; }
.ea-kpi:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06); }

.ea-kpi-top { display: flex; align-items: center; justify-content: space-between; }
.ea-kpi-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.ea-kpi-pct { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }

.ea-kpi-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--bs-secondary-color); }
.ea-kpi-value { font-size: 32px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.ea-kpi-sub { font-size: 11.5px; color: var(--bs-secondary-color); }

.ea-bar { height: 5px; border-radius: 99px; background: var(--db-track); overflow: hidden; }
.ea-bar-fill { height: 100%; border-radius: 99px; }

.ea-panels { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; }
.ea-panel { padding: 20px; }
.ea-panel-title { font-size: 14px; font-weight: 700; color: var(--bs-body-color); margin: 0 0 18px; }

.ea-donut-wrap { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.ea-donut { position: relative; width: 156px; height: 156px; border-radius: 50%; flex-shrink: 0; }
.ea-donut-hole {
    position: absolute; inset: 26px; border-radius: 50%;
    background: var(--db-card-bg);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ea-donut-total { font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--bs-body-color); }
.ea-donut-cap { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); margin-top: 4px; }

.ea-legend { display: flex; flex-direction: column; gap: 11px; flex: 1; min-width: 170px; }
.ea-legend-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ea-legend-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.ea-legend-name { color: var(--bs-body-color); flex: 1; }
.ea-legend-val { font-weight: 700; color: var(--bs-body-color); }
.ea-legend-pct { font-size: 11.5px; color: var(--bs-secondary-color); min-width: 42px; text-align: right; }

.ea-types { display: flex; flex-direction: column; gap: 18px; }
.ea-type-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.ea-type-name { font-size: 13px; font-weight: 600; color: var(--bs-body-color); }
.ea-type-val { font-size: 13px; color: var(--bs-secondary-color); }
.ea-type-val strong { color: var(--bs-body-color); font-weight: 700; font-size: 15px; }
.ea-type-empty { font-size: 13px; color: var(--bs-secondary-color); text-align: center; padding: 20px 0; }

@media (max-width: 900px) { .ea-panels { grid-template-columns: 1fr; } }
@media (max-width: 576px) {
    .ea-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .ea-kpi-value { font-size: 26px; }
    .ea-donut-wrap { justify-content: center; }
}

.rf-ident {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--db-card-bg);
    border: 1px solid var(--db-border);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.rf-ident-disc {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    flex: none;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    background: color-mix(in oklab, var(--bs-primary) 16%, transparent);
    color: var(--bs-primary);
}

.rf-ident-disc img { width: 100%; height: 100%; object-fit: cover; }

.rf-ident-who { flex: 1; min-width: 0; }

.rf-ident-name {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--bs-heading-color, var(--bs-body-color));
}

.rf-ident-contact { font-size: 13px; color: var(--bs-secondary-color); margin-top: 2px; }

@media (max-width: 991.98px) {
    .rf-ident { flex-wrap: wrap; }
}

.ea-detail .field-label { text-align: start; }

.ea-detail .field-group.field-boolean { flex-direction: row; text-align: start; }
.ea-detail .field-group.field-boolean .field-label {
    flex: none; inline-size: 130px; min-inline-size: 0;
    margin: 0 var(--ea-sp-8) 0 0; text-align: start;
}
.ea-detail .field-group.field-boolean .field-value {
    flex: 1; inline-size: auto; min-inline-size: 66%; text-align: start;
}

.rf-docs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.rf-doc {
    border: 1px solid var(--db-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--db-card-bg);
}

.rf-doc-preview {
    display: block;
    height: 130px;
    background: var(--bs-tertiary-bg);
}

.rf-doc-preview img { width: 100%; height: 100%; object-fit: cover; }

.rf-doc-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
}

.rf-doc-meta b { font-size: 12.5px; font-weight: 600; }
.rf-doc-meta span { font-size: 11px; color: var(--bs-secondary-color); }

.rf-empty {
    margin: 0;
    padding: 26px;
    text-align: center;
    font-size: 13px;
    color: var(--bs-secondary-color);
}

.rf-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border: 1px solid var(--db-border);
    border-radius: 14px;
    background: linear-gradient(120deg,
        color-mix(in oklab, var(--bs-primary) 14%, var(--db-card-bg)) 0%,
        var(--db-card-bg) 62%);
}

.rf-hero-label {
    font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--bs-secondary-color);
}

.rf-hero-amount {
    font-size: 29px; font-weight: 700; letter-spacing: -.02em; margin-top: 5px;
    font-variant-numeric: tabular-nums; color: var(--bs-heading-color, var(--bs-body-color));
}

.rf-hero-amount span {
    font-size: 14px; font-weight: 500; color: var(--bs-secondary-color); margin-inline-start: 7px;
}

.rf-hero-disc {
    width: 48px; height: 48px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in oklab, var(--bs-primary) 16%, transparent);
    color: var(--bs-primary);
}

.rf-hero-disc svg { width: 24px; height: 24px; }

.rf-hint { font-size: .72rem; text-align: center; color: var(--bs-secondary-color); }

.rf-submit { display: flex; align-items: center; justify-content: center; gap: .5rem; }

.rf-move {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--db-border);
}

.rf-move.is-last { border-bottom: 0; }

.rf-move-disc {
    width: 34px; height: 34px; border-radius: 50%; flex: none; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
}

.rf-move-disc.is-in { background: var(--s-active-bg); color: var(--s-active-dot); }
.rf-move-disc.is-out { background: var(--s-not-bg); color: var(--s-not-val); }

.rf-move-body { flex: 1; min-width: 0; }
.rf-move-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }

.rf-move-meta {
    font-size: .75rem;
    color: var(--bs-secondary-color);
    font-family: var(--bs-font-monospace);
}

.rf-move-meta .rf-dot { opacity: .5; margin: 0 4px; }

.rf-chip {
    font-size: .65rem; font-weight: 600; border-radius: 99px; padding: 1px 8px;
    background: var(--s-active-bg); color: var(--s-active-dot);
}

.rf-move-amount { text-align: end; flex: none; font-variant-numeric: tabular-nums; }
.rf-move-amount b { font-size: .95rem; }
.rf-move-amount.is-in b { color: var(--s-active-dot); }
.rf-move-amount span {
    display: block; font-size: .65rem; letter-spacing: .08em; color: var(--bs-secondary-color);
}

.cw-facts { display: flex; align-items: center; gap: 26px; }

.cw-fact { text-align: end; }
.cw-fact b {
    display: block; font-size: 19px; font-weight: 700;
    font-variant-numeric: tabular-nums; color: var(--bs-heading-color, var(--bs-body-color));
}
.cw-fact b.is-warn { color: var(--s-submitted-dot); }
.cw-fact span {
    font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
    text-transform: uppercase; color: var(--bs-secondary-color);
}

.cw-addr {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--bs-font-monospace); font-size: .72rem;
    background: var(--bs-tertiary-bg); border: 1px solid var(--db-border);
    border-radius: 99px; padding: 3px 5px 3px 10px; color: var(--bs-secondary-color);
}
.cw-addr button {
    border: 0; background: none; padding: 0 6px; cursor: pointer;
    font-family: var(--bs-body-font-family); font-size: .7rem; font-weight: 600; color: var(--bs-primary);
}

.cw-row {
    display: flex; align-items: center; gap: 13px;
    padding: 12px 16px; border-bottom: 1px solid var(--db-border);
}
.cw-row.is-last { border-bottom: 0; }

.cw-disc {
    width: 34px; height: 34px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 9.5px; font-weight: 700; letter-spacing: -.02em;
    background: var(--bs-tertiary-bg); color: var(--bs-secondary-color);
}

.cw-body { flex: 1; min-width: 0; }
.cw-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; font-size: .9rem; }
.cw-meta { font-size: .75rem; color: var(--bs-secondary-color); }

.cw-chip-gas { background: var(--s-not-bg); color: var(--s-not-val); }
.cw-chip-std { background: var(--s-connected-bg); color: var(--s-connected-dot); }

.cw-amt { text-align: end; flex: none; min-width: 150px; font-variant-numeric: tabular-nums; }
.cw-amt b { font-size: .95rem; }
.cw-amt b.is-zero { font-weight: 400; color: var(--bs-secondary-color); }
.cw-amt b.is-dim { font-size: .78rem; font-weight: 400; color: var(--bs-secondary-color); }
.cw-amt span { display: block; font-size: .7rem; color: var(--bs-secondary-color); margin-top: 1px; }


.cw-kv {
    display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
    padding: 9px 0; border-bottom: 1px solid var(--db-border); font-size: .85rem;
}
.cw-kv:last-of-type { border-bottom: 0; }
.cw-kv > span { color: var(--bs-secondary-color); flex: none; }
.cw-kv > b { text-align: end; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.cw-spin {
    display: inline-block; width: 13px; height: 13px; border-radius: 50%;
    border: 2px solid var(--db-track); border-top-color: var(--bs-secondary-color);
    animation: cw-spin .7s linear infinite; vertical-align: -2px;
}

@keyframes cw-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) { .cw-spin { animation: none; } }

