/* ================================================================
   Auth Pages (login.php / signup.php) Styles
================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: 'Google Sans Flex', 'Pretendard', -apple-system, sans-serif;
    background: #080808;
    color: #fff;
}

@keyframes authFadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.page-login .auth-header,
body.page-login .auth-error,
body.page-login .auth-form > *,
body.page-login .auth-footer-links,
body.page-signup .auth-header,
body.page-signup .auth-error,
body.page-signup .auth-success,
body.page-signup .auth-form > *,
body.page-signup .auth-footer-links {
    opacity: 0;
    animation: authFadeUp 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.page-login .auth-header,
body.page-signup .auth-header { animation-delay: 0.08s; }

body.page-login .auth-error,
body.page-signup .auth-error,
body.page-signup .auth-success { animation-delay: 0.18s; }

body.page-signup .auth-form > :nth-child(1) { animation-delay: 0.28s; }

body.page-signup .auth-form > :nth-child(2) { animation-delay: 0.38s; }

body.page-signup .auth-form > :nth-child(3) { animation-delay: 0.48s; }

body.page-login .auth-form > .auth-login-step--1 { animation-delay: 0.28s; }
body.page-login .auth-form > .auth-login-step--2 { animation-delay: 0.40s; }
body.page-login .auth-form > .auth-login-step--3 { animation-delay: 0.52s; }
body.page-login .auth-form > .auth-login-step--4 { animation-delay: 0.64s; }

body.page-signup .auth-form > :nth-child(4) { animation-delay: 0.58s; }

body.page-signup .auth-form > :nth-child(5) { animation-delay: 0.68s; }

body.page-login .auth-footer-links { animation-delay: 0.76s; }
body.page-signup .auth-footer-links { animation-delay: 0.78s; }

body.page-signup-success .auth-success-card,
body.page-signup-success .auth-success-icon,
body.page-signup-success .auth-success-card strong,
body.page-signup-success .auth-success-card-btn {
    opacity: 0;
    animation: authFadeUp 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.page-signup-success .auth-success-card { animation-delay: 0.18s; }
body.page-signup-success .auth-success-icon { animation-delay: 0.30s; }
body.page-signup-success .auth-success-card strong { animation-delay: 0.42s; }
body.page-signup-success .auth-success-card-btn { animation-delay: 0.54s; }

body.page-recovery .auth-header,
body.page-recovery .auth-recovery-tabs,
body.page-recovery .auth-error,
body.page-recovery .auth-success,
body.page-recovery .auth-form > *,
body.page-recovery .auth-recovery-result,
body.page-recovery .auth-footer-links {
    opacity: 0;
    animation: authFadeUp 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.page-recovery .auth-header { animation-delay: 0.08s; }
body.page-recovery .auth-recovery-tabs { animation-delay: 0.18s; }
body.page-recovery .auth-error,
body.page-recovery .auth-success { animation-delay: 0.28s; }
body.page-recovery .auth-form > :nth-child(1) { animation-delay: 0.32s; }
body.page-recovery .auth-form > :nth-child(2) { animation-delay: 0.42s; }
body.page-recovery .auth-form > :nth-child(3) { animation-delay: 0.52s; }
body.page-recovery .auth-form > :nth-child(4) { animation-delay: 0.62s; }
body.page-recovery .auth-form > :nth-child(5) { animation-delay: 0.72s; }
body.page-recovery .auth-form > :nth-child(6) { animation-delay: 0.82s; }
body.page-recovery .auth-form > :nth-child(7) { animation-delay: 0.92s; }
body.page-recovery .auth-form > :nth-child(8) { animation-delay: 1.02s; }
body.page-recovery .auth-recovery-result { animation-delay: 0.82s; }
body.page-recovery .auth-footer-links { animation-delay: 1.12s; }

@media (prefers-reduced-motion: reduce) {
    body.page-login .auth-header,
    body.page-login .auth-error,
    body.page-login .auth-form > *,
    body.page-login .auth-footer-links,
    body.page-signup .auth-header,
    body.page-signup .auth-error,
    body.page-signup .auth-success,
    body.page-signup .auth-form > *,
    body.page-signup .auth-footer-links,
    body.page-signup-success .auth-success-card,
    body.page-signup-success .auth-success-icon,
    body.page-signup-success .auth-success-card strong,
    body.page-signup-success .auth-success-card-btn,
    body.page-recovery .auth-header,
    body.page-recovery .auth-recovery-tabs,
    body.page-recovery .auth-error,
    body.page-recovery .auth-success,
    body.page-recovery .auth-form > *,
    body.page-recovery .auth-recovery-result,
    body.page-recovery .auth-footer-links {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .auth-success-check {
        stroke-dashoffset: 0;
        animation: none;
    }
}

/* ----------------------------------------------------------------
   Page Layout
---------------------------------------------------------------- */
.auth-main {
    position: fixed;
    top: 90px;    /* 헤더 높이 */
    left: 0;
    right: 0;
    bottom: 80px; /* 푸터 영역 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    text-align: center;
    overflow-y: auto;
}

/* signup은 콘텐츠가 많아 상단 시작 + 스크롤 */
.auth-main--signup {
    justify-content: flex-start;
    padding-top: 40px;
    padding-bottom: 40px;
}

/* ----------------------------------------------------------------
   Container Width
---------------------------------------------------------------- */
.auth-container--wide {
    max-width: 960px;
}

/* ----------------------------------------------------------------
/* ----------------------------------------------------------------
   회원 유형 선택 버튼 (직사각형)
---------------------------------------------------------------- */
.auth-type-select {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    justify-content: center;
}

.auth-type-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    user-select: none;
    padding: 12px 40px;
    border: 1.5px solid rgba(255,255,255,0.2);
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    letter-spacing: 0.04em;
}
.auth-type-option + .auth-type-option {
    margin-left: -1px;
}
.auth-type-option:hover {
    color: rgba(255,255,255,0.8);
}
.auth-type-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }

