:root {
    --kp-brand: #333652;
    --kp-brand-hover: #282b43;
    --kp-brand-soft: #ecedf2;
    --kp-text: #111827;
    --primary: 51, 54, 82;
}

a,
button,
.btn,
summary,
select {
    cursor: pointer;
}

.btn-primary,
.btn-primary-login {
    background-color: var(--kp-brand) !important;
    border-color: var(--kp-brand) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary-login:hover {
    background-color: var(--kp-brand-hover) !important;
    border-color: var(--kp-brand-hover) !important;
}

.text-primary,
.text-blue-600,
.hover\:text-blue-600:hover,
.admin-nav-link.is-active,
.admin-menu-trigger.is-active {
    color: var(--kp-brand) !important;
}

.bg-primary,
.bg-blue-700,
.peer:checked ~ .peer-checked\:bg-blue-600 {
    background-color: var(--kp-brand) !important;
}

.focus\:ring-blue-400:focus {
    --tw-ring-color: rgba(51, 54, 82, .35) !important;
}

.badge-primary {
    background-color: var(--kp-brand-soft) !important;
    color: var(--kp-brand) !important;
}

body div.dt-container .dt-paging .dt-paging-button.current,
body div.dt-container .dt-paging .dt-paging-button.current:hover,
body div.dt-container .dt-paging .dt-paging-button:hover {
    color: var(--kp-brand) !important;
    background: rgba(51, 54, 82, .08) !important;
}

.admin-header {
    background: #fff;
}

.admin-alert-success {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    background: #f0fdf4;
    color: #15803d;
    padding: 1rem;
    font-weight: 500;
}

.admin-alert-success i {
    color: #16a34a;
    font-size: 1rem;
}

.admin-header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 6rem;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 0;
    flex: 1 1 auto;
}

.admin-brand-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.admin-brand-logo {
    width: 168px;
    max-height: 58px;
    object-fit: contain;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    margin-left: auto;
    text-align: right;
    flex: 0 0 auto;
}

.admin-global-search-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    height: 2.55rem;
    padding: 0 0.9rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #f8fafc;
    color: #374151;
    font-weight: 650;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}

.admin-global-search-trigger:hover,
.admin-global-search-trigger:focus-visible {
    border-color: rgba(51, 54, 82, .25);
    background: #fff;
    color: var(--kp-brand);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    outline: none;
}

.btn.is-loading {
    cursor: wait;
    opacity: .78;
    pointer-events: none;
}

.btn-spinner {
    display: inline-block;
    width: 0.95em;
    height: 0.95em;
    margin-right: 0.45rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    vertical-align: -0.12em;
    animation: btn-spinner-spin .7s linear infinite;
}

.ajax-form-errors {
    border: 1px solid #fecaca;
    border-radius: .85rem;
    background: #fef2f2;
    color: #991b1b;
    padding: .85rem 1rem;
    font-size: .9rem;
}

.ajax-form-errors strong {
    display: block;
    margin-bottom: .35rem;
    color: #7f1d1d;
}

.ajax-form-errors ul {
    margin: 0;
    padding-left: 1.1rem;
}

.is-invalid-field {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, .16) !important;
}

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

.global-search-overlay[hidden] {
    display: none;
}

.global-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
}

.global-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .16);
    backdrop-filter: blur(8px);
}

.global-search-panel {
    position: relative;
    width: min(48rem, calc(100vw - 2rem));
    margin: clamp(5.5rem, 10vh, 8rem) auto 0;
    border: 1px solid rgba(226, 232, 240, .96);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
    overflow: hidden;
    animation: global-search-in .16s ease-out;
}

.global-search-box {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #eef2f7;
}

.global-search-box > i {
    color: var(--kp-brand);
    font-size: 1.1rem;
}

.global-search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111827;
    font-size: 1.08rem;
    font-weight: 600;
}

.global-search-box input::placeholder {
    color: #9ca3af;
    font-weight: 500;
}

.global-search-box button {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 999px;
    color: #64748b;
    transition: background-color .16s ease, color .16s ease;
}

.global-search-box button:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.global-search-helper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 1.1rem;
    color: #64748b;
    font-size: 0.82rem;
}

