/**
 * Home Helper Finder - Helper Dashboard
 *
 * File:
 * assets/css/hhf-helper-dashboard.css
 *
 * Dùng chung hệ token "Mái ấm" với các trang khác của
 * plugin. Bố cục dạng dashboard: sidebar điều hướng bên
 * trái, nội dung chính bên phải — tất cả class trong file
 * PHP gốc đã đủ để style, không cần sửa PHP.
 *
 * @package Home_Helper_Finder
 */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&family=Lora:ital,wght@0,600;0,700;1,600&display=swap');


/* =========================================================
   Design Tokens
   ========================================================= */

.hhf-dashboard {

	--hhf-font-display: 'Lora', 'Georgia', serif;
	--hhf-font-body: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--hhf-color-bg: #FBF6EC;
	--hhf-color-surface: #FFFFFF;
	--hhf-color-surface-soft: #F6F0E3;

	--hhf-color-ink: #23302A;
	--hhf-color-ink-soft: #5C6B62;
	--hhf-color-ink-faint: #8B9690;

	--hhf-color-primary: #1E6F53;
	--hhf-color-primary-dark: #124F3A;
	--hhf-color-primary-soft: #E4F0EA;

	--hhf-color-accent: #DE8A3B;
	--hhf-color-accent-dark: #B96C24;
	--hhf-color-accent-soft: #FBEAD2;

	--hhf-color-cta: #BE4F2C;
	--hhf-color-cta-dark: #9B3D20;

	--hhf-color-border: #E8DFCB;
	--hhf-color-border-soft: #F0E9D8;

	--hhf-radius-sm: 8px;
	--hhf-radius-md: 12px;
	--hhf-radius-lg: 18px;

	--hhf-shadow-sm: 0 2px 10px rgba(35, 48, 42, 0.06);
}

.hhf-dashboard,
.hhf-dashboard * {
	box-sizing: border-box;
}

.hhf-dashboard :focus-visible {
	outline: 2px solid var(--hhf-color-primary);
	outline-offset: 2px;
}


/* =========================================================
   Page Wrapper
   ========================================================= */

.hhf-dashboard {
	width: 100%;
	max-width: 1100px;
	margin: 40px auto;
	padding: 0 20px;

	color: var(--hhf-color-ink);
	font-family: var(--hhf-font-body);
}


/* =========================================================
   Dashboard Header
   ========================================================= */

.hhf-dashboard-header {
	position: relative;

	margin: 0 0 28px;
	padding: 30px 32px;

	background: linear-gradient(135deg, var(--hhf-color-primary) 0%, var(--hhf-color-primary-dark) 100%);

	border-radius: var(--hhf-radius-lg);

	box-shadow: var(--hhf-shadow-sm);

	overflow: hidden;
}

.hhf-dashboard-header::before {
	content: '';

	position: absolute;
	top: 0;
	left: 0;
	right: 0;

	height: 5px;

	background: repeating-linear-gradient(
		90deg,
		var(--hhf-color-accent) 0,
		var(--hhf-color-accent) 22px,
		rgba(255, 255, 255, 0.65) 22px,
		rgba(255, 255, 255, 0.65) 30px
	);
}

.hhf-dashboard-header h2 {
	margin: 0 0 8px;
	padding: 0;

	color: #FFFFFF;

	font-family: var(--hhf-font-display);
	font-size: 25px;
	font-weight: 700;
	line-height: 1.35;
}

.hhf-dashboard-header p {
	margin: 0;
	padding: 0;

	color: rgba(255, 255, 255, 0.85);

	font-size: 14.5px;
	line-height: 1.6;
}


/* =========================================================
   Dashboard Layout
   ========================================================= */

.hhf-dashboard-layout {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 22px;
	margin-bottom: 40px;
	align-items: start;
}


/* =========================================================
   Sidebar
   ========================================================= */

.hhf-dashboard-sidebar {
	position: sticky;
	top: 20px;
}

