/* Transaction detail modal */
.wg-txn-hero {
    border-radius: 1rem;
    border: 1px solid rgba(var(--primary-200), 1);
    background: linear-gradient(
        135deg,
        rgba(var(--primary-50), 1) 0%,
        rgba(var(--gray-50), 1) 100%
    );
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.15);
}

.wg-txn-hero--deposit {
    border-color: rgba(var(--success-200), 1);
    background: linear-gradient(
        135deg,
        rgba(var(--success-100), 0.9) 0%,
        rgba(var(--primary-100), 0.55) 45%,
        rgba(var(--gray-50), 1) 100%
    );
}

.wg-txn-hero--withdrawal {
    border-color: rgba(var(--warning-200), 1);
    background: linear-gradient(
        135deg,
        rgba(var(--warning-100), 0.9) 0%,
        rgba(var(--danger-100), 0.45) 45%,
        rgba(var(--gray-50), 1) 100%
    );
}

.dark .wg-txn-hero--deposit {
    border-color: rgba(var(--success-800), 1);
    background: linear-gradient(
        135deg,
        rgba(var(--success-950), 0.55) 0%,
        rgba(var(--primary-950), 0.35) 50%,
        rgba(var(--gray-900), 0.65) 100%
    );
}

.dark .wg-txn-hero--withdrawal {
    border-color: rgba(var(--warning-800), 1);
    background: linear-gradient(
        135deg,
        rgba(var(--warning-950), 0.5) 0%,
        rgba(var(--danger-950), 0.35) 50%,
        rgba(var(--gray-900), 0.65) 100%
    );
}

.wg-txn-hero__header-row {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}

.wg-txn-hero__icon-wrap {
    display: flex;
    height: 2.75rem;
    width: 2.75rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    border: 1px solid transparent;
}

.wg-txn-hero__icon-wrap--success {
    background: rgba(var(--success-100), 1);
    border-color: rgba(var(--success-200), 1);
    color: rgba(var(--success-600), 1);
}

.wg-txn-hero__icon-wrap--warning {
    background: rgba(var(--warning-100), 1);
    border-color: rgba(var(--warning-200), 1);
    color: rgba(var(--warning-600), 1);
}

.dark .wg-txn-hero__icon-wrap--success {
    background: rgba(var(--success-950), 0.65);
    border-color: rgba(var(--success-800), 1);
    color: rgba(var(--success-300), 1);
}

.dark .wg-txn-hero__icon-wrap--warning {
    background: rgba(var(--warning-950), 0.65);
    border-color: rgba(var(--warning-800), 1);
    color: rgba(var(--warning-300), 1);
}

.wg-txn-hero__type-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.wg-txn-hero__main {
    min-width: 0;
    flex: 1;
}

.wg-txn-hero__eyebrow {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(var(--gray-500), 1);
}

.wg-txn-hero__amount--success {
    color: rgba(var(--success-700), 1) !important;
}

.wg-txn-hero__amount--warning {
    color: rgba(var(--warning-700), 1) !important;
}

.dark .wg-txn-hero__amount--success {
    color: rgba(var(--success-300), 1) !important;
}

.dark .wg-txn-hero__amount--warning {
    color: rgba(var(--warning-300), 1) !important;
}

.wg-txn-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: rgba(var(--gray-500), 1);
}

.wg-txn-hero__meta-icon {
    width: 0.875rem;
    height: 0.875rem;
    color: rgba(var(--gray-400), 1);
}

.wg-txn-hero__meta-icon--success {
    color: rgba(var(--success-500), 1);
}

.wg-txn-hero__meta-highlight {
    font-weight: 600;
    color: rgba(var(--success-700), 1);
}

.dark .wg-txn-hero__meta-highlight {
    color: rgba(var(--success-300), 1);
}

.wg-txn-hero__meta-sep {
    color: rgba(var(--gray-300), 1);
}

.wg-txn-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.wg-txn-copy--filament {
    margin-top: 1rem;
}

.wg-txn-copy__icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.wg-txn-copy__icon--primary {
    color: rgba(var(--primary-500), 1);
}

.wg-txn-copy__icon--warning {
    color: rgba(var(--warning-500), 1);
}

.wg-txn-copy__icon--muted {
    color: rgba(var(--gray-400), 1);
}

.wg-txn-copy__label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(var(--gray-500), 1);
}

.wg-txn-copy__copied {
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(var(--success-600), 1);
}

