/* Hacoo Affiliate — 网红前台样式（英文站）
   配色：蜂蜜暖阳 —— 淡黄 #FDE68A + 琥珀橙 #D97706 + 深橙 #EA580C
   想换配色只改下面 .hacoo-wrap 里的变量，以及 .hacoo-hero 的渐变 */

.hacoo-wrap {
	--hc-primary: #D97706;
	--hc-primary-dark: #B45309;
	--hc-primary-soft: #FEF3C7;
	--hc-accent: #EA580C;
	--hc-success: #0F6E56;
	--hc-success-soft: #E1F5EE;
	--hc-warning: #92400E;
	--hc-warning-soft: #FDE68A;
	--hc-danger: #A32D2D;
	--hc-danger-soft: #FCEBEB;
	--hc-text: #1A1A1A;
	--hc-muted: #6B7280;
	--hc-border: #E5E7EB;
	--hc-bg: #F7F8FA;

	max-width: 1180px;
	margin: 0 auto;
	padding: 20px 16px 60px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--hc-text);
	font-size: 15px;
	line-height: 1.6;
}

.hacoo-wrap *,
.hacoo-wrap *::before,
.hacoo-wrap *::after {
	box-sizing: border-box;
}

.hacoo-wrap a { color: var(--hc-primary); text-decoration: none; }
.hacoo-wrap a:hover { color: var(--hc-primary-dark); }

/* ---------- 头部横幅 ---------- */
.hacoo-hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(120deg, #FDE68A 0%, #F59E0B 55%, #EA580C 140%);
	border-radius: 16px;
	padding: 34px 32px;
	color: #fff;
	margin-bottom: 22px;
}
.hacoo-hero::after {
	content: "";
	position: absolute;
	right: -60px;
	top: -70px;
	width: 250px;
	height: 250px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.13);
}
.hacoo-hero::before {
	content: "";
	position: absolute;
	right: 60px;
	bottom: -90px;
	width: 170px;
	height: 170px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.09);
}
.hacoo-hero h1 {
	margin: 0 0 8px;
	font-size: 27px;
	font-weight: 600;
	color: #fff;
	position: relative;
	z-index: 1;
}
.hacoo-hero p {
	margin: 0;
	font-size: 15px;
	opacity: 0.93;
	position: relative;
	z-index: 1;
	max-width: 640px;
}
.hacoo-hero .hacoo-hero-code {
	margin-top: 16px;
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: rgba(255, 255, 255, 0.18);
	border: 1px solid rgba(255, 255, 255, 0.3);
	padding: 7px 14px;
	border-radius: 999px;
	font-size: 13px;
}

/* ---------- 卡片 ---------- */
.hacoo-card {
	background: #fff;
	border: 1px solid var(--hc-border);
	border-radius: 14px;
	padding: 24px;
	margin-bottom: 20px;
}
.hacoo-card-title {
	margin: 0 0 4px;
	font-size: 17px;
	font-weight: 600;
}
.hacoo-card-sub {
	margin: 0 0 18px;
	font-size: 13.5px;
	color: var(--hc-muted);
}

