/* =============================================================================
   WeCRM auth pages — split-screen (login/register) + centered card (password/verify)
   ============================================================================= */

:root {
    --wecrm-purple-50:  #F5F0FF;
    --wecrm-purple-100: #EDE5FF;
    --wecrm-purple-200: #D9C7FF;
    --wecrm-purple-500: #8B5CF6;
    --wecrm-purple-600: #7C3AED;
    --wecrm-purple-700: #6D28D9;
    --wecrm-purple-800: #5B21B6;

    --wecrm-ink:        #1A1230;
    --wecrm-ink-soft:   #4B3F66;
    --wecrm-muted:      #6B6483;
    --wecrm-border:     #E5E1F0;
    --wecrm-bg-soft:    #FAF8FF;

    --wecrm-gradient: linear-gradient(135deg, #6D28D9 0%, #7C3AED 50%, #8B5CF6 100%);
    --wecrm-gradient-soft: linear-gradient(135deg, #7C3AED 0%, #8B5CF6 100%);

    --wecrm-radius-card: 16px;
    --wecrm-radius-control: 10px;
    --wecrm-shadow-card: 0 10px 40px rgba(91, 33, 182, 0.10);
    --wecrm-shadow-card-lg: 0 20px 60px rgba(91, 33, 182, 0.18);
}

html, body {
    height: 100%;
}

body.auth-body {
    margin: 0;
    background-color: var(--wecrm-bg-soft);
    color: var(--wecrm-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* =============================================================================
   SPLIT SHELL — login + register
   ============================================================================= */

.auth-split {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: #FFFFFF;
}

.auth-split-form {
    position: relative;
    flex: 1 1 50%;
    min-width: 0;
    background: #FFFFFF;
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
}

.auth-split-form .auth-lang-selector {
    position: absolute;
    top: 24px;
    right: 32px;
    z-index: 10;
}

.auth-split-form-inner {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 0;
}

.auth-split-form-inner > * {
    width: 100%;
}

.auth-split-marketing {
    position: relative;
    flex: 1 1 50%;
    min-width: 0;
    background: linear-gradient(135deg, #6F38EF 0%, #4F1BCC 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 48px;
    overflow: hidden;
}

/* CRM icon pattern overlay — low opacity so it reads as subtle texture, not foreground */
.auth-split-marketing::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../../img/auth/pattern.png");
    background-repeat: repeat;
    background-size: 600px auto;
    mix-blend-mode: screen;
    opacity: 0.5;
    pointer-events: none;
}

.auth-marketing-inner {
    position: relative;
    width: 100%;
    max-width: 640px;
    text-align: center;
}

/* composition: blast log dominant, donut clipped off left, contact overlaps bottom-right */
.auth-marketing-composition {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 6;
    max-height: 620px;
    margin: 0 auto 56px;
}

.auth-marketing-composition img {
    position: absolute;
    display: block;
    /* NO border-radius, NO box-shadow — the PNGs already render as cards with their own
       baked-in shadow + corners. Adding ours creates a visible rectangular outline. */
}

/* MAIN — blast log card, dominant size, centered slightly right */
.auth-marketing-composition .layer-blast-log {
    top: 14%;
    left: 50%;
    transform: translateX(-42%);
    width: 68%;
    z-index: 2;
}

/* TOP-LEFT — donut card overlaps the blast log's top-left corner. Slid right enough
   that the visible donut card edge crosses into the visible blast log card edge (PNGs
   have ~3% transparent padding each, so positioning needs to account for that gap). */
.auth-marketing-composition .layer-donut {
    top: 6%;
    left: 2%;
    width: 32%;
    z-index: 3;
}

/* BOTTOM-RIGHT — contact card, sits lower (~row 5 of blast log), overlaps right edge
   and is slightly clipped off the right side of the panel. */
.auth-marketing-composition .layer-contact {
    bottom: 14%;
    right: -8%;
    width: 32%;
    z-index: 4;
}

.auth-marketing-headline {
    font-size: 44px;
    line-height: 1.15;
    font-weight: 800;
    margin: 0 0 18px;
    color: #FFFFFF;
    letter-spacing: -1px;
}

.auth-marketing-subhead {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 auto 36px;
    max-width: 520px;
    font-weight: 400;
}

.auth-marketing-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.auth-marketing-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    transition: all 0.2s ease;
}

.auth-marketing-dots span.active {
    width: 24px;
    background: #FFFFFF;
}

/* =============================================================================
   CENTERED SHELL — password reset / email / verify
   ============================================================================= */

.auth-centered {
    position: relative;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, #6F38EF 0%, #4F1BCC 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    overflow: hidden;
}

/* same CRM icon pattern overlay as the split marketing panel */
.auth-centered::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../../img/auth/pattern.png");
    background-repeat: repeat;
    background-size: 600px auto;
    mix-blend-mode: screen;
    opacity: 0.5;
    pointer-events: none;
}

.auth-lang-selector-floating {
    position: absolute;
    top: 24px;
    right: 32px;
    z-index: 10;
}

.auth-centered-card {
    position: relative;
    z-index: 2;
    background: #FFFFFF;
    border-radius: var(--wecrm-radius-card);
    box-shadow: var(--wecrm-shadow-card-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.auth-centered-card .login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-centered-card form {
    text-align: left;
}

.auth-centered-card .register-link {
    text-align: center;
}

/* =============================================================================
   FORM PRIMITIVES (used in both shells)
   ============================================================================= */

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--wecrm-ink);
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: -0.3px;
}

.login-subtitle {
    color: var(--wecrm-muted);
    font-size: 15px;
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.55;
}

.form-label {
    color: var(--wecrm-ink);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 8px;
}

.form-label .text-danger {
    color: #dc3545;
}

.form-control,
.form-select {
    border: 1px solid var(--wecrm-border);
    border-radius: var(--wecrm-radius-control);
    padding: 12px 16px;
    font-size: 14px;
    background-color: #FFFFFF;
    color: var(--wecrm-ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--wecrm-purple-500);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
    outline: none;
}

.input-group-text {
    background: #FFFFFF;
    border: 1px solid var(--wecrm-border);
    border-right: none;
    color: var(--wecrm-muted);
}

.input-group .form-control {
    border-left: none;
}

.password-hint {
    font-size: 12px;
    color: var(--wecrm-muted);
    margin-top: 6px;
}

.forgot-password {
    text-align: right;
    margin-top: 8px;
    margin-bottom: 20px;
}

.forgot-password a {
    color: var(--wecrm-purple-600);
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password a:hover {
    text-decoration: underline;
}

/* Primary submit (login / reset / verify) */
.btn-login,
.btn-primary {
    background: var(--wecrm-gradient-soft);
    border: none;
    border-radius: var(--wecrm-radius-control);
    color: #FFFFFF;
    font-weight: 600;
    font-size: 15px;
    width: 100%;
    padding: 13px 20px;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-login:hover,
.btn-primary:hover {
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.35);
    filter: brightness(1.04);
}

.btn-login:active,
.btn-primary:active {
    transform: translateY(0);
}

/* Footer links */
.register-link,
.login-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--wecrm-muted);
}

.register-link a,
.login-link a {
    color: var(--wecrm-purple-600);
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover,
.login-link a:hover {
    text-decoration: underline;
}

/* The login-card class is used by login.blade.php inside the split shell.
   Inside a split shell it should NOT have its own border/shadow (the panel itself
   is the canvas) but it must still constrain width. */
.login-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    width: 100%;
}

/* =============================================================================
   REGISTER — stepper + card (kept stable for the 3-step JS in register.blade.php)
   ============================================================================= */

.register-container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 0;
}

