/* Auth pages — aligned with EFOTECH landing */
:root {
    --lp-ink: #0c1f1c;
    --lp-muted: #5c6f6b;
    --lp-deep: #0f4c45;
    --lp-teal: #157a6e;
    --lp-teal-soft: #e6f4f1;
    --lp-line: #e2ebe8;
    --lp-surface: #ffffff;
    --lp-bg: #f6f9f8;
    --lp-shadow: 0 24px 60px rgba(12, 31, 28, 0.1);
    --lp-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes auth-fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes auth-mesh {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.55; }
    50% { transform: translate(3%, -2%) scale(1.04); opacity: 0.75; }
}

body.auth-shell {
    margin: 0;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', 'Manrope', system-ui, sans-serif;
    color: var(--lp-ink);
    background: var(--lp-bg);
    -webkit-font-smoothing: antialiased;
}

.auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 15% 0%, rgba(21, 122, 110, 0.12), transparent 55%),
        radial-gradient(ellipse 50% 40% at 90% 100%, rgba(196, 146, 42, 0.08), transparent 50%),
        var(--lp-bg);
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    width: min(800px, 90vw);
    height: 500px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(21, 122, 110, 0.07) 0%, transparent 70%);
    animation: auth-mesh 16s ease-in-out infinite;
    pointer-events: none;
}

.auth-page__home {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--lp-muted);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--lp-line);
    backdrop-filter: blur(12px);
    transition: color 0.25s var(--lp-ease), border-color 0.25s, transform 0.25s;
}

.auth-page__home:hover {
    color: var(--lp-deep);
    border-color: rgba(21, 122, 110, 0.3);
    transform: translateX(-2px);
}

.auth-page__layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    width: min(960px, 100%);
    min-height: min(560px, calc(100vh - 3rem));
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--lp-shadow);
    border: 1px solid var(--lp-line);
    animation: auth-fade-up 0.75s var(--lp-ease) both;
}

.auth-page__brand {
    padding: clamp(2rem, 4vw, 3rem);
    background: linear-gradient(155deg, var(--lp-deep) 0%, #0a3530 55%, #0f4c45 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-page__brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 15%, rgba(244, 184, 96, 0.18), transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(110, 231, 183, 0.1), transparent 40%);
    pointer-events: none;
}

.auth-page__brand-inner {
    position: relative;
    z-index: 1;
}

.auth-page__brand-mark {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.auth-page__brand h1 {
    margin: 0 0 0.75rem;
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.auth-page__brand-lead {
    margin: 0 0 1.75rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
    max-width: 36ch;
}

.auth-page__features {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-page__features li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.45;
}

.auth-page__features i {
    color: #b5f17a;
    font-size: 1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.auth-page__form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 4vw, 2.75rem);
    background: var(--lp-surface);
}

.auth-card {
    width: 100%;
    max-width: 360px;
}

.auth-card__header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-card__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.auth-card__logo-mark {
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--lp-deep), var(--lp-teal));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
}

.auth-card__logo-text {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--lp-ink);
}

.auth-card__subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: var(--lp-muted);
}

.auth-form-group {
    margin-bottom: 1.15rem;
}

.auth-form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--lp-ink);
    margin-bottom: 0.4rem;
}

.auth-form-control {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--lp-line);
    border-radius: 10px;
    font-size: 0.925rem;
    font-family: inherit;
    color: var(--lp-ink);
    background: var(--lp-surface);
    transition: border-color 0.25s var(--lp-ease), box-shadow 0.25s;
}

.auth-form-control::placeholder {
    color: #9aaba6;
}

.auth-form-control:focus {
    outline: none;
    border-color: var(--lp-teal);
    box-shadow: 0 0 0 3px rgba(21, 122, 110, 0.12);
}

.auth-submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: inherit;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(180deg, var(--lp-teal) 0%, var(--lp-deep) 100%);
    box-shadow: 0 8px 20px rgba(15, 76, 69, 0.22);
    transition: transform 0.3s var(--lp-ease), box-shadow 0.3s;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 76, 69, 0.28);
}

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

.auth-alert {
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.auth-alert--success {
    background: var(--lp-teal-soft);
    color: var(--lp-deep);
    border: 1px solid rgba(21, 122, 110, 0.2);
}

.auth-alert--danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-card__footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--lp-muted);
}

.auth-card__footer--split {
    margin-top: 1rem;
    margin-bottom: 0;
}

.auth-card__footer a {
    color: var(--lp-teal);
    font-weight: 700;
    text-decoration: none;
}

