/* Puzzle ERP authentication form styles. Scope is limited to account/auth pages. */

body.pz-auth-page {
    margin: 0;
    min-width: 320px;
    background: #f6f7fb;
}

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

.pz-auth {
    --pz-canvas: #ffffff;
    --pz-bg: #f6f7fb;
    --pz-surface-soft: #f8fafc;
    --pz-surface-strong: #e5e7eb;
    --pz-ink: #111827;
    --pz-ink-strong: #0f172a;
    --pz-body: #374151;
    --pz-muted: #6b7280;
    --pz-line: #dfe3eb;
    --pz-line-strong: #b8c0cc;
    --pz-primary: #111827;
    --pz-primary-active: #0b1120;
    --pz-on-primary: #ffffff;
    --pz-link: #1d4ed8;
    --pz-link-active: #1e3a8a;
    --pz-info: #1d4ed8;
    --pz-radius-sm: 6px;
    --pz-radius-md: 8px;
    --pz-radius-lg: 12px;
    --pz-shadow-card: 0 1px 2px rgba(15, 23, 42, 0.05);

    min-height: 100vh;
    color: var(--pz-body);
    background: var(--pz-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    word-break: keep-all;
}

.pz-auth a {
    color: inherit;
    text-decoration: none;
}

.pz-auth a:focus-visible,
.pz-auth button:focus-visible,
.pz-auth input:focus-visible {
    outline: 2px solid var(--pz-link);
    outline-offset: 2px;
}

.pz-auth img,
.pz-auth svg {
    display: block;
}

.pz-auth-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.pz-auth-panel {
    width: min(100%, 408px);
    padding: 32px;
    border: 1px solid var(--pz-line);
    border-radius: var(--pz-radius-lg);
    background: var(--pz-canvas);
    box-shadow: var(--pz-shadow-card);
}

.pz-auth-panel-head {
    margin-bottom: 26px;
    text-align: center;
}

.pz-auth-panel-logo {
    display: inline-flex;
    justify-content: center;
    margin-bottom: 18px;
}

.pz-auth-panel-logo img {
    width: 118px;
    height: auto;
}

.pz-auth-panel h2 {
    margin: 0;
    color: var(--pz-ink-strong);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.35;
}

.pz-auth-panel h1 {
    margin: 0;
    color: var(--pz-ink-strong);
    font-size: 28px;
    font-weight: 750;
    letter-spacing: 0;
    line-height: 1.22;
}

.pz-auth-panel-head p {
    margin: 8px 0 0;
    color: var(--pz-muted);
    font-size: 15px;
    line-height: 1.55;
}

.pz-auth-form {
    margin: 0;
}

.pz-auth-field {
    margin-bottom: 18px;
}

.pz-auth-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--pz-ink);
    font-size: 14px;
    font-weight: 700;
}

.pz-auth-input-wrap {
    position: relative;
}

.pz-auth-input-wrap input {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 44px;
    border: 1px solid var(--pz-line);
    border-radius: var(--pz-radius-md);
    background: var(--pz-surface-soft);
    color: var(--pz-ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pz-auth-input-wrap input::placeholder {
    color: var(--pz-muted);
    font-weight: 500;
}

.pz-auth-input-wrap input:focus {
    border-color: var(--pz-info);
    background: var(--pz-canvas);
}

.pz-auth-input-icon,
.pz-auth-icon-button {
    position: absolute;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transform: translateY(-50%);
    color: var(--pz-muted);
}

.pz-auth-input-icon {
    left: 5px;
    pointer-events: none;
}

.pz-auth-input-icon svg,
.pz-auth-icon-button svg,
.pz-auth-links svg {
    width: 18px;
    height: 18px;
}

.pz-auth-icon-button {
    right: 5px;
    padding: 0;
    border: 0;
    border-radius: var(--pz-radius-sm);
    background: transparent;
    cursor: pointer;
}

.pz-auth-icon-button:hover {
    color: var(--pz-ink);
    background: var(--pz-surface-strong);
}

.pz-auth-icon-button .pz-auth-eye-off,
.pz-auth-icon-button[aria-pressed="true"] .pz-auth-eye-on {
    display: none;
}

.pz-auth-icon-button[aria-pressed="true"] .pz-auth-eye-off {
    display: block;
}

.pz-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 22px;
}

.pz-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    color: var(--pz-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.pz-auth-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--pz-primary);
}

.pz-auth-options a {
    color: var(--pz-link);
    font-size: 14px;
    font-weight: 700;
}

.pz-auth-options a:hover {
    color: var(--pz-link-active);
    text-decoration: underline;
}

.pz-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid var(--pz-primary);
    border-radius: var(--pz-radius-md);
    background: var(--pz-primary);
    color: var(--pz-on-primary);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pz-auth-submit:hover {
    border-color: var(--pz-primary-active);
    background: var(--pz-primary-active);
}

