/* Login, register and reset-password screens */

.login-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    width: 100%;
    max-width: 440px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: calc(32px + env(safe-area-inset-top, 0px)) 20px calc(28px + env(safe-area-inset-bottom, 0px));
}

.login-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: sc-fade-up 0.6s var(--sc-ease-out) backwards;
}

.login-hero.is-compact .login-logo {
    width: 84px;
    height: 84px;
}

.login-hero.is-compact .login-logo-mark {
    width: 66px;
    height: 66px;
}

.login-hero.is-compact .login-title {
    font-size: 34px;
}

.login-logo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
}

.login-logo-ring {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(var(--sc-primary-rgb), 0.6);
    border-radius: 50%;
    animation: login-ring 2.8s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}

.login-logo-ring:nth-child(2) {
    animation-delay: 1.4s;
}

.login-logo-mark {
    position: relative;
    width: 96px;
    height: 96px;
    filter: drop-shadow(0 10px 30px rgba(var(--sc-primary-rgb), 0.45));
    animation: login-float 4s ease-in-out infinite;
}

.login-title {
    margin: 0;
    font-size: 46px;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(180deg, #ffffff 30%, #9fe9ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 4px 18px rgba(var(--sc-primary-rgb), 0.45));
}

.login-tagline {
    margin: 8px 0 14px;
    color: var(--sc-text-muted);
    font-size: 16px;
}

.login-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.login-features span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: var(--sc-radius-pill);
    background: rgba(255, 255, 255, 0.06);
    color: var(--sc-text);
    font-size: 12px;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px var(--sc-line);
}

.login-features ion-icon {
    color: var(--sc-primary);
    font-size: 15px;
}

.login-panel {
    padding: 22px 20px;
    border: 1px solid var(--sc-line-strong);
    border-radius: var(--sc-radius-lg);
    background: rgba(21, 28, 51, 0.82);
    box-shadow: var(--sc-shadow-lg);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    animation: sc-fade-up 0.6s var(--sc-ease-out) 0.12s backwards;
}

.login-panel-title {
    margin: 0 0 4px;
    font-size: 22px;
}

.login-panel-text {
    margin: 0 0 16px;
    color: var(--sc-text-muted);
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-field {
    display: flex;
    flex-direction: column;
}

.login-field-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.login-input {
    position: relative;
}

.login-input ion-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 1;
    color: var(--sc-text-faint);
    font-size: 18px;
    transform: translateY(-50%);
    pointer-events: none;
}

.login-input .form-control {
    width: 100%;
    min-height: 50px;
    padding-left: 42px;
}

.login-input .is-code {
    font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--sc-danger-soft);
    color: #ffc2c2;
    font-size: 14px;
    animation: sc-fade-up 0.25s var(--sc-ease-out) backwards;
}

.login-submit,
.login-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    font-size: 18px;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sc-text-faint);
    font-size: 12px;
    font-weight: 600;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--sc-line-strong);
}

.login-link {
    color: var(--sc-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.login-link:hover {
    text-decoration: underline;
}

.login-footer {
    margin: 4px 0 0;
    color: var(--sc-text-muted);
    font-size: 14px;
    text-align: center;
}

/* One-time recovery code, shown after registering, resetting, or generating a new one */

.recovery-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.recovery-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--sc-gold-soft);
    color: var(--sc-gold);
    font-size: 28px;
}

.recovery-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border: 1px dashed rgba(255, 200, 61, 0.55);
    border-radius: 14px;
    background: rgba(255, 200, 61, 0.08);
}

.recovery-code code {
    color: var(--sc-gold);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.06em;
    word-break: break-all;
}

.recovery-confirm {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--sc-text);
    font-size: 14px;
    cursor: pointer;
}

.recovery-confirm input {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--sc-primary);
}

@keyframes login-ring {
    from {
        opacity: 0.9;
        transform: scale(0.7);
    }
    to {
        opacity: 0;
        transform: scale(1.35);
    }
}

@keyframes login-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

