body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background: #f0f2f5;
    color: #333;
}

/* ==============================
   LOGIN
   ============================== */
.login-container {
    max-width: 420px;
    margin: 60px auto;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    text-align: center;
}

.titulo-app {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
}

.input-email {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    border-radius: 8px;
    border: 1px solid #bbb;
}

.btn-primario {
    margin-top: 16px;
    width: 100%;
    padding: 12px;
    background: #4CAF50;
    border: none;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.btn-primario:hover {
    background: #45a047;
}

.mensaje-error {
    padding: 10px;
    background: #ffdddd;
    color: #a00;
    border-radius: 6px;
    margin-top: 10px;
}

/* ==============================
   PORTAL TUTOR - MÁS ANCHO
   ============================== */
.portal-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.lista-mascotas {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* TARJETAS MÁS ANCHAS Y MENOS ALTAS */
.card-mascota {
    width: 200px;
    height: 60px;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card-mascota:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}

.card-mascota h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.card-mascota .detalle-mascota,
.card-mascota .detalle-tutor {
    margin: 2px 0;
    font-size: 13px;
    color: #555;
    line-height: 1.3;
}

.separador {
    margin: 30px 0;
}

/* ==============================
   SUBTABS
   ============================== */
.tabs-submenu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.tab-sub {
    padding: 10px 18px;
    border: none;
    background: #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
    font-weight: 500;
}
.tab-sub.active {
    background: #4CAF50;
    color: white;
}
.tab-sub:hover {
    transform: translateY(-1px);
}

/* ==============================
   CONTENIDO TAB - MÁS ANCHO
   ============================== */
.tab-content {
    display: none;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    width: 100%;
}

.tab-content.active {
    display: block;
}

/* Fotos */
.foto-animal {
    width: 280px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-right: 15px;
    margin-bottom: 15px;
}

/* ============================
   HISTORIAL – tarjeta
   ============================ */
.card-historial {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    font-size: 14px;
}

.card-historial h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

/* Bloque "Estudios de laboratorio" */
.bloque-estudios-tutor h5 {
    margin: 12px 0 8px;
    font-size: 15px;
}

/* ============================
   HISTORIAL – estudios (grupos)
   ============================ */
.grupo-estudios-tutor {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
}

.grupo-resultado {
    border-radius: 8px;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #eee;
}

.header-grupo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.icono-grupo,
.icono-grupo-orina {
    font-size: 18px;
}

/* ============================
   HISTORIAL – bloques y columnas
   ============================ */
.bloque-estudio {
    margin-top: 6px;
    font-size: 14px;
}

.bloque-estudio.simple,
.bloque-estudio.otros {
    margin-top: 6px;
}

.fecha-estudio {
    font-weight: 600;
    margin-bottom: 8px;
}

.columnas-container {
    display: grid;
    gap: 8px;
}

.columna-resultados {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-resultado {
    display: flex;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 4px;
    background: #f7f7f7;
    font-size: 13.5px;
}

.item-resultado.alto {
    background: #ffecec;
    color: #b00000;
}

.item-resultado.bajo {
    background: #fff6e0;
    color: #8a5a00;
}

.texto-general-completo {
    font-size: 14px;
    line-height: 1.4;
}

/* ============================
   MEJOR SEPARACIÓN DE ESTUDIOS
   ============================ */

/* Caja por cada fecha */
.bloque-estudio {
    padding: 12px 15px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 18px;
}

/* Fecha grande y centrada */
.fecha-estudio {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #ccc;
}

/* Más separación entre grupos */
.grupo-resultado {
    margin-top: 12px;
    padding: 12px;
    border-radius: 10px;
}

/* Encabezado de cada tipo de estudio */
.header-grupo {
    font-size: 14px;
    padding-bottom: 6px;
}

/* Fondo más suave para columnas */
.columnas-container {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* Los ítems un poco más grandes */
.item-resultado {
    padding: 6px 10px;
    font-size: 14px;
}

/* Resaltar mejor altos/bajos */
.item-resultado.alto {
    background: #ffe5e5;
    border-left: 4px solid #c00;
}

.item-resultado.bajo {
    background: #fff4d6;
    border-left: 4px solid #c78b00;
}

/* ============================
   ICONO DORADO PARA ORINA
   ============================ */

.icono-orina,
.header-grupo .icono-grupo-orina {
    color: #DAA520; /* GoldenRod */
    filter: drop-shadow(0 0 1px rgba(218,165,32,0.4));
}

/* Borde/acento dorado para los grupos de Orina */
.grupo-resultado.orina {
    border-left: 4px solid #DAA520;
    background: #fffdf5; /* amarillo suave */
}

/* 💧 Icono dorado para ORINA */
.icono-grupo-orina {
    color: #DAA520 !important; /* GoldenRod */
}

/* ========================================== */
/*   SEPARACIÓN Y ESTILO DE BLOQUES DE ESTUDIO */
/* ========================================== */

.estudio-item {
    background: #ffffff;
    border: 1px solid #e7e7e7;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Fecha centrada y destacada */
.estudio-fecha {
    text-align: center;
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 1.1rem;
    color: #444;
}

/* Sangre */
.grupo-resultado.sangre {
    border-left: 4px solid #d9534f;
    padding-left: 15px;
}

/* Orina (dorado) */
.grupo-resultado.orina {
    border-left: 4px solid #DAA520;
    background: #fffdf2;
    padding-left: 15px;
}

.icono-grupo-orina {
    color: #DAA520 !important;
}

/* Otros */
.grupo-resultado.otros {
    border-left: 4px solid #5bc0de;
    padding-left: 15px;
}

/* Cada ítem dentro del estudio */
.item-resultado {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
}

/* Valor alto/bajo */
.item-resultado.alto .valor {
    color: red;
    font-weight: bold;
}
.item-resultado.bajo .valor {
    color: #c47a00;
    font-weight: bold;
}

/* ============================
   DIETA - MUCHO MÁS ANCHA
   ============================ */
#tab-dieta {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.dieta-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    overflow: hidden;
    margin: 0;
    width: 100%;
}

.dieta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.dieta-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dieta-content {
    height: 80vh;
    min-height: 600px;
    position: relative;
    width: 100%;
}

.dieta-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

.btn-descargar {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

.btn-descargar:hover {
    background: #45a047;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

/* Estados de carga para la dieta */
.dieta-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-size: 16px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(76, 175, 80, 0.2);
    border-left: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Eliminar estilos conflictivos anteriores */
.dieta-box {
    display: none;
}

/* ============================
   RESPONSIVE MEJORADO
   ============================ */
@media (max-width: 1200px) {
    .portal-container {
        max-width: 100%;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .portal-container {
        padding: 10px;
    }

    .lista-mascotas {
        gap: 15px;
    }

    .card-mascota {
        width: 100%;
        max-width: 300px;
        height: 110px;
    }

    .tabs-submenu {
        justify-content: center;
    }

    .tab-sub {
        flex: 1;
        min-width: 100px;
        text-align: center;
        font-size: 14px;
        padding: 8px 12px;
    }

    .dieta-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        padding: 15px 20px;
    }

    .dieta-content {
        height: 65vh;
        min-height: 400px;
    }

    .btn-descargar {
        width: 100%;
        justify-content: center;
    }

    .tab-content {
        padding: 20px;
    }

    .foto-animal {
        width: 100%;
        max-width: 300px;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 30px 15px;
        padding: 30px 20px;
    }

    .card-mascota {
        height: 100px;
        padding: 12px;
    }

    .card-mascota h3 {
        font-size: 16px;
    }

    .card-mascota .detalle-mascota,
    .card-mascota .detalle-tutor {
        font-size: 12px;
    }

    .dieta-content {
        height: 60vh;
    }
}

/* ======================
   INFO DEL TUTOR ARRIBA
   ====================== */
.info-tutor {
    background: #fff;
    padding: 18px 22px;
    margin-bottom: 22px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    font-size: 15px;
    line-height: 1.5;
}

.info-tutor b {
    color: #333;
}

.info-tutor-row {
    display: flex;
    justify-content: space-between;
    background: #fff;
    padding: 15px 18px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    font-size: 14px;
}

.info-tutor-row span {
    white-space: nowrap;
}

.pet-card-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    padding: 12px 10px;
}

.pet-icon {
    font-size: 20px;
}

.pet-name {
    font-weight: 600;
    font-size: 15px;
}

/* GRID DE DOS COLUMNAS */
.resumen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 25px;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* FECHAS EN UNA SOLA LÍNEA */
.resumen-fechas {
    display: flex;
    gap: 25px;
    white-space: nowrap;
    background: #fff;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-size: 14px;
}

.card-mascota {
    width: 190px;
    height: 60px;
    background: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    display: flex;
    align-items: center;
    justify-content: center; /* CENTRA TODO */
}

/* ÍCONO + NOMBRE */
.pet-card-line {
    display: flex;
    align-items: center;
    justify-content: center; /* centra horizontal */
    gap: 10px;
}

.pet-icon {
    font-size: 20px;
}

.pet-name {
    font-size: 17px;       /* un poquito más grande */
    font-weight: 600;
    text-align: center;
}
