.hb-account-page,
.hb-account-page * {
	box-sizing: border-box;
}

.hb-account-page {
	padding: 32px 20px 56px;
	background: #f5f0e8;
	color: #221811;
}

.hb-account-shell {
	max-width: 1120px;
	margin: 0 auto;
}

.hb-account-auth {
	max-width: 440px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid #d8ccb4;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 12px 40px rgba(28, 23, 18, 0.08);
}

.hb-account-auth__header {
	background: #221811;
	padding: 28px 32px;
	text-align: center;
}

.hb-account-auth__header h1 {
	margin: 0 0 6px;
	font: 800 1.3rem/1.1 "DM Sans", sans-serif;
	color: #fff;
	letter-spacing: -0.02em;
}

.hb-account-auth__header p {
	margin: 0;
	font: 400 0.82rem/1.5 "DM Sans", sans-serif;
	color: rgba(255, 255, 255, 0.55);
}

.hb-account-auth__body {
	padding: 28px 32px 32px;
}

.hb-account-auth__body p {
	margin: 0 0 18px;
	font: 400 0.92rem/1.65 "DM Sans", sans-serif;
	color: #5a4738;
}

.hb-account-dash-wrap {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.hb-account-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
}

.hb-account-user {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.hb-account-avatar {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #221811;
	color: #fff;
	font: 700 1rem/1 "DM Sans", sans-serif;
	flex-shrink: 0;
}

.hb-account-user__copy h1 {
	margin: 0 0 4px;
	font: 800 1.25rem/1.1 "DM Sans", sans-serif;
	letter-spacing: -0.02em;
}

.hb-account-user__copy p {
	margin: 0;
	font: 400 0.82rem/1.4 "DM Sans", sans-serif;
	color: #6b5f4e;
}

.hb-account-user__links {
	margin-top: 4px;
}

.hb-account-topbar__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.hb-account-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px 20px;
	border-radius: 10px;
	border: none;
	background: #221811;
	color: #fff;
	font: 700 0.9rem/1 "DM Sans", sans-serif;
	text-decoration: none;
	transition: background 0.15s ease;
}

.hb-account-button:hover,
.hb-account-button:focus-visible {
	background: #333;
	color: #fff;
	outline: none;
}

.hb-account-button--secondary {
	background: #fff;
	color: #221811;
	border: 1px solid #d8ccb4;
}

.hb-account-button--secondary:hover,
.hb-account-button--secondary:focus-visible {
	background: #f8f4ec;
	color: #221811;
}

.hb-account-link {
	color: #b8763a;
	text-decoration: none;
	font: 600 0.82rem/1 "DM Sans", sans-serif;
}

.hb-account-link:hover {
	text-decoration: underline;
}