.pz-auth-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--pz-line);
}

.pz-auth-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--pz-line);
    border-radius: var(--pz-radius-md);
    background: var(--pz-canvas);
    color: var(--pz-ink);
    font-size: 14px;
    font-weight: 700;
}

.pz-auth-links a:hover {
    border-color: var(--pz-line-strong);
    background: var(--pz-surface-soft);
}

.pz-auth-return {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    padding: 0 12px;
    border: 1px solid var(--pz-line);
    border-radius: var(--pz-radius-md);
    background: var(--pz-surface-soft);
    color: var(--pz-muted);
    font-size: 14px;
    font-weight: 700;
}

.pz-auth-return:hover {
    border-color: var(--pz-line-strong);
    background: var(--pz-canvas);
    color: var(--pz-ink);
}

.pz-auth-shell--recover {
    align-items: flex-start;
    padding-top: 54px;
}

.pz-auth-panel--recover {
    position: relative;
    width: min(100%, 440px);
}

.pz-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    margin-bottom: 22px;
    color: var(--pz-muted);
    font-size: 14px;
    font-weight: 700;
}

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

.pz-auth-back svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.pz-auth-panel-head--recover {
    margin-bottom: 22px;
    text-align: left;
}

.pz-auth-panel-head--recover .pz-auth-panel-logo {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 22px;
}

.pz-auth-panel-head--recover .pz-auth-panel-logo img {
    width: 152px;
    max-width: 152px;
}

.pz-auth-kicker {
    margin: 0 0 8px !important;
    color: var(--pz-link) !important;
    font-size: 13px !important;
    font-weight: 800;
    line-height: 1.4 !important;
}

.pz-auth-note {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #bfdbfe;
    border-radius: var(--pz-radius-md);
    background: #eff6ff;
}

.pz-auth-note-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--pz-radius-md);
    background: var(--pz-canvas);
    color: var(--pz-link);
}

.pz-auth-note-icon svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}

.pz-auth-panel--recover svg {
    max-width: 24px;
    max-height: 24px;
}

.pz-auth-panel--recover .pz-auth-panel-logo img {
    max-width: 152px;
}

.pz-auth-panel--recover .pz-auth-input-icon svg,
.pz-auth-panel--recover .pz-auth-links svg {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
}

.pz-auth-note strong {
    display: block;
    color: var(--pz-link-active);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
}

.pz-auth-note p {
    margin: 4px 0 0;
    color: #315a9f;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.55;
}

.pz-auth-submit--recover {
    margin-top: 4px;
}

.pz-auth-alert {
    margin-bottom: 18px;
    padding: 13px 14px;
    border: 1px solid #fecaca;
    border-radius: var(--pz-radius-md);
    background: #fef2f2;
    color: var(--pz-danger);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.pz-auth-panel--result {
    width: min(100%, 468px);
}

.pz-auth-result-head {
    text-align: center;
}

.pz-auth-result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border: 1px solid #bbf7d0;
    border-radius: var(--pz-radius-lg);
    background: #f0fdf4;
    color: var(--pz-success);
}

.pz-auth-result-icon svg {
    width: 22px;
    height: 22px;
}

.pz-auth-result-card {
    margin: 24px 0;
    padding: 22px;
    border: 1px solid var(--pz-line);
    border-radius: var(--pz-radius-lg);
    background: var(--pz-surface-soft);
}

