:root {
    --primary-color: #2e7d32;
    --secondary-color: #ff9800;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #ddd;
    --error-color: #d32f2f;
    --success-color: #388e3c;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo img {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    margin-right: 20px;
}

.company-info {
    flex: 1;
}

.company-name {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.slogan {
    font-size: 16px;
    color: #d32f2f;
    font-style: italic;
    margin-bottom: 10px;
}

.company-details {
    font-size: 14px;
    color: #000;
    line-height: 1.4;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

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

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

input.error, textarea.error {
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.2);
}

input.success, textarea.success {
    border-color: var(--success-color);
    box-shadow: 0 0 0 2px rgba(56, 142, 60, 0.2);
}

.error-message {
    color: var(--error-color);
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.success-message {
    color: var(--success-color);
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #1b5e20;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

button.secondary {
    background-color: var(--secondary-color);
}

button.secondary:hover {
    background-color: #e68900;
}

.hidden {
    display: none;
}

.invoice-info {
    background-color: var(--light-gray);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.invoice-detail {
    margin-bottom: 10px;
    display: flex;
}

.invoice-detail strong {
    min-width: 180px;
    display: inline-block;
}

.success-message {
    background-color: #e6f4ea;
    color: #137333;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #2e7d32;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.step.active .step-circle {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.step.completed .step-circle {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.step-text {
    font-size: 12px;
    text-align: center;
}

.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: #777;
    font-size: 14px;
}

.product-list {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.product-list th, .product-list td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: left;
}

.product-list th {
    background-color: var(--light-gray);
}

.total-row {
    font-weight: bold;
    background-color: #e8f5e9;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.info-table td {
    padding: 8px;
    border: 1px solid var(--border-color);
    vertical-align: top;
}

.info-table .label {
    font-weight: bold;
    background-color: var(--light-gray);
    width: 30%;
}

.required::after {
    content: " *";
    color: red;
}

.section-title {
    margin: 20px 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
}

/* CRM status box */
.crm-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.crm-success {
    background-color: #e6f4ea;
    color: #137333;
    border: 1px solid #a8dab5;
}

.crm-error {
    background-color: #fce8e6;
    color: #c5221f;
    border: 1px solid #f5b7b1;
}

.crm-loading {
    background-color: #e8f0fe;
    color: #1a73e8;
    border: 1px solid #aecbfa;
}

/* Product table visibility */
#product-table {
    display: block;
}

#product-table.visible {
    display: table;
}

#display-tax-code {
    display: none;
}

/* Debug box */
.debug-info {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 12px;
    display: none;
}

/* Loading spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
button, #request-vat-btn, #back-to-search {
    position: relative;
    z-index: 20 !important;
    pointer-events: auto !important;
}

.card {
    position: relative;
    z-index: 10;
}

#crm-status {
    pointer-events: none !important;  /* CHẶN CRM overlay chặn click */
}

.swal2-container {
    z-index: 9999 !important; /* Để popup không chặn các phần khác */
}

button {
    position: relative;
    z-index: 10 !important;
}

.error-message, .success-message {
    position: relative !important;
    z-index: 1 !important;
    pointer-events: none;
}