.hb-account-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.hb-account-stat {
	background: #fff;
	border: 1px solid #d8ccb4;
	border-radius: 12px;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.hb-account-stat__value {
	font: 800 1.18rem/1.1 "DM Sans", sans-serif;
	letter-spacing: -0.03em;
	color: #221811;
}

.hb-account-stat__label {
	font: 700 0.66rem/1.2 "DM Sans", sans-serif;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6b5f4e;
}

.hb-account-grid {
	display: grid;
	grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
	gap: 18px;
	align-items: start;
}

.hb-account-grid--manage {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hb-account-section {
	background: #fff;
	border: 1px solid #d8ccb4;
	border-radius: 14px;
	padding: 18px;
	min-width: 0;
}

.hb-account-section--orders {
	display: flex;
	flex-direction: column;
	min-height: 540px;
}

.hb-account-manage {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.hb-account-section__head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
}

.hb-account-section__title {
	font: 700 0.68rem/1.2 "DM Sans", sans-serif;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6b5f4e;
}

.hb-account-count {
	background: #221811;
	color: #fff;
	font: 700 0.62rem/1 "DM Sans", sans-serif;
	padding: 3px 8px;
	border-radius: 999px;
}

.hb-account-notice {
	margin-bottom: 14px;
	padding: 10px 14px;
	border-radius: 8px;
	border: 1px solid #ead5ba;
	background: #fff7eb;
	color: #6a4422;
	font: 500 0.82rem/1.5 "DM Sans", sans-serif;
}

.hb-account-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.hb-account-form label {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

.hb-account-form span {
	font: 600 0.78rem/1.2 "DM Sans", sans-serif;
	color: #221811;
}

.hb-account-form input,
.hb-account-form select {
	width: 100%;
	padding: 10px 14px;
	min-height: 44px;
	border: 1.5px solid #d8ccb4;
	border-radius: 10px;
	background: #fff;
	color: #221811;
	font: 400 0.9rem/1.3 "DM Sans", sans-serif;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hb-account-form input:focus,
.hb-account-form select:focus {
	border-color: #b8763a;
	box-shadow: 0 0 0 3px rgba(184, 118, 58, 0.1);
}

.hb-account-form input[readonly] {
	background: #f5f0e8;
	color: #6b5f4e;
}

.hb-account-form__full {
	grid-column: 1 / -1;
}

.hb-account-form__actions {
	margin-top: 16px;
}

.hb-account-empty {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 42px 24px;
	border: 1px solid #d8ccb4;
	border-radius: 12px;
	background: #fff;
}

.hb-account-empty p {
	margin: 0 0 12px;
	color: #6b5f4e;
	font: 400 0.9rem/1.6 "DM Sans", sans-serif;
}

.hb-account-empty a {
	color: #b8763a;
	font: 600 0.85rem/1.3 "DM Sans", sans-serif;
	text-decoration: none;
}

.hb-account-empty a:hover {
	text-decoration: underline;
}

.hb-account-table-wrap {
	flex: 1;
	min-height: 0;
	border: 1px solid #d8ccb4;
	border-radius: 12px;
	background: #fff;
	overflow: auto;
}

.hb-account-orders-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
}

.hb-account-orders-table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	background: #221811;
	color: rgba(255, 255, 255, 0.72);
	padding: 12px 16px;
	text-align: left;
	font: 700 0.68rem/1.2 "DM Sans", sans-serif;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.hb-account-orders-table tbody td {
	padding: 13px 16px;
	border-bottom: 1px solid #ede6d6;
	vertical-align: middle;
	font: 400 0.84rem/1.4 "DM Sans", sans-serif;
}

.hb-account-orders-table tbody tr:last-child td {
	border-bottom: none;
}

.hb-account-orders-table tbody tr:hover {
	background: #fcf7ef;
}

.hb-account-order-cell {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.hb-account-order-id {
	font-weight: 700;
	font-size: 0.88rem;
	color: #221811;
}

.hb-account-view-btn {
	background: #221811;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 5px 11px;
	font: 600 0.72rem/1 "DM Sans", sans-serif;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease;
}

.hb-account-view-btn:hover,
.hb-account-view-btn:focus-visible {
	background: #333;
	outline: none;
}

.hb-account-order-copy,
.hb-account-order-date {
	color: #6b5f4e;
	font-size: 0.78rem;
	white-space: nowrap;
}

.hb-account-order-product {
	color: #221811;
	font-size: 0.84rem;
}

.hb-account-order-total {
	font-weight: 700;
	white-space: nowrap;
	color: #221811;
}

.hb-account-status {
	display: inline-flex;
	align-items: center;
	padding: 4px 9px;
	border-radius: 999px;
	font: 700 0.64rem/1 "DM Sans", sans-serif;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

.hb-account-status--paid {
	background: #dcfce7;
	color: #15803d;
}

.hb-account-status--processing {
	background: #dbeafe;
	color: #1e40af;
}

.hb-account-status--shipped {
	background: #e0f2fe;
	color: #0369a1;
}

.hb-account-status--completed {
	background: #bbf7d0;
	color: #15803d;
}

.hb-account-status--failed {
	background: #fee2e2;
	color: #991b1b;
}

.hb-account-status--cancelled {
	background: #f3f4f6;
	color: #6b7280;
}

.hb-account-status--refunded {
	background: #fae8ff;
	color: #7e22ce;
}

.hb-account-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100100;
	background: rgba(0, 0, 0, 0.6);
	padding: 32px 16px;
	overflow-y: auto;
	align-items: flex-start;
	justify-content: center;
}

.hb-account-modal-overlay.is-open {
	display: flex;
}

.hb-account-modal {
	width: 100%;
	max-width: 560px;
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.hb-account-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 20px 24px;
	background: #221811;
	color: #fff;
}

.hb-account-modal__header h2 {
	margin: 0;
	font: 700 0.98rem/1.2 "DM Sans", sans-serif;
}

.hb-account-modal__close {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.62);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.hb-account-modal__close:hover,
.hb-account-modal__close:focus-visible {
	color: #fff;
	outline: none;
}

.hb-account-modal__body {
	padding: 22px 24px 24px;
}

.hb-account-modal__section + .hb-account-modal__section {
	margin-top: 18px;
}

.hb-account-modal__label {
	margin-bottom: 8px;
	display: flex;
	align-items: center;
	gap: 8px;
	font: 700 0.66rem/1.2 "DM Sans", sans-serif;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6b5f4e;
}

.hb-account-modal__label::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #ede6d6;
}

.hb-account-modal__table {
	width: 100%;
	border-collapse: collapse;
	font: 400 0.84rem/1.5 "DM Sans", sans-serif;
}

.hb-account-modal__table th,
.hb-account-modal__table td {
	padding: 8px 12px;
	border: 1px solid #e6ddcd;
	text-align: left;
}

.hb-account-modal__table th {
	width: 36%;
	background: #faf7f1;
	font-weight: 600;
	color: #4c3a2a;
}

.hb-account-modal__build + .hb-account-modal__build {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #ede6d6;
}

.hb-account-modal__build-title {
	margin-bottom: 6px;
	font: 700 0.88rem/1.3 "DM Sans", sans-serif;
	color: #221811;
}

.hb-account-modal__build ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 5px;
}

.hb-account-modal__build li span {
	display: grid;
	gap: 2px;
	font: 400 0.82rem/1.45 "DM Sans", sans-serif;
	color: #5a4738;
}

.hb-account-modal__build small {
	font-size: 0.75rem;
	color: #8a7361;
}

.hb-account-build-lines,
.hb-account-modal__build ul.hb-account-build-lines {
	display: grid;
	gap: 10px;
}

.hb-account-build-line {
	display: grid;
	gap: 6px;
}

.hb-account-build-line__label {
	display: block;
	font: 600 0.82rem/1.35 "DM Sans", sans-serif;
	color: #221811;
}

.hb-account-custom-art .hb-custom-art-notes {
	margin: 0;
	font: 400 0.8rem/1.45 "DM Sans", sans-serif;
	color: #5a4738;
}

.hb-account-custom-art .hb-custom-art-preview {
	display: inline-block;
	max-width: 200px;
	margin-top: 4px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #e8dfd0;
	background: #faf7f2;
}

.hb-account-custom-art .hb-custom-art-preview img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 160px;
	object-fit: contain;
}

.hb-account-custom-art .hb-custom-art-file {
	margin: 0;
	font-size: 0.78rem;
}

.hb-account-custom-art .hb-custom-art-file a {
	color: #9a3412;
	text-decoration: underline;
}

.hb-account-modal__address,
.hb-account-modal__empty {
	font: 400 0.84rem/1.6 "DM Sans", sans-serif;
	color: #5a4738;
}

@media (max-width: 980px) {
	.hb-account-grid {
		grid-template-columns: 1fr;
	}

	.hb-account-grid--manage {
		grid-template-columns: 1fr;
	}

	.hb-account-section--orders {
		min-height: 0;
	}
}

@media (max-width: 760px) {
	.hb-account-topbar {
		flex-direction: column;
		align-items: flex-start;
	}

	.hb-account-topbar__actions {
		width: 100%;
		justify-content: flex-start;
	}

	.hb-account-stats {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.hb-account-page {
		padding-inline: 14px;
	}

	.hb-account-form__grid {
		grid-template-columns: 1fr;
	}

	.hb-account-order-cell {
		flex-direction: column;
		align-items: flex-start;
	}

	.hb-account-orders-table thead th:nth-child(3),
	.hb-account-orders-table tbody td:nth-child(3) {
		display: none;
	}

	.hb-account-orders-table thead th,
	.hb-account-orders-table tbody td {
		padding: 10px 12px;
	}

	.hb-account-modal__header,
	.hb-account-modal__body {
		padding-left: 16px;
		padding-right: 16px;
	}
}
