/* 로그인 화면 — mmx-signin */
:root {
	--signin-bg: #212631;
	--signin-line: #373b45;
	--signin-panel: rgba(255, 255, 255, 0.04);
	--signin-text: #efefef;
	--signin-muted: #a6a8ac;
	--signin-field: #f7f7f7;
	--signin-field-text: #3b3b3b;
	--signin-btn-top: #63676e;
	--signin-btn-bottom: #4d515a;
	--signin-btn-hover-top: #797c83;
	--signin-radius: 20px;
}

html,
body.mmx-signin {
	height: 100%;
	margin: 0;
}

body.mmx-signin {
	display: flex;
	flex-direction: column;
	min-height: 100vh; /* 공통 styles.css 가 body 높이를 덮어써서 화면 높이로 고정 */
	height: auto;
	background: var(--signin-bg);
	color: var(--signin-text);
	font-size: 14px;
}

.mmx-signin__bar {
	position: relative;
	flex: 0 0 64px;
}

.mmx-signin__logo {
	position: absolute;
	top: var(--mmx-brand-login-logo-top, 12px);
	left: var(--mmx-brand-login-logo-left, 32px);
	height: var(--mmx-brand-login-logo-height, 44px);
}

/* 언어 선택(한/영) — 오른쪽 위 작은 알약. 선택값은 브라우저에 남는다 */
.mmx-signin__lang {
	position: absolute;
	top: 18px;
	right: 32px;
	display: inline-flex;
	padding: 2px;
	border: 1px solid var(--signin-line);
	border-radius: 13px;
	background: rgba(255, 255, 255, 0.03);
}

.mmx-signin__lang button {
	min-width: 36px;
	height: 22px;
	padding: 0 8px;
	border: 0;
	border-radius: 11px;
	background: transparent;
	color: var(--signin-muted);
	font-size: 11px;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition:
		background 0.15s,
		color 0.15s;
}

.mmx-signin__lang button:hover {
	color: var(--signin-text);
}

.mmx-signin__lang button.is-active {
	background: #4a78cc;
	color: #fff;
}

.mmx-signin__lang button:focus-visible {
	outline: 2px solid #5d8fe8;
	outline-offset: 1px;
}

.mmx-signin__stage {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
}

/* 두 단(4-3b) — 왼쪽 제품 안내 · 오른쪽 로그인 폼. 좁은 화면에서는 안내를 숨기고 한 단으로 */
.mmx-signin__grid {
	display: grid;
	grid-template-columns: minmax(380px, 520px) 400px;
	align-items: center;
	gap: 80px;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

.mmx-signin__col {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	width: 100%;
}

.mmx-signin__intro {
	align-self: center;
}

.mmx-signin__intro-brand {
	margin: 0 0 18px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.24em;
	color: #6fa3dc;
}

.mmx-signin__intro-title {
	margin: 0 0 14px;
	font-size: var(--mmx-brand-intro-title-size, 34px);
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--signin-text);
}

.mmx-signin__intro-lead {
	margin: 0 0 28px;
	font-size: 15px;
	line-height: 1.7;
	color: var(--signin-muted);
}

/* 모듈 타일 — 어도비 제품 아이콘처럼 색이 있는 둥근 타일 + 이름. AI 포함 */
.mmx-signin__modules {
	display: grid;
	grid-template-columns: repeat(4, 68px);
	gap: 20px 22px;
	margin: 4px 0 0;
}

.mmx-signin__module {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.mmx-signin__module-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--mmx-brand-module-icon-size, 56px);
	height: var(--mmx-brand-module-icon-size, 56px);
	border-radius: 14px;
	color: #fff;
	font-size: 22px;
	box-shadow: 0 10px 18px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
	transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.mmx-signin__module:hover .mmx-signin__module-icon {
	transform: translateY(-3px) scale(1.04);
	box-shadow: 0 16px 26px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.32);
	filter: saturate(1.08);
}

.mmx-signin__module-name {
	font-size: var(--mmx-brand-module-name-size, 13px);
	color: #b9c2cf;
	letter-spacing: -0.01em;
	white-space: nowrap;
}

