@charset "UTF-8";

/* ==========================================================================
   520KOREA Member Authentication Module (login, register, find, logout)
   Edge-to-Edge Full-Bleed Split Layout (Fixed Left Panel & Unboxed Right Panel)
   ========================================================================== */

/* 1. Hide default application chrome (sidebar, mobile header, bottom nav, footers) */
body.member-auth-body :is(.app-sidebar, .app-mobile-header, .app-mobile-nav, .ui-skip, #app-more-menu, .app-company, .app-company--mobile, .ed-header) {
    display: none !important;
}

body.member-auth-body {
    overflow-x: hidden !important;
    background: var(--app-surface, #ffffff) !important;
}

body.member-auth-body .app-workspace {
    margin-left: 0 !important;
    width: 100% !important;
    min-height: 100vh !important;
    background: var(--app-surface, #ffffff) !important;
}

body.member-auth-body .app-main {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    min-height: 100vh !important;
}

/* 2. Full-Bleed Split Screen Container */
.member-auth-screen {
    display: flex;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
}

/* 3. Left Panel (Extends to browser edge with light gray background, fixed vertical position) */
.member-split-left {
    flex: 0 0 46%;
    width: 46%;
    min-width: 400px;
    max-width: 600px;
    background: var(--app-soft, #f7f8fa);
    border-right: 1px solid var(--app-line, #eaedf1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px 48px 48px 56px;
    box-sizing: border-box;
    position: relative;
}

/* Actual Logo Styling */
.member-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    font-size: 26px;
    font-weight: 850;
    letter-spacing: -0.04em;
    color: var(--app-ink, #0f172a);
    transition: opacity 0.15s ease;
    margin-bottom: 56px;
}

.member-brand-link:hover {
    opacity: 0.85;
}

.member-brand-link .app-logo-set {
    display: inline-flex;
    align-items: center;
}

.member-brand-link .app-logo-image {
    height: 38px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.member-brand-link .app-logo--light {
    display: block !important;
}

.member-brand-link .app-logo--dark {
    display: none !important;
}

:root[data-theme="dark"] .member-brand-link .app-logo--light,
html[data-theme="dark"] .member-brand-link .app-logo--light,
body.theme-dark .member-brand-link .app-logo--light {
    display: none !important;
}

:root[data-theme="dark"] .member-brand-link .app-logo--dark,
html[data-theme="dark"] .member-brand-link .app-logo--dark,
body.theme-dark .member-brand-link .app-logo--dark {
    display: block !important;
}

.member-brand-link .brand-mark {
    color: var(--app-accent, #3b82f6);
}

.member-brand-link .brand-dot {
    width: 6px;
    height: 6px;
    background: var(--app-accent, #3b82f6);
    border-radius: 50%;
    display: inline-block;
    margin-left: 1px;
}

/* Left Hero Typography (Fixed vertical position across all pages) */
.member-hero-body {
    display: flex;
    flex-direction: column;
}

.member-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--app-accent, #3b82f6);
    margin-bottom: 20px;
}

.member-hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--app-accent, #3b82f6);
    border-radius: 50%;
}

.member-hero-title {
    font-size: 38px;
    font-weight: 850;
    line-height: 1.25;
    letter-spacing: -0.04em;
    color: var(--app-ink, #0f172a);
    margin: 0 0 16px;
}

.member-hero-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--app-muted, #64748b);
    margin: 0 0 40px;
    max-width: 400px;
    word-break: keep-all;
}

.member-hero-features {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.member-hero-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--app-ink, #1e293b);
}

.member-hero-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--app-surface, #ffffff);
    border: 1px solid var(--app-line, #eaedf1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--app-ink, #0f172a);
}

.member-hero-feature-icon .ui-icon {
    width: 18px;
    height: 18px;
}

.member-split-left-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    font-size: 12px;
    color: var(--app-muted, #94a3b8);
}

/* 4. Right Panel (Unboxed, Open Canvas) */
.member-split-right {
    flex: 1 1 54%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--app-surface, #ffffff);
    box-sizing: border-box;
}

/* Top Action Header */
.member-right-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    padding: 36px 48px 16px;
    box-sizing: border-box;
}

.member-quick-switch {
    font-size: 13.5px;
    font-weight: 650;
    color: var(--app-muted, #475569);
    text-decoration: none;
    transition: color 0.15s ease;
}

.member-quick-switch:hover {
    color: var(--app-ink, #0f172a);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.member-lang-bar {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: var(--app-soft, #f1f5f9);
    padding: 3px 4px;
    border-radius: 8px;
}

.member-lang-btn {
    font-size: 11.5px;
    color: var(--app-muted, #64748b);
    text-decoration: none;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
    font-weight: 600;
}

.member-lang-btn:hover {
    color: var(--app-ink, #0f172a);
}

.member-lang-btn.is-active {
    color: var(--app-ink, #0f172a);
    background: var(--app-surface, #ffffff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Form Container inside Right Panel */
.member-right-body {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 48px 64px;
    box-sizing: border-box;
}

.member-form-content {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.member-form-content--wide {
    max-width: 500px;
}

/* Form Header */
.member-header {
    text-align: left;
    margin-bottom: 28px;
}

.member-header .member-title {
    font-size: 28px;
    font-weight: 850;
    color: var(--app-ink, #0f172a);
    margin: 0 0 8px;
    letter-spacing: -0.03em;
}

.member-header .member-desc {
    font-size: 14.5px;
    color: var(--app-muted, #64748b);
    margin: 0;
    line-height: 1.5;
}

/* Alerts */
.member-alert {
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 22px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

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

.member-alert--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.member-alert[hidden] {
    display: none !important;
}

/* Tabs */
.member-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: var(--app-soft, #f1f5f9);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 28px;
}

.member-tab-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 650;
    color: var(--app-muted, #64748b);
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.18s ease;
}

.member-tab-item.is-active {
    background: var(--app-surface, #ffffff);
    color: var(--app-ink, #0f172a);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Grid for desktop multi-field rows */
.member-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 520px) {
    .member-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Form Groups & Inputs */
.member-form-group {
    margin-bottom: 18px;
    position: relative;
}

.member-form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    font-weight: 650;
    color: var(--app-muted, #475569);
    margin-bottom: 7px;
    letter-spacing: -0.01em;
}

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

.member-input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: 1.5px solid var(--app-border, #e2e8f0);
    border-radius: 12px;
    font-size: 14.5px;
    color: var(--app-ink, #0f172a);
    background: var(--app-surface, #ffffff);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    outline: none;
    box-sizing: border-box;
}

.member-input-wrapper.has-btn .member-input {
    padding-right: 48px;
}

.member-input:focus {
    border-color: #94a3b8;
    background: var(--app-surface, #ffffff);
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.12);
    outline: none;
}

.member-input.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.member-input.is-valid {
    border-color: #22c55e;
}

.member-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--app-muted, #94a3b8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.member-toggle-pw:hover {
    color: var(--app-ink, #0f172a);
}

.member-form-feedback {
    font-size: 11.5px;
    margin-top: 6px;
    min-height: 16px;
    line-height: 1.4;
    transition: all 0.15s ease;
}

.member-form-feedback.is-error {
    color: #ef4444;
}

.member-form-feedback.is-success {
    color: #16a34a;
}

/* Options & Checkbox */
.member-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0 24px;
    font-size: 13.5px;
}

.member-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: var(--app-muted, #475569);
    font-size: 13px;
}

.member-checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--app-ink, #0f172a);
    cursor: pointer;
}

.member-link {
    color: var(--app-muted, #64748b);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.15s ease;
}

.member-link:hover {
    color: var(--app-ink, #0f172a);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Submit Button */
.member-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    border-radius: 12px;
    font-size: 15.5px;
    font-weight: 750;
    cursor: pointer;
    border: none;
    transition: all 0.18s ease;
    text-decoration: none;
    position: relative;
    box-sizing: border-box;
}

.member-btn--primary {
    background: var(--app-ink, #0f172a);
    color: #ffffff;
}

.member-btn--primary:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}

.member-btn--primary:active:not(:disabled) {
    transform: translateY(0);
}

.member-btn:disabled,
.member-btn.is-loading {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.member-btn .btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: member-spin 0.6s linear infinite;
    display: none;
    position: absolute;
}

.member-btn.is-loading .btn-text {
    visibility: hidden;
}

.member-btn.is-loading .btn-spinner {
    display: block;
}

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

/* Footer Link */
.member-footer-nav {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--app-line, #f1f5f9);
    text-align: center;
    font-size: 13.5px;
    color: var(--app-muted, #64748b);
}

.member-footer-nav a {
    color: var(--app-ink, #0f172a);
    font-weight: 750;
    text-decoration: none;
    margin-left: 6px;
}

.member-footer-nav a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Terms Box */
.member-terms-box {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--app-soft, #f8fafc);
    border: 1px solid var(--app-line, #e2e8f0);
    max-height: 90px;
    overflow-y: auto;
    font-size: 11.5px;
    color: var(--app-muted, #64748b);
    line-height: 1.6;
}

/* 5. Mobile & Tablet Responsiveness (< 960px) */
@media (max-width: 959px) {
    .member-auth-screen {
        flex-direction: column;
    }
    .member-split-left {
        flex: none;
        width: 100%;
        min-width: 0;
        max-width: none;
        padding: 32px 24px 24px;
        border-right: none;
        border-bottom: 1px solid var(--app-line, #eaedf1);
    }
    .member-brand-link {
        margin-bottom: 24px;
    }
    .member-hero-title {
        font-size: 26px;
    }
    .member-hero-desc {
        margin-bottom: 0;
        font-size: 14px;
    }
    .member-hero-features,
    .member-split-left-footer {
        display: none;
    }
    .member-split-right {
        flex: 1 0 auto;
        min-height: auto;
    }
    .member-right-header {
        padding: 20px 24px 8px;
    }
    .member-right-body {
        padding: 16px 24px 48px;
        align-items: flex-start;
    }
}

/* ==========================================================================
   Member Settings / Edit Profile Page (In-App)
   ========================================================================== */
.member-edit-wrapper {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    box-sizing: border-box;
}

.member-edit-card {
    background: var(--theme-surface, #ffffff);
    border: 1px solid var(--app-line, #eaedf1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

:root[data-theme="dark"] .member-edit-card,
body.theme-dark .member-edit-card {
    background: var(--theme-surface, #1e1e24);
    border-color: var(--app-line, #2c2c34);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.member-edit-card-title {
    font-size: calc(16px * var(--app-font-scale, 1));
    font-weight: 700;
    color: var(--app-ink, #111111);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-readonly-id {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--app-soft, #f7f8fa);
    border: 1px solid var(--app-line, #eaedf1);
    border-radius: 10px;
    font-weight: 600;
    color: var(--app-ink, #222222);
    font-size: calc(14px * var(--app-font-scale, 1));
}

:root[data-theme="dark"] .member-readonly-id,
body.theme-dark .member-readonly-id {
    background: var(--app-soft, #17171c);
    border-color: var(--app-line, #2a2a32);
    color: var(--app-ink, #f0f0f4);
}

.member-edit-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    align-items: center;
}

.member-edit-actions .p-button {
    flex: 1;
    height: 48px;
    font-size: calc(15px * var(--app-font-scale, 1));
    font-weight: 600;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.member-withdraw-box {
    margin-top: 32px;
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--app-soft, #f8f9fb);
    border: 1px dashed var(--app-line, #dce1e8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: calc(13px * var(--app-font-scale, 1));
    color: var(--app-muted, #767d86);
}

:root[data-theme="dark"] .member-withdraw-box,
body.theme-dark .member-withdraw-box {
    background: var(--app-soft, #16161a);
    border-color: var(--app-line, #2c2c36);
    color: var(--app-muted, #8b929e);
}

.member-withdraw-box a {
    color: var(--app-danger, #e53935);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
