/**
 * public/css/asistencia-kiosk.css
 * Estilos para el Kiosco Táctil de Asistencia de Personal (Pantalla Touch en la Entrada del Restaurante).
 * Diseñado bajo las especificaciones de Arquitecto de Software:
 * Paleta corporativa: Navy #060B26, Naranja #FF7A0D, Verde #10B981, Fondo limpio #F8FAFC.
 */

/* =========================================================================
   1. TARJETAS DE ACCESO DIRECTO EN EL HUB PRINCIPAL
   ========================================================================= */
.hub-portal-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
    margin-bottom: 30px !important;
}

@media (max-width: 850px) {
    .hub-portal-grid {
        grid-template-columns: 1fr !important;
    }
}

.hub-portal-card {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 20px rgba(6, 11, 38, 0.06);
    position: relative;
    overflow: hidden;
    user-select: none;
    border: 2px solid #E2E8F0;
    min-height: 260px;
}

.hub-portal-card:active {
    transform: scale(0.98);
}

.hub-portal-card.card-portal-asistencia {
    background: linear-gradient(145deg, #FFFFFF 0%, #F0FDF4 100%);
    border-color: #A7F3D0;
}

.hub-portal-card.card-portal-asistencia:hover {
    border-color: #10B981;
    box-shadow: 0 14px 34px rgba(16, 185, 129, 0.2);
    transform: translateY(-4px);
}

.hub-portal-card.card-portal-pos {
    background: linear-gradient(145deg, #FFFFFF 0%, #FFF7ED 100%);
    border-color: #FED7AA;
}

.hub-portal-card.card-portal-pos:hover {
    border-color: #FF7A0D;
    box-shadow: 0 14px 34px rgba(255, 122, 13, 0.2);
    transform: translateY(-4px);
}

.portal-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.portal-icon-box {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.portal-icon-asistencia {
    background: #10B981;
    color: #FFFFFF;
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.35);
}

.portal-icon-pos {
    background: #FF7A0D;
    color: #FFFFFF;
    box-shadow: 0 8px 18px rgba(255, 122, 13, 0.35);
}

.portal-badge-pill {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pill-green-soft {
    background: #DCFCE7;
    color: #047857;
    border: 1px solid #A7F3D0;
}

.pill-orange-soft {
    background: #FFEDD5;
    color: #C2410C;
    border: 1px solid #FED7AA;
}

.portal-card-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #060B26;
    margin: 0 0 8px 0;
    font-family: 'Outfit', sans-serif;
}

.portal-card-desc {
    font-size: 0.92rem;
    color: #64748B;
    margin: 0 0 20px 0;
    line-height: 1.45;
}

.portal-card-btn-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.92rem;
    transition: all 0.2s;
}

.action-green {
    background: #10B981;
    color: #FFFFFF;
}

.hub-portal-card.card-portal-asistencia:hover .action-green {
    background: #059669;
}

.action-orange {
    background: #FF7A0D;
    color: #FFFFFF;
}

.hub-portal-card.card-portal-pos:hover .action-orange {
    background: #EA580C;
}

/* Botón de retorno al portal principal */
.hub-back-to-portal-btn {
    background: #FFFFFF;
    border: 1.5px solid #CBD5E1;
    color: #060B26;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.18s;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.hub-back-to-portal-btn:hover {
    background: #F1F5F9;
    border-color: #94A3B8;
    transform: translateX(-2px);
}

.hub-asistencia-dual-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    margin-bottom: 28px !important;
}

@media (max-width: 768px) {
    .hub-asistencia-dual-grid {
        grid-template-columns: 1fr !important;
    }
}

