/**
 * iSeodang i-Shop — 홈페이지 전용 관리 페이지 스타일
 *
 * 원칙 (지침 8장):
 *  - 모바일이 기본. 담당자가 휴대폰으로 입금 확인을 한다.
 *  - 터치 타깃 44x44px 이상, 입력창 16px 이상(iOS 자동확대 방지)
 *  - 가로 스크롤 0. 표는 자기 상자 안에서만 스크롤.
 *  - 테마(Astra) 스타일과 싸우지 않도록 .isd-fm 안으로만 한정.
 */

.isd-fm {
	--isd-navy: #1f4e79;
	--isd-line: #e2e5e9;
	--isd-bg: #fbfbfc;
	--isd-text: #2c3338;
	--isd-muted: #6b7280;

	max-width: 900px;
	margin: 0 auto;
	color: var(--isd-text);
	font-size: 16px;
	line-height: 1.6;
}

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

/* ── 머리말 ──────────────────────────────────── */
.isd-fm__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--isd-navy);
}

.isd-fm__head h2 {
	margin: 0;
	font-size: 1.5rem;
	color: var(--isd-navy);
}

.isd-fm__who {
	font-size: 0.875rem;
	color: var(--isd-muted);
}

.isd-fm__h3 {
	margin: 2rem 0 0.75rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid var(--isd-line);
	font-size: 1.05rem;
	color: var(--isd-navy);
}

/* ── 요약 카드 ───────────────────────────────── */
.isd-fm__cards {
	display: grid;
	/* 모바일에서 3개가 나란히 찌그러지지 않게 자동 줄바꿈 */
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0.75rem;
	margin: 1.25rem 0;
}

.isd-fm__card {
	padding: 1rem;
	border: 1px solid var(--isd-line);
	border-radius: 10px;
	background: #fff;
	text-align: center;
}

.isd-fm__card--urgent {
	border-color: #f0b849;
	background: #fffaf0;
}

.isd-fm__num {
	display: block;
	font-size: 2rem;
	font-weight: 800;
	line-height: 1.15;
	color: var(--isd-navy);
}

.isd-fm__card--urgent .isd-fm__num {
	color: #a35b00;
}

.isd-fm__label {
	display: block;
	margin-top: 0.25rem;
	font-size: 0.8125rem;
	color: var(--isd-muted);
}

/* ── 주문 카드 ───────────────────────────────── */
.isd-fm__order {
	margin-bottom: 1rem;
	padding: 1rem;
	border: 1px solid var(--isd-line);
	border-left: 4px solid #f0b849;
	border-radius: 10px;
	background: var(--isd-bg);
}

.isd-fm__order-top {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	font-size: 1.05rem;
}

.isd-fm__amount {
	font-weight: 700;
	color: var(--isd-navy);
}

.isd-fm__meta {
	margin: 0 0 0.75rem;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
	color: var(--isd-muted);
}

.isd-fm__meta li {
	margin: 0 0 0.2rem;
	/* 긴 상품명이 상자를 뚫고 나가지 않게 */
	overflow-wrap: anywhere;
}

.isd-fm__privacy {
	margin: 0.5rem 0 0.75rem;
	padding: 0.5rem 0.7rem;
	border-radius: 6px;
	background: #fdf3e3;
	color: #8a6100;
	font-size: 0.8125rem;
	line-height: 1.5;
}

/* ── 폼 ──────────────────────────────────────── */
.isd-fm__form {
	margin: 0.75rem 0 0;
}

.isd-fm__field {
	display: block;
	margin-bottom: 0.5rem;
}

.isd-fm__field span {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.8125rem;
	color: var(--isd-muted);
}

.isd-fm__field input[type="text"] {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid #c8ccd1;
	border-radius: 6px;
	/* 16px 미만이면 iOS 사파리가 화면을 확대해버린다 */
	font-size: 16px;
}

/* ── 버튼 ────────────────────────────────────── */
.isd-fm__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* 터치 타깃 최소 44px */
	min-height: 44px;
	padding: 0.6rem 1.1rem;
	border: 1px solid var(--isd-navy);
	border-radius: 8px;
	background: var(--isd-navy);
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.isd-fm__btn:hover,
.isd-fm__btn:focus {
	background: #17395a;
	border-color: #17395a;
	color: #fff;
}

