﻿

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    background-size: 300% 300%;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


.login-card {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 32px 64px rgba(0,0,0,0.4);
    text-align: center;
    color: #fff;
}


.login-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}


.login-icon.admin {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 8px 30px rgba(245,158,11,0.3);
}
.login-icon.pos {
    background: linear-gradient(135deg, #818cf8, #6366f1);
    box-shadow: 0 8px 30px rgba(99,102,241,0.3);
}
.login-icon.waiter {
    background: linear-gradient(135deg, #28a55e, #1a7a42);
    box-shadow: 0 8px 30px rgba(40,165,94,0.3);
}


.login-card h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fff;
}
.login-card .subtitle {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    margin-bottom: 32px;
    font-weight: 400;
}


.login-form .form-group {
    margin-bottom: 18px;
    text-align: left;
}
.login-form .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: rgba(255,255,255,0.65);
}
.login-form .form-group input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
}
.login-form .form-group input::placeholder {
    color: rgba(255,255,255,0.3);
}
.login-form .form-group input:focus {
    outline: none;
    border-color: rgba(129,140,248,0.7);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 0 3px rgba(129,140,248,0.15);
}


.login-form.admin .form-group input:focus {
    border-color: rgba(245,158,11,0.7);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
}
.login-form.waiter .form-group input:focus {
    border-color: rgba(40,165,94,0.7);
    box-shadow: 0 0 0 3px rgba(40,165,94,0.15);
}


.password-wrapper {
    position: relative;
}
.password-wrapper input {
    padding-right: 44px;
}
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: color 0.2s;
}
.password-toggle:hover { color: rgba(255,255,255,0.7); }


.login-error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.25);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 13px;
    text-align: left;
}


.btn-login {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-login:hover {
    transform: translateY(-2px);
    color: #fff;
}
.btn-login:active {
    transform: translateY(0);
}
.btn-login:disabled {
    opacity: 0.65;
    transform: none;
    cursor: not-allowed;
}


.btn-login.admin {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 16px rgba(245,158,11,0.25);
}
.btn-login.admin:hover {
    box-shadow: 0 8px 28px rgba(245,158,11,0.4);
}
.btn-login.pos {
    background: linear-gradient(135deg, #818cf8, #6366f1);
    box-shadow: 0 4px 16px rgba(99,102,241,0.25);
}
.btn-login.pos:hover {
    box-shadow: 0 8px 28px rgba(99,102,241,0.4);
}
.btn-login.waiter {
    background: linear-gradient(135deg, #28a55e, #1a7a42);
    box-shadow: 0 4px 16px rgba(40,165,94,0.25);
}
.btn-login.waiter:hover {
    box-shadow: 0 8px 28px rgba(40,165,94,0.4);
}


.login-footer {
    text-align: center;
    color: rgba(255,255,255,0.25);
    font-size: 12px;
    margin-top: 24px;
}


@media (max-width: 480px) {
    .login-card {
        margin: 16px;
        padding: 36px 28px;
        border-radius: 20px;
    }
    .login-card h1 { font-size: 22px; }
}


.login-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: loginSpin 0.6s linear infinite;
}
@keyframes loginSpin { to { transform: rotate(360deg); } }
