/**
 * BuildHub — gaya tampilan depan
 * Author: Yanda Akram
 *
 * Seluruh warna memakai custom property agar mudah ditimpa lewat
 * Elementor atau CSS tema.
 */

.bh {
	--bh-primary: #1f3864;
	--bh-primary-dark: #16294a;
	--bh-accent: #2e5c8a;
	--bh-ok: #2e6b2e;
	--bh-warn: #b8860b;
	--bh-danger: #8b3a3a;
	--bh-text: #2b2b2b;
	--bh-muted: #6b7280;
	--bh-border: #dfe4ec;
	--bh-bg: #ffffff;
	--bh-bg-soft: #f5f8fb;
	--bh-radius: 8px;
	--bh-gap: 20px;

	color: var(--bh-text);
	font-size: 15px;
	line-height: 1.6;
	box-sizing: border-box;
}

.bh *,
.bh *::before,
.bh *::after { box-sizing: inherit; }

/* ---------------- Tipografi ---------------- */
.bh-h2 { font-size: 1.6em; margin: 0 0 .4em; color: var(--bh-primary); }
.bh-h3 { font-size: 1.18em; margin: 0 0 .6em; color: var(--bh-primary); }
.bh-muted { color: var(--bh-muted); }
.bh-tiny { font-size: .8em; }
.bh-req { color: var(--bh-danger); }
.bh-hidden { display: none; }
.bh-hr { border: 0; border-top: 1px solid var(--bh-border); margin: 32px 0; }
.bh-text-warn { color: var(--bh-warn); }
.bh-text-ok { color: var(--bh-ok); }

/* ---------------- Bagian ---------------- */
.bh-section {
	margin: 0 0 var(--bh-gap);
	padding: 20px;
	background: var(--bh-bg);
	border: 1px solid var(--bh-border);
	border-radius: var(--bh-radius);
}

/* ---------------- Tombol ---------------- */
.bh-btn {
	display: inline-block;
	padding: 10px 18px;
	border: 1px solid var(--bh-border);
	border-radius: var(--bh-radius);
	background: var(--bh-bg);
	color: var(--bh-text);
	font-size: .95em;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: all .15s ease;
}
.bh-btn:hover { border-color: var(--bh-primary); color: var(--bh-primary); }
.bh-btn--primary { background: var(--bh-primary); border-color: var(--bh-primary); color: #fff; }
.bh-btn--primary:hover { background: var(--bh-primary-dark); border-color: var(--bh-primary-dark); color: #fff; }
.bh-btn--ghost { background: transparent; color: var(--bh-muted); }
.bh-btn--sm { padding: 6px 12px; font-size: .85em; }
.bh-btn--block { display: block; width: 100%; text-align: center; }

/* ---------------- Formulir ---------------- */
.bh-form { margin: 0; }
.bh-field { margin-bottom: 16px; }
.bh-field--check label { display: flex; align-items: flex-start; gap: 8px; font-size: .92em; }
.bh-label { display: block; margin-bottom: 5px; font-weight: 600; font-size: .9em; }
.bh-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--bh-border);
	border-radius: var(--bh-radius);
	background: #fff;
	font-size: .95em;
	font-family: inherit;
	color: var(--bh-text);
}
.bh-input:focus { outline: none; border-color: var(--bh-accent); box-shadow: 0 0 0 3px rgba(46, 92, 138, .12); }
select.bh-input[multiple] { padding: 6px; }
.bh-help { margin: 5px 0 0; font-size: .82em; color: var(--bh-muted); line-height: 1.45; }
.bh-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }

