/**
 * PCTech Affiliate — CSS riêng cho form Đăng ký/Đăng nhập
 * File: assets/css/pctech-affiliate-auth.css
 *
 * CHỈ định nghĩa phần bố cục ĐẶC THÙ của form (thẻ chọn vai trò, 6 ô mã
 * PIN, khối field có điều kiện) — KHÔNG viết lại button/input/font, vì
 * những phần đó ĐÃ có sẵn trong 13-buttons.css/14-section-common.css
 * và 00-design-tokens-and-reset.css (đã enqueue trước file này).
 *
 * Dùng var(--navy)/var(--orange) đã khai báo trong design-tokens — có
 * fallback hex phòng khi tên biến thực tế khác, không hardcode màu lạ.
 */

.pctech-aff-auth-box {
	max-width: 460px;
	margin: 56px auto 40px;
	padding: 32px;
	border-radius: 14px;
	box-shadow: 0 4px 24px rgba(11, 37, 69, 0.08);
}

/* Ghi đè riêng cho tiêu đề trong box đăng ký/đăng nhập — .section-title
   gốc thiết kế cho section lớn trang chủ, quá to cho 1 form nhỏ. Dùng
   selector cụ thể theo ID box để không ảnh hưởng .section-title ở nơi khác. */
#pctech-aff-register-app h2.section-title,
#pctech-aff-login-app h2.section-title {
	font-size: 26px;
	line-height: 1.3;
	margin: 0 0 20px;
}

.pctech-aff-field {
	margin-bottom: 16px;
}

.pctech-aff-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--navy, #0B2545);
}

.pctech-aff-required {
	color: var(--orange, #F58220);
	margin-left: 2px;
}

.pctech-aff-field input[type="text"],
.pctech-aff-field input[type="tel"],
.pctech-aff-field input[type="email"],
.pctech-aff-field input[type="password"],
.pctech-aff-field textarea,
.pctech-aff-field select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid rgba(11, 37, 69, 0.15);
	border-radius: 10px;
	background: #fff;
	font: inherit; /* Kế thừa font hệ thống, không tự đặt font riêng. */
}

