/**
 * ============================================================================
 * BusiSync - Tenant Login Page Stylesheet (login.css)
 * High-finish split-card design matching Customer Portal design language:
 * - 3D Spheres with pure CSS radial lighting
 * - Frosted glass auto-rotating feature cards (1-card showcase)
 * - Google OAuth compliance card
 * - White trust badge pills with operational indicators
 * - Polished inputs, eye-toggle, error states, and responsive viewports
 * ============================================================================
 */

*, *:before, *:after {
    box-sizing: border-box;
}
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}
body.login-body {
    background-color: #eaf3f9;
    background-image: radial-gradient(circle at 15% 15%, rgba(186, 230, 253, 0.45) 0%, transparent 45%),
                      radial-gradient(circle at 85% 85%, rgba(125, 211, 252, 0.35) 0%, transparent 45%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@keyframes portalSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.portal-spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: portalSpin 0.75s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Fixed Pricing pill button */
.loginTopBar {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 9999;
    text-align: right;
}
.loginPricingBtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 9999px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all .15s ease;
}
.loginPricingBtn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Master Container */
.tenantLoginPage {
    margin-top: 0 !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
}
.login-master-card {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    max-width: 1040px;
    width: 100%;
    min-height: auto;
    background: #ffffff;
    border-radius: 26px;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.12), 0 10px 20px -8px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.9);
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

/* LEFT PANEL: Sky Blue to Dark Sky Blue with 3D Spheres */
.login-panel-brand {
    background: linear-gradient(145deg, #38bdf8 0%, #0ea5e9 45%, #0284c7 100%);
    padding: 42px 40px;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

/* Pure CSS 3D Spheres with Sky Blue to Dark Sky Blue Highlights */
.login-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.login-orb-large {
    width: 320px;
    height: 320px;
    top: -80px;
    left: -70px;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #bae6fd 22%, #38bdf8 52%, #0ea5e9 78%, #0284c7 100%);
    box-shadow: 0 20px 40px rgba(2, 132, 199, 0.25), inset -8px -8px 18px rgba(2, 132, 199, 0.45), inset 14px 14px 22px rgba(255, 255, 255, 0.65);
    opacity: 0.92;
}
.login-orb-medium {
    width: 220px;
    height: 220px;
    bottom: 24px;
    right: -60px;
    background: radial-gradient(circle at 35% 30%, #f0f9ff 0%, #7dd3fc 26%, #38bdf8 56%, #0ea5e9 82%, #0284c7 100%);
    box-shadow: 0 16px 36px rgba(14, 165, 233, 0.25), inset -6px -6px 16px rgba(2, 132, 199, 0.45), inset 12px 12px 20px rgba(255, 255, 255, 0.65);
    opacity: 0.94;
}
.login-orb-small {
    width: 130px;
    height: 130px;
    bottom: -35px;
    left: 70px;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #bae6fd 30%, #38bdf8 65%, #0ea5e9 100%);
    box-shadow: 0 12px 24px rgba(56, 189, 248, 0.22), inset -5px -5px 12px rgba(2, 132, 199, 0.35), inset 10px 10px 16px rgba(255, 255, 255, 0.7);
    opacity: 0.88;
}

.login-brand-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}
.login-brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 11.5px;
    font-weight: 600;
    color: #ffffff;
    width: fit-content;
    margin-bottom: 18px;
    letter-spacing: 0.3px;
}
.login-brand-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.35);
    display: inline-block;
    animation: brandDotPulse 1.6s ease-in-out infinite;
}
@keyframes brandDotPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.45);
    }
    50% {
        opacity: 0.25;
        transform: scale(0.85);
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
    }
}
.login-brand-heading {
    margin: 0 0 6px 0;
    text-shadow: 0 2px 10px rgba(2, 132, 199, 0.25);
}
.login-brand-title {
    font-size: 34px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.5px;
    color: #ffffff;
    display: block;
}
.login-brand-tagline-sub {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.2px;
    color: #f0f9ff;
    display: block;
    margin-top: 3px;
}
.login-brand-name {
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(2, 132, 199, 0.35);
}
.login-brand-tagline {
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #f0f9ff;
    margin: 0 0 12px 0;
}
.login-brand-desc {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.55;
    margin: 0 0 18px 0;
}

/* Frosted feature card - 1 Card at a Time Auto-Rotating Showcase */
.login-feature-carousel-viewport {
    width: 100%;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
    border-radius: 12px;
}
.login-feature-carousel-track {
    display: flex;
    width: 100%;
    transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}
