/* ========================================================= */
/* --- EXCELLUX LOYALTY & REWARDS: STANDALONE CSS ENGINE --- */
/* ========================================================= */

/* --- 1. GLOBAL VARIABLES --- */
:root {
    /* Color Palette: Light, Airy SaaS Look */
    --bg-main: #F9FAFB;       
    --bg-surface: #FFFFFF;    
    --bg-hover: #F3F4F6;      
    
    /* Typography Colors */
    --text-main: #111827;     
    --text-muted: #6B7280;    
    
    /* Brand Accents */
    --brand-primary: #2563EB; 
    --brand-primary-hover: #1D4ED8;
    
    /* Status Colors */
    --status-success-bg: #D1FAE5;
    --status-success-text: #059669;
    --status-warning-bg: #FEF3C7;
    --status-warning-text: #D97706;
    --status-danger-bg: #FEE2E2;
    --status-danger-text: #DC2626;
    --status-platinum-bg: #E5E7EB;
    --status-platinum-text: #374151;
    
    /* Geometry & Depth */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); 
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03); 
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025); 
    --border-light: #E5E7EB;  
    
    /* Animation */
    --transition-fast: 0.15s ease-in-out;
}

/* --- 2. BASE RESETS & TYPOGRAPHY --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale;
}

/* Section Toggling (For Tabs) */
.crm-section {
    display: none;
    animation: fadeAndSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.crm-section.active {
    display: block;
}

@keyframes fadeAndSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 3. APP LAYOUT GRID --- */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.main-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.po-container {
    padding: 0 32px 32px 32px;
    max-width: 1600px; 
    margin: 0 auto;
    width: 100%;
}

/* --- 4. THE SIDEBAR --- */
.crm-sidebar {
    width: 80px;
    background: #111827; 
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 24px;
    z-index: 100;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding: 0 12px;
}

.crm-tab {
    width: 100%;
    height: 48px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.crm-tab i {
    font-size: 20px;
}

.crm-tab:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
}

.crm-tab.active {
    background: var(--brand-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* --- 5. THE HEADER --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: var(--bg-main);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-title h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.025em; 
    color: var(--text-main);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-surface);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    text-transform: uppercase;
}

/* --- 6. GLOBAL BUTTONS & CONTROLS --- */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary { background: var(--brand-primary); color: white; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-secondary { background: var(--bg-surface); color: var(--text-main); border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--bg-hover); border-color: #D1D5DB; }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-main); }

.btn-danger { background: #FEF2F2; color: #DC2626; border: 1px solid #FCA5A5; }
.btn-danger:hover { background: #FEE2E2; }

/* Utilities */
.full-width { width: 100%; }
.text-purple { color: #7E22CE !important; font-weight: 700; }

/* --- 7. SECTION HEADERS & PIPELINE CONTROLS --- */
.section-header {
    margin-bottom: 32px;
}
.section-header h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.01em; }
.section-header p { font-size: 13px; color: var(--text-muted); }

.pipeline-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.search-wrapper { position: relative; display: flex; align-items: center; }
.search-wrapper i { position: absolute; left: 14px; color: #9CA3AF; font-size: 14px; }
.search-wrapper input {
    padding: 10px 14px 10px 36px;
    width: 280px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    font-size: 13px;
    color: var(--text-main);
    transition: all var(--transition-fast);
    outline: none;
}
.search-wrapper input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); 
}

/* --- 8. DASHBOARD KPIs & GRIDS --- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.premium-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.premium-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.kpi-header-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.kpi-icon-wrapper { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.kpi-icon-wrapper.blue { background: #DBEAFE; color: #1D4ED8; }
.kpi-icon-wrapper.purple { background: #F3E8FF; color: #7E22CE; }
.kpi-icon-wrapper.green { background: #D1FAE5; color: #047857; }
.kpi-title { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-value { font-size: 32px; font-weight: 700; color: var(--text-main); letter-spacing: -1px; }

/* --- 9. DATA TABLES (MEMBER DIRECTORY) --- */
.table-container {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    /* NEW: Dedicated Scroll Settings */
    max-height: calc(100vh - 280px); /* Adjusts dynamically to screen height */
    overflow-y: auto; 
    overflow-x: hidden;
}

.premium-list-table { width: 100%; border-collapse: collapse; text-align: left; }
.premium-list-table th {
    padding: 16px 24px; font-size: 11px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border-light);
    background: #F8FAFC; 
    /* NEW: Sticky Header */
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* Adds a subtle shadow when scrolling */
}

.premium-list-table td {
    padding: 16px 24px; font-size: 14px; color: var(--text-main);
    border-bottom: 1px solid var(--border-light); vertical-align: middle;
    transition: background var(--transition-fast);
}
.premium-list-table tbody tr:hover td { background: var(--bg-hover); }
.premium-list-table tbody tr:last-child td { border-bottom: none; }

/* Status Pills for Tiers */
.status-pill {
    display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 9999px;
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.status-pill.platinum { background: var(--status-platinum-bg); color: var(--status-platinum-text); border: 1px solid #D1D5DB; }
.status-pill.gold { background: var(--status-warning-bg); color: var(--status-warning-text); }
.status-pill.silver { background: #E0E7FF; color: #4338CA; }

/* --- 10. FORMS & SETTINGS --- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group.full-width { grid-column: 1 / -1; }

/* --- DYNAMIC CATEGORY GRID --- */
#dynamicCategoryRatesContainer {
    display: grid;
    /* This creates automatic responsive columns. Adjust 180px if you want them wider/narrower */
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

#dynamicCategoryRatesContainer .form-group {
    margin-bottom: 0; /* Overrides the default margin since the grid handles the gap */
}

.ledger-label {
    font-size: 11px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; display: block;
}

.ledger-input {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); font-size: 13px; color: var(--text-main);
    background: var(--bg-surface); transition: all var(--transition-fast); outline: none; font-family: inherit;
}
.ledger-input:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.ledger-input:disabled { background: var(--bg-hover); color: var(--text-muted); cursor: not-allowed; }

/* --- 11. CATALOG & DUAL VIEW TOGGLES --- */
.marketing-toggles {
    display: flex; gap: 4px; background: #E5E7EB; padding: 4px;
    border-radius: var(--radius-md); width: max-content; margin-bottom: 24px;
}

.toggle-btn {
    padding: 8px 16px; border: none; background: transparent; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all var(--transition-fast);
}
.toggle-btn.active { background: var(--bg-surface); color: var(--text-main); box-shadow: var(--shadow-sm); }

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

/* Catalog Item Card */
.catalog-card {
    background: var(--bg-surface); border-radius: var(--radius-lg); border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; transition: all var(--transition-fast);
}

.catalog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.catalog-media {
    aspect-ratio: 4 / 3;
    width: 100%;
    height: auto;
    background-color: #F3F4F6;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D1D5DB;
    font-size: 40px;
    border-bottom: 1px solid var(--border-light);
}

.catalog-content {
    padding: 16px;
    flex-grow: 1;
}

.catalog-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 6px 0;
}

.catalog-points {
    font-size: 14px;
    font-weight: 700;
    color: #B45309; /* Matches the gold point styling */
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

/* --- 12. MODALS & OVERLAYS --- */
.modal-backdrop {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(17, 24, 39, 0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 1000;
    animation: fadeIn var(--transition-fast);
}

.modal-content {
    background: var(--bg-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    width: 100%; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
    animation: slideUp var(--transition-fast);
}

.modal-md { max-width: 750px; }

.modal-header {
    padding: 20px 24px; border-bottom: 1px solid var(--border-light); display: flex;
    justify-content: space-between; align-items: center; background: #F9FAFB;
}
.modal-header h2 { font-size: 18px; font-weight: 600; margin: 0; color: var(--text-main); }
.modal-close {
    background: transparent; border: none; font-size: 24px; color: #9CA3AF; cursor: pointer; transition: color var(--transition-fast);
}
.modal-close:hover { color: var(--text-main); }

.modal-body { padding: 24px; overflow-y: auto; }

.modal-footer-actions {
    padding: 20px 24px; border-top: 1px solid var(--border-light); display: flex;
    justify-content: space-between; background: #F9FAFB;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* --- 13. SPINNER --- */
.loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8);
    display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999;
}
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1); border-left-color: var(--brand-primary);
    border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin-bottom: 16px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- 14. TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 16px 24px;
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast.success { background: #059669; }
.toast.error { background: #DC2626; }
.toast.info { background: #2563EB; }

.toast.fade-out {
    animation: toastFadeOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastFadeOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

/* --- 15. POINTS LEDGER UI --- */
.ledger-management-panel {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    padding: 24px;
    border-radius: var(--radius-md);
    grid-column: 1 / -1; 
    margin-top: 12px;
    display: none; /* Shown via JS only when editing existing members */
}

.locked-badge {
    background: #FEF2F2;
    color: #DC2626;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #FECACA;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ledger-action-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

/* Ensure the input fields don't squash */
.ledger-action-row .form-group:nth-child(1) { flex: 1.2; } /* Action */
.ledger-action-row .form-group:nth-child(2) { flex: 1; }   /* Amount */
.ledger-action-row .form-group:nth-child(3) { flex: 2; }   /* Reason */

/* --- 16. NATIVE PRINT PROTECTION --- */
/* Prevents the dashboard UI from printing if the user hits Ctrl+P by mistake */
@media print {
    body * { visibility: hidden; }
    #printIframe, #printIframe * { visibility: visible; }
    #printIframe { position: absolute; left: 0; top: 0; width: 100vw; height: 100vh; border: none; }
}

/* --- REWARD CARD HOVER & UI --- */
.catalog-card {
    position: relative;
    overflow: hidden;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-fast);
}

.catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Clean T&C Badge */
.tnc-badge {
    font-size: 10px;
    font-weight: 700;
    color: #B45309;
    background: #FEF3C7;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

/* Delete Button */
.delete-reward-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #DC2626;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
    transition: background 0.2s;
}

.delete-reward-btn:hover { background: #B91C1C; }

/* Custom File Input Styling */
.file-upload-input {
    padding: 6px;
    background: #F9FAFB;
    border: 1px dashed #D1D5DB;
    cursor: pointer;
}

/* --- PREMIUM PRINT LAYOUT (A4 OPTIMIZED) --- */
@media print {
    body * { visibility: hidden; }
    
    #printCatalogContainer, #printCatalogContainer * { visibility: visible; }
    
    #printCatalogContainer {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 20px;
        background: #FAFAFA;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-catalog-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        margin-top: 30px;
    }

    .print-reward-card {
        border: 3px double #D97706;
        border-radius: 12px;
        padding: 15px;
        text-align: center;
        background: #fff;
        page-break-inside: avoid;
    }

.print-reward-img {
        width: 100%;
        aspect-ratio: 4 / 3;
        height: auto;
        object-fit: cover;
        border-radius: 6px;
        margin-bottom: 10px;
    }

    .print-reward-title {
        font-family: 'Playfair Display', serif;
        font-size: 16px;
        font-weight: 700;
        color: #111827;
        margin: 5px 0;
        text-transform: uppercase;
    }

    .print-reward-pts {
        font-family: 'Inter', sans-serif;
        font-size: 16px;
        font-weight: 700;
        color: #B45309;
    }

    .print-reward-desc {
        font-family: 'Inter', sans-serif;
        font-size: 10px;
        color: #4B5563;
        margin-top: 8px;
        line-height: 1.3;
    }
}

/* --- 17. REDEMPTION VOUCHER PRINT STYLES --- */
.voucher-print-wrapper {
    padding: 30px;
    font-family: 'Inter', sans-serif;
    color: #111827;
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
}

.voucher-inner {
    border: 2px dashed #D1D5DB;
    border-radius: 12px;
    padding: 30px;
}

.voucher-header {
    text-align: center;
    border-bottom: 2px solid #E5E7EB;
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.voucher-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: #166534; /* Financial Green */
    margin: 0 0 8px 0;
}

.voucher-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 15px;
    border-bottom: 1px solid #F3F4F6;
    padding-bottom: 8px;
}

.voucher-row strong {
    color: #6B7280;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.voucher-row span {
    font-weight: 600;
}

.voucher-highlight {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    margin: 32px 0;
}

.voucher-highlight .amount {
    font-size: 40px;
    font-weight: bold;
    color: #166534;
    margin: 8px 0;
    font-family: 'Playfair Display', serif;
}

.voucher-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 80px;
}

.voucher-signature {
    border-top: 1px solid #9CA3AF;
    padding-top: 8px;
    width: 220px;
    text-align: center;
    font-size: 14px;
    color: #4B5563;
    font-weight: 600;
}

/* Ensure background colors print correctly */
@media print {
    .voucher-highlight {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ========================================================= */
/* --- 18. STATEMENT OF ACCOUNT (LEDGER) STYLES --- */
/* ========================================================= */

/* Ensure the ledger table scrolls smoothly without breaking the modal */
#ledgerStatementModal .modal-body {
    overflow: hidden; 
}

/* Force the header to stick to the top when scrolling through history */
#ledgerStatementModal .premium-list-table th {
    position: sticky;
    top: 0;
    background: #F1F5F9;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Add a subtle hover effect to ledger rows to make reading easy */
#ledgerStatementTbody tr:hover td {
    background-color: #F8FAFC !important;
}

/* ========================================================= */
/* --- 19. DYNAMIC GIFT VOUCHER PRINT STYLES --- */
/* ========================================================= */

/* Centers and sizes the gift image beautifully on the receipt */
.voucher-gift-image {
    width: 100%;
    max-width: 240px;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin: 16px auto 24px auto;
    display: block;
    border: 1px solid #E5E7EB;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.voucher-gift-details {
    text-align: center;
    margin-bottom: 24px;
}

/* Shifts the highlight box to a premium Blue for Gifts (Green is for Cash) */
.voucher-highlight.gift-highlight {
    background: #EFF6FF;
    border-color: #BFDBFE;
}

.voucher-highlight.gift-highlight .amount {
    color: #1D4ED8; /* Royal Blue */
}

/* Small print for specific gift T&Cs */
.voucher-terms {
    font-size: 10px;
    color: #6B7280;
    text-align: center;
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px dashed #D1D5DB;
    line-height: 1.5;
}

/* Animation for the new success screen */
@keyframes successPop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

#redemptionStep3_Success i {
    animation: successPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* ========================================================= */
/* --- 20. CLERICAL LEDGER PRINT STYLES --- */
/* ========================================================= */
.clerical-print-wrapper {
    padding: 40px;
    font-family: 'Inter', sans-serif;
    color: #000;
    background: #fff;
}
.clerical-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #000;
    padding-bottom: 20px;
}
.clerical-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}
.clerical-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 14px;
}
.clerical-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    font-size: 12px;
}
.clerical-table th, .clerical-table td {
    border: 1px solid #000;
    padding: 10px;
    text-align: left;
}
.clerical-table th {
    background-color: #f0f0f0 !important;
    font-weight: bold;
    text-transform: uppercase;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
.clerical-table td.right-align, .clerical-table th.right-align {
    text-align: right;
}
.clerical-footer {
    margin-top: 50px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}
.clerical-signature {
    border-top: 1px solid #000;
    width: 200px;
    text-align: center;
    padding-top: 5px;
}