.wg-txn-failure-section__body {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(var(--danger-800), 1);
}

.dark .wg-txn-failure-section__body {
    color: rgba(var(--danger-200), 1);
}

.wg-txn-timeline__dot-icon {
    width: 1rem;
    height: 1rem;
}

.wg-txn-timeline__dot-num {
    font-size: 0.6875rem;
    font-weight: 700;
}

.wg-txn-timeline__label--done {
    color: rgba(var(--success-700), 1);
}

.wg-txn-timeline__label--failed {
    color: rgba(var(--danger-700), 1);
}

.dark .wg-txn-timeline__label--done {
    color: rgba(var(--success-300), 1);
}

.dark .wg-txn-timeline__label--failed {
    color: rgba(var(--danger-300), 1);
}

.wg-txn-hero--compact {
    padding: 0.75rem 1rem;
    margin-bottom: 0;
}

.wg-txn-hero--compact .wg-txn-hero__amount {
    font-size: 1.375rem;
}

.wg-txn-hero--compact .wg-txn-hero__subtitle {
    margin-top: 0.125rem;
}

.dark .wg-txn-hero {
    border-color: rgba(var(--primary-800), 1);
    background: linear-gradient(
        135deg,
        rgba(var(--primary-950), 0.6) 0%,
        rgba(var(--gray-900), 0.6) 100%
    );
}

.wg-txn-hero__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.wg-txn-hero__amount {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: rgba(var(--primary-700), 1);
    font-variant-numeric: tabular-nums;
}

.dark .wg-txn-hero__amount {
    color: rgba(var(--primary-300), 1);
}

.wg-txn-hero__subtitle {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: rgba(var(--gray-500), 1);
}

.wg-txn-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: capitalize;
    border: 1px solid transparent;
}

.wg-txn-badge--success {
    background: rgba(var(--success-100), 1);
    color: rgba(var(--success-800), 1);
    border-color: rgba(var(--success-200), 1);
}

.wg-txn-badge--warning {
    background: rgba(var(--warning-100), 1);
    color: rgba(var(--warning-800), 1);
    border-color: rgba(var(--warning-200), 1);
}

.wg-txn-badge--danger {
    background: rgba(var(--danger-100), 1);
    color: rgba(var(--danger-800), 1);
    border-color: rgba(var(--danger-200), 1);
}

.wg-txn-badge--gray {
    background: rgba(var(--gray-100), 1);
    color: rgba(var(--gray-700), 1);
    border-color: rgba(var(--gray-200), 1);
}

.dark .wg-txn-badge--success {
    background: rgba(var(--success-950), 0.6);
    color: rgba(var(--success-300), 1);
    border-color: rgba(var(--success-800), 1);
}

.dark .wg-txn-badge--warning {
    background: rgba(var(--warning-950), 0.6);
    color: rgba(var(--warning-300), 1);
    border-color: rgba(var(--warning-800), 1);
}

.dark .wg-txn-badge--danger {
    background: rgba(var(--danger-950), 0.6);
    color: rgba(var(--danger-300), 1);
    border-color: rgba(var(--danger-800), 1);
}

.wg-txn-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.875rem;
}

.wg-txn-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border-radius: 9999px;
    border: 1px solid rgba(var(--gray-200), 1);
    background: rgba(var(--gray-50), 1);
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(var(--gray-700), 1);
}

.dark .wg-txn-chip {
    border-color: rgba(var(--gray-700), 1);
    background: rgba(var(--gray-800), 0.6);
    color: rgba(var(--gray-300), 1);
}

