/* ═══════════════════════════════════════════════
   AUTH PAGES SHARED STYLES — SmartSoftware HMS
   Used by: forgot password, reset password pages
   Color variants: --accent-hue CSS variable
   ═══════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body.auth-page {
    font-family: 'Inter', 'Cairo', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0f172a;
}

/* ── Animated Background ── */
.auth-bg {
    position: fixed; inset: 0; z-index: 0;
    background: var(--auth-gradient, linear-gradient(-45deg, #0f172a, #1e1b4b, #312e81, #1e293b, #0c4a6e));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-bg::before, .auth-bg::after {
    content: ''; position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: .3;
    animation: orbFloat 20s ease-in-out infinite;
}
.auth-bg::before {
    width: 500px; height: 500px;
    background: var(--accent, #6366f1);
    top: -100px; right: -100px;
}
.auth-bg::after {
    width: 400px; height: 400px;
    background: #06b6d4;
    bottom: -80px; left: -80px;
    animation-delay: -7s; animation-direction: reverse;
}
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(30px, -40px) scale(1.05); }
    66%      { transform: translate(-20px, 20px) scale(.95); }
}

.grid-overlay {
    position: fixed; inset: 0; z-index: 1;
    background-image:
        linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* ── Card ── */
.auth-card {
    position: relative; z-index: 10;
    width: 100%; max-width: 460px;
    margin: 20px;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.5), 0 0 80px var(--accent-glow, rgba(99,102,241,.08));
    padding: 48px 40px;
    animation: cardReveal .8s cubic-bezier(.16,1,.3,1) forwards;
    opacity: 0;
    transform: translateY(30px) scale(.97);
}
@keyframes cardReveal {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Icon Badge ── */
.auth-icon {
    width: 72px; height: 72px;
    border-radius: 20px;
    background: var(--accent-gradient, linear-gradient(135deg, #6366f1, #4338ca));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    font-size: 28px; color: #fff;
    box-shadow: 0 8px 24px var(--accent-shadow, rgba(99,102,241,.3));
}

/* ── Headers ── */
.auth-card h2 {
    font-size: 24px; font-weight: 700; color: #fff;
    text-align: center; margin-bottom: 8px; letter-spacing: -.02em;
}
.auth-card .auth-subtitle {
    font-size: 14px; color: rgba(255,255,255,.45);
    text-align: center; margin-bottom: 32px; line-height: 1.6;
}

/* ── Form Elements ── */
.auth-form .form-group {
    margin-bottom: 20px; position: relative;
}
.auth-form .form-group label {
    display: block; font-size: 12px; font-weight: 600;
    color: rgba(255,255,255,.6); margin-bottom: 8px;
    text-transform: uppercase; letter-spacing: .06em;
}
.auth-input-wrap {
    position: relative;
}
.auth-input-wrap i {
    position: absolute; left: 16px; top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.3); font-size: 15px;
    transition: color .3s ease; z-index: 2;
}
.auth-form .form-control {
    width: 100%;
    padding: 14px 16px 14px 46px;
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.1);
    border-radius: 14px;
    font-family: 'Inter', 'Cairo', sans-serif;
    font-size: 15px; color: #fff; outline: none;
    transition: all .3s cubic-bezier(.4,0,.2,1);
}
.auth-form .form-control::placeholder { color: rgba(255,255,255,.3); }
.auth-form .form-control:focus {
    border-color: var(--accent, #6366f1);
    background: var(--accent-focus-bg, rgba(99,102,241,.08));
    box-shadow: 0 0 0 4px var(--accent-focus-ring, rgba(99,102,241,.15));
}
.auth-input-wrap:focus-within i {
    color: var(--accent-light, #818cf8);
}

.text-danger {
    display: block; font-size: 12px; color: #f87171; margin-top: 6px;
}

/* ── Submit Button ── */
.btn-auth {
    width: 100%; padding: 15px;
    background: var(--accent-gradient, linear-gradient(135deg, #6366f1, #4f46e5));
    border: none; border-radius: 14px;
    font-family: 'Inter', 'Cairo', sans-serif;
    font-size: 16px; font-weight: 600; color: #fff;
    cursor: pointer;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    position: relative; overflow: hidden;
}
.btn-auth::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
    opacity: 0; transition: opacity .3s ease;
}
.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--accent-shadow, rgba(99,102,241,.4)), 0 0 40px var(--accent-glow, rgba(99,102,241,.15));
}
.btn-auth:hover::before { opacity: 1; }
.btn-auth:active { transform: translateY(0); }

/* ── Back Link ── */
.auth-back {
    text-align: center; margin-top: 24px;
}
.auth-back a {
    color: rgba(255,255,255,.45); text-decoration: none;
    font-size: 13px; font-weight: 500;
    transition: all .3s ease;
    display: inline-flex; align-items: center; gap: 6px;
}
.auth-back a:hover { color: var(--accent-light, #818cf8); }

/* ── Alerts ── */
.alert {
    padding: 12px 16px; border-radius: 12px;
    font-size: 13px; margin-bottom: 20px;
    display: flex; align-items: center; gap: 10px;
    animation: alertSlide .4s ease;
}
.alert-danger {
    background: rgba(239,68,68,.12); color: #fca5a5;
    border: 1px solid rgba(239,68,68,.2);
}
.alert-success {
    background: rgba(16,185,129,.12); color: #6ee7b7;
    border: 1px solid rgba(16,185,129,.2);
}
@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Footer ── */
.auth-footer {
    position: fixed; bottom: 20px; left: 50%;
    transform: translateX(-50%); z-index: 10;
    font-size: 12px; color: rgba(255,255,255,.25);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .auth-card { margin: 10px; padding: 36px 24px; border-radius: 20px; }
    .auth-card h2 { font-size: 20px; }
}
