.download-reports-modal-card {
    max-width: 900px;
    margin: 40px 0 40px 60px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    font-family: inherit;
    overflow: hidden;
}
.modal-header {
    background: var(--primary);
    color: #fff;
    border-bottom: none;
    padding: 24px 32px;
    border-radius: 20px 20px 0 0;
}
.modal-title {
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
}
.modal-body {
    padding: 32px;
}
.download-reports-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.form-group label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 14px;
    display: block;
}
.form-control {
    border-radius: 12px;
    border: 2px solid rgba(226, 232, 240, 0.6);
    font-size: 15px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    width: 100%;
    color: #222;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}
select.form-control, input[type="date"].form-control {
    color: #222;
}
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -12px;
    margin-right: -12px;
}
.col-md-4 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
}
.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
}
.button-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.d-flex {
    display: flex;
}
.justify-content-end {
    justify-content: flex-end;
}
.gap-2 {
    gap: 0.5rem;
}
.mt-4 {
    margin-top: 1.5rem;
}

.form-message {
    min-height: 1.2em;
    color: #d32f2f;
    font-size: 0.98rem;
    margin-top: 0.5rem;
    text-align: center;
}
@media (max-width: 1200px) {
    .download-reports-modal-card {
        max-width: 98vw;
    }
}
@media (max-width: 900px) {
    .download-reports-modal-card {
        margin-left: 5vw;
        margin-right: 5vw;
    }
    .modal-body {
        padding: 1.5rem;
    }
    .col-md-4, .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
@media (max-width: 600px) {
    .download-reports-modal-card .btn,
    .download-reports-modal-card .btn-primary,
    .download-reports-modal-card .btn-outline-danger {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 0.5rem;
    }
    .download-reports-modal-card {
        margin: 1rem auto;
        padding: 0;
        float: none;
        max-width: 98vw;
        width: 100%;
        box-sizing: border-box;
    }
    .modal-body {
        padding: 1.2rem 0.7rem;
    }
    .download-reports-form {
        gap: 0.5rem;
    }
    .row {
        flex-direction: column;
        margin-left: 0;
        margin-right: 0;
    }
    .col-md-4, .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    .d-flex.justify-content-end.gap-2.mt-4 {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        margin-top: 1rem;
    }
}

/* Email Report Modal Styles */
#emailReportModal .modal-content {
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: none;
}

#emailReportModal .modal-header {
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    padding: 20px 25px;
}

#emailReportModal .modal-title {
    font-weight: 600;
    font-size: 1.3rem;
}

#emailReportModal .modal-body {
    padding: 25px;
}

#emailReportModal .alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #bbdefb;
    border-radius: 10px;
    color: #1565c0;
    font-weight: 500;
}

#emailReportModal .form-check {
    margin-bottom: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

#emailReportModal .form-check:hover {
    background: #e9ecef;
    border-color: var(--primary);
}

#emailReportModal .form-check-input:checked + .form-check-label {
    color: var(--primary);
    font-weight: 600;
}

#emailReportModal .form-check-input {
    margin-top: 0.3rem;
}

#emailReportModal .form-check-label {
    margin-left: 8px;
    cursor: pointer;
    font-size: 14px;
}

#emailReportModal #customEmailField {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#emailReportModal #customEmailField.show {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

#emailReportModal .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

#emailReportModal .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#emailReportModal .form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

#emailReportModal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 20px 25px;
    border-radius: 0 0 15px 15px;
}

#emailReportModal .btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#emailReportModal .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

#emailReportModal .btn-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#emailReportModal .btn-primary:disabled {
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

#emailReportModal .text-muted {
    color: #6c757d !important;
    font-size: 13px;
}

#emailReportModal .text-muted i {
    margin-right: 5px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    #emailReportModal .modal-dialog {
        margin: 10px;
    }
    
    #emailReportModal .modal-body {
        padding: 20px 15px;
    }
    
    #emailReportModal .modal-footer {
        padding: 15px;
    }
    
    #emailReportModal .form-check {
        padding: 10px 12px;
    }
}
