/* ══════════════════════════════════════════════════════════
   AUTH PAGES — ComplianceDesk
   Dark Split Layout with Animated Background
   ══════════════════════════════════════════════════════════ */

/* ═══ Base ═══════════════════════════════════════════════ */
.auth-body {
    background: #060B18 !important;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    color: #fff;
}

/* ═══ Background Effects ════════════════════════════════ */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-bg-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 0% 100%, rgba(0,201,167,.14) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 90% 0%, rgba(59,107,245,.10) 0%, transparent 45%),
        radial-gradient(ellipse 50% 40% at 40% 50%, rgba(168,85,247,.06) 0%, transparent 40%),
        radial-gradient(ellipse 40% 30% at 60% 80%, rgba(0,201,167,.08) 0%, transparent 35%);
}

/* Floating glow orbs */
.auth-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.auth-glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,201,167,.18), transparent 70%);
    bottom: -20%;
    left: -8%;
    animation: glowDrift1 20s ease-in-out infinite alternate;
}

.auth-glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59,107,245,.14), transparent 70%);
    top: -15%;
    right: 10%;
    animation: glowDrift2 24s ease-in-out infinite alternate;
}

.auth-glow-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(168,85,247,.10), transparent 70%);
    top: 40%;
    left: 25%;
    animation: glowDrift3 18s ease-in-out infinite alternate;
}

@keyframes glowDrift1 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, -40px) scale(1.15); }
}
@keyframes glowDrift2 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-50px, 30px) scale(1.1); }
}
@keyframes glowDrift3 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-30px, -50px) scale(0.9); }
}

/* Grid overlay — only on left panel area */
.auth-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,201,167,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,201,167,.05) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 45% 55% at 25% 50%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 45% 55% at 25% 50%, black 0%, transparent 70%);
}

/* Floating particles */
.auth-particles {
    position: absolute;
    inset: 0;
}

.auth-particles span {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #00C9A7;
    opacity: 0;
    animation: particleFloat 14s ease-in-out infinite;
}

.auth-particles span:nth-child(1)  { left: 8%;  top: 15%; animation-delay: 0s; }
.auth-particles span:nth-child(2)  { left: 20%; top: 65%; animation-delay: -1.5s; }
.auth-particles span:nth-child(3)  { left: 35%; top: 10%; animation-delay: -3s; }
.auth-particles span:nth-child(4)  { left: 45%; top: 75%; animation-delay: -4.5s; }
.auth-particles span:nth-child(5)  { left: 12%; top: 85%; animation-delay: -6s; }
.auth-particles span:nth-child(6)  { left: 28%; top: 40%; animation-delay: -7.5s; }
.auth-particles span:nth-child(7)  { left: 42%; top: 55%; animation-delay: -9s; }
.auth-particles span:nth-child(8)  { left: 5%;  top: 45%; animation-delay: -10.5s; }
.auth-particles span:nth-child(9)  { left: 38%; top: 25%; animation-delay: -2s; }
.auth-particles span:nth-child(10) { left: 15%; top: 72%; animation-delay: -5s; }
.auth-particles span:nth-child(11) { left: 48%; top: 35%; animation-delay: -8s; }
.auth-particles span:nth-child(12) { left: 30%; top: 90%; animation-delay: -11s; }

@keyframes particleFloat {
    0%, 100% { opacity: 0; transform: translateY(0) scale(1); }
    15%      { opacity: 0.6; }
    50%      { opacity: 0.35; transform: translateY(-70px) scale(1.5); }
    85%      { opacity: 0; }
}

/* ═══ Split Layout ══════════════════════════════════════ */
.auth-split {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ═══ Left Branding Panel ═══════════════════════════════ */
.auth-brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 70px;
    position: relative;
    z-index: 2;
}

.auth-brand-content {
    max-width: 540px;
    animation: brandFadeIn 0.8s ease-out both;
}

@keyframes brandFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Brand Logo */
.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 48px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00C9A7, #3B6BF5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 30px rgba(0,201,167,.4);
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    color: #fff;
    letter-spacing: -0.3px;
}

.brand-name span {
    color: #00C9A7;
}

.brand-sub {
    font-size: 13px;
    color: rgba(255,255,255,.45);
    margin-top: 2px;
}

/* Headline */
.auth-brand-headline {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.auth-brand-headline span {
    color: #00C9A7;
}

/* Description */
.auth-brand-desc {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255,255,255,.5);
    margin-bottom: 40px;
}

/* Feature Cards */
.auth-features {
    display: flex;
    gap: 14px;
    margin-bottom: 36px;
}

