
/* Header Section */
.rc-header {
    margin-bottom: 32px;
}

.rc-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 8px 0;
}

.rc-header p {
    font-size: 14px;
    color: #64748B;
    margin: 0;
}

/* Stats Cards Grid */
.rc-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Base Card Style */
.rc-stat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    border-left: 4px solid; /* Colored border on the left */
}

.rc-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rc-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #64748B;
}

.rc-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #1E293B;
    line-height: 1;
}

/* Card Icons */
.rc-card-icon {
    width: 48px;
    height: 48px;
    background-color: #FFFFFF;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    flex-shrink: 0;
}

    .rc-card-icon svg {
        width: 24px;
        height: 24px;
        fill: none;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* --- Specific Card Themes --- */

/* 1. Total Reports (Green) */
.rc-card-total {
    background: linear-gradient(90deg, #F0FDF4 0%, #DCFCE7 100%);
    border-left-color: #059669;
}

    .rc-card-total .rc-card-icon svg {
        stroke: #059669;
    }

/* 2. Booking Reports (Purple) */
.rc-card-booking {
    background: linear-gradient(90deg, #FAF5FF 0%, #F3E8FF 100%);
    border-left-color: #7C3AED;
}

    .rc-card-booking .rc-card-icon svg {
        stroke: #7C3AED;
    }

/* 3. Billing Reports (Orange/Brown) */
.rc-card-billing {
    background: linear-gradient(90deg, #FFFBEB 0%, #FEF3C7 100%);
    border-left-color: #D97706;
}

    .rc-card-billing .rc-card-icon svg {
        stroke: #D97706;
    }

/* 4. Approval Reports (Cyan/Teal) */
.rc-card-approval {
    background: linear-gradient(90deg, #ECFEFF 0%, #CFFAFE 100%);
    border-left-color: #0891B2;
}

    .rc-card-approval .rc-card-icon svg {
        stroke: #0891B2;
    }


/* Responsive Design */
@media (max-width: 1024px) {
    .rc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .rc-stats-grid {
        grid-template-columns: 1fr;
    }
}
/* --- SCOPED CSS FOR REPORTS LIST & CONTROLS --- */

/* Controls Section (Tabs + Search/Filters) */
.rc-controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

/* Tabs */
.rc-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.rc-tab {
    padding: 8px 16px;
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

    .rc-tab:hover {
        border-color: #CBD5E1;
        color: #334155;
    }

    .rc-tab.active {
        border-color: #059669;
        color: #059669;
        background: #F5FEFA;
    }

/* Filters & Search */
.rc-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.rc-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

    .rc-search-box svg {
        position: absolute;
        left: 12px;
        width: 16px;
        height: 16px;
        color: #94A3B8;
    }

.rc-input, .rc-select {
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    color: #334155;
    outline: none;
    font-family: inherit;
}

.rc-search-box .rc-input {
    padding-left: 36px;
    width: 220px;
}

.rc-input::placeholder {
    color: #94A3B8;
}

.rc-select {
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    cursor: pointer;
}

/* Reports Grid */
.rc-reports-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* Individual Report Card */
.rc-report-card {
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

    .rc-report-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    }

.rc-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.rc-report-icon {
    width: 44px;
    height: 44px;
    background-color: #ECFDF5; /* Light green bg */
    color: #059669; /* Green icon */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .rc-report-icon svg {
        width: 22px;
        height: 22px;
        stroke-width: 1.5;
    }

.rc-report-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 6px 0;
}

.rc-report-info p {
    font-size: 13px;
    color: #64748B;
    margin: 0;
    line-height: 1.4;
}

/* Card Meta (Formats & Date) */
.rc-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    margin-top: auto;
}

.rc-format-pill {
    font-size: 11px;
    font-weight: 600;
    color: #7C3AED;
    border: 1px solid #C4B5FD;
    background: #FBF5FE;
    padding: 4px 10px;
    border-radius: 4px;
}

.rc-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #64748B;
}

    .rc-date svg {
        width: 14px;
        height: 14px;
    }

/* Card Actions */
.rc-card-actions {
    display: flex;
    gap: 12px;
}

.rc-btn {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.rc-btn-preview {
    background-color: #FFFFFF;
    color: #475569;
    border: 1px solid #CBD5E1;
}

    .rc-btn-preview:hover {
        background-color: #F8FAFC;
        color: #1E293B;
    }

.rc-btn-download {
    background-color: #2D72D9; /* Blue button */
    color: #FFFFFF;
    border: 1px solid #2D72D9;
}

    .rc-btn-download:hover {
        background-color: #235BB3;
    }

    .rc-btn-download svg {
        width: 14px;
        height: 14px;
    }

/* Responsive */
@media (max-width: 1200px) {
    .rc-reports-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .rc-controls-section {
        flex-direction: column;
        align-items: stretch;
    }

    .rc-search-box .rc-input {
        width: 100%;
    }

    .rc-reports-grid {
        grid-template-columns: 1fr;
    }
}
/* --- SCOPED CSS FOR PREVIEW MODAL --- */

.rc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.rc-modal-container {
    background-color: #FFFFFF;
    width: 100%;
    max-width: 800px;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.rc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Pulls the header to the very edges of the modal container */
    margin: -24px -24px 24px -24px;
    padding: 24px; /* Restores the inner spacing */
    background-color: #F2F4F4; /* Applies the light grey background */
    border-top-left-radius: 16px; /* Matches the modal's rounded corners */
    border-top-right-radius: 16px;
    border-bottom: 1px solid #E2E8F0;
}

    .rc-modal-header h2 {
        font-size: 20px;
        font-weight: 700;
        color: #334155;
        margin: 0 0 4px 0;
    }

    .rc-modal-header p {
        font-size: 13px;
        color: #64748B;
        margin: 0;
    }

.rc-modal-close {
    background: none;
    border: 1.5px solid #0F172A; 
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #0F172A;
    transition: all 0.2s;
}

    .rc-modal-close:hover {
        background-color: #E2E8F0;
    }

    .rc-modal-close svg {
        width: 16px;
        height: 16px;
    }
/* Stats Row */
/* Stats Row (Fixed Wrapping & Alignment) */
.rc-modal-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.rc-stat-box {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 12px 14px; /* Slightly reduced padding to give text more room */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    overflow: hidden; /* Keeps things neat */
}

.rc-stat-label {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap; /* Prevents "File Types" from breaking into two lines */
}

.rc-stat-value {
    font-size: 14px; /* Reduced from 15px to ensure "Rajesh Kumar" fits */
    font-weight: 700;
    white-space: nowrap; /* Prevents the value from breaking into two lines */
    overflow: hidden;
    text-overflow: ellipsis; /* Adds "..." if the name is ever too long */
}

.rc-stat-purple {
    background-color: #FAF5FF;
    border-color: #E9D5FF;
    color: #6B21A8;
}

    .rc-stat-purple .rc-stat-value {
        color: #581C87;
    }

.rc-stat-red {
    background-color: #FEF2F2;
    border-color: #FECACA;
    color: #BE123C;
}

    .rc-stat-red .rc-stat-value {
        color: #9F1239;
    }

.rc-stat-green {
    background-color: #F0FDF4;
    border-color: #BBF7D0;
    color: #15803D;
}

    .rc-stat-green .rc-stat-value {
        color: #166534;
    }

.rc-stat-orange {
    background-color: #FFF7ED;
    border-color: #FED7AA;
    color: #C2410C;
}

    .rc-stat-orange .rc-stat-value {
        color: #9A3412;
    }

/* Data Table */
.rc-modal-table-wrapper {
    margin-bottom: 24px;
    overflow-x: auto;
}

.rc-modal-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

    .rc-modal-table th {
        font-size: 13px;
        font-weight: 600;
        color: #4A4A4A;
        padding: 14px 16px;
        background-color: #EDF1EF !important;
        border-bottom: 1px solid #E2E8F0 !important;
    }

    .rc-modal-table td {
        font-size: 13px;
        color: #64748B;
        padding: 16px 16px;
        border-bottom: 1px solid #F2F3F3;
        background-color: #FFFFFF;
    }

/* Footer Buttons */
.rc-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
}

.rc-btn-outline {
    background-color: #FFFFFF;
    color: #475569;
    border: 1px solid #CBD5E1;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    .rc-btn-outline:hover {
        background-color: #F8FAFC;
        color: #0F172A;
    }

.rc-btn-solid {
    background-color: #2D72D9;
    color: #FFFFFF;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .rc-btn-solid:hover {
        background-color: #235BB3;
    }

@media (max-width: 768px) {
    .rc-modal-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .rc-modal-footer {
        flex-direction: column;
    }

        .rc-modal-footer button {
            width: 100%;
        }
}
.rc-modal-table tbody tr:last-child td {
    border-bottom: none;
}
.rc-modal-table th:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.rc-modal-table th:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}
