/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
}

.datetime {
    text-align: right;
    font-size: 1.2rem;
}

.datetime #hora {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffd700;
}

/* Tarjetas */
.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.card h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

/* Botones */
.btn-dependencia {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 15px;
    cursor: pointer;
    text-align: left;
    font-size: 1.3rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-dependencia:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(66, 153, 225, 0.3);
}

.btn-icon {
    font-size: 2rem;
    margin-right: 15px;
    vertical-align: middle;
}

.btn-desc {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    text-decoration: none;
    text-align: center;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

/* Listas de espera */
.lista-espera {
    margin-top: 20px;
}

.item-espera {
    background: #f7fafc;
    border-left: 4px solid #4299e1;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.item-espera:hover {
    background: #edf2f7;
    transform: translateX(5px);
}

/* Grid layout */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Botón de llamar */
.btn-llamar {
    display: inline-block;
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    transition: all 0.3s;
}

.btn-llamar:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(237, 137, 54, 0.3);
}

.btn-llamar-large {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-llamar-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(237, 137, 54, 0.3);
}

/* Estado de salas */
.estado-salas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.sala-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.sala-card h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.contador {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contador .numero {
    font-size: 4rem;
    font-weight: bold;
    color: #4299e1;
    line-height: 1;
}

.contador .texto {
    color: #718096;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Info paciente */
.paciente-info {
    background: #f8fafc;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: #4a5568;
    font-weight: 500;
}

.info-row .value {
    color: #2d3748;
    font-weight: 600;
}

/* Colores de triage */
.triage-1 { color: #e53e3e !important; font-weight: bold; }
.triage-2 { color: #dd6b20 !important; font-weight: bold; }
.triage-3 { color: #d69e2e !important; font-weight: bold; }
.triage-4 { color: #38a169 !important; font-weight: bold; }

/* Acciones consultorio */
.acciones-consultorio {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-siguiente {
    flex: 1;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-rellamar {
    flex: 1;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-siguiente:hover, .btn-rellamar:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Historial */
.historial-llamados {
    margin-top: 20px;
}

.item-historial {
    background: #f7fafc;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.estado-llamando {
    color: #ed8936;
    font-weight: bold;
}

.estado-atendido {
    color: #48bb78;
    font-weight: bold;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #c6f6d5;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #fc8181;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .estado-salas {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }
    
    .datetime {
        margin-top: 15px;
    }
    
    .form-actions, .acciones-consultorio {
        flex-direction: column;
    }
    
    .info-row {
        flex-direction: column;
    }
}