.login-feature-slide {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
}
.login-feature-card {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 12px;
    padding: 11px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-sizing: border-box;
    transition: background 0.2s ease;
    min-height: 60px;
}
.login-feature-card:hover {
    background: rgba(255, 255, 255, 0.26);
}
.login-feature-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}
.login-feature-body {
    flex: 1;
    min-width: 0;
}
.login-feature-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}
.login-feature-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
}
.login-feature-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.login-feature-desc {
    font-size: 11.5px;
    color: rgba(240, 249, 255, 0.95);
    line-height: 1.4;
    margin: 0;
}

/* Tip of the Day Feature Card & Badge */
.login-feature-tip-card {
    border-color: rgba(254, 243, 199, 0.45);
    cursor: pointer;
    user-select: none;
}
.login-feature-tip-card:hover {
    background: rgba(255, 255, 255, 0.26);
    border-color: rgba(254, 243, 199, 0.7);
}
.login-tag-tip {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(217, 119, 6, 0.35);
    border: 1px solid rgba(254, 243, 199, 0.5);
    letter-spacing: 0.4px;
}
.login-tip-fade {
    animation: tipFadeIn 0.35s ease-out;
}
@keyframes tipFadeIn {
    from { opacity: 0.4; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Crisp White Google OAuth Compliance Notice */
.app-oauth-notice {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}
.app-oauth-notice-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}
.app-oauth-notice-body {
    font-size: 11px;
    color: #334155;
    line-height: 1.38;
    margin: 0;
}

/* Trust Row with Green Text, Crisp White Pills & Original WhatsApp */
.brand-trust-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.24);
}
.trust-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px 3px 4px;
    background: #ffffff;
    border: 1px solid #d1fae5;
    border-radius: 9999px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    cursor: default;
    user-select: none;
    transition: transform 0.15s ease;
}
.trust-badge-pill:hover {
    transform: translateY(-1px);
}
.trust-icon-well {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.trust-well-ssl {
    background: #ecfdf5;
    color: #059669;
}
.trust-well-uptime {
    background: #ecfdf5;
    color: #059669;
}
.trust-well-wa {
    background: #dcfce7;
}
.trust-badge-text {
    font-size: 10.5px;
    color: #065f46;
    letter-spacing: -0.1px;
    line-height: 1.2;
}
.trust-badge-text strong {
    font-weight: 700;
    color: #065f46;
}


/* RIGHT PANEL: Crisp White Form */
.login-panel-form {
    background: #ffffff;
    padding: 42px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}
.login-corner-accent {
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #bae6fd 0%, #7dd3fc 45%, #38bdf8 80%, #0ea5e9 100%);
    opacity: 0.88;
    pointer-events: none;
}
.tenant-login-inner {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}
.portal-brand {
    text-align: center;
    margin-bottom: 20px;
}
.portal-logo {
    height: 72px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    margin-bottom: 8px;
}
.portal-title {
    font-size: 22px;
    font-weight: 800;
    color: #545454;
    margin: 0 0 3px 0;
    letter-spacing: -0.3px;
}
.portal-subtitle {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.35;
}

/* Form Groups & Inputs */
.portal-form-group {
    margin-bottom: 12px;
}
.portal-form-options {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: -4px;
    margin-bottom: 14px;
}
.portal-input-wrapper,
.portal-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #dde3ea;
    border-radius: 10px;
    background: #eff3f6;
    padding: 0 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.portal-input-wrapper:focus-within,
.portal-password-wrapper:focus-within {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.portal-input-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    margin-right: 12px;
    flex-shrink: 0;
}
.portal-input-icon svg {
    display: block;
}
.portal-input,
.portal-input-wrapper input[type="text"],
.portal-password-wrapper input[type="password"],
.portal-password-wrapper input[type="text"] {
    flex: 1;
    height: 44px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-size: 14.5px;
    color: #1e293b;
    background: transparent !important;
    background-color: transparent !important;
    box-sizing: border-box;
    width: 100%;
}
.portal-input:focus,
.portal-input-wrapper input[type="text"]:focus,
.portal-password-wrapper input[type="password"]:focus,
.portal-password-wrapper input[type="text"]:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
}
.portal-input::placeholder,
.portal-input-wrapper input::placeholder,
.portal-password-wrapper input::placeholder {
    color: #94a3b8;
    font-size: 14px;
}
.portal-input-wrapper input:-webkit-autofill,
.portal-input-wrapper input:-webkit-autofill:hover, 
.portal-input-wrapper input:-webkit-autofill:focus, 
.portal-input-wrapper input:-webkit-autofill:active,
.portal-password-wrapper input:-webkit-autofill,
.portal-password-wrapper input:-webkit-autofill:hover, 
.portal-password-wrapper input:-webkit-autofill:focus, 
.portal-password-wrapper input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #eff3f6 inset !important;
    box-shadow: 0 0 0 1000px #eff3f6 inset !important;
    -webkit-text-fill-color: #1e293b !important;
    caret-color: #1e293b !important;
    transition: background-color 5000s ease-in-out 0s;
}
.password-toggle-btn {
    background: transparent;
    border: none;
    padding: 0 0 0 8px;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: color .15s ease;
}
.password-toggle-btn:hover {
    color: #0f172a;
}
.portal-password-wrapper input::-ms-reveal,
.portal-password-wrapper input::-ms-clear {
    display: none;
}

