/* 웹메일 로그인 페이지 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', Roboto, Arial, sans-serif;
    background-color: #f8fafc;
    color: #0f172a;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    position: relative;
}

/* ===== 좌측 브랜드 패널 ===== */

.login-brand {
    background-color: #1e293b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    overflow: hidden;
}

.login-brand-inner {
    max-width: 420px;
}

.login-brand-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #cbd5e1;
    margin-bottom: 24px;
}

.login-brand-title {
    margin-bottom: 12px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.login-brand-copy {
    margin-bottom: 28px;
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
}

.login-brand-features {
    list-style: none;
    margin-bottom: 36px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-brand-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.86);
}

.login-brand-features i {
    color: #94a3b8;
    font-size: 11px;
}

.login-brand-foot {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.46);
}

/* ===== 우측 로그인 카드 ===== */

.login-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 32px 28px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.10);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-card-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.login-card-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1e293b;
}

.login-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.login-card-subtitle {
    font-size: 13px;
    color: #475569;
}

/* 알림 컨테이너는 레이아웃에서 제외하고 알림 자체를 카드의 flex 자식으로 만든다
   (비어 있을 때 gap 이 중복으로 생기는 것을 방지) */
#alertArea {
    display: contents;
}

.login-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    border: 1px solid transparent;
}

.login-alert.is-danger {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.18);
}

.login-alert.is-success {
    background-color: #f0fdf4;
    color: #16a34a;
    border-color: rgba(22, 163, 74, 0.18);
}

.login-alert.is-warning {
    background-color: #fffbeb;
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.18);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.form-group label .required {
    color: #dc2626;
    margin-left: 2px;
}

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

.input-wrapper > i {
    position: absolute;
    left: 12px;
    font-size: 12px;
    color: #94a3b8;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 36px;
    font-size: 14px;
    color: #0f172a;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input-wrapper input::placeholder {
    color: #94a3b8;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #1e293b;
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.12);
}

.input-wrapper input:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.input-wrapper:focus-within > i {
    color: #1e293b;
}

.btn-login {
    width: 100%;
    height: 44px;
    margin-top: 4px;
    background-color: #1e293b;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.15s;
}

.btn-login:hover:not(:disabled) {
    background-color: #334155;
}

.btn-login:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

.login-card-foot {
    margin-top: 4px;
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
}

/* ===== 2차 인증(OTP) 단계 ===== */

.is-hidden {
    display: none !important;
}

.login-otp-input {
    width: 100%;
    height: 56px;
    padding: 0 14px;
    font-size: 22px;
    font-family: 'Courier New', monospace;
    letter-spacing: 6px;
    text-align: center;
    color: #0f172a;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-otp-input:focus {
    outline: none;
    border-color: #1e293b;
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.12);
}

.login-otp-input::placeholder {
    color: #94a3b8;
    letter-spacing: 4px;
    font-family: inherit;
}

.login-otp-hint {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    margin: -2px 0 16px;
}

.login-otp-link-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
}

.login-otp-link {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 12px;
    color: #475569;
    text-decoration: underline;
    cursor: pointer;
}

.login-otp-link:hover {
    color: #1e293b;
}

/* ===== 개발 모드 배지 ===== */

.dev-mode-badge {
    position: fixed;
    top: 16px;
    right: 16px;
    background-color: #f59e0b;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 100;
}

/* ===== 단일 카드 페이지 (비밀번호 변경) — login.css 를 공유한다 ===== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 32px 28px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.10);
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.login-subtitle {
    font-size: 13px;
    color: #475569;
    margin-bottom: 24px;
}

.login-box .form-group {
    margin-bottom: 16px;
}

.login-box .form-group > input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    font-size: 14px;
    color: #0f172a;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-box .form-group > input::placeholder {
    color: #94a3b8;
}

.login-box .form-group > input:focus {
    outline: none;
    border-color: #1e293b;
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.12);
}

.alert {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    border: 1px solid transparent;
}

.alert-error {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.18);
}

.alert-info {
    background-color: #f0fdf4;
    color: #16a34a;
    border-color: rgba(22, 163, 74, 0.18);
}

/* ===== 반응형 ===== */

@media (max-width: 920px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-main,
    .login-container {
        padding: 24px 16px;
    }

    .login-card,
    .login-box {
        padding: 24px 20px;
    }

    .login-card-title {
        font-size: 20px;
    }
}