.isd-fm__btn--ghost {
	background: #fff;
	color: var(--isd-navy);
}

.isd-fm__btn--ghost:hover,
.isd-fm__btn--ghost:focus {
	background: #eef3f8;
	color: var(--isd-navy);
}

.isd-fm__btn--ok {
	background: #1a7f37;
	border-color: #1a7f37;
}

.isd-fm__btn--ok:hover,
.isd-fm__btn--ok:focus {
	background: #146029;
	border-color: #146029;
}

.isd-fm__btn--no {
	background: #fff;
	border-color: #b32d2e;
	color: #b32d2e;
}

.isd-fm__btn--no:hover,
.isd-fm__btn--no:focus {
	background: #fdeaea;
	color: #8a1f1f;
}

.isd-fm__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* ── 표 ──────────────────────────────────────── */
/* 표는 자기 상자 안에서만 스크롤 → 페이지 전체에 가로 스크롤이 생기지 않는다 */
.isd-fm__scroll {
	overflow-x: auto;
	max-width: 100%;
	-webkit-overflow-scrolling: touch;
}

.isd-fm__table {
	width: 100%;
	min-width: 460px;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.isd-fm__table th,
.isd-fm__table td {
	padding: 0.6rem 0.7rem;
	border-bottom: 1px solid var(--isd-line);
	text-align: left;
	white-space: nowrap;
}

.isd-fm__table th {
	background: #f3f5f7;
	font-weight: 600;
	color: var(--isd-muted);
}

/* ── 메시지 ──────────────────────────────────── */
.isd-fm__msg {
	margin: 1rem 0;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	border-left: 4px solid;
	font-weight: 600;
}

/* 색만으로 구분하지 않고 앞에 기호를 붙인다 (색각 접근성) */
.isd-fm__msg::before {
	margin-right: 0.4rem;
}

.isd-fm__msg--ok {
	border-color: #1a7f37;
	background: #e8f5ed;
	color: #0f5c2b;
}

.isd-fm__msg--ok::before {
	content: "\2713";
}

.isd-fm__msg--warn {
	border-color: #f0b849;
	background: #fffaf0;
	color: #8a6100;
}

.isd-fm__msg--warn::before {
	content: "\26A0\FE0E";
}

.isd-fm__msg--err {
	border-color: #b32d2e;
	background: #fdeaea;
	color: #8a1f1f;
}

.isd-fm__msg--err::before {
	content: "\2715";
}

/* ── 기타 ────────────────────────────────────── */
.isd-fm__empty {
	margin: 0.5rem 0;
	color: var(--isd-muted);
	font-style: italic;
}

.isd-fm__foot {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--isd-line);
	font-size: 0.8125rem;
	color: var(--isd-muted);
}

/* ── 로그인 / 권한없음 게이트 ────────────────── */
.isd-fm__gate {
	max-width: 420px;
	margin: 2rem auto;
	padding: 1.5rem;
	border: 1px solid var(--isd-line);
	border-radius: 12px;
	background: var(--isd-bg);
	text-align: center;
}

.isd-fm__gate h2 {
	margin-top: 0;
	color: var(--isd-navy);
}

.isd-fm__hint {
	font-size: 0.875rem;
	color: var(--isd-muted);
}

.isd-fm__gate input[type="text"],
.isd-fm__gate input[type="password"] {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid #c8ccd1;
	border-radius: 6px;
	font-size: 16px;
}

.isd-fm__gate .login-submit input {
	min-height: 44px;
	padding: 0.6rem 1.25rem;
	border: 0;
	border-radius: 8px;
	background: var(--isd-navy);
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}

.isd-fm__gate p {
	margin-bottom: 0.75rem;
	text-align: left;
}

.isd-fm__gate .login-remember,
.isd-fm__gate .login-submit {
	text-align: center;
}

/* ── 작은 화면 ───────────────────────────────── */
@media screen and (max-width: 480px) {
	.isd-fm__order {
		padding: 0.85rem;
	}

	/* 모바일에서는 버튼을 꽉 채워 엄지로 누르기 쉽게 */
	.isd-fm__form .isd-fm__btn,
	.isd-fm__links .isd-fm__btn {
		width: 100%;
	}

	.isd-fm__num {
		font-size: 1.6rem;
	}
}