.hub-asistencia-card {
    background: #FFFFFF;
    border-radius: 18px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(6, 11, 38, 0.05);
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.hub-asistencia-card:active {
    transform: scale(0.98);
}

.hub-asistencia-card.card-touch-in {
    border: 2px solid #A7F3D0;
    background: linear-gradient(135deg, #FFFFFF 0%, #F0FDF4 100%);
}

.hub-asistencia-card.card-touch-in:hover {
    border-color: #10B981;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.18);
    transform: translateY(-2px);
}

.hub-asistencia-card.card-touch-out {
    border: 2px solid #FED7AA;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF7ED 100%);
}

.hub-asistencia-card.card-touch-out:hover {
    border-color: #FF7A0D;
    box-shadow: 0 8px 24px rgba(255, 122, 13, 0.18);
    transform: translateY(-2px);
}

.asistencia-card-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.asistencia-touch-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.icon-bg-green {
    background: #10B981;
    color: #FFFFFF;
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.35);
}

.icon-bg-orange {
    background: #FF7A0D;
    color: #FFFFFF;
    box-shadow: 0 6px 14px rgba(255, 122, 13, 0.35);
}

.asistencia-status-tag {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 4px;
}

.tag-green {
    background: #DCFCE7;
    color: #047857;
    border: 1px solid #A7F3D0;
}

.tag-orange {
    background: #FFEDD5;
    color: #C2410C;
    border: 1px solid #FED7AA;
}

.asistencia-card-heading {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #060B26;
    font-family: 'Outfit', sans-serif;
}

.asistencia-card-sub {
    margin: 3px 0 0 0;
    font-size: 0.82rem;
    color: #64748B;
    font-weight: 500;
}

.asistencia-card-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.hub-asistencia-card:hover .asistencia-card-arrow {
    transform: translateX(4px);
}

.arrow-green {
    background: #DCFCE7;
    color: #059669;
}

.arrow-orange {
    background: #FFEDD5;
    color: #EA580C;
}

/* =========================================================================
   2. MODAL KIOSCO TÁCTIL FULLSCREEN / DIALOG
   ========================================================================= */
.kiosk-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 11, 38, 0.82);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInKiosk 0.22s ease-out;
}

.kiosk-modal-backdrop.is-open {
    display: flex !important;
}

@keyframes fadeInKiosk {
    from { opacity: 0; }
    to { opacity: 1; }
}

.kiosk-modal-card {
    background: #FFFFFF;
    width: 100%;
    max-width: 620px;
    border-radius: 26px;
    box-shadow: 0 25px 60px -15px rgba(6, 11, 38, 0.45);
    overflow: hidden;
    border: 2px solid #E2E8F0;
    animation: slideUpKiosk 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

@keyframes slideUpKiosk {
    from { transform: translateY(30px) scale(0.97); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Header del Kiosco */
.kiosk-header {
    background: linear-gradient(135deg, #060B26 0%, #172554 100%);
    color: #FFFFFF;
    padding: 20px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.kiosk-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 122, 13, 0.22);
    border: 1.5px solid #FF7A0D;
    color: #FFB370;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.kiosk-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #FFFFFF;
}

.kiosk-subtitle {
    margin: 2px 0 0 0;
    font-size: 0.8rem;
    color: #94A3B8;
}

.kiosk-close-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.18s;
}

.kiosk-close-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: #EF4444;
}

/* Pasos del Kiosco */
.kiosk-step {
    padding: 28px 30px;
}

/* PASO 1: SELECCIÓN DE ENTRADA O SALIDA */
.kiosk-prompt-label {
    font-size: 1.05rem;
    font-weight: 800;
    color: #060B26;
    text-align: center;
    margin-bottom: 22px;
}

.kiosk-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 500px) {
    .kiosk-options-grid {
        grid-template-columns: 1fr;
    }
}

.kiosk-option-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(6, 11, 38, 0.06);
    user-select: none;
    outline: none;
}

.kiosk-option-card:active {
    transform: scale(0.97);
}

