/**
 * Auth pages — marketing split layout (login / optional register)
 * Uses --color-customColor from layout when set; aligns CTAs with brand green.
 */
.custom-login--split {
    --auth-brand: var(--color-customColor, #0caf60);
    --auth-brand-dark: color-mix(in srgb, var(--auth-brand) 82%, #000);
    --auth-brand-soft: color-mix(in srgb, var(--auth-brand) 22%, transparent);
    --auth-brand-mid: color-mix(in srgb, var(--auth-brand) 14%, transparent);
    --auth-accent: #d4a017;
    --auth-accent-soft: rgba(212, 160, 23, 0.12);
}

/* Fallback when color-mix unsupported */
@supports not (color: color-mix(in srgb, red, blue)) {
    .custom-login--split {
        --auth-brand-dark: #0a8f50;
        --auth-brand-soft: rgba(12, 175, 96, 0.22);
        --auth-brand-mid: rgba(12, 175, 96, 0.14);
    }
}

.custom-login--split .bg-login {
    background:
        radial-gradient(ellipse 90% 70% at 85% 20%, var(--auth-brand-mid) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 20% 80%, var(--auth-accent-soft) 0%, transparent 50%),
        linear-gradient(155deg, #0c1222 0%, #141f35 38%, #1a2744 72%, #0f172a 100%) !important;
    left: 50%;
    right: 0;
}

/* Very subtle grid + noise feel (no image asset) */
.custom-login--split .bg-login::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 70% 40%, black 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 85% 75% at 70% 40%, black 20%, transparent 75%);
    pointer-events: none;
    opacity: 0.45;
}

.custom-login--split .login-bg-1,
.custom-login--split .login-bg-2 {
    opacity: 0.28;
    filter: saturate(0.85);
}

.auth-form-shell {
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 9;
}

.custom-login--split .auth-form-shell {
    flex: 0 1 440px;
    justify-content: flex-end;
    padding-right: 0.5rem;
}

.custom-login--split .custom-wrapper {
    align-items: center;
}

.custom-login--split .auth-split-grid {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    z-index: 9;
}

.auth-marketing-aside {
    flex: 1;
    min-width: 260px;
    max-width: 440px;
    padding: 2rem 1rem 2rem 0;
    color: #e2e8f0;
    position: relative;
    z-index: 10;
}

.auth-marketing-aside .auth-aside-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--auth-brand-soft) 0%, rgba(212, 160, 23, 0.15) 100%);
    border: 1px solid color-mix(in srgb, var(--auth-brand) 45%, transparent);
    color: #ecfdf5;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    margin-bottom: 1.15rem;
}

@supports not (color: color-mix(in srgb, red, blue)) {
    .auth-marketing-aside .auth-aside-badge {
        border: 1px solid rgba(74, 222, 128, 0.35);
    }
}

.auth-marketing-aside .auth-aside-title {
    font-size: clamp(1.35rem, 2.5vw, 1.7rem);
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: -0.02em;
    color: #f8fafc;
    margin-bottom: 1.05rem;
}

.auth-marketing-aside .auth-aside-lead {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.auth-marketing-aside .auth-aside-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.auth-marketing-aside .auth-aside-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
    color: #e2e8f0;
}

