/* ============================================================
   Food365 POS — PIN Login Screen Styles
   ============================================================ */

.login-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 45%, #24243e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
    font-family: 'Outfit', system-ui, sans-serif;
}

.login-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: blobPulse 8s ease-in-out infinite;
    pointer-events: none;
}

.login-blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #6366f1, #a855f7);
    top: -120px;
    left: -120px;
}

.login-blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #3b82f6, #06b6d4);
    bottom: -100px;
    right: -100px;
    animation-delay: -3s;
}

.login-blob-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #f59e0b, #ef4444);
    top: 40%;
    left: 55%;
    animation-delay: -5s;
    opacity: 0.2;
}

@keyframes blobPulse {

    0%,
    100% {
        transform: scale(1) translate(0, 0);
    }

    33% {
        transform: scale(1.12) translate(20px, -20px);
    }

    66% {
        transform: scale(0.92) translate(-15px, 15px);
    }
}

.login-wrapper {
    display: flex;
    width: 900px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.07);
    animation: loginFadeIn 0.5s cubic-bezier(.2, .8, .4, 1) both;
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-brand-panel {
    flex: 1;
    background: linear-gradient(160deg, rgba(79, 70, 229, 0.5) 0%, rgba(124, 58, 237, 0.4) 50%, rgba(6, 182, 212, 0.3) 100%);
    backdrop-filter: blur(24px);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    padding: 48px 36px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    color: #fff;
    min-width: 0;
}

.login-brand-logo {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.login-brand-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin: 0;
}

.login-brand-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    margin: 0;
}

.login-brand-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.login-feature-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.login-brand-time {
    font-size: 52px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -2px;
    margin-top: 24px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.login-brand-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    margin-top: 4px;
}

.login-pin-panel {
    width: 420px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 28px;
    overflow-y: auto;
}

.login-pin-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-pin-header {
    text-align: center;
}

.login-pin-title {
    font-size: 20px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.login-pin-subtitle {
    font-size: 12.5px;
    color: #64748b;
    margin-top: 3px;
    font-weight: 500;
}

.login-users-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.login-user-card {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 4px;
    border-radius: 14px;
    transition: background 0.15s, transform 0.15s;
}

.login-user-card:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.login-user-card.selected {
    background: #f5f3ff;
}

.login-user-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    border: 3px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.login-user-card.selected .login-user-avatar {
    box-shadow: 0 0 0 3px currentColor, 0 4px 16px rgba(0, 0, 0, 0.12);
}

.login-user-name {
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
}

.login-user-role {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
}

.login-selected-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    animation: slideDown 0.2s ease both;
}

.pin-dots-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 8px 0;
}

.pin-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2.5px solid #cbd5e1;
    background: transparent;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.pin-dot.filled {
    background: #4f46e5;
    border-color: #4f46e5;
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.login-error-banner {
    background: #fef2f2;
    border: 1.5px solid #fca5a5;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12.5px;
    font-weight: 700;
    color: #dc2626;
    text-align: center;
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translateX(-2px);
    }

    20%,
    80% {
        transform: translateX(3px);
    }

    30%,
    50%,
    70% {
        transform: translateX(-4px);
    }

    40%,
    60% {
        transform: translateX(4px);
    }
}

.pin-numpad {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: slideDown 0.22s ease both;
}

.pin-numpad-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.pin-key {
    height: 56px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.12s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
}

.pin-key:hover {
    background: #f8fafc;
    border-color: #a5b4fc;
    color: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

.pin-key:active {
    transform: scale(0.95);
    background: #ede9fe;
    border-color: #4f46e5;
}

.pin-key-clear {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #ea580c;
    font-size: 14px;
    font-weight: 800;
}

.pin-key-clear:hover {
    background: #ffedd5;
    border-color: #fb923c;
    color: #ea580c;
}

.pin-key-back {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
    font-size: 20px;
}

.pin-key-back:hover {
    background: #fee2e2;
    border-color: #f87171;
    color: #dc2626;
}

.login-no-user-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 16px;
    font-size: 13px;
    color: #94a3b8;
    font-weight: 600;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    text-align: center;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-user-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 22px;
    cursor: pointer;
    transition: background 0.15s;
    color: #fff;
}

.nav-user-pill:hover {
    background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 700px) {
    .login-brand-panel {
        display: none;
    }

    .login-wrapper {
        width: 100%;
        border-radius: 0;
        max-height: 100vh;
    }

    .login-pin-panel {
        width: 100%;
        padding: 24px 20px;
    }

    .login-users-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Shake triggered by JS class add */
.shake-anim {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}