.pz-auth-result-card--success {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.pz-auth-result-card--not-found,
.pz-auth-result-card--empty {
    border-color: #fed7aa;
    background: #fff7ed;
}

.pz-auth-result-label {
    display: block;
    margin-bottom: 8px;
    color: var(--pz-muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.pz-auth-result-card strong {
    display: block;
    color: var(--pz-ink-strong);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    word-break: break-all;
}

.pz-auth-result-card p {
    margin: 10px 0 0;
    color: var(--pz-body);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
}

.pz-auth-result-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 22px;
}

.pz-auth-result-actions .pz-auth-submit,
.pz-auth-result-actions .pz-auth-return {
    margin: 0;
}

.pz-auth-result-help {
    padding-top: 22px;
    border-top: 1px solid var(--pz-line);
}

.pz-auth-result-help strong {
    display: block;
    margin-bottom: 12px;
    color: var(--pz-ink);
    font-size: 14px;
    font-weight: 800;
}

.pz-auth-result-help ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pz-auth-result-help li {
    position: relative;
    padding-left: 14px;
    color: var(--pz-muted);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.65;
}

.pz-auth-result-help li + li {
    margin-top: 6px;
}

.pz-auth-result-help li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.76em;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: var(--pz-line-strong);
}

.pz-auth-shell--join {
    align-items: flex-start;
    padding: 44px 20px;
}

.pz-auth-panel--join {
    width: min(100%, 520px);
}

.pz-auth-section {
    padding-top: 24px;
    border-top: 1px solid var(--pz-line);
}

.pz-auth-panel-head + .pz-auth-form .pz-auth-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.pz-auth-section + .pz-auth-section {
    margin-top: 24px;
}

.pz-auth-section-title {
    margin: 0 0 18px;
    color: var(--pz-ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.pz-auth-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.pz-auth-section-head .pz-auth-section-title {
    margin-bottom: 0;
}

.pz-auth-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 8px;
    align-items: end;
}

.pz-auth-inline-button,
.pz-auth-text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--pz-line);
    border-radius: var(--pz-radius-md);
    background: var(--pz-canvas);
    color: var(--pz-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pz-auth-inline-button {
    background: var(--pz-primary);
    border-color: var(--pz-primary);
    color: var(--pz-on-primary);
}

.pz-auth-inline-button:hover {
    background: var(--pz-primary-active);
    border-color: var(--pz-primary-active);
}

.pz-auth-inline-button:disabled {
    cursor: default;
    border-color: var(--pz-line);
    background: var(--pz-surface-strong);
    color: var(--pz-muted);
}

.pz-auth-text-button {
    min-height: 34px;
    padding: 0 10px;
    border-color: transparent;
    background: transparent;
    color: var(--pz-link);
}

.pz-auth-text-button:hover {
    background: var(--pz-surface-soft);
    color: var(--pz-link-active);
}

.pz-auth-input-wrap--captcha input {
    padding-right: 120px;
}

.pz-auth-captcha-chip {
    position: absolute;
    right: 6px;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 106px;
    height: 34px;
    padding: 0 6px;
    border: 1px solid var(--pz-line);
    border-radius: var(--pz-radius-sm);
    background: var(--pz-canvas);
    transform: translateY(-50%);
    cursor: pointer;
}

.pz-auth-captcha-chip:hover {
    border-color: var(--pz-line-strong);
}

.pz-auth-captcha-chip img {
    max-width: 92px;
    max-height: 26px;
    object-fit: contain;
}

.pz-auth-agreements {
    border: 1px solid var(--pz-line);
    border-radius: var(--pz-radius-lg);
    background: var(--pz-canvas);
    overflow: hidden;
}

.pz-auth-agreement {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--pz-line);
}

.pz-auth-agreement:last-child {
    border-bottom: 0;
}

.pz-auth-agreement .pz-auth-check {
    flex: 1 1 auto;
    min-width: 0;
}

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

.pz-auth-submit--join {
    margin-top: 24px;
}

.pz-auth-alt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    color: var(--pz-muted);
    font-size: 14px;
    font-weight: 600;
}

.pz-auth-alt a {
    color: var(--pz-link);
    font-weight: 700;
}

.pz-auth-alt a:hover {
    color: var(--pz-link-active);
    text-decoration: underline;
}

.pz-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.42);
}

.pz-auth-modal.active {
    display: flex;
}

.pz-auth-modal-content {
    display: flex;
    flex-direction: column;
    width: min(100%, 720px);
    max-height: min(760px, calc(100vh - 48px));
    border: 1px solid var(--pz-line);
    border-radius: var(--pz-radius-lg);
    background: var(--pz-canvas);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.pz-auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--pz-line);
}

.pz-auth-modal-header h2 {
    margin: 0;
    color: var(--pz-ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.pz-auth-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--pz-line);
    border-radius: var(--pz-radius-md);
    background: var(--pz-canvas);
    color: var(--pz-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.pz-auth-modal-close:hover {
    border-color: var(--pz-line-strong);
    color: var(--pz-ink);
}

.pz-auth-modal-body {
    min-height: 420px;
    background: var(--pz-surface-soft);
}

.pz-auth-modal-iframe {
    display: block;
    width: 100%;
    height: min(640px, calc(100vh - 144px));
    border: 0;
    background: var(--pz-canvas);
}

@media (max-width: 479px) {
    .pz-auth-shell {
        align-items: flex-start;
        padding: 28px 16px;
    }

    .pz-auth-panel {
        padding: 24px 20px;
    }

    .pz-auth-shell--recover {
        padding-top: 28px;
    }

    .pz-auth-panel h1 {
        font-size: 25px;
    }

    .pz-auth-note {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pz-auth-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .pz-auth-links {
        grid-template-columns: 1fr;
    }

    .pz-auth-shell--join {
        padding: 28px 16px;
    }

    .pz-auth-inline {
        grid-template-columns: 1fr;
    }

    .pz-auth-inline-button {
        width: 100%;
    }

    .pz-auth-agreement {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .pz-auth-text-button {
        align-self: flex-start;
    }

    .pz-auth-alt {
        flex-wrap: wrap;
    }

    .pz-auth-modal {
        padding: 16px;
    }
}
