/* Terraplus — shared styles for login, register, forgot password and verify pages.
   Palette and type follow the home page (style.min.css): gold #ECD177 on near-black. */

:root {
    --gold: #ECD177;
    --gold-2: #F5C06D;
    --gold-soft: rgba(236, 209, 119, 0.14);
    --gold-line: rgba(236, 209, 119, 0.22);
    --bg: #0b0b0b;
    --panel: #141414;
    --card: #181818;
    --field: #111111;
    --line: #2b2b2b;
    --text: #f4f4f4;
    --text-2: #c9c9c9;
    --muted: #8d8d8d;
    --danger: #ff6b6b;
    --success: #4fd18b;
}

.auth,
.auth * {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.auth a {
    color: var(--gold);
    text-decoration: none;
    transition: color .2s ease;
}

.auth a:hover {
    color: var(--gold-2);
}

/* ── Layout ─────────────────────────────────────────── */
.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

/* Brand panel (left) */
.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    padding: 48px 56px;
    background:
        radial-gradient(circle at 15% 10%, rgba(236, 209, 119, .16), transparent 40%),
        radial-gradient(circle at 90% 95%, rgba(245, 192, 109, .10), transparent 45%),
        linear-gradient(165deg, #1d1d1d 0%, #121212 100%);
    border-right: 1px solid var(--gold-line);
}

.auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.auth-brand > * {
    position: relative;
    z-index: 1;
}

.auth-logo img {
    display: block;
    width: 170px;
    height: auto;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin-bottom: 22px;
    color: var(--gold);
    background: var(--gold-soft);
    border: 1px solid var(--gold-line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.auth-brand h2 {
    margin: 0 0 16px;
    max-width: 420px;
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
}

.auth-brand h2 span {
    color: var(--gold);
}

.auth-brand-copy {
    margin: 0;
    max-width: 400px;
    color: var(--text-2);
    font-size: 15px;
}

.auth-points {
    list-style: none;
    margin: 32px 0 0;
    padding: 0;
    display: grid;
    gap: 16px;
}

.auth-points li {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-2);
    font-size: 15px;
}

.auth-points i {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    background: var(--gold-soft);
    border: 1px solid var(--gold-line);
    border-radius: 12px;
    font-size: 20px;
}

.auth-brand-foot {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.auth-deco {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    opacity: .55;
    animation: auth-float 6s ease-in-out infinite;
}

.auth-deco--star {
    top: 36px;
    right: 40px;
    width: 46px;
}

.auth-deco--wave {
    right: 0;
    bottom: 0;
    width: 260px;
    opacity: .35;
    animation: none;
}

@keyframes auth-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Form area (right) */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    padding: 40px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
    animation: auth-rise .5s ease both;
}

.auth-card--wide {
    max-width: 620px;
}

@keyframes auth-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #141414;
    background: linear-gradient(135deg, var(--gold), var(--gold-2));
    border-radius: 14px;
    font-size: 26px;
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
}

.auth-sub {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 14px;
}

/* Server messages: the wrapper collapses when the asp:Label is hidden */
.auth-alert {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--line);
    border-left: 3px solid var(--gold);
    border-radius: 10px;
    font-size: 14px;
}

.auth-alert:empty {
    display: none;
}

/* ── Fields ─────────────────────────────────────────── */
.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
}

.auth-grid .field--full {
    grid-column: 1 / -1;
}

.field {
    margin-bottom: 18px;
}

.field-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
}

.field label .req {
    color: var(--gold);
}

.field-wrap {
    position: relative;
}

.field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 19px;
    line-height: 1;
    pointer-events: none;
    transition: color .2s ease;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 46px;
    color: var(--text);
    background: var(--field);
    border: 1px solid var(--line);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.field-wrap--toggle input {
    padding-right: 48px !important;
}

.field input::placeholder {
    color: #5f5f5f;
}

.field input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(236, 209, 119, .12);
}

.field-wrap:focus-within .field-icon {
    color: var(--gold);
}

.field input:disabled {
    color: var(--text-2);
    background: #1d1d1d;
    cursor: not-allowed;
}

.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--field) inset !important;
    caret-color: var(--text);
}

/* Overrides MasterPage's generic "form button" rule */
.auth .pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 19px;
    cursor: pointer;
}

.auth .pw-toggle:hover,
.auth .pw-toggle:focus-visible {
    color: var(--gold);
    background: rgba(255, 255, 255, .05);
}

.field-note {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.field-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
}

.field-status {
    font-size: 12px;
}

.field-error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
}

/* Password strength */
.pw-strength {
    margin-top: 10px;
}

.pw-strength-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 6px;
}

.pw-bar-seg {
    height: 4px;
    background: var(--line);
    border-radius: 4px;
    transition: background .2s ease;
}

.pw-strength-label {
    color: var(--muted);
    font-size: 12px;
}

/* Options row & checkboxes */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 24px;
    font-size: 13px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--text-2);
    font-size: 13px;
    cursor: pointer;
}

.auth-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--gold);
    cursor: pointer;
}

.auth-terms {
    margin: 6px 0 22px;
}

/* ── Buttons ────────────────────────────────────────── */
.auth .btn-submit,
.auth .btn-primary-link {
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #141414;
    background: linear-gradient(90deg, var(--gold), var(--gold-2));
    border: 0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.auth .btn-submit:hover,
.auth .btn-primary-link:hover {
    color: #141414;
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(236, 209, 119, .25);
}

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

.auth .btn-submit:focus-visible,
.auth .btn-primary-link:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.auth-alt {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.auth-alt a {
    font-weight: 500;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ── Verify page ────────────────────────────────────── */
.verify-email {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
    padding: 16px 18px;
    background: var(--field);
    border: 1px solid var(--gold-line);
    border-radius: 14px;
}

.verify-email i {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    background: var(--gold-soft);
    border-radius: 10px;
    font-size: 20px;
}

.verify-email-label {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.verify-email-value {
    display: block;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.verify-steps-title {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.verify-steps {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: grid;
    gap: 12px;
}

.verify-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-2);
    font-size: 14px;
}

.verify-steps li span {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    background: var(--gold-soft);
    border: 1px solid var(--gold-line);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
}

.verify-resend {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.verify-resend a {
    font-weight: 500;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 991px) {
    .auth {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
    }

    .auth-brand {
        gap: 0;
        padding: 22px 24px;
        align-items: center;
        border-right: 0;
        border-bottom: 1px solid var(--gold-line);
    }

    .auth-brand-body,
    .auth-brand-foot,
    .auth-deco {
        display: none;
    }

    .auth-logo img {
        width: 140px;
    }

    .auth-main {
        align-items: flex-start;
        padding: 32px 16px 48px;
    }
}

@media (max-width: 575px) {
    .auth-card {
        padding: 28px 20px;
        border-radius: 18px;
    }

    .auth-card h1 {
        font-size: 24px;
    }

    .auth-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-card,
    .auth-deco {
        animation: none;
    }

    .auth .btn-submit,
    .auth .btn-primary-link {
        transition: none;
    }
}