/* 선택 시: 배경 #ff6e2e */
.auth-type-option:has(input:checked) {
    background: #ff6e2e;
    border-color: #ff6e2e;
    color: #fff;
}

/* ----------------------------------------------------------------
   폼 섹션
---------------------------------------------------------------- */
.auth-form-section {
    padding-top: 24px;
    margin-bottom: 0;
}
.auth-form-section + .auth-form-section {
    border-top: 1px solid rgba(255,255,255,0.15);
}

/* 상세주소: 주소 선택 전에도 동일 스타일 */
.auth-detail-input[readonly] {
    cursor: not-allowed;
}
.auth-detail-input:not([readonly]) {
    cursor: text;
}
.auth-field-row { margin-bottom: 24px; }
.auth-field-row--2col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.auth-field-row--3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }

.auth-split-input {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-split-input input {
    text-align: center;
}

.auth-split-input span {
    color: rgba(255,255,255,0.48);
    font-size: 14px;
    font-weight: 700;
}

/* 필수 표시 (contact 페이지 방식: 위 첨자) */
.req {
    color: #ff6e2e;
    font-size: 12px;
    vertical-align: super;
    margin-left: 2px;
    font-weight: 700;
}

/* 파일 첨부 */
.auth-file-label {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 13px 16px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    text-align: center;
}
.auth-file-label:hover { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.9); }
.auth-file-label.file-selected {
    border-color: #fff;
    color: #fff;
}

.auth-file-clear {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 1px solid #fff;
    border-radius: 50%;
    background: #080808;
    color: #fff;
    font-size: 16px;
    font-family: inherit;
    line-height: 18px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.auth-file-clear:hover {
    opacity: 0.68;
}

.auth-file-clear[hidden] {
    display: none;
}

/* 사업자등록증 첨부 아래 구분선 */
.auth-biz-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin: 20px 0;
}

/* 인라인 버튼 (중복확인 / 주소검색) */
.auth-inline-btn {
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    color: #888;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    padding: 8px 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s;
    margin-left: 8px;
    letter-spacing: 0.03em;
}
.auth-inline-btn:hover { border-color: rgba(255,255,255,0.3); color: #fff; }
.auth-inline-btn:disabled { opacity: 0.4; cursor: default; }

/* 아이디 입력 + 버튼 + 상태 래퍼 */
.auth-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}
.auth-input-row {
    display: flex;
    align-items: center;
}

