:root {
    --primary: #635bff;
    --bg: #050508;          /* Pure Deep Black */
    --card: #111118;        /* Dark Navy/Grey for cards */
    --border: #272730;      /* Subtle border */
    --text: #ffffff;        /* White text */
    --text-light: #94a3b8;  /* Dimmed text */
    --green: #10b981;
    --yellow: #f59e0b;
    --red: #ef4444;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 40px 20px;
}

.container { max-width: 700px; margin: 0 auto; }

header { text-align: center; margin-bottom: 40px; }
h1 { font-weight: 800; font-size: 2.5rem; margin-bottom: 10px; letter-spacing: -1px; }
#mid-market-display { color: #818cf8; font-weight: 600; font-size: 1.1rem; }

.calculator-card {
    background: var(--card);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.input-group { display: flex; gap: 12px; margin-top: 10px; }
input {
    flex: 1;
    padding: 14px;
    background: #000000;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1.1rem;
    color: white;
    outline-color: var(--primary);
}

/* Quote Cards with Heatmap Logic */
.quote-card {
    background: var(--card);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.quote-card:hover {
    transform: translateY(-2px);
    border-color: #3f3f46;
}

/* Heatmap Border Colors */
.quote-card.winner { border-left: 6px solid var(--green); }
.quote-card.fair { border-left: 6px solid var(--yellow); }
.quote-card.expensive { border-left: 6px solid var(--red); }

.provider-title { font-size: 1.3rem; font-weight: 700; color: #fff; }

.score-badge {
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-block;
    margin-bottom: 8px;
}

.landed-amount { font-size: 1.8rem; font-weight: 800; color: #fff; }

/* Savings Counter Banner */
#savings-counter {
    color: #fff;
    text-shadow: 0 0 15px rgba(99, 91, 255, 0.4);
}

/* Global Savings Footer */
.global-amount {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    margin: 10px 0;
    text-shadow: 0 0 30px rgba(99, 91, 255, 0.3);
}

/* Internal Card Details (Gray Box) */
.provider-metrics {
    background: #1a1a24;
    padding: 15px;
    border-radius: 10px;
    font-size: 0.85rem;
    border: 1px solid #27273a;
    line-height: 1.6;
    min-width: 180px;
}

/* Wise fee info icon + tooltip */
.fee-info-wrap {
    position: relative;
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
}
.fee-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 0.85rem;
    font-style: italic;
    font-weight: bold;
    color: #94a3b8;
    background: #27273a;
    border-radius: 50%;
    cursor: help;
}
.fee-info-wrap:hover .fee-info-icon {
    color: #cbd5e1;
    background: #374151;
}
.fee-tooltip {
    display: none;
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    min-width: 280px;
    max-width: 380px;
    padding: 12px 14px;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 0.8rem;
    line-height: 1.5;
    border-radius: 8px;
    border: 1px solid #334155;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 20;
    white-space: normal;
}
.fee-info-wrap:hover .fee-tooltip {
    display: block;
}

/* USDC side modal */
/* Beneficiary soft-deactivate confirmation (above side modals z-index: 999) */
.ben-deactivate-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10050;
    padding: 20px;
    box-sizing: border-box;
}
.ben-deactivate-dialog {
    width: 100%;
    max-width: 460px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 22px 24px 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.ben-deactivate-dialog-title {
    margin: 0 0 14px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #f1f5f9;
}
.ben-deactivate-dialog-body {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.55;
}
.ben-deactivate-dialog-body p {
    margin: 0 0 12px;
}
.ben-deactivate-dialog-body p:last-child {
    margin-bottom: 0;
}
.ben-deactivate-lead {
    color: #e2e8f0;
    font-weight: 500;
    font-size: 0.95rem;
}
.ben-deactivate-dialog-body strong {
    color: #f8fafc;
}
.ben-deactivate-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    padding-top: 4px;
}
.btn-ben-deactivate-cancel {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: #e2e8f0;
    border: 1px solid #475569;
    transition: background 0.15s, border-color 0.15s;
}
.btn-ben-deactivate-cancel:hover {
    background: rgba(148, 163, 184, 0.12);
    border-color: #64748b;
}
.btn-ben-deactivate-danger {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: #b91c1c;
    color: #fff;
    border: 1px solid #dc2626;
    transition: background 0.15s;
}
.btn-ben-deactivate-danger:hover {
    background: #991b1b;
}

.usdc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    z-index: 999;
}
/* Click target for “click outside to close” — not the full overlay (avoids accidental close after text selection). */
.usdc-modal-backdrop {
    flex: 1;
    min-width: 0;
    min-height: 100%;
    cursor: pointer;
}
.usdc-modal-panel {
    flex-shrink: 0;
    width: 360px;
    max-width: 100%;
    background: #020617;
    border-left: 1px solid #1e293b;
    padding: 20px 24px 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
.usdc-modal-close {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 1.5rem;
    align-self: flex-end;
    cursor: pointer;
}
.usdc-modal-content {
    overflow-y: auto;
    max-height: calc(100vh - 40px);
}
.usdc-modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}
.usdc-modal-sub {
    margin-top: 4px;
    color: #a5b4fc;
    font-size: 0.9rem;
}

