/* ═══════════════════════════════════════════════
   AUTH — Glassmorphism Split Screen
   ═══════════════════════════════════════════════ */

/* ── Base ── */
.auth-page {
    min-height: 100vh;
    display: flex;
    background: #0a0e1a;
    overflow-x: hidden;
    position: relative;
}

/* ── Animated Background ── */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.auth-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .4;
    animation: authOrbFloat 12s ease-in-out infinite alternate;
}
.auth-bg-orb--1 {
    width: 500px; height: 500px;
    background: #7c3aed;
    top: -10%; left: -5%;
    animation-duration: 14s;
}
.auth-bg-orb--2 {
    width: 400px; height: 400px;
    background: #2563eb;
    bottom: -10%; right: -5%;
    animation-duration: 10s;
    animation-delay: -4s;
}
.auth-bg-orb--3 {
    width: 300px; height: 300px;
    background: #06b6d4;
    top: 50%; left: 40%;
    opacity: .2;
    animation-duration: 16s;
    animation-delay: -8s;
}
@keyframes authOrbFloat {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(30px, -40px) scale(1.1); }
    100% { transform: translate(-20px, 20px) scale(.95); }
}

/* ── Grid pattern overlay ── */
.auth-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ── Left Panel (Brand) ── */
.auth-brand {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px;
    position: relative;
    z-index: 1;
}
.auth-brand-logo {
    height: 48px;
    margin-bottom: 32px;
    filter: drop-shadow(0 4px 24px rgba(124,58,237,.3));
}
.auth-brand-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.3;
}
.auth-brand-desc {
    font-size: 15px;
    color: rgba(255,255,255,.6);
    text-align: center;
    max-width: 360px;
    line-height: 1.6;
}
.auth-brand-illustration {
    max-width: 340px;
    width: 100%;
    margin-bottom: 40px;
    filter: drop-shadow(0 20px 60px rgba(0,0,0,.3));
    animation: authIllFloat 6s ease-in-out infinite alternate;
}
@keyframes authIllFloat {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-12px); }
}

/* ── Decorative dots ── */
.auth-brand-dots {
    position: absolute;
    width: 120px; height: 120px;
    opacity: .08;
    background-image: radial-gradient(circle, #fff 1.5px, transparent 1.5px);
    background-size: 16px 16px;
}
.auth-brand-dots--tl { top: 40px; left: 40px; }
.auth-brand-dots--br { bottom: 40px; right: 40px; }

/* ── Right Panel (Form) ── */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    position: relative;
    z-index: 1;
}

/* ── Glass Card ── */
.auth-glass {
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 24px;
    padding: 48px 40px;
    width: 100%;
    max-width: 480px;
    box-shadow:
        0 8px 32px rgba(0,0,0,.3),
        inset 0 1px 0 rgba(255,255,255,.1);
}
.auth-glass-glow {
    position: absolute;
    width: 200px; height: 200px;
    background: #7c3aed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: .15;
    top: -60px; right: -60px;
    pointer-events: none;
}

/* ── Glass overrides for Metronic form elements ── */
.auth-glass h1,
.auth-glass .text-gray-900 {
    color: #fff !important;
}
.auth-glass .text-gray-500,
.auth-glass .text-gray-400,
.auth-glass .text-gray-600,
.auth-glass .text-gray-700 {
    color: rgba(255,255,255,.55) !important;
}
.auth-glass .form-control {
    background: rgba(255,255,255,.07) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    color: #fff !important;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all .2s;
}
.auth-glass .form-control::placeholder {
    color: rgba(255,255,255,.35) !important;
}
.auth-glass .form-control:focus {
    background: rgba(255,255,255,.1) !important;
    border-color: rgba(124,58,237,.6) !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,.15), 0 0 20px rgba(124,58,237,.1) !important;
}

/* Password visibility icon */
.auth-glass .btn-icon i {
    color: rgba(255,255,255,.4) !important;
}

/* Checkbox */
.auth-glass .form-check-label {
    color: rgba(255,255,255,.6) !important;
}
.auth-glass .form-check-input {
    background-color: rgba(255,255,255,.1) !important;
    border-color: rgba(255,255,255,.2) !important;
}
.auth-glass .form-check-input:checked {
    background-color: #7c3aed !important;
    border-color: #7c3aed !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 11' width='13' height='11' fill='none'%3e%3cpath d='M11.0426 1.02893C11.3258 0.695792 11.8254 0.655283 12.1585 0.938451C12.4917 1.22162 12.5322 1.72124 12.249 2.05437L5.51985 9.97104C5.23224 10.3094 4.72261 10.3457 4.3907 10.0513L0.828197 6.88439C0.50141 6.59512 0.471975 6.09481 0.761241 5.76802C1.05051 5.44123 1.55082 5.4118 1.87761 5.70106L4.87095 8.36408L11.0426 1.02893Z' fill='white'/%3e%3c/svg%3e") !important;
}

/* Links */
.auth-glass .link-primary {
    color: #a78bfa !important;
    transition: color .2s;
}
.auth-glass .link-primary:hover {
    color: #c4b5fd !important;
}