/* 상태 메시지 (중복 확인 결과) */
.auth-field-status {
    display: block;
    width: 100%;
    font-size: 12px;
    padding-left: 2px;
    padding-top: 2px;
    min-height: 1em;
    text-align: left;
}
.auth-field-status.ok  { color: #5de08a; }
.auth-field-status.err { color: #ff6e2e; }
.auth-field-status--accent { color: #ff6e2e; }

.auth-consent-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: center;
}

.auth-consent-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    color: rgba(255,255,255,0.66);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    line-height: 1;
}

.auth-consent-label input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.auth-consent-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.auth-consent-label .auth-optional {
    font-size: inherit;
}

.auth-consent-checkmark {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    position: relative;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 3px;
    background: transparent;
    transition: all 0.3s ease;
}

.auth-consent-checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-consent-label:hover input ~ .auth-consent-checkmark {
    border-color: #ff6e2e;
}

.auth-consent-label input:checked ~ .auth-consent-checkmark {
    background: #ff6e2e;
    border-color: #ff6e2e;
}

.auth-consent-label input:checked ~ .auth-consent-checkmark::after {
    display: block;
}

.auth-consent-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.auth-consent-toggle::before {
    content: "";
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid #ff6e2e;
    transition: transform 0.2s, border-top-color 0.2s;
}

.auth-consent-toggle:hover {
    opacity: 0.72;
}

.auth-consent-toggle[aria-expanded="true"]::before {
    transform: rotate(90deg);
    border-top-color: #ff6e2e;
}

.auth-terms-box {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    margin-top: 0;
    border: 1px solid transparent;
    background: rgba(255,255,255,0.035);
    padding: 0 20px;
    text-align: left;
    color: rgba(255,255,255,0.56);
    font-size: 13px;
    line-height: 1.7;
    transition: max-height 0.38s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.24s ease,
                transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
                margin-top 0.24s ease,
                padding 0.38s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.24s ease;
}

.auth-terms-box.is-open {
    max-height: 260px;
    overflow-y: auto;
    opacity: 1;
    transform: translateY(0);
    margin-top: 6px;
    border-color: rgba(255,255,255,0.14);
    padding: 18px 20px;
}

.auth-terms-box h3,
.auth-terms-box .auth-term-heading {
    color: rgba(255,255,255,0.64);
    font-size: 13px;
    font-weight: 700;
    margin: 16px 0 6px;
}

.auth-terms-box h3 {
    margin-top: 0;
}

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

.auth-terms-box p,
.auth-terms-box li,
.auth-terms-box h3,
.auth-terms-box .auth-term-heading {
    font-size: 13px;
}

.auth-terms-box ul {
    margin: 4px 0 10px;
    padding-left: 16px;
}

.auth-terms-box li {
    margin: 2px 0;
}

.auth-terms-box {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.28) rgba(255,255,255,0.04);
}

.auth-terms-box::-webkit-scrollbar {
    width: 8px;
}

.auth-terms-box::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.04);
}

.auth-terms-box::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.28);
    border: 2px solid rgba(255,255,255,0.04);
    border-radius: 999px;
}

.auth-terms-box::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.42);
}

@media (max-width: 700px) {
    .auth-field-row--2col,
    .auth-field-row--3col { grid-template-columns: 1fr; }
    .auth-main--signup { padding-top: 24px; }
    .auth-field label { min-width: 80px; }
}

/* 로그인 페이지: 라벨 고정 너비로 입력박스 시작점 정렬 */
body.page-login .auth-field label {
    min-width: 72px;
}

body.page-login {
    min-height: 100vh !important;
    background: #080808;
}

