/* auth-custom.css - Premium Split Screen, Zero-Scroll Auth Pages */

/* ===========================
   Base: Lock to Viewport
   =========================== */
html.auth-html,
html.auth-html body.auth-page {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Mulish', sans-serif;
    background-color: #e5f9fa;
}

@media (min-width: 993px) {
    html.auth-html,
    html.auth-html body.auth-page {
        overflow: hidden !important;
    }
}

.mad-preloader {
    display: none !important;
}

/* ===========================
   Split Layout: 45/55 Ratio
   =========================== */
.split-layout {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* ===========================
   Left Pane (40% Dark)
   =========================== */
.split-left {
    flex: 0 0 40%;
    background-color: var(--sb-bg, #0d1f35); /* Dark navy from sidebar */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.split-left-bg-pattern {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(circle at 10% 20%, rgba(0, 198, 215, 0.03) 0%, transparent 20%),
                      radial-gradient(circle at 90% 80%, rgba(0, 198, 215, 0.04) 0%, transparent 40%);
    opacity: 0.8;
    pointer-events: none;
    z-index: 1;
}

.split-left-inner {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
    position: relative;
}

/* ===========================
   Auth Brand Logo & Header
   =========================== */
.auth-brand-logo {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    text-decoration: none;
}

.split-left-headline {
    color: #ffffff;
    font-size: clamp(32px, 3.5vw, 44px);
    font-weight: 900;
    line-height: 1.15;
    margin: 0 0 24px 0;
}

.auth-subtitle-accent {
    font-size: 13px;
    font-weight: 700;
    color: #00C6D7;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    display: block;
}

.auth-card-title {
    font-size: 28px;
    font-weight: 800;
    color: #012e40;
    margin: 0 0 4px 0;
    line-height: 1.25;
}

.auth-card-subtitle {
    font-size: 14px;
    color: #6b7a82;
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

/* ===========================
   Form Inputs
   =========================== */
.auth-form-group {
    margin-bottom: 8px;
}

.auth-form-group label {
    display: block;
    margin-bottom: 5px;
    color: #012e40;
    font-weight: 600;
    font-size: 13.5px;
}

.auth-input-container {
    position: relative;
}

.auth-input-container.has-icon .auth-input {
    padding-left: 42px;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aeb5;
    font-size: 18px;
    transition: color 0.2s ease;
}

.auth-input {
    width: 100%;
    height: 44px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 14px;
    font-family: 'Mulish', sans-serif;
    color: #012e40;
    transition: all 0.2s ease;
    background-color: #ffffff;
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: #a0aeb5;
}

.auth-input:focus {
    outline: none;
    border-color: #00C6D7;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 198, 215, 0.25);
}

.auth-input:focus ~ .auth-input-icon {
    color: #00C6D7;
}

.auth-toggle-pwd {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aeb5;
    cursor: pointer;
    font-size: 19px;
    transition: color 0.2s ease;
    user-select: none;
}

.auth-toggle-pwd:hover {
    color: #069dbf;
}

.forgot-password-container {
    text-align: right;
    margin-top: 8px;
}

.forgot-password-link {
    color: #00C6D7;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: #0098FF;
}

/* ===========================
   CTA Buttons
   =========================== */
.auth-btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #00C6D7 0%, #0098FF 100%);
    color: #ffffff;
    border: none;
    height: 44px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    font-family: 'Mulish', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 152, 255, 0.22);
    letter-spacing: 0.02em;
}

.auth-btn-primary.btn-animated:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 152, 255, 0.35);
}

.auth-btn-primary.btn-animated:hover .btn-arrow {
    transform: translateX(4px);
}

.auth-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 152, 255, 0.18);
}

.btn-arrow {
    transition: transform 0.3s ease;
    font-size: 18px;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 16px 0;
    color: #a0aeb5;
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
    padding: 0 10px;
}

.auth-btn-secondary {
    width: 100%;
    background-color: transparent;
    color: #00C6D7;
    border: 2px solid #00C6D7;
    height: 44px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Mulish', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.auth-btn-secondary:hover {
    background-color: rgba(0, 198, 215, 0.06);
    border-color: #00C6D7;
    transform: translateY(-1px);
}

/* ===========================
   Trust Badges (Horizontal)
   =========================== */
.trust-badges {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
}

.trust-badge-icon {
    font-size: 14px;
    line-height: 1;
}

.auth-copyright {
    text-align: left;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 100%;
}

/* ===========================
   Links & Footer
   =========================== */
/* removed auth-link-bottom and old copyright */

/* ===========================
   Alerts
   =========================== */
.auth-form-container .alert {
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 16px;
    padding: 10px 14px;
}

/* ===========================
   Multi-Step Form
   =========================== */
.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
    animation: stepFadeIn 0.25s ease;
}

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

/* ===========================
   Right Pane (60% Light)
   =========================== */
.split-right {
    flex: 0 0 60%;
    background-color: #e5f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
}

.split-right-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
    background: transparent;
    margin: auto;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.hero-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #ffffff;
}

