/**
 * Aesthetics OMS — WooCommerce My Account (practitioner / prescriber shell).
 * Full-page app dashboard: sticky topbar + sticky sidebar, page scrolls
 * normally. Enqueued from C2P_Order_Management_Dashboard. Rendered inside
 * inc/templates/account-blank.php (no theme header/footer).
 *
 * All class names below are consumed by inc/c2p-order-management-dashboard-views/*.php
 * and/or js/c2p-oms-hub.js — do not rename without also updating those files.
 */

/* ==========================================================================
   1. Design tokens
   ========================================================================== */

:root {
	--c2p-navy-900: #001d3d;
	--c2p-navy-800: #00295a;
	--c2p-navy-700: #004080;
	--c2p-navy-600: #0a5aa8;
	--c2p-navy-100: #e8eef5;
	--c2p-blue-500: #3b82f6;
	--c2p-blue-100: #dbeafe;
	--c2p-purple-500: #8b5cf6;
	--c2p-purple-100: #ede9fe;
	--c2p-teal-500: #14b8a6;
	--c2p-teal-600: #0d9488;

	/* status semantics */
	--c2p-status-awaiting-bg: #fef3e2;
	--c2p-status-awaiting-fg: #c2410c;
	--c2p-status-signed-bg: #dbeafe;
	--c2p-status-signed-fg: #1e40af;
	--c2p-status-dispatched-bg: #dbeafe;
	--c2p-status-dispatched-fg: #1e40af;
	--c2p-status-processing-bg: #e0f2fe;
	--c2p-status-processing-fg: #0369a1;
	--c2p-status-success-bg: #dcfce7;
	--c2p-status-success-fg: #166534;
	--c2p-status-danger-bg: #fee2e2;
	--c2p-status-danger-fg: #b91c1c;
	--c2p-status-neutral-bg: #f3f4f6;
	--c2p-status-neutral-fg: #4b5563;
	--c2p-status-payment-bg: #fce7f3;
	--c2p-status-payment-fg: #9d174d;

	/* neutrals / surface */
	--c2p-bg-app: #f4f7fb;
	--c2p-bg-card: #ffffff;
	--c2p-bg-sidebar: #ffffff;
	--c2p-bg-subtle: #f8fafc;
	--c2p-border: #eef1f4;
	--c2p-border-strong: #e5e8ec;
	--c2p-text-primary: #0f172a;
	--c2p-text-secondary: #4b5563;
	--c2p-text-muted: #8b949e;

	/* spacing (4px base) */
	--c2p-space-1: 4px;
	--c2p-space-2: 8px;
	--c2p-space-3: 12px;
	--c2p-space-4: 16px;
	--c2p-space-5: 20px;
	--c2p-space-6: 24px;
	--c2p-space-8: 32px;
	--c2p-space-10: 40px;

	/* radius */
	--c2p-radius-sm: 8px;
	--c2p-radius-md: 12px;
	--c2p-radius-lg: 18px;
	--c2p-radius-full: 999px;

	/* shadow */
	--c2p-shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
	--c2p-shadow-sm: 0 1px 3px rgba(15, 23, 42, .07);
	--c2p-shadow-md: 0 8px 20px rgba(15, 23, 42, .08);
	--c2p-shadow-lg: 0 24px 48px rgba(15, 23, 42, .16);

	--c2p-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--c2p-topbar-h: 64px;
	--c2p-sidebar-w: 248px;
}

/* ==========================================================================
   2. App shell — sticky topbar + sticky sidebar, page scrolls normally.
   Uses the same flex mechanism (and !important overrides) as the
   pre-redesign stylesheet for this exact markup: WooCommerce core CSS and
   theme/page-builder utility CSS both carry real specificity on
   .woocommerce / .woocommerce-MyAccount-content, and win the cascade
   without !important here — that's not accidental over-specification.
   A fixed-viewport CSS Grid shell was tried and reverted: it required
   `overflow:hidden` on <body>, and when the grid rule lost the specificity
   battle the page became both mis-laid-out AND unscrollable. Sticky
   positioning degrades safely — worst case it just scrolls with the page.
   ========================================================================== */

body.c2p-oms-pro-account {
	background: var(--c2p-bg-app);
}

body.c2p-oms-pro-account .woocommerce-account .woocommerce {
	max-width: none !important;
	display: flex !important;
	flex-wrap: wrap;
	align-items: flex-start;
}

body.c2p-oms-pro-account .woocommerce-account .woocommerce > .c2p-oms-topbar {
	flex: 0 0 100% !important;
	width: 100%;
	box-sizing: border-box;
}

body.c2p-oms-pro-account .woocommerce-account .woocommerce > .c2p-oms-sidebar {
	flex: 0 0 var(--c2p-sidebar-w) !important;
	width: var(--c2p-sidebar-w);
	max-width: var(--c2p-sidebar-w);
	box-sizing: border-box;
}

body.c2p-oms-pro-account .woocommerce-account .woocommerce > .woocommerce-MyAccount-content {
	flex: 1 1 0 !important;
	min-width: 0;
}

body.c2p-oms-pro-account .woocommerce-account .woocommerce-MyAccount-content {
	padding: var(--c2p-space-6);
	margin-left: 0 !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0;
	min-height: 100vh;
	box-sizing: border-box;
	background: var(--c2p-bg-app);
	font-family: var(--c2p-font);
	float: none !important;
}

body.admin-bar.c2p-oms-pro-account .c2p-oms-topbar {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar.c2p-oms-pro-account .c2p-oms-topbar {
		top: 46px;
	}
}

body.admin-bar.c2p-oms-pro-account .c2p-oms-sidebar {
	top: calc(var(--c2p-topbar-h) + 32px);
	max-height: calc(100vh - var(--c2p-topbar-h) - 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar.c2p-oms-pro-account .c2p-oms-sidebar {
		top: calc(var(--c2p-topbar-h) + 46px);
		max-height: calc(100vh - var(--c2p-topbar-h) - 46px);
	}
}

/* ==========================================================================
   3. Topbar
   ========================================================================== */

.c2p-oms-topbar {
	position: sticky;
	top: 0;
	z-index: 998;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--c2p-topbar-h);
	padding: 0 var(--c2p-space-6) 0 var(--c2p-space-5);
	background: linear-gradient(135deg, var(--c2p-navy-700), var(--c2p-navy-800));
	color: #fff;
	box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}

.c2p-oms-topbar__mobile-menu {
	display: none;
	align-items: center;
	margin-right: var(--c2p-space-2);
}

.c2p-oms-topbar__mobile-menu-btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: inherit;
	padding: var(--c2p-space-2);
	border-radius: var(--c2p-radius-sm);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.c2p-oms-topbar__mobile-menu-btn:hover {
	background: rgba(255, 255, 255, .14);
}