/* 로그인 페이지: 푸터 항상 표시 (fixed) */
body:not(.page-signup) .auth-main ~ .page-footer {
    position: fixed !important;
    bottom: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* ----------------------------------------------------------------
   Signup 페이지: 일반 플로우 (스크롤 가능)
---------------------------------------------------------------- */
body.page-signup .auth-main {
    position: static !important;
    top: auto; left: auto; right: auto; bottom: auto;
    overflow: visible;
    padding: 110px 20px 60px;
    align-items: center;
    min-height: unset;
}

/* signup 푸터: 콘텐츠 아래 자연 위치 */
body.page-signup .page-footer {
    position: static !important;
    bottom: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: none !important;
}

/* ----------------------------------------------------------------
   Container
---------------------------------------------------------------- */
.auth-container {
    width: 100%;
    max-width: 640px;
}
.auth-container--login {
    max-width: 420px;
}

/* ----------------------------------------------------------------
   Header
---------------------------------------------------------------- */
.auth-header {
    margin-bottom: 40px;
    text-align: center;
}

.auth-header h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 0;
    line-height: 1.1;
}

.auth-header p {
    max-width: 680px;
    margin: 12px auto 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: normal;
    opacity: 1;
    text-align: center;
}

/* ----------------------------------------------------------------
   Error / Success
---------------------------------------------------------------- */
.auth-error {
    background: rgba(255, 110, 46, 0.1);
    border: 1px solid rgba(255, 110, 46, 0.3);
    color: #ff6e2e;
    font-size: 14px;
    padding: 14px 16px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.auth-success {
    background: rgba(44, 200, 100, 0.08);
    border: 1px solid rgba(44, 200, 100, 0.25);
    color: #5de08a;
    font-size: 14px;
    padding: 14px 16px;
    margin-bottom: 24px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-success-link {
    color: #5de08a;
    font-weight: 700;
    text-decoration: underline;
    font-size: 13px;
}

.auth-recovery-tabs {
    display: flex;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.14);
    margin-bottom: 24px;
}

.auth-recovery-tabs a {
    flex: 1;
    padding: 12px 14px;
    color: rgba(255,255,255,0.56);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    transition: color 0.2s, background 0.2s;
}

.auth-recovery-tabs a + a {
    border-left: 1px solid rgba(255,255,255,0.14);
}

.auth-recovery-tabs a.active {
    background: #ff6e2e;
    color: #fff;
}

.auth-recovery-result {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.035);
    padding: 16px;
    margin-top: -8px;
    color: rgba(255,255,255,0.72);
    font-size: 14px;
    text-align: center;
}

.auth-recovery-result strong {
    color: #fff;
    font-size: 13px;
}

.auth-recovery-member-type {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.auth-recovery-radio {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255,255,255,0.62);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.auth-recovery-radio input {
    position: absolute;
    width: 0 !important;
    height: 0 !important;
    opacity: 0;
}

.auth-recovery-dot {
    width: 14px;
    height: 14px;
    border: 1px solid rgba(255,255,255,0.36);
    border-radius: 50%;
    background: transparent;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.auth-recovery-dot::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.2s;
}

.auth-recovery-radio input:checked + .auth-recovery-dot {
    border-color: #ff6e2e;
}

.auth-recovery-radio input:checked + .auth-recovery-dot::after {
    background: #ff6e2e;
}

.auth-recovery-radio:hover {
    color: #ff6e2e;
}

.auth-recovery-radio:has(input:checked) {
    color: #ff6e2e;
}

body.page-recovery .auth-field label {
    min-width: 86px;
}

.auth-main--success-preview {
    justify-content: center !important;
    min-height: calc(100vh - 170px) !important;
    padding-top: 90px !important;
    padding-bottom: 80px !important;
}

.auth-container--success {
    max-width: 460px;
}

.auth-success-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.035);
    padding: 38px 28px 30px;
    text-align: center;
}

.auth-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border: 1px solid rgba(255, 110, 46,0.72);
    border-radius: 50%;
    background: rgba(255, 110, 46,0.08);
}

.auth-success-icon svg {
    width: 42px;
    height: 42px;
}

.auth-success-check {
    fill: none;
    stroke: #ff6e2e;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 36;
    stroke-dashoffset: 36;
    animation: authCheckDraw 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.72s forwards;
}

@keyframes authCheckDraw {
    to {
        stroke-dashoffset: 0;
    }
}

.auth-success-card strong {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

.auth-success-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    text-decoration: none;
}

/* ----------------------------------------------------------------
   Form
---------------------------------------------------------------- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-bottom: 28px;
}

/* 라벨 | 인풋 나란히 (contact 스타일) */
.auth-field {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
}