.pctech-aff-field input:focus,
.pctech-aff-field textarea:focus,
.pctech-aff-field select:focus {
	outline: none;
	border-color: var(--orange, #F58220);
}

.pctech-aff-role-choices {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.pctech-aff-role-card {
	border: 1px solid rgba(11, 37, 69, 0.15);
	border-radius: 10px;
	padding: 10px 16px;
	cursor: pointer;
	font-weight: 500;
	transition: border-color .15s ease, background .15s ease;
}

.pctech-aff-role-card:has(input:checked) {
	border-color: var(--orange, #F58220);
	background: rgba(245, 130, 32, 0.08);
}

.pctech-aff-conditional {
	border-left: 3px solid var(--orange, #F58220);
	padding-left: 14px;
	margin: 14px 0;
}

.pctech-aff-hint {
	font-size: 12.5px;
	opacity: .75;
}

.pctech-aff-error {
	color: #DC2626;
	font-size: 13.5px;
	min-height: 18px;
}

.pctech-aff-pin-boxes {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin: 18px 0;
}

.pctech-aff-pin-box {
	width: 46px;
	height: 54px;
	text-align: center;
	font-size: 24px;
	font: inherit;
	border: 1px solid rgba(11, 37, 69, 0.15);
	border-radius: 10px;
}

.pctech-aff-pin-box:focus {
	border-color: var(--orange, #F58220);
	outline: none;
}

/* ═══ Dashboard ═══ */

.pctech-aff-dashboard {
	max-width: 900px;
	margin: 56px auto 40px;
	padding: 0 16px;
}

.pctech-aff-dashboard h1 {
	color: var(--navy, #0B2545);
	font-size: 26px;
	margin: 0 0 20px;
}

.pctech-aff-referral-box {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 4px 24px rgba(11, 37, 69, 0.08);
	padding: 20px 24px;
	margin-bottom: 24px;
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}

.pctech-aff-referral-box input {
	flex: 1;
	min-width: 220px;
	padding: 10px 12px;
	border: 1px solid rgba(11, 37, 69, 0.15);
	border-radius: 10px;
	font: inherit;
	background: #F8FAFC;
}

.pctech-aff-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
	margin-bottom: 24px;
}

.pctech-aff-stat-card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(11, 37, 69, 0.08);
	padding: 16px 18px;
}

.pctech-aff-stat-card .label {
	font-size: 12.5px;
	color: #64748B;
	margin-bottom: 4px;
}

.pctech-aff-stat-card .value {
	font-size: 22px;
	font-weight: 700;
	color: #0B2545;
}

.pctech-aff-stat-card.highlight .value {
	color: var(--orange, #F58220);
}

.pctech-aff-dashboard table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(11, 37, 69, 0.08);
	margin-bottom: 24px;
}

.pctech-aff-dashboard table th,
.pctech-aff-dashboard table td {
	padding: 10px 14px;
	text-align: left;
	font-size: 13.5px;
	border-bottom: 1px solid #F1F5F9;
}

.pctech-aff-dashboard table th {
	background: #F8FAFC;
	color: #64748B;
	font-weight: 600;
}

.pctech-aff-dashboard h2 {
	color: var(--navy, #0B2545);
	font-size: 18px;
	margin: 24px 0 12px;
}

.pctech-aff-btn-secondary {
	display: inline-block;
	border: 1px solid var(--navy, #0B2545);
	color: var(--navy, #0B2545);
	background: transparent;
	padding: 10px 20px;
	border-radius: 8px;
	font-weight: 600;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}

.pctech-aff-btn-secondary:hover {
	background: var(--navy, #0B2545);
	color: #fff;
}

.pctech-aff-link-row {
	margin: 10px 0;
	font-size: 14px;
}

.pctech-aff-link-cta {
	color: var(--orange, #F58220);
	font-weight: 600;
	text-decoration: underline;
}

.pctech-aff-link-cta:hover {
	color: var(--navy, #0B2545);
}

.pctech-aff-qr-box {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(11, 37, 69, 0.08);
	padding: 16px;
	margin-bottom: 24px;
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.pctech-aff-bank-summary {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(11, 37, 69, 0.08);
	padding: 14px 18px;
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.pctech-aff-bank-summary p {
	margin: 0;
}

.pctech-aff-ob-results {
	border: 1px solid #E2E8F0;
	border-radius: 8px;
	max-height: 200px;
	overflow-y: auto;
	background: #fff;
	margin-top: 4px;
	position: relative;
	z-index: 5;
}

.pctech-aff-ob-result-row {
	padding: 8px 12px;
	cursor: pointer;
	font-size: 13.5px;
	border-bottom: 1px solid #F1F5F9;
}

.pctech-aff-ob-result-row:hover {
	background: #F8FAFC;
}

/* ═══ Menu dọc (sidebar) ═══ */

.pctech-aff-dashboard-layout {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	margin-top: 16px;
}

.pctech-aff-sidebar {
	flex: 0 0 200px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(11, 37, 69, 0.08);
	padding: 10px;
	position: sticky;
	top: 16px;
}

.pctech-aff-sidebar-item {
	display: block;
	width: 100%;
	text-align: left;
	background: transparent;
	border: none;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #64748B;
	cursor: pointer;
}

.pctech-aff-sidebar-item:hover {
	background: #F8FAFC;
}

.pctech-aff-sidebar-item.pctech-aff-active {
	background: var(--navy, #0B2545);
	color: #fff;
}

.pctech-aff-tab-content {
	flex: 1;
	min-width: 0;
}

@media (max-width: 720px) {
	.pctech-aff-dashboard-layout {
		flex-direction: column;
	}
	.pctech-aff-sidebar {
		flex-direction: row;
		flex-wrap: nowrap;
		overflow-x: auto;
		width: 100%;
		position: static;
		gap: 6px;
	}
	.pctech-aff-sidebar-item {
		flex: 0 0 auto;
		white-space: nowrap;
	}
	.pctech-aff-sidebar-promo {
		display: none; /* Ẩn trên mobile để đỡ chiếm chỗ thanh cuộn ngang. */
	}
}

/* ═══ Header redesign ═══ */

.pctech-aff-dashboard-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}

.pctech-aff-dashboard-header h1 {
	margin: 0;
	font-size: 24px;
}

.pctech-aff-header-sub {
	color: #64748B;
	margin: 4px 0 0;
	font-size: 13.5px;
}

.pctech-aff-header-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.pctech-aff-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--navy, #0B2545);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 16px;
}

/* ═══ Sidebar icon + promo card ═══ */

.pctech-aff-sidebar-icon {
	display: inline-block;
	width: 20px;
	text-align: center;
	margin-right: 6px;
}

.pctech-aff-sidebar-promo {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #F1F5F9;
	text-align: center;
}

.pctech-aff-sidebar-promo-icon {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	background: var(--navy, #0B2545);
	color: var(--orange, #F58220);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	margin: 0 auto 8px;
}

.pctech-aff-sidebar-promo strong {
	display: block;
	color: #0B2545;
	font-size: 13.5px;
	margin-bottom: 4px;
}

.pctech-aff-sidebar-promo p {
	font-size: 12px;
	color: #64748B;
	margin: 0 0 10px;
}

.pctech-aff-sidebar-promo-btn {
	display: inline-block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--orange, #F58220);
}

/* ═══ Card chung (dùng cho Link/QR/Biểu đồ/Hoa hồng gần đây) ═══ */

.pctech-aff-card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(11, 37, 69, 0.08);
	padding: 20px;
	flex: 1;
	min-width: 0;
}

.pctech-aff-card-title {
	font-size: 13px;
	letter-spacing: 0.03em;
	color: #64748B;
	margin: 0 0 14px;
	text-transform: uppercase;
}

.pctech-aff-link-qr-row {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.pctech-aff-link-qr-row .pctech-aff-card {
	flex-basis: 340px;
}

.pctech-aff-share-label {
	font-size: 12.5px;
	color: #64748B;
	margin: 14px 0 6px;
}

.pctech-aff-share-icons {
	display: flex;
	gap: 8px;
}

.pctech-aff-share-btn {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	border: none;
	cursor: pointer;
	text-decoration: none;
}

/* ═══ Stat card icon ═══ */

.pctech-aff-stat-icon {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	margin-bottom: 10px;
}

/* ═══ Biểu đồ + Hoa hồng gần đây ═══ */

.pctech-aff-chart-recent-row {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 24px;
	align-items: stretch;
}

.pctech-aff-chart-card {
	flex: 2;
	min-width: 320px;
}

.pctech-aff-chart-recent-row > .pctech-aff-card:last-child {
	flex: 1;
	min-width: 260px;
}

.pctech-aff-chart-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.pctech-aff-chart-header select {
	padding: 6px 10px;
	border-radius: 8px;
	border: 1px solid #E2E8F0;
	font-size: 13px;
}

.pctech-aff-chart-metrics {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #F1F5F9;
}

.pctech-aff-chart-metrics .label {
	font-size: 12px;
	color: #64748B;
}

.pctech-aff-chart-metrics .value {
	font-size: 18px;
	font-weight: 700;
	color: #0B2545;
}

.pctech-aff-chart-metrics .change {
	font-size: 12px;
	font-weight: 600;
}

.pctech-aff-empty-state {
	text-align: center;
	padding: 30px 10px;
}

.pctech-aff-empty-icon {
	font-size: 40px;
	margin-bottom: 10px;
}

.pctech-aff-empty-state strong {
	display: block;
	color: #0B2545;
	margin-bottom: 4px;
}

.pctech-aff-empty-state p {
	font-size: 12.5px;
	color: #64748B;
	margin: 0;
}

/* ═══ Trang Giới thiệu Chương trình ═══ */

.pctech-aff-intro-page {
	max-width: 900px;
	margin: 40px auto;
	padding: 0 16px;
}

.pctech-aff-intro-hero {
	text-align: center;
	padding: 40px 20px;
	background: var(--navy, #0B2545);
	border-radius: 16px;
	color: #fff;
	margin-bottom: 32px;
}

.pctech-aff-intro-hero h1 {
	margin: 0 0 12px;
	font-size: 28px;
}

.pctech-aff-intro-hero p {
	max-width: 560px;
	margin: 0 auto 20px;
	opacity: 0.9;
}

.pctech-aff-intro-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
	margin-bottom: 32px;
}

.pctech-aff-intro-step {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(11, 37, 69, 0.08);
	padding: 20px;
	display: flex;
	gap: 14px;
}

.pctech-aff-intro-step .num {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--orange, #F58220);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	flex-shrink: 0;
}

.pctech-aff-intro-step strong {
	display: block;
	color: #0B2545;
	margin-bottom: 4px;
}

.pctech-aff-intro-step p {
	font-size: 13.5px;
	color: #64748B;
	margin: 0;
}

.pctech-aff-intro-faq {
	margin-bottom: 32px;
}

.pctech-aff-faq-item {
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 2px 12px rgba(11, 37, 69, 0.06);
	margin-bottom: 10px;
	overflow: hidden;
}

.pctech-aff-faq-question {
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	padding: 16px 18px;
	font-weight: 600;
	color: #0B2545;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 14.5px;
}

.pctech-aff-faq-arrow {
	transition: transform 0.2s ease;
}

.pctech-aff-faq-open .pctech-aff-faq-arrow {
	transform: rotate(180deg);
}

.pctech-aff-faq-answer {
	padding: 0 18px 16px;
	color: #475569;
	font-size: 13.5px;
}

.pctech-aff-intro-cta {
	text-align: center;
}
