/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,300;0,400;0,500;0,600;0,700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: #FBF8F2;
    color: #1c1c1e;
    min-height: 100vh;
}

.signup-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ---------------- Left Hero Panel ---------------- */
.hero-panel {
    flex: 0 0 46%;
    position: relative;
    min-height: 100vh;
    background: linear-gradient(160deg, #d8cdb6 0%, #c9b998 45%, #a98f68 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(30, 24, 15, 0.05) 0%, rgba(20, 15, 8, 0.65) 100%);
    z-index: 1;
}

.hero-illustration {
    position: absolute;
    right: -20px;
    bottom: 40px;
    width: 62%;
    height: auto;
    max-width: 340px;
    z-index: 1;
    opacity: 0.96;
    filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.35));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 320px;
    margin-bottom: 40px;
}

.hero-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #f2e6c9;
    margin-bottom: 18px;
}

.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.6rem;
    font-weight: 500;
    line-height: 1.15;
    color: #ffffff;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 0.85rem;
    line-height: 1.7;
    color: #e8ddc8;
    font-weight: 400;
    max-width: 280px;
}

.hero-divider {
    width: 40px;
    height: 1px;
    background-color: #cdb576;
    margin-top: 24px;
}

.hero-footer {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-collection-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #f3dfa8;
    text-transform: uppercase;
}

.hero-collection-sub {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: #cbb480;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ---------------- Right Form Panel ---------------- */
.form-panel {
    flex: 1;
    background-color: #FBF8F2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.signup-form-wrapper {
    width: 100%;
    max-width: 380px;
}

/* Custom error toast (replaces alert()) */
.error-toast {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background-color: #fbeee7;
    border: 1px solid #d9a37a;
    color: #8a3d1c;
    padding: 14px 16px;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    border-radius: 2px;
    margin-bottom: 26px;
    animation: toastFadeIn 0.25s ease-out;
}

.error-toast.show {
    display: flex;
}

.error-toast-close {
    background: none;
    border: none;
    color: #8a3d1c;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 12px;
}

@keyframes toastFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.9rem;
    font-weight: 500;
    color: #1c1c1e;
    margin-bottom: 10px;
    letter-spacing: 0.01em;
}

.form-subtitle {
    font-size: 0.85rem;
    color: #7a7367;
    margin-bottom: 36px;
    line-height: 1.5;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #8a8378;
    text-transform: uppercase;
}

.form-input {
    background-color: #ffffff;
    border: none;
    border-bottom: 1px solid #ddd6c7;
    padding: 12px 4px;
    font-size: 0.9rem;
    color: #1c1c1e;
    outline: none;
    transition: border-color 0.2s;
}

.form-input::placeholder {
    color: #c2bcae;
}

.form-input:focus {
    border-bottom-color: #1c1c1e;
}

.form-input.input-invalid {
    border-bottom-color: #dc2626;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-input {
    width: 100%;
    padding-right: 30px;
}

.password-toggle {
    position: absolute;
    right: 2px;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #a8a196;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #3a352c;
}

.eye-icon {
    width: 18px;
    height: 18px;
}

.field-error {
    display: block;
    min-height: 14px;
    font-size: 0.72rem;
    color: #dc2626;
    margin-top: 2px;
}

/* ── Referral Code field ── */
.referral-group .form-input {
    border-bottom-style: dashed;
    border-bottom-color: #d4cabb;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.referral-group .form-input::placeholder {
    text-transform: none;
    letter-spacing: 0;
}

.referral-group .form-input:focus {
    border-bottom-style: solid;
    border-bottom-color: #1c1c1e;
}

.referral-optional {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #b8b0a0;
    text-transform: none;
    margin-left: 2px;
}

.referral-hint {
    display: block;
    font-size: 0.68rem;
    color: #a8a196;
    margin-top: 3px;
    line-height: 1.4;
    transition: color 0.2s;
}

.submit-btn {
    background-color: #17130d;
    color: #ffffff;
    border: none;
    padding: 16px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 12px;
    transition: background-color 0.2s, transform 0.1s;
    -webkit-appearance: none;
    appearance: none;
}

.submit-btn:hover {
    background-color: #322a1d;
}

.submit-btn:active {
    transform: scale(0.99);
}

.submit-btn:disabled {
    background-color: #4a4133;
    color: #d8d0c0;
    cursor: not-allowed;
}

/* Divider */
.divider-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background-color: #e6e0d3;
}

.divider-text {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #a8a196;
    text-transform: uppercase;
}

/* Google button */
.google-btn {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #e6e0d3;
    color: #3a352c;
    padding: 13px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.google-btn:hover {
    background-color: #faf7f0;
    border-color: #d4cdba;
}

/* Sign in prompt */
.signin-prompt {
    text-align: center;
    font-size: 0.8rem;
    color: #7a7367;
    margin-top: 28px;
}

.signin-link {
    color: #1c1c1e;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.signin-link:hover {
    opacity: 0.7;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
    .hero-panel {
        flex: 0 0 40%;
        padding: 40px;
    }

    .hero-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 800px) {
    .signup-container {
        flex-direction: column;
    }

    .hero-panel {
    flex: 0 0 46%;
    position: relative;
    min-height: 100vh;
    background-image: url('/user/images/Perfumebottle');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px;
    overflow: hidden;
}

    .hero-illustration {
        width: 40%;
        max-width: 180px;
        bottom: 20px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-desc {
        display: none;
    }

    .form-panel {
        padding: 40px 24px;
    }
}