.auth-card__footer a:hover {
    color: var(--lp-deep);
    text-decoration: underline;
}

.auth-captcha__panel {
    margin-bottom: 0.65rem;
}

.auth-captcha__display {
    position: relative;
    display: flex;
    align-items: center;
    height: 44px;
    border: 1px solid rgba(17, 65, 49, 0.14);
    border-radius: 10px;
    background: linear-gradient(160deg, #f6fbf8 0%, #edf5f0 100%);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.auth-captcha__image {
    display: block;
    flex: 1;
    width: auto;
    height: 44px;
    min-width: 0;
    padding-right: 0.35rem;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
    transition: opacity 0.25s var(--lp-ease), filter 0.25s var(--lp-ease);
}

.auth-captcha__image.is-loading {
    opacity: 0.5;
    filter: blur(1px) saturate(0.85);
}

.auth-captcha__reload {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0 7px 0 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    appearance: none;
    -webkit-appearance: none;
    background: linear-gradient(145deg, #0f4c45 0%, #157a6e 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 76, 69, 0.28);
    transition:
        transform 0.2s var(--lp-ease),
        box-shadow 0.2s var(--lp-ease);
}

.auth-captcha__reload:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(15, 76, 69, 0.34);
}

.auth-captcha__reload:active {
    transform: scale(0.96);
}

.auth-captcha__reload:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.auth-captcha__reload-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.4s var(--lp-ease);
}

.auth-captcha__reload:hover .auth-captcha__reload-icon {
    transform: rotate(-180deg);
}

.auth-captcha__reload.is-loading .auth-captcha__reload-icon {
    animation: auth-captcha-spin 0.7s linear infinite;
}

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

.auth-captcha__hint {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: var(--lp-muted, #567267);
}

.auth-captcha__hint strong {
    color: #0d5b41;
    font-weight: 700;
}

/* —— Register (same shell as login) —— */
.auth-page--register {
    align-items: center;
    padding: 1.5rem;
}

.auth-page__layout--register {
    grid-template-columns: minmax(280px, 36%) minmax(0, 64%);
    width: min(1020px, 100%);
    min-height: min(580px, calc(100vh - 3rem));
}

.auth-page__form-wrap--register {
    align-items: center;
    justify-content: center;
    padding: clamp(1.75rem, 3vw, 2.25rem);
    overflow-y: auto;
    max-height: calc(100vh - 3rem);
}

.auth-card--register {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.auth-card--register .auth-card__header {
    margin-bottom: 1.35rem;
}

.auth-form-hint {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: var(--lp-muted);
    line-height: 1.45;
}

.auth-form-control--file {
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
}

.auth-alert__list {
    margin: 0.5rem 0 0;
    padding-left: 1.1rem;
}

.auth-register-steps {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1.35rem;
    padding: 0.3rem;
    border: 1px solid var(--lp-line);
    border-radius: 12px;
    background: var(--lp-bg);
}

.auth-register-step {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.15rem;
    min-height: 3.25rem;
    padding: 0.5rem 0.55rem;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--lp-muted);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s var(--lp-ease), border-color 0.2s var(--lp-ease), box-shadow 0.2s;
}

.auth-register-step.is-active {
    border-color: rgba(21, 122, 110, 0.28);
    background: var(--lp-surface);
    color: var(--lp-deep);
    box-shadow: 0 2px 8px rgba(12, 31, 28, 0.06);
}

.auth-register-step__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: rgba(21, 122, 110, 0.12);
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--lp-deep);
    flex-shrink: 0;
}

.auth-register-step.is-active .auth-register-step__index {
    background: var(--lp-teal);
    color: #fff;
}

.auth-register-step strong {
    font-size: 0.78rem;
    color: var(--lp-ink);
    line-height: 1.2;
}

.auth-register-step small {
    display: block;
    font-size: 0.68rem;
    line-height: 1.3;
    color: inherit;
    opacity: 0.9;
}

.auth-register-pane {
    display: none;
    animation: auth-register-fade 0.22s var(--lp-ease);
}

.auth-register-pane.is-active {
    display: block;
}

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

.auth-register-section {
    margin: 0 0 0.85rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lp-muted);
}

.auth-register-pricing {
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--lp-line);
    border-radius: 10px;
    background: linear-gradient(160deg, #f6fbf8 0%, #edf5f0 100%);
}

.auth-register-pricing strong {
    display: block;
    font-size: 0.95rem;
    color: var(--lp-ink);
}

.auth-register-pricing p {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--lp-muted);
    line-height: 1.45;
}

.auth-register-pricing__rates {
    font-size: 0.78rem !important;
}