.bh-grid-2, .bh-grid-3 { display: grid; gap: 16px; }
.bh-grid-2 { grid-template-columns: repeat(2, 1fr); }
.bh-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------------- Pesan ---------------- */
.bh-notice {
	padding: 12px 16px;
	margin-bottom: 16px;
	border-left: 4px solid var(--bh-accent);
	border-radius: 4px;
	background: var(--bh-bg-soft);
	font-size: .92em;
}
.bh-notice--success { border-left-color: var(--bh-ok); background: #edf6ed; }
.bh-notice--error { border-left-color: var(--bh-danger); background: #fbeded; }

.bh-info, .bh-warn, .bh-blocked, .bh-locked, .bh-tips {
	padding: 12px 16px;
	border-radius: var(--bh-radius);
	font-size: .9em;
	line-height: 1.55;
}
.bh-info { background: var(--bh-bg-soft); border-left: 3px solid var(--bh-accent); }
.bh-warn { background: #fdf6e3; border-left: 3px solid var(--bh-warn); margin: 14px 0; }
.bh-warn--big { margin: 0 0 var(--bh-gap); padding: 16px 20px; }
.bh-warn--big strong { display: block; margin-bottom: 4px; }
.bh-blocked { background: #fbeded; border-left: 3px solid var(--bh-danger); }
.bh-locked { background: var(--bh-bg-soft); border: 1px dashed var(--bh-border); margin-top: 14px; }
.bh-tips { background: var(--bh-bg-soft); margin-top: 18px; }
.bh-tips ul { margin: 8px 0 0; padding-left: 18px; }
.bh-tips li { margin-bottom: 5px; }

.bh-empty {
	padding: 44px 24px;
	text-align: center;
	background: var(--bh-bg-soft);
	border-radius: var(--bh-radius);
}
.bh-empty h3 { margin-top: 0; color: var(--bh-primary); }

/* ---------------- Lencana ---------------- */
.bh-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bh-badge {
	display: inline-block;
	padding: 4px 11px;
	border-radius: 999px;
	background: var(--bh-bg-soft);
	color: var(--bh-muted);
	font-size: .78em;
	font-weight: 600;
	letter-spacing: .2px;
}
.bh-badge--sm { padding: 2px 9px; font-size: .72em; }
.bh-badge--cat { background: #eef2f8; color: var(--bh-accent); }
.bh-badge--verified { background: #e4f0e4; color: var(--bh-ok); }
.bh-badge--open { background: #e4f0e4; color: var(--bh-ok); }
.bh-badge--closed_bidding,
.bh-badge--shortlisting { background: #fdf6e3; color: var(--bh-warn); }
.bh-badge--awarded,
.bh-badge--in_progress { background: #eef2f8; color: var(--bh-accent); }
.bh-badge--completed { background: #e8eaed; color: var(--bh-muted); }
.bh-badge--cancelled,
.bh-badge--disputed { background: #fbeded; color: var(--bh-danger); }
.bh-verified { color: var(--bh-ok); font-weight: 700; }

/* ---------------- Fakta ---------------- */
.bh-facts { display: flex; flex-wrap: wrap; gap: 22px; }
.bh-fact { display: flex; flex-direction: column; }
.bh-fact__label { font-size: .76em; text-transform: uppercase; letter-spacing: .5px; color: var(--bh-muted); }
.bh-fact__value { font-weight: 700; font-size: 1.02em; }
.bh-field-view { margin-top: 14px; }
.bh-field-view p { margin: 4px 0 0; }

/* ---------------- Hitung mundur & jumlah bid ---------------- */
.bh-countdown {
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding: 14px 20px;
	margin-bottom: var(--bh-gap);
	border-radius: var(--bh-radius);
	background: var(--bh-primary);
	color: #fff;
}
.bh-countdown__label { font-size: .85em; opacity: .85; }
.bh-countdown__value { font-size: 1.25em; font-weight: 700; letter-spacing: .5px; }

.bh-bidcount {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px;
	padding: 14px 20px;
	margin-bottom: var(--bh-gap);
	border: 1px solid var(--bh-border);
	border-radius: var(--bh-radius);
}
.bh-bidcount strong { font-size: 1.5em; color: var(--bh-primary); }
.bh-bidcount em { font-size: .82em; font-style: normal; margin-left: auto; }

/* ---------------- Blok privat ---------------- */
.bh-private { border-left: 3px solid var(--bh-ok); }
.bh-private__tag {
	display: inline-block;
	padding: 3px 10px;
	margin-bottom: 10px;
	border-radius: 999px;
	background: #e4f0e4;
	color: var(--bh-ok);
	font-size: .75em;
	font-weight: 700;
}
.bh-files { margin: 6px 0 0; padding-left: 18px; }
.bh-files li { margin-bottom: 4px; }

/* ---------------- Kuota ---------------- */
.bh-quota {
	display: inline-block;
	padding: 7px 14px;
	margin-bottom: 16px;
	border-radius: var(--bh-radius);
	background: var(--bh-bg-soft);
	font-size: .88em;
	font-weight: 600;
}

/* ---------------- Tabel ---------------- */
.bh-table-wrap { overflow-x: auto; }
.bh-table { width: 100%; border-collapse: collapse; font-size: .9em; }
.bh-table th, .bh-table td { padding: 11px 12px; border: 1px solid var(--bh-border); text-align: left; vertical-align: top; }
.bh-table thead th { background: var(--bh-primary); color: #fff; font-size: .85em; font-weight: 600; white-space: nowrap; }
.bh-table tbody tr:nth-child(even) { background: var(--bh-bg-soft); }
.bh-table [data-sort] { cursor: pointer; user-select: none; }
.bh-table [data-sort]::after { content: " \2195"; opacity: .5; }
.bh-price { font-weight: 700; color: var(--bh-primary); white-space: nowrap; }
.bh-col-check { width: 68px; text-align: center; }
.bh-row--won { background: #e4f0e4 !important; }
.bh-row--short { background: #fdf6e3 !important; }
.bh-proposal__body { max-width: 380px; margin-top: 8px; font-size: .95em; }
.bh-details summary { cursor: pointer; font-weight: 600; color: var(--bh-accent); }

/* ---------------- Bintang ---------------- */
.bh-stars { color: #d9d9d9; letter-spacing: 1px; }
.bh-star--full { color: #f0a500; }
.bh-star--half { background: linear-gradient(90deg, #f0a500 50%, #d9d9d9 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bh-rating-num { font-weight: 700; }
.bh-rating-count { font-size: .82em; color: var(--bh-muted); }

.bh-star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.bh-star-input input { display: none; }
.bh-star-input label { font-size: 1.9em; color: #d9d9d9; cursor: pointer; line-height: 1; }
.bh-star-input input:checked ~ label,
.bh-star-input label:hover,
.bh-star-input label:hover ~ label { color: #f0a500; }

/* ---------------- Kartu ---------------- */
.bh-grid { display: grid; gap: var(--bh-gap); }
.bh-grid--1 { grid-template-columns: 1fr; }
.bh-grid--2 { grid-template-columns: repeat(2, 1fr); }
.bh-grid--3 { grid-template-columns: repeat(3, 1fr); }
.bh-grid--4 { grid-template-columns: repeat(4, 1fr); }

.bh-card {
	border: 1px solid var(--bh-border);
	border-radius: var(--bh-radius);
	overflow: hidden;
	background: var(--bh-bg);
	transition: box-shadow .18s ease, transform .18s ease;
}
.bh-card:hover { box-shadow: 0 6px 22px rgba(31, 56, 100, .1); transform: translateY(-2px); }
.bh-card__link { display: block; color: inherit; text-decoration: none; height: 100%; }
.bh-card__thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--bh-bg-soft); }
.bh-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bh-card__body { padding: 16px; }
.bh-card__title { margin: 8px 0 4px; font-size: 1.05em; line-height: 1.35; color: var(--bh-primary); }
.bh-card__cat { margin: 0 0 10px; font-size: .82em; color: var(--bh-muted); }
.bh-card__meta { list-style: none; margin: 0; padding: 0; font-size: .85em; }
.bh-card__meta li { display: flex; gap: 7px; margin-bottom: 4px; color: var(--bh-muted); }
.bh-ico { opacity: .6; }
.bh-card__foot {
	display: flex; justify-content: space-between; align-items: center;
	padding: 12px 16px; border-top: 1px solid var(--bh-border); background: var(--bh-bg-soft); font-size: .85em;
}
.bh-card__bids strong { color: var(--bh-primary); font-size: 1.15em; }
.bh-card__cta { color: var(--bh-accent); font-weight: 600; }

.bh-card--mitra { text-align: center; }
.bh-card__logo {
	width: 74px; height: 74px; margin: 20px auto 0;
	border-radius: 50%; overflow: hidden;
	background: var(--bh-bg-soft);
	display: flex; align-items: center; justify-content: center;
}
.bh-card__logo img { width: 100%; height: 100%; object-fit: cover; }
.bh-card__initial { font-size: 1.9em; font-weight: 700; color: var(--bh-primary); }
.bh-card--mitra .bh-card__meta li { justify-content: center; }
.bh-card__rating { margin: 8px 0; }
.bh-card__portfolio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.bh-thumb img { width: 100%; height: 72px; object-fit: cover; display: block; }

/* ---------------- Penyaring ---------------- */
.bh-filters { margin-bottom: var(--bh-gap); padding: 16px; background: var(--bh-bg-soft); border-radius: var(--bh-radius); }
.bh-filters__row { display: flex; flex-wrap: wrap; gap: 10px; }
.bh-filters__row .bh-input { flex: 1 1 160px; width: auto; }
.bh-filters__row .bh-btn { flex: 0 0 auto; }

/* ---------------- Navigasi halaman ---------------- */
.bh-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 28px; }
.bh-pagination .page-numbers {
	padding: 8px 14px; border: 1px solid var(--bh-border); border-radius: var(--bh-radius);
	text-decoration: none; color: var(--bh-text); font-size: .9em;
}
.bh-pagination .current { background: var(--bh-primary); border-color: var(--bh-primary); color: #fff; }

/* ---------------- Dashboard ---------------- */
.bh-dash-head {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px;
	padding: 22px; margin-bottom: var(--bh-gap);
	border-radius: var(--bh-radius);
	background: linear-gradient(135deg, var(--bh-primary), var(--bh-accent));
	color: #fff;
}
.bh-dash-head .bh-h2 { color: #fff; margin: 0; }
.bh-dash-head .bh-muted { color: rgba(255,255,255,.8); margin: 0; }
.bh-dash-stats, .bh-statbar, .bh-profile__stats { display: flex; flex-wrap: wrap; gap: 26px; }
.bh-stat { display: flex; flex-direction: column; }
.bh-stat__value { font-size: 1.5em; font-weight: 700; line-height: 1.2; }
.bh-stat__label { font-size: .76em; text-transform: uppercase; letter-spacing: .5px; opacity: .85; }
.bh-statbar, .bh-profile__stats { color: var(--bh-text); }
.bh-statbar .bh-stat__value, .bh-profile__stats .bh-stat__value { color: var(--bh-primary); }
.bh-stat--verified .bh-stat__value { color: #b7f5b7; }
.bh-stat--pending .bh-stat__value { color: #ffe6a7; }
.bh-stat--rejected .bh-stat__value,
.bh-stat--suspended .bh-stat__value { color: #ffc2c2; }

.bh-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--bh-border); margin-bottom: var(--bh-gap); }
.bh-tab {
	padding: 11px 18px; border-radius: var(--bh-radius) var(--bh-radius) 0 0;
	color: var(--bh-muted); text-decoration: none; font-weight: 600; font-size: .92em;
	border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.bh-tab:hover { color: var(--bh-primary); }
.bh-tab--active { color: var(--bh-primary); border-bottom-color: var(--bh-primary); background: var(--bh-bg-soft); }

.bh-actionlist { list-style: none; margin: 0; padding: 0; }
.bh-actionlist__item {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding: 16px; margin-bottom: 10px;
	border: 1px solid var(--bh-border); border-left: 3px solid var(--bh-accent);
	border-radius: var(--bh-radius); background: var(--bh-bg);
}
.bh-actionlist__item--rate { border-left-color: var(--bh-warn); }
.bh-actionlist__item--chat { border-left-color: var(--bh-ok); }
.bh-actionlist__title { font-weight: 700; color: var(--bh-primary); text-decoration: none; }
.bh-actionlist__what { margin: 4px 0 0; font-size: .88em; color: var(--bh-muted); }

/* ---------------- Chat ---------------- */
.bh-chat { border: 1px solid var(--bh-border); border-radius: var(--bh-radius); margin-bottom: 18px; overflow: hidden; }
.bh-chat__head {
	display: flex; justify-content: space-between; align-items: center;
	padding: 12px 16px; background: var(--bh-bg-soft); border-bottom: 1px solid var(--bh-border);
}
.bh-chat__body { max-height: 420px; overflow-y: auto; padding: 16px; background: #fafbfd; }
.bh-chat-empty { text-align: center; color: var(--bh-muted); font-size: .9em; padding: 20px 0; }
.bh-msg { max-width: 76%; margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; font-size: .92em; }
.bh-msg--theirs { background: #fff; border: 1px solid var(--bh-border); }
.bh-msg--mine { background: #eaf1f9; margin-left: auto; }
.bh-msg--admin { background: #fdf6e3; border-color: #e8d9a8; }
.bh-msg__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 4px; font-size: .78em; }
.bh-msg__author { font-weight: 700; }
.bh-msg__role { padding: 1px 7px; border-radius: 999px; background: rgba(0,0,0,.06); }
.bh-msg__time { color: var(--bh-muted); margin-left: auto; }
.bh-msg__body { white-space: pre-wrap; word-break: break-word; }
.bh-msg__flag { margin-top: 5px; font-size: .78em; color: var(--bh-danger); }
.bh-chat__form { display: flex; gap: 10px; align-items: flex-end; padding: 14px 16px; border-top: 1px solid var(--bh-border); }
.bh-chat__form textarea { flex: 1; }

/* ---------------- Tanya jawab ---------------- */
.bh-qna__thread { padding: 16px 0; border-bottom: 1px solid var(--bh-border); }
.bh-qna__thread:last-child { border-bottom: 0; }
.bh-qna__q p, .bh-qna__a p { margin: 5px 0 0; }
.bh-qna__a {
	margin: 12px 0 0 24px; padding: 12px 16px;
	background: var(--bh-bg-soft); border-left: 3px solid var(--bh-accent); border-radius: 0 var(--bh-radius) var(--bh-radius) 0;
}

/* ---------------- Ulasan ---------------- */
.bh-review { padding: 14px 0; border-bottom: 1px solid var(--bh-border); }
.bh-review:last-child { border-bottom: 0; }
.bh-review__head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 5px; }
.bh-review p { margin: 0 0 4px; }

/* ---------------- Profil ---------------- */
.bh-profile__area { margin-top: 14px; font-size: .9em; }
.bh-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.bh-gallery__item { margin: 0; border: 1px solid var(--bh-border); border-radius: var(--bh-radius); overflow: hidden; }
.bh-gallery__item img { width: 100%; height: 180px; object-fit: cover; display: block; }
.bh-gallery__item figcaption { padding: 10px 12px; font-size: .84em; }
.bh-gallery__item figcaption strong { display: block; }

/* ---------------- Cara kerja ---------------- */
.bh-how { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.bh-how__step { padding: 20px 16px; border: 1px solid var(--bh-border); border-radius: var(--bh-radius); text-align: center; }
.bh-how__num {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; margin-bottom: 12px;
	border-radius: 50%; background: var(--bh-primary); color: #fff; font-weight: 700;
}
.bh-how__title { margin: 0 0 6px; font-size: 1em; color: var(--bh-primary); }
.bh-how__desc { margin: 0; font-size: .86em; color: var(--bh-muted); line-height: 1.5; }

/* ---------------- Bilah pengguna ---------------- */
.bh-userbar { display: inline-flex; align-items: center; gap: 10px; }
.bh-userbar__name { font-weight: 600; font-size: .9em; }

/* ---------------- Panel sambutan pendaftaran ---------------- */
.bh-welcome { border-left: 3px solid var(--bh-ok); background: #f4faf4; }
.bh-welcome .bh-h2 { margin-bottom: 6px; }
.bh-welcome__steps { display: grid; gap: 12px; margin: 18px 0; }
.bh-welcome__step { display: flex; gap: 14px; align-items: flex-start; }
.bh-welcome__num {
	flex: 0 0 auto;
	display: inline-flex; align-items: center; justify-content: center;
	width: 30px; height: 30px; border-radius: 50%;
	background: #dfe4ec; color: var(--bh-muted);
	font-weight: 700; font-size: .9em;
}
.bh-welcome__step--done .bh-welcome__num { background: var(--bh-ok); color: #fff; }
.bh-welcome__step--now .bh-welcome__num { background: var(--bh-primary); color: #fff; }
.bh-welcome__step strong { display: block; font-size: .95em; }
.bh-welcome__step p { margin: 2px 0 0; font-size: .86em; color: var(--bh-muted); line-height: 1.45; }

/* ---------------- Penawaran sendiri ---------------- */
.bh-ownbid { border-left: 3px solid var(--bh-accent); }
.bh-ownbid--won { border-left-color: var(--bh-ok); background: #f4faf4; }
.bh-ownbid--lost { border-left-color: var(--bh-muted); opacity: .92; }
.bh-ownbid--shortlisted { border-left-color: var(--bh-warn); }
.bh-ownbid__note { margin: 14px 0 0; font-size: .9em; }
.bh-award { border-left: 3px solid var(--bh-ok); background: #f4faf4; }
.bh-cta { text-align: center; }

/* ---------------- Responsif ---------------- */
@media (max-width: 900px) {
	.bh-grid--3, .bh-grid--4 { grid-template-columns: repeat(2, 1fr); }
	.bh-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.bh-grid--2, .bh-grid--3, .bh-grid--4 { grid-template-columns: 1fr; }
	.bh-grid-2, .bh-grid-3 { grid-template-columns: 1fr; }
	.bh-dash-head { flex-direction: column; align-items: flex-start; }
	.bh-dash-stats { gap: 18px; }
	.bh-stat__value { font-size: 1.25em; }
	.bh-filters__row .bh-input { flex: 1 1 100%; }
	.bh-actionlist__item { flex-direction: column; align-items: flex-start; }
	.bh-msg { max-width: 92%; }
	.bh-chat__form { flex-direction: column; align-items: stretch; }
	.bh-section { padding: 16px; }
}