/* ---------- 统计卡片 ---------- */
.hacoo-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 16px;
	margin-bottom: 22px;
}
.hacoo-stat {
	background: #fff;
	border: 1px solid var(--hc-border);
	border-radius: 14px;
	padding: 20px;
	position: relative;
	overflow: hidden;
}
.hacoo-stat::before {
	content: "";
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 4px;
	background: var(--hc-primary);
}
.hacoo-stat.is-green::before { background: var(--hc-success); }
.hacoo-stat.is-pink::before { background: var(--hc-accent); }
.hacoo-stat.is-amber::before { background: var(--hc-warning); }
.hacoo-stat-label {
	font-size: 12.5px;
	color: var(--hc-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
}
.hacoo-stat-value {
	font-size: 26px;
	font-weight: 600;
	line-height: 1.2;
}
.hacoo-stat-note {
	font-size: 12.5px;
	color: var(--hc-muted);
	margin-top: 6px;
}

/* ---------- 门户布局 ---------- */
.hacoo-portal {
	display: grid;
	grid-template-columns: 230px 1fr;
	gap: 22px;
	align-items: start;
}
.hacoo-nav {
	background: #fff;
	border: 1px solid var(--hc-border);
	border-radius: 14px;
	padding: 12px;
	position: sticky;
	top: 20px;
}
.hacoo-nav-title {
	font-size: 12px;
	color: var(--hc-muted);
	text-transform: uppercase;
	letter-spacing: 0.6px;
	padding: 8px 12px 10px;
}
.hacoo-nav a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 13px;
	border-radius: 9px;
	color: #374151;
	font-size: 14.5px;
	margin-bottom: 2px;
	transition: background 0.15s, color 0.15s;
}
.hacoo-nav a:hover { background: #F3F4F6; color: var(--hc-text); }
.hacoo-nav a.is-active {
	background: var(--hc-primary-soft);
	color: var(--hc-primary-dark);
	font-weight: 500;
}
.hacoo-nav-ico {
	width: 18px;
	height: 18px;
	flex: none;
	opacity: 0.85;
}
.hacoo-nav-logout {
	margin-top: 10px;
	border-top: 1px solid var(--hc-border);
	padding-top: 10px;
}
.hacoo-nav-logout a { color: var(--hc-danger); }
.hacoo-nav-logout a:hover { background: var(--hc-danger-soft); color: var(--hc-danger); }

/* ---------- 按钮 ---------- */
.hacoo-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--hc-primary);
	color: #fff !important;
	border: none;
	border-radius: 9px;
	padding: 11px 20px;
	font-size: 14.5px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s, transform 0.1s;
	font-family: inherit;
}
.hacoo-btn:hover { background: var(--hc-primary-dark); }
.hacoo-btn:active { transform: translateY(1px); }
.hacoo-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.hacoo-btn.is-block { display: flex; width: 100%; }
.hacoo-btn.is-ghost {
	background: #fff;
	color: var(--hc-text) !important;
	border: 1px solid var(--hc-border);
}
.hacoo-btn.is-ghost:hover { background: #F9FAFB; }
.hacoo-btn.is-sm { padding: 7px 13px; font-size: 13px; }
.hacoo-btn.is-success { background: var(--hc-success); }
.hacoo-btn.is-success:hover { background: #0B5544; }

/* ---------- 表单 ---------- */
.hacoo-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
.hacoo-field { display: flex; flex-direction: column; }
.hacoo-field.is-full { grid-column: 1 / -1; }
.hacoo-field label {
	font-size: 13.5px;
	font-weight: 500;
	margin-bottom: 6px;
	color: #374151;
}
.hacoo-field label .req { color: var(--hc-accent); margin-left: 2px; }
.hacoo-field input,
.hacoo-field select,
.hacoo-field textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--hc-border);
	border-radius: 9px;
	font-size: 14.5px;
	font-family: inherit;
	color: var(--hc-text);
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.hacoo-field input:focus,
.hacoo-field select:focus,
.hacoo-field textarea:focus {
	outline: none;
	border-color: var(--hc-primary);
	box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12);
}
.hacoo-field .hint {
	font-size: 12.5px;
	color: var(--hc-muted);
	margin-top: 5px;
}
.hacoo-form-actions { margin-top: 22px; }