.global-search-helper kbd {
    border: 1px solid #e5e7eb;
    border-bottom-width: 2px;
    border-radius: 0.4rem;
    background: #f8fafc;
    color: #475569;
    padding: 0.08rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.global-search-results {
    max-height: min(34rem, calc(100vh - 14rem));
    overflow-y: auto;
    padding: 0.45rem 0.8rem 0.9rem;
}

.global-search-group {
    padding-top: 0.75rem;
}

.global-search-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.35rem 0.35rem;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.global-search-count {
    color: #94a3b8;
    font-weight: 700;
}

.global-search-item {
    display: grid;
    grid-template-columns: 2.55rem 1fr auto;
    gap: 0.75rem;
    align-items: center;
    border-radius: 0.85rem;
    padding: 0.72rem 0.75rem;
    color: #1f2937;
    text-decoration: none;
    transition: background-color .14s ease, transform .14s ease;
}

.global-search-item:hover,
.global-search-item:focus-visible {
    background: #f8fafc;
    color: #111827;
    outline: none;
    transform: translateY(-1px);
}

.global-search-icon {
    display: inline-grid;
    width: 2.45rem;
    height: 2.45rem;
    place-items: center;
    border-radius: 0.75rem;
    background: var(--kp-brand-soft);
    color: var(--kp-brand);
}

.global-search-title {
    color: #111827;
    font-weight: 750;
    line-height: 1.2;
}

.global-search-subtitle,
.global-search-meta {
    margin-top: 0.18rem;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.25;
}

.global-search-status {
    max-width: 10rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    padding: 0.28rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-align: right;
    text-transform: capitalize;
}

.global-search-empty,
.global-search-loading {
    display: grid;
    gap: 0.6rem;
    place-items: center;
    min-height: 10rem;
    color: #64748b;
    text-align: center;
}

.global-search-empty i,
.global-search-loading i {
    color: #cbd5e1;
    font-size: 1.75rem;
}

.global-search-loading i {
    color: var(--kp-brand);
}

@keyframes global-search-in {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.admin-clock {
    min-width: 12.5rem;
    padding-right: 1rem;
    font-size: 0.875rem;
    text-align: right;
}

.admin-user-summary {
    min-width: 9rem;
    border-left: 1px solid #d1d5db;
    padding-left: 1rem;
    text-align: right;
}

.admin-user-greeting {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.admin-profile-link {
    display: inline-grid;
    width: 1.9rem;
    height: 1.9rem;
    place-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    color: #4b5563;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.admin-profile-link:hover,
.admin-profile-link.is-active {
    border-color: var(--kp-brand);
    background: var(--kp-brand-soft);
    color: var(--kp-brand);
}

.admin-user-summary form,
.admin-user-summary button {
    width: 100%;
}

.admin-user-summary button {
    justify-content: flex-end;
}

.admin-nav-link,
.admin-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #374151;
    font-weight: 600;
    transition: background-color .15s ease, color .15s ease;
}

.admin-nav-link:hover,
.admin-menu-trigger:hover,
.admin-nav-link.is-active,
.admin-menu-trigger.is-active {
    background-color: #f3f4f6;
    color: var(--kp-brand);
}

.admin-menu {
    position: relative;
}

.admin-menu-panel {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 50;
    min-width: 12rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 14px 32px rgba(17, 24, 39, .12);
    padding: 0.35rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity .16s ease, transform .16s ease;
}

.admin-menu:hover .admin-menu-panel,
.admin-menu:focus-within .admin-menu-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.admin-menu-panel a {
    display: block;
    border-radius: 0.5rem;
    padding: 0.55rem 0.75rem;
    color: #374151;
    white-space: nowrap;
}

.admin-menu-panel a:hover,
.admin-menu-panel a.is-active {
    background: #f3f4f6;
    color: var(--kp-brand);
}

.presence-pill {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #667085;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
}

.presence-pill small {
    display: block;
    color: #98a2b3;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.35;
}

.presence-dot {
    width: 0.55rem;
    height: 0.55rem;
    min-width: 0.55rem;
    border-radius: 999px;
    background: #cbd5e1;
}

.presence-device-icon {
    color: currentColor;
    font-size: 0.85rem;
}

.presence-pill.is-online,
.presence-pill.is-active,
.presence-pill.is-recent {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.presence-pill.is-online .presence-dot,
.presence-pill.is-active .presence-dot,
.presence-pill.is-recent .presence-dot {
    background: #22c55e;
}

.presence-pill.is-online .presence-dot,
.presence-pill.is-active .presence-dot {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
    animation: presence-pulse 1.6s infinite;
}

.detail-card-header {
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 1.25rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.9rem;
    width: 100%;
}

.detail-card-title {
    flex: 1 1 18rem;
    min-width: 14rem;
}

.detail-card-actions,
.detail-card-button-row {
    align-items: center;
    display: flex;
    gap: 0.55rem;
}

.detail-card-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-left: auto;
    max-width: calc(100% - 16rem);
}

.detail-card-button-row {
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

.detail-card-actions .btn {
    flex: 0 0 auto;
    border-radius: 0.55rem;
    font-size: 0.86rem;
    gap: 0.35rem;
    line-height: 1.15;
    min-height: 2.35rem;
    padding: 0.46rem 0.65rem;
    white-space: nowrap;
}

.detail-card-actions .btn i {
    font-size: 0.9em;
}

.detail-card-actions .presence-pill {
    flex: 0 0 auto;
    font-size: 0.76rem;
    gap: 0.42rem;
    padding: 0.35rem 0.62rem;
    white-space: nowrap;
}

.detail-card-actions .presence-pill small {
    font-size: 0.66rem;
}

@media (max-width: 720px) {
    .detail-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-card-actions {
        align-items: flex-start;
        flex-wrap: wrap;
        justify-content: flex-start;
        margin-left: 0;
        max-width: 100%;
    }

    .detail-card-button-row {
        flex-wrap: wrap;
    }
}

@keyframes presence-pulse {
    70% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.admin-submenu {
    position: relative;
}

.admin-submenu-trigger {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-radius: 0.5rem;
    padding: 0.55rem 0.75rem;
    color: #374151;
    white-space: nowrap;
}

.admin-submenu-trigger:hover,
.admin-submenu-trigger.is-active {
    background: #f3f4f6;
    color: var(--kp-brand);
}

.admin-submenu-panel {
    position: absolute;
    top: -0.35rem;
    left: calc(100% + 0.35rem);
    z-index: 55;
    min-width: 13rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 14px 32px rgba(17, 24, 39, .12);
    padding: 0.35rem;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-6px);
    transition: opacity .16s ease, transform .16s ease;
}

.admin-submenu:hover .admin-submenu-panel,
.admin-submenu:focus-within .admin-submenu-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.login-shell {
    min-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.login-copyright {
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .48);
    padding: 1rem;
}

.modal-backdrop.is-open {
    display: flex;
}

.modal-backdrop-stacked {
    z-index: 120;
}

.modal-panel {
    width: min(780px, 100%);
    max-height: 90vh;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 0.875rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .22);
}

.modal-panel.modal-attention {
    animation: modal-attention 0.28s ease;
}

@keyframes modal-attention {
    0%, 100% { transform: translateX(0); box-shadow: 0 24px 80px rgba(15, 23, 42, .22); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); box-shadow: 0 24px 80px rgba(15, 23, 42, .22), 0 0 0 3px rgba(51, 54, 82, .16); }
    80% { transform: translateX(5px); }
}

.modal-panel-wide {
    width: min(1040px, 100%);
}

.audit-modal-panel {
    width: min(1180px, 100%);
}

.status-legend-modal {
    width: min(720px, 100%);
}

.status-help-button {
    padding-inline: 0.65rem;
}

.status-inline-help {
    align-items: center;
    background: #f2f4f7;
    border-radius: 999px;
    color: #333652;
    display: inline-flex;
    height: 1.75rem;
    justify-content: center;
    width: 1.75rem;
}

.status-inline-help:hover,
.status-inline-help:focus-visible {
    background: #e5e7eb;
    outline: none;
}

.status-legend-list {
    display: grid;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.status-legend-item {
    border: 1px solid #eef2f6;
    border-radius: 0.625rem;
    background: #f9fafb;
    padding: 0.875rem 1rem;
}

.status-legend-item div {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.status-legend-item strong {
    color: #111827;
    font-size: 0.9rem;
}

.status-legend-item code {
    color: #333652;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-legend-item p {
    color: #475467;
    font-size: 0.85rem;
    line-height: 1.45;
    margin-top: 0.35rem;
}

.permission-shell {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
}

.permission-all {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.permission-all small,
.permission-list small {
    display: block;
    color: #667085;
    font-size: 0.75rem;
    line-height: 1.2;
}

.permission-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0;
}

.permission-group {
    padding: 1rem;
    border-right: 1px solid #eef2f6;
    border-bottom: 1px solid #eef2f6;
}

.permission-group h4 {
    margin-bottom: 0.75rem;
    color: #111827;
    font-weight: 700;
}

.permission-list {
    display: grid;
    gap: 0.7rem;
}

.permission-list label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.875rem;
}

.permission-list input,
.permission-all input {
    margin-top: 0.2rem;
}

.custom-table {
    width: 100%;
    min-width: 100%;
    text-align: left;
    color: #475467;
    background: #fff;
}

.custom-table thead {
    background: #f9fafb;
    color: #667085;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.custom-table th,
.custom-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eef2f6;
    vertical-align: middle;
}

.custom-table tbody tr:hover {
    background: #f9fafb;
}

.audit-table td {
    vertical-align: top;
}

.audit-review-button {
    white-space: nowrap;
}

.audit-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.25rem 1.5rem;
}

.audit-modal-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 1rem 1.5rem;
}

.audit-modal-summary div {
    min-width: 0;
}

.audit-modal-summary span {
    display: block;
    margin-bottom: 0.5rem;
    color: #667085;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.audit-modal-summary strong {
    display: block;
    overflow-wrap: anywhere;
    color: #111827;
    font-size: 0.875rem;
    font-weight: 600;
}

.audit-json-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.audit-json-card {
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
    overflow: hidden;
}

.audit-json-card h4 {
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #111827;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.75rem 1rem;
}

.json-code {
    max-height: 26rem;
    overflow: auto;
    background: #0f172a;
    color: #d1d5db;
    font-size: 0.75rem;
    line-height: 1.45;
    padding: 1rem;
    white-space: pre;
}

.json-code code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.json-key {
    color: #93c5fd;
}

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

.json-number {
    color: #fbbf24;
}

.json-boolean {
    color: #c4b5fd;
}

.json-null,
.json-empty {
    color: #fca5a5;
    font-style: italic;
}

.filter-card {
    display: grid;
    gap: 1rem;
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    padding: 1rem;
}

.admin-page-stack {
    display: grid;
    gap: 1.5rem;
}

.mfa-option-card {
    display: grid;
    align-content: start;
    gap: 1rem;
    min-height: 13rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    padding: 1rem;
}

.mfa-qr-panel {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #f9fafb;
    padding: 0.85rem;
}

.mfa-qr-panel img {
    width: 150px;
    height: 150px;
    border-radius: 0.5rem;
    background: #fff;
}

.mfa-qr-panel code {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    border-radius: 0.4rem;
    background: #111827;
    color: #fff;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
}

.kpi-card {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    padding: 1rem;
    color: inherit;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.kpi-card:hover,
.kpi-card:focus-visible {
    border-color: #333652;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .08);
    transform: translateY(-1px);
}

.customer-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.audit-page {
    display: grid;
    gap: 1.5rem;
}

.filter-grid,
.audit-filter-grid,
.compact-filter-grid,
.transaction-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    align-items: end;
}

.audit-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-filter-grid {
    grid-template-columns: minmax(13rem, 1.2fr) minmax(13rem, 1.1fr) minmax(11rem, .9fr) auto;
}

.transaction-filter-grid {
    grid-template-columns: repeat(3, minmax(11rem, 1fr));
}

.filter-grid > div,
.audit-filter-grid > div,
.compact-filter-grid > div,
.transaction-filter-grid > div {
    position: relative;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.filter-actions .btn {
    min-height: 2.65rem;
    white-space: nowrap;
}

.amount-filter-control {
    min-width: 0;
}

.amount-filter-row {
    display: grid;
    grid-template-columns: minmax(5.5rem, .75fr) minmax(6.5rem, 1fr) minmax(6.5rem, 1fr);
    gap: 0.5rem;
}

.audit-filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-top: 0.25rem;
}

.compact-filter-actions {
    justify-content: flex-end;
}

.transaction-filter-grid .compact-filter-actions {
    grid-column: 1 / -1;
}

.checkbox-multiselect {
    position: relative;
}

.checkbox-multiselect-trigger {
    display: flex;
    min-height: 2.65rem;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    overflow: hidden;
    border: 1px solid #d0d5dd;
    border-radius: 0.5rem;
    background: #fff;
    color: #111827;
    font-size: 0.875rem;
    padding: 0.55rem 0.75rem;
    text-align: left;
}

.checkbox-multiselect-trigger span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkbox-multiselect-menu {
    position: absolute;
    z-index: 45;
    top: calc(100% + 0.4rem);
    left: 0;
    width: min(18rem, calc(100vw - 2rem));
    max-height: 18rem;
    overflow-y: auto;
    border: 1px solid #d0d5dd;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
    padding: 0.45rem;
}

.checkbox-multiselect-menu[hidden] {
    display: none;
}

.checkbox-multiselect-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: 0.45rem;
    color: #344054;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.55rem 0.6rem;
}

