/* ==========================================================================
   제휴 프로그램 - 프론트엔드 스타일
   톤: 신뢰감 있는 비즈니스 톤 (네이비 + 그린 포인트)
   ========================================================================== */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

.myaff-wrap {
	--myaff-ink: #16233F;
	--myaff-ink-soft: #46536E;
	--myaff-line: #E3E6EC;
	--myaff-bg: #F7F7F4;
	--myaff-card: #FFFFFF;
	--myaff-accent: #1F7A5C;
	--myaff-accent-soft: #E6F2ED;
	--myaff-gold: #B8862C;
	--myaff-gold-soft: #FBF3E3;
	--myaff-danger: #C0392B;
	--myaff-danger-soft: #FBEAE8;
	--myaff-radius: 14px;

	font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
	color: var(--myaff-ink);
	max-width: 640px;
	margin: 0 auto;
	box-sizing: border-box;
}
.myaff-wrap *, .myaff-wrap *::before, .myaff-wrap *::after { box-sizing: border-box; }

.myaff-dashboard-wrap { max-width: 760px; }

/* 알림 */
.myaff-alert {
	padding: 14px 18px;
	border-radius: 10px;
	margin-bottom: 18px;
	font-size: 15px;
	font-weight: 500;
}
.myaff-alert-success { background: var(--myaff-accent-soft); color: var(--myaff-accent); }
.myaff-alert-error { background: var(--myaff-danger-soft); color: var(--myaff-danger); }

.myaff-notice {
	padding: 20px;
	border-radius: var(--myaff-radius);
	background: var(--myaff-card);
	border: 1px solid var(--myaff-line);
	text-align: center;
	font-size: 15px;
}
.myaff-notice a { color: var(--myaff-accent); font-weight: 600; }
.myaff-notice-wait { background: var(--myaff-gold-soft); border-color: transparent; }
.myaff-notice-error { background: var(--myaff-danger-soft); border-color: transparent; color: var(--myaff-danger); }

/* 카드 */
.myaff-card {
	background: var(--myaff-card);
	border: 1px solid var(--myaff-line);
	border-radius: var(--myaff-radius);
	padding: 28px;
	box-shadow: 0 1px 3px rgba(22, 35, 63, 0.04);
}
.myaff-card-head { margin-bottom: 22px; }
.myaff-card-head-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.myaff-card-head h2, .myaff-card-head h3 { margin: 6px 0 8px; font-weight: 700; letter-spacing: -0.01em; }
.myaff-card-head h2 { font-size: 22px; }
.myaff-card-head h3 { font-size: 18px; margin: 0; }
.myaff-sub { color: var(--myaff-ink-soft); font-size: 14px; line-height: 1.6; margin: 0; }

.myaff-eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--myaff-accent);
	background: var(--myaff-accent-soft);
	padding: 4px 10px;
	border-radius: 999px;
}

/* 폼 */
.myaff-form { display: flex; flex-direction: column; gap: 16px; }
.myaff-field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.myaff-field-row .myaff-field { flex: 1 1 180px; }
.myaff-field { display: flex; flex-direction: column; gap: 6px; }
.myaff-field label { font-size: 13px; font-weight: 600; color: var(--myaff-ink); }
.myaff-req { color: var(--myaff-danger); }

.myaff-field input,
.myaff-field select {
	font-family: inherit;
	font-size: 15px;
	padding: 11px 13px;
	border: 1px solid var(--myaff-line);
	border-radius: 9px;
	background: #FCFCFB;
	color: var(--myaff-ink);
	transition: border-color .15s ease, background .15s ease;
	width: 100%;
}
.myaff-field input:focus,
.myaff-field select:focus {
	outline: none;
	border-color: var(--myaff-accent);
	background: #fff;
}

