/* ── Login Page ───────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .login-card {
        padding: 1.8rem 1.2rem 1.5rem;
        margin: 1rem;
    }
    .login-logo a {
        font-size: 1.4rem;
    }
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-color);
    position: relative;
    overflow: hidden;
}

/* Ambient glow behind the card */
.login-body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 600px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(0,223,240,0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── Card ── */
.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border: 1px solid rgba(0,223,240,0.15);
    border-radius: 16px;
    padding: 2.8rem 2.4rem 2.4rem;
    box-shadow: 0 0 60px rgba(0,223,240,0.06), 0 24px 48px rgba(0,0,0,0.4);
    animation: fadeIn 0.6s ease-out;
    margin: 1.5rem;
}

/* ── Logo ── */
.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo a {
    font-family: 'Fira Code', monospace;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -1px;
}

.login-logo a:hover {
    text-shadow: 0 0 20px var(--accent-glow);
}

/* ── Title ── */
.login-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 0.4rem;
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-align: center;
    margin-bottom: 2rem;
}

/* ── Tabs (login / register) ── */
.login-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 1.8rem;
}

.login-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.6rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -1px;
}

.login-tab:hover {
    color: var(--text-main);
}

.login-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ── Form ── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

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

.login-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: 'Fira Code', monospace;
}

.login-input {
    background: #0d1328;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.72rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.login-input:focus {
    border-color: rgba(0,223,240,0.5);
    box-shadow: 0 0 0 3px rgba(0,223,240,0.08);
}

.login-input::placeholder {
    color: rgba(148,163,184,0.5);
}

/* ── Submit button ── */
.login-btn {
    margin-top: 0.5rem;
    background: var(--accent);
    color: #050619;
    border: none;
    border-radius: 8px;
    padding: 0.82rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.login-btn:hover:not(:disabled) {
    background: #00f5ff;
    box-shadow: 0 4px 20px rgba(0,223,240,0.35);
    transform: translateY(-1px);
}

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

/* ── Error / success messages ── */
.login-alert {
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.login-alert.error {
    display: flex;
    background: rgba(248,113,113,0.1);
    border: 1px solid rgba(248,113,113,0.3);
    color: #f87171;
}

.login-alert.success {
    display: flex;
    background: rgba(74,222,128,0.1);
    border: 1px solid rgba(74,222,128,0.3);
    color: #4ade80;
}

/* ── Hidden panel ── */
.login-panel {
    display: none;
}

.login-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