.checkbox-multiselect-option:hover {
    background: #f3f4f6;
}

.checkbox-multiselect-option input {
    accent-color: #333652;
}

.pagination-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-top: 1.5rem;
}

.pagination-summary {
    color: #667085;
    font-size: 0.875rem;
}

.js-date-range-picker {
    cursor: pointer;
    background-color: #fff;
}

button.js-date-range-picker {
    text-align: left;
}

.date-range-popover {
    position: absolute;
    z-index: 50;
    top: calc(100% + 0.5rem);
    left: 0;
    width: min(34rem, calc(100vw - 2rem));
    border: 1px solid #d0d5dd;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 20px 48px rgba(15, 23, 42, .18);
    padding: 0.9rem;
}

.date-range-popover[hidden] {
    display: none;
}

.date-range-presets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.date-range-presets button {
    border-radius: 0.5rem;
    color: #344054;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.55rem 0.6rem;
    text-align: left;
}

.date-range-presets button:hover {
    background: #ecedf2;
    color: #333652;
}

.date-range-custom {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid #eef2f6;
}

.date-range-custom label {
    color: #667085;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.date-range-custom input {
    width: 100%;
    margin-top: 0.35rem;
    border: 1px solid #d0d5dd;
    border-radius: 0.5rem;
    color: #111827;
    padding: 0.55rem 0.65rem;
}