.register-card {
    background: #FFFFFF;
    border-radius: var(--wecrm-radius-card);
    box-shadow: 0 4px 18px rgba(91, 33, 182, 0.06);
    padding: 32px;
    border: 1px solid var(--wecrm-border);
}

.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
    gap: 8px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 180px;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid var(--wecrm-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--wecrm-muted);
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    transition: all 0.2s ease;
}

.step.active .step-number,
.step.completed .step-number {
    background: var(--wecrm-gradient-soft);
    border-color: var(--wecrm-purple-600);
    color: #FFFFFF;
}

.step-label {
    font-size: 12px;
    color: var(--wecrm-muted);
    font-weight: 500;
    text-align: center;
}

.step.active .step-label {
    color: var(--wecrm-purple-700);
    font-weight: 600;
}

.step-line {
    position: absolute;
    top: 18px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: var(--wecrm-border);
    z-index: 1;
}

.step:last-child .step-line {
    display: none;
}

.step.completed .step-line {
    background: var(--wecrm-purple-500);
}

.back-button {
    color: var(--wecrm-purple-600);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
}

.back-button:hover {
    color: var(--wecrm-purple-800);
}

.card-logo {
    text-align: right;
    margin-bottom: 16px;
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--wecrm-ink);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.card-subtitle {
    color: var(--wecrm-muted);
    font-size: 15px;
    margin-bottom: 28px;
}

.auth-title-section {
    width: 100%;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

/* Package selection button (step 3) */
.package-select-btn {
    background: var(--wecrm-bg-soft);
    border: 1px solid var(--wecrm-border);
    border-radius: var(--wecrm-radius-control);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 24px;
}

.package-select-btn:hover {
    border-color: var(--wecrm-purple-500);
    background: var(--wecrm-purple-50);
}

.package-select-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.package-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #FFFFFF;
}

.package-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--wecrm-ink);
}

.package-selected {
    background: var(--wecrm-purple-50);
    border-color: var(--wecrm-purple-500);
}

.package-selected .package-icon {
    background: var(--wecrm-gradient-soft);
    color: #FFFFFF;
}

.terms-text {
    font-size: 12px;
    color: var(--wecrm-muted);
    margin-bottom: 24px;
}

