﻿/* ============================
   TRANSITPAY - REPORTS & RECEIPTS
   ============================ */

/* ============================
   RECEIPT PREVIEW (PRINT)
   ============================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

@media (max-width: 600px) {
    .modal-overlay {
        padding: 1rem;
    }
}


.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalAppear 0.3s ease;
}

.receipt-modal {
    max-width: 650px;
}

.report-modal-content {
    max-width: 900px;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header-bar h3 {
    font-weight: 700;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
}

.receipt-preview,
.report-preview {
    padding: 2rem;
}

/* Professional Receipt Styling */
.receipt-document {
    background: #ffffff;
    color: #1a1a2e;
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.receipt-top-bar {
    height: 6px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a78bfa);
}

.receipt-body {
    padding: 2.5rem;
}

@media (max-width: 600px) {
    .receipt-body {
        padding: 1.5rem 1rem;
    }

    .receipt-company-row {
        flex-direction: column;
        gap: 1rem;
    }

    .receipt-label-box {
        text-align: left;
    }

    .receipt-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .receipt-total-row {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.5rem;
    }
}


.receipt-company-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.receipt-company-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #6366f1;
}

.receipt-company-tagline {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.receipt-label-box {
    text-align: right;
}

.receipt-label-box .label-receipt {
    font-size: 1.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #1a1a2e;
}

.receipt-label-box .receipt-no {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #6366f1;
    font-weight: 600;
}

.receipt-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin: 1.5rem 0;
}

.receipt-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.receipt-info-block h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6366f1;
    margin-bottom: 0.5rem;
}

.receipt-info-block p {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.5;
}

.receipt-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.receipt-items-table thead th {
    background: #f1f5f9;
    padding: 0.7rem 1rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.receipt-items-table thead th:last-child {
    text-align: right;
}

.receipt-items-table tbody td {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.receipt-items-table tbody td:last-child {
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

.receipt-total-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
    padding: 1rem 1rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: var(--radius-md);
    color: white;
    margin-bottom: 1.5rem;
}

.receipt-total-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.receipt-total-amount {
    font-size: 1.5rem;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
}

.receipt-footer-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 1rem;
}

.receipt-payment-info {
    font-size: 0.8rem;
    color: #64748b;
}

.receipt-payment-info span {
    display: block;
    margin-bottom: 0.25rem;
}

.receipt-payment-info strong {
    color: #334155;
}

.receipt-stamp {
    text-align: center;
}

.receipt-stamp .paid-stamp {
    display: inline-block;
    border: 3px solid #22c55e;
    color: #22c55e;
    font-weight: 900;
    font-size: 1.1rem;
    padding: 0.3rem 1.2rem;
    border-radius: var(--radius-sm);
    transform: rotate(-5deg);
    letter-spacing: 0.1em;
}

.receipt-bottom-note {
    text-align: center;
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* ============================
   REPORTS
   ============================ */
.report-controls {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.report-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .report-summary-grid {
        grid-template-columns: 1fr;
    }
}


.report-summary-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
}

.report-summary-card .rs-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.report-summary-card .rs-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.report-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-accent);
}

.report-btn-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}


/* ==================== IMPORT PREVIEW ==================== */
.import-preview-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--radius-md);
    overflow: hidden;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.import-preview-table th {
    background: var(--bg-surface);
    color: var(--primary-400);
    padding: 0.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.import-preview-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.import-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid var(--primary-500);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.import-summary strong {
    color: var(--primary-400);
}

/* ==================== EMAIL STATUS BADGES ==================== */
.badge-sent {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success-400);
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning-400);
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-failed {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-400);
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ==================== EMAIL PREVIEW MODAL ==================== */
.email-preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 600px;
    margin: 1rem auto;
}

.email-preview-card .email-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.email-preview-card .email-field {
    display: flex;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.email-preview-card .email-field strong {
    color: var(--text-muted);
    min-width: 60px;
}

.email-preview-card .email-body {
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
}