.modal-welcome-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(99, 91, 255, 0.10);
    border: 1px solid rgba(99, 91, 255, 0.25);
    border-radius: 10px;
}

.modal-logout-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(99, 91, 255, 0.45);
    background: rgba(99, 91, 255, 0.18);
    color: #c7d2fe;
    cursor: pointer;
    font-weight: 600;
}

.modal-logout-btn:hover {
    background: rgba(99, 91, 255, 0.28);
}
.usdc-step {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #e5e7eb;
}
.usdc-step h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 600;
}
.usdc-helper,
.usdc-note,
.usdc-tip,
.usdc-subtext,
.usdc-warning {
    color: #9ca3af;
    font-size: 0.8rem;
    margin-top: 6px;
}
.usdc-warning {
    color: #facc15;
}
.usdc-info {
    color: #34d399;
    font-size: 0.85rem;
    margin: 8px 0;
}
.usdc-amount-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.85rem;
}
.usdc-amount-row button {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #4b5563;
    background: #020617;
    color: #e5e7eb;
    cursor: pointer;
    font-size: 0.8rem;
}
.usdc-field-label {
    display: block;
    margin-top: 10px;
    margin-bottom: 4px;
    font-size: 0.8rem;
    color: #9ca3af;
}
.usdc-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #020617;
    color: #e5e7eb;
    font-size: 0.9rem;
    box-sizing: border-box;
}
.usdc-estimate {
    margin-top: 6px;
}
.usdc-footer {
    margin-top: 24px;
    text-align: center;
}
.usdc-confirm-btn {
    width: 100%;
    padding: 10px 14px;
    border-radius: 999px;
    border: none;
    background: #22c55e; /* Circle route: green */
    color: #022c22;
    font-weight: 700;
    cursor: pointer;
}

.route-cta-btn {
    padding: 10px 16px;
    border-radius: 8px;
    margin-top: 8px;
    display: inline-block;
    border: none;
    background: #3b82f6; /* default blue for non-best options */
    color: #e5e7eb;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}
.route-cta-best {
    background: #22c55e;
    color: #022c22;
}
.usdc-cta-main {
    display: inline-block;
}
.usdc-cta-sub {
    display: inline-block;
    font-size: 0.85rem;
}

.usdc-link-btn {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: none;
    background: #22c55e; /* Circle route: green */
    color: #022c22;
    font-size: 0.85rem;
    cursor: pointer;
}

.stripe-confirm-btn {
    width: 100%;
    padding: 10px 14px;
    border-radius: 999px;
    border: none;
    background: #3b82f6; /* Stripe route: blue */
    color: #e5e7eb;
    font-weight: 700;
    cursor: pointer;
}

.stripe-link-btn {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: none;
    background: #3b82f6; /* Stripe route: blue */
    color: #e5e7eb;
    font-size: 0.85rem;
    cursor: pointer;
}

.wise-cta-btn {
    /* Inherit route-cta-btn base styles; this class is mainly semantic */
}

/* Nested tracking helper inside modal */
.usdc-track-modal {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
}
.usdc-track-panel {
    background: #020617;
    border-radius: 12px;
    border: 1px solid #1e293b;
    padding: 16px 18px 18px;
    max-width: 420px;
    width: 100%;
    box-sizing: border-box;
}
.usdc-track-close {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 1.2rem;
    float: right;
    cursor: pointer;
}
.usdc-track-content h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}
.usdc-track-steps {
    margin: 8px 0 12px 18px;
    font-size: 0.85rem;
    color: #e5e7eb;
}
.usdc-track-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ============================================================================
   Circle Recovery Flow Styles
   ============================================================================ */

