/**
 * Seller portal styles — modern responsive dashboard.
 *
 * @package CustomMobileOrderSystem
 */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap");

body.cmos-seller-portal {
	margin: 0;
	background: #f3f6f4;
	color: #122017;
	font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.cmos-portal-shell {
	max-width: 520px;
	margin: 24px auto;
	background: #fff;
	border-radius: 16px;
	padding: 28px 24px;
	box-shadow: 0 4px 20px rgba(18, 32, 23, 0.06);
	border: 1px solid #e4ebe6;
}

.cmos-portal-header h1 {
	margin: 0 0 8px;
	font-size: 24px;
	letter-spacing: -0.02em;
}

.cmos-portal-header p {
	margin: 0 0 16px;
	color: #5b6b61;
}

.cmos-portal-alert {
	padding: 12px 14px;
	border-radius: 10px;
	margin-bottom: 14px;
	font-size: 14px;
	font-weight: 600;
}

.cmos-portal-alert.is-error {
	background: #fef2f2;
	color: #b42318;
}

.cmos-portal-alert.is-success {
	background: #e8f8ef;
	color: #0a6b3c;
}

.cmos-portal-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cmos-portal-form label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #5b6b61;
}

.cmos-portal-form input,
.cmos-portal-form select,
.cmos-portal-form textarea {
	border: 1px solid #cfd9d3;
	border-radius: 10px;
	padding: 12px 14px;
	font-size: 15px;
	font-family: inherit;
	min-height: 46px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cmos-portal-form input:focus,
.cmos-portal-form select:focus,
.cmos-portal-form textarea:focus {
	outline: none;
	border-color: #0f9d58;
	box-shadow: 0 0 0 3px rgba(15, 157, 88, 0.15);
}

.cmos-portal-check {
	flex-direction: row !important;
	align-items: center;
	gap: 8px !important;
	font-weight: 500 !important;
}

.cmos-portal-btn {
	border: 0 !important;
	border-radius: 10px !important;
	background: #0f9d58 !important;
	color: #fff !important;
	font-weight: 700 !important;
	padding: 13px 16px !important;
	cursor: pointer;
	font-family: inherit !important;
	transition: background 0.15s ease;
	box-shadow: none !important;
	text-decoration: none !important;
}

.cmos-portal-btn:hover {
	background: #0b7d46 !important;
	color: #fff !important;
}

.cmos-portal-header a {
	color: #0f9d58 !important;
	font-weight: 600;
	text-decoration: none !important;
}

.cmos-portal-header a:hover {
	text-decoration: underline !important;
}

.cmos-dashboard-layout {
	display: grid;
	grid-template-columns: 240px 1fr;
	min-height: 100vh;
}

.cmos-dashboard-nav {
	background: linear-gradient(180deg, #0a6b3c 0%, #0f9d58 100%);
	color: #fff;
	padding: 20px 14px;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
}

.cmos-dashboard-brand {
	font-weight: 700;
	margin-bottom: 18px;
	font-size: 15px;
	padding: 0 8px;
	letter-spacing: -0.01em;
}

.cmos-dashboard-nav a {
	display: block;
	color: rgba(255, 255, 255, 0.88);
	text-decoration: none;
	padding: 10px 12px;
	border-radius: 10px;
	margin-bottom: 4px;
	font-size: 14px;
	font-weight: 500;
	transition: background 0.15s ease, color 0.15s ease;
}

.cmos-dashboard-nav a.is-active,
.cmos-dashboard-nav a:hover {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

.cmos-dashboard-main {
	padding: 28px 28px 40px;
	max-width: 1100px;
}

.cmos-dashboard-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 14px;
	margin: 16px 0 24px;
}

.cmos-dash-card {
	background: #fff;
	border-radius: 14px;
	padding: 16px;
	box-shadow: 0 2px 10px rgba(18, 32, 23, 0.05);
	border: 1px solid #e4ebe6;
}

.cmos-dash-card .label {
	display: block;
	font-size: 12px;
	color: #5b6b61;
	margin-bottom: 8px;
	font-weight: 600;
}

.cmos-dash-card strong,
.cmos-dash-card .value {
	font-size: 22px;
	letter-spacing: -0.02em;
	color: #122017;
}

.cmos-dashboard-panel {
	background: #fff;
	border-radius: 14px;
	padding: 18px;
	margin-bottom: 16px;
	box-shadow: 0 2px 10px rgba(18, 32, 23, 0.05);
	border: 1px solid #e4ebe6;
}

.cmos-portal-form.is-inline {
	flex-direction: row;
	align-items: center;
	flex-wrap: wrap;
}

.cmos-page-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.cmos-page-header h1 {
	margin: 0;
	font-size: 24px;
	letter-spacing: -0.02em;
}

.cmos-filter-tabs {
	display: flex;
	gap: 8px;
	list-style: none;
	padding: 0;
	margin: 0 0 16px;
	flex-wrap: wrap;
}

.cmos-filter-tabs a {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 999px;
	text-decoration: none;
	color: #14532d;
	background: #e8f8ef;
	font-size: 13px;
	font-weight: 600;
}

.cmos-filter-tabs a.is-current {
	background: #0f9d58;
	color: #fff;
}

.cmos-empty-state {
	text-align: center;
	padding: 48px 20px;
	color: #5b6b61;
}

.cmos-product-grid {
	display: grid;
	gap: 12px;
}

.cmos-product-card {
	display: flex;
	gap: 14px;
	background: #fff;
	border-radius: 14px;
	padding: 16px;
	box-shadow: 0 2px 10px rgba(18, 32, 23, 0.05);
	border: 1px solid #e4ebe6;
}

.cmos-product-card-media img,
.cmos-product-card-placeholder,
.cmos-product-preview {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 10px;
	background: #eef2f1;
	display: block;
}

.cmos-product-card-placeholder {
	display: inline-block;
}

.cmos-product-card-body h2 {
	margin: 0 0 4px;
	font-size: 16px;
}

.cmos-product-card-body .meta {
	margin: 0 0 8px;
	font-size: 13px;
	color: #5b6b61;
}

.cmos-product-card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.cmos-product-card-actions a,
.cmos-inline-form button {
	font-size: 13px;
	color: #0f9d58;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	text-decoration: underline;
	font-weight: 600;
}

.cmos-status-active {
	color: #0a7a3e;
	font-weight: 600;
}

.cmos-status-inactive {
	color: #6b7280;
	font-weight: 600;
}

.cmos-status-pending {
	color: #b45309;
	font-weight: 600;
}

.cmos-status-blocked-temporary {
	color: #c2410c;
	font-weight: 600;
}

.cmos-status-blocked-permanent {
	color: #991b1b;
	font-weight: 600;
}

.cmos-status-rejected {
	color: #b91c1c;
	font-weight: 600;
}

.cmos-product-form label {
	display: block;
	margin-bottom: 14px;
}

.cmos-product-form label span {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 13px;
	color: #5b6b61;
}

.cmos-product-form input[type="text"],
.cmos-product-form select,
.cmos-product-form textarea {
	width: 100%;
	max-width: 480px;
	padding: 12px 14px;
	border: 1px solid #cfd9d3;
	border-radius: 10px;
	font-family: inherit;
	min-height: 46px;
}

.cmos-product-form small {
	display: block;
	margin-top: 6px;
	color: #5b6b61;
	font-size: 12px;
}

.cmos-store-table {
	width: 100%;
	border-collapse: collapse;
}

.cmos-store-table th,
.cmos-store-table td {
	text-align: left;
	padding: 12px 8px;
	border-bottom: 1px solid #eef2f0;
	vertical-align: top;
}

.cmos-store-table th {
	width: 160px;
	color: #5b6b61;
	font-weight: 600;
	font-size: 13px;
}

.cmos-store-url-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.cmos-store-url {
	flex: 1;
	min-width: 220px;
	padding: 12px 14px;
	border: 1px solid #cfd9d3;
	border-radius: 10px;
	background: #f8fafa;
}

.cmos-copy-feedback {
	color: #0a7a3e;
	font-size: 13px;
	margin-top: 8px;
}

.cmos-table-scroll {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
	.cmos-dashboard-layout {
		grid-template-columns: 1fr;
	}

	.cmos-dashboard-nav {
		position: relative;
		height: auto;
		display: flex;
		flex-wrap: wrap;
		gap: 6px;
		padding: 14px 12px;
		align-items: center;
	}

	.cmos-dashboard-brand {
		width: 100%;
		margin-bottom: 8px;
	}

	.cmos-dashboard-nav a {
		margin-bottom: 0;
		font-size: 13px;
		padding: 8px 10px;
	}

	.cmos-dashboard-main {
		padding: 16px 14px 32px;
	}

	.cmos-page-header h1 {
		font-size: 20px;
	}

	.cmos-table-scroll .cmos-store-table {
		min-width: 640px;
	}

	.cmos-dashboard-panel table.cmos-orders-mobile thead {
		display: none;
	}

	.cmos-dashboard-panel table.cmos-orders-mobile,
	.cmos-dashboard-panel table.cmos-orders-mobile tbody,
	.cmos-dashboard-panel table.cmos-orders-mobile tr,
	.cmos-dashboard-panel table.cmos-orders-mobile td {
		display: block;
		width: 100%;
	}

	.cmos-dashboard-panel table.cmos-orders-mobile {
		min-width: 0;
	}

	.cmos-dashboard-panel table.cmos-orders-mobile tr {
		background: #fff;
		border: 1px solid #e4ebe6;
		border-radius: 12px;
		padding: 12px 14px;
		margin-bottom: 10px;
		box-shadow: 0 1px 4px rgba(18, 32, 23, 0.04);
	}

	.cmos-dashboard-panel table.cmos-orders-mobile td {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		border: 0;
		padding: 6px 0;
		font-size: 14px;
	}

	.cmos-dashboard-panel table.cmos-orders-mobile td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #5b6b61;
		font-size: 12px;
		flex: 0 0 42%;
	}
}

@media (min-width: 901px) and (max-width: 1100px) {
	.cmos-dashboard-layout {
		grid-template-columns: 200px 1fr;
	}

	.cmos-dashboard-main {
		padding: 22px;
	}
}