.c2p-oms-topbar__mobile-menu-btn:focus-visible {
	outline: 2px solid rgba(255, 255, 255, .75);
	outline-offset: 2px;
}

.c2p-oms-topbar__brand {
	display: flex;
	align-items: center;
	gap: var(--c2p-space-3);
}

.c2p-oms-topbar__logo {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff;
	color: var(--c2p-navy-700);
	font-weight: 700;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: var(--c2p-shadow-xs);
}

.c2p-oms-topbar__titles {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}

.c2p-oms-topbar__title {
	font-weight: 700;
	font-size: 17px;
	letter-spacing: -.01em;
}

.c2p-oms-topbar__subtitle {
	font-size: 12px;
	opacity: .8;
	font-weight: 500;
}

.c2p-oms-topbar__actions {
	display: flex;
	align-items: center;
	gap: var(--c2p-space-2);
}

.c2p-oms-topbar__icon-btn {
	position: relative;
	color: #fff;
	padding: var(--c2p-space-2);
	border-radius: var(--c2p-radius-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: background .15s ease;
}

.c2p-oms-topbar__icon-btn:hover {
	background: rgba(255, 255, 255, .14);
	color: #fff;
}

.c2p-oms-topbar__notif-dot {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #f5a623;
	border: 2px solid var(--c2p-navy-700);
}

.c2p-oms-topbar__link {
	display: inline-flex;
	align-items: center;
	gap: var(--c2p-space-2);
	color: #fff;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	padding: var(--c2p-space-2) var(--c2p-space-3);
	border-radius: var(--c2p-radius-sm);
	transition: background .15s ease;
}

.c2p-oms-topbar__link:hover {
	background: rgba(255, 255, 255, .14);
	color: #fff;
}

/* ==========================================================================
   4. Sidebar
   ========================================================================== */

.c2p-oms-sidebar {
	position: sticky;
	top: var(--c2p-topbar-h);
	align-self: flex-start;
	max-height: calc(100vh - var(--c2p-topbar-h));
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	z-index: 900;
	background: var(--c2p-bg-sidebar);
	border-right: 1px solid var(--c2p-border);
	padding: var(--c2p-space-5) var(--c2p-space-3);
	display: flex;
	flex-direction: column;
	gap: 2px;
	box-sizing: border-box;
}

.c2p-oms-sidebar__link {
	display: flex;
	align-items: center;
	gap: var(--c2p-space-3);
	padding: 11px var(--c2p-space-3);
	border-radius: var(--c2p-radius-sm);
	text-decoration: none !important;
	color: var(--c2p-text-secondary);
	font-size: 14px;
	font-weight: 600;
	transition: background .15s ease, color .15s ease;
}

.c2p-oms-sidebar__link:hover {
	color: var(--c2p-navy-700);
	background: var(--c2p-bg-subtle);
}

.c2p-oms-sidebar__link.is-active {
	background: var(--c2p-navy-700);
	color: #fff;
	box-shadow: var(--c2p-shadow-sm);
}

.c2p-oms-sidebar__link.is-active .c2p-oms-sidebar__icon {
	color: #fff;
}

.c2p-oms-sidebar__icon {
	display: flex;
	color: var(--c2p-text-muted);
	flex-shrink: 0;
}

.c2p-oms-help-fab {
	position: fixed;
	right: var(--c2p-space-5);
	bottom: var(--c2p-space-5);
	z-index: 10030;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--c2p-bg-card);
	border: 1px solid var(--c2p-border-strong);
	color: var(--c2p-navy-700);
	font-weight: 700;
	font-size: 18px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	box-shadow: var(--c2p-shadow-md);
	transition: transform .15s ease, background .15s ease;
}

.c2p-oms-help-fab:hover {
	background: var(--c2p-bg-subtle);
	color: var(--c2p-navy-700);
	transform: translateY(-1px);
}

/* ==========================================================================
   5. Shared: page head / search / generic card / buttons
   ========================================================================== */

.c2p-oms-page-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--c2p-space-4);
	margin-bottom: var(--c2p-space-5);
}

.c2p-oms-page-title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: var(--c2p-text-primary);
	letter-spacing: -.01em;
}

.c2p-oms-search-wrap {
	position: relative;
	margin-bottom: var(--c2p-space-5);
}

.c2p-oms-search-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: #9ca3af;
	line-height: 0;
	pointer-events: none;
}

.c2p-oms-search-input {
	width: 100%;
	box-sizing: border-box !important;
	padding: 12px 14px 12px 44px !important;
	border: 1px solid var(--c2p-border-strong) !important;
	border-radius: var(--c2p-radius-sm) !important;
	font-size: 14px;
	background: var(--c2p-bg-card);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.c2p-oms-search-input:focus {
	outline: none;
	border-color: var(--c2p-navy-600) !important;
	box-shadow: 0 0 0 3px rgba(10, 90, 168, .12);
}

.c2p-oms-card {
	background: var(--c2p-bg-card);
	border: 1px solid var(--c2p-border);
	border-radius: var(--c2p-radius-md);
	padding: var(--c2p-space-5);
	margin-bottom: var(--c2p-space-5);
	box-shadow: var(--c2p-shadow-xs);
}

.c2p-oms-muted {
	color: var(--c2p-text-secondary);
	font-size: 14px;
}

.c2p-role-dashboard__btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--c2p-space-2);
	background: var(--c2p-navy-700);
	color: #fff;
	border: none;
	border-radius: var(--c2p-radius-sm);
	padding: 12px var(--c2p-space-5);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	min-height: 44px;
	text-decoration: none;
	transition: background .15s ease, transform .1s ease;
}

.c2p-role-dashboard__btn-primary:hover,
.c2p-role-dashboard__btn-primary:focus {
	background: var(--c2p-navy-800);
	color: #fff;
}

.c2p-role-dashboard__btn-primary:active {
	transform: translateY(1px);
}

.c2p-role-dashboard__btn-icon {
	font-size: 18px;
	font-weight: 400;
	line-height: 1;
}

.c2p-oms-btn-outline {
	background: var(--c2p-bg-card);
	border: 1px solid var(--c2p-navy-700);
	color: var(--c2p-navy-700);
	border-radius: var(--c2p-radius-sm);
	padding: 10px 18px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	transition: background .15s ease, color .15s ease;
}

.c2p-oms-btn-outline:hover,
.c2p-oms-btn-outline:focus {
	background: var(--c2p-navy-700);
	color: #fff;
}

.c2p-oms-link-btn {
	background: none;
	border: none;
	color: var(--c2p-navy-700);
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	font-size: 13px;
}