.auth-register-pricing__rates s {
    color: #9aaba6;
    margin-right: 0.15rem;
}

.auth-register-billing {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.auth-register-billing__option {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--lp-line);
    border-radius: 10px;
    background: var(--lp-surface);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.auth-register-billing__option:has(input:checked) {
    border-color: var(--lp-teal);
    background: var(--lp-teal-soft);
}

.auth-register-billing__option input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.auth-register-billing__option span {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.auth-register-billing__option strong {
    font-size: 0.82rem;
    color: var(--lp-ink);
}

.auth-register-billing__option small {
    font-size: 0.72rem;
    color: var(--lp-muted);
}

.auth-register-doc-hint {
    margin-top: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(21, 122, 110, 0.18);
    background: var(--lp-teal-soft);
    font-size: 0.75rem;
    color: var(--lp-ink);
    line-height: 1.5;
}

.auth-register-doc-hint strong {
    display: block;
    font-size: 0.75rem;
    color: var(--lp-deep);
    margin-bottom: 0.35rem;
}

.auth-register-doc-hint ul {
    margin: 0;
    padding-left: 1rem;
}

.auth-register-doc-hint li + li {
    margin-top: 0.25rem;
}

.auth-register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.auth-register-summary {
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--lp-line);
    border-radius: 10px;
    background: var(--lp-bg);
    font-size: 0.82rem;
    color: var(--lp-muted);
}

.auth-register-summary strong {
    display: block;
    color: var(--lp-ink);
    margin-bottom: 0.35rem;
}

.auth-register-summary ul {
    margin: 0;
    padding-left: 1rem;
}

.auth-register-summary li + li {
    margin-top: 0.3rem;
}

.auth-register-terms {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--lp-muted);
    line-height: 1.45;
    cursor: pointer;
}

.auth-register-terms input {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.auth-register-terms a {
    color: var(--lp-teal);
    font-weight: 700;
    text-decoration: none;
}

.auth-register-terms a:hover {
    color: var(--lp-deep);
    text-decoration: underline;
}

.auth-register-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--lp-line);
}

.auth-register-actions .auth-step-btn:first-child:not(:only-child) {
    margin-right: auto;
}

.auth-register-actions .auth-submit {
    flex: 0 0 auto;
    width: auto;
    min-width: 9.5rem;
    margin-top: 0;
}

.auth-step-btn {
    flex: 0 0 auto;
    min-width: 7.5rem;
    padding: 0.7rem 1.15rem;
    border: 1px solid var(--lp-line);
    border-radius: 10px;
    background: var(--lp-surface);
    color: var(--lp-ink);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.auth-step-btn--primary {
    border: none;
    color: #fff;
    background: linear-gradient(180deg, var(--lp-teal) 0%, var(--lp-deep) 100%);
    box-shadow: 0 6px 16px rgba(15, 76, 69, 0.2);
}

.auth-step-btn:hover {
    border-color: rgba(21, 122, 110, 0.35);
}

.auth-step-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 76, 69, 0.26);
}

.auth-register-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--lp-muted);
}

.auth-register-loading[hidden] {
    display: none !important;
}

@media (max-width: 768px) {
    .auth-page__layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-page__brand {
        padding: 1.75rem 1.5rem;
    }

    .auth-page__brand-lead,
    .auth-page__features {
        display: none;
    }

    .auth-page__brand h1 {
        font-size: 1.5rem;
        margin-bottom: 0;
    }

    .auth-page__brand-mark {
        margin-bottom: 0.75rem;
    }

    .auth-page__form-wrap {
        padding: 1.75rem 1.5rem 2rem;
    }

    .auth-page__layout--register {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .auth-page__form-wrap--register {
        max-height: none;
        padding: 1.75rem 1.25rem 2rem;
    }

    .auth-card--register {
        max-width: 100%;
    }

    .auth-register-steps {
        flex-wrap: wrap;
    }

    .auth-register-step {
        flex: 1 1 calc(50% - 0.35rem);
        min-width: 7.5rem;
    }

    .auth-register-grid,
    .auth-register-billing {
        grid-template-columns: 1fr;
    }

    .auth-register-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .auth-register-step {
        flex: 1 1 100%;
    }

    .auth-register-step small {
        display: none;
    }

    .auth-register-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .auth-register-actions .auth-step-btn:first-child:not(:only-child) {
        margin-right: 0;
    }

    .auth-register-actions .auth-step-btn,
    .auth-register-actions .auth-submit {
        width: 100%;
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page__layout,
    .auth-page::after {
        animation: none;
    }
}
