/* ============================================
   auth THEME LOGIN PAGE STYLES (PREMIUM DARK)
   ============================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    font-family: 'Inter', 'Open Sans', sans-serif;
    color: #f8fafc;
}

/* Main Login Page Container */
.auth-login-page {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: flex-start; /* Prevent clipping */
    justify-content: center;
    position: relative;
    background: transparent; /* Remove black background to match homepage */
    padding: 40px 20px;
}

/* Animated Background Shapes */
.auth-background {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.auth-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.6;
}

.auth-shape-1 {
    width: 50vw;
    height: 50vw;
    max-width: 600px;
    max-height: 600px;
    background: #8728d7;
    top: 10%;
    left: -10%;
}

.auth-shape-2 {
    width: 40vw;
    height: 40vw;
    max-width: 500px;
    max-height: 500px;
    background: #0f828a;
    bottom: 0%;
    right: -5%;
}

.auth-shape-3 {
    width: 35vw;
    height: 35vw;
    max-width: 400px;
    max-height: 400px;
    background: #3b1480;
    top: 40%;
    left: 30%;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* Container */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    margin: auto; /* Safe centering */
    display: flex;
    justify-content: center;
}

.auth-row {
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth-col {
    width: 100%;
}

.auth-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Header */
.auth-card-header {
    padding: 40px 30px 20px;
    text-align: center;
}

.auth-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 14px;
    color: #94a3b8;
}

/* Card Body */
.auth-card-body {
    padding: 0 30px 40px;
}

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

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.auth-label i {
    display: none;
    /* Clean look */
}

/* Input Group */
.auth-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 16px;
    color: #64748b;
    font-size: 18px;
    transition: color 0.3s;
    z-index: 2;
    display: flex;
    align-items: center;
}

.auth-input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 14px;
    color: #ffffff;
    transition: all 0.3s;
    outline: none;
}

.auth-input:focus {
    background: rgba(0, 0, 0, 0.3);
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.auth-input:focus~.auth-input-icon {
    color: #818cf8;
}

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

/* Password Toggle */
.auth-password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 2;
    display: flex;
    align-items: center;
    font-size: 18px;
}

.auth-password-toggle:hover {
    color: #f8fafc;
}

/* Form Footer */
.auth-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    margin-top: 24px;
}

.auth-custom-control {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.auth-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    accent-color: #6366f1;
    cursor: pointer;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-checkbox-label {
    font-size: 13px;
    color: #94a3b8;
    cursor: pointer;
    user-select: none;
}

.auth-link {
    color: #818cf8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s;
}

.auth-link:hover {
    color: #a5b4fc;
}

/* Buttons */
.auth-btn {
    width: 100%;
    padding: 14px 20px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    outline: none;
}

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

.auth-btn-primary {
    margin-top: 8px;
    background: linear-gradient(90deg, #087dff, #075cf5);
    box-shadow: 0 16px 34px rgba(0, 101, 255, 0.29);
    margin-bottom: 20px;
}

.auth-btn-primary:hover {
    filter: brightness(1.08);
    box-shadow: 0 18px 38px rgba(0, 101, 255, 0.36);
}

.auth-btn-primary i {
    display: none;
}

.auth-btn-google {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 1px solid rgba(255, 255, 255, 0.77);
    background: rgba(8, 19, 49, 0.22);
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.025);
}

.auth-btn-google:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.auth-google-icon {
    position: absolute;
    left: 16px;
    width: 22px;
    height: 22px;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    padding: 0 15px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Alerts */
.auth-alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.auth-alert-danger {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.2);
    color: #fb7185;
}

/* Sign Up Link */
.auth-text-center {
    text-align: center;
}

.auth-signup-link {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-signup-link p {
    font-size: 14px;
    color: #94a3b8;
}

.auth-link-bold {
    color: #f8fafc;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    margin-left: 4px;
}

.auth-link-bold:hover {
    color: #818cf8;
}

/* ============================================
   MODALS AND TOASTS
   ============================================ */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.auth-modal-container {
    position: relative;
    z-index: 10000;
    width: 90%;
    max-width: 400px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-header {
    padding: 30px 20px 10px;
    text-align: center;
    color: #f8fafc;
}

.auth-modal-icon {
    width: 56px;
    height: 56px;
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
}

.auth-modal-header h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}

.auth-modal-header p {
    font-size: 13px;
    color: #94a3b8;
}

.auth-modal-body {
    padding: 20px 24px;
}

.auth-otp-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-otp-info i {
    font-size: 24px;
    color: #818cf8;
    margin-bottom: 8px;
}

.auth-otp-info p {
    font-size: 13px;
    color: #cbd5e1;
}

.auth-otp-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: 700;
    padding: 14px;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    width: 100%;
    outline: none;
}

.auth-otp-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.auth-otp-timer {
    text-align: center;
    margin-top: 16px;
    padding: 10px;
    background: rgba(244, 63, 94, 0.1);
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 12px;
}

.auth-otp-timer i {
    margin-right: 6px;
    color: #fb7185;
}

.auth-otp-timer strong {
    color: #fb7185;
    font-weight: 600;
}

.auth-modal-footer {
    padding: 0 24px 24px;
}

.auth-modal-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.auth-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.auth-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.4);
}

.auth-btn-link {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-btn-link:hover {
    color: #f8fafc;
}

.auth-btn-link-danger:hover {
    color: #fb7185;
}

/* Signup specific */
.auth-col-signup {
    max-width: 500px;
}

.auth-form-row {
    display: flex;
    gap: 16px;
}

.auth-form-group-half {
    flex: 1;
}

.auth-field-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
    font-style: italic;
}

.auth-error-message {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #fb7185;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 576px) {
    .auth-card {
        border-radius: 20px;
    }

    .auth-card-header,
    .auth-card-body {
        padding-left: 20px;
        padding-right: 20px;
    }

    .auth-title {
        font-size: 24px;
    }

    .auth-form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Toasts */
.auth-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    padding: 16px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: #f8fafc;
}

.auth-toast-show {
    opacity: 1;
    transform: translateX(0);
}

.auth-toast-success i {
    color: #34d399;
    font-size: 20px;
}

.auth-toast-error i {
    color: #fb7185;
    font-size: 20px;
}

.auth-toast-warning i {
    color: #fbbf24;
    font-size: 20px;
}

.auth-toast-info i {
    color: #38bdf8;
    font-size: 20px;
}