/* ─── Base ─── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: #0a0a14;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* ─── Animated Background ─── */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 20% 50%, rgba(67, 97, 238, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(76, 201, 240, 0.06) 0%, transparent 60%),
                radial-gradient(ellipse at 50% 80%, rgba(181, 23, 158, 0.05) 0%, transparent 60%);
    animation: bgShift 12s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes bgShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(2%, 2%); }
}

/* ─── Auth Wrapper ─── */
.auth-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 1;
}

/* ─── Auth Card ─── */
.auth-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 42px 38px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.03);
    animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Logo ─── */
.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo .logo-icon {
    font-size: 2.8rem;
    margin-bottom: 10px;
    display: block;
    filter: drop-shadow(0 0 16px rgba(76, 201, 240, 0.4));
}

.auth-logo h2 {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.7rem;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #4cc9f0, #4361ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.82rem;
    margin-top: 5px;
}

/* ─── Form Labels ─── */
.form-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 7px;
}

/* ─── Inputs ─── */
.form-control {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    color: #ffffff;
    padding: 11px 14px;
    font-size: 0.88rem;
    transition: all 0.25s ease;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #4cc9f0;
    box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.12);
    color: #ffffff;
    outline: none;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.22);
}

/* ─── Password Toggle ─── */
.password-wrapper { position: relative; }

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0;
    transition: color 0.2s;
}

.password-toggle:hover { color: #4cc9f0; }

/* ─── Auth Button ─── */
.btn-auth {
    background: linear-gradient(135deg, #4cc9f0, #4361ee);
    border: none;
    border-radius: 11px;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px;
    width: 100%;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.btn-auth:hover::before { left: 100%; }

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(76, 201, 240, 0.35);
    color: #ffffff;
}

.btn-auth:active { transform: translateY(0); }

/* ─── Divider ─── */
.auth-divider {
    text-align: center;
    margin: 22px 0 16px;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
}

.auth-divider span {
    background: transparent;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.78rem;
    padding: 0 14px;
    position: relative;
}

/* ─── Footer Link ─── */
.auth-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.83rem;
}

.auth-footer a {
    color: #4cc9f0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-footer a:hover { color: #ffffff; }

/* ─── Input Hint ─── */
.input-hint {
    font-size: 0.73rem;
    color: rgba(255, 255, 255, 0.28);
    margin-top: 5px;
}

/* ─── Flash Messages ─── */
.flash-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 310px;
}

.alert {
    border: none;
    border-radius: 12px;
    font-size: 0.82rem;
    padding: 12px 16px;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(6, 214, 160, 0.15);
    border-left: 3px solid #06d6a0;
    color: #a8f0dc;
}

.alert-danger {
    background: rgba(239, 71, 111, 0.15);
    border-left: 3px solid #ef476f;
    color: #f5a0b5;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border-left: 3px solid #ffc107;
    color: #ffe08a;
}

.alert-info {
    background: rgba(76, 201, 240, 0.15);
    border-left: 3px solid #4cc9f0;
    color: #a8d8f0;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
    .auth-card { padding: 28px 20px; border-radius: 16px; }
    .auth-logo h2 { font-size: 1.4rem; }
}