.wg-txn-copy {
    margin-top: 0.875rem;
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(var(--primary-200), 1);
    background: rgb(255 255 255 / 0.7);
    padding: 0.5rem 0.75rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.wg-txn-copy:hover {
    background: #fff;
}

.dark .wg-txn-copy {
    border-color: rgba(var(--primary-800), 1);
    background: rgba(var(--gray-900), 0.5);
}

.wg-txn-copy__id {
    flex: 1;
    min-width: 0;
    font-family: ui-monospace, monospace;
    font-size: 0.6875rem;
    color: rgba(var(--gray-700), 1);
    word-break: break-all;
}

.dark .wg-txn-copy__id {
    color: rgba(var(--gray-300), 1);
}

.wg-txn-alert {
    border-radius: 0.75rem;
    border: 1px solid rgba(var(--danger-200), 1);
    background: rgba(var(--danger-50), 1);
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: rgba(var(--danger-800), 1);
}

.dark .wg-txn-alert {
    border-color: rgba(var(--danger-800), 1);
    background: rgba(var(--danger-950), 0.45);
    color: rgba(var(--danger-200), 1);
}

.wg-txn-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.wg-txn-timeline__item {
    display: flex;
    gap: 0.75rem;
    padding-bottom: 1rem;
}

.wg-txn-timeline__item:last-child {
    padding-bottom: 0;
}

.wg-txn-timeline__rail {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wg-txn-timeline__dot {
    display: flex;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #fff;
}

.wg-txn-timeline__dot--done {
    background: rgba(var(--primary-600), 1);
}

.wg-txn-timeline__dot--failed {
    background: rgba(var(--danger-600), 1);
}

.wg-txn-timeline__dot--pending {
    background: rgba(var(--gray-300), 1);
    color: rgba(var(--gray-600), 1);
}

.dark .wg-txn-timeline__dot--pending {
    background: rgba(var(--gray-700), 1);
    color: rgba(var(--gray-300), 1);
}

.wg-txn-timeline__line {
    margin-top: 0.25rem;
    width: 2px;
    flex: 1;
    min-height: 1rem;
    background: rgba(var(--gray-200), 1);
}

.dark .wg-txn-timeline__line {
    background: rgba(var(--gray-700), 1);
}

.wg-txn-timeline__label {
    padding-top: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(var(--gray-800), 1);
}

.dark .wg-txn-timeline__label {
    color: rgba(var(--gray-200), 1);
}

.wg-txn-timeline__time {
    margin-top: 0.125rem;
    font-size: 0.75rem;
    color: rgba(var(--gray-500), 1);
}

/* Transaction detail slide-over — top X + footer Close (explicit rose hex for light theme) */
.fi-modal-window.wg-txn-detail-modal .fi-modal-close-btn.fi-icon-btn,
.fi-modal-window:has(.wg-txn-hero) .fi-modal-close-btn.fi-icon-btn,
.fi-modal-window:has(.wg-txn-tabs) .fi-modal-close-btn.fi-icon-btn,
.fi-modal-window.wg-txn-detail-modal .fi-modal-footer-actions .fi-btn.wg-txn-modal-footer-close,
.fi-modal-window:has(.wg-txn-hero) .fi-modal-footer-actions .fi-btn.wg-txn-modal-footer-close,
.fi-modal-window:has(.wg-txn-tabs) .fi-modal-footer-actions .fi-btn.wg-txn-modal-footer-close {
    --tw-text-opacity: 1;
    background-color: #e11d48 !important;
    background-image: linear-gradient(135deg, #fb7185 0%, #e11d48 45%, #be123c 100%) !important;
    border: 1px solid #be123c !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 2px 8px rgb(190 18 60 / 35%) !important;
    color: #fff !important;
}

.fi-modal-window.wg-txn-detail-modal .fi-modal-close-btn.fi-icon-btn:hover,
.fi-modal-window:has(.wg-txn-hero) .fi-modal-close-btn.fi-icon-btn:hover,
.fi-modal-window:has(.wg-txn-tabs) .fi-modal-close-btn.fi-icon-btn:hover,
.fi-modal-window.wg-txn-detail-modal .fi-modal-footer-actions .fi-btn.wg-txn-modal-footer-close:hover,
.fi-modal-window:has(.wg-txn-hero) .fi-modal-footer-actions .fi-btn.wg-txn-modal-footer-close:hover,
.fi-modal-window:has(.wg-txn-tabs) .fi-modal-footer-actions .fi-btn.wg-txn-modal-footer-close:hover {
    background-color: #be123c !important;
    background-image: linear-gradient(135deg, #f43f5e 0%, #be123c 45%, #9f1239 100%) !important;
    box-shadow: 0 4px 12px rgb(159 18 57 / 40%) !important;
    color: #fff !important;
}

.fi-modal-window.wg-txn-detail-modal .fi-modal-close-btn.fi-icon-btn .fi-icon-btn-icon,
.fi-modal-window:has(.wg-txn-hero) .fi-modal-close-btn.fi-icon-btn .fi-icon-btn-icon,
.fi-modal-window:has(.wg-txn-tabs) .fi-modal-close-btn.fi-icon-btn .fi-icon-btn-icon,
.fi-modal-window.wg-txn-detail-modal .fi-modal-close-btn.fi-icon-btn svg,
.fi-modal-window:has(.wg-txn-hero) .fi-modal-close-btn.fi-icon-btn svg,
.fi-modal-window:has(.wg-txn-tabs) .fi-modal-close-btn.fi-icon-btn svg,
.fi-modal-window.wg-txn-detail-modal .fi-modal-footer-actions .fi-btn.wg-txn-modal-footer-close .fi-btn-icon,
.fi-modal-window:has(.wg-txn-hero) .fi-modal-footer-actions .fi-btn.wg-txn-modal-footer-close .fi-btn-icon,
.fi-modal-window:has(.wg-txn-tabs) .fi-modal-footer-actions .fi-btn.wg-txn-modal-footer-close .fi-btn-icon,
.fi-modal-window.wg-txn-detail-modal .fi-modal-footer-actions .fi-btn.wg-txn-modal-footer-close .fi-btn-label,
.fi-modal-window:has(.wg-txn-hero) .fi-modal-footer-actions .fi-btn.wg-txn-modal-footer-close .fi-btn-label,
.fi-modal-window:has(.wg-txn-tabs) .fi-modal-footer-actions .fi-btn.wg-txn-modal-footer-close .fi-btn-label,
.fi-modal-window.wg-txn-detail-modal .fi-modal-footer-actions .fi-btn.wg-txn-modal-footer-close svg,
.fi-modal-window:has(.wg-txn-hero) .fi-modal-footer-actions .fi-btn.wg-txn-modal-footer-close svg,
.fi-modal-window:has(.wg-txn-tabs) .fi-modal-footer-actions .fi-btn.wg-txn-modal-footer-close svg {
    color: #fff !important;
}

/* Colored tab icons in transaction detail modals */
.wg-txn-tabs[data-type="deposit"] .fi-tabs-item:nth-child(1) .fi-tabs-item-icon {
    color: rgba(var(--info-500), 1);
}

.wg-txn-tabs[data-type="deposit"] .fi-tabs-item:nth-child(2) .fi-tabs-item-icon {
    color: rgba(var(--primary-500), 1);
}

.wg-txn-tabs[data-type="deposit"] .fi-tabs-item:nth-last-child(2):not(:nth-child(2)) .fi-tabs-item-icon {
    color: rgba(var(--success-500), 1);
}

.wg-txn-tabs[data-type="deposit"] .fi-tabs-item:last-child .fi-tabs-item-icon {
    color: rgba(var(--warning-500), 1);
}

.wg-txn-tabs[data-type="withdrawal"] .fi-tabs-item:nth-child(1) .fi-tabs-item-icon {
    color: rgba(var(--primary-500), 1);
}

.wg-txn-tabs[data-type="withdrawal"] .fi-tabs-item:nth-child(2) .fi-tabs-item-icon {
    color: rgba(var(--info-500), 1);
}

.wg-txn-tabs[data-type="withdrawal"] .fi-tabs-item:last-child .fi-tabs-item-icon {
    color: rgba(var(--warning-500), 1);
}

.wg-txn-tabs .fi-tabs-item.fi-active .fi-tabs-item-icon {
    opacity: 1;
}

/* Transaction detail modal — polish (admin + agent) */
.wg-txn-hero__header-row {
    flex-wrap: wrap;
}

.wg-txn-hero__main {
    min-width: 8rem;
}

/* Status badge in hero sits top-right and stays readable */
.wg-txn-hero__header-row > .fi-badge {
    margin-left: auto;
    align-self: flex-start;
}

/* Footer action buttons: let status actions wrap and breathe in the slide-over */
.fi-modal-window:has(.wg-txn-hero) .fi-modal-footer-actions,
.fi-modal-window:has(.wg-txn-tabs) .fi-modal-footer-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
    row-gap: 0.5rem;
}

/* Slightly larger tap targets for the transaction action buttons */
.fi-modal-window:has(.wg-txn-hero) .fi-modal-footer-actions .fi-btn,
.fi-modal-window:has(.wg-txn-tabs) .fi-modal-footer-actions .fi-btn {
    font-weight: 600;
}

/* Tab bar spacing inside the detail modal */
.wg-txn-tabs .fi-tabs {
    gap: 0.25rem;
    overflow-x: auto;
}

.wg-txn-tabs .fi-tabs-item {
    white-space: nowrap;
}

/* Client portal — webhook delivery JSON modal */
.wg-webhook-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.wg-webhook-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.dark .wg-webhook-modal__backdrop {
    background: rgba(0, 0, 0, 0.65);
}

.wg-webhook-modal__panel {
    position: relative;
    z-index: 1;
    display: flex;
    max-height: min(90vh, 52rem);
    width: min(100%, 48rem);
    flex-direction: column;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(var(--gray-200), 1);
    background: rgb(255 255 255);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
}

.dark .wg-webhook-modal__panel {
    border-color: rgba(var(--gray-700), 1);
    background: rgb(var(--gray-900));
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
}

.wg-webhook-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(var(--gray-200), 1);
    padding: 1.1rem 1.25rem;
}

.dark .wg-webhook-modal__header {
    border-bottom-color: rgba(var(--gray-700), 1);
}

.wg-webhook-modal__header-main {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-width: 0;
}

.wg-webhook-modal__icon {
    display: flex;
    height: 2.5rem;
    width: 2.5rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
}

.wg-webhook-modal__icon--deposit {
    background: rgba(var(--success-500), 0.12);
    color: rgba(var(--success-600), 1);
}

.wg-webhook-modal__icon--withdrawal {
    background: rgba(var(--warning-500), 0.12);
    color: rgba(var(--warning-600), 1);
}

.wg-webhook-modal__icon--default {
    background: rgba(var(--primary-500), 0.12);
    color: rgba(var(--primary-600), 1);
}

.wg-webhook-modal__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: rgb(var(--gray-950));
    word-break: break-word;
}

.dark .wg-webhook-modal__title {
    color: rgb(var(--gray-50));
}

.wg-webhook-modal__subtitle {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: rgb(var(--gray-500));
}

.wg-webhook-modal__header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.wg-webhook-modal__close {
    display: inline-flex;
    height: 2rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    color: rgb(var(--gray-500));
    transition: background-color 0.15s ease, color 0.15s ease;
}

.wg-webhook-modal__close:hover {
    background: rgba(var(--gray-100), 1);
    color: rgb(var(--gray-700));
}

.dark .wg-webhook-modal__close:hover {
    background: rgba(var(--gray-800), 1);
    color: rgb(var(--gray-200));
}

.wg-webhook-modal__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(var(--gray-50), 1);
}