.hhf-dashboard-menu {
	display: flex;
	flex-direction: column;
	gap: 4px;

	padding: 12px;

	background: var(--hhf-color-surface);

	border: 1px solid var(--hhf-color-border);
	border-radius: var(--hhf-radius-lg);

	box-shadow: var(--hhf-shadow-sm);
}

.hhf-dashboard-menu a {
	display: flex;
	align-items: center;

	margin: 0;
	padding: 12px 14px;

	border-radius: var(--hhf-radius-sm);

	color: var(--hhf-color-ink-soft);

	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.4;

	text-decoration: none;

	transition:
		background-color 0.18s ease,
		color 0.18s ease;
}

.hhf-dashboard-menu a:hover {
	background: var(--hhf-color-surface-soft);
	color: var(--hhf-color-ink);
}

.hhf-dashboard-menu a.active {
	background: var(--hhf-color-primary-soft);
	color: var(--hhf-color-primary-dark);
}

.hhf-dashboard-menu a.hhf-dashboard-logout {
	margin-top: 8px;
	padding-top: 12px;

	border-top: 1px solid var(--hhf-color-border-soft);
	border-radius: 0;

	color: var(--hhf-color-cta-dark);
}

.hhf-dashboard-menu a.hhf-dashboard-logout:hover {
	background: var(--hhf-color-accent-soft);
	color: var(--hhf-color-cta-dark);
}


/* =========================================================
   Main Content
   ========================================================= */

.hhf-dashboard-content {
	min-width: 0;
}

.hhf-dashboard-section {
	display: flex;
	flex-direction: column;
	gap: 20px;
}


/* =========================================================
   Section Heading
   ========================================================= */

.hhf-section-heading h3 {
	margin: 0 0 4px;
	padding: 0;

	color: var(--hhf-color-primary-dark);

	font-family: var(--hhf-font-display);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.35;
}

.hhf-section-heading p {
	margin: 0;
	padding: 0;

	color: var(--hhf-color-ink-soft);

	font-size: 14px;
	line-height: 1.6;
}


/* =========================================================
   Stats Grid
   ========================================================= */

.hhf-dashboard-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.hhf-stat-card {
	padding: 22px 20px;

	background: var(--hhf-color-surface);

	border: 1px solid var(--hhf-color-border);
	border-radius: var(--hhf-radius-lg);

	box-shadow: var(--hhf-shadow-sm);

	text-align: center;
}

.hhf-stat-value {
	margin: 0 0 6px;

	color: var(--hhf-color-primary-dark);

	font-family: var(--hhf-font-display);
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
}

.hhf-stat-label {
	color: var(--hhf-color-ink-faint);

	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.4;

	text-transform: uppercase;
	letter-spacing: 0.04em;
}


/* =========================================================
   Generic Card
   ========================================================= */

.hhf-dashboard-card {
	padding: 26px 28px;

	background: var(--hhf-color-surface);

	border: 1px solid var(--hhf-color-border);
	border-radius: var(--hhf-radius-lg);

	box-shadow: var(--hhf-shadow-sm);
}

.hhf-dashboard-card h3 {
	margin: 0 0 8px;
	padding: 0;

	color: var(--hhf-color-ink);

	font-family: var(--hhf-font-display);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
}

.hhf-dashboard-card > p {
	margin: 0 0 18px;
	padding: 0;

	color: var(--hhf-color-ink-soft);

	font-size: 14px;
	line-height: 1.65;
}

.hhf-dashboard-card > p:last-child {
	margin-bottom: 0;
}


/* =========================================================
   Dashboard Button
   ========================================================= */