.mmx-signin__module--sys {
	background: linear-gradient(145deg, #7b8794, #3b4654);
}

.mmx-signin__module--sales {
	background: linear-gradient(145deg, #ffb020, #e8590c);
}

.mmx-signin__module--buy {
	background: linear-gradient(145deg, #35d0a5, #087f5b);
}

.mmx-signin__module--prod {
	background: linear-gradient(145deg, #5caff8, #1864ab);
}

.mmx-signin__module--project {
	background: linear-gradient(145deg, #a98bfb, #5f3dc4);
}

.mmx-signin__module--fi {
	background: linear-gradient(145deg, #ffd43b, #e67700);
}

.mmx-signin__module--hr {
	background: linear-gradient(145deg, #f783ac, #a61e4d);
}

.mmx-signin__module--gw {
	background: linear-gradient(145deg, #4ddbb5, #099268);
}

.mmx-signin__module--donor {
	background: linear-gradient(145deg, #ff9a9a, #c92a2a);
}

.mmx-signin__module--bm {
	background: linear-gradient(145deg, #66d9e8, #0b7285);
}

.mmx-signin__module--ai {
	background: linear-gradient(145deg, #8b5cf6, #db2777);
}

/* AI 연결 안내 — 켜져 있으면 대화로 조회 · 분석 · 업무를 실행한다(과장 없이 한 줄) */
.mmx-signin__intro-ai {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 22px 0 0;
	padding: 7px 14px 7px 12px;
	border: 1px solid rgba(93, 143, 232, 0.38);
	border-radius: 999px;
	background: rgba(63, 124, 190, 0.12);
	color: #a9c8ea;
	font-size: 13px;
	letter-spacing: -0.01em;
}

.mmx-signin__intro-ai i {
	color: #7cabdf;
	font-size: 13px;
}

@media (max-width: 1100px) {
	.mmx-signin__grid {
		grid-template-columns: minmax(0, 400px);
		justify-content: center;
		gap: 0;
	}

	.mmx-signin__intro {
		display: none;
	}
}

.mmx-signin__panel {
	width: 100%;
	max-width: 380px;
	padding: 32px 28px 24px;
	border: 1px solid var(--signin-line);
	border-radius: 12px;
	background: var(--signin-panel);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.mmx-signin__panel[hidden] {
	display: none;
}

.mmx-signin__heading {
	margin: 0 0 24px;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-align: center;
	color: var(--signin-text);
}

.mmx-signin__field {
	display: block;
	margin-bottom: 14px;
}

.mmx-signin__label {
	display: block;
	margin: 0 0 6px 8px;
	font-size: 12px;
	color: var(--signin-muted);
}

.mmx-signin__field input {
	width: 100%;
	height: 40px;
	padding: 0 16px;
	border: 1px solid transparent;
	border-radius: var(--signin-radius);
	background: var(--signin-field);
	color: var(--signin-field-text);
	font-size: 14px;
	outline: none;
	box-sizing: border-box;
}

.mmx-signin__field input:focus {
	border-color: var(--signin-btn-hover-top);
	box-shadow: 0 0 0 3px rgba(121, 124, 131, 0.35);
}

/* 아이디 저장: 오른쪽에 맞춘 스위치. 체크박스는 화면 낭독기 · 키보드용으로 남기고(보이지 않게) 옆 span 이 스위치 모양 */
.mmx-signin__remember {
	position: relative;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
	margin: 2px 6px 18px;
	color: var(--signin-muted);
	font-size: 13px;
	cursor: pointer;
	user-select: none;
}

.mmx-signin__remember input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.mmx-signin__switch {
	position: relative;
	flex: 0 0 auto;
	width: 34px;
	height: 18px;
	border: 1px solid var(--signin-line);
	border-radius: 9px;
	background: #3a3e47;
	box-sizing: border-box;
	transition:
		background 0.2s,
		border-color 0.2s;
}

.mmx-signin__switch::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #c9cbcf;
	transition:
		transform 0.2s,
		background 0.2s;
}

.mmx-signin__remember input:checked + .mmx-signin__switch {
	border-color: #5d8fe8;
	background: #4a78cc;
}

.mmx-signin__remember input:checked + .mmx-signin__switch::before {
	transform: translateX(16px);
	background: #fff;
}

.mmx-signin__remember input:focus-visible + .mmx-signin__switch {
	box-shadow: 0 0 0 3px rgba(121, 124, 131, 0.45);
}

.mmx-signin__remember:hover {
	color: var(--signin-text);
}

.mmx-signin__submit {
	width: 100%;
	height: 42px;
	border: 1px solid var(--signin-line);
	border-radius: var(--signin-radius);
	background: linear-gradient(var(--signin-btn-top), var(--signin-btn-bottom));
	box-shadow: 0 0 6px var(--signin-btn-bottom);
	color: var(--signin-text);
	font-size: 16px;
	cursor: pointer;
}

.mmx-signin__submit:hover {
	color: #fff;
	background: linear-gradient(var(--signin-btn-hover-top), var(--signin-btn-top));
}

.mmx-signin__aux {
	display: flex;
	flex-wrap: wrap; /* 단추 안에서 글자가 꺾이지 않게, 자리가 모자라면 단추 사이에서만 줄을 바꾼다 */
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 20px;
}

/* 보조 동작: 투명한 작은 버튼(밑줄 없음) */
.mmx-signin__link {
	flex: 0 0 auto;
	white-space: nowrap;
	padding: 5px 10px;
	border: 1px solid var(--signin-line);
	border-radius: 14px;
	background: transparent;
	color: var(--signin-muted);
	font-size: 12px;
	line-height: 1.2;
	cursor: pointer;
	user-select: none;
	transition:
		background 0.15s,
		color 0.15s,
		border-color 0.15s;
}

.mmx-signin__link:hover,
.mmx-signin__link:focus-visible {
	border-color: #4d525d;
	background: rgba(255, 255, 255, 0.06);
	color: var(--signin-text);
	text-decoration: none;
	outline: none;
}

/* 영어는 글자가 길어 패딩을 줄여 한 줄에 담는다 */
body.lang-en .mmx-signin__link {
	padding: 5px 8px;
}

.mmx-signin__divider {
	width: 1px;
	height: 12px;
	background: var(--signin-line);
}

.mmx-signin__message {
	margin: 24px 0 8px;
	text-align: center;
	color: var(--signin-text);
}

.mmx-signin__foot {
	flex: 0 0 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: #999;
}

@media (max-width: 480px) {
	.mmx-signin__logo {
		left: 16px;
	}
	.mmx-signin__lang {
		right: 16px;
	}
	.mmx-signin__panel {
		padding: 24px 18px 18px;
	}
}

/* 처리 중 표시(mmx.ui.busyOn) — 화면 전체를 덮는 고정 레이어. 평소에는 숨김 */
#lottieContainer {
	position: fixed;
	inset: 0;
	display: none;
	background-color: rgba(0, 0, 0, 0.1);
	z-index: 1;
}

#lottie {
	position: fixed;
	inset: 0;
	width: 128px;
	height: 128px;
	margin: auto;
	overflow: hidden;
	transform: translate3d(0, 0, 0);
	text-align: center;
	display: none;
}

/* 공지 · 점검 배너(설정으로 켠다) */
.mmx-signin__notice {
	width: 100%;
	max-width: 380px;
	padding: 10px 14px;
	border: 1px solid #4a78cc;
	border-left-width: 4px;
	border-radius: 8px;
	background: rgba(74, 120, 204, 0.14);
	color: var(--signin-text);
	box-sizing: border-box;
}

.mmx-signin__notice--maint {
	border-color: #d9a441;
	background: rgba(217, 164, 65, 0.14);
}

.mmx-signin__notice--urgent {
	border-color: #e5645c;
	background: rgba(229, 100, 92, 0.16);
}

.mmx-signin__notice-head {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	line-height: 1.4;
	word-break: break-word;
}

.mmx-signin__notice-tag {
	flex: 0 0 auto;
	padding: 1px 8px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.16);
	font-size: 11px;
	font-weight: 600;
}

.mmx-signin__notice-body {
	margin: 6px 0 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: #d6d8dc;
	white-space: pre-line;
	word-break: break-word;
}

/* 비밀번호 보기 단추 · Caps Lock 경고 */
.mmx-signin__pw {
	position: relative;
	display: block;
}

.mmx-signin__pw input {
	padding-right: 44px;
}

.mmx-signin__reveal {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #777b83;
	cursor: pointer;
}

.mmx-signin__reveal[hidden] {
	display: none;
}

.mmx-signin__reveal:hover,
.mmx-signin__reveal:focus-visible {
	color: #3b3b3b;
	background: rgba(0, 0, 0, 0.07);
	outline: none;
}

.mmx-signin__reveal-slash {
	display: none;
}

.mmx-signin__reveal[aria-pressed="true"] .mmx-signin__reveal-slash {
	display: inline;
}

.mmx-signin__caps {
	display: block;
	margin: 6px 0 0 8px;
	font-size: 12px;
	color: #f0b45a;
}

.mmx-signin__caps[hidden] {
	display: none;
}

/* 2차 인증(OTP 앱, X8-3) — 비밀번호를 맞힌 뒤 같은 패널에서 6자리 코드를 받는다 */
.mmx-signin__otp[hidden] {
	display: none;
}

#signinForm.is-otp .mmx-signin__field,
#signinForm.is-otp .mmx-signin__remember,
#signinForm.is-otp #signinSubmit,
#signinForm.is-otp .mmx-signin__aux,
#signinForm.is-expired .mmx-signin__field,
#signinForm.is-expired .mmx-signin__remember,
#signinForm.is-expired #signinSubmit,
#signinForm.is-expired .mmx-signin__aux {
	display: none;
}

/* 비밀번호 만료(X8-3) — 새 비밀번호를 받고 바로 로그인한다 */
.mmx-signin__expired[hidden] {
	display: none;
}

.mmx-signin__expired .mmx-signin__label {
	margin-top: 10px;
}

.mmx-signin__expired input {
	width: 100%;
	height: 40px;
	padding: 0 16px;
	border: 1px solid transparent;
	border-radius: var(--signin-radius);
	background: var(--signin-field);
	color: var(--signin-field-text);
	font-size: 14px;
	outline: none;
	box-sizing: border-box;
}

.mmx-signin__expired input:focus {
	border-color: var(--signin-btn-hover-top);
	box-shadow: 0 0 0 3px rgba(121, 124, 131, 0.35);
}

.mmx-signin__expired input.mmx-signin__expired-code {
	font-size: 18px;
	letter-spacing: 0.35em;
	text-align: center;
}

.mmx-signin__otp-hint {
	margin: 0 0 10px 8px;
	font-size: 12px;
	line-height: 1.5;
	color: var(--signin-muted);
}

.mmx-signin__otp input {
	width: 100%;
	height: 44px;
	padding: 0 8px;
	border: 1px solid transparent;
	border-radius: var(--signin-radius);
	background: var(--signin-field);
	color: var(--signin-field-text);
	font-size: 18px;
	letter-spacing: 0.35em;
	text-align: center;
	outline: none;
	box-sizing: border-box;
}

.mmx-signin__otp input:focus {
	border-color: var(--signin-btn-hover-top);
	box-shadow: 0 0 0 3px rgba(121, 124, 131, 0.35);
}

.mmx-signin__otp-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
}

.mmx-signin__otp-remember {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 10px 0 0 6px;
	color: var(--signin-muted);
	font-size: 12px;
	cursor: pointer;
	user-select: none;
}

.mmx-signin__otp-remember input {
	width: 14px;
	height: 14px;
	accent-color: #4a78cc;
	cursor: pointer;
}

.mmx-signin__otp-remember:hover {
	color: var(--signin-text);
}

.mmx-signin__otp-actions .mmx-signin__submit {
	flex: 1 1 auto;
}

.mmx-signin__otp-actions .mmx-signin__link {
	flex: 0 0 auto;
}

/* 레이어 확인창(사용자 10-19) — 회사 선택 화면의 로그아웃 등 */
.mmx-confirm-layer { position: fixed; inset: 0; z-index: 3200; display: flex; align-items: center; justify-content: center; background: rgba(10, 14, 20, 0.55); }
.mmx-confirm-box { width: min(380px, calc(100vw - 32px)); background: #212631; border: 1px solid #344057; border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); color: #e3e6ea; overflow: hidden; }
.mmx-confirm-title { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #2a3140; border-bottom: 1px solid #344057; font-size: 13px; }
.mmx-confirm-title b { font-weight: 600; }
.mmx-confirm-close { border: 0; background: transparent; color: #94979c; cursor: pointer; font-size: 12px; padding: 0 2px; }
.mmx-confirm-close:hover { color: #fff; }
.mmx-confirm-body { padding: 18px 16px; font-size: 13px; line-height: 1.6; white-space: pre-line; word-break: break-word; }
.mmx-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 14px 14px; }
.mmx-confirm-actions button { min-width: 68px; height: 32px; border-radius: 6px; font: inherit; font-size: 12.5px; cursor: pointer; }
.mmx-confirm-cancel { border: 1px solid #4a5568; background: transparent; color: #c9ccd1; }
.mmx-confirm-cancel:hover { background: #2b3345; color: #fff; }
.mmx-confirm-ok { border: 1px solid #4a78cc; background: #4a78cc; color: #fff; }
.mmx-confirm-ok:hover { filter: brightness(1.08); }

/* 오류 팝업(사용자 10-19) — 회사 선택 화면의 백엔드 오류도 레이어로 */
.mmx-error-layer { position: fixed; inset: 0; z-index: 3300; display: flex; align-items: center; justify-content: center; background: rgba(10, 14, 20, 0.55); }
.mmx-error-box { width: min(560px, calc(100vw - 32px)); background: #212631; border: 1px solid #344057; border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); color: #e3e6ea; overflow: hidden; }
.mmx-error-title { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #3a2a2a; border-bottom: 1px solid #5a3a3a; font-size: 13px; }
.mmx-error-title b { font-weight: 600; }
.mmx-error-close { border: 0; background: transparent; color: #c9a9a9; cursor: pointer; font-size: 12px; padding: 0 2px; }
.mmx-error-close:hover { color: #fff; }
.mmx-error-body { padding: 16px; }
.mmx-error-message { font-size: 13px; line-height: 1.6; white-space: pre-line; word-break: break-word; }
.mmx-error-detail { margin: 12px 0 0; max-height: 260px; overflow: auto; padding: 10px; background: #171c25; border: 1px solid #344057; border-radius: 6px; color: #c9ccd1; font-family: Consolas, monospace; font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.mmx-error-detail[hidden] { display: none; }
.mmx-error-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 14px 14px; }
.mmx-error-actions button { min-width: 72px; height: 32px; border-radius: 6px; font: inherit; font-size: 12.5px; cursor: pointer; }
.mmx-error-more { border: 1px solid #4a5568; background: transparent; color: #c9ccd1; }
.mmx-error-more:hover { background: #2b3345; color: #fff; }
.mmx-error-ok { border: 1px solid #4a78cc; background: #4a78cc; color: #fff; }
.mmx-error-ok:hover { filter: brightness(1.08); }

/* 도움 줄 */
.mmx-signin__help {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 14px;
	max-width: 380px;
	font-size: 12px;
	color: var(--signin-muted);
	text-align: center;
}

.mmx-signin__help a {
	color: #9db8ec;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.mmx-signin__help a:hover {
	color: #c3d4f6;
}

.mmx-signin__ver {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.mmx-signin__env {
	padding: 0 7px;
	border-radius: 9px;
	border: 1px solid var(--signin-line);
	font-size: 11px;
}

.mmx-signin__env.is-test {
	border-color: #d9a441;
	color: #e8bd6b;
}

@media (max-height: 700px) {
	.mmx-signin__stage {
		gap: 10px;
		padding: 12px 16px;
	}
}