.dark .wg-webhook-modal__meta {
    background: rgba(var(--gray-800), 0.45);
}

@media (max-width: 640px) {
    .wg-webhook-modal__meta {
        grid-template-columns: 1fr;
    }
}

.wg-webhook-modal__meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    min-width: 0;
}

.wg-webhook-modal__meta-icon {
    font-size: 1rem;
    line-height: 1.2;
}

.wg-webhook-modal__meta-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(var(--gray-500));
}

.wg-webhook-modal__meta-value {
    margin-top: 0.15rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgb(var(--gray-800));
    word-break: break-all;
}

.dark .wg-webhook-modal__meta-value {
    color: rgb(var(--gray-200));
}

.wg-webhook-modal__meta-value--truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wg-webhook-modal__http {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.wg-webhook-modal__http--ok {
    background: rgba(var(--success-500), 0.12);
    color: rgba(var(--success-600), 1);
}

.wg-webhook-modal__http--fail {
    background: rgba(var(--danger-500), 0.12);
    color: rgba(var(--danger-600), 1);
}

.wg-webhook-modal__tabs {
    display: flex;
    gap: 0.35rem;
    border-bottom: 1px solid rgba(var(--gray-200), 1);
    padding: 0 1.25rem;
}

.dark .wg-webhook-modal__tabs {
    border-bottom-color: rgba(var(--gray-700), 1);
}

.wg-webhook-modal__tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-bottom: 2px solid transparent;
    padding: 0.7rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgb(var(--gray-500));
    transition: color 0.15s ease, border-color 0.15s ease;
}

