/* ==========================================================================
   HomeDirect Seller Authentication - Standalone two-column login page
   ========================================================================== */

:root {
    --navy: #1a2d6b;
    --navy-2: #16255a;
    --blue: #2563eb;
    --blue-2: #1d4ed8;
    --sky: #e6f1ff;
    --sky-2: #bcd9fb;
    --line: #c9dcf5;
    --ink: #334155;
    --muted: #64748b;
    --focus-ring: rgba(37, 99, 235, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Arial', sans-serif;
}

/* ============================== Page layout ============================== */

.seller-auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 32px;
    background: #f0f4f9;
    overflow: hidden;
}

/* rounded floating card */
.seller-auth-card {
    display: flex;
    width: min(1120px, 100%);
    height: min(780px, calc(100dvh - 64px));
    min-height: 0;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 26px 60px rgba(26, 45, 107, 0.14), 0 8px 20px rgba(26, 45, 107, 0.07);
}

/* ============================== Left column ============================== */

.seller-auth-left {
    flex: 1 1 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 52px 18px 52px;
    overflow: hidden;
    background: linear-gradient(160deg, #eaf4ff 0%, #dcecff 50%, #cfe4fc 100%);
    /* crossing seam: top half slides in, below 50% it reverses */
    clip-path: polygon(0 0, 100% 0, 84% 50%, 100% 100%, 0 100%);
}

/* crisp highlight along the crossing seam */
.seller-auth-left::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M100 0 L84 50 L100 100" fill="none" stroke="%23ffffff" stroke-width="1.6" stroke-opacity="0.55"/></svg>');
    background-size: 100% 100%;
    pointer-events: none;
}

/* subtle wave accent at the top */
.seller-auth-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 90"><path fill="%23ffffff" fill-opacity="0.5" d="M0 60 C 180 20 320 90 540 60 C 760 30 900 90 1120 60 C 1240 42 1360 52 1440 55 L 1440 0 L 0 0 Z"/></svg>');
    background-size: cover;
    opacity: 0.55;
    pointer-events: none;
}

/* ===== Brand ===== */

.seller-auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    display: flex;
    align-items: center;
}

.brand-logo img {
    width: 57px;
    height: 57px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: var(--navy);
    line-height: 1.1;
}

.brand-sub {
    margin-top: 3px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 3.2px;
    color: var(--navy);
    opacity: 0.8;
}

/* ===== Tagline / description ===== */

.auth-tagline {
    margin: 20px 0 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.12;
    color: var(--navy-2);
}

.auth-tagline .tl-dark {
    color: var(--navy-2);
}

.auth-tagline .tl-light {
    color: #38bdf8;
}

.auth-desc {
    max-width: 480px;
    margin: 0;
    font-size: 16.5px;
    line-height: 1.6;
    color: #34456f;
}

/* ===== Features ===== */

.auth-features {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 16px;
}

.feature-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(75, 141, 255, 0.14);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
}

.feature-copy h4 {
    margin: 0 0 2px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16.5px;
    font-weight: 700;
    color: var(--navy-2);
}

.feature-copy p {
    margin: 0;
    font-size: 14px;
    color: #4b5d8f;
}

/* ===== Illustration ===== */

.auth-illustration {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: flex-end;
    padding-top: 10px;
}

.auth-illustration svg {
    display: block;
    width: min(100%, 400px);
    height: auto;
    max-height: 100%;
    object-fit: contain;
    margin-left: -18px;
    filter: drop-shadow(0 18px 30px rgba(26, 45, 107, 0.16));
}

/* ============================== Right column ============================== */

.seller-auth-right {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 40px;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

/* subtle dotted pattern in the top-right corner */
.seller-auth-right::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 180px;
    height: 130px;
    background-image: radial-gradient(rgba(47, 139, 255, 0.22) 1.6px, transparent 1.6px);
    background-size: 16px 16px;
    -webkit-mask-image: radial-gradient(closest-side at 100% 0%, #000, transparent);
    mask-image: radial-gradient(closest-side at 100% 0%, #000, transparent);
    pointer-events: none;
}

/* ============================== Forms ============================== */

#seller-login-form,
#seller-register-form {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 412px;
    margin: auto 0;
}

#seller-register-form {
    margin-top: 0;
}

#seller-register-form .auth-kicker,
#seller-register-form .auth-title,
#seller-register-form .auth-hint {
    margin-bottom: 6px;
}

#seller-register-form .auth-field {
    margin-bottom: 8px;
}

.auth-kicker {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.3px;
}

.auth-title {
    margin: 0 0 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    line-height: 27px;
    font-weight: 500;
    color: #212121;
}

.auth-hint {
    margin: 0 0 10px;
    font-size: 15px;
    color: var(--muted);
}

/* ===== Messages ===== */

.auth-messages {
    margin-bottom: 14px;
}