.c2p-oms-view-link {
	color: var(--c2p-navy-700);
	font-weight: 600;
	text-decoration: none;
}

.c2p-oms-view-link:hover {
	text-decoration: underline;
}

.c2p-oms-info-box {
	background: var(--c2p-blue-100);
	border: 1px solid #bfdbfe;
	border-radius: var(--c2p-radius-sm);
	padding: var(--c2p-space-4);
	font-size: 14px;
	color: #1e40af;
}

/* ==========================================================================
   6. Unified badge / pill system
   (.c2p-pill, .c2p-oms-status-pill, .c2p-oms-badge all share one visual
   language — selector names preserved for PHP/JS compatibility)
   ========================================================================== */

.c2p-pill,
.c2p-oms-status-pill,
.c2p-oms-badge {
	display: inline-flex;
	align-items: center;
	font-size: 12px;
	font-weight: 600;
	padding: 5px 12px;
	border-radius: var(--c2p-radius-full);
	white-space: nowrap;
	line-height: 1.3;
}

.c2p-pill--rx {
	background: var(--c2p-purple-100);
	color: #6d28d9;
}

.c2p-pill--otc {
	background: var(--c2p-blue-100);
	color: #1d4ed8;
}

.c2p-pill--status.is-awaiting-rx,
.c2p-pill--status.is-awaiting-sign,
.c2p-pill--status.is-pending,
.c2p-oms-status-pill.is-awaiting-rx,
.c2p-oms-badge--pending {
	background: var(--c2p-status-awaiting-bg);
	color: var(--c2p-status-awaiting-fg);
}

.c2p-pill--status.is-signed,
.c2p-oms-status-pill.is-signed,
.c2p-oms-badge--ok {
	background: var(--c2p-status-signed-bg);
	color: var(--c2p-status-signed-fg);
}

.c2p-oms-status-pill.is-dispatched {
	background: var(--c2p-status-dispatched-bg);
	color: var(--c2p-status-dispatched-fg);
}

.c2p-pill--status.is-completed {
	background: var(--c2p-status-success-bg);
	color: var(--c2p-status-success-fg);
}

.c2p-oms-status-pill.is-payment {
	background: var(--c2p-status-payment-bg);
	color: var(--c2p-status-payment-fg);
}

.c2p-pill--status.is-neutral,
.c2p-oms-status-pill.is-neutral {
	background: var(--c2p-status-neutral-bg);
	color: var(--c2p-status-neutral-fg);
}

/* ==========================================================================
   7. Practitioner hub panel show/hide (load-bearing, do not change selectors)
   ========================================================================== */

.c2p-oms-hub .c2p-oms-panel {
	display: none;
}

.c2p-oms-hub .c2p-oms-panel.is-active {
	display: block;
}

/* ==========================================================================
   8. Dashboard: greeting header, notice banner, stat cards, recent orders
   ========================================================================== */

.c2p-role-dashboard--aesthetics {
	background: transparent;
	border: none;
	padding: 0;
	margin: 0;
	max-width: 1280px;
}

.c2p-role-dashboard__welcome {
	background: linear-gradient(135deg, var(--c2p-navy-100), #eef4fb);
	border-radius: var(--c2p-radius-lg);
	padding: var(--c2p-space-6);
	margin-bottom: var(--c2p-space-5);
}

.c2p-role-dashboard__welcome-inner {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: var(--c2p-space-5);
	flex-wrap: wrap;
}

.c2p-role-dashboard__identity {
	display: flex;
	gap: var(--c2p-space-4);
	align-items: flex-start;
}

.c2p-role-dashboard__avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--c2p-navy-700);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 16px;
	flex-shrink: 0;
	box-shadow: var(--c2p-shadow-sm);
}

.c2p-role-dashboard__greeting {
	margin: 0 0 6px;
	font-size: 24px;
	font-weight: 700;
	color: var(--c2p-text-primary);
	line-height: 1.25;
	letter-spacing: -.01em;
}

.c2p-role-dashboard__tagline {
	margin: 0 0 12px;
	font-size: 14px;
	color: var(--c2p-text-secondary);
}

.c2p-role-dashboard__badges {
	display: flex;
	gap: var(--c2p-space-2);
	flex-wrap: wrap;
	align-items: center;
}

.c2p-role-dashboard__badge {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	border-radius: var(--c2p-radius-sm);
	padding: 5px 10px;
}

.c2p-role-dashboard__badge--role {
	background: var(--c2p-navy-700);
	color: #fff;
}

.c2p-role-dashboard__badge--meta {
	background: rgba(0, 64, 128, .08);
	color: var(--c2p-navy-700);
	font-weight: 600;
	letter-spacing: normal;
}

.c2p-role-dashboard__welcome-actions {
	flex-shrink: 0;
	display: flex;
	gap: var(--c2p-space-3);
}

.c2p-role-dashboard__section-title {
	margin: 0 0 var(--c2p-space-4);
	font-size: 16px;
	font-weight: 700;
	color: var(--c2p-text-primary);
}

/* Notice banner ("N items need attention") */
.c2p-oms-notice-banner {
	display: flex;
	align-items: center;
	gap: var(--c2p-space-3);
	background: var(--c2p-status-awaiting-bg);
	color: var(--c2p-status-awaiting-fg);
	border: 1px solid #fde3c2;
	border-radius: var(--c2p-radius-md);
	padding: var(--c2p-space-3) var(--c2p-space-5);
	font-size: 14px;
	font-weight: 600;
	margin-bottom: var(--c2p-space-5);
}

.c2p-oms-notice-banner__icon {
	display: flex;
	flex-shrink: 0;
}

.c2p-role-dashboard__stats-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--c2p-space-4);
	margin-bottom: var(--c2p-space-6);
}

.c2p-stat-card {
	background: var(--c2p-bg-card);
	border-radius: var(--c2p-radius-md);
	padding: var(--c2p-space-5) var(--c2p-space-5) var(--c2p-space-4);
	box-shadow: var(--c2p-shadow-xs);
	border: 1px solid var(--c2p-border);
	transition: box-shadow .15s ease, transform .15s ease;
}

.c2p-stat-card:hover {
	box-shadow: var(--c2p-shadow-sm);
	transform: translateY(-2px);
}

.c2p-stat-card__top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: var(--c2p-space-3);
	gap: var(--c2p-space-2);
}

.c2p-stat-card__label {
	font-size: 12px;
	font-weight: 600;
	color: var(--c2p-text-muted);
	line-height: 1.35;
}

.c2p-stat-card__value {
	display: block;
	font-size: 30px;
	font-weight: 700;
	color: var(--c2p-text-primary);
	line-height: 1;
	letter-spacing: -.02em;
}