.wg-webhook-modal__tab:hover {
    color: rgb(var(--gray-700));
}

.wg-webhook-modal__tab--active {
    border-bottom-color: rgba(var(--primary-500), 1);
    color: rgba(var(--primary-600), 1);
}

.dark .wg-webhook-modal__tab--active {
    color: rgba(var(--primary-400), 1);
}

.wg-webhook-modal__body {
    overflow: auto;
    padding: 1rem 1.25rem 1.25rem;
}

.wg-webhook-modal__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.wg-webhook-modal__toolbar-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgb(var(--gray-500));
}

.wg-webhook-modal__copy {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(var(--gray-200), 1);
    background: rgb(255 255 255);
    padding: 0.35rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgb(var(--gray-700));
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.wg-webhook-modal__copy:hover {
    border-color: rgba(var(--primary-300), 1);
    background: rgba(var(--primary-50), 1);
    color: rgba(var(--primary-700), 1);
}

.dark .wg-webhook-modal__copy {
    border-color: rgba(var(--gray-700), 1);
    background: rgba(var(--gray-800), 1);
    color: rgb(var(--gray-200));
}

.wg-json-viewer {
    margin: 0;
    overflow: auto;
    max-height: 22rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(var(--gray-200), 1);
    background: #0f172a;
    padding: 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    line-height: 1.55;
    color: #e2e8f0;
}

.dark .wg-json-viewer {
    border-color: rgba(var(--gray-700), 1);
    background: #020617;
}

.wg-json-key {
    color: #7dd3fc;
}

.wg-json-string {
    color: #86efac;
}

.wg-json-number {
    color: #fcd34d;
}

.wg-json-bool {
    color: #f9a8d4;
}

.wg-json-null {
    color: #94a3b8;
    font-style: italic;
}

.wg-json-bracket {
    color: #cbd5e1;
}

/* Admin dashboard — risk alert + quick links */
.wg-admin-dashboard-risk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(244, 63, 94, 0.35);
    background: linear-gradient(135deg, rgba(255, 241, 242, 1) 0%, rgba(254, 226, 226, 0.65) 100%);
    padding: 1rem 1.25rem;
}