.auth-message {
    margin: 0;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.auth-message.error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.auth-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ===== Fields ===== */

.auth-field {
    margin-bottom: 10px;
}

.auth-field label {
    display: block;
    margin-bottom: 3px;
    font-weight: 600;
    font-size: 11px;
    color: var(--navy-2);
}

.auth-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-group input {
    width: 100%;
    height: 35px;
    padding: 0 16px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    font-size: 15px;
    color: var(--ink);
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-group .input-leading ~ input {
    padding-left: 46px;
}

.auth-input-group .input-leading ~ input + .input-trailing {
    right: 14px;
}

.auth-input-group input::placeholder {
    color: #94a3b8;
}

.auth-input-group input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.input-leading,
.input-trailing {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
}

.input-leading {
    left: 15px;
}

.input-trailing {
    right: 15px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
}

.input-trailing:hover {
    background: var(--sky);
}

.input-leading svg,
.input-trailing svg {
    width: 20px;
    height: 20px;
}

/* ===== Register UI extras (buyer-parity, UI only) ===== */

.verify-alert {
    display: none;
    background: var(--sky);
    border: 1.5px solid var(--sky-2);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 10px;
}

.verify-alert-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.verify-alert-icon {
    font-size: 17px;
    line-height: 1;
}

.verify-alert-title {
    font-size: 12.5px;
    color: var(--navy-2);
}

.verify-alert-title-success {
    color: #1a8917;
}

.verify-alert-title-fail {
    color: #d32f2f;
}

.verify-alert-desc {
    margin: 2px 0 0;
    font-size: 11.5px;
    color: var(--muted);
}

.verify-status {
    display: none;
    margin: 6px 0 0 14px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--muted);
}

.verify-status.show {
    display: block;
}

.verify-status.waiting {
    color: #1a8917;
}

.verify-status.success {
    color: #1a8917;
}

.verify-status.fail {
    color: #d32f2f;
}

/* ===== Social login buttons (UI only, buyer parity) ===== */

.social-buttons {
    display: flex;
    gap: 10px;
    margin: 0 0 10px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 34px;
    padding: 0 5px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.social-btn:hover {
    background: var(--sky);
    border-color: var(--blue-2);
}

.social-btn i {
    font-size: 13px;
}

.google-icon {
    background: conic-gradient(from -45deg, #4285F4 0 25%, #EA4335 25% 50%, #FBBc05 50% 75%, #34A853 75% 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.phone-icon {
    color: #34A853;
}

.email-icon {
    color: #4285F4;
}

.auth-input-group.verify-email-group input {
    padding-right: 108px;
}

.verify-email-btn {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    height: 28px;
    padding: 0 12px;
    border: none;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.verify-email-btn:hover {
    background: var(--blue-2);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.auth-input-group.phone-group {
    height: 35px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-group.phone-group:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.country-field {
    position: relative;
    height: 100%;
    flex-shrink: 0;
}

.country-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 100%;
    padding: 0 10px 0 46px;
    border: none;
    border-right: 1.5px solid var(--line);
    border-top-left-radius: 9px;
    border-bottom-left-radius: 9px;
    background: transparent;
    cursor: pointer;
    color: var(--ink);
    font-size: 13px;
    white-space: nowrap;
    outline: none;
    transition: background 0.2s ease;
}

.country-toggle:hover {
    background: var(--sky);
}

.country-flag {
    font-size: 14px;
    line-height: 1;
}

.country-caret {
    font-size: 8px;
    color: #94a3b8;
}

.country-custom-input {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;
    padding: 6px 10px;
    width: 140px;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
    color: var(--ink);
    background: #fff;
    z-index: 25;
}

.country-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 260px;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(26, 45, 107, 0.16);
    z-index: 20;
    overflow: hidden;
    font-size: 12px;
}

.country-dropdown-head,
.country-item {
    display: grid;
    grid-template-columns: 36px 1fr 52px;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
}

.country-dropdown-head {
    background: #f1f5f9;
    border-bottom: 1.5px solid var(--line);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--navy-2);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.country-item {
    cursor: pointer;
    color: var(--ink);
    transition: background 0.15s ease;
}

.country-item:hover {
    background: var(--sky);
}

.country-dropdown-list {
    max-height: 240px;
    overflow-y: auto;
}

.phone-group .phone-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none !important;
    border-radius: 0 9px 9px 0 !important;
    box-shadow: none !important;
    padding: 0 14px 0 6px !important;
    background: transparent;
    appearance: textfield;
    -moz-appearance: textfield;
}

.phone-group .phone-input::-webkit-outer-spin-button,
.phone-group .phone-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-error-msg {
    margin: 2px 0 0 14px;
    font-size: 12px;
    color: #ff4d4d;
}

.register-btn-disabled {
    background: #ccc;
    cursor: not-allowed;
}

.register-btn-disabled:hover {
    background: #ccc;
    box-shadow: none;
    transform: none;
}

/* faint pastel glow blurs in the right-side negative space */
.auth-blurs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.blur {
    position: absolute;
    border-radius: 50%;
    filter: blur(64px);
}

.blur-cyan {
    width: 340px;
    height: 340px;
    top: -90px;
    right: -70px;
    background: radial-gradient(circle, rgba(147, 213, 255, 0.55) 0%, rgba(147, 213, 255, 0) 70%);
}

.blur-blush {
    width: 320px;
    height: 320px;
    bottom: -100px;
    left: -80px;
    background: radial-gradient(circle, rgba(255, 185, 214, 0.40) 0%, rgba(255, 185, 214, 0) 70%);
}

.blur-lavender {
    width: 300px;
    height: 300px;
    top: 34%;
    right: 22%;
    background: radial-gradient(circle, rgba(196, 181, 253, 0.32) 0%, rgba(196, 181, 253, 0) 70%);
}

/* ===== Options row ===== */

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 18px;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
}

.remember-me input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-box {
    width: 19px;
    height: 19px;
    border: 1.5px solid var(--line);
    border-radius: 5px;
    display: grid;
    place-items: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.checkbox-box svg {
    width: 12px;
    height: 12px;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.remember-me input:checked + .checkbox-box {
    background: var(--blue);
    border-color: var(--blue);
}

.remember-me input:checked + .checkbox-box svg {
    opacity: 1;
    transform: scale(1);
}

.remember-label {
    font-size: 14px;
    color: var(--ink);
}

.forgot-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* ===== Login button ===== */

.btn-login {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, #2e7bff, #1c5ef0);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(28, 94, 240, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-login svg {
    width: 20px;
    height: 20px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(28, 94, 240, 0.36);
    filter: brightness(1.04);
}

.btn-login:active {
    transform: translateY(0);
}

/* register button - slightly more compact than login
   gap above it comes from the uniform .auth-field margin */
#register-btn {
    height: 40px;
    font-size: 14px;
    box-shadow: 0 8px 18px rgba(28, 94, 240, 0.25);
}

#register-btn svg {
    width: 17px;
    height: 17px;
}

/* ===== Divider ===== */

.divider-or {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0 16px;
    color: #94a3b8;
    font-size: 13.5px;
}

.divider-or::before,
.divider-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* ===== Register CTA ===== */

.register-cta {
    margin: 0;
    text-align: center;
    font-size: 15px;
    color: var(--muted);
}

#seller-register-form .register-cta {
    margin-top: 10px;
}

.register-cta a {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

.register-cta a:hover {
    text-decoration: underline;
}

/* ============================== Responsive ============================== */

@media (max-width: 1024px) {
    .seller-auth-left {
        padding: 32px 36px 20px;
    }

    .auth-tagline {
        font-size: 34px;
    }
}

@media (max-width: 820px) {
    .seller-auth-page {
        display: block;
        height: auto;
        min-height: 100dvh;
        padding: 16px;
        overflow: visible;
    }

    .seller-auth-card {
        flex-direction: column;
        height: auto;
        border-radius: 20px;
    }

    .seller-auth-left {
        padding: 36px 28px 24px;
        overflow: visible;
        clip-path: none;
    }

    .seller-auth-left::after {
        display: none;
    }

    .seller-auth-right {
        padding: 40px 24px 56px;
    }

    .auth-illustration {
        flex: none;
        padding-top: 20px;
    }

    .auth-illustration svg {
        margin-left: 0;
        max-height: none;
    }
}

/* keep the whole page on one screen on short desktop viewports */
@media (min-width: 821px) and (max-height: 820px) {
    .seller-auth-left {
        padding: 26px 52px 16px;
    }

    .auth-tagline {
        margin: 20px 0 10px;
        font-size: 33px;
    }

    .auth-desc {
        font-size: 15px;
    }

    .auth-features {
        margin: 20px 0 0;
        gap: 13px;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
    }

    .feature-copy h4 {
        font-size: 15.5px;
    }

    .seller-auth-right {
        padding: 28px 40px;
    }

    .auth-field {
        margin-bottom: 10px;
    }

    .auth-input-group input {
        height: 35px;
    }

    .auth-options {
        margin-bottom: 18px;
    }

    .btn-login {
        height: 48px;
    }

    .divider-or {
        margin: 18px 0 16px;
    }
}

@media (min-width: 821px) and (max-height: 680px) {
    .seller-auth-left {
        padding: 20px 46px 12px;
    }

    .brand-logo img {
        width: 48px;
        height: 48px;
    }

    .brand-name {
        font-size: 23px;
    }

    .auth-tagline {
        margin: 14px 0 8px;
        font-size: 29px;
    }

    .auth-desc {
        font-size: 14px;
    }

    .auth-features {
        margin: 14px 0 0;
        gap: 9px;
    }

    .feature-icon {
        width: 34px;
        height: 34px;
    }

    .feature-icon svg {
        width: 22px;
        height: 22px;
    }

    .feature-copy h4 {
        font-size: 14.5px;
    }

    .feature-copy p {
        font-size: 13px;
    }

    .auth-title {
        font-size: 28px;
    }

    .auth-field {
        margin-bottom: 10px;
    }

    .auth-input-group input {
        height: 35px;
    }

    .auth-input-group.phone-group {
        height: 35px;
    }

    .divider-or {
        margin: 14px 0 12px;
    }

    .btn-login {
        height: 46px;
    }
}