.auth-feature {
    flex: 1;
    padding: 18px 16px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    transition: all 0.3s ease;
    animation: featureFadeIn 0.5s ease-out both;
}

.auth-feature:nth-child(1) { animation-delay: 0.4s; }
.auth-feature:nth-child(2) { animation-delay: 0.5s; }
.auth-feature:nth-child(3) { animation-delay: 0.6s; }

@keyframes featureFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-feature:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(0,201,167,.2);
    transform: translateY(-3px);
}

.auth-feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(0,201,167,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00C9A7;
    font-size: 17px;
    margin-bottom: 12px;
}

.auth-feature-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13.5px;
    color: #fff;
    margin-bottom: 4px;
}

.auth-feature-desc {
    font-size: 12px;
    color: rgba(255,255,255,.4);
    line-height: 1.5;
}

/* Trust Badge */
.auth-trust-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(0,201,167,.05);
    border: 1px solid rgba(0,201,167,.1);
    border-radius: 10px;
    font-size: 13px;
    color: rgba(255,255,255,.55);
    animation: featureFadeIn 0.5s 0.7s ease-out both;
}

.auth-trust-bar i {
    color: #00C9A7;
    font-size: 18px;
    flex-shrink: 0;
}

/* Footer */
.auth-brand-footer {
    position: absolute;
    bottom: 28px;
    left: 70px;
    font-size: 12px;
    color: rgba(255,255,255,.25);
}

/* ═══ Center Beam ═══════════════════════════════════════ */
.auth-beam-wrap {
    width: 50px;
    position: relative;
    z-index: 3;
    flex-shrink: 0;
}

.auth-beam-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1.5px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0,201,167,.25) 15%,
        rgba(0,201,167,.7) 50%,
        rgba(0,201,167,.25) 85%,
        transparent 100%
    );
    transform: translateX(-50%);
}

.auth-beam-glow {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0,201,167,.06) 15%,
        rgba(0,201,167,.12) 50%,
        rgba(0,201,167,.06) 85%,
        transparent 100%
    );
    transform: translateX(-50%);
    filter: blur(12px);
    animation: beamPulse 4s ease-in-out infinite;
}

@keyframes beamPulse {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

/* Traveling dots along the beam */
.auth-beam-dot {
    position: absolute;
    left: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #00C9A7;
    box-shadow: 0 0 8px rgba(0,201,167,.8), 0 0 20px rgba(0,201,167,.4);
    transform: translateX(-50%);
    animation: beamDot 7s linear infinite;
}

.auth-beam-dot-1 { animation-delay: 0s; }
.auth-beam-dot-2 { animation-delay: -2.3s; }
.auth-beam-dot-3 { animation-delay: -4.6s; }

@keyframes beamDot {
    0%   { top: -2%; opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { top: 102%; opacity: 0; }
}

/* ═══ Right Form Panel ══════════════════════════════════ */
.auth-form-panel {
    flex: 0 0 auto;
    width: 50%;
    max-width: 700px;
    min-width: 500px;
    display: flex;
    justify-content: center;
    padding: 40px;
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,.015);
    overflow-y: auto;
}

.auth-form-inner {
    width: 100%;
    max-width: 600px;
    margin: auto 0;
    padding: 20px 0;
}

/* Scrollbar styling */
.auth-form-panel::-webkit-scrollbar { width: 4px; }
.auth-form-panel::-webkit-scrollbar-track { background: transparent; }
.auth-form-panel::-webkit-scrollbar-thumb { background: rgba(0,201,167,.25); border-radius: 4px; }

/* ═══ Auth Card ═════════════════════════════════════════ */
.auth-card {
    width: 100%;
    max-width: 460px;
    background: rgba(12, 18, 30, .80);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    padding: 44px 40px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 8px 40px rgba(0,0,0,.25),
        0 0 0 1px rgba(255,255,255,.04) inset;
    animation: cardReveal 0.6s cubic-bezier(.22,1,.36,1) 0.2s both;

    --bg-card:   rgba(12, 18, 30, .80);
    --bg-input:  rgba(255,255,255,.05);
    --bg-hover:  rgba(255,255,255,.08);
    --border:    rgba(255,255,255,.10);
    --border-2:  rgba(255,255,255,.14);
    --text-1:    #EDF2FF;
    --text-2:    #8B96AD;
    --text-3:    #4A5568;
}

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

/* ═══ Logo in Auth Card ═════════════════════════════════ */
.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
    animation: fadeIn 0.5s 0.3s both;
}

.auth-logo .logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #3B6BF5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 24px var(--accent-glow);
}