.portal-forgot-link {
    font-size: 12px;
    color: #0284c7;
    text-decoration: none;
    font-weight: 600;
}
.portal-forgot-link:hover {
    color: #0369a1;
    text-decoration: underline;
}

/* Submit Button */
.portal-submit-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    height: 44px;
    padding: 0 16px !important;
    line-height: 1 !important;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    border: none;
    background: #0284c7 !important;
    color: #ffffff !important;
    box-sizing: border-box;
    text-decoration: none;
    margin-top: 4px;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
    transition: all .15s ease;
}
.portal-submit-btn:hover {
    background: #0369a1 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
    transform: translateY(-1px);
}
.portal-submit-btn:active {
    transform: translateY(0);
}

/* Google Auth Section */
.google-auth-section {
    margin-top: 14px;
    width: 100%;
}
.google-auth-divider {
    display: flex;
    align-items: center;
    margin: 12px 0 14px 0;
}
.google-auth-divider-line {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}
.google-auth-divider-text {
    padding: 0 10px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    color: #334155;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    box-sizing: border-box;
    transition: all .15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.google-signin-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}
.google-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.google-btn-text {
    line-height: 1;
}
.google-trial-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #0369a1;
    background: #e0f2fe;
    padding: 3px 10px;
    border-radius: 9999px;
    margin-top: 8px;
    border: 1px solid #bae6fd;
}
.google-trial-wrapper {
    text-align: center;
    margin-top: 4px;
}

/* Customer Portal Link */
.portal-customer-redirect {
    text-align: center;
    margin-top: 16px;
    font-size: 12.5px;
    color: #64748b;
}
.portal-customer-redirect a {
    color: #0284c7;
    font-weight: 700;
    text-decoration: none;
}
.portal-customer-redirect a:hover {
    text-decoration: underline;
}

/* Card Footer Text below Customer Login */
.portal-card-footer {
    text-align: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.45;
}
.portal-card-footer-links {
    margin-top: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.portal-card-footer a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}
.portal-card-footer a:hover {
    color: #0284c7;
    text-decoration: underline;
}
.portal-card-footer-dot {
    color: #cbd5e1;
    font-size: 10px;
}

/* Alert & Error Notifications */
.portal-error-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 8px;
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.4;
    text-align: left;
    box-sizing: border-box;
}
.portal-error-msg svg {
    flex-shrink: 0;
    stroke: #dc2626;
}

/* Responsive Media Queries */
@media (max-width: 960px) {
    .login-master-card {
        grid-template-columns: 1fr;
        max-width: 480px;
        border-radius: 20px;
        min-height: auto;
    }
    .login-panel-form {
        order: 1;
        padding: 32px 26px 28px 26px;
    }
    .login-panel-brand {
        order: 2;
        padding: 28px 26px;
    }
    .login-brand-heading {
        font-size: 24px;
    }
    .login-feature-slide {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 520px) {
    .tenantLoginPage {
        padding: 16px 12px 24px 12px;
        padding-top: 56px;
    }
    .login-master-card {
        border-radius: 16px;
    }
    .login-panel-form {
        padding: 24px 18px 20px 18px;
    }
    .login-panel-brand {
        padding: 22px 18px;
    }
    .login-brand-heading {
        font-size: 21px;
    }
    .loginTopBar {
        top: 12px;
        right: 14px;
    }
}