.auth-marketing-aside .auth-aside-list .ti {
    color: #4ade80;
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.auth-marketing-aside .auth-aside-trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.auth-marketing-aside .auth-aside-trust strong {
    color: #f1f5f9;
}

.auth-marketing-aside .auth-aside-links {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.auth-marketing-aside .auth-aside-links a {
    color: #86efac;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.auth-marketing-aside .auth-aside-links a:hover {
    color: #bbf7d0;
    text-decoration: underline;
    text-shadow: 0 0 20px var(--auth-brand-soft);
}

/* Login card polish */
.auth-login-card-intro {
    font-size: 0.92rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

.custom-login--split .custom-wrapper .card .card-body {
    border-radius: 18px;
    padding: 2rem 2.15rem 2.1rem;
    /* Avoid huge vertical gap between title block and form (custom-auth uses space-between + height:100%) */
    justify-content: flex-start !important;
    height: auto !important;
    min-height: 0;
}

@media (min-width: 992px) {
    .custom-login--split .custom-wrapper .card .card-body {
        padding: 2.25rem 2.35rem 2.2rem;
    }
}

/* Form breathing room */
.custom-login--split .login-form .form-group {
    margin-bottom: 1.35rem;
}

.custom-login--split .login-form .form-group:last-of-type {
    margin-bottom: 1rem;
}

.custom-login--split .login-form .form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 0.45rem;
}

.custom-login--split .form-control {
    border-radius: 11px;
    border: 1px solid #e2e8f0;
    padding: 0.7rem 1rem;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.custom-login--split .form-control:hover:not(:focus):not(:disabled) {
    border-color: #cbd5e1;
    background-color: #fafbfc;
}

.custom-login--split .form-control:focus {
    border-color: var(--auth-brand) !important;
    box-shadow: 0 0 0 4px var(--auth-brand-soft) !important;
    outline: 0;
}

.custom-login--split .form-control::placeholder {
    color: #94a3b8;
}

/* In-card links: brand green instead of default blue */
.custom-login--split .card-body a:not(.btn) {
    color: var(--auth-brand);
    font-weight: 500;
    transition: color 0.15s ease;
}

.custom-login--split .card-body a:not(.btn):hover {
    color: var(--auth-brand-dark);
}

.custom-login--split .card-body a.text-primary {
    color: var(--auth-brand) !important;
}

.custom-login--split .card-body a.text-primary:hover {
    color: var(--auth-brand-dark) !important;
}

.custom-login .btn-auth-google {
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    color: #334155 !important;
    font-weight: 600;
    padding: 0.72rem 1.1rem;
    border-radius: 11px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.custom-login--split .btn-auth-google:hover {
    border-color: color-mix(in srgb, var(--auth-brand) 35%, #e2e8f0) !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07);
    color: #0f172a !important;
    transform: translateY(-1px);
}

@supports not (color: color-mix(in srgb, red, blue)) {
    .custom-login--split .btn-auth-google:hover {
        border-color: #b8e6cc !important;
    }
}

/*
 * Auth primary CTA — must stay visible on all browsers/themes:
 * - Use background-color + background-image (invalid shorthand/gradient alone can leave a blank input.submit)
 * - Reset native input styling; keep a faint border so white themes still show an edge
 */
.custom-login .btn-auth-primary.btn-primary,
.custom-login .btn-auth-primary,
.custom-login input[type="submit"].btn-auth-primary,
.custom-login button[type="submit"].btn-auth-primary {
    -webkit-appearance: none;
    appearance: none;
    font-weight: 600;
    padding: 0.78rem 1.35rem;
    border-radius: 11px;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    color: #fff !important;
    /* Solid fallback if gradient or CSS vars fail */
    background-color: #0caf60 !important;
    background-image: linear-gradient(
        165deg,
        var(--auth-brand, #0caf60) 0%,
        var(--auth-brand-dark, #047857) 100%
    ) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    box-shadow:
        0 4px 14px var(--auth-brand-soft, rgba(12, 175, 96, 0.22)),
        0 2px 4px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
    min-height: 3rem;
}

.custom-login .btn-auth-primary.btn-primary:hover,
.custom-login .btn-auth-primary:hover,
.custom-login input[type="submit"].btn-auth-primary:hover,
.custom-login button[type="submit"].btn-auth-primary:hover {
    filter: brightness(1.05);
    box-shadow:
        0 8px 26px var(--auth-brand-soft, rgba(12, 175, 96, 0.22)),
        0 4px 8px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
    color: #fff !important;
}

.custom-login .btn-auth-primary.btn-primary:active,
.custom-login .btn-auth-primary:active,
.custom-login input[type="submit"].btn-auth-primary:active,
.custom-login button[type="submit"].btn-auth-primary:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

.custom-login .btn-auth-primary.btn-primary:disabled,
.custom-login .btn-auth-primary:disabled,
.custom-login input[type="submit"].btn-auth-primary:disabled,
.custom-login button[type="submit"].btn-auth-primary:disabled {
    opacity: 0.65;
    filter: none;
    transform: none;
    cursor: not-allowed;
}

.custom-login .divider-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #94a3b8;
    font-size: 0.8rem;
    margin: 0.35rem 0 1.15rem;
}

.custom-login .divider-auth::before,
.custom-login .divider-auth::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.custom-login--split .auth-form-shell .card {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(15, 23, 42, 0.06),
        0 24px 56px rgba(15, 23, 42, 0.08);
}

/* Non-split auth (e.g. register without aside): keep form visually centered */
.custom-login:not(.custom-login--split) .auth-form-shell {
    justify-content: center;
}

.custom-login:not(.custom-login--split) .custom-wrapper .card .card-body {
    margin-left: auto;
    margin-right: auto;
}

/* RTL: marketing panel reads correctly; swap column visual order */
[dir="rtl"] .custom-login--split .auth-split-grid {
    flex-direction: row-reverse;
}

[dir="rtl"] .custom-login--split .auth-form-shell {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 0.5rem;
}

[dir="rtl"] .auth-marketing-aside {
    padding: 2rem 0 2rem 1rem;
}

@media (max-width: 991px) {
    .custom-login--split .auth-form-shell {
        flex: 1 1 100%;
        justify-content: center;
        padding-right: 0;
    }

    .custom-login--split .auth-split-grid {
        justify-content: center;
    }

    [dir="rtl"] .custom-login--split .auth-form-shell {
        padding-left: 0;
    }
}

/* -------------------------------------------------------------------------
   Dark layout (cust_darklayout): split auth form card stays readable
   ------------------------------------------------------------------------- */
.custom-login--dark.custom-login--split .custom-wrapper .card .card-body {
    background-color: var(--bs-card-bg, #1c1c28);
}

.custom-login--dark.custom-login--split .card-body h2.f-w-600 {
    color: #f8fafc !important;
}

.custom-login--dark.custom-login--split .auth-login-card-intro {
    color: #94a3b8 !important;
}

.custom-login--dark.custom-login--split .login-form .form-label {
    color: #cbd5e1 !important;
}

.custom-login--dark.custom-login--split .form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(148, 163, 184, 0.28);
    color: #f1f5f9;
}

.custom-login--dark.custom-login--split .form-control:hover:not(:focus):not(:disabled) {
    background-color: rgba(255, 255, 255, 0.07);
    border-color: rgba(148, 163, 184, 0.4);
}

.custom-login--dark.custom-login--split .form-control:focus {
    background-color: rgba(255, 255, 255, 0.07);
}

.custom-login--dark.custom-login--split .form-control::placeholder {
    color: #64748b;
}

.custom-login--dark.custom-login--split .divider-auth {
    color: #64748b;
}

.custom-login--dark.custom-login--split .divider-auth::before,
.custom-login--dark.custom-login--split .divider-auth::after {
    background: rgba(148, 163, 184, 0.22);
}

.custom-login--dark.custom-login--split .btn-auth-google {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
    color: #e2e8f0 !important;
}

.custom-login--dark.custom-login--split .btn-auth-google:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(74, 222, 128, 0.35) !important;
    color: #fff !important;
}

.custom-login--dark.custom-login--split .auth-form-shell .card {
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.2),
        0 12px 40px rgba(0, 0, 0, 0.35);
}

.custom-login--dark .auth-navbar-tagline {
    color: rgba(255, 255, 255, 0.72) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* -------------------------------------------------------------------------
   Register page (plan + GST) — wider card, plan banner, GST panel
   Overrides custom-auth.css fixed .card { width: 440px } + .card-body max-width: 440px
   ------------------------------------------------------------------------- */
.auth-page-register.custom-login--split .auth-split-grid {
    max-width: 1240px;
    gap: 2rem 2.5rem;
    align-items: flex-start;
}

.auth-page-register.custom-login--split .auth-form-shell {
    flex: 1 1 100%;
    max-width: 100%;
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Card fills the shell; shell width defines form width */
.auth-page-register.custom-login--split .auth-form-shell .card {
    width: 100% !important;
    max-width: 100%;
}

.auth-page-register.custom-login--split .auth-form-shell .card .card-body {
    max-width: none !important;
    width: 100%;
}

@media (min-width: 576px) {
    .auth-page-register.custom-login--split .auth-form-shell {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

@media (min-width: 992px) {
    .auth-page-register.custom-login--split .auth-form-shell {
        flex: 1 1 44rem;
        max-width: 44rem;
        min-width: 0;
        justify-content: flex-end;
        padding-right: 0.5rem;
        padding-left: 0;
    }
}

@media (min-width: 1200px) {
    .auth-page-register.custom-login--split .auth-form-shell {
        flex-basis: 46rem;
        max-width: 46rem;
    }
}

.auth-page-register.custom-login--split .custom-wrapper {
    max-width: 1280px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.auth-page-register.custom-login--split .custom-wrapper .card .card-body {
    padding: 1.75rem 1.85rem 2.75rem;
}

@media (min-width: 992px) {
    .auth-page-register.custom-login--split .custom-wrapper .card .card-body {
        padding: 2rem 2.15rem 2.85rem;
    }
}

/* Slightly more vertical rhythm on long register forms */
.auth-page-register.custom-login--split .login-form .form-group.mb-3 {
    margin-bottom: 1.15rem !important;
}

.auth-page-register.custom-login--split .login-form .form-group.mb-4 {
    margin-bottom: 1.35rem !important;
}

/* Selected plan */
.auth-plan-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--auth-brand-soft, rgba(12, 175, 96, 0.12)) 0%, rgba(212, 160, 23, 0.08) 100%);
    border: 1px solid color-mix(in srgb, var(--auth-brand, #0caf60) 28%, #e2e8f0);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

@supports not (color: color-mix(in srgb, red, blue)) {
    .auth-plan-banner {
        border: 1px solid rgba(12, 175, 96, 0.22);
    }
}

.auth-plan-banner__icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(165deg, var(--auth-brand, #0caf60) 0%, var(--auth-brand-dark, #047857) 100%);
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px var(--auth-brand-soft, rgba(12, 175, 96, 0.25));
}

.auth-plan-banner__body {
    min-width: 0;
    flex: 1;
}

.auth-plan-banner__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.2rem;
}

.auth-plan-banner__label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0;
}

.auth-plan-banner__change {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--auth-brand, #0caf60);
    text-decoration: none;
    white-space: nowrap;
}

.auth-plan-banner__change:hover {
    text-decoration: underline;
    color: var(--auth-brand-dark, #047857);
}

.auth-plan-banner__name {
    display: inline;
    font-size: 1.05rem;
    color: #0f172a;
    line-height: 1.3;
}

.auth-plan-banner__price {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}

.auth-plan-banner__hint {
    margin-top: 0.45rem;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.45;
}

/* GST toggle panel */
.auth-gst-panel {
    border-radius: 14px !important;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.auth-gst-panel .card-body {
    padding: 1.1rem 1.15rem 1.15rem !important;
}

.auth-gst-panel__toggle {
    margin-bottom: 0.65rem;
}

.auth-gst-switch {
    padding-left: 0;
    min-height: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.auth-gst-switch .form-check-input {
    width: 2.65rem;
    height: 1.35rem;
    margin-top: 0.2rem;
    cursor: pointer;
    border-color: #cbd5e1;
    background-color: #e2e8f0;
}

.auth-gst-switch .form-check-input:checked {
    background-color: var(--auth-brand, #0caf60);
    border-color: var(--auth-brand, #0caf60);
}

.auth-gst-switch .form-check-label {
    cursor: pointer;
    padding-top: 0;
    margin-left: 0;
    line-height: 1.35;
}

.auth-gst-panel__title {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
}

.auth-gst-panel__subtitle {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
    margin-top: 0.15rem;
}

.auth-gst-panel__help {
    color: #64748b;
    line-height: 1.5;
    padding-left: 3.35rem;
    margin-bottom: 0.75rem !important;
}

@media (max-width: 576px) {
    .auth-gst-panel__help {
        padding-left: 0;
    }
}

.auth-gst-panel__fields {
    margin-top: 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px dashed #cbd5e1;
}

/* Section divider */
.auth-form-section-divider {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.auth-form-section-divider::before,
.auth-form-section-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0 15%, #e2e8f0 85%, transparent);
}

/* GSTIN: uppercase value, normal placeholder */
.auth-input-gstin {
    font-weight: 600;
    letter-spacing: 0.04em;
}

.auth-input-gstin:not(:placeholder-shown) {
    text-transform: uppercase;
}

.auth-input-gstin::placeholder {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    color: #94a3b8;
}

/* Register: dark mode — plan + GST */
.custom-login--dark .auth-plan-banner {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(148, 163, 184, 0.25);
}

.custom-login--dark .auth-plan-banner__label {
    color: #94a3b8;
}

.custom-login--dark .auth-plan-banner__name,
.custom-login--dark .auth-plan-banner__price {
    color: #f8fafc;
}

.custom-login--dark .auth-plan-banner__change {
    color: #6ee7b7;
}

.custom-login--dark .auth-plan-banner__change:hover {
    color: #a7f3d0;
}

.custom-login--dark .auth-plan-banner__hint {
    color: #94a3b8;
}

.custom-login--dark .auth-gst-panel {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(148, 163, 184, 0.22) !important;
}

.custom-login--dark .auth-gst-panel__title {
    color: #f8fafc;
}

.custom-login--dark .auth-gst-panel__subtitle,
.custom-login--dark .auth-gst-panel__help {
    color: #94a3b8;
}

.custom-login--dark .auth-gst-panel__fields {
    border-top-color: rgba(148, 163, 184, 0.2);
}

.custom-login--dark .auth-form-section-divider {
    color: #64748b;
}

.custom-login--dark .auth-form-section-divider::before,
.custom-login--dark .auth-form-section-divider::after {
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.35) 20%, rgba(148, 163, 184, 0.35) 80%, transparent);
}

.custom-login--dark .auth-gst-switch .form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(148, 163, 184, 0.35);
}
