.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
}

.login-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 100%;
    backdrop-filter: blur(12px);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.login-logo .app-logo-img {
    height: 5rem;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.login-card h1 {
    font-size: 1.25rem;
    margin-bottom: 24px;
    color: var(--text-main);
    text-align: center;
    font-family: 'Outfit', sans-serif;
}

.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.login-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-main);
    font-size: 1rem;
    box-sizing: border-box;
}

.login-field input:focus {
    outline: none;
    border-color: var(--primary);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.login-btn:hover {
    opacity: 0.9;
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: -4px;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
}

.login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.login-checking {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 0 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-checking[hidden],
.login-pin-panel[hidden],
.login-license-panel[hidden],
#login-form[hidden] {
    display: none !important;
}

.login-checking-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(79, 70, 229, 0.2);
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: login-spin 0.8s linear infinite;
}

@keyframes login-spin {
    to { transform: rotate(360deg); }
}

.login-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 12px;
}

.login-error--warn {
    color: #f59e0b;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

.login-footer-register {
    margin: 12px 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

html.is-app-shell .login-home-link,
html.is-app-shell .login-footer-register,
html.is-app-shell .login-remember {
    display: none;
}

.login-setup-lead {
    margin: 0 0 20px;
    text-align: center;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.login-license-panel .login-btn {
    margin-top: 4px;
}

.password-input-wrap .icon-eye-off {
    display: none;
}

.password-input-wrap.visible .icon-eye {
    display: none;
}

.password-input-wrap.visible .icon-eye-off {
    display: block;
}
