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

html {
    font-size: 16px;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Noto Sans KR", sans-serif;
    color: #111827;
    background: #f5f7fb;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-0.625rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.28s ease-in-out;
}

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

.auth-container {
    width: 100%;
    max-width: 42rem; /* 로그인보다 조금 큰 정도 */
}

.auth-card {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 1.125rem 2.5rem rgba(15, 23, 42, 0.08);
    padding: 1.75rem;
}

.auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 9999px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.auth-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-title {
    margin: 0;
    font-size: 1.875rem;
    line-height: 1.1;
    font-weight: 800;
    color: #111827;
}

.auth-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: #475569;
}

.auth-description {
    margin: 0;
    font-size: 0.9rem;
    color: #b91c1c;
}

.alert {
    border-radius: 0.75rem;
    padding: 0.75rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.auth-form {
    display: grid;
    gap: 1.25rem;
}

.form-section {
    display: grid;
    gap: 0.75rem;
}

.form-section-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 800;
    color: #111827;
}

.form-grid {
    display: grid;
    gap: 1rem 1rem;
}

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

.form-field {
    display: grid;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1f2937;
}

.required-mark {
    color: #ef4444;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid #dbe2ea;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: #111827;
    background: #f8fafc;
    outline: none;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}

.form-input,
.form-select {
    min-height: 3.125rem;
    padding: 0.75rem 0.875rem;
}

.form-textarea {
    min-height: 6rem;
    padding: 0.75rem 0.875rem;
    resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #94a3b8;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 0.1875rem rgba(37, 99, 235, 0.10);
}

.password-input-wrap {
    position: relative;
}

.form-input-password {
    padding-right: 3rem;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    padding: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.password-toggle-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
    object-fit: contain;
    opacity: 0.72;
    transition: opacity 0.15s ease;
}

.password-toggle-btn:hover .password-toggle-icon,
.password-toggle-btn:focus-visible .password-toggle-icon {
    opacity: 1;
}

.auth-submit-btn {
    width: 100%;
    min-height: 3rem;
    border: 0;
    border-radius: 0.75rem;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.auth-submit-btn:hover {
    background: #1d4ed8;
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-help-text {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

.auth-inline-link {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

.auth-inline-link:hover,
.auth-inline-link:focus-visible {
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 0.875rem;
    font-size: 0.75rem;
    color: #64748b;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
}

@media (max-width: 48rem) {
    .auth-page {
        padding: 1rem 0.75rem;
    }

    .auth-card {
        padding: 1.5rem 1.25rem;
    }

    .auth-title {
        font-size: 1.625rem;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 30rem) {
    html {
        font-size: 15px;
    }

    .auth-card {
        padding: 1.25rem 1rem;
        border-radius: 0.875rem;
    }

    .auth-title {
        font-size: 1.4375rem;
    }

    .auth-logo {
        width: 3.75rem;
        height: 3.75rem;
    }
}