/* ============================================================
   Ecohomes Projects — Frontend & Admin Styles
   Reference: "Proyek Saya" 2026 UI (green brand kept).
   Depends on CSS variables defined in ecohomes-core:
   --eh-green, --eh-green-dark, --eh-radius, --eh-shadow, etc.
   ============================================================ */

.eh-projects-wrap {
	flex: 1;
	min-width: 0;
	--eh-ink:       #1E293B;
	--eh-muted:     #64748B;
	--eh-line:      #EDF0F4;
	--eh-track:     #EAECF0;
	--eh-tint:      #EAF8F0;
	--eh-card-sh:   0 1px 2px rgba(16,24,40,.05);
	color: var(--eh-ink);
}

/* ── Buttons ───────────────────────────────────────────────── */
.eh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 18px;
	border-radius: var(--eh-radius, 8px);
	font-size: .875rem;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid transparent;
	text-decoration: none;
	line-height: 1.2;
	transition: background .15s, color .15s, border-color .15s, box-shadow .15s, opacity .15s;
}

.eh-btn-primary {
	background: var(--eh-green, #2ECC71);
	color: #fff;
	border-color: var(--eh-green, #2ECC71);
}
.eh-btn-primary:hover,
.eh-btn-primary:focus {
	background: var(--eh-green-dark, #27AE60);
	border-color: var(--eh-green-dark, #27AE60);
	color: #fff;
}

.eh-btn-outline {
	background: #fff;
	color: var(--eh-ink, #1E293B);
	border-color: #DCE1E8;
}
.eh-btn-outline:hover {
	background: var(--eh-tint, #EAF8F0);
	color: var(--eh-green-dark, #27AE60);
	border-color: var(--eh-green, #2ECC71);
}

.eh-btn-sm {
	padding: 7px 14px;
	font-size: .8rem;
}
.eh-btn:disabled { opacity: .65; cursor: not-allowed; }
.eh-btn .dashicons { font-size: 16px; width: 16px; height: 16px; }

/* ── Page header ───────────────────────────────────────────── */
.eh-projects-header {
	align-items: flex-start;
	gap: 16px;
}
.eh-projects-header .eh-page-title { font-size: 1.5rem; color: var(--eh-ink); margin: 0; }
.eh-page-subtitle { margin: 6px 0 0; color: var(--eh-muted); font-size: .9rem; max-width: 620px; }
.eh-header-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	flex-shrink: 0;
}
.eh-last-updated { font-size: .78rem; color: var(--eh-muted); white-space: nowrap; }

/* ── Stat cards ────────────────────────────────────────────── */
.eh-stats-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }

.eh-stats-4 .eh-stat-card {
	position: relative;
	display: grid;
	grid-template-columns: 44px 1fr;
	grid-template-areas: "icon label" "icon value" "link link";
	column-gap: 12px;
	row-gap: 2px;
	text-align: left;
	background: #fff;
	border: 1px solid var(--eh-line);
	border-radius: 12px;
	box-shadow: var(--eh-card-sh);
	padding: 16px;
}
.eh-stats-4 .eh-stat-icon {
	grid-area: icon;
	position: static;
	width: 44px;
	height: 44px;
	border-radius: 11px;
	background: var(--eh-tint);
	color: var(--eh-green-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
}
.eh-stats-4 .eh-stat-label { grid-area: label; align-self: end; font-size: .8rem; color: var(--eh-muted); margin: 0; }
.eh-stats-4 .eh-stat-value { grid-area: value; align-self: start; font-size: 1.7rem; font-weight: 700; color: var(--eh-ink); line-height: 1.1; }
.eh-stat-link {
	grid-area: link;
	margin-top: 12px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-size: .8rem;
	font-weight: 600;
	color: var(--eh-green-dark);
}
.eh-stat-link .dashicons { font-size: 15px; width: 15px; height: 15px; transition: transform .15s; }
.eh-stat-link:hover { color: var(--eh-green); }
.eh-stat-link:hover .dashicons { transform: translateX(3px); }
.eh-stat-card--success .eh-stat-icon { background: #E8F8EF; color: #1E9E59; }

/* ── Widen the account content area on the Proyek Saya page only.
   Molla caps the WC content column at 70%; the horizontal cards need
   far more room to match the reference. Scoped with :has() so other
   account endpoints keep their original width. ── */
.woocommerce-account .container:has(.eh-projects-wrap) { width: 100% !important; max-width: 1360px !important; }
.woocommerce-account .dashboard-wrap:has(.eh-projects-wrap) > [class*="col-"]:first-child { flex: 0 0 19%; max-width: 19%; }
.woocommerce-account .dashboard-wrap:has(.eh-projects-wrap) > [class*="col-"]:last-child { flex: 0 0 81%; max-width: 81%; }

/* ── Two-column layout ─────────────────────────────────────── */
.eh-projects-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.eh-projects-main { min-width: 0; container-type: inline-size; container-name: ehmain; }

/* ── Status tabs (pills) ───────────────────────────────────── */
.eh-status-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.eh-status-tab {
	background: #fff;
	border: 1px solid var(--eh-line);
	padding: 8px 16px;
	font-size: .82rem;
	font-weight: 500;
	color: var(--eh-muted);
	cursor: pointer;
	border-radius: 999px;
	transition: all .15s;
}
.eh-status-tab:hover { color: var(--eh-green-dark); border-color: var(--eh-green); }
.eh-status-tab--active {
	background: var(--eh-green);
	border-color: var(--eh-green);
	color: #fff;
	font-weight: 600;
}

/* ── Filter bar ────────────────────────────────────────────── */
.eh-filter-bar {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
	background: #fff;
	border: 1px solid var(--eh-line);
	border-radius: 12px;
	box-shadow: var(--eh-card-sh);
	padding: 12px;
	margin-bottom: 14px;
}

.eh-filter-select {
	height: 40px;
	padding: 0 12px;
	border: 1px solid #DCE1E8;
	border-radius: 8px;
	font-size: .85rem;
	color: var(--eh-ink);
	background: #fff;
	cursor: pointer;
}
.eh-filter-select:focus {
	outline: none;
	border-color: var(--eh-green, #2ECC71);
	box-shadow: 0 0 0 3px rgba(46,204,113,.15);
}

.eh-filter-search { position: relative; flex: 1; min-width: 220px; }
.eh-filter-search .dashicons { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94A3B8; font-size: 18px; }
.eh-search-input {
	width: 100%;
	height: 40px;
	padding: 0 12px 0 38px;
	border: 1px solid #DCE1E8;
	border-radius: 8px;
	font-size: .85rem;
	color: var(--eh-ink);
	background: #fff;
	box-sizing: border-box;
}
.eh-search-input:focus {
	outline: none;
	border-color: var(--eh-green, #2ECC71);
	box-shadow: 0 0 0 3px rgba(46,204,113,.15);
}

.eh-filter-extra { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; padding: 12px; background: #fff; border: 1px solid var(--eh-line); border-radius: 12px; }
.eh-filter-extra[hidden], .eh-cover-preview[hidden], .eh-docs-progress[hidden] { display: none !important; }

/* ── Result count + sort ───────────────────────────────────── */
.eh-result-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}
.eh-result-count { font-size: .85rem; color: var(--eh-muted); }
.eh-sort-wrap { display: inline-flex; align-items: center; gap: 8px; }
.eh-sort-label { font-size: .85rem; color: var(--eh-muted); }
.eh-sort-select { height: 38px; }

/* ── Project list (horizontal cards) ───────────────────────── */
.eh-projects-grid { display: flex; flex-direction: column; gap: 16px; }
.eh-projects-grid.eh-loading { opacity: .5; pointer-events: none; }

.eh-project-card {
	display: grid;
	grid-template-columns: 180px minmax(0, 1.4fr) minmax(0, 1.15fr) 184px;
	gap: 18px;
	align-items: stretch;
	background: #fff;
	border: 1px solid var(--eh-line);
	border-radius: 14px;
	box-shadow: var(--eh-card-sh);
	padding: 16px;
	transition: box-shadow .2s, border-color .2s;
}
.eh-project-card:hover { box-shadow: 0 8px 24px rgba(16,24,40,.08); border-color: #DDE3EC; }
.eh-project-cancelled { opacity: .6; }

/* Thumbnail */
.eh-project-thumb {
	position: relative;
	width: 190px;
	height: 150px;
	border-radius: 10px;
	overflow: hidden;
	background: var(--eh-track);
	flex-shrink: 0;
}
.eh-project-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eh-project-thumb-placeholder {
	display: flex; align-items: center; justify-content: center; height: 100%;
}
.eh-project-icon { font-size: 46px; }
.eh-photo-count {
	position: absolute;
	left: 8px;
	bottom: 8px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: rgba(15,23,42,.72);
	color: #fff;
	font-size: .72rem;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 8px;
}
.eh-photo-count .dashicons { font-size: 14px; width: 14px; height: 14px; }
.eh-approval-badge {
	position: absolute; top: 8px; left: 8px;
	background: #FFF3CD; color: #8A6D1B;
	font-size: .68rem; font-weight: 600; padding: 3px 8px; border-radius: 6px;
}

/* Col 1 — identity + progress */
.eh-project-info { display: flex; flex-direction: column; min-width: 0; }
.eh-project-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.eh-project-name { font-size: 1.05rem; font-weight: 700; color: var(--eh-ink); margin: 0; line-height: 1.3; }
.eh-fav-btn { background: none; border: none; cursor: pointer; color: #CBD5E1; padding: 2px; line-height: 1; }
.eh-fav-btn:hover, .eh-fav-btn.is-fav { color: #F4B400; }

.eh-meta-line {
	display: flex; align-items: center; gap: 6px;
	font-size: .82rem; color: var(--eh-muted); margin: 6px 0 0;
}
.eh-meta-line .dashicons { font-size: 16px; width: 16px; height: 16px; color: #94A3B8; flex-shrink: 0; }

.eh-progress-block { margin-top: auto; padding-top: 14px; }
.eh-progress-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.eh-progress-label { font-size: .78rem; color: var(--eh-muted); }
.eh-progress-pct { font-size: .8rem; font-weight: 700; color: var(--eh-ink); }
.eh-progress-track { height: 7px; background: var(--eh-track); border-radius: 999px; overflow: hidden; }
.eh-progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2ECC71, #27AE60); transition: width .4s ease; }

/* Col 2 — needs + budget */
.eh-project-needs-col { display: flex; flex-direction: column; min-width: 0; }
.eh-col-label { font-size: .72rem; font-weight: 600; color: var(--eh-muted); display: block; }
.eh-needs-list { list-style: none; margin: 6px 0 14px; padding: 0; }
.eh-needs-list li {
	display: flex; align-items: center; gap: 6px;
	font-size: .82rem; color: #334155; margin-bottom: 5px;
}
.eh-needs-list .dashicons { font-size: 16px; width: 16px; height: 16px; color: var(--eh-green); flex-shrink: 0; }
.eh-budget-value { font-size: .9rem; font-weight: 700; color: var(--eh-ink); margin: 5px 0 0; }

/* Col 3 — status + update + actions */
.eh-project-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.eh-update-block { text-align: right; }
.eh-update-block .eh-col-label { text-align: right; }
.eh-update-date { font-size: .85rem; font-weight: 600; color: var(--eh-ink); margin: 2px 0 0; }
.eh-project-side .eh-project-actions {
	display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center;
	gap: 8px; margin-top: auto; padding: 0; border: none;
}
.eh-project-actions-secondary { display: flex; gap: 6px; }
.eh-icon-btn {
	background: #F8FAFC; border: 1px solid var(--eh-line); border-radius: 8px;
	width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
	cursor: pointer; color: var(--eh-muted); transition: all .15s;
}
.eh-icon-btn:hover { background: #EEF2F6; color: var(--eh-ink); }
.eh-icon-btn-danger:hover { background: #FEF2F2; color: #DC2626; border-color: #FECACA; }

/* ── Empty state ───────────────────────────────────────────── */
.eh-empty-state {
	text-align: center; padding: 60px 24px; background: #fff;
	border: 1px solid var(--eh-line); border-radius: 14px; box-shadow: var(--eh-card-sh);
}
.eh-empty-icon { font-size: 56px !important; width: 56px !important; height: 56px !important; color: #CBD5E1; display: block; margin: 0 auto 16px; }
.eh-empty-title { font-size: 1.1rem; font-weight: 700; color: var(--eh-ink); margin: 0 0 8px; }
.eh-empty-desc { color: var(--eh-muted); font-size: .875rem; margin: 0 0 20px; }

/* ── Pagination ────────────────────────────────────────────── */
.eh-pagination { margin-top: 28px; display: flex; justify-content: center; gap: 6px; }
.eh-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 38px; height: 38px; padding: 0 10px; border-radius: 8px;
	font-size: .85rem; border: 1px solid var(--eh-line); color: var(--eh-ink);
	text-decoration: none; transition: all .15s; background: #fff;
}
.eh-pagination .page-numbers:hover,
.eh-pagination .page-numbers.current {
	background: var(--eh-green); color: #fff; border-color: var(--eh-green);
}

/* ── Sidebar ───────────────────────────────────────────────── */
.eh-projects-sidebar { display: flex; flex-direction: column; gap: 16px; }
.eh-side-card { background: #fff; border: 1px solid var(--eh-line); border-radius: 14px; padding: 16px; box-shadow: var(--eh-card-sh); }
.eh-side-title { font-size: 1rem; font-weight: 700; margin: 0 0 14px; color: var(--eh-ink); }

/* Aksi Cepat — action items */
.eh-action-item {
	display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
	background: #F8FAFC; border: 1px solid var(--eh-line); border-radius: 10px;
	padding: 11px 12px; margin-bottom: 10px; cursor: pointer; text-decoration: none;
	transition: all .15s;
}
.eh-action-item:last-child { margin-bottom: 0; }
.eh-action-item:hover { background: var(--eh-tint); border-color: var(--eh-green); }
.eh-action-ico {
	width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px;
	background: var(--eh-tint); color: var(--eh-green-dark);
	display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.eh-action-text { flex: 1; min-width: 0; }
.eh-action-text strong { display: block; font-size: .85rem; color: var(--eh-ink); }
.eh-action-text small { display: block; font-size: .74rem; color: var(--eh-muted); margin-top: 1px; }
.eh-action-go { color: #CBD5E1; font-size: 18px; flex-shrink: 0; }
.eh-action-item:hover .eh-action-go { color: var(--eh-green); }

/* Tips & Informasi */
.eh-tip-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--eh-line); }
.eh-tip-item:first-of-type { border-top: none; padding-top: 0; }
.eh-tip-ico {
	width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px;
	background: var(--eh-tint); color: var(--eh-green-dark);
	display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.eh-tip-body { min-width: 0; }
.eh-tip-body strong { display: block; font-size: .85rem; color: var(--eh-ink); line-height: 1.3; }
.eh-tip-body p { margin: 3px 0 6px; font-size: .76rem; color: var(--eh-muted); line-height: 1.45; }
.eh-tip-body a {
	display: inline-flex; align-items: center; gap: 3px;
	font-size: .78rem; font-weight: 600; color: var(--eh-green-dark); text-decoration: none;
}
.eh-tip-body a .dashicons { font-size: 14px; width: 14px; height: 14px; transition: transform .15s; }
.eh-tip-body a:hover { color: var(--eh-green); }
.eh-tip-body a:hover .dashicons { transform: translateX(3px); }

/* ── Modal ─────────────────────────────────────────────────── */
.eh-modal-overlay {
	position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 9999;
	display: flex; align-items: center; justify-content: center; padding: 20px;
	opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.eh-modal-overlay.eh-modal-open { opacity: 1; visibility: visible; }
.eh-modal {
	background: #fff; border-radius: 14px; width: 100%; max-width: 560px; max-height: 90vh;
	display: flex; flex-direction: column; overflow: hidden;
	transform: translateY(20px); transition: transform .2s;
}
.eh-modal-overlay.eh-modal-open .eh-modal { transform: translateY(0); }
.eh-modal-header {
	display: flex; align-items: center; justify-content: space-between;
	padding: 16px 20px; border-bottom: 1px solid var(--eh-line);
}
.eh-modal-title { font-size: 1.05rem; font-weight: 700; margin: 0; color: var(--eh-ink); }
.eh-modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--eh-muted); line-height: 1; padding: 4px; border-radius: 6px; }
.eh-modal-close:hover { color: var(--eh-ink); background: #F1F5F9; }
.eh-modal-body { overflow-y: auto; padding: 20px; }

/* ── Form ──────────────────────────────────────────────────── */
.eh-form-row { margin-bottom: 14px; }
.eh-form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eh-form-label { display: block; font-size: .82rem; font-weight: 600; color: var(--eh-ink); margin-bottom: 5px; }
.eh-required { color: #DC2626; margin-left: 2px; }
.eh-form-input, .eh-form-select {
	width: 100%; height: 40px; padding: 0 12px;
	border: 1px solid #DCE1E8; border-radius: 8px; font-size: .875rem;
	color: var(--eh-ink); background: #fff; box-sizing: border-box;
	transition: border-color .15s, box-shadow .15s;
}
textarea.eh-form-input { height: auto; padding: 10px 12px; }
.eh-form-input:focus, .eh-form-select:focus {
	outline: none; border-color: var(--eh-green, #2ECC71); box-shadow: 0 0 0 3px rgba(46,204,113,.15);
}
.eh-form-input-file { display: block; font-size: .85rem; color: var(--eh-ink); }
.eh-cover-preview { margin-top: 10px; }
.eh-cover-preview img { max-width: 100%; max-height: 160px; border-radius: 8px; border: 1px solid var(--eh-line); display: block; }
.eh-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--eh-line); }

/* Loading spinner (inline with button) */
.eh-btn-loading::before {
	content: ''; display: inline-block; width: 14px; height: 14px;
	border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%;
	animation: eh-spin .6s linear infinite; margin-right: 6px;
}
@keyframes eh-spin { to { transform: rotate(360deg); } }

/* ── Detail popup ──────────────────────────────────────────── */
.eh-detail-loading { padding: 40px; text-align: center; color: var(--eh-muted); }
.eh-detail-cover { margin-bottom: 16px; border-radius: 10px; overflow: hidden; }
.eh-detail-cover img { width: 100%; max-height: 220px; object-fit: cover; display: block; }
.eh-detail-table { width: 100%; border-collapse: collapse; }
.eh-detail-table th { text-align: left; width: 150px; padding: 8px 12px 8px 0; vertical-align: top; color: var(--eh-muted); font-size: .82rem; font-weight: 600; }
.eh-detail-table td { padding: 8px 0; color: var(--eh-ink); font-size: .88rem; border-bottom: 1px solid var(--eh-line); }
.eh-detail-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ── Documents popup ───────────────────────────────────────── */
.eh-docs-upload-zone { border: 2px dashed #CBD5E1; border-radius: 10px; padding: 24px; text-align: center; cursor: pointer; color: var(--eh-muted); transition: all .2s; margin-bottom: 12px; }
.eh-docs-upload-zone:hover { border-color: var(--eh-green); background: var(--eh-tint); }
.eh-docs-upload-zone .dashicons { font-size: 28px; color: #94A3B8; }
.eh-docs-upload-zone p { margin: 6px 0 0; font-size: .82rem; }
.eh-docs-progress { height: 4px; background: var(--eh-track); border-radius: 2px; overflow: hidden; margin-bottom: 12px; }
.eh-docs-progress-bar { height: 100%; width: 0; background: var(--eh-green); transition: width .2s; }
.eh-docs-list { display: flex; flex-direction: column; gap: 8px; }
.eh-docs-empty { text-align: center; color: #94A3B8; padding: 16px; font-size: .85rem; }
.eh-doc-item { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--eh-line); border-radius: 10px; }
.eh-doc-preview { flex-shrink: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: #F1F5F9; border-radius: 8px; overflow: hidden; }
.eh-doc-preview img { width: 100%; height: 100%; object-fit: cover; }
.eh-doc-preview .dashicons { font-size: 26px; color: #DC2626; }
.eh-doc-name { flex: 1; font-size: .82rem; color: #334155; word-break: break-word; }

/* ── Toast notification ────────────────────────────────────── */
.eh-toast {
	position: fixed; bottom: 24px; right: 24px; background: var(--eh-ink, #1E293B); color: #fff;
	padding: 12px 20px; border-radius: 10px; font-size: .875rem; z-index: 10000;
	box-shadow: 0 8px 24px rgba(0,0,0,.2); transform: translateY(20px); opacity: 0;
	transition: opacity .25s, transform .25s; max-width: 340px;
}
.eh-toast.eh-toast-show { opacity: 1; transform: translateY(0); }
.eh-toast-success { background: var(--eh-green-dark, #27AE60); }
.eh-toast-error   { background: #DC2626; }

/* Neutralize theme quantity-stepper on numeric text fields */
.eh-no-spinner { -moz-appearance: textfield; appearance: textfield; }
.eh-no-spinner::-webkit-outer-spin-button,
.eh-no-spinner::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ── Card responsiveness — driven by the MAIN column's own width
   (container query), not the viewport, because the theme can make the
   column narrow even on wide screens. ── */

/* Medium: image left (spanning), info+needs stacked centre, side row below. */
@container ehmain (max-width: 720px) {
	.eh-project-card {
		grid-template-columns: 160px minmax(0, 1fr) minmax(0, 1fr);
		grid-template-areas: "thumb info needs" "thumb side side";
		row-gap: 14px;
	}
	.eh-project-thumb { grid-area: thumb; width: 160px; height: 100%; min-height: 150px; }
	.eh-project-info { grid-area: info; }
	.eh-project-needs-col { grid-area: needs; }
	.eh-project-side { grid-area: side; flex-direction: row; flex-wrap: wrap; align-items: center; }
	.eh-project-side .eh-update-block { margin-left: auto; }
	.eh-update-block, .eh-update-block .eh-col-label { text-align: left; }
	.eh-project-side .eh-project-actions { width: 100%; justify-content: flex-start; margin-top: 0; }
}

/* Narrow: full stack. */
@container ehmain (max-width: 480px) {
	.eh-project-card {
		grid-template-columns: 1fr;
		grid-template-areas: "thumb" "info" "needs" "side";
	}
	.eh-project-thumb { width: 100%; height: 180px; }
	.eh-progress-block { margin-top: 12px; }
	.eh-project-side { flex-direction: column; align-items: stretch; }
	.eh-project-side .eh-badge { align-self: flex-start; }
	.eh-project-side .eh-update-block { margin-left: 0; }
	.eh-project-side .eh-project-actions .eh-btn { flex: 1 1 auto; }
}

/* ── Viewport responsiveness — page chrome (stats, layout columns). ── */
@media (max-width: 980px) {
	.woocommerce-account .col-lg-9:has(.eh-projects-wrap),
	.woocommerce-account .col-md-8:has(.eh-projects-wrap) { flex: 0 0 100%; max-width: 100%; }
	.eh-projects-layout { grid-template-columns: 1fr; }
	.eh-stats-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
	.eh-projects-header { flex-direction: column; }
	.eh-header-right { align-items: flex-start; }
}

@media (max-width: 560px) {
	.eh-stats-4 { grid-template-columns: 1fr; }
	.eh-filter-bar { flex-direction: column; align-items: stretch; }
	.eh-filter-search { min-width: unset; }
	.eh-form-grid-2 { grid-template-columns: 1fr; }
}
