/**
 * IGV Calculator - Estilos
 * Versión 2.3
 */

/* ----------------------------------------
   RESET Y ESTILOS BASE
   ---------------------------------------- */
.igv-calculator *, .igv-calculator *::before, .igv-calculator *::after {
    box-sizing: border-box;
}

.igv-calculator {
    max-width: 900px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: #333;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ----------------------------------------
   ENCABEZADO
   ---------------------------------------- */
.igv-calculator .calculator-header {
    background: linear-gradient(to right, #191970, #0047AB);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.igv-calculator .calculator-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.igv-calculator .calculator-header .version {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
}

/* ----------------------------------------
   SISTEMA DE TABS
   ---------------------------------------- */
.igv-calculator .tab-container {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.igv-calculator .tab-btn {
    padding: 15px 20px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    outline: none;
    flex: 1;
    text-align: center;
}

.igv-calculator .tab-btn i {
    margin-right: 8px;
}

.igv-calculator .tab-btn.active {
    color: #191970;
    background-color: #fff;
    border-bottom: 3px solid #191970;
}

.igv-calculator .tab-btn:hover:not(.active) {
    color: #444;
    background-color: #f0f0f5;
}

.igv-calculator .tab-content {
    display: none;
    padding: 25px;
}

.igv-calculator .tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ----------------------------------------
   CALCULADORA IGV
   ---------------------------------------- */
.igv-calculator .rate-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.igv-calculator .rate-control {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    vertical-align: middle;
}

.igv-calculator .rate-label {
    margin-right: 12px;
    font-weight: 500;
    color: #444;
    font-size: 15px;
}

.igv-calculator .rate-input-wrapper {
    position: relative;
    display: inline-flex;
}

.igv-calculator #igv-rate {
    width: 80px;
    padding: 10px;
    padding-right: 30px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: right;
    font-size: 15px;
    transition: all 0.2s;
}

.igv-calculator #igv-rate:focus {
    border-color: #191970;
    box-shadow: 0 0 0 2px rgba(25, 25, 112, 0.2);
    outline: none;
}

.igv-calculator .rate-symbol {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
}

.igv-calculator .controls-flex-row {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

.igv-calculator .rate-buttons {
    display: inline-flex;
    gap: 10px;
}

.igv-calculator .rate-btn {
    padding: 10px 18px;
    border: 1px solid #191970;
    border-radius: 6px;
    background: white;
    color: #191970;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 15px;
    min-width: 80px;
}

.igv-calculator .rate-btn.active {
    background: #191970;
    color: white;
}

.igv-calculator .rate-btn:hover:not(.active) {
    background: #f0f0f5;
}

/* Selector de moneda */
.igv-calculator .currency-select {
    padding: 10px 15px;
    border: 1px solid #191970;
    border-radius: 6px;
    min-width: 80px;
    max-width: 100px;
    outline: none;
    font-size: 15px;
    font-weight: 500;
    background-color: white;
    cursor: pointer;
    color: #191970;
    text-align: center;
    vertical-align: middle;
}

.igv-calculator .currency-select:focus {
    border-color: #191970;
    box-shadow: 0 0 0 2px rgba(25, 25, 112, 0.2);
}

.igv-calculator .calc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
    text-align: center;
}

@media (min-width: 768px) {
    .igv-calculator .calc-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.igv-calculator .input-group {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.igv-calculator .input-group:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.igv-calculator .input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
    font-size: 14px;
}

.igv-calculator .input-wrapper {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    overflow: hidden;
}

.igv-calculator .currency {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    font-weight: 500;
}

.igv-calculator .calc-input {
    width: 100%;
    padding: 12px;
    padding-left: 35px;
    padding-right: 12px;
    border: none;
    background: transparent;
    font-size: 16px;
    text-align: right;
    outline: none;
}

.igv-calculator .calc-input:focus {
    outline: none;
}

.igv-calculator .input-wrapper:focus-within {
    border-color: #191970;
    box-shadow: 0 0 0 2px rgba(25, 25, 112, 0.2);
}

/* Resultados */
.igv-calculator .results-section {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.igv-calculator .results-header {
    background: linear-gradient(to right, #f0f0f5, #e6e6fa);
    padding: 15px 20px;
    font-weight: 600;
    color: #444;
    border-bottom: 1px solid #e0e0e0;
    font-size: 16px;
    text-align: center;
}

.igv-calculator .results-body {
    padding: 20px;
}

.igv-calculator .result-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.igv-calculator .result-row:last-child {
    border-bottom: none;
}

.igv-calculator .result-row.total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #e0e0e0;
}

.igv-calculator .result-label {
    font-weight: 500;
    color: #555;
    font-size: 15px;
}

.igv-calculator .result-value {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.igv-calculator .result-row.total .result-label,
.igv-calculator .result-row.total .result-value {
    font-weight: 700;
    color: #191970;
    font-size: 18px;
}

.igv-calculator .amount-words {
    padding: 15px;
    text-align: center;
    background-color: #f0f0f5;
    color: #191970;
    font-style: italic;
    font-weight: 500;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
}

/* Media queries para layout responsive */
@media (max-width: 767px) {
    .igv-calculator .rate-section {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .igv-calculator .rate-control, 
    .igv-calculator .controls-flex-row {
        width: 100%;
        justify-content: center;
        margin-right: 0;
    }
    
    .igv-calculator .rate-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .igv-calculator .currency-select {
        margin-top: 10px;
    }
}

@media (min-width: 768px) {
    .igv-calculator .rate-section {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .igv-calculator .controls-flex-row {
        justify-content: flex-end;
    }
}

/* ----------------------------------------
   SIMULADOR DE FACTURA
   ---------------------------------------- */
.igv-calculator .invoice-form {
    background-color: white;
}

.igv-calculator .form-section {
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.igv-calculator .section-title {
    background: linear-gradient(to right, #f0f0f5, #e6e6fa);
    padding: 15px 20px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #444;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

.igv-calculator .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
}

@media (min-width: 768px) {
    .igv-calculator .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.igv-calculator .form-group {
    margin-bottom: 10px;
}

.igv-calculator .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #444;
    font-size: 14px;
}

.igv-calculator .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s;
}

.igv-calculator .form-control:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 2px rgba(25, 25, 112, 0.2);
}

.igv-calculator textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.igv-calculator .form-control.invalid {
    border-color: #d32f2f;
    background-color: #ffebee;
}

.igv-calculator .form-control.valid {
    border-color: #2e7d32;
    background-color: #e8f5e9;
}

/* Items Section */
.igv-calculator .items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(to right, #f0f0f5, #e6e6fa);
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap; /* Permitir wrap en pantallas pequeñas */
    gap: 10px;
}

.igv-calculator .items-header .section-title {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    min-width: 200px; /* Asegurar espacio mínimo */
}

.igv-calculator .add-item-btn {
    max-width: 150px; /* Limitar ancho máximo */
    white-space: nowrap; /* Evitar que el texto se rompa */
}

.igv-calculator .items-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    padding: 20px;
}

.igv-calculator .items-table {
    width: 100%;
    min-width: 600px; /* Ancho mínimo para asegurar que todas las columnas sean visibles */
    border-collapse: collapse;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    table-layout: fixed; /* Mantener tamaños de columna consistentes */
}

.igv-calculator .items-table th {
    background: linear-gradient(to right, #f0f0f5, #e6e6fa);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #444;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.igv-calculator .items-table td {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

.igv-calculator .items-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.igv-calculator .items-table input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.igv-calculator .items-table input:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 2px rgba(25, 25, 112, 0.2);
}

.igv-calculator .item-price-wrapper {
    position: relative;
}

.igv-calculator .item-currency {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    font-size: 14px;
}

.igv-calculator .item-price {
    padding-left: 25px !important;
    text-align: right;
}

.igv-calculator .item-subtotal {
    font-weight: 600;
    color: #333;
    text-align: right;
}

.igv-calculator .remove-item {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background-color: #d32f2f;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.2s;
    font-size: 14px;
}

.igv-calculator .remove-item:hover {
    background-color: #b71c1c;
}

/* Totals Section */
.igv-calculator .totals-section {
    margin-bottom: 25px;
}

.igv-calculator .totals-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
}

@media (min-width: 768px) {
    .igv-calculator .totals-layout {
        grid-template-columns: 1fr 350px;
    }
}

.igv-calculator .notes-area {
    padding-right: 0; /* Reducir padding innecesario */
    margin-bottom: 20px; /* Agregar espacio para botones */
}

@media (min-width: 768px) {
    .igv-calculator .notes-area {
        padding-right: 20px;
    }
}

.igv-calculator .invoice-summary {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.igv-calculator .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.igv-calculator .summary-row:last-child {
    border-bottom: none;
}

.igv-calculator .summary-row span:first-child {
    color: #555;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.igv-calculator .summary-row span:last-child {
    font-weight: 600;
    color: #333;
}

.igv-calculator .summary-row.total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #191970;
}

.igv-calculator .summary-row.total span:first-child {
    font-weight: 700;
    color: #333;
    font-size: 16px;
}

.igv-calculator .summary-row.total span:last-child {
    font-weight: 700;
    color: #191970;
    font-size: 18px;
}

/* Control de tasa IGV en factura */
.igv-calculator .invoice-rate-control {
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
}

.igv-calculator .change-rate-btn {
    background: none;
    border: none;
    color: #191970;
    cursor: pointer;
    padding: 2px 5px;
    font-size: 12px;
    margin-left: 5px;
    transition: all 0.2s;
    border-radius: 4px;
}

.igv-calculator .change-rate-btn:hover {
    background-color: rgba(25, 25, 112, 0.1);
}

.igv-calculator .invoice-rate-input-wrapper {
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
}

.igv-calculator #invoice_igv_rate_input {
    width: 50px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: right;
    font-size: 12px;
}

.igv-calculator .apply-rate-btn {
    background: #191970;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 12px;
    border-radius: 4px;
    margin-left: 5px;
}

.igv-calculator .apply-rate-btn:hover {
    background-color: #121252;
}

.igv-calculator .invoice-amount-words {
    margin-top: 15px;
    padding: 12px;
    text-align: center;
    background-color: #f0f0f5;
    color: #191970;
    font-style: italic;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.igv-calculator .invoice-actions {
    display: flex;
    flex-wrap: wrap; /* Permitir wrap en pantallas pequeñas */
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
}

.igv-calculator .add-item-btn,
.igv-calculator .preview-invoice-btn,
.igv-calculator .download-btn {
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: none;
    font-size: 14px;
}

.igv-calculator .add-item-btn {
    background-color: #191970;
    color: white;
}

.igv-calculator .add-item-btn:hover {
    background-color: #121252;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.igv-calculator .preview-invoice-btn {
    background-color: #555;
    color: white;
}

.igv-calculator .preview-invoice-btn:hover {
    background-color: #444;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.igv-calculator .download-btn {
    background-color: #191970;
    color: white;
}

.igv-calculator .download-btn:hover {
    background-color: #121252;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ----------------------------------------
   MODAL DE VISTA PREVIA
   ---------------------------------------- */
.igv-calculator .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    overflow: auto;
}

.igv-calculator .modal.show {
    display: block;
    animation: fadeIn 0.3s;
}

.igv-calculator .modal-content {
    position: relative;
    margin: 30px auto;
    width: 90%;
    max-width: 900px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.igv-calculator .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(to right, #f0f0f5, #e6e6fa);
    border-radius: 10px 10px 0 0;
}

.igv-calculator .modal-header h3 {
    margin: 0;
    font-weight: 600;
    color: #333;
    font-size: 18px;
}

.igv-calculator .close-modal {
    font-size: 24px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
}

.igv-calculator .close-modal:hover {
    color: #d32f2f;
}

.igv-calculator .modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.igv-calculator .modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    gap: 15px;
    background-color: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

.igv-calculator .modal-btn {
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: none;
    font-size: 14px;
}

.igv-calculator .print-btn {
    background-color: #555;
    color: white;
}

.igv-calculator .print-btn:hover {
    background-color: #444;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.igv-calculator .loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    color: #555;
}

.igv-calculator .loading i {
    font-size: 40px;
    margin-bottom: 20px;
    animation: spin 1s linear infinite;
    color: #191970;
}

.igv-calculator .loading p {
    font-size: 16px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mensaje de error en vista previa */
.igv-calculator .error-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    color: #d32f2f;
}

.igv-calculator .error-preview i {
    font-size: 50px;
    margin-bottom: 20px;
    color: #d32f2f;
}

.igv-calculator .error-preview p {
    font-size: 16px;
    text-align: center;
    max-width: 500px;
}

/* ----------------------------------------
   MENSAJES DE ERROR
   ---------------------------------------- */
.igv-calculator .error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-left: 4px solid #d32f2f;
    padding: 15px 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    z-index: 200000;
    animation: slideIn 0.3s;
    border-radius: 6px;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.igv-calculator .error-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #d32f2f;
    font-size: 16px;
}

.igv-calculator .error-content {
    color: #444;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.igv-calculator .error-close {
    padding: 6px 12px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    float: right;
    font-size: 13px;
    transition: all 0.2s;
}

.igv-calculator .error-close:hover {
    background-color: #e0e0e0;
}

/* ----------------------------------------
   ESTILOS DE VISTA PREVIA DE FACTURA
   ---------------------------------------- */
.igv-calculator .invoice-container {
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid #eee;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    background-color: #fff;
}

.igv-calculator .header {
    padding: 20px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #191970, #0047AB);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.igv-calculator .company-info {
    flex: 1;
}

.igv-calculator .company-logo {
    font-size: 20px;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    margin-bottom: 5px;
}

.igv-calculator .company-details {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    line-height: 1.5;
}

.igv-calculator .invoice-box {
    background-color: white;
    padding: 15px;
    width: 200px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-left: 20px;
}

.igv-calculator .invoice-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 6px;
    text-transform: uppercase;
    color: #191970;
}

.igv-calculator .invoice-number {
    font-size: 15px;
    font-weight: bold;
    color: #191970;
    padding: 6px 0;
    border-top: 1px dashed #eee;
    margin-top: 5px;
}

.igv-calculator .info-section {
    padding: 20px;
    margin: 15px;
    background-color: #f9f9f9;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .igv-calculator .info-section {
        flex-direction: row;
        justify-content: space-between;
    }
}

.igv-calculator .info-title {
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 14px;
    color: #191970;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

.igv-calculator .info-item {
    margin-bottom: 10px;
}

.igv-calculator .info-label {
    font-weight: bold;
    display: inline-block;
    min-width: 120px;
    font-size: 12px;
    color: #555;
}

.igv-calculator .info-value {
    display: inline-block;
    color: #333;
    font-size: 12px;
}

.igv-calculator .info-dates {
    width: 100%;
    margin-top: 15px;
}

.igv-calculator .info-client {
    width: 100%;
}

@media (min-width: 768px) {
    .igv-calculator .info-dates {
        width: 48%;
        margin-top: 0;
    }
    
    .igv-calculator .info-client {
        width: 48%;
    }
}

.igv-calculator .items-section {
    margin: 15px;
}

.igv-calculator .invoice-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.igv-calculator .invoice-table th {
    background: linear-gradient(to right, #f0f0f5, #e6e6fa);
    border: none;
    padding: 12px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    color: #191970;
}

.igv-calculator .invoice-table td {
    border: none;
    border-bottom: 1px solid #eee;
    padding: 10px 12px;
    font-size: 12px;
}

.igv-calculator .invoice-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.igv-calculator .invoice-table tr:last-child td {
    border-bottom: none;
}

.igv-calculator .text-right {
    text-align: right;
}

.igv-calculator .text-center {
    text-align: center;
}

.igv-calculator .totals-section {
    margin: 15px;
    text-align: right;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.igv-calculator .total-row {
    margin: 8px 0;
}

.igv-calculator .total-label {
    display: inline-block;
    min-width: 150px;
    text-align: right;
    font-weight: bold;
    margin-right: 25px;
    color: #555;
}

.igv-calculator .total-amount {
    display: inline-block;
    min-width: 100px;
    text-align: right;
    font-weight: bold;
    color: #333;
}

.igv-calculator .grand-total {
    font-size: 16px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 2px solid #191970;
    color: #191970;
}

.igv-calculator .amount-words {
    margin: 15px;
    padding: 15px;
    border-radius: 12px;
    background-color: #f0f0f5;
    font-style: italic;
    color: #191970;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-size: 13px;
}

.igv-calculator .legal-disclaimer {
    text-align: center;
    margin: 15px;
    padding: 12px;
    background-color: #ffe6e6;
    color: #c00;
    font-weight: bold;
    border-radius: 12px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

/* ----------------------------------------
   UTILITARIOS
   ---------------------------------------- */
.igv-calculator .invalid {
    border-color: #d32f2f !important;
    background-color: #ffebee !important;
}

.igv-calculator .valid {
    border-color: #2e7d32 !important;
    background-color: #e8f5e9 !important;
}

/* ----------------------------------------
   ESTILOS DE IMPRESIÓN
   ---------------------------------------- */
@media print {
    body * {
        visibility: hidden;
    }
    
    .igv-calculator #invoice-preview, 
    .igv-calculator #invoice-preview * {
        visibility: visible;
    }
    
    .igv-calculator #invoice-preview {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    .igv-calculator .modal-footer, 
    .igv-calculator .modal-header, 
    .igv-calculator .legal-disclaimer {
        display: none !important;
    }
}

/* Definir tamaños de columna para la tabla */
.igv-calculator .invoice-table .cant-col {
    width: 8%;
}
.igv-calculator .invoice-table .um-col {
    width: 8%;
}
.igv-calculator .invoice-table .cod-col {
    width: 8%;
}
.igv-calculator .invoice-table .desc-col {
    width: 46%;
}
.igv-calculator .invoice-table .vu-col,
.igv-calculator .invoice-table .pu-col,
.igv-calculator .invoice-table .imp-col {
    width: 10%;
}