.auth-logo .logo-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.3px;
    color: #EDF2FF;
}

.auth-logo .logo-text span {
    color: var(--accent);
}

/* ═══ Headings ══════════════════════════════════════════ */
.auth-heading {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
    color: #EDF2FF;
    animation: fadeIn 0.5s 0.35s both;
}

.auth-subhead {
    font-size: 14px;
    color: #8B96AD;
    margin-bottom: 32px;
    animation: fadeIn 0.5s 0.4s both;
}

/* ═══ Alerts ════════════════════════════════════════════ */
.alert-themed {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.3s both;
}

.alert-themed.alert-danger {
    background: #FF526315;
    border: 1px solid #FF526340;
    color: var(--danger);
}

.alert-themed.alert-success {
    background: #00C9A715;
    border: 1px solid #00C9A740;
    color: var(--accent);
}

/* ═══ Form Controls ═════════════════════════════════════ */
.form-group-themed {
    margin-bottom: 20px;
}

.form-group-themed label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #8B96AD;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #4A5568;
    font-size: 16px;
    pointer-events: none;
    transition: color var(--transition);
}

.input-wrap:focus-within .input-icon {
    color: var(--accent);
}

.form-control-themed {
    width: 100%;
    padding: 13px 44px 13px 42px;
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.10);
    border-radius: var(--radius-sm);
    color: #EDF2FF;
    font-family: var(--font-body);
    font-size: 14.5px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-control-themed:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0,201,167,.15);
    background: rgba(255,255,255,.08);
}

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

.form-control-themed.no-icon {
    padding-left: 16px;
}

.pw-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #4A5568;
    font-size: 16px;
    padding: 4px;
    transition: color var(--transition);
}

.pw-toggle:hover {
    color: #8B96AD;
}

/* ═══ Options Row ═══════════════════════════════════════ */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    font-size: 13.5px;
}

.auth-options .form-check-input {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--accent);
}

.auth-options .form-check-label {
    color: #8B96AD;
    cursor: pointer;
    font-size: 13.5px;
}

.forgot-link {
    color: var(--accent);
    text-decoration: none;
    transition: opacity var(--transition);
}

.forgot-link:hover {
    opacity: 0.7;
}

/* ═══ Submit Button ═════════════════════════════════════ */
.btn-auth {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--accent), #00a588);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-auth::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ffffff25, transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px var(--accent-glow);
    color: #fff;
}

.btn-auth:hover::before {
    opacity: 1;
}

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

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid #ffffff50;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}

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

/* ═══ Divider ═══════════════════════════════════════════ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0;
    color: #4A5568;
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,.10);
}

/* ═══ Footer ════════════════════════════════════════════ */
.auth-footer {
    text-align: center;
    font-size: 13.5px;
    color: #8B96AD;
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ═══ Security Badge ════════════════════════════════════ */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    font-size: 12px;
    color: #4A5568;
}

/* ═══ Animations ════════════════════════════════════════ */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ═══ Responsive ════════════════════════════════════════ */
@media (max-width: 1200px) {
    .auth-brand {
        padding: 50px 50px;
    }

    .auth-brand-headline {
        font-size: 30px;
    }

    .auth-brand-footer {
        left: 50px;
    }
}

@media (max-width: 992px) {
    .auth-brand {
        display: none;
    }

    .auth-beam-wrap {
        display: none;
    }

    .auth-form-panel {
        width: 100%;
        max-width: none;
        min-width: unset;
        min-height: 100vh;
        align-items: center;
    }

    .auth-form-inner {
        max-width: 480px;
    }

    .auth-grid-overlay {
        mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 0%, transparent 70%);
        -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 0%, transparent 70%);
    }

    .auth-particles span {
        left: auto !important;
    }
    .auth-particles span:nth-child(1)  { right: 10%; }
    .auth-particles span:nth-child(2)  { right: 30%; }
    .auth-particles span:nth-child(3)  { right: 50%; }
    .auth-particles span:nth-child(4)  { right: 70%; }
    .auth-particles span:nth-child(5)  { right: 90%; }
    .auth-particles span:nth-child(6)  { right: 20%; }
    .auth-particles span:nth-child(7)  { right: 40%; }
    .auth-particles span:nth-child(8)  { right: 60%; }
    .auth-particles span:nth-child(9)  { right: 80%; }
    .auth-particles span:nth-child(10) { right: 15%; }
    .auth-particles span:nth-child(11) { right: 55%; }
    .auth-particles span:nth-child(12) { right: 75%; }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .auth-heading {
        font-size: 22px;
    }

    .auth-form-panel {
        padding: 24px;
    }
}
