* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.2em;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.servicio-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
}

.servicio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.servicio-card h3 {
    color: white;
    font-size: 1.5em;
    margin-bottom: 20px;
}

.btn-generar {
    background: white;
    color: #667eea;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-generar:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.turno-generado {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border-radius: 20px;
    color: white;
    margin-bottom: 40px;
}

.turno-generado h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

.numero-turno {
    font-size: 5em;
    font-weight: bold;
    margin: 30px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.turno-generado p {
    font-size: 1.3em;
    margin: 10px 0;
}

.btn-print, .btn-nuevo {
    display: inline-block;
    background: white;
    color: #11998e;
    padding: 15px 30px;
    margin: 10px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-print:hover, .btn-nuevo:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

footer {
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

footer a {
    display: inline-block;
    margin: 10px;
    padding: 12px 25px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s;
}

footer a:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

/* Login */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Pantalla Pública */
.pantalla-publica {
    background: #000;
    color: white;
    min-height: 100vh;
    padding: 0;
}

.pantalla-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    text-align: center;
}

.pantalla-header h1 {
    color: white;
    font-size: 3em;
    margin-bottom: 10px;
}

.turno-actual {
    padding: 60px;
    text-align: center;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    margin: 40px;
    border-radius: 20px;
}

.turno-actual h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

.turno-actual .numero {
    font-size: 8em;
    font-weight: bold;
    margin: 30px 0;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
}

.turno-actual .ventanilla {
    font-size: 3em;
    margin-top: 20px;
}

/* Grid de turnos llamados */
.turnos-llamados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    padding: 40px;
    max-width: 1800px;
    margin: 0 auto;
}

.turno-llamado-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.turno-llamado-card h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    opacity: 0.9;
}

.numero-grande {
    font-size: 5em;
    font-weight: bold;
    margin: 20px 0;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
}

.servicio-texto {
    font-size: 1.4em;
    margin: 15px 0;
    opacity: 0.95;
}

.cubiculo-texto {
    margin-top: 20px;
}

.cubiculo-badge {
    display: inline-block;
    background: rgba(255,255,255,0.3);
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.8em;
    font-weight: bold;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.turnos-espera {
    padding: 40px;
    margin: 40px;
    background: #1a1a1a;
    border-radius: 20px;
}

.turnos-espera h3 {
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
}

.lista-espera {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.turno-espera-item {
    background: #333;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.5em;
}

/* Panel Operador */
.panel-operador {
    padding: 20px;
}

.panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
}

.filtros {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.filtros select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    margin-right: 10px;
}

.tabla-turnos {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tabla-turnos table {
    width: 100%;
    border-collapse: collapse;
}

.tabla-turnos th {
    background: #667eea;
    color: white;
    padding: 15px;
    text-align: left;
}

.tabla-turnos td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.tabla-turnos tr:hover {
    background: #f9f9f9;
}

.btn-llamar {
    background: #11998e;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.btn-llamar:hover {
    background: #0d7a6f;
}

.btn-atender {
    background: #38ef7d;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.btn-cancelar {
    background: #f5576c;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.estado {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
}

.estado-en_espera {
    background: #fff3cd;
    color: #856404;
}

.estado-llamado {
    background: #d1ecf1;
    color: #0c5460;
}

.estado-atendido {
    background: #d4edda;
    color: #155724;
}

.estado-no_atendido {
    background: #fff3cd;
    color: #856404;
}

.estado-perdido {
    background: #f8d7da;
    color: #721c24;
}

.estado-errado {
    background: #e2e3e5;
    color: #383d41;
}

.estado-cancelado {
    background: #f8d7da;
    color: #721c24;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
}

.modal-content h2 {
    margin-top: 0;
    color: #667eea;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

@media print {
    body * {
        visibility: hidden;
    }
    .turno-generado, .turno-generado * {
        visibility: visible;
    }
    .turno-generado {
        position: absolute;
        left: 0;
        top: 0;
    }
    .btn-print, .btn-nuevo {
        display: none;
    }
}
