*,
*::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;
}

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

.login-container {
    width: 100%;
    max-width: 27.5rem;
}

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

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

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

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

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

.login-subtitle {
    margin: 0;
    font-size: 0.8125rem;
    color: #4b5563;
}

.login-description {
    margin: 0.125rem 0 0;
    font-size: 0.8125rem;
    color: #6b7280;
}

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

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

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

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 0.875rem;
    transform: translateY(-50%);
    width: 1.125rem;
    height: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.input-icon-img {
    width: 1.125rem;
    height: 1.125rem;
    display: block;
    object-fit: contain;
    opacity: 0.72;
}

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

.form-input::placeholder {
    color: #9ca3af;
}

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

.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: 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.78;
    transition: opacity 0.15s ease;
}

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

.form-options {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: -0.125rem;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    cursor: pointer;
}

.checkbox-text {
    font-size: 0.8125rem;
    color: #374151;
}

.login-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;
}

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

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

.login-submit-btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.account-links {
    margin-top: 0.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.account-link {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.15s ease;
}

.account-link:hover,
.account-link:focus-visible {
    color: #2563eb;
    text-decoration: underline;
}

.account-link-register {
    font-weight: 700;
    color: #2563eb;
}

.account-link-divider {
    color: #cbd5e1;
}

.login-footer {
    text-align: center;
    margin-top: 0.875rem;
    font-size: 0.75rem;
    color: #4b5563;
}

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: 30rem) {
    html {
        font-size: 15px;
    }

    .login-page {
        padding: 1rem;
    }

    .login-card {
        padding: 1.5rem 1.25rem;
        border-radius: 0.875rem;
    }

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

    .account-links {
        gap: 0.375rem;
    }
}

.alert {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    width: 100%;
    margin: 0 0 1rem;
    padding: 0.7rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}