/**
 * Estilos parte pública - Contador de Llamadas
 * index.php (acceso) + dashboard.php (contador)
 */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base común */
body {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #e2e8f0;
    padding: 24px;
}

/* Index - pantalla de acceso */
body.pagina-index {
    font-size: 18px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Dashboard */
body.pagina-dashboard {
    max-width: 800px;
    margin: 0 auto;
}

/* === INDEX - Card de acceso === */
.card {
    background: rgba(30, 41, 59, 0.95);
    border-radius: 20px;
    padding: 48px 56px;
    width: 100%;
    max-width: 660px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.card h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #f8fafc;
}

.card > p {
    margin-bottom: 16px;
    color: #cbd5e1;
}

.card .sub {
    color: #94a3b8;
    font-size: 1rem;
    margin-bottom: 24px;
    margin-top: 24px;
}

.card input[type="email"],
.card input[type="text"] {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #334155;
    border-radius: 12px;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 1rem;
    margin-bottom: 16px;
}

.card input:focus {
    outline: none;
    border-color: #3b82f6;
}

.card .checkbox-label {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 1rem;
    color: #cbd5e1;
}

.card .checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    margin-right: 12px;
    flex-shrink: 0;
    accent-color: #3b82f6;
}

.card .checkbox-label.checkbox-newsletter {
    margin-bottom: 24px;
}

.card .checkbox-label a {
    color: #60a5fa;
    text-decoration: none;
}

.card .checkbox-label a:hover {
    text-decoration: underline;
}

.card button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
}

.card button:hover {
    opacity: 0.9;
}

.card .error {
    color: #f87171;
    font-size: 1rem;
    margin-bottom: 12px;
}

.card .msg {
    color: #4ade80;
    font-size: 1rem;
    margin-bottom: 12px;
}

.card .back {
    margin-top: 20px;
}

.card .back a {
    color: #60a5fa;
    text-decoration: none;
    font-size: 1rem;
}

/* === DASHBOARD === */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

.header .email {
    color: #94a3b8;
    font-size: 0.9rem;
}

.admin-link {
    color: #60a5fa;
    text-decoration: none;
    font-size: 0.9rem;
    margin-right: 16px;
}

.salir {
    color: #f87171;
    text-decoration: none;
    font-size: 0.9rem;
}

.salir:hover {
    text-decoration: underline;
}

.principal {
    text-align: center;
    margin-bottom: 40px;
}

.numero-grande {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    transition: transform 0.3s ease;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.label-hoy {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-top: 8px;
}

.acumuladas {
    margin-top: 16px;
    font-size: 0.95rem;
    color: #64748b;
}

.acumuladas strong {
    color: #94a3b8;
}

.btn-llamar {
    width: 100%;
    max-width: 280px;
    padding: 20px 32px;
    font-size: 1.25rem;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 auto 40px;
    display: block;
    font-family: inherit;
}

.btn-llamar.activo {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.btn-llamar.activo:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.4);
}

.btn-llamar.activo:active {
    transform: scale(0.92);
}

.btn-llamar.pulsando {
    animation: btnPulso 0.4s ease;
}

@keyframes btnPulso {
    0% { transform: scale(1); }
    30% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    50% { transform: scale(1.08); box-shadow: 0 0 30px 10px rgba(34, 197, 94, 0.3); }
    70% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

.numero-grande.celebrando {
    animation: numeroPulso 0.6s ease;
}

@keyframes numeroPulso {
    0% { transform: scale(1); }
    20% { transform: scale(1.15); }
    40% { transform: scale(0.95); }
    60% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.btn-llamar.esperando {
    background: #334155;
    color: #64748b;
    cursor: not-allowed;
    transform: none;
}

.btn-llamar .cuenta-regresiva {
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-llamar .btn-icon {
    vertical-align: middle;
}

.meta-2500 {
    text-align: center;
    margin: -20px auto 32px;
    padding: 16px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 12px;
    max-width: 380px;
}

.meta-2500 p {
    margin: 0 0 4px;
    font-size: 0.95rem;
    color: #94a3b8;
}

.meta-2500 .meta-sub {
    font-size: 1.1rem;
    color: #94a3b8;
    padding-top: 15px;
}

.seccion {
    margin-bottom: 32px;
}

.seccion h2 {
    font-size: 1rem;
    color: #94a3b8;
    margin-bottom: 12px;
    font-weight: 600;
}

.lista-7dias {
    background: rgba(30, 41, 59, 0.6);
    border-radius: 12px;
    padding: 16px;
}

.fila-dia {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(71, 85, 105, 0.5);
    font-size: 0.95rem;
}

.fila-dia:last-child {
    border-bottom: none;
}

.fila-dia .fecha {
    color: #94a3b8;
}

.fila-dia .cantidad {
    font-weight: 600;
}

.premios {
    margin-top: 24px;
}

.premio-item {
    display: block;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 10px;
    color: #fbbf24;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.premio-item:hover {
    background: rgba(251, 191, 36, 0.3);
}

.premio-item:not(a) {
    cursor: default;
}

.premio-tipo {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 6px;
    margin-right: 8px;
    font-weight: 600;
}

.premio-tipo-mental {
    background: rgba(139, 92, 246, 0.3);
    color: #a78bfa;
}

.premio-tipo-operativo {
    background: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.premio-tipo-identitario {
    background: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.premio-tipo-economico {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.sin-premios {
    color: #64748b;
    font-size: 0.9rem;
}

.toast-premio {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

.toast-premio a {
    color: white;
    text-decoration: underline;
}

.toast-premio .toast-tipo {
    opacity: 0.9;
    font-size: 0.85em;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Pie de página común */
.pie-pagina {
    text-align: center;
    padding: 24px;
    margin-top: 32px;
}

.pie-pagina a {
    color: #64748b;
    font-size: 0.9rem;
    text-decoration: none;
}

.pie-pagina a:hover {
    color: #94a3b8;
}

.dias-para-2500 {
    font-weight: bold;
}