.hhf-dashboard-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	margin: 0;
	padding: 11px 22px;

	border: 0;
	border-radius: var(--hhf-radius-sm);

	background: var(--hhf-color-primary);
	color: #FFFFFF;

	font-family: var(--hhf-font-body);
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.4;

	text-decoration: none;

	cursor: pointer;

	box-shadow: 0 4px 12px rgba(30, 111, 83, 0.2);

	transition:
		background-color 0.18s ease,
		box-shadow 0.18s ease,
		transform 0.18s ease;
}

.hhf-dashboard-button:hover {
	background: var(--hhf-color-primary-dark);
	color: #FFFFFF;

	box-shadow: 0 6px 16px rgba(18, 79, 58, 0.24);

	transform: translateY(-1px);
}

.hhf-dashboard-button:focus-visible {
	box-shadow:
		0 0 0 3px var(--hhf-color-primary-soft),
		0 6px 16px rgba(18, 79, 58, 0.2);
}


/* =========================================================
   Profile Info (view: profile)
   ========================================================= */

.hhf-profile-info {
	display: flex;
	flex-direction: column;

	margin: 0 0 22px;
}

.hhf-profile-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;

	padding: 14px 0;

	border-bottom: 1px solid var(--hhf-color-border-soft);
}

.hhf-profile-row:first-child {
	padding-top: 0;
}

.hhf-profile-row:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.hhf-profile-label {
	color: var(--hhf-color-ink-faint);

	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.4;

	text-transform: uppercase;
	letter-spacing: 0.04em;

	white-space: nowrap;
}

.hhf-profile-value {
	color: var(--hhf-color-ink);

	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;

	text-align: right;
}

strong.hhf-profile-value {
	font-weight: 700;
}

.hhf-profile-actions {
	display: flex;
	justify-content: flex-end;
}


/* =========================================================
   Notice (edit shortcode not connected)
   ========================================================= */

.hhf-dashboard-notice {
	padding: 18px 20px;

	border: 1px dashed var(--hhf-color-border);
	border-radius: var(--hhf-radius-md);

	background: var(--hhf-color-surface-soft);

	color: var(--hhf-color-ink-soft);

	font-size: 14px;
	line-height: 1.6;

	text-align: center;
}

.hhf-dashboard-notice p {
	margin: 0;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 900px) {

	.hhf-dashboard-layout {
		grid-template-columns: 1fr;
	}

	.hhf-dashboard-sidebar {
		position: static;
	}

	.hhf-dashboard-menu {
		flex-direction: row;
		flex-wrap: wrap;

		gap: 6px;
	}

	.hhf-dashboard-menu a {
		flex: 1 1 auto;

		justify-content: center;

		text-align: center;
	}

	.hhf-dashboard-menu a.hhf-dashboard-logout {
		margin-top: 0;
		padding-top: 12px;

		border-top: none;
		border-left: 1px solid var(--hhf-color-border-soft);

		border-radius: var(--hhf-radius-sm);
	}
	
	.helper-dashboard-action-bottom
	{
		display:grid;
		margin-bottom: 10px;
		gap: 10px;
	}

}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 600px) {

	.hhf-dashboard {
		margin: 24px auto;
		padding: 0 14px;
	}

	.hhf-dashboard-header {
		padding: 24px 22px;
	}

	.hhf-dashboard-header h2 {
		font-size: 21px;
	}

	.hhf-dashboard-menu {
		flex-direction: column;
	}

	.hhf-dashboard-menu a.hhf-dashboard-logout {
		border-left: none;
		border-top: 1px solid var(--hhf-color-border-soft);

		border-radius: 0;
	}

	.hhf-dashboard-stats {
		grid-template-columns: 1fr;
	}

	.hhf-dashboard-card {
		padding: 20px;
	}

	.hhf-profile-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}

	.hhf-profile-value {
		text-align: left;
	}

	.hhf-profile-actions {
		justify-content: stretch;
	}

	.hhf-profile-actions .hhf-dashboard-button {
		width: 100%;
	}

}


/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

	.hhf-dashboard *,
	.hhf-dashboard *::before,
	.hhf-dashboard *::after {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}

}

