/* =========================================================
   GreenSwap Auth — bright premium SaaS (Plant Tinder light)
   Base: #f4f6f5  Accents: #ff5e14 / #0d2e1d
   ========================================================= */

.auth-premium-body {
    --auth-canvas: #f4f6f5;
    --auth-surface: #ffffff;
    --auth-ink: #12261b;
    --auth-muted: #5f7368;
    --auth-line: rgba(18, 38, 27, 0.1);
    --auth-orange: #ff5e14;
    --auth-green: #0d2e1d;
    --auth-shadow: 0 24px 60px rgba(18, 38, 27, 0.08);
    --auth-radius: 28px;

    min-height: 100vh;
    background: var(--auth-canvas);
    color: var(--auth-ink);
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.auth-premium-body .main-header,
.auth-premium-body .global-auth-bar {
    display: none !important;
}

.auth-split {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(340px, 0.95fr) minmax(420px, 1.05fr);
}

/* ---------- LEFT BRAND PANEL ---------- */

.auth-brand-panel {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    padding: 34px clamp(28px, 3.4vw, 48px) 26px;
    overflow: hidden;
    color: #ffffff;
}

.auth-brand-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        url('https://images.unsplash.com/photo-1463936575829-25148e1db1b8?q=80&w=1800&auto=format&fit=crop') center / cover no-repeat;
    transform: scale(1.04);
    filter: saturate(1.05) contrast(1.02);
}

.auth-brand-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(165deg, rgba(18, 22, 18, 0.28) 0%, rgba(28, 24, 18, 0.45) 38%, rgba(18, 28, 22, 0.78) 100%),
        radial-gradient(ellipse 70% 50% at 18% 12%, rgba(255, 94, 20, 0.22), transparent 55%),
        radial-gradient(ellipse 50% 40% at 90% 80%, rgba(255, 220, 180, 0.16), transparent 50%);
    backdrop-filter: blur(1.5px);
}

.auth-brand-logo,
.auth-brand-main,
.auth-community-card,
.auth-brand-footer {
    position: relative;
    z-index: 2;
}

.auth-brand-logo {
    display: inline-flex;
    align-items: baseline;
    width: fit-content;
    font-size: 1.28rem;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.03em;
    transition: opacity 0.2s ease;
}

.auth-brand-logo span {
    color: var(--auth-orange);
}

.auth-brand-logo em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.auth-brand-logo:hover {
    opacity: 0.9;
}

.auth-brand-main {
    max-width: 470px;
    margin-top: auto;
}

.auth-brand-eyebrow {
    display: inline-flex;
    margin-bottom: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
}

.auth-brand-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.35rem, 4vw, 3.45rem);
    line-height: 1.05;
    margin: 0 0 14px;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-wrap: balance;
}

.auth-brand-subtitle {
    margin: 0 0 24px;
    max-width: 36ch;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.02rem;
    line-height: 1.6;
    font-weight: 500;
}

.auth-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.auth-feature-list li {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 12px;
    align-items: center;
    padding: 11px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.auth-feature-list li:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 94, 20, 0.45);
}

.auth-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 94, 20, 0.18);
    color: #ffd2b8;
    border: 1px solid rgba(255, 94, 20, 0.28);
}

.auth-feature-icon svg {
    width: 20px;
    height: 20px;
}

.auth-feature-list strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.auth-feature-list span {
    display: block;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.35;
}

.auth-community-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(16px);
}

.auth-community-avatars {
    display: flex;
    align-items: center;
}

.auth-community-avatars span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background-size: cover;
    background-position: center;
    margin-left: -8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.auth-community-avatars span:first-child {
    margin-left: 0;
}

.auth-community-more {
    display: grid !important;
    place-items: center;
    background: linear-gradient(135deg, #ff5e14, #ff8a4a) !important;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
}

.auth-community-copy strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.auth-community-copy span {
    display: block;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.78);
}

.auth-brand-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.auth-brand-footer a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-brand-footer a:hover {
    color: #ffffff;
}

/* ---------- RIGHT FORM PANEL ---------- */

.auth-form-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vh, 48px) clamp(20px, 4vw, 56px);
    background:
        radial-gradient(ellipse 55% 40% at 85% 8%, rgba(255, 94, 20, 0.06), transparent 55%),
        radial-gradient(ellipse 40% 35% at 10% 90%, rgba(13, 46, 29, 0.04), transparent 50%),
        var(--auth-canvas);
    overflow: auto;
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    padding: clamp(30px, 3.4vw, 42px);
    border-radius: var(--auth-radius);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        var(--auth-shadow),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    transition: max-width 0.35s ease, padding 0.35s ease;
}