.c2p-stat-card__icon {
	width: 40px;
	height: 40px;
	border-radius: var(--c2p-radius-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.c2p-stat-card__icon--blue {
	background: var(--c2p-blue-500);
	color: #fff;
}

.c2p-stat-card__icon--purple {
	background: var(--c2p-purple-500);
	color: #fff;
}

.c2p-stat-card__icon--tan {
	background: #c4a574;
	color: #fff;
}

.c2p-stat-card__icon--green {
	background: #22c55e;
	color: #fff;
}

.c2p-stat-card__icon--orange {
	background: #f97316;
	color: #fff;
}

.c2p-stat-card__icon--navy {
	background: var(--c2p-navy-800);
	color: #fff;
}

.c2p-role-dashboard__lower-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: var(--c2p-space-5);
	align-items: start;
}

.c2p-role-dashboard__recent {
	background: var(--c2p-bg-card);
	border-radius: var(--c2p-radius-md);
	padding: var(--c2p-space-5) var(--c2p-space-5) var(--c2p-space-4);
	box-shadow: var(--c2p-shadow-xs);
	border: 1px solid var(--c2p-border);
	margin-bottom: var(--c2p-space-5);
}

.c2p-role-dashboard__recent-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--c2p-space-3);
	margin-bottom: var(--c2p-space-4);
}

.c2p-role-dashboard__recent-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--c2p-text-primary);
}

.c2p-role-dashboard__order-filter {
	display: flex;
	gap: var(--c2p-space-2);
	flex-wrap: wrap;
}

.c2p-order-filter-btn {
	border: 1px solid var(--c2p-border-strong);
	background: var(--c2p-bg-subtle);
	color: var(--c2p-text-secondary);
	border-radius: var(--c2p-radius-full);
	padding: 6px var(--c2p-space-4);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	transition: background .15s ease, color .15s ease;
}

.c2p-order-filter-btn:hover {
	background: var(--c2p-navy-100);
	color: var(--c2p-navy-700);
}

.c2p-order-filter-btn.is-active {
	background: var(--c2p-navy-700);
	border-color: var(--c2p-navy-700);
	color: #fff;
}

.c2p-role-dashboard__table-wrap,
.c2p-oms-table-wrap {
	overflow-x: auto;
}

.c2p-role-dashboard__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.c2p-role-dashboard__table thead th {
	text-align: left;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	color: var(--c2p-text-muted);
	background: var(--c2p-bg-subtle);
	padding: var(--c2p-space-3) var(--c2p-space-4);
	border-bottom: 1px solid var(--c2p-border);
}

.c2p-role-dashboard__table tbody td {
	padding: var(--c2p-space-4);
	border-bottom: 1px solid var(--c2p-border);
	color: var(--c2p-text-secondary);
	vertical-align: middle;
}

.c2p-role-dashboard__table tbody tr:last-child td {
	border-bottom: none;
}

.c2p-role-dashboard__table tbody tr:hover td {
	background: var(--c2p-bg-subtle);
}

.c2p-role-dashboard__table tbody a {
	color: var(--c2p-navy-700);
	font-weight: 600;
	text-decoration: none;
}

.c2p-role-dashboard__table tbody a:hover {
	text-decoration: underline;
}

.c2p-role-dashboard__table-empty,
.c2p-oms-table-empty {
	text-align: center;
	color: var(--c2p-text-muted);
	padding: 28px var(--c2p-space-4) !important;
}

/* Reorder shortcut card (visual only — links to existing create-order URLs) */
.c2p-oms-reorder-card {
	background: linear-gradient(135deg, #e6f2fb, #eef8f5);
	border: 1px solid #d9ecf7;
	border-radius: var(--c2p-radius-md);
	padding: var(--c2p-space-5);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--c2p-space-4);
}

.c2p-oms-reorder-card__title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 700;
	color: var(--c2p-text-primary);
}

.c2p-oms-reorder-card__meta {
	margin: 0;
	font-size: 13px;
	color: var(--c2p-text-secondary);
}

.c2p-oms-empty-state {
	text-align: center;
	padding: var(--c2p-space-10) var(--c2p-space-5);
}

.c2p-oms-empty-state__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--c2p-navy-100);
	color: var(--c2p-navy-700);
	margin-bottom: var(--c2p-space-4);
}

.c2p-oms-empty-state__title {
	margin: 0 0 var(--c2p-space-2);
	font-size: 18px;
	font-weight: 700;
	color: var(--c2p-text-primary);
}

.c2p-oms-empty-state .c2p-oms-muted {
	margin: 0 0 var(--c2p-space-5);
}

/* ==========================================================================
   9. Forms (patient / prescriber field grids)
   ========================================================================== */

.c2p-oms-form-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--c2p-space-4) var(--c2p-space-5);
}

.c2p-oms-form-grid p {
	margin: 0;
}

.c2p-oms-form-grid label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--c2p-text-secondary);
}

.c2p-oms-form-grid label .req {
	color: var(--c2p-status-danger-fg);
}

