/**
 * ============================================================
 * QUIZER ADMIN — LOGIN PAGE
 * login.css
 * ============================================================
 */

@import url('core/variables.css');
@import url('core/reset.css');

/* ── Login Background ── */
body {
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-family: var(--font-body);
    position: relative;
    overflow: hidden;
}

/* Gradient blobs */
body::before {
    content: '';
    position: fixed;
    top: -120px; left: -120px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
body::after {
    content: '';
    position: fixed;
    bottom: -100px; right: -100px;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Login Card ── */
.login-container {
    width: 100%;
    max-width: 400px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    animation: loginFadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes loginFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Brand Mark ── */
.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 2rem;
    text-decoration: none;
}

.brand-logo {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-primary);
}
.brand-logo i { font-size: 20px; color: white; }

.brand span {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

/* ── Welcome Text ── */
.welcome-text {
    text-align: center;
    margin-bottom: 2rem;
}
.welcome-text h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.welcome-text p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Alert ── */
#alert-container .alert-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--danger-light);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    color: var(--danger-dark);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* ── Form ── */
form .form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-placeholder);
    pointer-events: none;
    z-index: 2;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 42px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-placeholder);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 4px;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.password-toggle i {
    width: 18px;
    height: 18px;
}

.form-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

/* ── Submit Button ── */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-primary);
    margin-top: 1.5rem;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1.5px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}
.btn-primary:active { transform: translateY(0); }

/* ── Footer link ── */
.login-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 11px;
    color: var(--text-placeholder);
    font-weight: 500;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .login-container {
        margin: 1rem;
        padding: 2rem 1.5rem;
        border-radius: var(--radius-lg);
    }
}