.auth-premium-body[data-auth-mode="register"] .auth-card {
    max-width: 740px;
    padding: clamp(26px, 2.8vw, 36px) clamp(26px, 3vw, 40px);
}

.auth-premium-body[data-auth-mode="forgot"] .auth-card {
    max-width: 480px;
}

.auth-card-heading {
    margin-bottom: 22px;
}

.auth-card-kicker {
    margin: 0 0 8px;
    color: var(--auth-orange);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-card-heading h1 {
    margin: 0 0 8px;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.9rem, 2.5vw, 2.35rem);
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: var(--auth-ink);
}

.auth-card-heading p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 5px;
    margin-bottom: 22px;
    border-radius: 16px;
    background: #eef1ef;
    border: 1px solid rgba(18, 38, 27, 0.06);
}

.auth-tab {
    border: 0;
    background: transparent;
    color: var(--auth-muted);
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.auth-tab:hover {
    color: var(--auth-ink);
}

.auth-tab.active {
    background: #ffffff;
    color: var(--auth-ink);
    box-shadow: 0 6px 16px rgba(18, 38, 27, 0.08);
}

.auth-premium-body[data-auth-mode="forgot"] .auth-tabs {
    display: none;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form-register {
    gap: 14px;
}

.auth-register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    align-items: start;
}

.auth-register-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.gs-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.gs-field > span {
    font-size: 0.78rem;
    font-weight: 700;
    color: #31463c;
    letter-spacing: 0.01em;
}

.gs-field > span small {
    color: #809388;
    font-weight: 600;
}

.gs-field input[type="text"],
.gs-field input[type="email"],
.gs-field input[type="password"],
.gs-field input[type="tel"] {
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(18, 38, 27, 0.12);
    border-radius: 14px;
    padding: 13px 15px;
    color: var(--auth-ink);
    font: inherit;
    font-size: 0.97rem;
    outline: none;
    box-shadow: 0 1px 2px rgba(18, 38, 27, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.gs-field input::placeholder {
    color: rgba(95, 115, 104, 0.55);
}

.gs-field input:hover {
    border-color: rgba(18, 38, 27, 0.2);
}

.gs-field input:focus {
    border-color: rgba(255, 94, 20, 0.7);
    box-shadow: 0 0 0 4px rgba(255, 94, 20, 0.12);
}

.gs-field input.is-invalid {
    border-color: #e25555;
    box-shadow: 0 0 0 4px rgba(226, 85, 85, 0.1);
}

.gs-password-wrap {
    position: relative;
}

.gs-password-wrap input {
    padding-right: 48px;
}

.gs-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #7a8f84;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.gs-password-toggle svg {
    width: 18px;
    height: 18px;
}

.gs-password-toggle:hover {
    color: var(--auth-ink);
    background: rgba(18, 38, 27, 0.05);
}

.gs-field-error {
    margin: 0;
    color: #c44747;
    font-size: 0.74rem;
    line-height: 1.35;
}

.gs-form-alert {
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 0.86rem;
    line-height: 1.45;
}

.gs-form-alert-error {
    background: rgba(226, 85, 85, 0.08);
    border: 1px solid rgba(226, 85, 85, 0.22);
    color: #b33b3b;
}

.gs-form-alert-success {
    background: rgba(85, 166, 48, 0.1);
    border: 1px solid rgba(85, 166, 48, 0.24);
    color: #3f7d28;
}

.gs-form-alert-info {
    background: rgba(13, 46, 29, 0.04);
    border: 1px solid rgba(13, 46, 29, 0.1);
    color: #3d5548;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--auth-muted);
    font-size: 0.84rem;
    line-height: 1.4;
    cursor: pointer;
}

.auth-check-compact {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0 0;
}

.auth-check input {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: var(--auth-orange);
    flex-shrink: 0;
    cursor: pointer;
}

.auth-check em {
    color: #e25555;
    font-style: normal;
}

.auth-check a {
    color: var(--auth-orange);
    text-decoration: none;
    font-weight: 700;
}

.auth-check a:hover {
    text-decoration: underline;
}

.auth-forgot {
    color: var(--auth-orange);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-forgot:hover {
    color: #e04f0f;
}

.auth-submit {
    position: relative;
    width: 100%;
    margin-top: 2px;
    border: 0;
    border-radius: 16px;
    padding: 15px 18px;
    background: linear-gradient(135deg, #ff5e14 0%, #ff7738 100%);
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(255, 94, 20, 0.24);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.auth-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 18px 34px rgba(255, 94, 20, 0.3);
}

.auth-submit:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit:disabled,
.auth-submit.is-loading {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.auth-submit-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    animation: auth-spin 0.7s linear infinite;
    margin: 0 auto;
}

.auth-submit.is-loading .auth-submit-label {
    display: none;
}

.auth-submit.is-loading .auth-submit-spinner {
    display: inline-block;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

.auth-strength {
    display: grid;
    gap: 5px;
    margin-top: 2px;
}

.auth-strength-bar {
    height: 5px;
    border-radius: 999px;
    background: rgba(18, 38, 27, 0.08);
    overflow: hidden;
}

.auth-strength-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    transition: width 0.25s ease, background 0.25s ease;
}

.auth-strength-fill.weak { width: 33%; background: #e25555; }
.auth-strength-fill.medium { width: 66%; background: #e8a317; }
.auth-strength-fill.strong { width: 100%; background: #55a630; }

.auth-strength-label {
    font-size: 0.72rem;
    color: var(--auth-muted);
}

.auth-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.auth-switch-hint {
    margin: 18px 0 0;
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.88rem;
}

.auth-switch-hint button {
    border: 0;
    background: transparent;
    color: var(--auth-orange);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.auth-switch-hint button:hover {
    color: #e04f0f;
}

.auth-already {
    margin-bottom: 14px;
}

.auth-already a {
    color: var(--auth-orange);
    font-weight: 700;
    text-decoration: none;
}

.auth-already a:hover {
    text-decoration: underline;
}

/* Compact register on typical laptop heights */
@media (min-width: 981px) and (max-height: 900px) {
    .auth-premium-body[data-auth-mode="register"] .auth-card {
        padding: 24px 28px;
    }

    .auth-premium-body[data-auth-mode="register"] .auth-card-heading {
        margin-bottom: 14px;
    }

    .auth-premium-body[data-auth-mode="register"] .auth-tabs {
        margin-bottom: 14px;
    }

    .auth-premium-body[data-auth-mode="register"] .auth-form-register,
    .auth-premium-body[data-auth-mode="register"] .auth-register-col {
        gap: 10px;
    }

    .auth-premium-body[data-auth-mode="register"] .gs-field input[type="text"],
    .auth-premium-body[data-auth-mode="register"] .gs-field input[type="email"],
    .auth-premium-body[data-auth-mode="register"] .gs-field input[type="password"],
    .auth-premium-body[data-auth-mode="register"] .gs-field input[type="tel"] {
        padding: 11px 13px;
    }

    .auth-premium-body[data-auth-mode="register"] .auth-submit {
        padding: 12px 16px;
    }

    .auth-brand-panel {
        padding-top: 26px;
        padding-bottom: 20px;
        gap: 16px;
    }

    .auth-brand-title {
        font-size: clamp(2.05rem, 3.2vw, 2.7rem);
        margin-bottom: 10px;
    }

    .auth-brand-subtitle {
        margin-bottom: 16px;
        font-size: 0.95rem;
    }

    .auth-feature-list {
        gap: 8px;
    }

    .auth-feature-list li {
        padding: 8px 10px;
    }

    .auth-feature-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }
}

@media (max-width: 1100px) {
    .auth-split {
        grid-template-columns: minmax(300px, 0.88fr) minmax(380px, 1.12fr);
    }
}

@media (max-width: 980px) {
    .auth-split {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 28px 22px 24px;
        gap: 20px;
    }

    .auth-brand-main {
        margin-top: 10px;
    }

    .auth-feature-list {
        grid-template-columns: 1fr 1fr;
    }

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

    .auth-premium-body[data-auth-mode="register"] .auth-card,
    .auth-card {
        max-width: 640px;
    }
}

@media (max-width: 720px) {
    .auth-feature-list {
        grid-template-columns: 1fr;
    }

    .auth-register-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .auth-premium-body[data-auth-mode="register"] .auth-card {
        max-width: 100%;
    }
}

@media (max-width: 560px) {
    .auth-brand-title {
        font-size: 2.05rem;
    }

    .auth-card {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .auth-community-card {
        flex-direction: column;
        align-items: flex-start;
    }
}