.c2p-oms-form-grid input,
.c2p-oms-form-grid select {
	width: 100%;
	box-sizing: border-box;
	padding: 10px var(--c2p-space-3);
	border: 1px solid var(--c2p-border-strong);
	border-radius: var(--c2p-radius-sm);
	font-size: 14px;
	font-family: inherit;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.c2p-oms-form-grid input:focus,
.c2p-oms-form-grid select:focus {
	outline: none;
	border-color: var(--c2p-navy-600);
	box-shadow: 0 0 0 3px rgba(10, 90, 168, .12);
}

.c2p-oms-span-2 {
	grid-column: span 2;
}

.c2p-oms-form-actions {
	display: flex;
	gap: var(--c2p-space-3);
	justify-content: flex-end;
	margin-top: var(--c2p-space-5);
}

/* ==========================================================================
   10. Data tables (orders / patients / prescribers / rx-approvals)
   ========================================================================== */

.c2p-oms-data-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.c2p-oms-data-table thead th {
	text-align: left;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .05em;
	color: var(--c2p-text-muted);
	background: var(--c2p-bg-subtle);
	padding: var(--c2p-space-3) var(--c2p-space-4);
	border-bottom: 1px solid var(--c2p-border);
}

.c2p-oms-data-table tbody td {
	padding: var(--c2p-space-4);
	border-bottom: 1px solid var(--c2p-border);
	vertical-align: middle;
}

.c2p-oms-data-table tbody tr:hover td {
	background: var(--c2p-bg-subtle);
}

.c2p-oms-actions-cell {
	display: flex;
	gap: var(--c2p-space-3);
	align-items: center;
}

.c2p-oms-icon-link,
.c2p-oms-icon-btn {
	background: none;
	border: none;
	padding: 4px;
	cursor: pointer;
	color: var(--c2p-navy-700);
	display: inline-flex;
	border-radius: 6px;
	transition: background .15s ease;
}

.c2p-oms-icon-btn {
	color: var(--c2p-status-danger-fg);
}

.c2p-oms-icon-link:hover,
.c2p-oms-icon-btn:hover {
	background: var(--c2p-bg-subtle);
}

.c2p-oms-inline-form {
	display: inline;
}

.c2p-oms-rx-approve-form {
	display: inline-flex !important;
	align-items: center;
	gap: var(--c2p-space-2);
}

.c2p-oms-rx-approve-form input[type="password"] {
	width: 96px;
	box-sizing: border-box;
	padding: 9px 10px;
	border: 1px solid var(--c2p-border-strong);
	border-radius: var(--c2p-radius-sm);
	font-size: 14px;
	font-family: inherit;
}

.c2p-oms-rx-approve-form input[type="password"]:focus {
	outline: none;
	border-color: var(--c2p-navy-600);
	box-shadow: 0 0 0 3px rgba(10, 90, 168, .12);
}

.c2p-oms-rx-approve-form .c2p-role-dashboard__btn-primary {
	padding: 9px var(--c2p-space-4);
	min-height: 40px;
}

.c2p-oms-actions-cell .c2p-oms-btn-outline {
	padding: 9px var(--c2p-space-4);
}

.c2p-oms-order-filters {
	display: flex;
	flex-wrap: wrap;
	gap: var(--c2p-space-2);
	margin-bottom: var(--c2p-space-4);
}

.c2p-oms-filter-pill {
	border: 1px solid var(--c2p-border-strong);
	background: var(--c2p-bg-subtle);
	color: var(--c2p-text-secondary);
	border-radius: var(--c2p-radius-full);
	padding: var(--c2p-space-2) var(--c2p-space-4);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	transition: background .15s ease, color .15s ease;
}

.c2p-oms-filter-pill:hover {
	background: var(--c2p-navy-100);
	color: var(--c2p-navy-700);
}

.c2p-oms-filter-pill.is-active {
	background: var(--c2p-navy-700);
	border-color: var(--c2p-navy-700);
	color: #fff;
}

.c2p-oms-filter-pill.is-disabled {
	pointer-events: none;
	opacity: .5;
}

.c2p-oms-pagination {
	margin-top: var(--c2p-space-4);
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: var(--c2p-space-3);
}

.c2p-oms-pagination__meta {
	font-size: 13px;
	color: var(--c2p-text-secondary);
}

/* ==========================================================================
   11. Prescriber cards
   ========================================================================== */

.c2p-oms-prescriber-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--c2p-space-4);
	margin-bottom: var(--c2p-space-5);
}

.c2p-oms-prescriber-card {
	border: 1px solid var(--c2p-border);
	border-radius: var(--c2p-radius-md);
	padding: var(--c2p-space-4);
	background: var(--c2p-bg-card);
	box-shadow: var(--c2p-shadow-xs);
	transition: box-shadow .15s ease;
}

.c2p-oms-prescriber-card:hover {
	box-shadow: var(--c2p-shadow-sm);
}

.c2p-oms-prescriber-card__head {
	display: flex;
	gap: var(--c2p-space-3);
	align-items: flex-start;
	margin-bottom: var(--c2p-space-3);
}

.c2p-oms-prescriber-card__head div strong {
	line-break: anywhere;
}

.c2p-oms-prescriber-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--c2p-blue-100);
	color: var(--c2p-navy-700);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.c2p-oms-prescriber-meta {
	margin: 4px 0;
	font-size: 13px;
	color: var(--c2p-text-secondary);
}

.c2p-oms-prescriber-card__foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: var(--c2p-space-3);
}

/* ==========================================================================
   12. Modals — unified visual language across .c2p-oms-modal (patient) and
   .c2p-patient-popup (prescriber invite). Selector names kept separate
   because each has its own JS toggle mechanism; only visuals are shared.
   ========================================================================== */

.c2p-oms-modal,
.c2p-patient-popup,
.c2p-order-type-popup,
.c2p-product-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
}

.c2p-patient-popup {
	display: none;
}

.c2p-oms-modal__backdrop,
.c2p-patient-popup__bg,
.c2p-order-type-popup__bg,
.c2p-product-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .5);
	backdrop-filter: blur(2px);
}

.c2p-oms-modal__panel,
.c2p-patient-popup__panel {
	position: relative;
	margin: var(--c2p-space-6) auto;
	max-width: 900px;
	width: calc(100% - var(--c2p-space-6));
	max-height: calc(100vh - 48px);
	overflow: hidden;
	padding: 0;
	display: flex;
	flex-direction: column;
	background: var(--c2p-bg-card);
	border-radius: var(--c2p-radius-lg);
	box-shadow: var(--c2p-shadow-lg);
}

.c2p-oms-modal__head,
.c2p-patient-popup__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--c2p-space-3);
	padding: var(--c2p-space-5) var(--c2p-space-5) var(--c2p-space-4);
	margin: 0;
	border-bottom: 1px solid var(--c2p-border);
	background: var(--c2p-bg-card);
}

.c2p-oms-modal__title,
.c2p-patient-popup__head h4 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: var(--c2p-text-primary);
}

.c2p-oms-modal__scroll,
.c2p-scroll {
	flex: 1;
	overflow: auto;
	padding: var(--c2p-space-5);
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 64, 128, .35) transparent;
}

.c2p-oms-modal__scroll::-webkit-scrollbar,
.c2p-scroll::-webkit-scrollbar {
	width: 6px;
}

.c2p-oms-modal__scroll::-webkit-scrollbar-thumb,
.c2p-scroll::-webkit-scrollbar-thumb {
	background: rgba(0, 64, 128, .35);
	border-radius: var(--c2p-radius-full);
}

.c2p-oms-modal__scroll::-webkit-scrollbar-track,
.c2p-scroll::-webkit-scrollbar-track {
	background: transparent;
}

.c2p-patient-popup__body {
	padding: var(--c2p-space-5);
}

.c2p-patient-popup__section-title {
	margin: 0 0 var(--c2p-space-4);
	font-size: 16px;
	font-weight: 700;
	color: var(--c2p-text-primary);
}

.c2p-patient-popup__fields {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--c2p-space-4);
}

.c2p-patient-popup__fields p {
	margin: 0;
}

.c2p-field--full {
	grid-column: 1 / -1;
}

.c2p-patient-popup__fields label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: var(--c2p-text-secondary);
	margin-bottom: 6px;
}