.usdc-modal-wide {
    width: 480px;
    max-width: 95vw;
}

/* Step Indicator */
.circle-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    gap: 0;
}
.circle-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #27273a;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.circle-step-dot.active {
    background: #22c55e;
    color: #022c22;
}
.circle-step-line {
    width: 24px;
    height: 3px;
    background: #27273a;
    transition: background 0.2s;
}
.circle-step-line.active {
    background: #22c55e;
}

/* Auth Buttons */
.circle-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}
.circle-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #e5e7eb;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.circle-auth-btn:hover {
    background: #1e293b;
    border-color: #475569;
}
.circle-auth-btn.google:hover {
    border-color: #4285F4;
}
.circle-auth-btn.stripe:hover {
    border-color: #635bff;
}
.circle-auth-btn svg {
    flex-shrink: 0;
    display: block;
}

/* Dashboard Grid */
.circle-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
}
.circle-dashboard-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}
.circle-dashboard-label {
    display: block;
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.circle-dashboard-card strong {
    font-size: 1rem;
    color: #e5e7eb;
}

/* Beneficiary Form */
.circle-beneficiary-form {
    margin-top: 12px;
}
.form-row {
    margin-bottom: 14px;
}
.form-row label {
    display: block;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 5px;
    font-weight: 500;
}
.form-row label .required {
    color: #ef4444;
}
.form-row input,
.form-row select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #e5e7eb;
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #22c55e;
}
.form-row input::placeholder {
    color: #4b5563;
}
.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.form-row-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}
.form-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 8px;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Confirm Summary */
.circle-confirm-summary {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 16px;
    margin: 12px 0;
}
.circle-confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.9rem;
}
.circle-confirm-row span {
    color: #9ca3af;
}
.circle-confirm-row strong {
    color: #e5e7eb;
}
.circle-divider {
    border: none;
    border-top: 1px solid #27273a;
    margin: 8px 0;
}

/* Success Card */
.circle-success-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 16px 0;
}
.circle-success-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}
.circle-success-details {
    text-align: left;
}
.status-pending {
    color: #facc15;
}
.status-complete {
    color: #22c55e;
}

/* Buttons */
.circle-back-btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: transparent;
    color: #9ca3af;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.circle-back-btn:hover {
    background: #1e293b;
    color: #e5e7eb;
}
.circle-recover-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}
.circle-recover-btn:hover {
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}
.circle-logout-btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #374151;
    background: #1f2937;
    color: #9ca3af;
    font-size: 0.85rem;
    cursor: pointer;
    margin-left: 12px;
}
.circle-logout-btn:hover {
    background: #374151;
    color: #e5e7eb;
}
.circle-logout-link {
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
}
.circle-logout-link:hover {
    color: #ef4444;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer improvements for Circle flow */
.usdc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Beneficiary List */
.beneficiary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.beneficiary-list h3 {
    font-size: 1rem;
    color: #e5e7eb;
    margin-bottom: 8px;
}
.beneficiary-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 12px 16px;
    transition: border-color 0.2s;
}
.beneficiary-card:hover {
    border-color: #10b981;
}
.ben-card-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ben-card-main strong {
    color: #f3f4f6;
    font-size: 0.95rem;
}
.ben-bank, .ben-account {
    color: #9ca3af;
    font-size: 0.8rem;
}
.ben-select-btn {
    padding: 8px 16px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}