.auth-field:has(.auth-input-group) {
    align-items: flex-start;
}

.auth-field:has(.auth-input-group) > label {
    padding-top: 12px;
}

.auth-field label {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,0.86);
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 0;
    margin-right: 10px;
    margin-bottom: 0;
    text-align: left;
}

.auth-required-label::after {
    content: '*';
    color: #ff6e2e;
    font-size: 14px;
    vertical-align: super;
    margin-left: 4px;
}

.auth-optional {
    color: rgba(255,255,255,0.38);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
}

/* 파일 첨부는 세로 유지 */
.auth-field--file {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.auth-field--file > label:first-child {
    min-width: unset;
    margin-right: 0;
}

.auth-field input {
    flex: 1;
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.25);
    border-radius: 0;
    padding: 12px 0;
    font-size: 15px;
    font-family: inherit;
    color: rgba(255,255,255,0.66);
    outline: none;
    transition: border-bottom-color 0.2s;
}

.auth-field textarea {
    flex: 1;
    width: 100%;
    min-height: 74px;
    resize: vertical;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.25);
    border-radius: 0;
    padding: 10px 0;
    font-size: 15px;
    font-family: inherit;
    color: rgba(255,255,255,0.82);
    line-height: 1.5;
    outline: none;
    transition: border-bottom-color 0.2s;
}

.auth-field--textarea {
    align-items: flex-start;
}

.auth-field--textarea label {
    padding-top: 10px;
}

