/* Layout overrides to isolate page styles from general template theme */
html, body {
    background-color: #f8fafc !important;
    font-family: 'Outfit', sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    color: #334155 !important;
}

.login-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
}

/* Ambient glow orbs - soft light theme gradients */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}
.glow-orb-1 {
    top: -10%;
    left: -10%;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, #e0e7ff 0%, transparent 70%);
}
.glow-orb-2 {
    bottom: -10%;
    right: -10%;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, #e0f2fe 0%, transparent 70%);
}

/* Header styling */
.navbar-minimal {
    width: 100%;
    padding: 28px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    z-index: 10;
}
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.brand-logo img {
    height: 38px;
    width: auto;
}
.brand-title-container {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.brand-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.5px;
}
.brand-subtitle {
    font-size: 10px;
    color: #4f46e5;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 2px;
}
.nav-support {
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    border: 1px solid #e2e8f0;
    padding: 8px 18px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
}
.nav-support:hover {
    color: #0f172a;
    border-color: #cbd5e1;
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

/* Split Pane Layout */
.split-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px 48px 48px;
    box-sizing: border-box;
    z-index: 2;
    gap: 80px;
}

@media (max-width: 1024px) {
    .navbar-minimal {
        display: none !important;
    }
    .split-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 40px 20px 40px 20px !important;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .branding-pane {
        display: none !important;
    }
}

/* Left Pane Styling */
.branding-pane {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.branding-content {
    max-width: 580px;
}
.editorial-title {
    font-size: clamp(2.5rem, 4.2vw, 3.6rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -1.8px;
    color: #0f172a;
    margin-bottom: 24px;
}
.gradient-text {
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.editorial-description {
    font-size: 18px;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 48px;
}



/* Infinite Marquee */
.marquee-wrapper {
    margin-top: 60px;
    border-top: 1px solid #e2e8f0;
    padding-top: 36px;
}
.marquee-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #94a3b8;
    margin-bottom: 20px;
    font-weight: 600;
}
.marquee-container {
    overflow: hidden;
    width: 100%;
    position: relative;
    mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
}
.marquee-track {
    display: flex;
    gap: 48px;
    width: max-content;
    animation: scroll 25s linear infinite;
}
.marquee-item {
    font-size: 15px;
    color: #64748b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}
.marquee-item:hover {
    color: #475569;
}
.marquee-item i {
    font-size: 18px;
    color: #94a3b8;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Right Pane Styling (The Form) */
.form-pane {
    display: flex;
    align-items: center;
    justify-content: center;
}
.glass-card {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px;
    padding: 44px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.05);
    box-sizing: border-box;
    position: relative;
}

@media (max-width: 480px) {
    .glass-card {
        padding: 32px 20px;
    }
}

/* Mobile Logo inside card */
.card-logo-header {
    display: none;
    margin-bottom: 28px;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.card-logo-header:hover {
    text-decoration: none;
    opacity: 0.85;
}
.card-logo-header img {
    height: 34px;
    width: auto;
    margin-right: 10px;
}
.card-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.5px;
}

@media (max-width: 1024px) {
    .card-logo-header {
        display: flex;
    }
}

.card-header-custom {
    margin-bottom: 28px;
}
.card-header-custom h2 {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
}
.card-header-custom p {
    font-size: 14px;
    color: #475569;
    margin: 0;
}

/* Input Styles */
.form-group-custom {
    margin-bottom: 20px;
    position: relative;
}
.form-label-custom {
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 8px;
}

/* Overriding template form-control style to clean light theme inputs */
.glass-card .form-control {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    color: #0f172a !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    transition: all 0.25s ease !important;
}
.glass-card .form-control:focus {
    background: #ffffff !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
    outline: none !important;
}
.glass-card .form-control::placeholder {
    color: #94a3b8 !important;
}

/* Password Toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.password-input-wrapper .form-control {
    padding-right: 48px !important;
}
.password-toggle-icon, .password-toggle-icon-confirm {
    position: absolute;
    right: 16px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
    user-select: none;
    z-index: 10;
}
.password-toggle-icon:hover, .password-toggle-icon-confirm:hover {
    color: #475569;
}

/* Forgot Password link position */
.forgot-password-link {
    display: block;
    text-align: right;
    color: #4f46e5;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
    margin-top: 8px;
}
.forgot-password-link:hover {
    color: #6366f1;
}

/* Custom Checkbox wrapper */
.checkbox-custom-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.checkbox-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.checkbox-custom input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    background: #ffffff;
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0;
}
.checkbox-custom input[type="checkbox"]:checked {
    background: #4f46e5;
    border-color: #4f46e5;
}
.checkbox-custom input[type="checkbox"]:checked::before {
    content: "";
    width: 9px;
    height: 5px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg) translate(1px, -1px);
}
.checkbox-custom label {
    font-size: 13.5px;
    color: #475569;
    user-select: none;
    cursor: pointer;
}

/* Submit Button */
.btn-submit {
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    padding: 13px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 18px rgba(79, 70, 229, 0.2) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
}
.btn-submit:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 22px rgba(79, 70, 229, 0.28) !important;
    filter: brightness(1.06) !important;
}
.btn-submit:active {
    transform: translateY(1px) !important;
}
.btn-submit:disabled {
    opacity: 0.75 !important;
    cursor: not-allowed !important;
}