.ben-select-btn:hover {
    background: #059669;
}
.ben-delete-btn {
    padding: 8px 12px;
    background: #7f1d1d;
    color: #fecaca;
    border: 1px solid #b91c1c;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: background 0.2s;
}
.ben-delete-btn:hover {
    background: #991b1b;
}
.ben-link-btn {
    padding: 8px 12px;
    background: #1d4ed8;
    color: #dbeafe;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: background 0.2s;
}
.ben-link-btn:hover {
    background: #1e40af;
}
.add-new-ben-btn {
    padding: 12px;
    background: transparent;
    border: 1px dashed #4b5563;
    color: #9ca3af;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.2s, color 0.2s;
}
.add-new-ben-btn:hover {
    border-color: #10b981;
    color: #10b981;
}
.back-to-list-btn {
    background: transparent;
    border: none;
    color: #60a5fa;
    cursor: pointer;
    font-size: 0.85rem;
    margin-bottom: 12px;
    padding: 0;
}
.back-to-list-btn:hover {
    text-decoration: underline;
}

/* Transaction History */
.tx-history-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #374151;
}
.tx-history-section h3 {
    font-size: 0.95rem;
    color: #e5e7eb;
    margin-bottom: 12px;
}
.tx-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}
.tx-history-item {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 10px 12px;
}
.tx-row-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.tx-amount {
    font-weight: 600;
    color: #f3f4f6;
    font-size: 0.9rem;
}
.tx-status {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}
.status-pending {
    background: #fbbf24;
    color: #1f2937;
}
.status-complete {
    background: #10b981;
    color: #fff;
}
.status-failed {
    background: #ef4444;
    color: #fff;
}
.tx-row-details {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: #9ca3af;
}
.tx-row-utr {
    font-size: 0.7rem;
    color: #10b981;
    font-family: monospace;
    margin-top: 4px;
}
.tx-history-empty {
    color: #6b7280;
    font-size: 0.85rem;
    text-align: center;
    padding: 16px 0;
}