.date-range-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.detail-tabs {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    overflow: hidden;
}

.detail-tab-list {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 0.75rem;
}

.detail-tab-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 0.5rem;
    color: #667085;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.6rem 0.85rem;
    white-space: nowrap;
}

.detail-tab-button.is-active {
    background: #fff;
    color: #333652;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}

.detail-tab-panel {
    padding: 1.25rem;
}

.detail-tab-panel[hidden] {
    display: none;
}

.address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.address-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #f9fafb;
    padding: 1rem;
}

.address-card h4 {
    margin-bottom: 0.65rem;
    color: #111827;
    font-size: 0.875rem;
    font-weight: 700;
}

.address-card p {
    color: #475467;
    font-size: 0.875rem;
    line-height: 1.45;
}

.profile-display-field {
    border: 1px solid #eef2f6;
    border-radius: 0.75rem;
    border-color: #e5e7eb;
    background: #f9fafb;
    padding: 0.9rem 1rem;
}

.profile-display-field p {
    margin-bottom: 0.35rem;
    color: #667085;
    font-size: 0.75rem;
    font-weight: 700;
}

.profile-display-field strong {
    color: #111827;
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.customer-facts {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
}

.customer-facts > div {
    display: grid;
    grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 0.72rem 1rem;
}

.customer-facts > div:nth-child(odd) {
    background: #f8fafc;
}

.customer-facts > div:nth-child(even) {
    background: #ffffff;
}

.customer-facts dt {
    color: #667085;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.customer-facts dd {
    margin: 0;
    color: #344054;
    font-size: 0.92rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.customer-facts dd .badge + .badge {
    margin-left: 0.35rem;
}

.program-template-grid {
    display: grid;
    gap: 0.85rem;
}

.program-template-row {
    align-items: end;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(12rem, 1fr) minmax(12rem, 1.15fr) minmax(12rem, 1.15fr);
    padding: 1rem;
}

.program-template-row strong,
.program-template-row span {
    display: block;
}

.program-template-row strong {
    color: #1f2937;
    font-size: 0.95rem;
    font-weight: 700;
}

.program-template-row span {
    color: #667085;
    font-size: 0.78rem;
}

.json-preview {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    border: 1px solid #1f2937;
    border-radius: 0.75rem;
    background: #0f172a;
    color: #f8fafc;
    padding: 1rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .program-template-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .customer-facts > div {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

.admin-timeline-card {
    margin-top: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #fff 0%, #f9fafb 100%);
    padding: 1.25rem;
}

.detail-tab-panel .admin-timeline-card {
    margin-top: 0;
}

.admin-timeline-head {
    align-items: flex-start;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
}

.timeline-filter-control {
    min-width: min(18rem, 100%);
}

.admin-timeline-head h3 {
    color: #111827;
    font-size: 1rem;
    font-weight: 700;
}

.admin-timeline-head p,
.admin-timeline-empty {
    color: #667085;
    font-size: 0.875rem;
}

.admin-timeline {
    display: grid;
    gap: 0.85rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-timeline-item {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: 0.9rem;
    min-height: 3.75rem;
    position: relative;
}

.admin-timeline-item:not(:last-child)::before {
    background: linear-gradient(180deg, #d0d5dd 0%, #e5e7eb 100%);
    bottom: -0.85rem;
    content: "";
    left: 1.075rem;
    position: absolute;
    top: 2.25rem;
    width: 2px;
}

.admin-timeline-marker {
    align-items: center;
    border: 2px solid #fff;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(16, 24, 40, .12);
    display: inline-flex;
    height: 2.25rem;
    justify-content: center;
    position: relative;
    width: 2.25rem;
    z-index: 1;
}

.admin-timeline-marker i {
    font-size: 0.8rem;
}

.admin-timeline-marker--info {
    background: #eef2ff;
    color: #333652;
}

.admin-timeline-marker--warning {
    background: #fffbeb;
    color: #b45309;
}

.admin-timeline-marker--success {
    background: #ecfdf3;
    color: #027a48;
}

.admin-timeline-marker--danger {
    background: #fef3f2;
    color: #b42318;
}

.admin-timeline-content {
    border: 1px solid #eef2f6;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 8px 18px rgba(16, 24, 40, .04);
    min-width: 0;
    padding: 0.85rem 1rem;
}

.admin-timeline-title {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: space-between;
}

.admin-timeline-title strong {
    color: #111827;
    font-size: 0.9rem;
}

.admin-timeline-title time {
    color: #667085;
    font-size: 0.75rem;
    white-space: nowrap;
}

.admin-timeline-content p {
    color: #475467;
    font-size: 0.85rem;
    line-height: 1.45;
    margin-top: 0.25rem;
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .admin-timeline-head {
        display: grid;
    }

    .timeline-filter-control {
        min-width: 0;
        width: 100%;
    }
}

.daterangepicker {
    border-color: #d0d5dd;
    border-radius: 0.75rem;
    box-shadow: 0 20px 48px rgba(15, 23, 42, .18);
    font-family: inherit;
}

.daterangepicker .ranges li.active,
.daterangepicker td.active,
.daterangepicker td.active:hover {
    background-color: #333652;
}

.daterangepicker .drp-buttons .btn {
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.45rem 0.75rem;
}

.daterangepicker .drp-buttons .applyBtn {
    border-color: #333652;
    background: #333652;
}

.daterangepicker .drp-buttons .cancelBtn {
    border-color: #d0d5dd;
    background: #fff;
    color: #344054;
}

.template-action-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
    white-space: nowrap;
}

.field-help-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.35rem;
}

.field-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    background: #fff;
    color: #667085;
    font-size: 0.625rem;
    font-weight: 800;
    line-height: 1;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.field-help:hover,
.field-help:focus-visible {
    border-color: #333652;
    background: #f8fafc;
    color: #333652;
    outline: none;
}

.field-inline-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #333652;
    font-size: 0.75rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.readonly-field {
    display: grid;
    gap: 0.25rem;
    min-height: 2.65rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #f8fafc;
    color: #344054;
    padding: 0.55rem 0.75rem;
}

.readonly-field strong {
    color: #111827;
    font-size: 0.875rem;
}

.readonly-field span {
    color: #667085;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.75rem;
}

.admin-floating-tooltip {
    position: fixed;
    z-index: 200;
    max-width: min(20rem, calc(100vw - 2rem));
    border-radius: 0.375rem;
    background: #111827;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    opacity: 0;
    padding: 0.45rem 0.6rem;
    pointer-events: none;
    text-align: left;
    transform: translateY(0.25rem);
    transition: opacity .12s ease, transform .12s ease;
    white-space: normal;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .2);
}

.admin-floating-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #344054;
    font-size: 0.875rem;
    font-weight: 700;
}

.toggle-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-switch > span:first-of-type {
    position: relative;
    display: inline-flex;
    width: 2.6rem;
    height: 1.45rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #d0d5dd;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08);
    transition: background .18s ease, box-shadow .18s ease;
}

.toggle-switch > span:first-of-type::after {
    content: "";
    position: absolute;
    top: 0.18rem;
    left: 0.18rem;
    width: 1.09rem;
    height: 1.09rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
    transition: transform .18s ease;
}

.toggle-switch input:checked + span:first-of-type {
    background: #333652;
}

.toggle-switch input:checked + span:first-of-type::after {
    transform: translateX(1.15rem);
}

.toggle-switch input:focus-visible + span:first-of-type {
    box-shadow: 0 0 0 3px rgba(51, 54, 82, .2);
}

.toggle-switch.is-loading {
    opacity: .65;
    pointer-events: none;
}

.toggle-switch-form {
    padding-top: 0.25rem;
}

.webhook-publish-toggle strong {
    min-width: 5.5rem;
    color: #344054;
    font-size: 0.8125rem;
}

.is-invalid-json {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .12) !important;
}

.is-valid-json {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .1) !important;
}