.kiosk-option-card.card-entrada {
    border: 3px solid #10B981;
    background: linear-gradient(180deg, #FFFFFF 0%, #ECFDF5 100%);
}

.kiosk-option-card.card-entrada:hover {
    background: #D1FAE5;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.25);
    transform: translateY(-3px);
}

.kiosk-option-card.card-salida {
    border: 3px solid #FF7A0D;
    background: linear-gradient(180deg, #FFFFFF 0%, #FFF7ED 100%);
}

.kiosk-option-card.card-salida:hover {
    background: #FFEDD5;
    box-shadow: 0 10px 25px rgba(255, 122, 13, 0.25);
    transform: translateY(-3px);
}

.kiosk-option-icon {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.icon-entrada {
    background: #10B981;
    color: #FFFFFF;
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.35);
}

.icon-salida {
    background: #FF7A0D;
    color: #FFFFFF;
    box-shadow: 0 8px 18px rgba(255, 122, 13, 0.35);
}

.kiosk-option-title {
    font-size: 1.4rem;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    color: #060B26;
    margin-bottom: 6px;
}

.kiosk-option-desc {
    font-size: 0.82rem;
    color: #64748B;
    margin-bottom: 16px;
    min-height: 34px;
}

.kiosk-option-pill {
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pill-entrada {
    background: #10B981;
    color: #FFFFFF;
}

.pill-salida {
    background: #FF7A0D;
    color: #FFFFFF;
}

/* PASO 2: DIGITACIÓN DE PIN */
.kiosk-pin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.kiosk-back-btn {
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    color: #475569;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.kiosk-back-btn:hover {
    background: #E2E8F0;
    color: #060B26;
}

.kiosk-active-type-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-tipo-entrada {
    background: #DCFCE7;
    color: #047857;
    border: 1.5px solid #10B981;
}

.badge-tipo-salida {
    background: #FFEDD5;
    color: #C2410C;
    border: 1.5px solid #FF7A0D;
}

.kiosk-pin-prompt {
    text-align: center;
    margin-bottom: 20px;
}

.kiosk-pin-label {
    font-size: 0.95rem;
    font-weight: 800;
    color: #334155;
    margin-bottom: 10px;
}

.kiosk-pin-display-wrapper {
    position: relative;
    max-width: 260px;
    margin: 0 auto;
}

.kiosk-pin-display {
    width: 100%;
    height: 58px;
    border-radius: 14px;
    border: 2px solid #CBD5E1;
    background: #F8FAFC;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 12px;
    text-align: center;
    color: #060B26;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
    transition: all 0.2s;
    font-family: 'Outfit', monospace;
}

.kiosk-pin-display:focus {
    border-color: #FF7A0D;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(255, 122, 13, 0.2);
}

.kiosk-toggle-pin {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94A3B8;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px;
}

.kiosk-toggle-pin:hover {
    color: #475569;
}

.kiosk-error-alert {
    background: #FEF2F2;
    border: 1.5px solid #EF4444;
    color: #B91C1C;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 12px;
    text-align: center;
    animation: shakeError 0.35s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shakeError {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* TECLADO NUMÉRICO TÁCTIL */
.kiosk-keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 340px;
    margin: 0 auto;
}

.kiosk-key {
    height: 60px;
    border-radius: 14px;
    border: 1.5px solid #E2E8F0;
    background: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #060B26;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.12s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.kiosk-key:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
    transform: translateY(-1px);
}

.kiosk-key:active {
    transform: translateY(2px);
    background: #E2E8F0;
}

.kiosk-key.key-clear {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #DC2626;
    font-size: 0.95rem;
    font-weight: 800;
    gap: 6px;
}

.kiosk-key.key-clear:hover {
    background: #FEE2E2;
}

.kiosk-key.key-submit {
    background: #10B981;
    border-color: #059669;
    color: #FFFFFF;
    font-size: 1.05rem;
    font-weight: 800;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.kiosk-key.key-submit:hover {
    background: #059669;
}

/* PASO 3: PANTALLA DE ÉXITO */
.kiosk-success-box {
    text-align: center;
    padding: 10px 0;
}

.kiosk-success-check-icon {
    font-size: 4rem;
    color: #10B981;
    margin-bottom: 14px;
    animation: popCheck 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popCheck {
    from { transform: scale(0.3); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.kiosk-success-headline {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #047857;
    font-family: 'Outfit', sans-serif;
}

.kiosk-success-user {
    font-size: 1.65rem;
    font-weight: 900;
    color: #060B26;
    margin: 6px 0 18px 0;
    font-family: 'Outfit', sans-serif;
}

.kiosk-success-details-card {
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 16px;
    padding: 16px 20px;
    max-width: 440px;
    margin: 0 auto 20px auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kiosk-success-detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
    justify-content: center;
}

.kiosk-success-detail-row i {
    color: #FF7A0D;
    font-size: 1.1rem;
}

.kiosk-timer-bar-wrap {
    width: 100%;
    max-width: 320px;
    height: 6px;
    background: #E2E8F0;
    border-radius: 4px;
    margin: 0 auto 8px auto;
    overflow: hidden;
}

.kiosk-timer-bar {
    height: 100%;
    width: 100%;
    background: #10B981;
    border-radius: 4px;
    transition: width 4s linear;
}

.kiosk-timer-text {
    font-size: 0.8rem;
    color: #64748B;
    margin: 0 0 20px 0;
}

.kiosk-btn-done {
    background: #060B26;
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(6, 11, 38, 0.25);
    transition: all 0.2s;
}

.kiosk-btn-done:hover {
    background: #FF7A0D;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 122, 13, 0.35);
}