.dark .wg-admin-dashboard-risk {
    border-color: rgba(244, 63, 94, 0.45);
    background: linear-gradient(135deg, rgba(76, 5, 25, 0.55) 0%, rgba(127, 29, 29, 0.35) 100%);
}

.wg-admin-dashboard-risk__content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.wg-admin-dashboard-risk__pulse {
    flex-shrink: 0;
    width: 0.65rem;
    height: 0.65rem;
    margin-top: 0.35rem;
    border-radius: 9999px;
    background: rgb(244 63 94);
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.55);
    animation: wg-admin-dashboard-pulse 1.8s ease-in-out infinite;
}

@keyframes wg-admin-dashboard-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.45);
    }
    50% {
        box-shadow: 0 0 0 0.45rem rgba(244, 63, 94, 0);
    }
}

.wg-admin-dashboard-risk__title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: rgb(159 18 57);
}

.dark .wg-admin-dashboard-risk__title {
    color: rgb(254 205 211);
}

.wg-admin-dashboard-risk__text {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: rgb(190 18 60);
}

.dark .wg-admin-dashboard-risk__text {
    color: rgb(251 113 133);
}

.wg-admin-dashboard-risk__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 0.5rem;
    background: rgb(225 29 72);
    padding: 0.45rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.wg-admin-dashboard-risk__cta:hover {
    background: rgb(190 18 60);
}

.wg-admin-dashboard-links {
    margin-top: 0.25rem;
}

.wg-admin-dashboard-links__title {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgb(var(--gray-500));
}

.wg-admin-dashboard-links__grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .wg-admin-dashboard-links__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .wg-admin-dashboard-links__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.wg-admin-dashboard-links__card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(var(--gray-200), 1);
    background: rgb(255 255 255);
    padding: 0.9rem 1rem;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.wg-admin-dashboard-links__card:hover {
    border-color: rgba(var(--primary-300), 1);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.dark .wg-admin-dashboard-links__card {
    border-color: rgba(var(--gray-700), 1);
    background: rgba(var(--gray-900), 1);
}

.wg-admin-dashboard-links__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 0.15rem;
}

.wg-admin-dashboard-links__card--primary .wg-admin-dashboard-links__icon {
    background: rgba(var(--primary-50), 1);
    color: rgba(var(--primary-600), 1);
}

.wg-admin-dashboard-links__card--success .wg-admin-dashboard-links__icon {
    background: rgba(var(--success-50), 1);
    color: rgba(var(--success-600), 1);
}

.wg-admin-dashboard-links__card--warning .wg-admin-dashboard-links__icon {
    background: rgba(var(--warning-50), 1);
    color: rgba(var(--warning-600), 1);
}

