/* ═══════════════════════════════════════════════
   LinkStash — Login Page
   ═══════════════════════════════════════════════ */

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 100dvh;
}

/* Subtle animated background */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse 600px 400px at 30% 20%, rgba(124,58,237,0.06) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 70% 80%, rgba(167,139,250,0.04) 0%, transparent 70%);
    animation: bgShift 20s ease-in-out infinite alternate;
}
@keyframes bgShift {
    0%   { opacity: 1; transform: scale(1); }
    100% { opacity: 0.6; transform: scale(1.1); }
}

.login-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 32px;
    animation: cardIn 0.5s ease both;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.logo {
    font-family: 'Space Mono', monospace;
    font-size: 24px; font-weight: 700;
    text-align: center; margin-bottom: 8px;
}
.logo span { color: var(--accent); }

.tagline {
    text-align: center; font-size: 13px;
    color: var(--text-dim); margin-bottom: 32px;
}

.field { margin-bottom: 20px; }
.field label {
    display: block; font-size: 12px; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.5px; margin-bottom: 8px;
}
.input-wrap { position: relative; }
.input-wrap .icon-lock {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: var(--text-dim);
    transition: color 0.2s;
}
.field input {
    width: 100%; height: 48px; padding: 0 48px 0 44px;
    border-radius: 12px; background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text); font-size: 15px; font-family: inherit;
    outline: none; transition: border-color 0.2s;
}
.field input:focus { border-color: var(--accent-strong); }
.field input:focus ~ .icon-lock { color: var(--accent); }

.toggle-pw {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-dim);
    cursor: pointer; padding: 4px; font-size: 18px;
    transition: color 0.2s;
}
.toggle-pw:hover { color: var(--accent); }

.btn-login {
    width: 100%; height: 48px; border-radius: 12px;
    background: var(--accent-strong); border: none;
    color: white; font-size: 15px; font-weight: 600;
    font-family: inherit; cursor: pointer;
    transition: all 0.2s;
}
.btn-login:hover { background: #5558e6; }
.btn-login:active { transform: scale(0.98); }

.login-footer {
    text-align: center; margin-top: 20px;
    font-size: 11px; color: var(--text-dim);
}

/* Error with shake animation */
.error-msg {
    animation: shake 0.4s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}