.terms-text a {
    color: var(--wecrm-purple-600);
    text-decoration: none;
}

/* Package selection modal */
.modal-content {
    border-radius: var(--wecrm-radius-card);
    border: none;
}

.modal-header {
    border-bottom: 1px solid var(--wecrm-border);
    padding: 20px 24px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--wecrm-ink);
}

.modal-body {
    padding: 24px;
}

.package-card {
    border: 2px solid var(--wecrm-border);
    border-radius: var(--wecrm-radius-card);
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.2s;
    cursor: pointer;
    background: #FFFFFF;
}

.package-card:hover,
.package-card.active {
    border-color: var(--wecrm-purple-500);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
}

.package-header {
    text-align: center;
    margin-bottom: 20px;
}

.package-icon-modal {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 12px;
}

.package-icon-modal.starter {
    background: #e3f2fd;
    color: #1976d2;
}

.package-icon-modal.professional {
    background: var(--wecrm-purple-50);
    color: var(--wecrm-purple-700);
}

.package-icon-modal.enterprise {
    background: #fff3e0;
    color: #f57c00;
}

.package-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--wecrm-ink);
    margin-bottom: 4px;
}

.package-period {
    font-size: 13px;
    color: var(--wecrm-muted);
}

.package-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--wecrm-purple-700);
    margin-bottom: 8px;
}

.package-description {
    font-size: 13px;
    color: var(--wecrm-muted);
    margin-bottom: 20px;
}

.package-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.package-features li {
    font-size: 13px;
    color: var(--wecrm-ink-soft);
    padding: 6px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.package-features li i.fa-check {
    color: var(--wecrm-purple-600);
    margin-top: 2px;
}

.package-features li i.fa-times {
    margin-top: 2px;
}

.btn-select-package {
    width: 100%;
    padding: 10px;
    border-radius: var(--wecrm-radius-control);
    font-weight: 600;
    font-size: 14px;
}

.payment-method-card {
    cursor: pointer;
    transition: all 0.2s;
    border-color: var(--wecrm-border) !important;
}

.payment-method-card:hover {
    border-color: var(--wecrm-purple-500) !important;
    background-color: var(--wecrm-bg-soft);
}

.payment-method-card:has(input:checked) {
    border-color: var(--wecrm-purple-500) !important;
    background-color: var(--wecrm-purple-50);
}

.shipping-method-container {
    cursor: pointer;
    border-color: var(--wecrm-border) !important;
    border-radius: var(--wecrm-radius-control);
}

.shipping-method-container:has(input:checked) {
    border-color: var(--wecrm-purple-500) !important;
    background-color: var(--wecrm-purple-50);
}

/* =============================================================================
   LANGUAGE SELECTOR (used by <x-auth-language-selector />)
   ============================================================================= */

.auth-lang-selector {
    display: inline-block;
}

.language-selector {
    position: relative;
}

.language-selector .btn {
    background: #FFFFFF;
    border: 1px solid var(--wecrm-border);
    border-radius: var(--wecrm-radius-control);
    padding: 8px 14px;
    color: var(--wecrm-ink);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.language-selector .btn:hover {
    border-color: var(--wecrm-purple-500);
    background: var(--wecrm-purple-50);
}

.language-selector .btn i {
    font-size: 16px;
    color: var(--wecrm-muted);
}

.language-selector .dropdown-menu {
    border-radius: var(--wecrm-radius-control);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--wecrm-border);
    padding: 8px 0;
    min-width: 200px;
}

.language-selector .dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    color: var(--wecrm-ink);
    transition: all 0.15s;
}

.language-selector .dropdown-item:hover {
    background-color: var(--wecrm-purple-50);
    color: var(--wecrm-purple-700);
}

.language-selector .dropdown-item img {
    object-fit: cover;
    border-radius: 2px;
}

.language-selector .dropdown-item i.bx-check-circle {
    font-size: 16px;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 991.98px) {
    .auth-split {
        flex-direction: column;
    }
    .auth-split-marketing {
        display: none;
    }
    .auth-split-form {
        flex: 1 1 auto;
        padding: 80px 24px 40px;
        min-height: 100vh;
    }
    .auth-split-form-inner {
        padding: 0;
    }
}

@media (max-width: 575.98px) {
    .auth-split-form {
        padding: 80px 20px 32px;
    }
    .auth-split-form .auth-lang-selector,
    .auth-lang-selector-floating {
        top: 16px;
        right: 16px;
    }
    .auth-centered {
        padding: 24px 16px;
    }
    .auth-centered-card {
        padding: 32px 24px;
    }
    .login-title,
    .card-title {
        font-size: 22px;
    }
    .login-subtitle,
    .card-subtitle {
        font-size: 14px;
    }
    .register-card {
        padding: 24px 18px;
    }
    .stepper {
        margin-bottom: 24px;
    }
    .step-label {
        font-size: 11px;
    }
}