.c2p-patient-popup__fields input,
.c2p-patient-popup__fields select {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--c2p-border-strong);
	border-radius: var(--c2p-radius-sm);
	padding: 10px var(--c2p-space-3);
	font-size: 14px;
	font-family: inherit;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.c2p-patient-popup__fields input:focus,
.c2p-patient-popup__fields select:focus {
	outline: none;
	border-color: var(--c2p-navy-600);
	box-shadow: 0 0 0 3px rgba(10, 90, 168, .12);
}

.c2p-patient-popup__actions {
	margin-top: var(--c2p-space-5);
	display: flex;
	justify-content: flex-end;
}

.c2p-patient-popup__actions .button.alt {
	background: var(--c2p-navy-700) !important;
	color: #fff !important;
	border: none;
	border-radius: var(--c2p-radius-sm);
	padding: 12px var(--c2p-space-5);
	font-weight: 600;
	cursor: pointer;
	min-height: 44px;
}

.c2p-patient-popup__actions .button.alt:hover {
	background: var(--c2p-navy-800) !important;
}

/* Close buttons — one shared base, per-context tone via modifiers */
.c2p-popup-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	margin: 0;
	line-height: 0;
	border: 1px solid var(--c2p-border-strong);
	background: var(--c2p-bg-card);
	color: var(--c2p-text-secondary);
	border-radius: var(--c2p-radius-sm);
	cursor: pointer;
	flex-shrink: 0;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.c2p-popup-close:hover {
	background: var(--c2p-bg-subtle);
	border-color: var(--c2p-navy-600);
	color: var(--c2p-navy-700);
}

.c2p-popup-close:focus-visible {
	outline: 2px solid var(--c2p-navy-600);
	outline-offset: 2px;
}

.c2p-popup-close svg {
	display: block;
}

.c2p-popup-close--patient,
.c2p-popup-close--order-type {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	border: none;
	background: var(--c2p-navy-100);
	color: var(--c2p-navy-700);
}

.c2p-popup-close--patient:hover,
.c2p-popup-close--order-type:hover {
	background: #d7e6f4;
	color: var(--c2p-navy-800);
}

/* ==========================================================================
   13. "New order" (RX / OTC) choice popup — bespoke two-card layout
   ========================================================================== */

.c2p-order-type-popup__panel {
	position: relative;
	max-width: 640px;
	margin: 8vh auto;
	background: var(--c2p-bg-card);
	border-radius: var(--c2p-radius-lg);
	padding: var(--c2p-space-6) var(--c2p-space-6) var(--c2p-space-5);
	z-index: 2;
	box-shadow: var(--c2p-shadow-lg);
}

.c2p-order-type-popup__topbar {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: var(--c2p-space-3);
	margin-bottom: var(--c2p-space-2);
}

.c2p-order-type-popup__eyebrow {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 7px var(--c2p-space-4);
	border-radius: var(--c2p-radius-full);
	background: var(--c2p-navy-100);
	color: var(--c2p-navy-700);
}

.c2p-order-type-popup__intro {
	margin-bottom: var(--c2p-space-6);
}

.c2p-order-type-popup__intro h4 {
	margin: 0 0 var(--c2p-space-2);
	font-size: 25px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--c2p-text-primary);
	letter-spacing: -.02em;
}

.c2p-order-type-popup__subtitle {
	margin: 0;
	font-size: 15px;
	line-height: 1.45;
	color: var(--c2p-text-secondary);
}

.c2p-order-type-popup__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--c2p-space-4);
}

.c2p-order-type-card {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--c2p-space-4);
	width: 100%;
	margin: 0;
	padding: var(--c2p-space-5) 44px var(--c2p-space-5) var(--c2p-space-5);
	text-align: left;
	border: 1px solid var(--c2p-border-strong);
	background: var(--c2p-bg-card);
	border-radius: var(--c2p-radius-md);
	cursor: pointer;
	color: var(--c2p-text-primary);
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, transform .1s ease;
	font: inherit;
	text-decoration: none;
}

a.c2p-order-type-card:visited {
	color: inherit;
}

.c2p-order-type-card:hover,
.c2p-order-type-card:focus {
	border-color: var(--c2p-navy-600);
	box-shadow: var(--c2p-shadow-sm);
	background: var(--c2p-bg-subtle);
	outline: none;
	transform: translateY(-1px);
}

.c2p-order-type-card:focus-visible {
	outline: 2px solid var(--c2p-navy-600);
	outline-offset: 2px;
}

.c2p-order-type-card__badge {
	position: absolute;
	top: var(--c2p-space-4);
	right: var(--c2p-space-4);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	padding: 4px 9px;
	border-radius: 6px;
	line-height: 1;
}

.c2p-order-type-card--rx .c2p-order-type-card__badge {
	background: var(--c2p-status-success-bg);
	color: var(--c2p-status-success-fg);
}

.c2p-order-type-card--otc .c2p-order-type-card__badge {
	background: var(--c2p-purple-100);
	color: #5b21b6;
}

.c2p-order-type-card__icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: var(--c2p-radius-sm);
	color: #fff;
}

.c2p-order-type-card__icon--rx {
	background: var(--c2p-teal-600);
}

.c2p-order-type-card__icon--otc {
	background: var(--c2p-navy-800);
}

.c2p-order-type-card__body {
	flex: 1;
	min-width: 0;
	padding-right: var(--c2p-space-2);
}

.c2p-order-type-card__body strong {
	display: block;
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 4px;
	color: var(--c2p-text-primary);
}

.c2p-order-type-card__body > span {
	display: block;
	font-size: 13px;
	line-height: 1.45;
	color: var(--c2p-text-secondary);
	font-weight: 400;
}

.c2p-order-type-card__chev {
	flex-shrink: 0;
	display: flex;
	color: #94a3b8;
	margin-left: auto;
}

.c2p-order-type-popup__footer {
	margin: var(--c2p-space-5) 0 0;
	text-align: center;
	font-size: 14px;
	color: var(--c2p-text-secondary);
	line-height: 1.5;
}

.c2p-order-type-popup__help-link {
	color: var(--c2p-text-primary);
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid rgba(15, 23, 42, .2);
	margin-left: 4px;
}

.c2p-order-type-popup__help-link:hover {
	color: var(--c2p-navy-700);
	border-bottom-color: var(--c2p-navy-700);
}

@media (max-width: 540px) {
	.c2p-order-type-popup__panel {
		margin: 4vh var(--c2p-space-4);
		padding: var(--c2p-space-5) var(--c2p-space-4) var(--c2p-space-4);
	}

	.c2p-order-type-popup__intro h4 {
		font-size: 21px;
	}

	.c2p-order-type-card {
		padding: var(--c2p-space-4) 40px var(--c2p-space-4) var(--c2p-space-3);
		gap: var(--c2p-space-3);
	}

	.c2p-order-type-card__icon {
		width: 46px;
		height: 46px;
	}
}

