/**
 * ============================================================
 * ANDROLAB SUITE — OPERATIONS: CUSTOM INVOICE GENERATOR (SaaS UI)
 * Minimal, flat design consistent with the Androlab dashboard
 * ============================================================
 */

/* === Wrapper === */
.androlab-invoice-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 30px;
}

/* === Header === */
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.invoice-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}
.invoice-header h2 i {
    color: #F05323;
}
.invoice-user-select label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    display: block;
}
.invoice-user-select select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff;
    font-size: 14px;
    color: #111827;
}

/* ================================================
   ANDROLAB SUITE — CUSTOM INVOICE SELECT2 ALIGNMENT
   ================================================ */

/* Match Select2 input with normal text inputs */
.select2-container--default .select2-selection--single {
    height: 38px !important;
    border: 1px solid #d1d5db !important; /* same as other fields */
    border-radius: 6px !important;
    background-color: #fff !important;
    padding: 4px 10px !important;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

/* When focused */
.select2-container--default .select2-selection--single:focus,
.select2-container--default .select2-selection--single:focus-within {
    border-color: #F05323 !important; /* Androlab blue */
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
    outline: none !important;
}

/* Text alignment inside */
.select2-container--default .select2-selection__rendered {
    color: #111827 !important;
    font-size: 14px !important;
    font-family: "Inter", "Segoe UI", sans-serif !important;
    line-height: 1.4 !important;
    padding-left: 4px !important;
}

/* Remove excess padding */
.select2-container .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 8px !important;
}

/* Dropdown styling */
.select2-dropdown {
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08) !important;
}

.select2-results__option {
    padding: 8px 10px !important;
    font-size: 14px !important;
    color: #111827;
}

.select2-results__option--highlighted {
    background-color: #F05323 !important;
    color: #fff !important;
}

.product-suggestions li:hover {
    background: #f5f7ff;
}
.product-cell, .qty-cell, .price-cell {
  cursor: text;
}



/* === Address Grid === */
.invoice-address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.invoice-address-grid h3 {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.invoice-address-grid h3 i {
    color: #F05323;
}
.invoice-address-grid input,
.invoice-address-grid textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 14px;
    color: #111827;
    background: #f9fafb;
    transition: all 0.2s ease;
}
.invoice-address-grid input:focus,
.invoice-address-grid textarea:focus {
    background: #fff;
    border-color: #F05323;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
    outline: none;
}

/* === Invoice Meta === */
.invoice-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}
.invoice-meta label {
    font-weight: 600;
    color: #374151;
    font-size: 13px;
}
.invoice-meta input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 14px;
    color: #111827;
    background: #f9fafb;
}
.invoice-meta input:focus {
    border-color: #F05323;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
    outline: none;
}

/* === Line Items Section === */
.invoice-items-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}
.invoice-items-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}
.invoice-add-item {
    display: grid;
    grid-template-columns: 2fr 0.5fr 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}
.invoice-add-item input {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 9px 10px;
    font-size: 14px;
    background: #f9fafb;
}
.invoice-add-item input:focus {
    background: #fff;
    border-color: #F05323;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}
.invoice-add-item button {
    padding: 9px 14px;
    border: none;
    border-radius: 6px;
    background: #F05323;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}
.invoice-add-item button:hover {
    background: #F05323;
}

/* === Items Table === */
#invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
}
#invoice-items-table th,
#invoice-items-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 14px;
}
#invoice-items-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}
#invoice-items-table td {
    color: #111827;
}
#invoice-items-table tbody tr:hover {
    background: #f3f4f6;
}
#invoice-items-table .right {
    text-align: right;
}
#invoice-items-table .strong {
    font-weight: 700;
    color: #111827;
}
#invoice-items-table tfoot td {
    background: #fafafa;
}
#invoice-items-table td.editable {
  background: #fffefc;
}

#invoice-items-table td.editable:focus {
  outline: 2px solid #F05323;
}
/* === Remove Button === */
#invoice-items-table .remove-item {
    background: #ef4444;
    border: none;
    border-radius: 5px;
    color: #fff;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 13px;
}
#invoice-items-table .remove-item:hover {
    background: #dc2626;
}

/* === EFT Details === */
.invoice-eft-details {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}
.invoice-eft-details h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}
.invoice-eft-details p {
    font-size: 13px;
    color: #374151;
    margin: 4px 0;
}

/* === Action Button === */
.invoice-actions {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}
.invoice-actions button {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: none;
    background: #F05323;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.invoice-actions button:hover {
    background: #F05323;
}

/* === Responsive === */
@media (max-width: 768px) {
    .invoice-add-item {
        grid-template-columns: 1fr 1fr;
    }
}



