:root {
	--mp-bg: #f1f5f9;
	--mp-card: #ffffff;
	--mp-text: #0f172a;
	--mp-muted: #64748b;
	--mp-border: #cbd5e1;
	--mp-primary: #0f766e;
	--mp-primary-hover: #0d9488;
	--mp-success: #15803d;
	--mp-success-bg: #dcfce7;
	--mp-warning: #b45309;
	--mp-warning-bg: #fef3c7;
	--mp-danger: #b91c1c;
	--mp-danger-bg: #fee2e2;
	--mp-info: #0369a1;
	--mp-info-bg: #e0f2fe;
	--mp-radius: 12px;
	--mp-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background: var(--mp-bg);
	color: var(--mp-text);
	line-height: 1.6;
}

a {
	color: var(--mp-primary);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

.mp-container {
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 16px;
}

/* Header & Navigation */
.mp-header {
	background: #0f172a;
	color: #fff;
	position: sticky;
	top: 0;
	z-index: 40;
	box-shadow: var(--mp-shadow);
}

.mp-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 62px;
	padding-top: 8px;
	padding-bottom: 8px;
}

.mp-brand {
	color: #fff;
	font-weight: 800;
	font-size: 1.15rem;
}

.mp-brand:hover {
	text-decoration: none;
}

.mp-nav-toggle {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 8px;
	padding: 6px 12px;
	font-family: inherit;
	font-size: 0.92rem;
	cursor: pointer;
}

.mp-nav {
	display: none;
	width: 100%;
	flex-direction: column;
	gap: 6px;
	padding: 8px 0 4px;
}

.mp-nav.is-open {
	display: flex;
}

.mp-nav__link {
	color: #e2e8f0;
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 0.92rem;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.mp-nav__link:hover,
.mp-nav__link.is-active {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	text-decoration: none;
}

.mp-nav__link--muted {
	color: #fca5a5;
}

.mp-nav__badge {
	background: #ef4444;
	color: #fff;
	font-size: 0.72rem;
	padding: 1px 6px;
	border-radius: 999px;
}

@media (min-width: 960px) {
	.mp-nav-toggle {
		display: none;
	}
	.mp-nav {
		display: flex;
		width: auto;
		flex-direction: row;
		align-items: center;
		padding: 0;
	}
}

.mp-main {
	padding: 20px 0 42px;
	min-height: calc(100vh - 132px);
}

.mp-footer {
	border-top: 1px solid var(--mp-border);
	background: #fff;
	padding: 16px 0;
	font-size: 0.86rem;
}

.mp-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
}

/* Typography & Layout Utilities */
.mp-page-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
}

.mp-page-head h1 {
	margin: 0;
	font-size: 1.45rem;
}

.mp-muted {
	color: var(--mp-muted);
	font-size: 0.88rem;
}

.mp-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: 1fr;
}

.mp-grid--2 {
	grid-template-columns: 1fr;
}

.mp-grid--3 {
	grid-template-columns: 1fr;
}

.mp-grid--4 {
	grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 720px) {
	.mp-grid--2 {
		grid-template-columns: repeat(2, 1fr);
	}
	.mp-grid--3 {
		grid-template-columns: repeat(3, 1fr);
	}
	.mp-grid--4 {
		grid-template-columns: repeat(4, 1fr);
	}
}

.mp-card {
	background: var(--mp-card);
	border: 1px solid var(--mp-border);
	border-radius: var(--mp-radius);
	padding: 16px;
	box-shadow: var(--mp-shadow);
	margin-bottom: 16px;
}

.mp-card__title {
	margin: 0 0 12px;
	font-size: 1.08rem;
	font-weight: 700;
}

.mp-kpi {
	background: var(--mp-card);
	border: 1px solid var(--mp-border);
	border-radius: var(--mp-radius);
	padding: 14px;
	box-shadow: var(--mp-shadow);
}

.mp-kpi__label {
	color: var(--mp-muted);
	font-size: 0.85rem;
	margin-bottom: 4px;
}

.mp-kpi__value {
	font-size: 1.28rem;
	font-weight: 800;
	color: var(--mp-text);
}

