.galeria {
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-top:15px;
}
.galeria img {
    width:120px;
    height:90px;
    object-fit:cover;
    border-radius:8px;
    cursor:pointer;
    box-shadow:0 2px 6px rgba(0,0,0,.2);
}
.modal {
    display:none;
    position:fixed;
    top:0;left:0;
    width:100%;height:100%;
    background:rgba(0,0,0,.85);
    justify-content:center;
    align-items:center;
    z-index:999;
}
.modal img {
    max-width:90%;
    max-height:90%;
}

/* =============================== */
/* LAYOUT GENERAL DEL SISTEMA      */
/* =============================== */

.layout {
    display: flex;
    margin-top: 130px; /* evita que el header lo tape */
}

/* =============================== */
/* SIDEBAR LATERAL IZQUIERDO       */
/* =============================== */

.sidebar {
    width: 250px;
    min-height: calc(100vh - 120px);
    background: linear-gradient(180deg, #00524C, #2F9E56);
    padding: 25px 10px;
    color: white;
    box-shadow: 4px 0px 10px rgba(0,0,0,0.2);
    position: fixed;
    top: 120px;
    left: 0;
}

.sidebar-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: bold;
}

/* BOTONES DEL SIDEBAR */
.side-btn {
    display: block;
    background: white;
    border: 2px solid #A6E57A;
    color: #00524C;
    padding: 12px;
    text-align: center;
    border-radius: 10px;
    margin: 10px 0;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
}

.side-btn:hover {
    background: #A6E57A;
    color: #003B2F;
}

/* BOTÓN ROJO PARA CERRAR SESIÓN */
.logout {
    border-color: red;
    color: red;
}

.logout:hover {
    background: red;
    color: white;
}

/* =============================== */
/* CONTENIDO PRINCIPAL             */
/* =============================== */

.content {
    margin-left: 270px; /* espacio para el sidebar */
    padding: 40px;
    width: calc(100% - 270px);
    background: #f7f7f7;
}

/* =============================== */
/* TARJETAS (CARDS)                */
/* =============================== */

.card {
    max-width: 900px;
    margin: auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* =============================== */
/* BOTONES                        */
/* =============================== */

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: white;
    color: #8BC34A;
    border: 2px solid #8BC34A;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    font-size: 16px;
}

.btn:hover {
    background: #8BC34A;
    color: white;
}

/* =============================== */
/* INPUTS                         */
/* =============================== */

input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ccc;
    border-radius: 10px;
    margin-top: 8px;
    font-size: 16px;
}

/* =============================== */
/* TABLAS                         */
/* =============================== */

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th {
    background: #004d40;
    color: white;
    padding: 12px;
    text-align: left;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid #ccc;
}

/* LINKS DE ACCIONES */
.link {
    color: #00524C;
    font-weight: bold;
    text-decoration: none;
}

.link:hover {
    color: #2F9E56;
}

.link.delete {
    color: red;
}

.link.delete:hover {
    color: darkred;
}

/* ===== FORZAR TAMAÑO MINIATURAS GALERÍA ===== */
.content .galeria img {
    width: 120px !important;
    height: 90px !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover;
}

/* ===============================
   CHAT OBSERVACIONES
================================ */

.chat-box {
    width: 70%;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    height: 75vh;
    overflow-y: auto;
}

.bubble {
    padding: 12px 18px;
    border-radius: 12px;
    max-width: 70%;
    margin-bottom: 15px;
    word-wrap: break-word;
}

/* ADMIN */
.bubble.admin {
    background: #00524C;
    color: white;
    margin-left: auto;
}

/* USUARIO */
.bubble.user {
    background: #ffffff;
    border: 2px solid #2F9E56;
    color: #004d40;
    margin-right: auto;
}

.time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
}
