/* ==========================================
   ESTILOS GENERALES
========================================== */

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
}

button {
    cursor: pointer;
}

/* ==========================================
   BOTONES GENERALES
========================================== */

.btnAdd {
    padding: 6px 10px;
    background: #B8C320;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 22px;
    line-height: 1;
    transition: 0.15s;
}

.btnAdd:hover {
    filter: brightness(1.15);
}

.btnDelete {
    background: #cc0000;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.btnDelete:hover {
    filter: brightness(1.2);
}

/* ==========================================
   TABLA DE TARIFA
========================================== */

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

/* Cabecera */
#tabla-tarifa th {
    background: #B8C320 !important;
    color: white !important;
    font-weight: bold;
    padding: 10px 5px;
    text-align: center !important;
    position: sticky;
    top: 0;
    z-index: 5;
}

/* Columnas */
#tabla-tarifa th:nth-child(1),
#tabla-tarifa td:nth-child(1) {
    width: 18%;
    text-align: left;
    padding-left: 10px;
}

#tabla-tarifa th:nth-child(2),
#tabla-tarifa td:nth-child(2) {
    width: 50%;
    text-align: left;
    padding-left: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tabla-tarifa th:nth-child(3),
#tabla-tarifa td:nth-child(3),
#tabla-tarifa th:nth-child(4),
#tabla-tarifa td:nth-child(4) {
    width: 10%;
    text-align: right;
    padding-right: 10px;
}

#tabla-tarifa th:nth-child(5),
#tabla-tarifa td:nth-child(5) {
    width: 12%;
    text-align: center;
}

#tabla-tarifa td {
    padding: 12px 5px;
    font-size: 15px;
    border-bottom: 1px solid #e5e5e5;
}

#tabla-tarifa tr:hover {
    background: #fafafa;
}

/* ==========================================
   RESALTADO DE BÚSQUEDA
========================================== */

mark {
    background: #B8C320;
    color: white;
    padding: 1px 3px;
    border-radius: 4px;
}

/* ==========================================
   PRESUPUESTO
========================================== */

#presupuesto-container table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

#presupuesto-container th {
    background: #B8C320;
    color: white;
    padding: 10px;
    font-weight: bold;
    text-align: center;
}

/* CÓDIGO */
#presupuesto-body td:nth-child(1) {
    width: 14%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* DESCRIPCIÓN – MUY ANCHA */
#presupuesto-body td:nth-child(2) {
    width: 54%;
    max-width: 54%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}

/* Uds */
#presupuesto-body td:nth-child(3) {
    width: 6%;
    text-align: right;
    white-space: nowrap;
}

/* PVP */
#presupuesto-body td:nth-child(4) {
    width: 6%;
    text-align: right;
    white-space: nowrap;
}

/* Dto */
#presupuesto-body td:nth-child(5) {
    width: 8%;
    text-align: center;
    white-space: nowrap;
}

/* Neto */
#presupuesto-body td:nth-child(6) {
    width: 6%;
    text-align: right;
    white-space: nowrap;
}

/* Total */
#presupuesto-body td:nth-child(7) {
    width: 6%;
    text-align: right;
    white-space: nowrap;
}

/* Acción */
#presupuesto-body td:nth-child(8) {
    width: 4%;
    text-align: center;
    white-space: nowrap;
}

/* Filas */
#presupuesto-body td {
    padding: 10px 6px;
    border-bottom: 1px solid #ddd;
    font-size: 15px;
}

/* Hover */
#presupuesto-body tr:hover {
    background: #f7f7f7;
}

/* ==========================================
   MODAL OFERTA
========================================== */

#modal-oferta {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: flex-start;
    padding-top: 30px;
}

#plantilla-oferta {
    background: white;
    width: 800px;
    padding: 30px;
    border-radius: 8px;
}

#cerrarModal {
    background: #cc0000;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 15px;
}

#cerrarModal:hover {
    filter: brightness(1.2);
}