/* ==========================================================================
   14. Misc
   ========================================================================== */

body.c2p-oms-pro-account .woocommerce-account .woocommerce-MyAccount-navigation {
	display: none;
}

.woocommerce-account.woocommerce-page.woocommerce-dashboard .page-header,
.page-header {
	display: none;
}

body.c2p-popup-open {
	overflow: hidden;
}

.qty button {
	padding: 5px;
	line-height: 10px;
	border: 1px solid var(--c2p-navy-700);
}

.qty button:hover,
.qty button:focus {
	background: var(--c2p-navy-800);
	color: #fff;
	border-color: var(--c2p-navy-800);
}

.qty button:active {
	background: var(--c2p-navy-700);
	color: #fff;
	border-color: var(--c2p-navy-700);
}

#c2p-prescriber-select + .select2-container,
#c2p-patient-select + .select2-container {
	width: 100% !important;
}

#c2p-prescriber-select + .select2-container .select2-selection--single,
#c2p-patient-select + .select2-container .select2-selection--single {
	height: 44px;
	display: flex;
	align-items: center;
}

/* ==========================================================================
   15. Responsive
   ========================================================================== */

@media (max-width: 991px) {
	body.c2p-oms-pro-account .woocommerce-account .woocommerce {
		flex-direction: column;
	}

	body.c2p-oms-pro-account .woocommerce-account .woocommerce > .c2p-oms-sidebar {
		flex: 0 0 auto !important;
		width: 100%;
		max-width: none;
	}

	body.c2p-oms-pro-account .woocommerce-account .woocommerce-MyAccount-content {
		margin-left: 0 !important;
		width: 100% !important;
	}

	.c2p-oms-sidebar {
		position: sticky;
		top: var(--c2p-topbar-h);
		z-index: 900;
		max-height: none;
		overflow-y: visible;
		width: 100%;
		flex-direction: row;
		flex-wrap: wrap;
		border-right: none;
		border-bottom: 1px solid var(--c2p-border);
		padding: var(--c2p-space-3);
	}

	.c2p-role-dashboard__stats-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.c2p-role-dashboard__lower-grid {
		grid-template-columns: 1fr;
	}

	.c2p-oms-reorder-card {
		flex-direction: column;
		align-items: flex-start;
	}

	.c2p-oms-reorder-card .c2p-role-dashboard__btn-primary {
		width: 100%;
	}

	.c2p-oms-form-grid,
	.c2p-patient-popup__fields {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.c2p-oms-span-2 {
		grid-column: span 1;
	}
}

@media (max-width: 768px) {
	.c2p-oms-topbar__mobile-menu {
		display: flex;
	}

	.c2p-oms-sidebar {
		position: fixed;
		left: 0;
		top: var(--c2p-topbar-h);
		height: calc(100vh - var(--c2p-topbar-h));
		width: min(86vw, 320px);
		overflow: auto;
		z-index: 10040;
		border-right: 1px solid var(--c2p-border);
		border-bottom: none;
		padding: var(--c2p-space-4) var(--c2p-space-3);
		flex-direction: column;
		flex-wrap: nowrap;
		transform: translateX(-105%);
		transition: transform .2s ease;
		box-shadow: var(--c2p-shadow-lg);
	}

	body.admin-bar.c2p-oms-pro-account .c2p-oms-sidebar {
		top: calc(var(--c2p-topbar-h) + 46px);
		height: calc(100vh - var(--c2p-topbar-h) - 46px);
	}

	body.c2p-oms-mobile-nav-open .c2p-oms-sidebar {
		transform: translateX(0);
	}

	body.c2p-oms-mobile-nav-open {
		overflow: hidden;
		touch-action: none;
	}

	body.c2p-oms-mobile-nav-open::before {
		content: "";
		position: fixed;
		inset: 0;
		z-index: 10035;
		background: rgba(15, 23, 42, .45);
	}

	body.c2p-oms-pro-account .woocommerce-account .woocommerce-MyAccount-content {
		padding: var(--c2p-space-4);
	}
}

@media (max-width: 680px) {
	.c2p-role-dashboard__stats-grid {
		grid-template-columns: 1fr;
	}

	.c2p-oms-topbar__subtitle {
		display: none;
	}

	.c2p-oms-topbar__title {
		font-size: 15px;
	}

	.c2p-oms-topbar__icon-btn {
		display: none !important;
	}

	.c2p-role-dashboard__greeting {
		font-size: 19px;
	}

	.c2p-role-dashboard__avatar {
		display: none;
	}

	.c2p-role-dashboard__welcome-actions .c2p-role-dashboard__btn-primary {
		width: 100%;
	}
}

@media (max-width: 640px) {
	.c2p-patient-popup__fields,
	.c2p-oms-form-grid {
		grid-template-columns: 1fr;
	}

	.c2p-oms-span-2 {
		grid-column: span 1;
	}

	.c2p-oms-modal__head,
	.c2p-patient-popup__head {
		padding: var(--c2p-space-4);
	}

	.c2p-oms-modal__scroll,
	.c2p-scroll,
	.c2p-patient-popup__body {
		padding: var(--c2p-space-4);
	}
}

/* ==========================================================================
   16. LEGACY — unused since the in-page "create order" wizard was retired in
   favour of the standalone /new-order/ page (inc/c2p-order-wizard.php).
   Left in place untouched: still targeted by ~250 lines of dead code in
   js/c2p-oms-hub.js, and no current view renders this markup. Not part of
   the visual redesign scope.
   ========================================================================== */

.c2p-co-wizard {
	max-width: 1180px;
}

.c2p-co-wizard__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.c2p-co-back {
	background: none;
	border: none;
	color: #004080;
	cursor: pointer;
	padding: 6px;
}

.c2p-co-wizard__title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: #111827;
}

.c2p-co-stepper {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}

.c2p-co-stepper__item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #9ca3af;
	flex: 1;
	min-width: 120px;
}

.c2p-co-stepper__item.is-active {
	color: #004080;
}

.c2p-co-stepper__num {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	background: #e5e7eb;
	color: #fff;
}

.c2p-co-stepper__item.is-active .c2p-co-stepper__num {
	background: #004080;
	color: #fff;
}

.c2p-co-layout {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: flex-start;
}

.c2p-co-main {
	flex: 1;
	min-width: 280px;
}

.c2p-co-summary {
	width: 100%;
	max-width: 340px;
	flex-shrink: 0;
}