.mp-hero {
	background: linear-gradient(135deg, #0f172a, var(--mp-primary));
	color: #fff;
	border-radius: 16px;
	padding: 28px 20px;
	margin-bottom: 20px;
}

.mp-hero h1 {
	margin: 0 0 8px;
	font-size: 1.75rem;
}

.mp-hero p {
	margin: 0 0 18px;
	opacity: 0.94;
}

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

/* Alerts & Badges */
.mp-alert {
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid transparent;
	margin-bottom: 14px;
	font-size: 0.93rem;
}

.mp-alert--success {
	background: var(--mp-success-bg);
	color: var(--mp-success);
	border-color: #86efac;
}

.mp-alert--error {
	background: var(--mp-danger-bg);
	color: var(--mp-danger);
	border-color: #fca5a5;
}

.mp-alert--warning {
	background: var(--mp-warning-bg);
	color: var(--mp-warning);
	border-color: #fcd34d;
}

.mp-alert--info {
	background: var(--mp-info-bg);
	color: var(--mp-info);
	border-color: #7dd3fc;
}

.mp-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	background: #e2e8f0;
	color: #334155;
	white-space: nowrap;
}

.mp-badge--success {
	background: var(--mp-success-bg);
	color: var(--mp-success);
}

.mp-badge--warning {
	background: var(--mp-warning-bg);
	color: var(--mp-warning);
}

.mp-badge--danger {
	background: var(--mp-danger-bg);
	color: var(--mp-danger);
}

/* Forms & Buttons */
.mp-form-group {
	margin-bottom: 12px;
}

.mp-form-group label {
	display: block;
	font-size: 0.88rem;
	font-weight: 700;
	margin-bottom: 4px;
}

.mp-input,
.mp-select,
.mp-textarea {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--mp-border);
	border-radius: 8px;
	font-family: inherit;
	font-size: 0.95rem;
	background: #fff;
	color: var(--mp-text);
}

.mp-input--inline {
	width: auto;
	min-width: 110px;
}

.mp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 16px;
	border-radius: 8px;
	border: 1px solid transparent;
	font-family: inherit;
	font-size: 0.92rem;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
}

.mp-btn:hover {
	text-decoration: none;
}

.mp-btn--sm {
	padding: 5px 10px;
	font-size: 0.83rem;
}

.mp-btn--primary {
	background: var(--mp-primary);
	color: #fff;
}

.mp-btn--primary:hover {
	background: var(--mp-primary);
	filter: brightness(0.92);
	color: #fff;
}

.mp-btn--secondary {
	background: #fff;
	color: var(--mp-text);
	border-color: var(--mp-border);
}

.mp-btn--danger {
	background: var(--mp-danger);
	color: #fff;
}

.mp-btn[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Tables & Mobile Responsive Wrappers */
.mp-table-wrap {
	width: 100%;
	overflow-x: auto;
}

.mp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.mp-table th,
.mp-table td {
	padding: 10px 8px;
	border-bottom: 1px solid #e2e8f0;
	text-align: right;
	vertical-align: top;
}

.mp-table th {
	background: #f8fafc;
	font-weight: 700;
	color: #334155;
	white-space: nowrap;
}

/* Empty & Loading States */
.mp-empty-state {
	background: #fff;
	border: 1px dashed var(--mp-border);
	border-radius: var(--mp-radius);
	padding: 32px 16px;
	text-align: center;
	margin-bottom: 16px;
}

.mp-empty-state__icon {
	font-size: 2rem;
	color: var(--mp-muted);
	margin-bottom: 8px;
}

.mp-empty-state__title {
	margin: 0 0 6px;
}

.mp-empty-state__desc {
	margin: 0 0 14px;
	color: var(--mp-muted);
}

.mp-loading-skeleton {
	padding: 14px;
	border: 1px solid var(--mp-border);
	border-radius: 10px;
	background: #fff;
	margin-bottom: 12px;
}

.mp-skeleton-line {
	height: 12px;
	background: linear-gradient(90deg, #e2e8f0, #f1f5f9, #e2e8f0);
	border-radius: 6px;
	margin-bottom: 8px;
}

.mp-skeleton-line--lg {
	height: 18px;
	width: 70%;
}

.is-hidden {
	display: none !important;
}

/* Product Thumbnails & Auth Box */
.mp-auth-wrap {
	max-width: 480px;
	margin: 16px auto;
}

.mp-sale-wrap {
	max-width: 720px;
	margin: 8px auto;
}

.mp-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 10px;
	margin-bottom: 14px;
}

.mp-gallery img {
	width: 100%;
	height: 130px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid var(--mp-border);
}

.mp-line-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
	padding: 10px;
	border: 1px solid var(--mp-border);
	border-radius: 8px;
	margin-bottom: 10px;
	background: #f8fafc;
}

@media (min-width: 720px) {
	.mp-line-row {
		grid-template-columns: 2fr 90px 130px auto;
		align-items: end;
	}
}
