/* ============================================================
   PAGAMENTO NO AGENDAMENTO — CSS Estrutural
   Organizado por: layout, kpis, panels, config, explain,
   metrics, tables, modal, badges, mobile, dark theme
   ============================================================ */

/* ============================================================
   1. LAYOUT GERAL
   ============================================================ */

.pa-header-icon {
    margin-right: 10px;
    opacity: 0.7;
    font-size: 0.85em;
}

.pa-section {
    margin-top: 1.75rem;
}

.pa-alert-banner-wrap {
    background: transparent;
}

@media (max-width: 1549px) {
    .pa-main-grid > .pa-main-grid__config,
    .pa-main-grid > .pa-main-grid__invoice {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
}

/* ============================================================
   2. MODULE STATUS BADGE (HEADER)
   ============================================================ */

.pa-module-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    background: var(--bg-secondary, #f3f4f6);
    border: 1px solid var(--border-color, #e5e7eb);
    color: var(--text-secondary, #6b7280);
    transition: all 0.3s ease;
}

.pa-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    flex-shrink: 0;
    transition: background 0.3s ease;
}

/* States */
.pa-module-status-badge.is-active {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #059669;
}

.pa-module-status-badge.is-active .pa-status-dot {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: paPulse 2s infinite;
}

.pa-module-status-badge.is-inactive {
    background: rgba(156, 163, 175, 0.1);
    border-color: rgba(156, 163, 175, 0.3);
    color: #6b7280;
}

.pa-module-status-badge.is-suspended {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.pa-module-status-badge.is-suspended .pa-status-dot {
    background: #ef4444;
}

.pa-module-status-badge.is-pending {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #d97706;
}

.pa-module-status-badge.is-pending .pa-status-dot {
    background: #f59e0b;
}

@keyframes paPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

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

/* ============================================================
   3. KPI GRID
   ============================================================ */

.pa-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

@media (max-width: 1400px) {
    .pa-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .pa-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .pa-kpi-grid,
    .pa-kpi-grid--3cols {
        grid-template-columns: 1fr;
    }
}

.pa-kpi-grid--3cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .pa-kpi-grid--3cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

.pa-kpi-card {
    background: var(--surface-color, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 16px;
    padding: 1.25rem 1.25rem 1.125rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.pa-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.3s ease;
}

.pa-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.2);
}

/* KPI icon wraps */
.pa-kpi-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.pa-kpi-icon--status {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
}

.pa-kpi-icon--asaas {
    background: linear-gradient(135deg, #00b960, #00994d);
    color: #fff;
}

.pa-kpi-icon--volume {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.pa-kpi-icon--fee {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff;
}

.pa-kpi-icon--invoice {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.pa-kpi-icon--due {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

/* KPI body */
.pa-kpi-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.pa-kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pa-kpi-value {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-primary, #111827);
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pa-kpi-sub {
    font-size: 0.75rem;
    color: var(--text-secondary, #9ca3af);
    margin-top: 2px;
}

/* Value color helpers */
.pa-value--success {
    color: #10b981 !important;
}

.pa-value--warning {
    color: #f59e0b !important;
}

.pa-value--danger {
    color: #ef4444 !important;
}

.pa-value--muted {
    color: #9ca3af !important;
}

/* ============================================================
   4. PANELS (base card)
   ============================================================ */

.pa-panel {
    background: var(--surface-color, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

/* Panel Header */
.pa-panel-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.pa-panel-header--asaas {
    background: linear-gradient(135deg, rgba(0, 185, 96, 0.05) 0%, rgba(0, 153, 77, 0.02) 100%);
}

.pa-panel-header-left {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 0;
}

.pa-panel-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.pa-icon-asaas {
    background: linear-gradient(135deg, #00b960, #00994d);
    color: #fff;
}

.pa-icon-config {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
}

.pa-icon-metrics {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.pa-icon-invoice {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.pa-icon-history {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
}

.pa-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #111827);
    margin: 0;
    line-height: 1.3;
}

.pa-panel-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary, #6b7280);
    margin: 2px 0 0;
}

.pa-panel-header-actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
}

/* Panel Body */
.pa-panel-body {
    padding: 1.5rem;
    flex: 1;
}

/* Panel Footer */
.pa-panel-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary, #f9fafb);
    border-top: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.pa-panel-footer--centered {
    justify-content: center;
}

.pa-panel-footer-info {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary, #6b7280);
}

.pa-panel-footer-info.is-dirty {
    color: #9a3412;
}

.pa-panel-footer-info.is-dirty i {
    color: #f59e0b;
}

.pa-panel-footer-info.is-saved {
    color: #047857;
}

.pa-panel-footer-info.is-saved i {
    color: #10b981;
}

.pa-terms-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.92));
}

.pa-terms-summary {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    flex: 1;
}

.pa-terms-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    flex-shrink: 0;
}

.pa-terms-copy h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary, #111827);
}

.pa-terms-copy p {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: var(--text-secondary, #6b7280);
    max-width: 560px;
}

.pa-terms-actions {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pa-terms-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.22);
}

.pa-terms-pill i {
    font-size: 0.5rem;
}

.pa-terms-pill.is-accepted {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.2);
}

.pa-terms-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(16, 185, 129, 0.18);
    background: rgba(16, 185, 129, 0.08);
    color: #065f46;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.pa-terms-check--modal {
    margin-top: 0.25rem;
}

.pa-terms-check input {
    width: 18px;
    height: 18px;
    margin-top: 0.05rem;
    accent-color: #059669;
    flex-shrink: 0;
}

.pa-terms-card.is-disabled {
    opacity: 0.7;
}

.pa-terms-modal-content {
    border-radius: 24px;
    overflow: hidden;
}

.pa-terms-modal-header {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.28), transparent 42%),
        linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
}

.pa-terms-modal-header-icon {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.pa-terms-modal-header .pa-modal-title,
.pa-terms-modal-header .pa-modal-subtitle {
    color: #fff;
}

.pa-terms-modal-body {
    display: grid;
    gap: 1rem;
    padding-top: 1.25rem;
}

.pa-terms-hero {
    padding: 1.1rem 1.15rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(14, 165, 233, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.12);
}

.pa-terms-hero-kicker {
    display: inline-flex;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
}

.pa-terms-hero h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
}

.pa-terms-hero p {
    margin: 0.55rem 0 0;
    color: #475569;
    line-height: 1.55;
}

.pa-terms-grid {
    display: grid;
    gap: 0.85rem;
}

.pa-terms-topic {
    padding: 1rem 1.05rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: #fff;
}

.pa-terms-topic h4 {
    margin: 0 0 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
}

.pa-terms-topic h4 i {
    color: #2563eb;
}

.pa-terms-topic p {
    margin: 0;
    color: #475569;
    line-height: 1.5;
}

.pa-terms-note {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.04);
    color: #334155;
    font-size: 0.875rem;
    font-weight: 600;
}