.auth-field input::placeholder { color: #3a3a3a; }
.auth-field input:focus { border-bottom-color: #ff6e2e; }
.auth-field textarea::placeholder { color: #3a3a3a; }
.auth-field textarea:focus { border-bottom-color: #ff6e2e; }

.auth-field.is-required-missing input,
.auth-field.is-required-missing textarea {
    border-bottom-color: #ff6e2e;
}

.auth-field.is-required-missing .auth-inline-btn {
    border-color: #ff6e2e;
    color: #ff6e2e;
}

.auth-field--file.is-required-missing .auth-file-label {
    border-color: #ff6e2e;
}

.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus,
.auth-field input:-webkit-autofill:active {
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
    border-bottom-color: rgba(255,255,255,0.25);
    box-shadow: 0 0 0 1000px #080808 inset !important;
    -webkit-box-shadow: 0 0 0 1000px #080808 inset !important;
    transition: background-color 9999s ease-out, color 9999s ease-out;
}

.auth-field input:-webkit-autofill:focus {
    border-bottom-color: #ff6e2e;
}

.auth-password-wrap {
    position: relative;
    display: flex;
    flex: 1;
    min-width: 0;
}

.auth-password-wrap input {
    padding-right: 38px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 0;
    width: 32px;
    height: 32px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    background: transparent;
    color: rgba(255,255,255,0.52);
    cursor: pointer;
    transition: color 0.25s ease;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    color: #fff;
}

.auth-eye {
    position: relative;
    width: 20px;
    height: 13px;
    border: 1.5px solid currentColor;
    border-radius: 50% / 62%;
}

.auth-eye::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.auth-eye::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 24px;
    height: 1.5px;
    background: currentColor;
    transform: translate(-50%, -50%) rotate(-42deg);
    box-shadow: 0 0 0 2px #080808;
    transition: opacity 0.2s ease;
}

.auth-password-toggle.is-visible .auth-eye::after {
    opacity: 0;
}

.auth-login-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 10px 0 -10px;
}

.auth-login-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: #d1d5db;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.auth-login-checkbox input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.auth-login-checkmark {
    position: relative;
    width: 18px;
    height: 18px;
    margin-right: 9px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 3px;
    background: transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.auth-login-checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-login-checkbox:hover .auth-login-checkmark {
    border-color: #ff6e2e;
}

.auth-login-checkbox input:focus-visible + .auth-login-checkmark {
    outline: 2px solid rgba(255, 110, 46,0.35);
    outline-offset: 2px;
}

.auth-login-checkbox input:checked + .auth-login-checkmark {
    border-color: #ff6e2e;
    background: #ff6e2e;
}

.auth-login-checkbox input:checked + .auth-login-checkmark::after {
    display: block;
}

/* ----------------------------------------------------------------
   Submit Button
---------------------------------------------------------------- */
.auth-btn {
    width: 100%;
    padding: 16px;
    background: #ff6e2e;
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 4px;
}
.auth-btn:hover { background: #ff6e2e; }

/* ----------------------------------------------------------------
   Footer Links
---------------------------------------------------------------- */
.auth-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    color: #555;
    margin-top: 20px;
}

.auth-footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.auth-footer-links a:hover { color: #fff; }

.auth-login-links {
    gap: 8px;
}

.auth-login-links a {
    font-size: 13px;
    line-height: 1.4;
}

body.page-login .auth-login-links a,
body.light-mode.page-login .auth-login-links a {
    color: #fff;
}

body.page-login .auth-login-links a:hover,
body.light-mode.page-login .auth-login-links a:hover {
    color: rgba(255,255,255,0.72);
}

body.page-login .auth-login-links .auth-login-signup-link,
body.light-mode.page-login .auth-login-links .auth-login-signup-link {
    color: #ff6e2e;
}

body.page-login .auth-login-links .auth-login-signup-link:hover,
body.light-mode.page-login .auth-login-links .auth-login-signup-link:hover {
    color: #ff6e2e;
}

.auth-footer-sep {
    color: rgba(255,255,255,0.5);
}

body.light-mode .auth-footer-sep {
    color: rgba(255,255,255,0.5);
}

body.page-login .auth-footer-links a,
body.page-signup .auth-footer-links a,
body.page-signup .auth-success-link {
    color: #ff6e2e;
}

body.page-login .auth-footer-links a:hover,
body.page-signup .auth-footer-links a:hover,
body.page-signup .auth-success-link:hover {
    color: #ff6e2e;
}

body.page-login .auth-login-links a,
body.light-mode.page-login .auth-login-links a {
    color: #fff;
}

body.page-login .auth-login-links a:hover,
body.light-mode.page-login .auth-login-links a:hover {
    color: rgba(255,255,255,0.72);
}

/* ----------------------------------------------------------------
   Light Mode
---------------------------------------------------------------- */
body.light-mode.page-login,
body.light-mode.page-signup {
    background: #fcfcfc !important;
    color: #1a1a1a;
}

body.light-mode .auth-main {
    background: #fcfcfc;
}

body.light-mode .auth-header h1 {
    color: #0b0b0b;
}

body.light-mode .auth-header p {
    color: rgba(0, 0, 0, 0.62) !important;
    opacity: 1;
}

body.light-mode .auth-recovery-tabs {
    border-color: rgba(0,0,0,0.12);
}

body.light-mode .auth-recovery-tabs a {
    color: rgba(0,0,0,0.58);
}

body.light-mode .auth-recovery-tabs a + a {
    border-left-color: rgba(0,0,0,0.12);
}

body.light-mode .auth-recovery-tabs a.active {
    color: #fff;
}

body.light-mode .auth-recovery-result {
    border-color: rgba(0,0,0,0.12);
    background: rgba(0,0,0,0.025);
    color: rgba(0,0,0,0.64);
}

body.light-mode .auth-recovery-result strong {
    color: #111;
}

body.light-mode .auth-recovery-radio {
    color: rgba(0,0,0,0.62);
}

body.light-mode .auth-recovery-dot {
    border-color: rgba(0,0,0,0.32);
}

body.light-mode .auth-recovery-radio input:checked + .auth-recovery-dot {
    border-color: #ff6e2e;
}

body.light-mode .auth-recovery-radio input:checked + .auth-recovery-dot::after {
    background: #ff6e2e;
}

body.light-mode .auth-recovery-radio:hover {
    color: #ff6e2e;
}

body.light-mode .auth-recovery-radio:has(input:checked) {
    color: #ff6e2e;
}

body.light-mode .auth-form-section + .auth-form-section,
body.light-mode .auth-biz-divider {
    border-top-color: rgba(0,0,0,0.08);
}

body.light-mode .auth-field label {
    color: rgba(0,0,0,0.74);
}

body.light-mode .auth-optional {
    color: rgba(0,0,0,0.42);
}

body.light-mode .auth-field input {
    color: rgba(0,0,0,0.58);
    border-bottom-color: rgba(0,0,0,0.22);
}

body.light-mode .auth-field textarea {
    color: rgba(0,0,0,0.58);
    border-bottom-color: rgba(0,0,0,0.22);
}

body.light-mode .auth-field input::placeholder {
    color: #9a9a9a;
}

body.light-mode .auth-field textarea::placeholder {
    color: #9a9a9a;
}

body.light-mode .auth-field input:focus {
    border-bottom-color: #ff6e2e;
}

body.light-mode .auth-password-toggle {
    color: rgba(0,0,0,0.5);
}

body.light-mode .auth-password-toggle:hover,
body.light-mode .auth-password-toggle:focus-visible {
    color: #0b0b0b;
}

body.light-mode .auth-eye::after {
    box-shadow: 0 0 0 2px #fcfcfc;
}

body.light-mode .auth-login-checkbox {
    color: rgba(0,0,0,0.72);
}

body.light-mode .auth-login-checkmark {
    border-color: rgba(0,0,0,0.3);
}

body.light-mode .auth-field textarea:focus {
    border-bottom-color: #ff6e2e;
}

body.light-mode .auth-field.is-required-missing input,
body.light-mode .auth-field.is-required-missing textarea {
    border-bottom-color: #ff6e2e;
}

body.light-mode .auth-field.is-required-missing .auth-inline-btn {
    border-color: #ff6e2e;
    color: #ff6e2e;
}

body.light-mode .auth-consent-label {
    color: rgba(0,0,0,0.78);
}

body.light-mode .auth-consent-toggle {
    background: transparent;
}

body.light-mode .auth-consent-toggle::before {
    border-top-color: #ff6e2e;
}

body.light-mode .auth-consent-toggle[aria-expanded="true"]::before {
    border-top-color: #ff6e2e;
}

body.light-mode .auth-consent-checkmark {
    border-color: rgba(0,0,0,0.3);
}

body.light-mode .auth-terms-box {
    background: rgba(0,0,0,0.025);
    color: rgba(0,0,0,0.54);
    scrollbar-color: rgba(0,0,0,0.24) rgba(0,0,0,0.04);
}

body.light-mode .auth-terms-box.is-open {
    border-color: rgba(0,0,0,0.12);
}

body.light-mode .auth-terms-box h3,
body.light-mode .auth-terms-box .auth-term-heading {
    color: rgba(0,0,0,0.62);
}

body.light-mode .auth-terms-box::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.04);
}

body.light-mode .auth-terms-box::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.24);
    border-color: rgba(0,0,0,0.04);
}