.wg-admin-dashboard-links__card--danger .wg-admin-dashboard-links__icon {
    background: rgba(var(--danger-50), 1);
    color: rgba(var(--danger-600), 1);
}

.wg-admin-dashboard-links__label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgb(var(--gray-900));
}

.dark .wg-admin-dashboard-links__label {
    color: rgb(var(--gray-100));
}

.wg-admin-dashboard-links__desc {
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgb(var(--gray-500));
}

/* Admin reports page */
.wg-reports-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .wg-reports-layout {
        flex-direction: row;
        align-items: flex-start;
    }
}

.wg-reports-types {
    width: 100%;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .wg-reports-types {
        width: 17rem;
    }
}

.wg-reports-types__label {
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(var(--gray-500));
}

.wg-reports-types__grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wg-reports-types__card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid rgba(var(--gray-200), 1);
    background: rgb(255 255 255);
    padding: 0.75rem 0.85rem;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.wg-reports-types__card:hover {
    border-color: rgba(var(--primary-300), 1);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.wg-reports-types__card--active {
    border-color: rgba(var(--primary-500), 1);
    background: rgba(var(--primary-50), 1);
    box-shadow: 0 0 0 1px rgba(var(--primary-500), 0.15);
}

.dark .wg-reports-types__card {
    border-color: rgba(var(--gray-700), 1);
    background: rgba(var(--gray-900), 1);
}

.dark .wg-reports-types__card--active {
    background: rgba(var(--primary-950), 0.45);
}

.wg-reports-types__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(var(--gray-100), 1);
    color: rgb(var(--gray-700));
    margin-bottom: 0.15rem;
}

.wg-reports-types__card--active .wg-reports-types__icon {
    background: rgba(var(--primary-100), 1);
    color: rgba(var(--primary-700), 1);
}

.wg-reports-types__title {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgb(var(--gray-900));
}

.dark .wg-reports-types__title {
    color: rgb(var(--gray-100));
}

.wg-reports-types__desc {
    font-size: 0.72rem;
    line-height: 1.35;
    color: rgb(var(--gray-500));
}

.wg-reports-types__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.wg-reports-types__badge {
    border-radius: 9999px;
    background: rgba(var(--gray-100), 1);
    padding: 0.1rem 0.45rem;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgb(var(--gray-600));
}

.wg-reports-types__badge--export {
    background: rgba(var(--success-50), 1);
    color: rgba(var(--success-700), 1);
}

.wg-reports-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wg-reports-banner__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.65rem;
    background: rgba(var(--primary-50), 1);
    color: rgba(var(--primary-600), 1);
}

.wg-reports-loading {
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border-radius: 0.75rem;
    border: 1px dashed rgba(var(--gray-300), 1);
    padding: 2rem;
}

.wg-reports-table-wrap {
    border-radius: 0.75rem;
    border: 1px solid rgba(var(--gray-200), 1);
}

.dark .wg-reports-table-wrap {
    border-color: rgba(var(--gray-700), 1);
}

.wg-reports-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.wg-reports-table thead {
    background: rgba(var(--gray-50), 1);
}

.dark .wg-reports-table thead {
    background: rgba(var(--gray-800), 1);
}

.wg-reports-table th,
.wg-reports-table td {
    padding: 0.55rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(var(--gray-200), 1);
    white-space: nowrap;
}

.dark .wg-reports-table th,
.dark .wg-reports-table td {
    border-color: rgba(var(--gray-700), 1);
}

.wg-reports-table__sort {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgb(var(--gray-500));
}

.wg-reports-table__sort:hover {
    color: rgba(var(--primary-600), 1);
}

.wg-reports-table__row--clickable {
    cursor: pointer;
}

.wg-reports-table__row--clickable:hover {
    background: rgba(var(--primary-50), 0.55);
}

.wg-reports-table__empty {
    text-align: center;
    padding: 1.5rem !important;
    color: rgb(var(--gray-500));
}

.wg-reports-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    text-align: center;
}

.wg-reports-empty__icon {
    width: 2.5rem;
    height: 2.5rem;
    color: rgb(var(--gray-400));
}

.wg-reports-empty__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgb(var(--gray-800));
}

.wg-reports-empty__text {
    margin: 0;
    max-width: 28rem;
    font-size: 0.8rem;
    color: rgb(var(--gray-500));
}

@media print {
    .wg-reports-types,
    .fi-header-actions,
    .wg-reports-loading,
    form {
        display: none !important;
    }
}