.hero-feature-icon {
    width: 32px;
    height: 32px;
    background: rgba(0, 198, 215, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #00C6D7;
    flex-shrink: 0;
    margin-top: 4px;
}

.hero-feature-text {
    display: flex;
    flex-direction: column;
}

.hero-feature-text strong {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.hero-feature-text span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* ===========================
   Responsive: Tablet & Mobile
   =========================== */
@media (max-width: 992px) {
    html.auth-html,
    html.auth-html body.auth-page {
        overflow: auto;
    }
    .split-layout {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .split-left {
        flex: 0 0 auto;
        padding: 30px 20px;
        min-height: auto;
        text-align: center;
    }
    .split-left-inner {
        align-items: center;
    }
    .hero-features {
        display: none; /* Hide detailed features on mobile to save space */
    }
    .split-left-headline {
        font-size: 24px;
        margin-bottom: 10px;
    }
    .split-right {
        flex: 1 1 auto;
        min-height: 100vh;
        height: auto;
        padding: 40px 20px;
        justify-content: flex-start;
    }
    .split-right-headline {
        font-size: 28px;
    }
    .auth-card {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .split-left {
        padding: 20px 16px;
    }
    .split-right-headline {
        font-size: 24px;
    }
    .hero-features {
        gap: 6px;
    }
    .hero-feature {
        font-size: 12px;
    }
    .auth-card {
        padding: 20px 16px;
        border-radius: 18px;
    }
}

/* ===========================
   Height-Constrained Screens
   =========================== */
@media (max-height: 768px) {
    .auth-card {
        padding: 22px 28px 18px;
    }
    .auth-card-header {
        margin-bottom: 14px;
    }
    .auth-card-logo img {
        height: 28px;
    }
    .auth-card-logo {
        margin-bottom: 10px;
    }
    .auth-card-title {
        font-size: 19px;
    }
    .auth-form-group {
        margin-bottom: 10px;
    }
    .auth-input {
        height: 40px;
        font-size: 13px;
    }
    .auth-btn-primary,
    .auth-btn-secondary {
        height: 40px;
        font-size: 14px;
    }
    .trust-badges {
        margin-top: 12px;
    }
    .trust-badge {
        padding: 4px 10px;
        font-size: 10px;
    }
    .auth-link-bottom {
        margin-top: 8px;
    }
    .auth-copyright {
        margin-top: 4px;
    }
}

/* ===========================
   New UI/UX Overhaul Additions
   =========================== */

/* Step Progress Indicator */
.auth-step-progress {
    margin-bottom: 12px;
}
.progress-labels {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
}
.progress-step {
    color: #a0aeb5;
    transition: color 0.3s ease;
}
.progress-step.active {
    color: #00C6D7;
}
.progress-divider {
    color: #e2e8f0;
    display: flex;
    font-size: 14px;
}
.progress-bar-container {
    width: 100%;
    height: 4px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    width: 50%; /* 50% for step 1, 100% for step 2 */
    background: linear-gradient(90deg, #00C6D7 0%, #0098FF 100%);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* Valid/Invalid Input States */
.auth-input-container.valid .auth-input {
    border-color: #10b981;
}
.auth-input-container.valid .auth-valid-icon {
    display: block;
    color: #10b981;
}
.auth-input-container.invalid .auth-input {
    border-color: #ef4444;
}
.auth-input-container.invalid .auth-valid-icon {
    display: block;
    content: "!";
    color: #ef4444;
}
.auth-valid-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    display: none;
    pointer-events: none;
}
.auth-error-msg {
    color: #ef4444;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    display: none;
}

/* Phone Selector */
.phone-input-container {
    display: flex;
}
.phone-country-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-right: none;
    border-radius: 12px 0 0 12px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #012e40;
}
.phone-country-selector .prefix {
    color: #6b7a82;
}
.phone-input-container .auth-input {
    border-radius: 0 12px 12px 0;
    padding-left: 14px;
}
.phone-input-container .auth-input:focus {
    border-color: #00C6D7;
    z-index: 2; /* To cover the left border of the selector visually */
}

/* Password Checklist & Match */
.pwd-checklist {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #6b7a82;
}
.pwd-checklist li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    transition: color 0.3s ease;
}
.pwd-checklist li i {
    font-size: 14px;
    transition: color 0.3s ease;
}
.pwd-checklist li.valid {
    color: #10b981;
}
.pwd-checklist li.valid i::before {
    content: "\ea5e"; /* ti-check icon code in tabler */
}
.pwd-match-indicator {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    height: 18px; /* reserve space */
}

/* Footer & Trust */
.auth-trust-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #a0aeb5;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    border: 1px dashed #e2e8f0;
}
.auth-trust-security i {
    color: #10b981;
    font-size: 18px;
}
.auth-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 11px;
    color: #a0aeb5;
}
.auth-footer-links a {
    color: #6b7a82;
    text-decoration: none;
    transition: color 0.2s ease;
}
.auth-footer-links a:hover {
    color: #00C6D7;
}
.auth-footer-links .dot {
    opacity: 0.5;
}

/* Success State Overlay */
.auth-success-state {
    text-align: center;
    padding: 40px 20px;
}
.success-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px auto;
    animation: successPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes successPop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Step Animations */
.auth-step {
    display: none;
    opacity: 0;
}
.auth-step.active-step {
    display: block;
    opacity: 1;
    animation: slideInRight 0.3s ease forwards;
}
.auth-step.fade-out-left {
    display: block;
    animation: fadeOutLeft 0.25s ease forwards;
}
.auth-step.slide-in-right {
    display: block;
    animation: slideInRight 0.3s ease forwards;
}
.auth-step.slide-in-left {
    display: block;
    animation: slideInLeft 0.3s ease forwards;
}
.auth-step.fade-out-right {
    display: block;
    animation: fadeOutRight 0.25s ease forwards;
}

@keyframes slideInRight {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-20px); opacity: 0; }
}
@keyframes slideInLeft {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(20px); opacity: 0; }
}