/* Primary button — gradient */
.auth-glass .btn-primary {
    background: linear-gradient(135deg, #7c3aed, #2563eb) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 32px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    letter-spacing: .3px;
    box-shadow: 0 4px 20px rgba(124,58,237,.35) !important;
    transition: all .25s !important;
    width: 100%;
}
.auth-glass .btn-primary:hover {
    box-shadow: 0 6px 28px rgba(124,58,237,.5) !important;
    transform: translateY(-1px);
}

/* Secondary / Light buttons (Cancel, etc.) */
.auth-glass .btn-light-primary {
    background: rgba(124,58,237,.1) !important;
    border: 1px solid rgba(124,58,237,.25) !important;
    color: #a78bfa !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    transition: all .2s;
}
.auth-glass .btn-light-primary:hover {
    background: rgba(124,58,237,.2) !important;
    color: #c4b5fd !important;
}

/* Separator line */
.auth-glass .separator {
    border-color: rgba(255,255,255,.1) !important;
}
.auth-glass .separator span {
    color: rgba(255,255,255,.35) !important;
    background: transparent !important;
}

/* Social buttons */
.auth-glass .btn-outline {
    background: rgba(255,255,255,.06) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    color: rgba(255,255,255,.8) !important;
    border-radius: 12px !important;
    transition: all .2s;
}
.auth-glass .btn-outline:hover {
    background: rgba(255,255,255,.12) !important;
    border-color: rgba(255,255,255,.2) !important;
    color: #fff !important;
}

/* Password meter */
.auth-glass .bg-secondary {
    background-color: rgba(255,255,255,.1) !important;
}
.auth-glass .text-muted {
    color: rgba(255,255,255,.4) !important;
}

/* OTP input focus */
.auth-glass .otp-single-character:focus {
    background: rgba(124,58,237,.12) !important;
    border-color: rgba(124,58,237,.6) !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,.15), 0 0 16px rgba(124,58,237,.1) !important;
}
[data-bs-theme="light"] .auth-glass .otp-single-character:focus {
    background: #fff !important;
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,.1) !important;
}

/* ── Footer ── */
.auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.auth-footer a {
    color: rgba(255,255,255,.45) !important;
    font-size: 13px;
    font-weight: 500;
    transition: color .2s;
    text-decoration: none;
}
.auth-footer a:hover {
    color: #a78bfa !important;
}
.auth-footer .auth-footer-links {
    display: flex;
    gap: 16px;
}

/* Language selector override */
.auth-footer .btn-link {
    color: rgba(255,255,255,.45) !important;
    font-size: 13px;
    padding: 0;
}
.auth-footer .btn-link:hover {
    color: #a78bfa !important;
}
.auth-footer .flag-icon {
    opacity: .7;
}

/* ── Particles (floating dots) ── */
.auth-particle {
    position: absolute;
    width: 4px; height: 4px;
    background: rgba(255,255,255,.2);
    border-radius: 50%;
    animation: authParticle 20s linear infinite;
    z-index: 0;
}
.auth-particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 18s; }
.auth-particle:nth-child(2) { left: 25%; top: 60%; animation-delay: -4s; animation-duration: 22s; }
.auth-particle:nth-child(3) { left: 50%; top: 30%; animation-delay: -8s; animation-duration: 16s; }
.auth-particle:nth-child(4) { left: 70%; top: 70%; animation-delay: -12s; animation-duration: 24s; }
.auth-particle:nth-child(5) { left: 85%; top: 40%; animation-delay: -6s; animation-duration: 20s; }
.auth-particle:nth-child(6) { left: 35%; top: 80%; animation-delay: -10s; animation-duration: 26s; }
@keyframes authParticle {
    0%   { transform: translateY(0) scale(1); opacity: 0; }
    10%  { opacity: .6; }
    90%  { opacity: .6; }
    100% { transform: translateY(-100vh) scale(.5); opacity: 0; }
}