.pa-terms-note i {
    color: #0f766e;
}

@media (max-width: 768px) {
    .pa-terms-card {
        flex-direction: column;
        align-items: stretch;
    }

    .pa-terms-actions {
        justify-content: space-between;
    }
}

/* ============================================================
   5. ASAAS INTEGRATION CARD
   ============================================================ */

/* Status chip inside panel header */
.pa-asaas-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    background: rgba(156, 163, 175, 0.1);
    border: 1px solid rgba(156, 163, 175, 0.3);
    color: #6b7280;
    flex-shrink: 0;
}

.pa-asaas-status-chip.is-valid {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #059669;
}

.pa-asaas-status-chip.is-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #d97706;
}

.pa-asaas-status-chip.is-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.pa-chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* State containers inside Asaas panel */
.pa-asaas-state {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.pa-asaas-state-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.pa-asaas-state-icon--success {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.pa-asaas-state-icon--warning {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.pa-asaas-state-icon--pending {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.pa-asaas-state-icon--error {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.pa-asaas-state-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #111827);
    margin: 0 0 0.375rem;
}

.pa-asaas-state-content p {
    font-size: 0.9rem;
    color: var(--text-secondary, #6b7280);
    margin: 0;
    line-height: 1.55;
}

/* Info chips inside validated state */
.pa-asaas-info-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pa-info-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pa-info-chip--green {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.pa-info-chip--blue {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.pa-info-chip--gray {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.pa-asaas-tariff-note {
    font-size: 0.8125rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.55;
    margin: 0;
    padding: 0.75rem 1rem;
    background: rgba(107, 114, 128, 0.05);
    border-radius: 10px;
    border-left: 3px solid rgba(107, 114, 128, 0.3);
}

.pa-inline-tooltip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.35rem;
    font-weight: 700;
    color: #2563eb;
    cursor: help;
    text-decoration: underline dotted;
    text-underline-offset: 0.18rem;
}

.pa-inline-tooltip::before {
    content: '\f05a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.8em;
}

/* ============================================================
   6. CONFIG CARD
   ============================================================ */

.pa-config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 0.375rem 0;
}

@media (max-width: 1380px) {
    .pa-config-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

.pa-config-row--stacked {
    align-items: flex-start;
    flex-direction: column;
}

.pa-config-info {
    flex: 1;
    min-width: 0;
}

.pa-config-label {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary, #111827);
    margin-bottom: 0.25rem;
}

.pa-config-desc {
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.5;
}

.pa-config-control {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

@media (max-width: 1380px) {
    .pa-config-control {
        align-items: flex-start;
        width: 100%;
    }
}

.pa-config-control--full {
    width: 100%;
    align-items: stretch;
}

.pa-config-divider {
    height: 1px;
    background: var(--border-color, #e5e7eb);
    margin: 1.25rem 0;
    opacity: 0.6;
}

.pa-professional-eligibility {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: #f8fafc;
    border-radius: 14px;
    padding: 0.875rem;
}

.pa-professional-empty {
    font-size: 0.85rem;
    color: #64748b;
    padding: 0.25rem 0;
}

.pa-professional-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .pa-professional-list {
        grid-template-columns: 1fr;
    }
}

.pa-professional-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.pa-professional-option:hover {
    border-color: rgba(79, 70, 229, 0.28);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.08);
    transform: translateY(-1px);
}

.pa-professional-option.is-selected {
    border-color: rgba(79, 70, 229, 0.34);
    background: rgba(79, 70, 229, 0.05);
}

.pa-professional-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.pa-professional-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: #312e81;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(79, 70, 229, 0.08));
    flex-shrink: 0;
}

.pa-professional-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.pa-professional-details {
    min-width: 0;
}

.pa-professional-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.pa-professional-subtitle {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.2rem;
    line-height: 1.35;
}

.pa-professional-toggle {
    width: 18px;
    height: 18px;
    accent-color: #4f46e5;
    flex-shrink: 0;
}

.pa-conditional-rule-card {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pa-conditional-rule-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pa-billing-mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

@media (max-width: 768px) {
    .pa-billing-mode-tabs {
        grid-template-columns: 1fr;
    }
}

.pa-billing-mode-tab {
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: #ffffff;
    border-radius: 16px;
    padding: 1rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.pa-billing-mode-tab:hover:not(:disabled) {
    border-color: rgba(79, 70, 229, 0.34);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.08);
    transform: translateY(-1px);
}

.pa-billing-mode-tab--active {
    border-color: rgba(79, 70, 229, 0.42);
    background: rgba(79, 70, 229, 0.05);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.12);
}

.pa-billing-mode-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pa-billing-mode-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.pa-billing-mode-subtitle {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
}

.pa-inline-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
}

.pa-chip-selector {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.pa-chip-btn {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: #ffffff;
    color: #334155;
    border-radius: 999px;
    padding: 0.65rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    transition: all 0.2s ease;
}

.pa-chip-btn:hover:not(:disabled) {
    border-color: rgba(79, 70, 229, 0.34);
    color: #4338ca;
    transform: translateY(-1px);
}

.pa-chip-btn--active {
    background: rgba(79, 70, 229, 0.09);
    border-color: rgba(79, 70, 229, 0.42);
    color: #4338ca;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.12);
}

.pa-chip-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.pa-chip-selector--weekdays .pa-chip-btn {
    min-width: 58px;
    justify-content: center;
}

.pa-field-help {
    font-size: 0.78rem;
    line-height: 1.45;
    color: #64748b;
}

.pa-pagination {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.pa-pagination-btn {
    min-width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: #ffffff;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    transition: all 0.2s ease;
}

.pa-pagination-btn:hover:not(:disabled) {
    border-color: rgba(79, 70, 229, 0.32);
    color: #4338ca;
    transform: translateY(-1px);
}

.pa-pagination-btn.is-active {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
    box-shadow: 0 10px 18px rgba(79, 70, 229, 0.18);
}

.pa-pagination-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pa-pagination-dots {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0 0.15rem;
}

.pa-empty-state--modal {
    margin: 0.75rem;
    border-radius: 16px;
    background: #ffffff;
}

.pa-modal-footer--pagination {
    justify-content: center;
    padding-top: 0.25rem;
}

/* Toggle switch */
.pa-toggle-wrap {
    width: 100%;
}

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

.pa-toggle-label {
    width: min(100%, 380px);
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.pa-toggle-label:hover {
    border-color: rgba(79, 70, 229, 0.24);
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.08);
    transform: translateY(-1px);
}

.pa-toggle-input:disabled ~ .pa-toggle-label {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.pa-toggle-track {
    width: 58px;
    height: 32px;
    padding: 3px;
    display: inline-flex;
    align-items: center;
    background: #dbe3ee;
    border-radius: 999px;
    position: relative;
    flex-shrink: 0;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.pa-toggle-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
    transition: transform 0.25s ease;
}

.pa-toggle-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    min-width: 0;
}

.pa-toggle-state {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
}

.pa-toggle-state-sub {
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.35;
}

.pa-toggle-input:checked ~ .pa-toggle-label {
    border-color: rgba(16, 185, 129, 0.34);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), rgba(236, 253, 245, 0.9));
}

.pa-toggle-input:checked ~ .pa-toggle-label .pa-toggle-track {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12);
}

.pa-toggle-input:checked ~ .pa-toggle-label .pa-toggle-thumb {
    transform: translateX(26px);
}

.pa-toggle-input:checked ~ .pa-toggle-label .pa-toggle-state {
    color: #047857;
}

/* Percent selector buttons */
.pa-percent-selector {
    display: flex;
    gap: 0.5rem;
}

.pa-percent-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    border: 2px solid var(--border-color, #e5e7eb);
    background: var(--bg-secondary, #f9fafb);
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.pa-percent-btn:hover:not(:disabled) {
    border-color: var(--primary-color, #0d6efd);
    color: var(--primary-color, #0d6efd);
    background: rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.05);
}

.pa-percent-btn--active {
    border-color: var(--primary-color, #0d6efd) !important;
    background: rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.08) !important;
    color: var(--primary-color, #0d6efd) !important;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.12);
}

.pa-percent-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pa-percent-num {
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1;
}

.pa-percent-desc {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.pa-payment-method-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    width: 100%;
}

@media (max-width: 768px) {
    .pa-payment-method-grid {
        grid-template-columns: 1fr;
    }
}

.pa-payment-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 16px;
    background: #ffffff;
    padding: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    outline: none;
    position: relative;
}

.pa-payment-option:hover {
    border-color: rgba(79, 70, 229, 0.28);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.08);
    transform: translateY(-1px);
}

.pa-payment-option.is-selected {
    border-color: rgba(79, 70, 229, 0.4);
    background: rgba(79, 70, 229, 0.05);
}

.pa-payment-option-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    transition: all 0.2s ease;
}

.pa-payment-option.is-selected .pa-payment-option-check {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.18);
}

.pa-payment-option.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pa-payment-option:focus-visible {
    border-color: rgba(79, 70, 229, 0.42);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.pa-payment-option-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pa-payment-option-main {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.pa-payment-option-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.pa-payment-option-icon--pix {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.pa-payment-option-icon--card {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.pa-payment-option-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pa-payment-option-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    margin-right: 2rem;
}

@media (max-width: 900px) {
    .pa-payment-option-side {
        align-items: flex-start;
        margin-right: 0;
    }

    .pa-payment-option {
        flex-direction: column;
        align-items: flex-start;
    }
}

.pa-payment-option-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.pa-payment-option-subtitle {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
}

.pa-payment-option-meta {
    font-size: 0.76rem;
    font-weight: 700;
    color: #475569;
    background: #f8fafc;
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    white-space: nowrap;
}

.pa-payment-option-status {
    display: none;
    font-size: 0.72rem;
    font-weight: 800;
    color: #4338ca;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.18);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pa-payment-option.is-selected .pa-payment-option-status {
    display: inline-flex;
}

.pa-btn-primary.is-dirty {
    animation: paPendingPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.35);
}

@keyframes paPendingPulse {
    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.24);
    }

    50% {
        transform: translateY(-1px);
        box-shadow: 0 0 0 8px rgba(79, 70, 229, 0);
    }
}

/* ============================================================
   7. EXPLANATORY CARD
   ============================================================ */

.pa-explain-card {
    background: var(--surface-color, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.pa-explain-card-header {
    padding: 1.375rem 1.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    background: linear-gradient(135deg, rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.06) 0%, transparent 100%);
}

.pa-explain-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.pa-explain-card-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #111827);
    margin: 0;
}

.pa-explain-body {
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.pa-explain-body>p {
    font-size: 0.9rem;
    color: var(--text-secondary, #4b5563);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Steps */
.pa-explain-steps {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
}

.pa-explain-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.pa-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #0d6efd), var(--primary-dark, #0a58ca));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.pa-step-text {
    font-size: 0.875rem;
    color: var(--text-secondary, #4b5563);
    line-height: 1.5;
}

/* Highlight box (MVP note) */
.pa-explain-highlight {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: rgba(107, 114, 128, 0.06);
    border-radius: 10px;
    border-left: 3px solid rgba(107, 114, 128, 0.3);
    margin-bottom: 1rem;
}

.pa-explain-highlight-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(107, 114, 128, 0.12);
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.pa-explain-highlight strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary, #374151);
    margin-bottom: 0.25rem;
}

.pa-explain-highlight p {
    font-size: 0.8125rem;
    color: var(--text-secondary, #6b7280);
    margin: 0;
    line-height: 1.5;
}

/* Fee box */
.pa-explain-fee-box {
    background: rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.05);
    border: 1px solid rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.12);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pa-fee-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--text-secondary, #6b7280);
}

.pa-fee-row+.pa-fee-row {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.1);
}

.pa-fee-value {
    font-weight: 700;
    color: var(--text-primary, #111827);
}

.pa-fee-value--highlight {
    color: #059669 !important;
}

/* ============================================================
   8. METRICS GRID
   ============================================================ */

.pa-metrics-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 1200px) {
    .pa-metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .pa-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .pa-metrics-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.pa-metric-item {
    padding: 1.375rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-right: 1px solid var(--border-color, #e5e7eb);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    transition: background 0.2s ease;
}

.pa-metric-item:hover {
    background: rgba(0, 0, 0, 0.012);
}

.pa-history-filters {
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    background: #f8fafc;
    padding: 1rem 1.5rem 1.1rem;
}

.pa-history-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

@media (max-width: 900px) {
    .pa-history-filter-grid {
        grid-template-columns: 1fr;
    }
}

.pa-history-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pa-history-filter-field label {
    font-size: 0.76rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pa-history-filter-select {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pa-history-filter-select:focus {
    border-color: rgba(79, 70, 229, 0.38);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.pa-history-filters-actions {
    margin-top: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.pa-history-filter-summary {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
}

.pa-btn-ghost--danger {
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.22);
}

.pa-btn-ghost--danger:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
}

/* Remove unnecessary borders based on grid layout */
.pa-metrics-grid .pa-metric-item:nth-child(6n) {
    border-right: none;
}

.pa-metrics-grid .pa-metric-item:nth-child(n+5) {
    border-bottom: none;
}

@media (max-width: 1200px) {
    .pa-metrics-grid .pa-metric-item:nth-child(6n) {
        border-right: 1px solid var(--border-color, #e5e7eb);
    }

    .pa-metrics-grid .pa-metric-item:nth-child(3n) {
        border-right: none;
    }

    .pa-metrics-grid .pa-metric-item:nth-child(n+5) {
        border-bottom: 1px solid var(--border-color, #e5e7eb);
    }

    .pa-metrics-grid .pa-metric-item:last-child,
    .pa-metrics-grid .pa-metric-item:nth-child(5),
    .pa-metrics-grid .pa-metric-item:nth-child(6) {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .pa-metrics-grid .pa-metric-item:nth-child(3n) {
        border-right: 1px solid var(--border-color, #e5e7eb);
    }

    .pa-metrics-grid .pa-metric-item:nth-child(2n) {
        border-right: none;
    }

    .pa-metrics-grid .pa-metric-item:nth-child(n+5) {
        border-bottom: none;
    }

    .pa-metrics-grid .pa-metric-item:nth-child(n+3) {
        border-bottom: none;
    }

    .pa-metrics-grid .pa-metric-item:nth-child(1),
    .pa-metrics-grid .pa-metric-item:nth-child(2),
    .pa-metrics-grid .pa-metric-item:nth-child(3),
    .pa-metrics-grid .pa-metric-item:nth-child(4) {
        border-bottom: 1px solid var(--border-color, #e5e7eb);
    }

    .pa-metrics-grid .pa-metric-item:nth-child(5),
    .pa-metrics-grid .pa-metric-item:nth-child(6) {
        border-bottom: none;
    }
}

.pa-metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    margin-bottom: 0.625rem;
}

.pa-metric-icon--blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.pa-metric-icon--green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.pa-metric-icon--purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.pa-metric-icon--orange {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.pa-metric-icon--teal {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.pa-metric-icon--red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.pa-metric-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.375rem;
    line-height: 1.3;
}

.pa-metric-value {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-primary, #111827);
    line-height: 1.2;
}

/* ============================================================
   9. TABLES
   ============================================================ */


.pa-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.pa-table thead th {
    background: var(--bg-secondary, #f9fafb);
    color: var(--text-secondary, #6b7280);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    white-space: nowrap;
}

.pa-table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    color: var(--text-primary, #374151);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.15s ease;
}

.pa-table tbody tr:last-child td {
    border-bottom: none;
}

.pa-table tbody tr:hover td {
    background: rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.025);
}

/* Date / time cell */
.pa-cell-datetime {
    display: flex;
    flex-direction: column;
}

.pa-cell-date {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-primary, #111827);
}

.pa-cell-time {
    font-size: 0.775rem;
    color: var(--text-secondary, #9ca3af);
    margin-top: 1px;
}

/* Client cell */
.pa-cell-client {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.pa-client-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.15), rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.08));
    color: var(--primary-color, #0d6efd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.pa-client-name {
    font-weight: 600;
    color: var(--text-primary, #111827);
    white-space: nowrap;
}

/* Pix amount */
.pa-cell-pix {
    display: flex;
    flex-direction: column;
}

.pa-pix-amount {
    font-weight: 700;
    color: #059669;
}

.pa-pix-percent {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 1px;
}

/* Status badges */
.pa-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.pa-badge--confirmed {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.pa-badge--pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.pa-badge--expired {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.pa-badge--cancelled {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.pa-badge--open {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.pa-badge--paid {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.pa-badge--overdue {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Table action buttons */
.pa-action-btn {
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.pa-action-btn--pix {
    background: rgba(50, 188, 173, 0.1);
    color: #1a9785;
    border: 1px solid rgba(50, 188, 173, 0.25);
}

.pa-action-btn--pix:hover {
    background: #32bcad;
    color: #fff;
    border-color: #32bcad;
}

/* Mobile cards (hidden on desktop, shown on mobile) */
.pa-mobile-cards {
    display: none;
    padding: 1rem;
    flex-direction: column;
    gap: 0.875rem;
}

@media (max-width: 768px) {
    .pa-table-wrap {
        display: none;
    }

    .pa-mobile-cards {
        display: flex;
    }
}

.pa-mobile-card {
    background: var(--bg-secondary, #f9fafb);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pa-mobile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.pa-mobile-card-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary, #111827);
}

.pa-mobile-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

.pa-mobile-card-label {
    color: var(--text-secondary, #6b7280);
    font-weight: 500;
}

.pa-mobile-card-value {
    font-weight: 600;
    color: var(--text-primary, #374151);
}

.pa-mobile-card-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

/* ============================================================
   10. EMPTY STATES
   ============================================================ */

.pa-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-secondary, #9ca3af);
}

.pa-empty-icon {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.pa-empty-state h4 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.pa-empty-state p {
    font-size: 0.9rem;
    color: #9ca3af;
    margin: 0;
    max-width: 360px;
    margin-inline: auto;
    line-height: 1.5;
}

/* ============================================================
   11. SEARCH + SELECT
   ============================================================ */

.pa-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pa-search-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--text-secondary, #9ca3af);
    font-size: 0.8rem;
    pointer-events: none;
}

.pa-search-input {
    padding: 0.5rem 0.875rem 0.5rem 2.125rem;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--bg-secondary, #f9fafb);
    color: var(--text-primary, #374151);
    font-size: 0.875rem;
    width: 200px;
    transition: all 0.2s ease;
    outline: none;
}

.pa-search-input:focus {
    border-color: var(--primary-color, #0d6efd);
    box-shadow: 0 0 0 3px rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.1);
    background: #fff;
    width: 240px;
}

@media (max-width: 640px) {
    .pa-search-input {
        width: 130px;
    }

    .pa-search-input:focus {
        width: 160px;
    }
}

.pa-select-sm {
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--bg-secondary, #f9fafb);
    color: var(--text-primary, #374151);
    font-size: 0.8125rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pa-select-sm:focus {
    border-color: var(--primary-color, #0d6efd);
    box-shadow: 0 0 0 3px rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.1);
}

/* ============================================================
   12. BUTTONS
   ============================================================ */

.pa-btn-primary {
    background: linear-gradient(135deg, var(--primary-color, #0d6efd), var(--primary-dark, #0a58ca));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.pa-btn-primary:hover:not(:disabled) {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.3);
    color: #fff;
}

.pa-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pa-btn-secondary {
    background: rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.1);
    color: var(--primary-color, #0d6efd);
    border: 1px solid rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.2);
    border-radius: 10px;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.pa-btn-secondary:hover:not(:disabled) {
    background: rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.15);
    transform: translateY(-1px);
    color: var(--primary-color, #0d6efd);
}

.pa-btn-ghost {
    background: transparent;
    color: var(--text-secondary, #6b7280);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 0.4rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.pa-btn-ghost:hover {
    background: var(--bg-secondary, #f3f4f6);
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-primary, #374151);
}

/* ============================================================
   13. MODAL: QR CODE PIX
   ============================================================ */

.pa-modal-dialog {
    max-width: 520px;
    width: 100%;
}

.pa-modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
}

/* Modal Header */
.pa-modal-header {
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #fff;
    padding: 1.375rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pa-modal-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.pa-modal-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.pa-modal-subtitle {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 2px 0 0;
}

.pa-modal-close {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.875rem;
    margin-left: auto;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.pa-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Modal Body */
.pa-modal-body {
    padding: 1.5rem;
    background: var(--surface-color, #fff);
}

#modalAllInvoices .pa-modal-content {
    max-height: min(88vh, 920px);
}

#modalAllInvoices .pa-modal-body {
    max-height: min(68vh, 720px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Invoice summary in modal */
.pa-invoice-summary {
    background: var(--bg-secondary, #f9fafb);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1rem 1.125rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pa-invoice-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
}

.pa-invoice-row strong {
    color: var(--text-primary, #111827);
    font-weight: 600;
}

.pa-invoice-row--divider {
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color, #e5e7eb);
}

.pa-invoice-row--total {
    padding-top: 0.5rem;
    padding-bottom: 0.25rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
    font-weight: 700;
}

.pa-invoice-row--due {
    font-size: 0.8125rem;
    color: #9ca3af;
}

.pa-invoice-total-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0d6efd !important;
}

/* QR code section */
.pa-qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pa-qr-container {
    position: relative;
}

.pa-qr-placeholder {
    position: relative;
    display: inline-block;
}

.pa-qr-svg {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    padding: 6px;
    background: #fff;
    border: 1.5px solid var(--border-color, #e5e7eb);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    display: block;
}

.pa-qr-center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 6px;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.pa-qr-label {
    font-size: 0.8125rem;
    color: var(--text-secondary, #6b7280);
    text-align: center;
    margin: 0;
}

/* Copy Pix code row */
.pa-pix-copy-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 440px;
}

.pa-pix-code-input {
    flex: 1;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--bg-secondary, #f9fafb);
    color: var(--text-secondary, #6b7280);
    font-size: 0.8rem;
    font-family: monospace;
    outline: none;
    cursor: text;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pa-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    border: 1px solid rgba(50, 188, 173, 0.35);
    background: rgba(50, 188, 173, 0.08);
    color: #1a9785;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pa-copy-btn:hover {
    background: #32bcad;
    border-color: #32bcad;
    color: #fff;
}

.pa-copy-btn.copied {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

/* Polling status */
.pa-polling-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 440px;
    padding: 0.625rem 0.875rem;
    background: rgba(245, 158, 11, 0.07);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
}

.pa-polling-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #d97706;
}

.pa-polling-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    animation: paPollingBlink 1.4s ease-in-out infinite;
}

@keyframes paPollingBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.25;
    }
}

.pa-polling-status.is-confirmed .pa-polling-indicator {
    color: #059669;
}

.pa-polling-status.is-confirmed .pa-polling-dot {
    background: #10b981;
    animation: none;
}

.pa-polling-status.is-confirmed {
    background: rgba(16, 185, 129, 0.07);
    border-color: rgba(16, 185, 129, 0.25);
}

.pa-polling-timer {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary, #9ca3af);
    font-variant-numeric: tabular-nums;
}

/* Modal Footer */
.pa-modal-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary, #f9fafb);
    border-top: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ============================================================
   14. DARK THEME
   ============================================================ */

.theme-dark .pa-kpi-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.theme-dark .pa-kpi-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(var(--primary-r, 13), var(--primary-g, 110), var(--primary-b, 253), 0.3);
}

.theme-dark .pa-kpi-label,
.theme-dark .pa-kpi-sub,
.theme-dark .pa-panel-subtitle,
.theme-dark .pa-config-desc,
.theme-dark .pa-metric-label {
    color: rgba(255, 255, 255, 0.55);
}

.theme-dark .pa-kpi-value,
.theme-dark .pa-panel-title,
.theme-dark .pa-config-label,
.theme-dark .pa-metric-value {
    color: rgba(255, 255, 255, 0.92);
}

.theme-dark .pa-panel,
.theme-dark .pa-explain-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.09);
}

.theme-dark .pa-panel-header,
.theme-dark .pa-explain-card-header,
.theme-dark .pa-panel-footer,
.theme-dark .pa-panel-body,
.theme-dark .pa-explain-body {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.85);
}

.theme-dark .pa-table thead th {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.07);
}

.theme-dark .pa-table tbody td {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.06);
}

.theme-dark .pa-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

.theme-dark .pa-metric-item {
    border-color: rgba(255, 255, 255, 0.07);
}

.theme-dark .pa-metric-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.theme-dark .pa-modal-content {
    background: #1f2937;
}

.theme-dark .pa-modal-body,
.theme-dark .pa-modal-footer {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.09);
}

.theme-dark .pa-invoice-summary {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.09);
}

.theme-dark .pa-invoice-empty-beautiful,
.theme-dark .pa-empty-state--modal,
.theme-dark .pa-inv-card,
.theme-dark .pa-professional-option,
.theme-dark .pa-billing-mode-tab,
.theme-dark .pa-chip-btn,
.theme-dark .pa-toggle-label,
.theme-dark .pa-conditional-rule-card,
.theme-dark .pa-professional-eligibility,
.theme-dark .pa-history-filters,
.theme-dark .pa-history-filter-select,
.theme-dark .pa-search-wrap,
.theme-dark .pa-search-input,
.theme-dark .pa-select-sm,
.theme-dark .pa-terms-card,
.theme-dark .pa-terms-topic,
.theme-dark .pa-terms-note,
.theme-dark .pa-terms-hero {
    box-shadow: none;
}

.theme-dark .pa-invoice-row {
    color: rgba(255, 255, 255, 0.55);
}

.theme-dark .pa-invoice-row strong {
    color: rgba(255, 255, 255, 0.9);
}

.theme-dark .pa-inv-card {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(17, 24, 39, 0.96));
    border-color: rgba(255, 255, 255, 0.08);
}

.theme-dark .pa-inv-card:hover {
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.theme-dark .pa-inv-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.theme-dark .pa-inv-card-header--open {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), transparent);
}

.theme-dark .pa-inv-card-header--paid {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), transparent);
}

.theme-dark .pa-inv-card-header--overdue {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), transparent);
}

.theme-dark .pa-inv-card-title,
.theme-dark .pa-inv-card-amount h2,
.theme-dark .pa-inv-detail-value,
.theme-dark .pa-mobile-card-title,
.theme-dark .pa-mobile-card-value,
.theme-dark .pa-client-name,
.theme-dark .pa-cell-date,
.theme-dark .pa-professional-name,
.theme-dark .pa-billing-mode-title,
.theme-dark .pa-inline-label,
.theme-dark .pa-toggle-state {
    color: rgba(255, 255, 255, 0.92);
}

.theme-dark .pa-inv-card-title i,
.theme-dark .pa-inv-card-status,
.theme-dark .pa-inv-card-amount span,
.theme-dark .pa-inv-detail-label,
.theme-dark .pa-mobile-card-label,
.theme-dark .pa-cell-time,
.theme-dark .pa-pix-percent,
.theme-dark .pa-professional-subtitle,
.theme-dark .pa-billing-mode-subtitle,
.theme-dark .pa-field-help,
.theme-dark .pa-history-filter-summary,
.theme-dark .pa-history-filter-field label,
.theme-dark .pa-toggle-state-sub {
    color: rgba(255, 255, 255, 0.6);
}

.theme-dark .pa-inv-card-details,
.theme-dark .pa-invoice-empty-beautiful,
.theme-dark .pa-empty-state--modal,
.theme-dark .pa-professional-eligibility,
.theme-dark .pa-history-filters,
.theme-dark .pa-conditional-rule-card,
.theme-dark .pa-terms-card {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(255, 255, 255, 0.08);
}

.theme-dark .pa-professional-option,
.theme-dark .pa-billing-mode-tab,
.theme-dark .pa-chip-btn,
.theme-dark .pa-history-filter-select,
.theme-dark .pa-search-wrap,
.theme-dark .pa-toggle-label,
.theme-dark .pa-terms-topic,
.theme-dark .pa-terms-note,
.theme-dark .pa-terms-hero,
.theme-dark .pa-mobile-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-dark .pa-professional-option:hover,
.theme-dark .pa-billing-mode-tab:hover:not(:disabled),
.theme-dark .pa-chip-btn:hover:not(:disabled) {
    border-color: rgba(99, 102, 241, 0.42);
    background: rgba(99, 102, 241, 0.12);
    color: rgba(255, 255, 255, 0.95);
}

.theme-dark .pa-professional-option.is-selected,
.theme-dark .pa-billing-mode-tab--active,
.theme-dark .pa-chip-btn--active {
    background: rgba(79, 70, 229, 0.18);
    border-color: rgba(129, 140, 248, 0.46);
    color: #c7d2fe;
    box-shadow: 0 14px 26px rgba(30, 41, 59, 0.28);
}

.theme-dark .pa-history-filter-select:focus,
.theme-dark .pa-search-input:focus,
.theme-dark .pa-select-sm:focus {
    border-color: rgba(129, 140, 248, 0.48);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16);
}

.theme-dark .pa-professional-avatar,
.theme-dark .pa-client-avatar {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.28), rgba(59, 130, 246, 0.14));
    color: #e0e7ff;
}

.theme-dark .pa-table-wrap,
.theme-dark .table-responsive.pa-table-wrap,
.theme-dark #historyTable,
.theme-dark #historyTable.table,
.theme-dark #historyTable tbody,
.theme-dark #historyTable tr,
.theme-dark #historyTable td,
.theme-dark #historyTable th {
    background-color: transparent;
}

.theme-dark .pa-table thead th {
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.56);
    border-color: rgba(255, 255, 255, 0.07);
}

.theme-dark .pa-table tbody td {
    color: rgba(255, 255, 255, 0.82);
    border-color: rgba(255, 255, 255, 0.06);
}

.theme-dark .pa-table tbody tr:hover td {
    background: rgba(79, 70, 229, 0.08);
}

.theme-dark .pa-cell-pix,
.theme-dark .pa-cell-datetime,
.theme-dark .pa-cell-client {
    background: transparent;
}

.theme-dark .pa-pix-amount {
    color: #6ee7b7;
}

.theme-dark .pa-badge--cancelled {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}

.theme-dark .pa-badge--expired,
.theme-dark .pa-badge--overdue {
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
}

.theme-dark .pa-badge--confirmed,
.theme-dark .pa-badge--paid {
    background: rgba(16, 185, 129, 0.16);
    color: #6ee7b7;
}

.theme-dark .pa-badge--open {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
}

.theme-dark .pa-badge--pending {
    background: rgba(245, 158, 11, 0.16);
    color: #fcd34d;
}

.theme-dark .pa-pagination-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.74);
}

.theme-dark .pa-pagination-btn.is-active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-color: transparent;
    color: #fff;
}

.theme-dark .pa-empty-state,
.theme-dark .pa-empty-state p,
.theme-dark .pa-empty-illustration,
.theme-dark .pa-empty-icon {
    color: rgba(255, 255, 255, 0.45);
}

.theme-dark .pa-empty-state h4,
.theme-dark .pa-invoice-empty-beautiful h4 {
    color: rgba(255, 255, 255, 0.88);
}

.theme-dark .pa-terms-pill {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.26);
}

.theme-dark .pa-terms-pill.is-accepted {
    background: rgba(16, 185, 129, 0.16);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.24);
}

.theme-dark .pa-terms-copy h4,
.theme-dark .pa-terms-hero h3,
.theme-dark .pa-terms-topic h4 {
    color: rgba(255, 255, 255, 0.93);
}

.theme-dark .pa-terms-copy p,
.theme-dark .pa-terms-hero p,
.theme-dark .pa-terms-topic p,
.theme-dark .pa-terms-note {
    color: rgba(255, 255, 255, 0.68);
}

.theme-dark .pa-terms-hero-kicker,
.theme-dark .pa-terms-topic h4 i,
.theme-dark .pa-terms-note i {
    color: #93c5fd;
}

.theme-dark .pa-terms-modal-content {
    background: #111827;
}

.theme-dark .pa-terms-modal-body,
.theme-dark .pa-terms-modal-footer {
    background: linear-gradient(180deg, #111827, #0f172a);
}

.theme-dark .pa-toggle-label {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(15, 23, 42, 0.9));
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-dark .pa-toggle-track {
    background: rgba(148, 163, 184, 0.28);
}

.theme-dark .pa-toggle-input:checked ~ .pa-toggle-label {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.16), rgba(6, 78, 59, 0.38));
    border-color: rgba(16, 185, 129, 0.34);
}

.theme-dark .pa-toggle-input:checked ~ .pa-toggle-label .pa-toggle-track {
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.16);
}

.theme-dark .pa-toggle-thumb {
    background: #f8fafc;
}

.theme-dark .pa-single-invoice-card {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(17, 24, 39, 0.98)) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26) !important;
}

.theme-dark .pa-single-invoice-card [style*="color:#111827"],
.theme-dark .pa-single-invoice-card [style*="color: #111827"],
.theme-dark .pa-single-invoice-card [style*="color:#333"],
.theme-dark .pa-single-invoice-card [style*="color: #333"] {
    color: rgba(255, 255, 255, 0.92) !important;
}

.theme-dark .pa-single-invoice-card [style*="color:#6b7280"],
.theme-dark .pa-single-invoice-card [style*="color: #6b7280"],
.theme-dark .pa-single-invoice-card [style*="color:#4b5563"],
.theme-dark .pa-single-invoice-card [style*="color: #4b5563"],
.theme-dark .pa-single-invoice-card [style*="color:#64748b"],
.theme-dark .pa-single-invoice-card [style*="color: #64748b"] {
    color: rgba(255, 255, 255, 0.62) !important;
}

.theme-dark .pa-single-invoice-card [style*="background:#fff"],
.theme-dark .pa-single-invoice-card [style*="background: #fff"],
.theme-dark .pa-single-invoice-card [style*="background:rgba(243,244,246,0.8)"],
.theme-dark .pa-single-invoice-card [style*="background: rgba(243,244,246,0.8)"] {
    background: rgba(255, 255, 255, 0.05) !important;
}

.theme-dark .pa-single-invoice-card [style*="border-top:1px dashed #e5e7eb"],
.theme-dark .pa-single-invoice-card [style*="border-top: 1px dashed #e5e7eb"] {
    border-top: 1px dashed rgba(255, 255, 255, 0.1) !important;
}

.theme-dark .pa-single-invoice-card .btn {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.theme-dark .pa-main-grid__invoice h4,
.theme-dark .pa-main-grid__invoice h4[style] {
    color: rgba(255, 255, 255, 0.92) !important;
}

.theme-dark .pa-main-grid__invoice h4 i,
.theme-dark .pa-main-grid__invoice h4 i[style] {
    color: rgba(255, 255, 255, 0.62) !important;
}

.theme-dark .pa-inv-card .btn-dark,
.theme-dark .pa-inv-card [style*="background:#f0fdf4"],
.theme-dark .pa-inv-card [style*="background: #f0fdf4"],
.theme-dark .pa-inv-card [style*="background:#f8fafc"],
.theme-dark .pa-inv-card [style*="background: #f8fafc"] {
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.84) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.theme-dark .pa-inv-card .btn-dark:hover {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #eef2ff !important;
}

.theme-dark .pa-qr-svg {
    background: #fff;
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-dark .pa-pix-code-input {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
}

.theme-dark .pa-search-input,
.theme-dark .pa-select-sm {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
}

.theme-dark .pa-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
}

.theme-dark .pa-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.theme-dark .pa-percent-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
}

.theme-dark .pa-config-divider {
    background: rgba(255, 255, 255, 0.07);
}

.theme-dark .pa-module-status-badge {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
}

.theme-dark .pa-mobile-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.09);
}

.theme-dark .pa-explain-steps .pa-step-text,
.theme-dark .pa-explain-body>p {
    color: rgba(255, 255, 255, 0.65);
}

.theme-dark .pa-explain-highlight {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-dark .pa-asaas-tariff-note {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.55);
}

.theme-dark .pa-polling-status {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

.theme-dark .pa-empty-state h4 {
    color: rgba(255, 255, 255, 0.5);
}

.theme-dark .pa-empty-icon {
    color: rgba(255, 255, 255, 0.15);
}

/* ============================================================
   15. RESPONSIVE EXTRAS
   ============================================================ */

@media (max-width: 768px) {
    .pa-panel-header {
        padding: 1rem 1.125rem;
    }

    .pa-panel-body {
        padding: 1.125rem;
    }

    .pa-panel-footer {
        padding: 0.875rem 1.125rem;
        flex-direction: column;
        align-items: stretch;
    }

    .pa-panel-footer .pa-btn-primary {
        width: 100%;
        justify-content: center;
    }

    .pa-panel-footer-info {
        justify-content: center;
        text-align: center;
    }

    .pa-modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }

    .pa-qr-svg {
        width: 170px;
        height: 170px;
    }

    .pa-explain-card {
        height: auto;
    }
}

@media (max-width: 480px) {
    .pa-kpi-card {
        padding: 1rem;
    }

    .pa-kpi-value {
        font-size: 1.125rem;
    }

    .pa-pix-copy-row {
        flex-direction: column;
    }

    .pa-copy-btn {
        width: 100%;
        justify-content: center;
    }

    .pa-panel-header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .pa-search-input {
        width: 100%;
    }

    .pa-search-input:focus {
        width: 100%;
    }
}

/* ============================================================
   NEW COMPONENTS: INVOICE CARDS & SPLASH MODAL
   ============================================================ */

/* Invoice Modern Panel */
.invoice-panel-modern {
    background: transparent;
    border: none;
    box-shadow: none;
}
.pa-invoice-panel-header {
    background: transparent;
    border-bottom: none;
    padding: 0 0 1.5rem 0;
}
.pa-icon-invoice-modern {
    background: linear-gradient(135deg, #111827, #374151);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.125rem;
    flex-shrink: 0;
}
.btn-refresh-modern {
    background: #ffffff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.btn-refresh-modern:hover {
    background: #f9fafb;
    color: #2563eb;
}

/* Invoice Cards Grid */
.pa-invoice-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Single Invoice Card */
.pa-inv-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pa-inv-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.pa-inv-card-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(0,0,0,0.06);
}

.pa-inv-card-header--open {
    background: linear-gradient(135deg, rgba(59,130,246,0.03), transparent);
}
.pa-inv-card-header--paid {
    background: linear-gradient(135deg, rgba(16,185,129,0.03), transparent);
}
.pa-inv-card-header--overdue {
    background: linear-gradient(135deg, rgba(239,68,68,0.03), transparent);
}

.pa-inv-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.pa-inv-card-title i {
    color: #6b7280;
}

.pa-inv-card-status {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
}
.pa-inv-card-header--open .pa-inv-card-status { background: rgba(59,130,246,0.1); color: #2563eb; }
.pa-inv-card-header--paid .pa-inv-card-status { background: rgba(16,185,129,0.1); color: #059669; }
.pa-inv-card-header--overdue .pa-inv-card-status { background: rgba(239,68,68,0.1); color: #dc2626; }

.pa-inv-card-body {
    padding: 1.5rem;
    flex: 1;
}

.pa-inv-card-amount {
    margin-bottom: 1.5rem;
}
.pa-inv-card-amount span {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.35rem;
}
.pa-inv-card-amount h2 {
    font-size: 2.125rem;
    font-weight: 800;
    color: #111827;
    margin: 0;
    line-height: 1;
    letter-spacing: -0.02em;
}

.pa-inv-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: #f9fafb;
    padding: 1rem 1.25rem;
    border-radius: 12px;
}

.pa-inv-detail {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.pa-inv-detail-label {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 700;
    text-transform: uppercase;
}
.pa-inv-detail-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: #374151;
}

.pa-inv-card-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.04);
}

.pa-btn-pay {
    background: linear-gradient(135deg, #111827, #374151);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.875rem;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}
.pa-btn-pay:hover {
    background: linear-gradient(135deg, #000000, #1f2937);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(17,24,39,0.2);
}

.pa-btn-receipt {
    background: #f3f4f6;
    color: #9ca3af;
    border: none;
    border-radius: 12px;
    padding: 0.875rem;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Beautiful Empty State */
.pa-invoice-empty-beautiful {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    text-align: center;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    margin-top: 1.5rem;
    border: 1px dashed #e5e7eb;
}

.pa-empty-illustration {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(16,185,129,0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 16px rgba(16,185,129,0.1);
}

.pa-invoice-empty-beautiful h4 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.5rem;
}
.pa-invoice-empty-beautiful p {
    font-size: 0.95rem;
    color: #6b7280;
    max-width: 440px;
    line-height: 1.5;
}

/* Splash Modal */
.pa-splash-content {
    border-radius: 28px;
    border: none;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: #ffffff;
}

.pa-splash-body {
    display: flex;
    flex-direction: column;
}
@media (min-width: 768px) {
    .pa-splash-body {
        flex-direction: row;
    }
}

.pa-splash-visual {
    flex: 1;
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    overflow: hidden;
}

.pa-splash-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pa-splash-icon-wrapper {
    position: relative;
    z-index: 1;
    width: 88px;
    height: 88px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2.75rem;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.pa-splash-text {
    flex: 1.3;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pa-splash-text h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.pa-splash-text p {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.pa-splash-features {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
    margin-bottom: 2.5rem;
}

.pa-splash-feature {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}
.pa-splash-feature i {
    color: #10b981;
    font-size: 1.25rem;
}
.pa-splash-feature span {
    font-weight: 700;
    color: #374151;
    font-size: 0.95rem;
}

.pa-splash-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pa-btn-splash-primary {
    background: #111827;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 1rem 1.75rem;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pa-btn-splash-primary:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(17,24,39,0.15);
    color: #ffffff;
}

.pa-btn-splash-secondary {
    background: transparent;
    color: #6b7280;
    border: none;
    font-weight: 700;
    padding: 1rem;
    transition: color 0.2s ease;
}
.pa-btn-splash-secondary:hover {
    color: #111827;
}

@media (max-width: 768px) {
    .pa-splash-text {
        padding: 2rem 1.5rem;
    }
    .pa-splash-actions {
        flex-direction: column;
    }
    .pa-btn-splash-primary {
        width: 100%;
    }
    .pa-btn-splash-secondary {
        width: 100%;
    }
}