body.light-mode .auth-terms-box::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.36);
}

body.light-mode .auth-field input:-webkit-autofill,
body.light-mode .auth-field input:-webkit-autofill:hover,
body.light-mode .auth-field input:-webkit-autofill:focus,
body.light-mode .auth-field input:-webkit-autofill:active {
    -webkit-text-fill-color: #111 !important;
    caret-color: #111;
    border-bottom-color: rgba(0,0,0,0.22);
    box-shadow: 0 0 0 1000px #fcfcfc inset !important;
    -webkit-box-shadow: 0 0 0 1000px #fcfcfc inset !important;
}

body.light-mode .auth-field input:-webkit-autofill:focus {
    border-bottom-color: #ff6e2e;
}

body.light-mode .auth-type-option {
    color: rgba(0,0,0,0.48);
    border-color: rgba(0,0,0,0.18);
}

body.light-mode .auth-type-option:hover {
    color: rgba(0,0,0,0.85);
}

body.light-mode .auth-type-option:has(input:checked) {
    color: #fff;
    background: #ff6e2e;
    border-color: #ff6e2e;
}

body.light-mode .auth-type-option input:checked + span {
    color: #fff !important;
}

body.light-mode .auth-split-input span {
    color: rgba(0,0,0,0.48);
}

body.light-mode .auth-inline-btn,
body.light-mode .auth-file-label {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.14);
    color: #666;
}

