.moulfood-account-popup {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 28px;
}

.moulfood-account-popup.is-open {
	display: flex;
}

.moulfood-account-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.58);
	backdrop-filter: blur(2px);
}

.moulfood-account-dialog {
	position: relative;
	width: min(760px, 100%);
	max-height: min(820px, calc(100vh - 48px));
	overflow: auto;
	background: #fff;
	color: #111827;
	border-radius: 18px;
	box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
	padding: 28px;
}

.moulfood-account-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 999px;
	background: #f3f4f6;
	color: #111827;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.moulfood-account-head {
	padding-right: 54px;
	margin-bottom: 20px;
}

.moulfood-account-head p {
	margin: 0 0 5px;
	color: var(--moulfood-account-primary, #f97316);
	font-size: 13px;
	font-weight: 900;
	text-transform: uppercase;
}

.moulfood-account-head h2 {
	margin: 0;
	font-size: clamp(26px, 3vw, 36px);
	line-height: 1.08;
	letter-spacing: 0;
}

.moulfood-account-alert {
	margin-bottom: 16px;
	padding: 13px 15px;
	border-radius: 12px;
	background: #fff7ed;
	border: 1px solid #fed7aa;
	color: #9a3412;
	font-weight: 700;
}

.moulfood-account-alert.is-success {
	background: #dcfce7;
	border-color: #bbf7d0;
	color: #15803d;
}

.moulfood-account-alert.is-error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

.moulfood-account-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 6px;
	border-radius: 999px;
	background: #f3f4f6;
	margin-bottom: 18px;
}

.moulfood-account-tabs button {
	flex: 1 1 auto;
	min-height: 40px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #64748b;
	font-weight: 900;
	padding: 8px 12px;
	cursor: pointer;
}

.moulfood-account-tabs button.is-active {
	background: var(--moulfood-account-primary, #f97316);
	color: #fff;
	box-shadow: 0 8px 18px rgba(249, 115, 22, 0.24);
}

.moulfood-account-panel {
	display: none;
	gap: 14px;
}

.moulfood-account-panel.is-active {
	display: grid;
}

.moulfood-account-panel label {
	display: grid;
	gap: 7px;
}

.moulfood-account-panel span {
	font-size: 13px;
	font-weight: 900;
	color: #334155;
}

.moulfood-account-panel input,
.moulfood-account-panel textarea {
	width: 100%;
	border: 1px solid #dbe3ee;
	border-radius: 12px;
	background: #fff;
	color: #111827;
	padding: 12px 13px;
	font-size: 15px;
	outline: none;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.moulfood-account-panel input:focus,
.moulfood-account-panel textarea:focus {
	border-color: var(--moulfood-account-primary, #f97316);
	box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14);
}

.moulfood-account-panel input.has-error,
.moulfood-account-panel textarea.has-error {
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.moulfood-account-panel small {
	min-height: 15px;
	color: #dc2626;
	font-size: 12px;
}

.moulfood-account-primary,
.moulfood-account-secondary {
	min-height: 46px;
	border-radius: 999px;
	border: 0;
	padding: 0 22px;
	font-weight: 900;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.moulfood-account-primary {
	background: var(--moulfood-account-primary, #f97316);
	color: #fff;
	box-shadow: 0 10px 20px rgba(249, 115, 22, 0.22);
}

.moulfood-account-secondary {
	background: #f3f4f6;
	color: #111827;
}

.moulfood-account-primary.is-loading,
.moulfood-account-secondary.is-loading {
	opacity: 0.65;
	cursor: not-allowed;
}

.moulfood-account-summary {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px;
	border-radius: 14px;
	background: #f8fafc;
	margin-bottom: 18px;
}

.moulfood-account-avatar {
	width: 52px;
	height: 52px;
	border-radius: 999px;
	background: #fff7ed;
	color: #c2410c;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	font-size: 22px;
}

.moulfood-account-summary h3 {
	margin: 0 0 3px;
	font-size: 20px;
}

.moulfood-account-summary p {
	margin: 0;
	color: #64748b;
}

.moulfood-account-info-list {
	display: grid;
	gap: 10px;
	margin-bottom: 16px;
}

.moulfood-account-info-list > div,
.moulfood-account-order-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px;
	border-radius: 12px;
	background: #f8fafc;
}

.moulfood-account-info-list span,
.moulfood-account-order-row span {
	color: #64748b;
}

.moulfood-account-orders {
	display: grid;
	gap: 10px;
}

.moulfood-account-order-row {
	align-items: flex-start;
}

.moulfood-account-order-main {
	display: grid;
	gap: 3px;
}

.moulfood-account-order-main strong {
	color: #111827;
}

.moulfood-account-order-meta {
	color: #64748b;
	font-size: 13px;
}

.moulfood-account-order-row button,
.moulfood-account-order-details button {
	border: 0;
	border-radius: 999px;
	background: #fff7ed;
	color: #c2410c;
	font-weight: 900;
	padding: 8px 12px;
	cursor: pointer;
}

.moulfood-account-order-details {
	margin-top: 14px;
	padding: 14px;
	border-radius: 14px;
	background: #f8fafc;
	display: grid;
	gap: 10px;
}

.moulfood-account-order-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
	padding: 10px 0;
	border-bottom: 1px solid #e5e7eb;
}

.moulfood-account-order-item:last-child {
	border-bottom: 0;
}

.moulfood-account-order-item small {
	color: #64748b;
}

body.moulfood-account-open {
	overflow: hidden;
}

.header-account-btn.is-logged-in {
	border-color: rgba(249, 115, 22, 0.45);
	color: var(--moulfood-account-primary, #f97316);
}

@media (max-width: 767px) {
	.moulfood-account-popup {
		align-items: flex-end;
		padding: 0;
	}

	.moulfood-account-dialog {
		width: 100%;
		max-height: calc(100vh - 18px);
		border-radius: 20px 20px 0 0;
		padding: 22px 16px 18px;
	}

	.moulfood-account-head {
		padding-right: 44px;
		margin-bottom: 16px;
	}

	.moulfood-account-tabs {
		border-radius: 14px;
	}

	.moulfood-account-tabs button {
		font-size: 13px;
	}

	.moulfood-account-order-row {
		display: grid;
	}
}
