/* ============================================================
   Ecohomes Dashboard — My Account Dashboard Tab
   Inherits CSS variables from eh-myaccount.css (ecohomes-core)
   ============================================================ */

/* ── Outer wrap ───────────────────────────────────────────── */
.eh-dashboard-wrap {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ── Greeting bar ─────────────────────────────────────────── */
.eh-dashboard-greeting {
	background: linear-gradient(135deg, #27AE60 0%, #1a8a49 100%);
	border-radius: var(--eh-radius);
	padding: 18px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.eh-greeting-left {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.eh-greeting-title {
	font-size: 1.2rem;
	font-weight: 600;
	color: #fff;
	margin: 0;
	line-height: 1.3;
}

.eh-greeting-title strong {
	font-weight: 700;
}

.eh-greeting-subtitle {
	font-size: .82rem;
	color: rgba(255,255,255,.9);
	margin: 4px 0 0;
	line-height: 1.4;
}

.eh-greeting-datetime {
	font-size: .78rem;
	color: rgba(255,255,255,.72);
	margin: 3px 0 0;
}

.eh-greeting-right {
	flex-shrink: 0;
}

.eh-last-login-text {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: .78rem;
	color: rgba(255,255,255,.75);
	white-space: nowrap;
}

/* ── Company badge bar ─────────────────────────────────────── */
.eh-company-bar {
	background: var(--eh-white);
	border: 1px solid var(--eh-gray-200);
	border-radius: var(--eh-radius);
	padding: 10px 20px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.eh-company-bar-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: .8rem;
	font-weight: 500;
	color: var(--eh-gray-800);
}

.eh-company-bar-sep {
	color: var(--eh-gray-200);
	font-weight: 300;
	font-size: .9rem;
}

.eh-company-bar-name {
	font-weight: 600;
	color: var(--eh-gray-800);
}

.eh-company-bar-type {
	color: var(--eh-gray-500);
	text-transform: capitalize;
}

.eh-company-bar-verify {
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 20px;
	font-size: .75rem;
}

.eh-verify-1 { color: #b45309; background: #fef3c7; }
.eh-verify-2 { color: #1d4ed8; background: #dbeafe; }
.eh-verify-3 { color: #15803d; background: #dcfce7; }

/* ── Stats row ─────────────────────────────────────────────── */
.eh-stats-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}

.eh-stat-card {
	background: var(--eh-white);
	border: 1px solid var(--eh-gray-200);
	border-radius: var(--eh-radius);
	padding: 14px 16px;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	transition: box-shadow .15s, transform .15s;
	cursor: default;
	text-decoration: none;
	color: inherit;
}

.eh-stat-card:hover {
	box-shadow: 0 4px 16px rgba(0,0,0,.1);
	transform: translateY(-1px);
	text-decoration: none;
	color: inherit;
}

.eh-stat-card--link {
	cursor: pointer;
}

.eh-stat-card--link:hover {
	border-color: #86efac;
	box-shadow: 0 4px 20px rgba(39,174,96,.12);
}

.eh-stat-icon-wrap {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.eh-stat-icon--blue   { background: #dbeafe; color: #1d4ed8; }
.eh-stat-icon--orange { background: #ffedd5; color: #c2410c; }
.eh-stat-icon--green  { background: #dcfce7; color: #15803d; }
.eh-stat-icon--purple { background: #ede9fe; color: #6d28d9; }
.eh-stat-icon--teal   { background: #ccfbf1; color: #0f766e; }
.eh-stat-icon--gold   { background: #fef9c3; color: #a16207; }

.eh-stat-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	flex: 1;
}

.eh-stat-see-all {
	font-size: .7rem;
	color: var(--eh-green-dark);
	font-weight: 600;
	margin-top: 4px;
	opacity: .8;
	white-space: nowrap;
}

.eh-stat-card--link:hover .eh-stat-see-all {
	opacity: 1;
	text-decoration: underline;
}

.eh-stat-value {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--eh-gray-800);
	line-height: 1.1;
	letter-spacing: -.02em;
}

.eh-stat-value--rupiah {
	font-size: .9rem !important;
	letter-spacing: 0;
	line-height: 1.3;
	word-break: break-all;
}

.eh-stat-label {
	font-size: .72rem;
	color: var(--eh-gray-500);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .04em;
	line-height: 1.4;
}

/* ── Dashboard body: main + right sidebar ─────────────────── */
.eh-dashboard-body {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.eh-dashboard-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.eh-dashboard-sidebar {
	width: 288px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ── Section containers ───────────────────────────────────── */
.eh-dashboard-section {
	background: var(--eh-white);
	border: 1px solid var(--eh-gray-200);
	border-radius: var(--eh-radius);
	padding: 18px 20px;
}

.eh-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.eh-section-title {
	font-size: .9rem;
	font-weight: 700;
	color: var(--eh-gray-800);
	margin: 0;
}

.eh-section-link {
	font-size: .76rem;
	color: var(--eh-green-dark);
	text-decoration: none;
	font-weight: 600;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	white-space: nowrap;
	flex-shrink: 0;
}

.eh-section-link:hover {
	text-decoration: underline;
}

/* ── Two-column sub-layout (Pesanan + Delivery) ───────────── */
.eh-two-col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

/* ── Table (Penawaran) ────────────────────────────────────── */
.eh-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0 -20px;
	padding: 0 20px;
}

.eh-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .8rem;
}

.eh-table th {
	text-align: left;
	padding: 7px 10px;
	font-weight: 600;
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--eh-gray-500);
	border-bottom: 2px solid var(--eh-gray-200);
	white-space: nowrap;
	background: var(--eh-gray-100);
}

.eh-table td {
	padding: 10px 10px;
	border-bottom: 1px solid var(--eh-gray-200);
	color: var(--eh-gray-800);
	vertical-align: middle;
}

.eh-table tr:last-child td {
	border-bottom: none;
}

.eh-table tbody tr:hover {
	background: var(--eh-gray-100);
	cursor: pointer;
}

.eh-table a {
	color: var(--eh-green-dark);
	text-decoration: none;
	font-weight: 600;
}

.eh-table a:hover {
	text-decoration: underline;
}

.eh-td-nowrap { white-space: nowrap; }
.eh-td-amount { font-weight: 600; white-space: nowrap; }

/* ── Order / Shipment cards ───────────────────────────────── */
.eh-orders-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.eh-order-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border: 1px solid var(--eh-gray-200);
	border-radius: 6px;
	transition: box-shadow .12s, border-color .12s;
	text-decoration: none;
	color: inherit;
}

.eh-order-card:hover {
	border-color: #c3e6cb;
	box-shadow: 0 2px 8px rgba(0,0,0,.07);
	text-decoration: none;
	color: inherit;
}

.eh-order-card--link {
	cursor: pointer;
}

.eh-order-card--link:hover {
	border-color: #86efac;
	background: #f0fdf4;
}

.eh-order-thumb {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	border-radius: 6px;
	overflow: hidden;
	background: var(--eh-gray-100);
}

.eh-order-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	padding-top: 0 !important;
}

.eh-thumb-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--eh-gray-500);
}

.eh-order-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.eh-order-number {
	font-weight: 700;
	color: var(--eh-green-dark);
	text-decoration: none;
	font-size: .82rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.eh-order-number:hover {
	text-decoration: underline;
}

.eh-order-product {
	font-size: .74rem;
	color: var(--eh-gray-800);
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.eh-order-date {
	font-size: .74rem;
	color: var(--eh-gray-500);
}

.eh-order-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 5px;
	flex-shrink: 0;
}

.eh-order-total {
	font-weight: 700;
	font-size: .82rem;
	color: var(--eh-gray-800);
	white-space: nowrap;
}

/* ── Badges ───────────────────────────────────────────────── */
.eh-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 20px;
	font-size: .7rem;
	font-weight: 600;
	white-space: nowrap;
	line-height: 1.6;
}

.eh-badge-green  { background: #dcfce7; color: #15803d; }
.eh-badge-blue   { background: #dbeafe; color: #1d4ed8; }
.eh-badge-yellow { background: #fef9c3; color: #a16207; }
.eh-badge-red    { background: #fee2e2; color: #b91c1c; }
.eh-badge-gray   { background: var(--eh-gray-200); color: var(--eh-gray-500); }

/* ── Sidebar widgets ──────────────────────────────────────── */
.eh-sidebar-widget {
	background: var(--eh-white);
	border: 1px solid var(--eh-gray-200);
	border-radius: var(--eh-radius);
	padding: 16px;
}

.eh-widget-title {
	font-size: .85rem;
	font-weight: 700;
	color: var(--eh-gray-800);
	margin: 0;
	display: flex;
	align-items: center;
	gap: 6px;
}

/* ── Project cards (sidebar) ──────────────────────────────── */
.eh-project-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.eh-project-card {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.eh-project-card-thumb {
	flex-shrink: 0;
	width: 68px;
	height: 68px;
	border-radius: 6px;
	overflow: hidden;
	background: var(--eh-gray-100);
}

.eh-project-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.eh-project-card-thumb .eh-thumb-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--eh-gray-500);
}

.eh-project-card-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px;
}

.eh-project-card-name {
	font-size: .82rem;
	font-weight: 600;
	color: var(--eh-gray-800);
	text-decoration: none;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.eh-project-card-name:hover {
	color: var(--eh-green-dark);
}

.eh-project-card-sub {
	font-size: .72rem;
	color: var(--eh-gray-500);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.eh-project-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
}

.eh-project-progress-pct {
	font-size: .7rem;
	font-weight: 600;
	color: var(--eh-green-dark);
}

.eh-progress-bar {
	height: 4px;
	background: var(--eh-gray-200);
	border-radius: 2px;
	overflow: hidden;
	margin-top: 2px;
}

.eh-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--eh-green) 0%, var(--eh-green-dark) 100%);
	border-radius: 2px;
	transition: width .4s ease;
}

/* ── Notification list ────────────────────────────────────── */
.eh-notif-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	background: #ef4444;
	color: #fff;
	border-radius: 9px;
	font-size: .65rem;
	font-weight: 700;
	line-height: 1;
}

.eh-notif-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.eh-notif-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 9px 0;
	border-bottom: 1px solid var(--eh-gray-200);
}

.eh-notif-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.eh-notif-item:first-child {
	padding-top: 0;
}

.eh-notif-dot {
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-top: 4px;
	background: var(--eh-gray-200);
}

.eh-notif-unread .eh-notif-dot {
	background: var(--eh-green);
}

.eh-notif-dot--order      { background: #3b82f6; }
.eh-notif-dot--quotation  { background: #f59e0b; }
.eh-notif-dot--project    { background: var(--eh-green); }
.eh-notif-dot--system     { background: var(--eh-gray-500); }

.eh-notif-unread .eh-notif-dot--order     { background: #3b82f6; }
.eh-notif-unread .eh-notif-dot--quotation { background: #f59e0b; }
.eh-notif-unread .eh-notif-dot--project   { background: var(--eh-green); }

/* Read items are dimmed */
.eh-notif-item:not(.eh-notif-unread) .eh-notif-dot {
	background: var(--eh-gray-200) !important;
}

.eh-notif-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.eh-notif-msg {
	font-size: .78rem;
	color: var(--eh-gray-800);
	line-height: 1.45;
	text-decoration: none;
}

a.eh-notif-msg:hover {
	color: var(--eh-green-dark);
	text-decoration: underline;
}

.eh-notif-item:not(.eh-notif-unread) .eh-notif-msg {
	color: var(--eh-gray-500);
}

.eh-notif-time {
	font-size: .7rem;
	color: var(--eh-gray-500);
}

/* ── CTA widget ───────────────────────────────────────────── */
.eh-widget-cta {
	text-align: center;
	background: linear-gradient(135deg, #f0fdf4 0%, #fff 100%);
}

.eh-cta-icon {
	display: flex;
	justify-content: center;
	margin-bottom: 8px;
	color: var(--eh-green-dark);
}

.eh-cta-text {
	font-size: .78rem;
	color: var(--eh-gray-500);
	margin: 0 0 12px;
	line-height: 1.5;
}

.eh-btn-wa {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: 100%;
	box-sizing: border-box;
	padding: 9px 14px;
	background: #25D366;
	color: #fff;
	font-size: .82rem;
	font-weight: 600;
	border-radius: 6px;
	text-decoration: none;
	transition: background .15s, transform .1s;
}

.eh-btn-wa:hover {
	background: #1da851;
	transform: translateY(-1px);
	color: #fff;
	text-decoration: none;
}

/* ── Empty notice ─────────────────────────────────────────── */
.eh-empty-notice {
	font-size: .82rem;
	color: var(--eh-gray-500);
	font-style: italic;
	margin: 0;
	padding: 6px 0;
}

.eh-empty-sm {
	font-size: .76rem;
	padding: 4px 0;
}

/* ── Vertical project card (sidebar) ─────────────────────── */
.eh-project-card--link {
	display: flex;
	text-decoration: none;
	color: inherit;
	border: 1px solid var(--eh-gray-200);
	border-radius: var(--eh-radius);
	overflow: hidden;
	transition: box-shadow .15s, border-color .15s;
}

.eh-project-card--link:hover {
	border-color: #86efac;
	box-shadow: 0 3px 12px rgba(39,174,96,.12);
	text-decoration: none;
	color: inherit;
}

.eh-project-card--link .eh-project-card-name {
	color: var(--eh-gray-800);
}

.eh-project-card--link:hover .eh-project-card-name {
	color: var(--eh-green-dark);
}

.eh-project-card--vertical {
	flex-direction: column;
	gap: 0;
}

.eh-project-card--vertical .eh-project-card-info {
	padding: 7px 8px 8px;
	gap: 3px;
}

.eh-project-card--vertical .eh-project-card-name {
	font-size: .75rem;
	-webkit-line-clamp: 2;
}

.eh-project-card--vertical .eh-project-card-sub {
	font-size: .68rem;
}

.eh-project-card-img {
	width: 100%;
	height: 150px;
	border-radius: 6px;
	overflow: hidden;
	background: var(--eh-gray-100);
	margin-bottom: 10px;
	flex-shrink: 0;
}

.eh-project-card--vertical .eh-project-card-img {
	border-radius: 0;
	margin-bottom: 0;
	height: 90px;
}

.eh-project-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	padding-top: 0 !important;
}

.eh-project-card-img .eh-thumb-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--eh-gray-500);
}

/* ── Table action button ──────────────────────────────────── */
.eh-btn-detail {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	background: var(--eh-gray-100);
	color: var(--eh-green-dark);
	border: 1px solid var(--eh-gray-200);
	border-radius: 4px;
	font-size: .74rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background .12s, border-color .12s;
}

.eh-btn-detail:hover {
	background: #dcfce7;
	border-color: #86efac;
	text-decoration: none;
	color: var(--eh-green-dark);
}

/* ── Footer CTA bar ──────────────────────────────────────────── */
.eh-dashboard-footer-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background: var(--eh-white);
	border: 1px solid var(--eh-gray-200);
	border-radius: var(--eh-radius);
	padding: 12px 20px;
	flex-wrap: wrap;
}

.eh-footer-quick-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.eh-footer-action {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 13px;
	border-radius: 6px;
	font-size: .78rem;
	font-weight: 600;
	text-decoration: none;
	transition: background .15s, transform .1s, box-shadow .12s;
	border: 1px solid var(--eh-gray-200);
	color: var(--eh-gray-800);
	background: var(--eh-gray-100);
	white-space: nowrap;
}

.eh-footer-action:hover {
	background: var(--eh-gray-200);
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0,0,0,.07);
	color: var(--eh-gray-800);
	text-decoration: none;
}

.eh-footer-action--wa {
	background: #25D366;
	color: #fff;
	border-color: #25D366;
}

.eh-footer-action--wa:hover {
	background: #1da851;
	color: #fff;
	border-color: #1da851;
}

.eh-footer-action--phone {
	background: #eff6ff;
	color: #1d4ed8;
	border-color: #bfdbfe;
}

.eh-footer-action--phone:hover {
	background: #dbeafe;
	color: #1d4ed8;
}

.eh-footer-action--profile {
	background: #fef9c3;
	color: #a16207;
	border-color: #fde68a;
}

.eh-footer-action--profile:hover {
	background: #fef08a;
	color: #a16207;
}

.eh-footer-action--expand {
	background: #f0fdf4;
	color: #15803d;
	border-color: #bbf7d0;
}

.eh-footer-action--expand:hover {
	background: #dcfce7;
	color: #15803d;
}

.eh-footer-payment-logos {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.eh-payment-label {
	font-size: .72rem;
	color: var(--eh-gray-500);
	white-space: nowrap;
}

.eh-payment-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 3px 9px;
	border: 1px solid var(--eh-gray-200);
	border-radius: 4px;
	font-size: .68rem;
	font-weight: 800;
	background: var(--eh-white);
	letter-spacing: .03em;
}

.eh-payment-logo--bca     { color: #003A8C; border-color: #bcd0f0; }
.eh-payment-logo--bni     { color: #F77F00; border-color: #fdd5a0; }
.eh-payment-logo--mandiri { color: #003087; border-color: #b0c4e8; }
.eh-payment-logo--visa    { color: #1A1F71; border-color: #c7cae8; letter-spacing: .06em; }
.eh-payment-logo--mc      { color: #EB001B; border-color: #f8bcbc; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1200px) {
	.eh-stats-row {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 1024px) {
	.eh-dashboard-sidebar {
		width: 260px;
	}
}

@media (max-width: 900px) {
	.eh-dashboard-body {
		flex-direction: column;
	}
	.eh-dashboard-sidebar {
		width: 100%;
	}
	.eh-two-col {
		grid-template-columns: 1fr;
	}
	.eh-dashboard-footer-bar {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 600px) {
	.eh-dashboard-greeting {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	.eh-stats-row {
		grid-template-columns: repeat(2, 1fr);
	}
	.eh-footer-quick-actions {
		gap: 6px;
	}
	.eh-footer-action {
		font-size: .72rem;
		padding: 6px 10px;
	}
	.eh-last-login-text {
		white-space: normal;
	}
	.eh-stat-value {
		font-size: 1.25rem;
	}
	.eh-order-card {
		flex-wrap: wrap;
	}
	.eh-order-meta {
		flex-direction: row;
		align-items: center;
		width: 100%;
		justify-content: space-between;
	}
}
