.wcfm-invoice-container {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    margin: 25px 0;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.wcfm-invoice-header {
    padding: 20px 25px;
    background: #ddd;
    color: #fff;
}

.wcfm-invoice-header h2 {
    margin: 0;
    font-weight: 600;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.wcfm-invoice-header h2 i {
    margin-right: 12px;
    font-size: 1.3em;
}

.wcfm-invoice-card {
    padding: 25px;
    border-bottom: 1px solid #eee;
}

.wcfm-invoice-card:last-child {
    border-bottom: none;
}

.invoice-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.status-badge {
    display: flex;
    align-items: center;
    background: #e8f5e9;
    padding: 8px 15px;
    border-radius: 20px;
    color: #2e7d32;
    font-weight: 500;
}

.badge-icon {
    margin-right: 8px;
    font-size: 1.1em;
}

.invoice-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.action-button i {
    margin-right: 8px;
}

.view-button {
    background: #2196f3;
    color: white;
}

.view-button:hover {
    background: #1976d2;
    transform: translateY(-2px);
}

.download-button {
    background: #4caf50;
    color: white;
}

.download-button:hover {
    background: #388e3c;
    transform: translateY(-2px);
}

.preview-button {
    background: #ff9800;
    color: white;
}

.preview-button:hover {
    background: #f57c00;
    transform: translateY(-2px);
}

.preview-container {
    display: none;
    margin-top: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.preview-container.active {
    display: block;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.preview-header h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.preview-header h3 i {
    margin-right: 10px;
    color: #666;
}

.close-preview {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.close-preview:hover {
    color: #333;
}

.preview-content {
    background: white;
    padding: 0;
}

.invoice-image-preview {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.invoice-pdf-preview {
    width: 100%;
    height: 600px;
    border: none;
}

.preview-not-available {
    text-align: center;
    padding: 40px 20px;
    color: #757575;
}

.preview-not-available i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #bdbdbd;
}

.preview-not-available p {
    margin: 8px 0;
}

.invoice-upload-form {
    padding: 25px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.invoice-upload-form h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #333;
}

.upload-fields {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.upload-field {
    flex: 1;
    min-width: 250px;
}

.upload-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

@media (max-width: 768px) {
    .invoice-status-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .invoice-actions {
        width: 100%;
    }

    .action-button {
        flex-grow: 1;
        justify-content: center;
    }
    
    .upload-fields {
        flex-direction: column;
        gap: 15px;
    }
    
    .upload-field {
        width: 100%;
    }
}


.woocommerce-order-invoice-modern {
    margin: 2em 0;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

.invoice-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.invoice-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.invoice-card-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #333;
    display: flex;
    align-items: center;
}

.invoice-card-header h2 i {
    margin-right: 12px;
    color: #6c757d;
}

.invoice-status-badge {
    display: flex;
    align-items: center;
    background: #e8f5e9;
    padding: 6px 12px;
    border-radius: 20px;
    color: #2e7d32;
    font-weight: 500;
    font-size: 0.9rem;
}

.status-icon {
    margin-right: 6px;
    font-size: 0.9em;
}

.invoice-sections {
    padding: 20px;
}

.invoice-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #e0e0e0;
}

.invoice-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.invoice-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    color: #444;
}

.invoice-section h3 i {
    margin-right: 10px;
    color: #666;
}

.invoice-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.invoice-action-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.invoice-action-btn i {
    margin-right: 8px;
}

.view-btn {
    background: #2196f3;
    color: white;
}

.view-btn:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.download-btn {
    background: #4caf50;
    color: white;
}

.download-btn:hover {
    background: #388e3c;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.preview-btn {
    background: #ff9800;
    color: white;
}

.preview-btn:hover {
    background: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.invoice-preview-container {
    display: none;
    margin-top: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.invoice-preview-container.active {
    display: block;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.preview-header h3 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    color: #555;
}

.preview-header h3 i {
    margin-right: 8px;
}

.close-preview {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.close-preview:hover {
    color: #333;
}

.preview-content {
    background: white;
}

.invoice-preview-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    padding: 15px;
}

.invoice-preview-pdf {
    width: 100%;
    height: 500px;
    border: none;
}

.preview-not-available {
    text-align: center;
    padding: 30px 20px;
    color: #666;
}

.preview-not-available i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #bdbdbd;
}

.preview-not-available p {
    margin: 8px 0;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .invoice-actions {
        flex-direction: column;
        gap: 10px;
    }

    .invoice-action-btn {
        justify-content: center;
        width: 100%;
    }

    .invoice-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}


#orders_details_general_expander > section > div > div.invoice-sections > div > div.invoice-actions > a {
    color: #fff !important;
 
}


#orders_details_items_expander > div.wcfm-invoice-container > div > div.invoice-status-header > div.invoice-actions > a{
    color: #fff !important;
}

.upload-field label {
    display: block !important;
}

button.wcfm_invoice_ipload_button {
    background-color: #1c2b36;
    color: #fff;
    border: 1px solid #1c2b36;
    padding: 10px 18px;
    transition: all 0.4s ease-in-out;
    -webkit-transition: all 0.4s ease-in-out;
    -moz-transition: all 0.4s ease-in-out;
    -ms-transition: all 0.4s ease-in-out;
    -o-transition: all 0.4s ease-in-out;
}

button.wcfm_invoice_ipload_button:hover{
    background-color: #131d24;

}

.wcfm-invoices-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9em;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.wcfm-invoices-table th {
    background-color: #f8f9fa;
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
}

.wcfm-invoices-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.wcfm-invoices-table tr:last-child td {
    border-bottom: none;
}

.wcfm-invoices-table tr:hover {
    background-color: #f8f9fa;
}

.invoice-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.invoice-type-badge.purchase {
    background-color: #e3f2fd;
    color: #1976d2;
}

.invoice-type-badge.shipping {
    background-color: #e8f5e9;
    color: #388e3c;
}

.invoice-type-badge i {
    margin-right: 5px;
}

.invoice-actions-cell {
    white-space: nowrap;
}

.invoice-actions {
    display: flex;
    gap: 5px;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
}

.action-button:hover {
    background: #e9ecef;
    color: #212529;
}

.view-button:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.download-button:hover {
    background: #e8f5e9;
    color: #388e3c;
}

.preview-button:hover {
    background: #fff3e0;
    color: #ff6d00;
}

.delete-button:hover {
    background: #fce4ec;
    color: #d81b60;
}

.preview-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    padding: 20px;
    flex-direction: column;
}

.preview-container.active {
    display: flex;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px 20px;
    border-radius: 4px 4px 0 0;
}

.preview-content {
    flex: 1;
    background: #fff;
    padding: 20px;
    overflow: auto;
}

.invoice-upload-form {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
}

.upload-fields {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.upload-field {
    flex: 1;
}

.upload-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.upload-field input[type="file"] {
    width: 100%;
}

.wcfm_invoice_ipload_button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.wcfm_invoice_ipload_button:hover {
    background: #388E3C;
}