/* -------------------------------------------------------------------------- */
/* Unified Recovery Dashboard (dashboard.html)                                */
/* -------------------------------------------------------------------------- */
.dashboard-page-body {
    background: #0b0f1a;
    color: #e5e7eb;
    min-height: 100vh;
    margin: 0;
}
.dashboard-page .container {
    max-width: 960px;
}
.dashboard-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #1e293b;
}
.dashboard-header h1 {
    margin: 0 0 6px 0;
    font-size: 1.65rem;
}
.dashboard-sub {
    margin: 0;
    color: #94a3b8;
    font-size: 0.95rem;
}
.dashboard-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}
.dashboard-link-btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.dashboard-link-btn:hover {
    border-color: #6366f1;
    color: #a5b4fc;
}
.dashboard-link-btn-primary {
    background: #4f46e5;
    border-color: #6366f1;
    color: #fff;
}
.dashboard-link-btn-primary:hover {
    background: #6366f1;
    color: #fff;
}
.dashboard-gate-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 24px;
    max-width: 560px;
    margin: 0 auto;
}
.dashboard-gate-card h2 {
    margin-top: 0;
}
.dashboard-gate-hint a {
    color: #818cf8;
}
.dashboard-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
@media (max-width: 720px) {
    .dashboard-summary-grid {
        grid-template-columns: 1fr;
    }
}
.dashboard-summary-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
}
.dashboard-summary-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 8px;
}
.dashboard-summary-card strong {
    font-size: 1.25rem;
    color: #f8fafc;
}
.dashboard-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
    margin-bottom: 28px;
    padding: 16px;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 12px;
}
.dashboard-filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.75rem;
    color: #94a3b8;
}
.dashboard-filters input,
.dashboard-filters select {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #020617;
    color: #e5e7eb;
    font-size: 0.875rem;
}
.dashboard-section-title {
    font-size: 1.1rem;
    margin: 0 0 8px 0;
}
.dashboard-help {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0 0 16px 0;
}
.dashboard-empty {
    color: #64748b;
    text-align: center;
    padding: 32px;
}
.dashboard-ben-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dashboard-ben-card {
    border: 1px solid #1e293b;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
}
.dashboard-ben-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}
.dashboard-ben-head:hover {
    background: rgba(99, 102, 241, 0.08);
}
.dashboard-ben-name {
    font-weight: 700;
    flex: 1;
}
.dashboard-ben-total {
    font-weight: 700;
    color: #a5b4fc;
}
.dashboard-ben-meta {
    font-weight: 400;
    color: #64748b;
    font-size: 0.8rem;
}
.dashboard-ben-chevron {
    color: #64748b;
    font-size: 0.85rem;
}
.dashboard-ben-body {
    padding: 0 12px 16px 12px;
    border-top: 1px solid #1e293b;
}
.dashboard-tx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.dashboard-tx-table th,
.dashboard-tx-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #1e293b;
}
.dashboard-tx-table th {
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
}
.rail-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.85rem;
}
.rail-s {
    background: #1d4ed8;
    color: #fff;
}
.rail-c {
    background: #6d28d9;
    color: #fff;
}
.rail-u {
    background: #374151;
    color: #e5e7eb;
}
.status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}
.status-processing {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}
.status-success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}
.status-failed {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}
.btn-audit-cert {
    padding: 6px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
    border: 1px solid #6366f1;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}
.btn-audit-cert:hover {
    background: rgba(99, 102, 241, 0.3);
}
.dashboard-footer {
    text-align: center;
    padding: 40px 16px 24px;
    font-size: 0.8rem;
    color: #64748b;
}
.dashboard-footer a {
    color: #818cf8;
    text-decoration: none;
    margin: 0 12px;
}

/* Audit certificate modal */
/* `hidden` must win — otherwise display:flex keeps the empty modal visible */
.audit-cert-overlay[hidden] {
    display: none !important;
}
.audit-cert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 20000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
}
.audit-cert-dialog {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 14px;
    max-width: 640px;
    width: 100%;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}
.audit-cert-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #1e293b;
}
.audit-cert-print-root {
    padding: 20px 24px 28px;
}
.audit-cert-doc h1 {
    margin: 0 0 8px 0;
    font-size: 1.35rem;
}
.audit-cert-lead {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0 0 20px 0;
}
.audit-cert-kv {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.audit-cert-kv th {
    text-align: left;
    width: 38%;
    padding: 8px 10px 8px 0;
    color: #94a3b8;
    font-weight: 600;
    vertical-align: top;
    border-bottom: 1px solid #1e293b;
}
.audit-cert-kv td {
    padding: 8px 0;
    border-bottom: 1px solid #1e293b;
    color: #e5e7eb;
}
.audit-cert-footer {
    margin-top: 24px;
    font-size: 0.75rem;
    color: #64748b;
}

@media print {
    /* Hide everything except the certificate (do NOT put .no-print on #audit-cert-overlay — it would hide the PDF) */
    body {
        background: #fff !important;
    }
    body > *:not(#audit-cert-overlay) {
        display: none !important;
    }
    .audit-cert-overlay {
        position: static !important;
        inset: auto !important;
        display: block !important;
        background: #fff !important;
        padding: 0 !important;
        overflow: visible !important;
    }
    .audit-cert-dialog {
        background: #fff !important;
        color: #111 !important;
        border: none !important;
        box-shadow: none !important;
        max-width: none !important;
        border-radius: 0 !important;
    }
    .no-print,
    .audit-cert-toolbar {
        display: none !important;
    }
    .audit-cert-print-root {
        padding: 24px;
    }
    .audit-cert-doc h1,
    .audit-cert-kv th,
    .audit-cert-kv td,
    .audit-cert-lead,
    .audit-cert-footer {
        color: #000 !important;
    }
    .audit-cert-kv th,
    .audit-cert-kv td {
        border-color: #ccc !important;
    }
}