.template-view-content {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.template-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.template-meta-grid div,
.template-preview-card {
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
}

.template-meta-grid div {
    padding: 0.875rem 1rem;
    background: #f9fafb;
}

.template-meta-grid span,
.template-preview-card h4,
.template-change-list span {
    display: block;
    color: #667085;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.template-meta-grid strong {
    display: block;
    margin-top: 0.35rem;
    overflow-wrap: anywhere;
    color: #111827;
    font-size: 0.875rem;
    font-weight: 700;
}

.template-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.template-preview-card {
    overflow: hidden;
}

.template-preview-card h4 {
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 0.75rem 1rem;
}

.template-rendered-subject,
.template-rendered-body,
.template-source {
    padding: 1rem;
    color: #111827;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.template-rendered-body,
.template-source {
    white-space: pre-wrap;
}

.template-source {
    max-height: 20rem;
    overflow: auto;
    background: #f8fafc;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.template-email-frame {
    display: block;
    width: 100%;
    min-height: 22rem;
    border: 0;
    background: #fff;
}

.template-variable-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.65rem;
}

.template-variable-chip {
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    background: #fff;
    color: #333652;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.45rem 0.65rem;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.template-variable-chip:hover {
    border-color: #333652;
    background: #f8fafc;
}

.template-variable-chip.is-unavailable,
.template-variable-chip:disabled {
    cursor: not-allowed;
    border-color: #e5e7eb;
    background: #f8fafc;
    color: #98a2b3;
    opacity: 0.72;
}

.template-variable-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

.template-variable-list div {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.template-variable-list div.is-unavailable {
    background: #f8fafc;
    opacity: 0.62;
}

.webhook-variable-modal-list button {
    display: grid;
    gap: 0.35rem;
    width: 100%;
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.75rem;
    text-align: left;
}

.webhook-variable-modal-list button:hover,
.webhook-variable-modal-list button:focus-visible {
    border-color: #333652;
    background: #f8fafc;
    outline: none;
}

.template-variable-list code {
    display: block;
    color: #333652;
    font-size: 0.8125rem;
    font-weight: 700;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

.webhook-variable-modal-list code {
    display: block;
    color: #333652;
    font-size: 0.8125rem;
    font-weight: 800;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

.template-variable-list span,
.webhook-variable-modal-list span {
    color: #667085;
    font-size: 0.8125rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.webhook-review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.25rem;
}

.webhook-review-grid section {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
}

.webhook-review-grid h4 {
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #344054;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 0.75rem 1rem;
    text-transform: uppercase;
}

.json-review-block {
    max-height: 24rem;
    overflow: auto;
    background: #0f172a;
    color: #dbeafe;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8125rem;
    line-height: 1.55;
    padding: 1rem;
    white-space: pre-wrap;
}

.template-timeline {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.template-timeline-item {
    border-left: 3px solid #333652;
    padding-left: 0.875rem;
}

.template-timeline-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.template-timeline-head strong {
    color: #111827;
    font-size: 0.875rem;
}

.template-timeline-head span {
    color: #667085;
    font-size: 0.75rem;
}

.template-change-list {
    display: grid;
    gap: 0.5rem;
}

.template-change-list div {
    border: 1px solid #eef2f6;
    border-radius: 0.5rem;
    background: #f9fafb;
    padding: 0.65rem 0.75rem;
}

.template-change-list p {
    margin-top: 0.3rem;
    color: #111827;
    font-size: 0.8125rem;
    overflow-wrap: anywhere;
}

.section-toolbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
}

@media (min-width: 640px) {
    .section-toolbar {
        flex-direction: row;
        align-items: center;
    }

    .pagination-footer {
        flex-direction: row;
        align-items: center;
    }
}

.per-page-control {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.per-page-control .form-select {
    min-width: 6rem;
}

.live-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    border: 1px solid #bbf7d0;
    background: #ecfdf5;
    color: #047857;
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.live-status-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #10b981;
    animation: live-status-pulse 1.35s ease-in-out infinite;
}

@keyframes live-status-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.45;
        transform: scale(0.78);
    }
}

@keyframes live-row-enter {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes live-cell-pulse {
    0%, 100% {
        background: transparent;
    }

    50% {
        background: #ecfdf5;
    }
}

@keyframes live-row-edge-pulse {
    0%, 100% {
        box-shadow: inset 0 0 0 transparent;
    }

    50% {
        box-shadow: inset 4px 0 0 rgba(16, 185, 129, 0.55);
    }
}

@keyframes live-panel-pulse {
    0%, 100% {
        background: transparent;
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
    }

    50% {
        background: #ecfdf5;
        box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14);
    }
}

tr.live-row-flash {
    animation: live-row-enter 0.32s ease-out;
}

tr.live-row-flash > td {
    animation: live-cell-pulse 0.95s ease-in-out 5;
}

tr.live-row-flash > td:first-child {
    animation:
        live-cell-pulse 0.95s ease-in-out 5,
        live-row-edge-pulse 0.95s ease-in-out 5;
}

.live-row-flash:not(tr) {
    animation:
        live-row-enter 0.32s ease-out,
        live-panel-pulse 0.95s ease-in-out 5;
}

@media (prefers-reduced-motion: reduce) {
    .live-status-dot,
    tr.live-row-flash,
    tr.live-row-flash > td,
    tr.live-row-flash > td:first-child,
    .live-row-flash:not(tr) {
        animation: none;
    }

    tr.live-row-flash > td,
    tr.live-row-flash > td:first-child,
    .live-row-flash:not(tr) {
        background: transparent;
        box-shadow: inset 0 0 0 transparent;
    }
}

.sortable-th {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.sortable-th i {
    color: #98a2b3;
    font-size: 0.75rem;
    line-height: 1;
}

.sortable-th:hover,
.sortable-th.is-active {
    color: #333652;
}

.sortable-th.is-active i {
    color: #333652;
}

@media (max-width: 960px) {
    .customer-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .audit-filter-grid,
    .compact-filter-grid,
    .transaction-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compact-filter-actions,
    .transaction-filter-grid .compact-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .webhook-review-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .customer-kpi-grid {
        grid-template-columns: 1fr;
    }

    .audit-filter-grid,
    .compact-filter-grid,
    .transaction-filter-grid {
        grid-template-columns: 1fr;
    }

    .audit-filter-actions,
    .compact-filter-actions,
    .transaction-filter-grid .compact-filter-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 1100px) {
    .admin-header-inner {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .admin-header-left {
        flex-wrap: wrap;
    }

    .admin-header-actions {
        width: 100%;
    }

    .admin-global-search-trigger span {
        display: none;
    }

    .admin-global-search-trigger {
        width: 2.55rem;
        justify-content: center;
        padding: 0;
    }
}

@media (max-width: 640px) {
    .global-search-panel {
        width: calc(100vw - 1rem);
        margin-top: 1rem;
        border-radius: 0.85rem;
    }

    .global-search-box {
        gap: 0.6rem;
        padding: 0.85rem;
    }

    .global-search-box input {
        font-size: 0.95rem;
    }

    .global-search-helper {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.4rem;
    }

    .global-search-results {
        max-height: calc(100vh - 8.5rem);
        padding-inline: 0.45rem;
    }

    .global-search-item {
        grid-template-columns: 2.35rem 1fr;
    }

    .global-search-status {
        grid-column: 2;
        max-width: 100%;
        justify-self: start;
        text-align: left;
    }
}