/* ---------- 消息 ---------- */
.hacoo-msg {
	border-radius: 10px;
	padding: 13px 16px;
	margin-bottom: 18px;
	font-size: 14px;
	border: 1px solid transparent;
	display: none;
}
.hacoo-msg.is-show { display: block; }
.hacoo-msg.is-success { background: var(--hc-success-soft); border-color: #9FE1CB; color: var(--hc-success); }
.hacoo-msg.is-error { background: var(--hc-danger-soft); border-color: #F7C1C1; color: var(--hc-danger); }
.hacoo-msg.is-info { background: var(--hc-primary-soft); border-color: #FCD34D; color: var(--hc-primary-dark); }

/* ---------- 表格 ---------- */
.hacoo-table-wrap { overflow-x: auto; }
.hacoo-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.hacoo-table th {
	text-align: left;
	padding: 11px 14px;
	background: #FAFAFB;
	color: var(--hc-muted);
	font-size: 12.5px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	border-bottom: 1px solid var(--hc-border);
	white-space: nowrap;
}
.hacoo-table td {
	padding: 13px 14px;
	border-bottom: 1px solid #F1F2F4;
	vertical-align: middle;
}
.hacoo-table tbody tr:hover { background: #FAFAFB; }
.hacoo-table tbody tr:last-child td { border-bottom: none; }
.hacoo-table .num { font-variant-numeric: tabular-nums; }

/* ---------- 状态标签 ---------- */
.hacoo-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 500;
	background: #F3F4F6;
	color: #4B5563;
	white-space: nowrap;
}
.hacoo-badge.is-success { background: var(--hc-success-soft); color: var(--hc-success); }
.hacoo-badge.is-warning { background: var(--hc-warning-soft); color: var(--hc-warning); }
.hacoo-badge.is-danger { background: var(--hc-danger-soft); color: var(--hc-danger); }
.hacoo-badge.is-info { background: var(--hc-primary-soft); color: var(--hc-primary-dark); }

/* ---------- 推广链接 ---------- */
.hacoo-linkbox {
	display: flex;
	gap: 10px;
	align-items: stretch;
	margin-bottom: 14px;
}
.hacoo-linkbox input {
	flex: 1;
	padding: 12px 14px;
	border: 1px solid var(--hc-border);
	border-radius: 9px;
	font-size: 14px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	background: #FAFAFB;
	color: var(--hc-text);
}
.hacoo-linkbox .hacoo-btn { flex: none; }

/* ---------- 优惠券 ---------- */
.hacoo-coupons {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
	gap: 14px;
}
.hacoo-coupon {
	border: 1px dashed #FCD34D;
	background: linear-gradient(135deg, #FFFBEB 0%, #FFF 60%);
	border-radius: 12px;
	padding: 16px;
	position: relative;
}
.hacoo-coupon-code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 17px;
	font-weight: 600;
	color: var(--hc-primary-dark);
	letter-spacing: 0.5px;
	margin-bottom: 6px;
}
.hacoo-coupon-meta {
	font-size: 12.5px;
	color: var(--hc-muted);
	display: flex;
	gap: 14px;
	margin-top: 8px;
}
.hacoo-coupon-off {
	position: absolute;
	right: 14px;
	top: 14px;
	background: var(--hc-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 9px;
	border-radius: 6px;
}

/* ---------- 商品推广网格 ---------- */
.hacoo-products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 16px;
}
.hacoo-product {
	border: 1px solid var(--hc-border);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.15s, transform 0.15s;
}
.hacoo-product:hover {
	box-shadow: 0 6px 18px rgba(17, 17, 26, 0.08);
	transform: translateY(-2px);
}
.hacoo-product img {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	background: #F3F4F6;
}
.hacoo-product-body { padding: 11px 13px 14px; }
.hacoo-product-name {
	font-size: 13.5px;
	font-weight: 500;
	margin: 0 0 6px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 38px;
}
.hacoo-product-price { color: var(--hc-primary); font-weight: 600; font-size: 14.5px; }
.hacoo-product-actions { margin-top: 10px; display: flex; gap: 6px; }

/* ---------- 阶梯表 ---------- */
.hacoo-tiers { width: 100%; border-collapse: collapse; }
.hacoo-tiers th {
	background: var(--hc-primary-soft);
	color: var(--hc-primary-dark);
	padding: 12px 16px;
	font-size: 13px;
	text-align: left;
	font-weight: 600;
}
.hacoo-tiers th:first-child { border-radius: 9px 0 0 9px; }
.hacoo-tiers th:last-child { border-radius: 0 9px 9px 0; }
.hacoo-tiers td {
	padding: 13px 16px;
	border-bottom: 1px solid #F1F2F4;
	font-size: 14.5px;
}
.hacoo-tiers tr.is-current td {
	background: #FFFBF0;
	font-weight: 500;
}
.hacoo-tiers tr.is-current td:first-child::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--hc-warning);
	margin-right: 9px;
	vertical-align: middle;
}
.hacoo-tiers .rate-cell { color: var(--hc-primary-dark); font-weight: 600; }

/* ---------- 进度条 ---------- */
.hacoo-progress {
	background: #EEF0F3;
	border-radius: 999px;
	height: 9px;
	overflow: hidden;
	margin: 12px 0 8px;
}
.hacoo-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, var(--hc-primary), var(--hc-accent));
	border-radius: 999px;
	transition: width 0.4s ease;
}
.hacoo-progress-label { font-size: 13px; color: var(--hc-muted); }

/* ---------- 空状态 ---------- */
.hacoo-empty {
	text-align: center;
	padding: 46px 20px;
	color: var(--hc-muted);
}
.hacoo-empty-ico {
	width: 52px;
	height: 52px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: #F3F4F6;
	display: flex;
	align-items: center;
	justify-content: center;
}
.hacoo-empty p { margin: 0 0 4px; font-size: 14.5px; }
.hacoo-empty small { font-size: 13px; opacity: 0.85; }

/* ---------- 提示条 ---------- */
.hacoo-notice {
	display: flex;
	gap: 11px;
	align-items: flex-start;
	background: var(--hc-primary-soft);
	border: 1px solid #FCD34D;
	border-radius: 11px;
	padding: 14px 16px;
	font-size: 13.8px;
	color: var(--hc-primary-dark);
	margin-bottom: 20px;
}
.hacoo-notice svg { flex: none; margin-top: 2px; }

/* 表格下方的一行小字说明（比 notice 更轻） */
.hacoo-note-line {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin-top: 14px;
	font-size: 12.8px;
	line-height: 1.6;
	color: #78716C;
}
.hacoo-note-line strong { color: var(--hc-primary-dark); }

/* ---------- 登录/注册居中 ---------- */
.hacoo-auth {
	max-width: 560px;
	margin: 30px auto;
}
.hacoo-auth-wide { max-width: 720px; }
.hacoo-auth-head { text-align: center; margin-bottom: 24px; }
.hacoo-auth-head h2 {
	margin: 0 0 7px;
	font-size: 25px;
	font-weight: 600;
}
.hacoo-auth-head p { margin: 0; color: var(--hc-muted); font-size: 14.5px; }
.hacoo-auth-foot {
	text-align: center;
	margin-top: 20px;
	font-size: 14px;
	color: var(--hc-muted);
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
	.hacoo-portal { grid-template-columns: 1fr; }
	.hacoo-nav { position: static; padding: 8px; }
	.hacoo-nav a { padding: 10px 12px; }
	.hacoo-form-grid { grid-template-columns: 1fr; }
	.hacoo-hero { padding: 26px 22px; }
	.hacoo-hero h1 { font-size: 22px; }
}
