/* ===== PREMIUM STOCK BROKER AUTH DESIGN (Centered & Clean) ===== */

:root {
    /* Brand Design Tokens */
    --brand-primary: #169068;
    --brand-primary-hover: #127a58;
    --brand-primary-light: rgba(22, 144, 104, 0.08);

    /* Light Mode (default) */
    --auth-bg-main: #f8fafc;
    --auth-bg-card: #ffffff;
    --auth-bg-input: #ffffff;
    --auth-bg-input-subtle: #f8fafc;
    --auth-text-main: #0f172a;
    --auth-text-muted: #64748b;
    --auth-border-color: #e2e8f0;
    --auth-body-overlay: rgba(248, 250, 252, 0.85);

    --radius-lg: 20px;
    --radius-md: 12px;
    --auth-shadow-main: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

/* ===== FORCE LIGHT MODE ON AUTH PAGES (always, regardless of user theme) ===== */
.dark-theme {
    --auth-bg-main: #f8fafc;
    --auth-bg-card: #ffffff;
    --auth-bg-input: #ffffff;
    --auth-bg-input-subtle: #f8fafc;
    --auth-text-main: #0f172a;
    --auth-text-muted: #64748b;
    --auth-border-color: #e2e8f0;
    --auth-body-overlay: rgba(248, 250, 252, 0.85);
    --auth-shadow-main: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(var(--auth-body-overlay), var(--auth-body-overlay)),
        url('https://images.unsplash.com/photo-1611974717482-48a00174095c?q=80&w=2070&auto=format&fit=crop') center/cover no-repeat fixed;
    color: var(--auth-text-main);
    font-family: 'Inter', 'Poppins', -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Back Home Button */
.back-home-btn {
    position: fixed !important;
    bottom: 2rem !important;
    left: 2rem !important;
    top: auto !important;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.25rem;
    background: var(--auth-bg-card);
    border: 1px solid var(--auth-border-color);
    border-radius: var(--radius-md);
    color: var(--auth-text-main);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    z-index: 1000;
}

@media (max-width: 768px) {
    .back-home-btn {
        bottom: 1rem !important;
        left: 1rem !important;
        top: auto !important;
        padding: 0.5rem 0.875rem;
        font-size: 13px;
    }
}

.back-home-btn:hover {
    background: var(--auth-bg-input-subtle);
    transform: translateX(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Container & Wrapper */
.signin-container,
.signup-container {
    width: 100%;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
}

/* Hide the unused hero side for the centered design */
.auth-info-side {
    display: none !important;
}

.auth-wrapper {
    width: 100%;
    max-width: 480px;
    display: flex;
    justify-content: center;
}

.auth-form-side {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Card Styling */
.signin-card,
.signup-card {
    background: var(--auth-bg-card);
    width: 100%;
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--auth-border-color);
    box-shadow: var(--auth-shadow-main);
    text-align: center;
}

/* Header Sections */
.auth-logo-top {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.logo-box {
    display: none;
}

.logo-box-img {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.logo-box-img img {
    max-height: 58px;
    width: auto;
    object-fit: contain;
}

.auth-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--auth-text-main);
    letter-spacing: -0.5px;
}

.auth-subtitle {
    color: var(--auth-text-muted);
    font-size: 15px;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

/* Social Buttons */
.social-auth {
    margin-bottom: 1.5rem;
}

.google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0.875rem;
    background: var(--auth-bg-input);
    border: 1px solid var(--auth-border-color);
    border-radius: var(--radius-md);
    color: var(--auth-text-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.google-btn:hover {
    background: var(--auth-bg-input-subtle);
    border-color: var(--auth-border-color);
    transform: translateY(-1px);
}

.google-btn img {
    width: 20px;
}

/* Divider */
.auth-divider {
    position: relative;
    margin: 2rem 0;
    text-align: center;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--auth-border-color);
}

.auth-divider span {
    position: relative;
    background: var(--auth-bg-card);
    padding: 0 1rem;
    color: var(--auth-text-muted);
    font-size: 13px;
    font-weight: 500;
}

/* Form Elements */
.auth-form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--auth-text-main);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1.125rem;
    background: var(--auth-bg-input);
    border: 1px solid var(--auth-border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--auth-text-main);
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: var(--auth-text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px var(--brand-primary-light);
}

/* Password Group */
.auth-input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.input-icon:hover {
    color: var(--brand-primary);
}

/* Options (Remember & Forgot) */
.auth-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.auth-toggle-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.remember-text {
    font-size: 14px;
    color: var(--auth-text-muted);
    cursor: pointer;
}

.forgot-link {
    font-size: 14px;
    color: var(--brand-primary);
    font-weight: 600;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    background: var(--brand-primary);
    color: #ffffff !important;
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(22, 144, 104, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn * {
    color: #ffffff !important;
}

.submit-btn:hover {
    background: var(--brand-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(22, 144, 104, 0.2);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Footer / Links */
.auth-footer {
    margin-top: 2.5rem;
    font-size: 15px;
    color: var(--auth-text-muted);
}

.auth-footer a {
    color: var(--brand-primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alerts */
.auth-alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 14px;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.auth-alert.show {
    display: flex;
}

.auth-alert.error {
    background: rgba(255, 68, 68, 0.08);
    color: #ff4444;
    border: 1px solid rgba(255, 68, 68, 0.1);
}

.auth-alert.success {
    background: rgba(22, 144, 104, 0.08);
    color: #169068;
    border: 1px solid rgba(22, 144, 104, 0.1);
}

/* Utils */
.pb-4 {
    padding-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.btn-loading {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Custom Toggle Switch */
.auth-toggle-switch {
    display: inline-block;
    width: 36px;
    height: 20px;
    position: relative;
}

.auth-toggle-switch input {
    display: none;
}

.auth-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--auth-border-color);
    border-radius: 20px;
    transition: 0.2s;
    cursor: pointer;
}

.auth-toggle-slider:before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--auth-bg-card);
    border-radius: 50%;
    transition: 0.2s;
}

input:checked+.auth-toggle-slider {
    background-color: var(--brand-primary);
}

input:checked+.auth-toggle-slider:before {
    transform: translateX(16px);
}

/* Password Strength (Minimal) */
.password-strength {
    margin-top: 10px;
    display: none;
}

.password-strength.show {
    display: block;
}

.strength-bar {
    height: 4px;
    background: var(--auth-border-color);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
}

.strength-weak {
    background-color: #ff4444;
}

.strength-medium {
    background-color: #ffb800;
}

.strength-strong {
    background-color: #169068;
}

.strength-text {
    font-size: 12px;
    color: var(--auth-text-muted);
    margin-top: 6px;
}

/* Common Multi-Step Components */
.auth-step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.auth-step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--auth-bg-input-subtle);
    color: var(--auth-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
    border: 1px solid var(--auth-border-color);
}

.auth-step.active {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
    box-shadow: 0 4px 10px rgba(22, 144, 104, 0.2);
}

.auth-step.completed {
    background: #00dc82;
    color: white;
    border-color: #00dc82;
}

.auth-line {
    width: 30px;
    height: 2px;
    background: var(--auth-border-color);
}

.auth-form-step {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.auth-form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-info-box {
    background: var(--brand-primary-light);
    border: 1px solid rgba(22, 144, 104, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    text-align: left;
}

.auth-info-box i {
    color: var(--brand-primary);
    font-size: 1.25rem;
}

.info-text {
    font-size: 14px;
    color: var(--auth-text-main);
    line-height: 1.4;
    font-weight: 500;
}