.myaff-hint { font-size: 12.5px; color: #8A93A6; }
.myaff-muted { color: #97A0B5; font-size: 11.5px; }
.myaff-hint-muted { margin-top: 8px; }
.myaff-fineprint { font-size: 12.5px; color: #8A93A6; text-align: center; margin: 4px 0 0; }

.myaff-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #8A93A6;
	font-size: 12.5px;
	font-weight: 600;
	margin: 4px 0;
}
.myaff-divider::before, .myaff-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--myaff-line);
}

.myaff-guide-callout {
	background: var(--myaff-accent-soft);
	border: 1px solid rgba(31, 122, 92, 0.25);
	border-radius: 12px;
	padding: 18px 20px;
	margin: 6px 0 2px;
}
.myaff-guide-callout-title {
	display: block;
	font-size: 16px;
	font-weight: 800;
	color: var(--myaff-ink);
	margin-bottom: 6px;
}
.myaff-guide-callout p {
	margin: 0 0 10px;
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--myaff-ink-soft);
}
.myaff-guide-callout-link {
	display: inline-block;
	font-size: 14.5px;
	font-weight: 800;
	color: var(--myaff-accent);
	text-decoration: none;
}
.myaff-guide-callout-link:hover { text-decoration: underline; }

/* 버튼 */
.myaff-btn {
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	padding: 13px 20px;
	border-radius: 9px;
	border: none;
	cursor: pointer;
	transition: transform .08s ease, opacity .15s ease;
}
.myaff-btn:active { transform: scale(0.98); }
.myaff-btn-primary { background: var(--myaff-ink); color: #fff; }
.myaff-btn-primary:hover { opacity: 0.9; }
.myaff-btn-block { width: 100%; }

/* 대시보드 헤더 */
.myaff-dash-head { margin-bottom: 20px; }
.myaff-dash-head h2 { font-size: 21px; margin: 8px 0 0; font-weight: 700; }

/* 홍보 링크 박스 */
.myaff-link-box {
	background: var(--myaff-ink);
	color: #fff;
	border-radius: var(--myaff-radius);
	padding: 22px;
	margin-bottom: 18px;
}
.myaff-link-box label { display: block; font-size: 13px; font-weight: 600; opacity: 0.75; margin-bottom: 10px; }
.myaff-link-copy { display: flex; gap: 10px; }
.myaff-link-copy input {
	flex: 1;
	font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
	font-size: 13.5px;
	padding: 11px 13px;
	border-radius: 8px;
	border: none;
	background: rgba(255,255,255,0.12);
	color: #fff;
}
.myaff-link-box .myaff-btn-primary { background: var(--myaff-gold); color: #201404; white-space: nowrap; }
.myaff-link-box .myaff-hint { color: rgba(255,255,255,0.6); display: block; margin-top: 10px; }

/* 통계 그리드 */
.myaff-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin-bottom: 18px;
}
.myaff-stat-card {
	background: var(--myaff-card);
	border: 1px solid var(--myaff-line);
	border-radius: 12px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.myaff-stat-label { font-size: 12.5px; color: var(--myaff-ink-soft); font-weight: 600; }
.myaff-stat-value { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.myaff-stat-accent { background: var(--myaff-accent-soft); border-color: transparent; }
.myaff-stat-accent .myaff-stat-value { color: var(--myaff-accent); }

.myaff-badge {
	font-size: 12.5px;
	font-weight: 700;
	background: var(--myaff-gold-soft);
	color: var(--myaff-gold);
	padding: 5px 12px;
	border-radius: 999px;
}

/* 테이블 */
.myaff-table-scroll { overflow-x: auto; }
.myaff-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.myaff-table th {
	text-align: left;
	padding: 10px 12px;
	color: var(--myaff-ink-soft);
	font-weight: 600;
	border-bottom: 1px solid var(--myaff-line);
	white-space: nowrap;
}
.myaff-table td {
	padding: 12px;
	border-bottom: 1px solid var(--myaff-line);
	white-space: nowrap;
}
.myaff-table tr:last-child td { border-bottom: none; }
.myaff-empty { color: var(--myaff-ink-soft); font-size: 14px; text-align: center; padding: 30px 0; }

.myaff-status {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 999px;
}
.myaff-status-wait { background: var(--myaff-gold-soft); color: var(--myaff-gold); }
.myaff-status-ok { background: var(--myaff-accent-soft); color: var(--myaff-accent); }
.myaff-status-paid { background: #E9ECFB; color: #4A4FCB; }
.myaff-status-rejected { background: var(--myaff-danger-soft); color: var(--myaff-danger); }

/* 모바일 반응형 */
@media (max-width: 600px) {
	.myaff-card { padding: 20px; }
	.myaff-stats-grid { grid-template-columns: repeat(2, 1fr); }
	.myaff-link-copy { flex-direction: column; }
}

/* ================= 파트너 로그인 화면 (고급 스타일) ================= */
.myaff-login-wrap {
	max-width: 880px;
	padding: 24px 16px;
}
.myaff-login-card {
	display: grid;
	grid-template-columns: 0.85fr 1.15fr;
	background: var(--myaff-card);
	border-radius: 22px;
	overflow: hidden;
	box-shadow: 0 24px 60px -20px rgba(22, 35, 63, 0.35), 0 2px 8px rgba(22, 35, 63, 0.06);
	border: 1px solid var(--myaff-line);
}

.myaff-login-brand {
	position: relative;
	background:
		radial-gradient(120% 140% at 15% 0%, rgba(184, 134, 44, 0.35) 0%, rgba(184, 134, 44, 0) 45%),
		linear-gradient(160deg, #16233F 0%, #0F1A30 55%, #12271F 100%);
	color: #fff;
	padding: 44px 34px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 14px;
	overflow: hidden;
}
.myaff-login-brand::after {
	content: '';
	position: absolute;
	right: -60px;
	bottom: -60px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(184, 134, 44, 0.28) 0%, rgba(184, 134, 44, 0) 70%);
	pointer-events: none;
}
.myaff-login-brand-mark {
	font-size: 22px;
	color: var(--myaff-gold);
	line-height: 1;
}
.myaff-login-brand-eyebrow {
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.18em;
	color: var(--myaff-gold);
	opacity: 0.95;
}
.myaff-login-brand-title {
	font-size: 27px;
	font-weight: 800;
	margin: 2px 0 0;
	letter-spacing: -0.01em;
}
.myaff-login-brand-sub {
	font-size: 14px;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.7);
	margin: 6px 0 0;
	position: relative;
	z-index: 1;
}

.myaff-login-form-panel {
	padding: 44px 40px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.myaff-login-form { gap: 18px; }

.myaff-input-icon-wrap { position: relative; }
.myaff-field-icon input { padding-left: 46px; }
.myaff-input-icon-wrap::after {
	content: '';
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	width: 17px;
	height: 17px;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	opacity: 0.5;
	pointer-events: none;
}
.myaff-field-icon-mail .myaff-input-icon-wrap::after {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2346536E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E");
}
.myaff-field-icon-lock .myaff-input-icon-wrap::after {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2346536E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='9' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 018 0v4'/%3E%3C/svg%3E");
}
.myaff-input-icon-wrap:focus-within::after { opacity: 0.8; }

.myaff-btn-luxury {
	background: linear-gradient(135deg, #1F2E4E 0%, #16233F 55%, #0F1A30 100%);
	color: #fff;
	position: relative;
	letter-spacing: 0.01em;
	box-shadow: 0 10px 24px -10px rgba(22, 35, 63, 0.55);
	border: 1px solid rgba(184, 134, 44, 0.4);
}
.myaff-btn-luxury:hover { opacity: 1; box-shadow: 0 12px 28px -8px rgba(184, 134, 44, 0.45); }
.myaff-btn-luxury::after {
	content: '→';
	margin-left: 8px;
	color: var(--myaff-gold);
	font-weight: 700;
}

@media (max-width: 720px) {
	.myaff-login-card { grid-template-columns: 1fr; border-radius: 18px; }
	.myaff-login-brand { padding: 30px 26px 26px; }
	.myaff-login-brand-title { font-size: 23px; }
	.myaff-login-form-panel { padding: 30px 24px; }
}

/* ================= 파트너 홍보 가이드 페이지 ================= */
.myaff-guide-wrap { max-width: 820px; }
.myaff-guide-hero {
	background: linear-gradient(135deg, var(--myaff-ink) 0%, #1F7A5C 100%);
	color: #fff;
	border-radius: var(--myaff-radius);
	padding: 28px 26px;
	margin-bottom: 20px;
}
.myaff-guide-hero h2 { margin: 6px 0 8px; font-size: 22px; font-weight: 800; }
.myaff-guide-hero p { margin: 0; opacity: .85; font-size: 14px; line-height: 1.7; }

.myaff-guide-section { margin-bottom: 22px; }
.myaff-guide-section h3 {
	font-size: 16.5px;
	font-weight: 800;
	color: var(--myaff-ink);
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
}
.myaff-guide-section h3 .num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px; height: 24px;
	border-radius: 50%;
	background: var(--myaff-ink);
	color: #fff;
	font-size: 12.5px;
	flex-shrink: 0;
}

.myaff-gtable { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--myaff-line); }
.myaff-gtable th { background: #F7F7F4; color: var(--myaff-ink-soft); font-weight: 700; text-align: left; padding: 10px 12px; font-size: 12.5px; border-bottom: 1px solid var(--myaff-line); }
.myaff-gtable td { padding: 10px 12px; border-bottom: 1px solid var(--myaff-line); vertical-align: top; line-height: 1.55; }
.myaff-gtable tr:last-child td { border-bottom: none; }
.myaff-gtable .g-ok { color: var(--myaff-accent); font-weight: 700; white-space: nowrap; }
.myaff-gtable .g-caution { color: var(--myaff-gold); font-weight: 700; white-space: nowrap; }
.myaff-gtable .g-no { color: var(--myaff-danger); font-weight: 700; white-space: nowrap; }

.myaff-callout { border-radius: 10px; padding: 16px 18px; font-size: 13.5px; line-height: 1.7; margin-bottom: 14px; }
.myaff-callout-title { display: block; font-weight: 800; margin-bottom: 6px; font-size: 13.5px; }
.myaff-callout-safe { background: var(--myaff-accent-soft); color: #14503d; }
.myaff-callout-safe .myaff-callout-title { color: var(--myaff-accent); }
.myaff-callout-warn { background: #FBEAE8; color: #7a2318; }
.myaff-callout-warn .myaff-callout-title { color: var(--myaff-danger); }
.myaff-callout-law { background: var(--myaff-gold-soft); color: #6b5013; border: 1px solid #EAD8AE; }
.myaff-callout-law .myaff-callout-title { color: var(--myaff-gold); }
.myaff-callout ul, .myaff-callout ol { margin: 6px 0 0; padding-left: 18px; }
.myaff-callout li { margin-bottom: 4px; }

.myaff-guide-example {
	background: #16233F;
	color: #fff;
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 13px;
	font-family: -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
	margin: 10px 0;
}
.myaff-guide-example b { color: #F2C14E; }

.myaff-guide-checklist { list-style: none; margin: 0; padding: 0; }
.myaff-guide-checklist li {
	display: flex; align-items: flex-start; gap: 10px;
	padding: 10px 0; border-bottom: 1px solid var(--myaff-line);
	font-size: 13.5px; line-height: 1.6;
}
.myaff-guide-checklist li:last-child { border-bottom: none; }
.myaff-guide-checklist .chk {
	flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
	background: var(--myaff-accent-soft); color: var(--myaff-accent);
	display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
}

@media (max-width: 600px) {
	.myaff-gtable { font-size: 12px; }
	.myaff-gtable th, .myaff-gtable td { padding: 8px; }
}