/* Register text */
.register-prompt {
    text-align: center;
    font-size: 13.5px;
    color: #64748b;
    margin-top: 24px;
    margin-bottom: 0;
}
.register-prompt a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.register-prompt a:hover {
    color: #6366f1;
}

/* Divider */
.divider-custom {
    display: flex;
    align-items: center;
    text-align: center;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 28px 0 20px 0;
}
.divider-custom::before, .divider-custom::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}
.divider-custom:not(:empty)::before {
    margin-right: 14px;
}
.divider-custom:not(:empty)::after {
    margin-left: 14px;
}

/* Social buttons grid */
.social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.social-grid-item-full {
    grid-column: span 2;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    height: 42px !important;
}
.social-btn:hover {
    background: #f8fafc !important;
    color: #0f172a !important;
    transform: translateY(-1px);
}
.social-btn:active {
    transform: translateY(1px);
}

.social-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    transition: transform 0.2s;
}
.social-btn:hover .social-icon {
    transform: scale(1.08);
}

/* Brand hover overrides */
.social-btn-google:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}
.social-btn-xero:hover {
    border-color: rgba(19, 181, 234, 0.3) !important;
    box-shadow: 0 4px 12px rgba(19, 181, 234, 0.08);
}
.social-btn-loyverse:hover {
    border-color: rgba(106, 213, 155, 0.3) !important;
    box-shadow: 0 4px 12px rgba(106, 213, 155, 0.08);
}
.social-btn-freshbooks:hover {
    border-color: rgba(30, 91, 255, 0.3) !important;
    box-shadow: 0 4px 12px rgba(30, 91, 255, 0.08);
}

/* STRICTLY KEEP QBO BUTTON ORIGINAL STYLES */
.quickbooks-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 161px;
    height: 36px;
    border: none;
    background: url('/assets/svg/buttons/QuickBooks.svg') no-repeat center center;
    background-size: contain;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quickbooks-button:hover {
    background: url('/assets/svg/buttons/QuickBooksHover.svg') no-repeat center center;
    background-size: contain;
}

/* Custom Spinner */
.spinner-custom {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(79, 70, 229, 0.3);
    border-radius: 50%;
    border-top-color: #4f46e5;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Danger / error labels */
.text-danger {
    color: #ef4444 !important;
    font-size: 12px !important;
    margin-top: 6px !important;
    display: block !important;
}
.alert-danger {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    border-radius: 12px !important;
    color: #991b1b !important;
    padding: 14px 16px !important;
    margin-bottom: 20px !important;
    font-size: 13.5px !important;
    line-height: 1.45 !important;
}

/* Hide native spinner elements from bootstrap in button */
.spinner-border {
    display: none !important;
}

/* RTL Specific styles */
[dir="rtl"] html, 
[dir="rtl"] body, 
[dir="rtl"] .brand-title, 
[dir="rtl"] .brand-subtitle, 
[dir="rtl"] .editorial-title, 
[dir="rtl"] .editorial-description, 
[dir="rtl"] .form-label-custom, 
[dir="rtl"] .btn-submit, 
[dir="rtl"] .register-prompt, 
[dir="rtl"] h2, 
[dir="rtl"] p {
    font-family: 'Cairo', 'Outfit', sans-serif !important;
}

[dir="rtl"] .password-input-wrapper .form-control {
    padding-right: 12px !important;
    padding-left: 48px !important;
}
[dir="rtl"] .password-toggle-icon, [dir="rtl"] .password-toggle-icon-confirm {
    right: auto;
    left: 16px;
}
[dir="rtl"] .forgot-password-link {
    text-align: left;
}
[dir="rtl"] .divider-custom:not(:empty)::before {
    margin-right: 0;
    margin-left: 14px;
}
[dir="rtl"] .divider-custom:not(:empty)::after {
    margin-left: 0;
    margin-right: 14px;
}
