/* Estilos base */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 10px;
}

.wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
}

/* Titulos */
.titulo-principal {
    font-size: clamp(24px, 4vw, 36px);
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    color: #352481;
}

.subtitulo {
    font-size: clamp(16px, 2.5vw, 22px);
    text-align: center;
    margin: 10px 0;
    color: #333;
}

/* Layout del dashboard */
.dashboard-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 100%;
}

/* Columnas */
.columna-izquierda,
.columna-derecha {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Tarjetas de porcentaje */
.tarjetas-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.tarjeta {
    flex: 1;
    min-height: 80px;
    color: white;
    border-radius: 12px;
    text-align: center;
    font-size: clamp(14px, 2vw, 18px);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Degradados de tarjetas */
.tarjeta-verde {
    background: linear-gradient(to bottom, #15c205, #30ec7e);
}

.tarjeta-amarilla {
    background: linear-gradient(to bottom, #cbee02, #d5e641);
}

.tarjeta-roja {
    background: linear-gradient(to bottom, #d60000, #ce4839);
}

/* Estado de conexion */
.tarjeta-estado {
    min-height: 50px;
    padding: 10px;
    font-size: clamp(12px, 1.5vw, 16px);
}

.tarjeta-conexion-verde {
    background: linear-gradient(to bottom, #21c800, #70c007);
    color: white;
}

.tarjeta-conexion-roja {
    background: linear-gradient(to bottom, #d32f2f, #b71c1c);
    color: white;
}

/* Boton de exportacion */
.boton-exportar {
    padding: 10px;
    border: none;
    background-color: #2980b9;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
}

/* Alertas */
.contenedor-alertas .alerta-naranja {
    background: linear-gradient(to bottom, #ff9800, #ef6c00);
    color: white;
    padding: 10px;
    font-weight: bold;
    border-radius: 10px;
    animation: parpadeo 1s infinite;
}

@keyframes parpadeo {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Tabla */
.tabla {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.tabla th, .tabla td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.tabla th {
    background-color: #007bff;
    color: white;
}

/* Grafico */
.grafico-linea {
    height: 200px;
    background-color: white;
    border-radius: 8px;
    padding: 10px;
}

/* Reloj y clima */
.info-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #fdfbfb, #ebedee); /* efecto suave */
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: clamp(14px, 1.5vw, 18px);
    color: #2c3e50;
    font-weight: 500;
    gap: 10px;
}

.reloj {
    font-weight: bold;
    font-size: 18px;
    color: #2c3e50;
}

.clima {
    font-style: italic;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.clima img {
    height: 32px;
    width: 32px;
    vertical-align: middle;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.2));
}

/* Barra superior para sesion */
.barra-superior {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #2c3e50, #34495e);
    padding: 10px 20px;
    color: white;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 16px;
}

.usuario-sesion {
    font-weight: bold;
}

.boton-logout {
    background-color: #c0392b;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.boton-logout:hover {
    background-color: #e74c3c;
}



/* RESPONSIVE */
@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .tarjetas-container {
        flex-direction: column;
    }

    .tarjeta,
    .boton-exportar {
        width: 100%;
    }

    .grafico-linea {
        height: 180px;
    }

    .info-container {
        flex-direction: column;
        gap: 10px;
    }

    .tabla th, .tabla td {
        font-size: 12px;
        padding: 6px;
    }

    .titulo-principal {
        font-size: 24px;
    }
}
.fila-entrada {
    background-color: #a2eea5; /* verde muy suave */
}

.fila-salida {
    background-color: #d49b9b; /* rojo muy suave */
}




.urgente {
    background-color: red;
    color: white;
}

.atendida {
    background-color: green;
    color: white;
}

.doctor-atendido {
    background-color: orange;
    color: white;
}

.llamada-doctor {
    background-color: blue;
    color: white;
}

#alarmas {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.alarma {
    border: 2px solid #333;
    padding: 10px;
    border-radius: 5px;
    width: 250px;
    text-align: center;
}

/* Estilos para usuarios.html */
.container-usuarios {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1em;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.btn:hover {
    background-color: #0056b3;
}

.alert {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2em;
}

table th,
table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

table th {
    background-color: #007bff;
    color: white;
}

/* Estilo login*/
.login-fondo {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
}

.login-card {
    background-color: white;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-card h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.login-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}

.login-form button {
    width: 100%;
    padding: 12px;
    background-color: #2980b9;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-form button:hover {
    background-color: #3498db;
}

.login-error {
    margin-top: 10px;
    color: #c0392b;
    background-color: #f8d7da;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
}