/* ── Light mode ── */
[data-bs-theme="light"] .auth-page {
    background: #f0f0f5;
}
[data-bs-theme="light"] .auth-bg-orb--1 { background: #c4b5fd; opacity: .3; }
[data-bs-theme="light"] .auth-bg-orb--2 { background: #93c5fd; opacity: .3; }
[data-bs-theme="light"] .auth-bg-orb--3 { background: #67e8f9; opacity: .15; }
[data-bs-theme="light"] .auth-bg-grid {
    background-image:
        linear-gradient(rgba(0,0,0,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,.04) 1px, transparent 1px);
}
[data-bs-theme="light"] .auth-brand-title { color: #1e1b4b; }
[data-bs-theme="light"] .auth-brand-desc { color: #6b7280; }
[data-bs-theme="light"] .auth-glass {
    background: rgba(255, 255, 255, .75);
    border-color: rgba(255, 255, 255, .5);
    box-shadow: 0 8px 32px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.8);
}
[data-bs-theme="light"] .auth-glass-glow { opacity: .08; }
[data-bs-theme="light"] .auth-glass h1,
[data-bs-theme="light"] .auth-glass .text-gray-900 { color: #1e1b4b !important; }
[data-bs-theme="light"] .auth-glass .text-gray-500,
[data-bs-theme="light"] .auth-glass .text-gray-400,
[data-bs-theme="light"] .auth-glass .text-gray-600,
[data-bs-theme="light"] .auth-glass .text-gray-700 { color: #6b7280 !important; }
[data-bs-theme="light"] .auth-glass .form-control {
    background: rgba(0,0,0,.03) !important;
    border: 1px solid rgba(0,0,0,.1) !important;
    color: #1e1b4b !important;
}
[data-bs-theme="light"] .auth-glass .form-control::placeholder { color: #9ca3af !important; }
[data-bs-theme="light"] .auth-glass .form-control:focus {
    background: #fff !important;
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,.1) !important;
}
[data-bs-theme="light"] .auth-glass .btn-icon i { color: #9ca3af !important; }
[data-bs-theme="light"] .auth-glass .form-check-label { color: #6b7280 !important; }
[data-bs-theme="light"] .auth-glass .form-check-input {
    background-color: #f3f4f6 !important;
    border-color: #d1d5db !important;
}
[data-bs-theme="light"] .auth-glass .form-check-input:checked {
    background-color: #7c3aed !important;
    border-color: #7c3aed !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 11' width='13' height='11' fill='none'%3e%3cpath d='M11.0426 1.02893C11.3258 0.695792 11.8254 0.655283 12.1585 0.938451C12.4917 1.22162 12.5322 1.72124 12.249 2.05437L5.51985 9.97104C5.23224 10.3094 4.72261 10.3457 4.3907 10.0513L0.828197 6.88439C0.50141 6.59512 0.471975 6.09481 0.761241 5.76802C1.05051 5.44123 1.55082 5.4118 1.87761 5.70106L4.87095 8.36408L11.0426 1.02893Z' fill='white'/%3e%3c/svg%3e") !important;
}
[data-bs-theme="light"] .auth-glass .link-primary { color: #7c3aed !important; }
[data-bs-theme="light"] .auth-glass .link-primary:hover { color: #6d28d9 !important; }
[data-bs-theme="light"] .auth-glass .btn-light-primary {
    background: rgba(124,58,237,.08) !important;
    border: 1px solid rgba(124,58,237,.2) !important;
    color: #7c3aed !important;
}
[data-bs-theme="light"] .auth-glass .btn-light-primary:hover {
    background: rgba(124,58,237,.15) !important;
    color: #6d28d9 !important;
}
[data-bs-theme="light"] .auth-glass .separator { border-color: rgba(0,0,0,.08) !important; }
[data-bs-theme="light"] .auth-glass .separator span { color: #9ca3af !important; }
[data-bs-theme="light"] .auth-glass .btn-outline {
    background: rgba(0,0,0,.02) !important;
    border: 1px solid rgba(0,0,0,.1) !important;
    color: #374151 !important;
}
[data-bs-theme="light"] .auth-glass .btn-outline:hover {
    background: rgba(0,0,0,.05) !important;
    color: #1e1b4b !important;
}
[data-bs-theme="light"] .auth-glass .bg-secondary { background-color: #e5e7eb !important; }
[data-bs-theme="light"] .auth-glass .text-muted { color: #9ca3af !important; }
[data-bs-theme="light"] .auth-footer a { color: #9ca3af !important; }
[data-bs-theme="light"] .auth-footer a:hover { color: #7c3aed !important; }
[data-bs-theme="light"] .auth-footer .btn-link { color: #6b7280 !important; }
[data-bs-theme="light"] .auth-particle { background: rgba(0,0,0,.06); }
[data-bs-theme="light"] .auth-brand-dots { opacity: .06; background-image: radial-gradient(circle, #1e1b4b 1.5px, transparent 1.5px); }

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .auth-page {
        flex-direction: column;
    }
    .auth-brand {
        padding: 32px 24px 16px;
        flex: none;
        align-items: center;
    }
    .auth-brand-illustration {
        display: none;
    }
    .auth-brand-logo {
        height: 40px;
        margin-bottom: 0;
    }
    .auth-brand-title {
        display: none;
    }
    .auth-brand-desc {
        display: none;
    }
    .auth-brand-dots { display: none; }
    .auth-form-panel {
        padding: 16px 20px 32px;
    }
    .auth-glass {
        padding: 32px 24px;
        border-radius: 20px;
    }
    .auth-bg-orb--1 { width: 300px; height: 300px; }
    .auth-bg-orb--2 { width: 250px; height: 250px; }
    .auth-bg-orb--3 { display: none; }
}

@media (max-width: 575.98px) {
    .auth-brand {
        padding: 24px 24px 8px;
    }
    .auth-brand-logo {
        height: 36px;
    }
    .auth-form-panel {
        padding: 8px 16px 24px;
    }
    .auth-glass {
        padding: 24px 20px;
    }
    .auth-glass h1 {
        font-size: 20px !important;
    }
    .auth-glass .btn-primary {
        padding: 10px 24px !important;
    }
    .auth-footer {
        flex-direction: column;
        gap: 8px;
        align-items: center;
        margin-top: 20px;
        padding-top: 16px;
    }
}
