/* ==========================================================================
   CBROZ Third Eye — Auth Pages CSS
   Login, Forgot Password, Reset Password, Change Password
   ========================================================================== */

:root {
    --primary:      #4f46e5;
    --primary-light:#6366f1;
    --primary-dark: #3730a3;
    --primary-glow: rgba(79,70,229,.3);
    --success:      #10b981;
    --danger:       #ef4444;
    --warning:      #f59e0b;
    --font:         'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}

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

body.auth-body {
    font-family: var(--font);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d1117;
    position: relative;
    overflow: hidden;
}

/* Animated Background */
body.auth-body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(79,70,229,.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(99,102,241,.10) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(16,185,129,.08) 0%, transparent 50%);
    animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    from { opacity: .7; }
    to   { opacity: 1; }
}

/* Floating orbs */
body.auth-body::after {
    content: '';
    position: fixed; inset: 0; z-index: 0;
    background-image:
        radial-gradient(circle 200px at 10% 80%, rgba(79,70,229,.08), transparent),
        radial-gradient(circle 300px at 90% 10%, rgba(99,102,241,.06), transparent);
}

/* Grid dots */
.auth-body .bg-grid {
    position: fixed; inset: 0; z-index: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* Auth Container */
.auth-container {
    position: relative; z-index: 1;
    width: 100%; max-width: 440px;
    padding: 20px;
}

/* Card */
.auth-card {
    background: rgba(22,27,34,.85);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04);
    animation: cardReveal .5s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes cardReveal {
    from { opacity: 0; transform: translateY(30px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

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

.auth-logo-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #3730a3, #4f46e5, #6366f1);
    border-radius: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff;
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(79,70,229,.5);
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-5px); }
}

.auth-logo-title {
    display: block;
    font-size: 22px; font-weight: 800;
    color: #fff; letter-spacing: .3px;
}
.auth-logo-subtitle {
    display: block;
    font-size: 11px; font-weight: 600;
    color: #6366f1; letter-spacing: 2px;
    text-transform: uppercase; margin-top: 2px;
}

/* Heading */
.auth-heading {
    font-size: 20px; font-weight: 700; color: #e6edf3;
    margin-bottom: 4px;
}
.auth-sub {
    font-size: 13px; color: #6e7681; margin-bottom: 28px;
}

/* Form */
.auth-form .form-group { margin-bottom: 18px; }

.auth-form label {
    display: block;
    font-size: 12px; font-weight: 600;
    color: #8b949e; text-transform: uppercase; letter-spacing: .5px;
    margin-bottom: 7px;
}

.input-wrapper {
    position: relative;
}
.input-wrapper i.input-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: #484f58; font-size: 14px; pointer-events: none;
    transition: color .2s;
}
.input-wrapper:focus-within i.input-icon { color: #6366f1; }

.input-wrapper input {
    width: 100%; padding: 12px 14px 12px 42px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    font-size: 14px; color: #e6edf3;
    font-family: var(--font);
    outline: none;
    transition: all .2s;
}
.input-wrapper input::placeholder { color: #484f58; }
.input-wrapper input:focus {
    border-color: #4f46e5;
    background: rgba(79,70,229,.08);
    box-shadow: 0 0 0 3px rgba(79,70,229,.2);
}
.input-wrapper input.is-invalid { border-color: #ef4444; }

/* Password eye toggle */
.pwd-toggle {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: #484f58; font-size: 14px; padding: 0;
    transition: color .2s;
}
.pwd-toggle:hover { color: #8b949e; }

/* Remember me / Forgot */
.auth-meta {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 22px;
}
.auth-check { display: flex; align-items: center; gap: 8px; }
.auth-check input[type=checkbox] {
    width: 16px; height: 16px; accent-color: #4f46e5; cursor: pointer;
}
.auth-check label { font-size: 13px; color: #8b949e; cursor: pointer; }
.auth-forgot { font-size: 13px; color: #6366f1; text-decoration: none; font-weight: 500; }
.auth-forgot:hover { color: #a5b4fc; }

/* Submit button */
.btn-auth {
    width: 100%; padding: 13px;
    background: linear-gradient(135deg, #4338ca, #4f46e5, #6366f1);
    border: none; border-radius: 10px;
    color: #fff; font-size: 15px; font-weight: 700;
    font-family: var(--font); cursor: pointer;
    transition: all .3s;
    position: relative; overflow: hidden;
    box-shadow: 0 4px 20px rgba(79,70,229,.4);
    letter-spacing: .3px;
}
.btn-auth::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
    opacity: 0; transition: opacity .3s;
}
.btn-auth:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(79,70,229,.5); }
.btn-auth:hover::before { opacity: 1; }
.btn-auth:active { transform: translateY(0); }

.btn-auth .spinner {
    display: none; width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff; border-radius: 50%;
    animation: spin .7s linear infinite;
    margin-right: 8px;
}
.btn-auth.loading .spinner { display: inline-block; }
.btn-auth.loading { pointer-events: none; opacity: .8; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.auth-alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; border-radius: 10px;
    font-size: 13px; margin-bottom: 20px;
    animation: alertSlide .3s ease;
}
@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.auth-alert.success { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3); color: #34d399; }
.auth-alert.error   { background: rgba(239,68,68,.12);  border: 1px solid rgba(239,68,68,.3);  color: #f87171; }
.auth-alert.warning { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3); color: #fbbf24; }

/* Password strength meter */
.pwd-strength { margin-top: 8px; }
.pwd-strength-bar {
    height: 4px; border-radius: 2px; background: rgba(255,255,255,.1);
    overflow: hidden; margin-bottom: 4px;
}
.pwd-strength-fill { height: 100%; border-radius: 2px; transition: width .4s, background .4s; }
.pwd-strength-label { font-size: 11px; font-weight: 600; }

/* Auth footer link */
.auth-footer-link {
    text-align: center; margin-top: 24px;
    font-size: 13px; color: #484f58;
}
.auth-footer-link a { color: #6366f1; font-weight: 600; }
.auth-footer-link a:hover { color: #a5b4fc; }

/* Brand watermark at bottom */
.auth-watermark {
    text-align: center; margin-top: 28px;
    font-size: 11px; color: #30363d;
}

/* Divider */
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0; color: #30363d; font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.07);
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card { padding: 28px 20px; }
    .auth-container { padding: 16px; }
}