body.light-mode .auth-inline-btn:hover,
body.light-mode .auth-file-label:hover,
body.light-mode .auth-file-label.file-selected {
    border-color: rgba(0,0,0,0.32);
    color: #111;
}

body.light-mode .auth-file-label.file-selected {
    border-color: #111;
}

body.light-mode .auth-file-clear {
    background: #fcfcfc;
    border-color: #111;
    color: #111;
}

body.light-mode .auth-footer-links {
    color: #777;
}

body.light-mode .auth-footer-links a {
    color: rgba(0,0,0,0.62);
}

body.light-mode .auth-footer-links a:hover {
    color: #111;
}

body.light-mode.page-login .auth-footer-links a,
body.light-mode.page-signup .auth-footer-links a,
body.light-mode.page-signup .auth-success-link {
    color: #ff6e2e;
}

body.light-mode.page-login .auth-footer-links a:hover,
body.light-mode.page-signup .auth-footer-links a:hover,
body.light-mode.page-signup .auth-success-link:hover {
    color: #ff6e2e;
}

body.light-mode.page-login .auth-login-links a {
    color: #fff;
}

body.light-mode.page-login .auth-login-links a:hover {
    color: rgba(255,255,255,0.72);
}

body.page-recovery .auth-login-links .auth-recovery-signup-link,
body.light-mode.page-login.page-recovery .auth-login-links .auth-recovery-signup-link {
    color: #ff6e2e;
}

body.page-recovery .auth-login-links .auth-recovery-signup-link:hover,
body.light-mode.page-login.page-recovery .auth-login-links .auth-recovery-signup-link:hover {
    color: #ff6e2e;
    opacity: 0.72;
}

body.light-mode .auth-error {
    background: rgba(255, 110, 46,0.08);
    border-color: rgba(255, 110, 46,0.25);
    color: #ff6e2e;
}

body.light-mode .auth-success {
    background: rgba(34,170,86,0.08);
    border-color: rgba(34,170,86,0.24);
    color: #16834a;
}

body.light-mode .auth-success-link {
    color: #16834a;
}

body.light-mode .auth-success-card {
    border-color: rgba(0,0,0,0.12);
    background: rgba(0,0,0,0.025);
}

body.light-mode .auth-success-icon {
    border-color: rgba(255, 110, 46,0.72);
    background: rgba(255, 110, 46,0.08);
}

body.light-mode .auth-success-card strong {
    color: #111;
}

/* ----------------------------------------------------------------
   Mobile
---------------------------------------------------------------- */
@media (max-width: 640px) {
    .auth-header p { font-size: 15px; }
}

@media (max-width: 600px) {
    .auth-back { top: 20px; left: 20px; }
    .auth-header h1 { font-size: 32px; }
    .auth-header p { font-size: 15px; }
}

/* Mobile auth pages: keep the footer below the form, not over it. */
@media (max-width: 900px) {
    body.page-login,
    body.page-recovery,
    body.page-signup {
        min-height: 100svh !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    body.page-login .auth-main,
    body.page-recovery .auth-main {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        min-height: calc(100svh - var(--site-header-h, 70px)) !important;
        padding: calc(var(--site-header-h, 70px) + clamp(42px, 7svh, 72px)) clamp(18px, 5vw, 28px) clamp(58px, 8svh, 88px) !important;
        overflow: visible !important;
        justify-content: center !important;
    }

    body.page-login .auth-main ~ .page-footer,
    body.page-recovery .auth-main ~ .page-footer,
    body.page-signup .page-footer {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        margin-top: 0 !important;
        z-index: 1 !important;
    }

    body.page-login .auth-container--login,
    body.page-recovery .auth-container--login {
        margin: 0 auto !important;
    }

    body.page-signup .auth-field-row--username {
        width: 100% !important;
        max-width: 100% !important;
    }

    body.page-signup #username {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
    }

    body.page-signup .auth-input-row {
        width: 100% !important;
        min-width: 0 !important;
    }

    body.page-signup .auth-input-group {
        min-width: 0 !important;
    }

    body.page-signup #btn-check-username {
        flex: 0 0 auto !important;
    }

    body.page-signup .auth-field--textarea textarea {
        min-height: 130px;
    }
}