.c2p-co-card__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.c2p-co-card__head h3 {
	margin: 0;
	font-size: 17px;
}

.c2p-co-empty {
	text-align: center;
	padding: 32px 16px;
	border: 2px dashed #e5e7eb;
	border-radius: 12px;
}

.c2p-co-selected-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
}

.c2p-co-sel-card {
	border: 1px solid #eef1f4;
	border-radius: 10px;
	padding: 12px;
}

.c2p-co-sel-card h4 {
	font-size: 18px;
}

.c2p-co-sel-card .qty {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}

.c2p-co-nav-btns {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	flex-wrap: wrap;
	margin-top: 16px;
}

.c2p-co-select-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 8px;
	color: #374151;
}

.c2p-co-wizard .c2p-co-prescriber-select,
.c2p-co-wizard .c2p-co-patient-select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	font-size: 14px;
	font-family: inherit;
	background-color: #fff;
	cursor: pointer;
	min-height: 44px;
}

.c2p-order-summary-table--simple {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.c2p-order-summary-table--simple td {
	padding: 10px 0;
	border-bottom: 1px solid #eef1f4;
	vertical-align: top;
}

.c2p-order-summary-table--simple .c2p-co-summary__name {
	font-weight: 600;
	color: #111827;
	padding: 10px;
	border: 0;
}

.c2p-order-summary-table--simple .c2p-co-summary__price {
	text-align: right;
	white-space: nowrap;
	border: 0;
	font-weight: 600;
	color: #004080;
}

.c2p-co-summary__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	font-size: 16px;
}

.c2p-co-summary__totals {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #eef1f4;
	font-size: 14px;
}

.c2p-co-summary__totals > div {
	display: flex;
	justify-content: space-between;
	margin-bottom: 6px;
}

.c2p-co-summary__total {
	font-weight: 700;
	font-size: 16px;
	margin-top: 8px;
}

.c2p-co-summary__total strong {
	color: #004080;
}

.c2p-oms-note-code {
	font-size: 13px;
	color: #6b7280;
}

.c2p-order-summary-box {
	border: 1px solid #e2ece9;
	border-radius: 12px;
	background: #f7fbfa;
	padding: 12px;
	margin-bottom: 14px;
}

.c2p-order-summary-box ul {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.c2p-order-summary-box li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-top: 1px solid #e8efed;
}

.c2p-order-summary-box li:first-child {
	border-top: 0;
}

.c2p-order-summary-box .qty {
	display: flex;
	gap: 6px;
	align-items: center;
}

.c2p-order-summary-box .qty button {
	min-width: 28px;
	border: 1px solid #d5e6e1;
	background: #fff;
	border-radius: 8px;
	padding: 3px 8px;
}

.c2p-product-popup__panel {
	position: relative;
	margin: 24px auto;
	max-width: 1100px;
	width: calc(100% - 24px);
	max-height: calc(100vh - 48px);
	overflow: auto;
	background: #f3faf8;
	border-radius: 16px;
	border: 1px solid #dae9e5;
	padding: 16px;
}

.c2p-product-popup__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
}

.c2p-product-popup__head h4 {
	margin: 0;
}

.c2p-product-popup__filters {
	margin: 14px 0;
}

.c2p-product-popup__filters input[type="search"] {
	width: 100%;
	border-radius: 10px;
	border: 1px solid #cfdfda;
	background: #fff;
	padding: 10px 12px;
}

.c2p-product-popup__category-chips {
	display: flex;
	gap: 8px;
	overflow: auto;
	margin-top: 10px;
	padding-bottom: 4px;
}

.c2p-product-popup__category-chips .chip {
	border: 1px solid #d8e7e3;
	border-radius: 999px;
	background: #fff;
	color: #24544c;
	padding: 7px 12px;
	white-space: nowrap;
	font-size: 13px;
}

.c2p-product-popup__category-chips .chip.is-active {
	background: #1e6c56;
	color: #fff;
	border-color: #1e6c56;
}

.c2p-product-popup__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(180px, 1fr));
	gap: 12px;
}

.c2p-product-card {
	position: relative;
	background: #fff;
	border: 1px solid #dceae6;
	border-radius: 12px;
	padding: 10px;
}

.c2p-product-card .thumb {
	background: #f8fcfb;
	border: 1px solid #e2eeeb;
	border-radius: 8px;
	min-height: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.c2p-product-card .thumb img {
	max-width: 120px;
	height: auto;
}

.c2p-product-card .thumb small {
	position: absolute;
	top: 8px;
	right: 8px;
	border-radius: 999px;
	background: #1f7a60;
	color: #fff;
	padding: 3px 8px;
	font-size: 11px;
}

.c2p-product-card h5 {
	margin: 10px 0 4px;
	font-size: 15px;
}

.c2p-product-card__rx {
	position: absolute;
	top: 8px;
	right: 8px;
	background: #ede9fe;
	color: #6d28d9;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 6px;
}

.c2p-product-card__oos {
	display: block;
	font-size: 12px;
	color: #dc2626;
	margin-top: 6px;
}

.c2p-product-card.is-oos {
	opacity: .65;
}

.c2p-product-card__variation-label {
	display: block;
	margin: 8px 0 6px;
}

.c2p-variation-select {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #dceae6;
	border-radius: 10px;
	padding: 10px 12px;
	background: #fff;
	font-size: 13px;
}

.c2p-variation-select:focus {
	outline: none;
	border-color: #004080;
	box-shadow: 0 0 0 2px rgba(0, 64, 128, .12);
}

.c2p-product-card .price {
	margin: 0 0 10px;
	color: #1f6f58;
	font-weight: 700;
}

.c2p-product-card .button {
	width: 100%;
	text-align: center;
}

.c2p-order-summary-table {
	width: 100%;
	border-collapse: collapse;
	margin: 10px 0 18px;
}

.c2p-order-summary-table th,
.c2p-order-summary-table td {
	border: 1px solid #ddd;
	padding: 10px;
	vertical-align: middle;
}

.c2p-order-summary-table .qty button {
	margin: 0 4px;
}

.c2p-order-layout {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin-top: 16px;
}

.c2p-card {
	background: #fff;
	border: 1px solid #e4e4e4;
	border-radius: 6px;
	padding: 14px;
}

.c2p-card--third {
	width: 100%;
}

@media (min-width: 1024px) {
	.c2p-card--third {
		width: 33%;
	}
}

@media (max-width: 991px) {
	.c2p-product-popup__grid {
		grid-template-columns: repeat(2, minmax(180px, 1fr));
	}
}

@media (max-width: 640px) {
	.c2p-product-popup__grid {
		grid-template-columns: 1fr;
	}
}
