html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.titulo-naranja {
    color: #FF8800;
    font-weight: bold;
    letter-spacing: 1px;
}

.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.table-thin-header th {
    padding: 2px 4px !important;
    line-height: 1.5 !important;
    font-size: 0.9em;
}

#tablaReporte th,
#tablaReporte td {
    padding: 2px 4px !important;
    font-size: 0.85em !important;
    vertical-align: middle !important;
}

#tablaReporte th {
    white-space: nowrap;
}

#tablaReporte {
    width: 100% !important;
    max-width: 100%;
    table-layout: auto;
}

.encabezado-azul {
    background-color: #5D6D7E !important;
    color: white !important;
}

.gris-claro {
    background-color: #E0E0E0 !important;
    color: black !important;
}

.movimientos-details {
    margin-top: 15px;
}

.toggle-details {
    transition: all 0.3s ease;
    border: 1px solid #787878;
}

    .toggle-details:hover {
        background-color: #787878;
        border-color: #6c757d;
    }

.toggle-icon {
    transition: transform 0.3s ease;
}

.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.card-header {
    border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link {
    color: #000 !important;
}

    .nav-tabs .nav-link.active {
        color: #0d6efd !important;
    }

    .nav-tabs .nav-link:hover {
        color: #333 !important;
    }

/* === ESTILOS PARA REPORTE POSTURA === */

.postura-page-header {
    background-color: #2c3e50;
    color: white;
    padding: 1.5rem 2rem;
    margin: -1rem -1rem 2rem -1rem;
    border-bottom: 4px solid #34495e;
}

    .postura-page-header h4 {
        margin: 0;
        font-size: 1.5rem;
        font-weight: 600;
        letter-spacing: 0.3px;
    }

    .postura-page-header .meta-info {
        margin-top: 0.5rem;
        font-size: 0.9rem;
        color: #bdc3c7;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

.postura-tabla-wrapper {
    background: white;
    border: 1px solid #ddd;
    margin: 0 -1rem 1rem -1rem;
    overflow-x: auto;
}

.tabla-postura {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.85rem;
}

    /* Encabezados */
    .tabla-postura thead {
        background-color: #34495e;
        color: white;
    }

        .tabla-postura thead th {
            padding: 0.5rem 0.4rem;
            text-align: center;
            font-weight: 600;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border-right: 1px solid #495866;
            line-height: 1.2;
        }

            .tabla-postura thead th:last-child {
                border-right: none;
            }


    .tabla-postura tbody td {
        padding: 0.4rem 0.3rem;
        border-bottom: 1px solid #e8ebed;
        border-right: 1px solid #f0f2f4;
        vertical-align: middle;
        color: #2c3e50;
        font-size: 0.8rem;
    }

        .tabla-postura tbody td:last-child {
            border-right: none;
        }

    .tabla-postura tbody tr:hover {
        background-color: #f8f9fa;
    }

    .tabla-postura .celda-granja {
        background-color: #E8E8E8;
        color: #000 !important;
        font-weight: 600;
        text-align: center;
        font-size: 0.9rem;
        border-right: 1px solid #ccc !important;
        letter-spacing: 0.3px;
        padding: 0.4rem 0.3rem;
    }

    .tabla-postura .separacion-granja {
        border-top: 2px solid #2c3e50 !important;
    }


    .tabla-postura .col-granja {
        width: 10%;
    }

    .tabla-postura .col-lote {
        width: 8%;
        text-align: center;
        font-size: 0.9rem; 
        font-weight: 500;
    }

    .tabla-postura .col-casetas {
        width: 9%;
        text-align: left;
        padding-left: 0.5rem !important;
    }

    .tabla-postura .col-linea {
        width: 9%;
        text-align: center;
    }

    .tabla-postura .col-edad {
        width: 6%;
        text-align: center;
        font-weight: 500;
    }

    .tabla-postura .col-fase {
        width: 8%;
        text-align: center;
        text-transform: uppercase;
    }

    .tabla-postura .col-alimento {
        width: 10%;
        text-align: left;
    }

    .tabla-postura .col-encargado {
        width: 10%;
    }

    .tabla-postura .col-observaciones {
        width: 30%;
    }

    .tabla-postura input[type="text"],
    .tabla-postura textarea {
        width: 100%;
        border: 1px solid #d5dade;
        background: white;
        outline: none;
        font-size: 0.75rem;
        padding: 0.25rem 0.35rem;
        margin: 0;
        text-align: left;
        box-sizing: border-box;
        font-family: inherit;
        color: #2c3e50;
    }

    .tabla-postura textarea {
        resize: vertical;
        min-height: 28px;
        line-height: 1.3;
    }

        .tabla-postura input::placeholder,
        .tabla-postura textarea::placeholder {
            color: #95a5a6;
        }

        .tabla-postura input:focus,
        .tabla-postura textarea:focus {
            border-color: #3498db;
            background-color: #f8fbfe;
            outline: 1px solid #3498db;
        }

    .tabla-postura .col-encargado,
    .tabla-postura .col-observaciones {
        text-align: left;
        padding: 0.3rem 0.4rem;
    }

/* Solo estilos mínimos para la barra de acciones */
.postura-action-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-left: auto;
}

.postura-alert-warning {
    background-color: #fff8e1;
    border-color: #ffc107;
    color: #856404;
}

@media (max-width: 1400px) {
    .tabla-postura {
        font-size: 0.75rem;
    }

        .tabla-postura thead th {
            font-size: 0.7rem;
            padding: 0.4rem 0.3rem;
        }
}