:root {
	--bg-base: #090d16;
	--card-bg: #111827;
	--border-color: #1f293d;
	--text-primary: #f8fafc;
	--text-secondary: #94a3b8;
	--text-muted: #64748b;
	--accent-emerald: #10b981;
	--accent-emerald-glow: rgba(16, 185, 129, 0.25);
	--accent-blue: #38bdf8;
	--danger-red: #ef4444;
	--warning-amber: #f59e0b;
	--radius-lg: 16px;
	--radius-md: 10px;
	--radius-sm: 6px;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	background-color: var(--bg-base);
	color: var(--text-primary);
	font-family: 'Plus Jakarta Sans', sans-serif;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-x: hidden;
	width: 100%;
	-webkit-tap-highlight-color: transparent;
}

/* Header */
.app-header {
	background: rgba(17, 24, 39, 0.85);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border-color);
	padding: 16px 32px;
}

.header-container {
	max-width: 1400px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 14px;
}

.brand-badge {
	background: linear-gradient(135deg, #059669, #10b981);
	color: white;
	font-weight: 800;
	font-size: 20px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-md);
	box-shadow: 0 0 20px var(--accent-emerald-glow);
}

.brand-text h1 {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.5px;
}

	.brand-text h1 span {
		color: var(--accent-emerald);
	}

.brand-text p {
	font-size: 12px;
	color: var(--text-secondary);
}

.system-status {
	display: flex;
	align-items: center;
	gap: 10px;
	background: rgba(16, 185, 129, 0.1);
	border: 1px solid rgba(16, 185, 129, 0.3);
	padding: 6px 14px;
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 600;
	color: var(--accent-emerald);
}

.status-indicator {
	width: 8px;
	height: 8px;
	background-color: var(--accent-emerald);
	border-radius: 50%;
	box-shadow: 0 0 10px var(--accent-emerald);
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}

	50% {
		opacity: 0.4;
		transform: scale(0.85);
	}
}

/* Layout */
.main-layout {
	max-width: 1400px;
	margin: 32px auto;
	padding: 0 32px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
	flex: 1;
	width: 100%;
}

@media (max-width: 1024px) {
	.main-layout {
		grid-template-columns: 1fr;
	}
}

/* Cards */
.card {
	background: var(--card-bg);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	padding: 24px;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.card-title {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text-primary);
}

	.card-title h2 {
		font-size: 16px;
		font-weight: 700;
	}

.live-pill {
	background: rgba(239, 68, 68, 0.15);
	color: var(--danger-red);
	border: 1px solid rgba(239, 68, 68, 0.3);
	padding: 3px 10px;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.5px;
}

/* Viewport & HUD Overlay */
.viewport-wrapper {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	background: #030712;
	border-radius: var(--radius-md);
	overflow: hidden;
	border: 1px solid var(--border-color);
}

#camera-stream {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hud-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hud-laser {
	position: absolute;
	width: 100%;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--accent-emerald), transparent);
	box-shadow: 0 0 15px var(--accent-emerald);
	top: 0;
	animation: scanline 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes scanline {
	0% {
		top: 0%;
		opacity: 0.2;
	}

	50% {
		top: 100%;
		opacity: 1;
	}

	100% {
		top: 0%;
		opacity: 0.2;
	}
}

.hud-corner {
	position: absolute;
	width: 24px;
	height: 24px;
	border: 3px solid var(--accent-emerald);
}

	.hud-corner.top-left {
		top: 20px;
		left: 20px;
		border-right: none;
		border-bottom: none;
	}

	.hud-corner.top-right {
		top: 20px;
		right: 20px;
		border-left: none;
		border-bottom: none;
	}

	.hud-corner.bottom-left {
		bottom: 20px;
		left: 20px;
		border-right: none;
		border-top: none;
	}

	.hud-corner.bottom-right {
		bottom: 20px;
		right: 20px;
		border-left: none;
		border-top: none;
	}

.controls-row {
	display: flex;
	gap: 12px;
	margin-top: 18px;
}

/* Form Styles */
.form-group {
	margin-bottom: 18px;
}

label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--text-secondary);
	margin-bottom: 8px;
}

.input-with-icon {
	position: relative;
	display: flex;
	align-items: center;
}

	.input-with-icon svg {
		position: absolute;
		left: 14px;
		color: var(--text-muted);
	}

input[type="text"] {
	width: 100%;
	background: #0b1120;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 12px 14px 12px 42px;
	font-size: 15px;
	font-family: 'JetBrains Mono', monospace;
	color: var(--text-primary);
	outline: none;
	transition: all 0.2s ease;
}

	input[type="text"]:focus {
		border-color: var(--accent-emerald);
		box-shadow: 0 0 0 3px var(--accent-emerald-glow);
	}

textarea {
	width: 100%;
	background: #0b1120;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 12px 14px;
	font-size: 14px;
	font-family: 'JetBrains Mono', monospace;
	color: var(--text-primary);
	outline: none;
	resize: none;
	line-height: 1.5;
}

/* Buttons */
.btn {
	border: none;
	border-radius: var(--radius-md);
	font-weight: 700;
	font-size: 14px;
	padding: 14px 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.2s ease;
}

.btn-primary {
	flex: 1;
	background: linear-gradient(135deg, #059669, #10b981);
	color: white;
	box-shadow: 0 4px 15px var(--accent-emerald-glow);
}

	.btn-primary:hover {
		transform: translateY(-1px);
		box-shadow: 0 6px 20px var(--accent-emerald-glow);
	}

.btn-secondary {
	background: #1f293d;
	color: var(--text-secondary);
}

	.btn-secondary:hover {
		background: #2b3952;
		color: var(--text-primary);
	}

.btn-dispense {
	width: 100%;
	background: linear-gradient(135deg, #0284c7, #38bdf8);
	color: #04101c;
	box-shadow: 0 4px 15px rgba(56, 189, 248, 0.25);
	margin-top: 8px;
}

	.btn-dispense:hover {
		transform: translateY(-1px);
		box-shadow: 0 6px 20px rgba(56, 189, 248, 0.35);
	}

/* Status Cards & Clinical Badges */
#status-output {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.badge-card {
	padding: 14px 18px;
	border-radius: var(--radius-md);
	font-size: 13px;
	line-height: 1.5;
}

.badge-success {
	background: rgba(16, 185, 129, 0.12);
	border-left: 4px solid var(--accent-emerald);
	color: #6ee7b7;
}

.badge-warning {
	background: rgba(245, 158, 11, 0.12);
	border-left: 4px solid var(--warning-amber);
	color: #fcd34d;
}

.badge-danger {
	background: rgba(239, 68, 68, 0.15);
	border-left: 4px solid var(--danger-red);
	color: #fca5a5;
}

.badge-route {
	background: rgba(56, 189, 248, 0.12);
	border-left: 4px solid var(--accent-blue);
	color: #bae6fd;
}

	.badge-route a {
		color: var(--accent-blue);
		font-weight: 700;
		text-decoration: underline;
	}

/* ==========================================================
   PATIENT PORTAL DEDICATED STYLES
   ========================================================== */
.patient-layout {
	max-width: 1000px;
	margin: 32px auto 60px;
	padding: 0 24px;
	display: flex;
	flex-direction: column;
	gap: 24px;
	flex: 1;
	width: 100%;
}

.portal-nav-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--accent-blue);
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	background: rgba(56, 189, 248, 0.1);
	border: 1px solid rgba(56, 189, 248, 0.25);
	padding: 6px 14px;
	border-radius: 9999px;
	transition: all 0.2s ease;
}

.portal-nav-link:hover {
	background: rgba(56, 189, 248, 0.2);
	border-color: var(--accent-blue);
	transform: translateY(-1px);
}

/* Patient Hero Card */
.patient-hero-card {
	background: linear-gradient(180deg, #131c31 0%, #0e1526 100%);
	border: 1px solid rgba(56, 189, 248, 0.2);
	border-radius: var(--radius-lg);
	padding: 32px;
	box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
	position: relative;
	overflow: hidden;
}

.patient-hero-card::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 300px;
	height: 300px;
	background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
	pointer-events: none;
}

.portal-title-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 16px;
}

.portal-headline h2 {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.5px;
	color: var(--text-primary);
	margin-bottom: 6px;
}

.portal-headline p {
	color: var(--text-secondary);
	font-size: 14px;
}

.search-bar-row {
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 12px;
	align-items: flex-end;
}

#lookup-btn {
	min-width: 200px;
}

.demo-id-chip {
	background: rgba(255, 255, 255, 0.05);
	border: 1px dashed var(--border-color);
	color: var(--accent-emerald);
	padding: 12px 16px;
	border-radius: var(--radius-md);
	font-size: 13px;
	font-family: 'JetBrains Mono', monospace;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.demo-id-chip:hover {
	background: rgba(16, 185, 129, 0.15);
	border-color: var(--accent-emerald);
}

/* Demographics Panel */
.demographics-panel {
	background: rgba(11, 17, 32, 0.8);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 18px 24px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
	margin-top: 24px;
	animation: fadeIn 0.3s ease;
}

.demo-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.demo-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--text-muted);
}

.demo-value {
	font-size: 15px;
	font-weight: 700;
	color: var(--text-primary);
	display: flex;
	align-items: center;
	gap: 6px;
}

.demo-value.mono {
	font-family: 'JetBrains Mono', monospace;
	color: var(--accent-blue);
}

/* Summary Stats */
.stats-strip {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
}

.stat-box {
	background: var(--card-bg);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 18px 20px;
	display: flex;
	align-items: center;
	gap: 16px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.stat-icon {
	width: 44px;
	height: 44px;
	border-radius: var(--radius-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
}

.stat-icon.emerald {
	background: rgba(16, 185, 129, 0.15);
	color: var(--accent-emerald);
	border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-icon.blue {
	background: rgba(56, 189, 248, 0.15);
	color: var(--accent-blue);
	border: 1px solid rgba(56, 189, 248, 0.3);
}

.stat-icon.amber {
	background: rgba(245, 158, 11, 0.15);
	color: var(--warning-amber);
	border: 1px solid rgba(245, 158, 11, 0.3);
}

.stat-content .stat-num {
	font-size: 22px;
	font-weight: 800;
	color: var(--text-primary);
	font-family: 'JetBrains Mono', monospace;
}

.stat-content .stat-desc {
	font-size: 12px;
	color: var(--text-secondary);
	font-weight: 500;
}

/* Medication Cards Feed */
.records-section {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.records-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border-color);
}

.records-header h3 {
	font-size: 18px;
	font-weight: 700;
	color: var(--text-primary);
	display: flex;
	align-items: center;
	gap: 8px;
}

.filter-input-wrap {
	position: relative;
	width: 260px;
}

.filter-input-wrap input {
	padding: 8px 12px 8px 34px !important;
	font-size: 13px !important;
}

.filter-input-wrap svg {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-muted);
}

.med-card-modern {
	background: var(--card-bg);
	border: 1px solid var(--border-color);
	border-left: 4px solid var(--accent-emerald);
	border-radius: var(--radius-md);
	padding: 20px 24px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	transition: all 0.2s ease;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.med-card-modern:hover {
	transform: translateY(-2px);
	border-color: rgba(16, 185, 129, 0.5);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.med-card-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 12px;
}

.med-title-group {
	display: flex;
	align-items: center;
	gap: 12px;
}

.med-pill-icon {
	width: 40px;
	height: 40px;
	border-radius: var(--radius-sm);
	background: rgba(16, 185, 129, 0.15);
	color: var(--accent-emerald);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
}

.med-title-group h4 {
	font-size: 18px;
	font-weight: 700;
	color: var(--text-primary);
	margin-bottom: 2px;
}

.med-status-tag {
	background: rgba(16, 185, 129, 0.12);
	color: var(--accent-emerald);
	border: 1px solid rgba(16, 185, 129, 0.3);
	padding: 4px 10px;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.med-details-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
	background: rgba(11, 17, 32, 0.5);
	padding: 12px 16px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(31, 41, 61, 0.6);
}

.med-detail-col span {
	font-size: 11px;
	color: var(--text-muted);
	display: block;
	margin-bottom: 2px;
	font-weight: 600;
	text-transform: uppercase;
}

.med-detail-col strong {
	font-size: 14px;
	color: var(--text-primary);
	font-family: 'JetBrains Mono', monospace;
}

.med-counseling-box {
	font-size: 13px;
	color: #cbd5e1;
	background: rgba(56, 189, 248, 0.08);
	border: 1px solid rgba(56, 189, 248, 0.2);
	padding: 10px 14px;
	border-radius: var(--radius-sm);
	display: flex;
	align-items: center;
	gap: 8px;
}

.empty-records-state {
	background: var(--card-bg);
	border: 1px dashed var(--border-color);
	border-radius: var(--radius-lg);
	padding: 48px 24px;
	text-align: center;
	color: var(--text-muted);
}

.empty-records-state svg {
	color: var(--text-muted);
	margin-bottom: 16px;
	opacity: 0.5;
}

.empty-records-state h4 {
	font-size: 16px;
	color: var(--text-secondary);
	margin-bottom: 6px;
}

.empty-records-state p {
	font-size: 13px;
	max-width: 400px;
	margin: 0 auto;
}

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   MOBILE & RESPONSIVE ADAPTATIONS
   ========================================================== */

/* Tablet & Smaller Laptops (<= 1024px) */
@media (max-width: 1024px) {
	.main-layout {
		grid-template-columns: 1fr;
		max-width: 860px;
		padding: 0 24px;
		gap: 24px;
	}

	.patient-layout {
		padding: 0 20px;
	}
}

/* Tablets & Large Phones (<= 768px) */
@media (max-width: 768px) {
	/* Header & Nav */
	.app-header {
		padding: 12px 18px;
	}

	.brand {
		gap: 10px;
	}

	.brand-badge {
		width: 38px;
		height: 38px;
		font-size: 18px;
		border-radius: var(--radius-sm);
	}

	.brand-text h1 {
		font-size: 18px;
	}

	.brand-text p {
		font-size: 11px;
	}

	.header-actions {
		gap: 8px;
	}

	.portal-nav-link {
		padding: 6px 12px;
		font-size: 12px;
		white-space: nowrap;
	}

	.system-status {
		padding: 5px 12px;
		font-size: 11px;
		white-space: nowrap;
	}

	/* Layout Containers */
	.main-layout {
		margin: 16px auto 32px;
		padding: 0 16px;
		gap: 18px;
	}

	.patient-layout {
		margin: 16px auto 36px;
		padding: 0 16px;
		gap: 18px;
	}

	/* Cards & Hero */
	.card {
		padding: 18px 16px;
		border-radius: var(--radius-md);
	}

	.patient-hero-card {
		padding: 22px 18px;
		border-radius: var(--radius-md);
	}

	.portal-title-row {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		margin-bottom: 18px;
	}

	.portal-headline h2 {
		font-size: 20px;
	}

	.portal-headline p {
		font-size: 13px;
		line-height: 1.45;
	}

	.demo-id-chip {
		width: 100%;
		justify-content: center;
		padding: 11px 12px;
		font-size: 12px;
		white-space: normal;
		text-align: center;
	}

	/* Search Bar & Action Buttons */
	.search-bar-row {
		display: flex;
		flex-direction: column;
		gap: 10px;
		align-items: stretch;
	}

	.search-bar-row .form-group {
		width: 100%;
	}

	.search-bar-row .btn {
		width: 100% !important;
		min-height: 48px;
		font-size: 15px;
		justify-content: center;
	}

	#lookup-btn {
		min-width: unset !important;
		width: 100%;
	}

	#print-btn {
		width: 100%;
		justify-content: center;
		min-height: 44px;
	}

	/* Touch Form Controls (Prevents iOS Safari auto-zoom) */
	input[type="text"],
	select {
		font-size: 16px !important;
	}

	textarea {
		font-size: 14px !important;
		min-height: 70px;
	}

	/* Demographics Panel: Clean 2x2 Grid */
	.demographics-panel {
		grid-template-columns: 1fr 1fr;
		padding: 14px 16px;
		gap: 12px 14px;
		margin-top: 18px;
	}

	.demo-label {
		font-size: 10px;
	}

	.demo-value {
		font-size: 13px;
		line-height: 1.35;
	}

	/* Stats Strip: Crisp 3-Column Strip */
	.stats-strip {
		grid-template-columns: repeat(3, 1fr);
		gap: 8px;
	}

	.stat-box {
		padding: 12px 6px;
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 6px;
		border-radius: var(--radius-sm);
	}

	.stat-icon {
		width: 34px;
		height: 34px;
		font-size: 16px;
		border-radius: 6px;
	}

	.stat-content .stat-num {
		font-size: 18px;
	}

	.stat-content .stat-desc {
		font-size: 10px;
		line-height: 1.25;
	}

	/* Records Feed */
	.records-header {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.records-header h3 {
		font-size: 16px;
	}

	.filter-input-wrap {
		width: 100%;
	}

	.filter-input-wrap input {
		width: 100%;
		min-height: 44px;
	}

	/* Modern Medication Card */
	.med-card-modern {
		padding: 16px 14px;
		gap: 12px;
		border-radius: 12px;
	}

	.med-card-top {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.med-title-group {
		gap: 10px;
	}

	.med-pill-icon {
		width: 36px;
		height: 36px;
		font-size: 18px;
		border-radius: 6px;
	}

	.med-title-group h4 {
		font-size: 16px;
	}

	.med-status-tag {
		font-size: 10px;
		padding: 3px 8px;
		align-self: flex-start;
	}

	.med-details-grid {
		grid-template-columns: 1fr 1fr;
		gap: 8px 10px;
		padding: 10px 12px;
	}

	.med-detail-col:nth-child(3) {
		grid-column: span 2;
	}

	.med-detail-col span {
		font-size: 10px;
	}

	.med-detail-col strong {
		font-size: 13px;
	}

	.med-counseling-box {
		font-size: 12px;
		padding: 8px 12px;
		line-height: 1.4;
	}

	/* Pharmacist Controls */
	.controls-row {
		gap: 8px;
		margin-top: 14px;
	}

	.controls-row .btn {
		min-height: 48px;
		font-size: 14px;
	}

	.btn-dispense {
		min-height: 50px;
		font-size: 15px;
	}
}

/* Smartphone Screens (<= 640px) */
@media (max-width: 640px) {
	.app-header {
		padding: 10px 14px;
	}

	.brand-badge {
		width: 36px;
		height: 36px;
		font-size: 16px;
	}

	.brand-text h1 {
		font-size: 17px;
	}

	.brand-text p {
		display: none;
	}

	.status-text {
		display: none;
	}

	.system-status::after {
		content: "Online";
		font-size: 11px;
		font-weight: 700;
	}

	.portal-nav-link {
		padding: 6px 10px;
		font-size: 12px;
	}

	.patient-hero-card {
		padding: 18px 14px;
	}

	.portal-headline h2 {
		font-size: 19px;
	}

	.portal-headline p {
		font-size: 12.5px;
	}

	.stat-box {
		padding: 10px 4px;
	}

	.stat-content .stat-num {
		font-size: 16px;
	}

	.stat-content .stat-desc {
		font-size: 9.5px;
	}
}

/* Small Smartphone Screens (<= 450px) */
@media (max-width: 450px) {
	.app-header {
		padding: 10px 12px;
	}

	.brand-badge {
		width: 32px;
		height: 32px;
		font-size: 15px;
		border-radius: 8px;
	}

	.brand-text h1 {
		font-size: 16px;
	}

	.system-status {
		display: none;
	}

	.portal-nav-link {
		padding: 6px 8px;
		font-size: 11px;
	}

	.main-layout,
	.patient-layout {
		margin: 10px auto 24px;
		padding: 0 10px;
		gap: 12px;
	}

	.card,
	.patient-hero-card {
		padding: 14px 12px;
	}

	.portal-headline h2 {
		font-size: 17px;
	}

	.portal-headline p {
		font-size: 12px;
	}

	.demo-id-chip {
		font-size: 11px;
		padding: 9px 10px;
	}

	.demographics-panel {
		padding: 10px 10px;
		gap: 10px 8px;
	}

	.demo-label {
		font-size: 9px;
	}

	.demo-value {
		font-size: 12px;
	}

	.stat-box {
		padding: 8px 3px;
	}

	.stat-icon {
		width: 28px;
		height: 28px;
		font-size: 14px;
	}

	.stat-content .stat-num {
		font-size: 15px;
	}

	.stat-content .stat-desc {
		font-size: 8.5px;
	}

	.med-card-modern {
		padding: 14px 12px;
	}

	.med-pill-icon {
		width: 32px;
		height: 32px;
		font-size: 15px;
	}

	.med-title-group h4 {
		font-size: 15px;
	}

	.med-details-grid {
		padding: 8px 10px;
		gap: 6px 8px;
	}

	.med-detail-col span {
		font-size: 9px;
	}

	.med-detail-col strong {
		font-size: 12px;
	}

	.empty-records-state {
		padding: 24px 14px;
	}

	.hud-corner {
		width: 18px;
		height: 18px;
	}

	.hud-corner.top-left {
		top: 10px;
		left: 10px;
	}

	.hud-corner.top-right {
		top: 10px;
		right: 10px;
	}

	.hud-corner.bottom-left {
		bottom: 10px;
		left: 10px;
	}

	.hud-corner.bottom-right {
		bottom: 10px;
		right: 10px;
	}
}

/* Extra Narrow Screens (<= 340px) */
@media (max-width: 340px) {
	.demographics-panel {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.med-details-grid {
		grid-template-columns: 1fr;
	}

	.med-detail-col:nth-child(3) {
		grid-column: span 1;
	}
}

/* Print Styles */
@media print {
	body {
		background: #ffffff !important;
		color: #000000 !important;
	}
	.app-header, .search-bar-row, .portal-nav-link, .demo-id-chip, .filter-input-wrap, #print-btn {
		display: none !important;
	}
	.patient-layout {
		margin: 0 !important;
		padding: 0 !important;
		max-width: 100% !important;
	}
	.patient-hero-card, .med-card-modern, .stat-box {
		background: #ffffff !important;
		color: #000000 !important;
		border: 1px solid #ccc !important;
		box-shadow: none !important;
	}
	.med-details-grid {
		background: #f8fafc !important;
		border: 1px solid #ddd !important;
	}
}


/* ==========================================================
   INPUT MODE TABS & DROPZONE STYLES
   ========================================================== */
.input-mode-tabs {
	display: flex;
	background: #090e1a;
	padding: 3px;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-color);
	gap: 4px;
}

.mode-tab {
	background: transparent;
	border: none;
	color: var(--text-secondary);
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 600;
	border-radius: var(--radius-sm);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: all 0.2s ease;
}

.mode-tab:hover {
	color: var(--text-primary);
}

.mode-tab.active {
	background: #1e293b;
	color: var(--accent-emerald);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.stream-view {
	width: 100%;
	height: 100%;
	position: relative;
}

.upload-dropzone {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #060a14;
	border: 2px dashed rgba(56, 189, 248, 0.25);
	border-radius: var(--radius-md);
	cursor: pointer;
	position: relative;
	overflow: hidden;
	transition: all 0.2s ease;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
	border-color: var(--accent-emerald);
	background: rgba(16, 185, 129, 0.05);
	box-shadow: inset 0 0 30px rgba(16, 185, 129, 0.1);
}

.dropzone-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 24px;
	pointer-events: none;
}

.dropzone-icon {
	width: 68px;
	height: 68px;
	background: rgba(56, 189, 248, 0.1);
	border: 1px solid rgba(56, 189, 248, 0.25);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--accent-blue);
	margin-bottom: 16px;
	transition: transform 0.2s ease;
}

.upload-dropzone:hover .dropzone-icon {
	transform: scale(1.06);
	color: var(--accent-emerald);
	border-color: var(--accent-emerald);
	background: rgba(16, 185, 129, 0.12);
}

.dropzone-content h3 {
	font-size: 16px;
	font-weight: 700;
	color: var(--text-primary);
	margin-bottom: 6px;
}

.dropzone-content p {
	font-size: 13px;
	color: var(--text-secondary);
}

.highlight-browse {
	color: var(--accent-blue);
	text-decoration: underline;
	font-weight: 700;
}

.file-hint {
	display: block;
	margin-top: 10px;
	font-size: 11px;
	color: var(--text-muted);
}

#upload-preview-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
	background: #030712;
	display: flex;
	align-items: center;
	justify-content: center;
}

#upload-preview-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.preview-overlay {
	position: absolute;
	bottom: 12px;
	right: 12px;
	display: flex;
	gap: 8px;
	background: rgba(11, 17, 32, 0.85);
	backdrop-filter: blur(8px);
	padding: 6px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border-color);
}

.custom-select {
	width: 100%;
	background: #0b1120;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 10px 14px;
	font-size: 13px;
	font-family: 'JetBrains Mono', monospace;
	color: var(--text-primary);
	outline: none;
	cursor: pointer;
}

.custom-select:focus {
	border-color: var(--accent-emerald);
	box-shadow: 0 0 0 2px var(--accent-emerald-glow);
}

.btn-sm {
	padding: 6px 12px;
	font-size: 12px;
}

/* Real-time National ID Demographic Pill */
.id-demographic-badge {
	margin-top: 8px;
	padding: 6px 12px;
	background: rgba(16, 185, 129, 0.1);
	border: 1px solid rgba(16, 185, 129, 0.3);
	border-radius: var(--radius-sm);
	font-size: 12px;
	font-weight: 600;
	color: var(--accent-emerald);
	display: flex;
	align-items: center;
	gap: 6px;
	animation: fadeIn 0.2s ease;
}

/* ==========================================================
   INTERACTIVE MEDICATION REVIEW CARDS
   ========================================================== */
.medications-review-section {
	margin-top: 14px;
	margin-bottom: 8px;
}

.review-section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
	gap: 12px;
	flex-wrap: wrap;
}

.review-header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	margin-left: auto;
}

.btn-inventory-quick {
	background: rgba(16, 185, 129, 0.15) !important;
	border: 1px solid rgba(16, 185, 129, 0.35) !important;
	color: #6ee7b7 !important;
	font-weight: 700 !important;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-inventory-quick:hover {
	background: rgba(16, 185, 129, 0.28) !important;
	border-color: #34d399 !important;
	color: #fff !important;
}

.sublabel {
	font-size: 11px;
	color: var(--text-muted);
	display: block;
}

.medications-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 340px;
	overflow-y: auto;
	padding-right: 4px;
}

.medications-container::-webkit-scrollbar {
	width: 6px;
}

.medications-container::-webkit-scrollbar-track {
	background: #090e1a;
	border-radius: 4px;
}

.medications-container::-webkit-scrollbar-thumb {
	background: #1e293b;
	border-radius: 4px;
}

.med-empty-state {
	border: 1px dashed var(--border-color);
	background: rgba(11, 17, 32, 0.4);
	border-radius: var(--radius-md);
	padding: 24px 16px;
	text-align: center;
	color: var(--text-muted);
}

.empty-icon {
	font-size: 26px;
	margin-bottom: 6px;
}

.med-empty-state h4 {
	font-size: 13px;
	font-weight: 700;
	color: var(--text-secondary);
	margin-bottom: 4px;
}

.med-empty-state p {
	font-size: 11px;
	line-height: 1.4;
}

.med-review-card {
	background: #0b1120;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	transition: all 0.2s ease;
	animation: fadeIn 0.25s ease;
}

.med-review-card:hover {
	border-color: rgba(56, 189, 248, 0.35);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.med-review-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	gap: 10px;
	flex-wrap: wrap;
}

.med-review-title {
	display: flex;
	align-items: center;
	gap: 8px;
}

.item-number-chip {
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	font-weight: 800;
	color: var(--accent-blue);
	background: rgba(56, 189, 248, 0.12);
	border: 1px solid rgba(56, 189, 248, 0.25);
	padding: 1px 7px;
	border-radius: 4px;
}

.confidence-tag {
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 9999px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.confidence-tag.high {
	background: rgba(16, 185, 129, 0.12);
	color: #34d399;
	border: 1px solid rgba(16, 185, 129, 0.3);
}

.confidence-tag.mid {
	background: rgba(245, 158, 11, 0.12);
	color: #fbbf24;
	border: 1px solid rgba(245, 158, 11, 0.3);
}

.confidence-tag.cloud {
	background: rgba(56, 189, 248, 0.12);
	color: #7dd3fc;
	border: 1px solid rgba(56, 189, 248, 0.3);
}

.confidence-tag.manual {
	background: rgba(168, 85, 247, 0.12);
	color: #c084fc;
	border: 1px solid rgba(168, 85, 247, 0.3);
}

.med-review-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	flex-wrap: wrap;
	flex-shrink: 0;
}

.stock-pill {
	font-size: 11px;
	font-weight: 700;
	padding: 2px 9px;
	border-radius: 9999px;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
	user-select: none;
	transition: all 0.15s ease;
}

.stock-pill:hover {
	filter: brightness(1.15);
}

.stock-pill.stock-in {
	background: rgba(16, 185, 129, 0.18);
	color: #34d399;
	border: 1px solid rgba(16, 185, 129, 0.45);
}

.stock-pill.stock-low {
	background: rgba(245, 158, 11, 0.18);
	color: #fcd34d;
	border: 1px solid rgba(245, 158, 11, 0.45);
}

.stock-pill.stock-out {
	background: rgba(239, 68, 68, 0.18);
	color: #fca5a5;
	border: 1px solid rgba(239, 68, 68, 0.45);
}

.stock-pill.stock-checking {
	background: rgba(100, 116, 139, 0.18);
	color: #cbd5e1;
	border: 1px solid rgba(100, 116, 139, 0.45);
}

.btn-toggle-stock {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: rgba(16, 185, 129, 0.12);
	border: 1px solid rgba(16, 185, 129, 0.35);
	color: #34d399;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.15s ease;
}

.btn-toggle-stock:hover {
	background: rgba(16, 185, 129, 0.25);
	border-color: #34d399;
	color: #fff;
}

.btn-toggle-stock.btn-add-stock-highlight {
	background: rgba(56, 189, 248, 0.18) !important;
	border: 1px solid rgba(56, 189, 248, 0.5) !important;
	color: #38bdf8 !important;
	box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.btn-toggle-stock.btn-add-stock-highlight:hover {
	background: rgba(56, 189, 248, 0.3) !important;
	border-color: #7dd3fc !important;
	color: #ffffff !important;
}

.btn-quick-restock {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: rgba(16, 185, 129, 0.2);
	border: 1px solid rgba(16, 185, 129, 0.45);
	color: #34d399;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-quick-restock:hover {
	background: rgba(16, 185, 129, 0.35);
	border-color: #6ee7b7;
	color: #fff;
	transform: scale(1.02);
}

.btn-remove-med {
	background: transparent;
	border: none;
	color: var(--text-muted);
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.btn-remove-med:hover {
	color: var(--danger-red);
	background: rgba(239, 68, 68, 0.12);
}

.med-review-inputs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.med-input-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.compact-label {
	font-size: 10px;
	font-weight: 700;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.med-name-input,
.med-dosage-input {
	background: #060a14 !important;
	border: 1px solid var(--border-color) !important;
	border-radius: var(--radius-sm) !important;
	padding: 8px 10px !important;
	font-size: 13px !important;
	font-family: 'JetBrains Mono', monospace !important;
	color: var(--text-primary) !important;
	outline: none !important;
	transition: all 0.15s ease !important;
	width: 100% !important;
}

.med-name-input:focus,
.med-dosage-input:focus {
	border-color: var(--accent-blue) !important;
	box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
}


/* ==========================================================
   SHELF STOCK MANAGEMENT & MODAL STYLES
   ========================================================== */
.inventory-btn {
	background: rgba(16, 185, 129, 0.12) !important;
	border: 1px solid rgba(16, 185, 129, 0.3) !important;
	color: var(--accent-emerald) !important;
	cursor: pointer;
}

.inventory-btn:hover {
	background: rgba(16, 185, 129, 0.22) !important;
	border-color: var(--accent-emerald) !important;
}

.stock-badge-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
}

.stock-inline-editor {
	display: flex;
	align-items: center;
	gap: 5px;
	background: #060a14;
	border: 1px solid rgba(56, 189, 248, 0.4);
	border-radius: var(--radius-sm);
	padding: 2px 6px;
	box-shadow: 0 0 8px rgba(56, 189, 248, 0.15);
	animation: fadeIn 0.15s ease;
}

.stock-inline-label {
	font-size: 10px;
	color: #38bdf8;
	font-weight: 700;
	text-transform: uppercase;
}

.stock-num-input {
	width: 54px !important;
	padding: 2px 4px !important;
	font-size: 12px !important;
	font-family: 'JetBrains Mono', monospace !important;
	background: #090e1a !important;
	border: 1px solid rgba(56, 189, 248, 0.3) !important;
	border-radius: 4px !important;
	color: #ffffff !important;
	text-align: center;
}

.btn-stock-save {
	background: var(--accent-emerald);
	color: #04101c;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	white-space: nowrap;
	transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn-stock-save:hover {
	opacity: 0.92;
	transform: scale(1.02);
}

/* Modal Backdrop */
.modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(4, 7, 15, 0.75);
	backdrop-filter: blur(8px);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: fadeIn 0.2s ease;
}

.modal-card {
	background: #0f172a;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	width: 100%;
	max-width: 600px;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
	padding: 24px;
	gap: 16px;
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border-color);
}

.modal-title {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text-primary);
}

.modal-title h3 {
	font-size: 17px;
	font-weight: 700;
}

.modal-close-btn {
	background: transparent;
	border: none;
	color: var(--text-muted);
	font-size: 18px;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
	transition: all 0.15s ease;
}

.modal-close-btn:hover {
	color: var(--danger-red);
	background: rgba(239, 68, 68, 0.12);
}

.inv-add-strip {
	display: flex;
	gap: 8px;
	align-items: center;
}

.inv-add-strip input {
	padding: 8px 12px !important;
	font-size: 13px !important;
}

.inv-search-wrap input {
	padding: 8px 12px !important;
	font-size: 13px !important;
	width: 100%;
}

.inv-items-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 380px;
	overflow-y: auto;
	padding-right: 4px;
}

.inv-items-list::-webkit-scrollbar {
	width: 6px;
}

.inv-items-list::-webkit-scrollbar-thumb {
	background: #1e293b;
	border-radius: 4px;
}

.inv-item-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #090e1a;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-sm);
	padding: 10px 14px;
	transition: border-color 0.15s ease;
}

.inv-item-row:hover {
	border-color: rgba(56, 189, 248, 0.3);
}

.inv-item-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.inv-item-name {
	font-size: 14px;
	font-weight: 700;
	color: var(--text-primary);
}

.inv-item-threshold {
	font-size: 11px;
	color: var(--text-muted);
}

.inv-item-qty-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
}

.inv-qty-btn {
	background: #1e293b;
	border: 1px solid var(--border-color);
	color: var(--text-primary);
	width: 28px;
	height: 28px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-weight: 700;
	transition: all 0.15s ease;
}

.inv-qty-btn:hover {
	background: #2b3952;
	border-color: var(--accent-blue);
}

.inv-qty-val {
	font-family: 'JetBrains Mono', monospace;
	font-size: 14px;
	font-weight: 800;
	min-width: 32px;
	text-align: center;
	color: var(--accent-emerald);
}


/* ==========================================================
   ACTIVE MEDICATION SUMMARY BOX & PHARMACY SELECTOR
   ========================================================== */
.pharmacy-select-group {
	margin-bottom: 14px;
}

.patient-id-summary-grid {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 14px;
	margin-bottom: 18px;
	align-items: start;
}

@media (max-width: 768px) {
	.patient-id-summary-grid {
		grid-template-columns: 1fr;
	}
}

.patient-id-col {
	display: flex;
	flex-direction: column;
}

.active-meds-box {
	background: #080d19;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	min-height: 82px;
	box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.4);
}

.active-meds-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	padding-bottom: 6px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.active-meds-title {
	font-size: 11px;
	font-weight: 700;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.active-meds-count {
	font-size: 11px;
	font-weight: 700;
	color: var(--accent-blue);
	background: rgba(56, 189, 248, 0.12);
	border: 1px solid rgba(56, 189, 248, 0.25);
	padding: 1px 7px;
	border-radius: 9999px;
}

.active-meds-chips-container {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	max-height: 90px;
	overflow-y: auto;
}

.active-med-chip {
	background: rgba(16, 185, 129, 0.12);
	border: 1px solid rgba(16, 185, 129, 0.25);
	color: #6ee7b7;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 6px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	animation: fadeIn 0.2s ease;
	white-space: nowrap;
}

.active-meds-empty {
	font-size: 11px;
	color: var(--text-muted);
	font-style: italic;
	line-height: 1.4;
	display: block;
}


/* ==========================================================
   EGYPTIAN BIO-EQUIVALENT & GENERIC SUBSTITUTION STYLES
   ========================================================== */
.bio-eq-box {
	background: rgba(245, 158, 11, 0.08);
	border: 1px solid rgba(245, 158, 11, 0.25);
	border-radius: var(--radius-sm);
	padding: 10px 12px;
	margin-top: 4px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	animation: fadeIn 0.2s ease;
}

.bio-eq-header {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	color: #fcd34d;
	flex-wrap: wrap;
}

.bio-eq-header b {
	color: #fef08a;
}

.bio-eq-generic-name {
	color: var(--text-muted);
	font-size: 11px;
}

.bio-eq-chips-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.bio-sub-btn {
	background: #172033;
	border: 1px solid rgba(56, 189, 248, 0.4);
	color: var(--text-primary);
	border-radius: var(--radius-sm);
	padding: 5px 10px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: all 0.15s ease;
}

.bio-sub-btn:hover {
	background: rgba(56, 189, 248, 0.2);
	border-color: #38bdf8;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(56, 189, 248, 0.25);
}

.bio-sub-btn .sub-badge {
	background: rgba(16, 185, 129, 0.2);
	color: #6ee7b7;
	font-size: 10px;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 9999px;
}

.bio-eq-empty {
	font-size: 11px;
	color: var(--text-muted);
	font-style: italic;
}


/* Quick Demo Presets Toolbar */
.demo-scenarios-strip {
	max-width: 1400px;
	margin: 12px auto 0;
	padding: 8px 16px;
	background: rgba(15, 23, 42, 0.7);
	border: 1px solid rgba(56, 189, 248, 0.2);
	border-radius: var(--radius-md);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.demo-strip-header {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--text-primary);
}

.demo-live-dot {
	width: 8px;
	height: 8px;
	background: #38bdf8;
	border-radius: 50%;
	box-shadow: 0 0 8px #38bdf8;
	animation: pulse 1.8s infinite;
}

.demo-btn-group {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.demo-pill-btn {
	background: #131d31;
	color: #e2e8f0;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 20px;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: all 0.2s ease;
	font-family: inherit;
}

.demo-pill-btn:hover {
	background: rgba(56, 189, 248, 0.15);
	border-color: #38bdf8;
	color: #fff;
	transform: translateY(-1px);
}

.demo-pill-btn.demo-danger:hover {
	background: rgba(239, 68, 68, 0.18);
	border-color: #ef4444;
	color: #fca5a5;
}

.demo-pill-btn.demo-warning:hover {
	background: rgba(245, 158, 11, 0.18);
	border-color: #f59e0b;
	color: #fde68a;
}


/* Real-Time Pre-Dispense Clinical Guardrails & Dispense Button States */
.clinical-guardrails-box {
	margin-top: 14px;
	margin-bottom: 6px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	animation: fadeIn 0.2s ease-in-out;
}

.btn-dispense {
	width: 100% !important;
	background: linear-gradient(135deg, #059669, #10b981) !important;
	color: #04101c !important;
	font-size: 15px !important;
	font-weight: 800 !important;
	padding: 13px 20px !important;
	border-radius: var(--radius-md) !important;
	border: none !important;
	cursor: pointer !important;
	box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25) !important;
	margin-top: 10px !important;
	transition: all 0.2s ease !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
}

.btn-dispense:hover:not(:disabled) {
	transform: translateY(-1px) !important;
	box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
}

.btn-dispense:disabled {
	opacity: 0.75 !important;
	cursor: not-allowed !important;
	transform: none !important;
}

.btn-dispense.btn-blocked {
	background: linear-gradient(135deg, #7f1d1d, #ef4444) !important;
	color: #ffffff !important;
	box-shadow: 0 4px 18px rgba(239, 68, 68, 0.45) !important;
	border: 1px solid #f87171 !important;
	cursor: not-allowed !important;
	opacity: 1 !important;
	transform: none !important;
}

.btn-dispense.btn-blocked:hover {
	transform: none !important;
	box-shadow: 0 4px 18px rgba(239, 68, 68, 0.45) !important;
}


/* Medscape-Style Flush Egyptian Brand Autocomplete Dropdown */
.eplus-autocomplete-portal {
	position: fixed;
	z-index: 99999;
	background: #0f172a;
	border: 1px solid rgba(56, 189, 248, 0.5);
	border-top: none;
	border-radius: 0 0 8px 8px;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
	max-height: 240px;
	overflow-y: auto;
	display: none;
	flex-direction: column;
	padding: 0;
}

.eplus-autocomplete-portal::-webkit-scrollbar {
	width: 6px;
}

.eplus-autocomplete-portal::-webkit-scrollbar-thumb {
	background: #334155;
	border-radius: 4px;
}

.eplus-ac-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 9px 14px;
	cursor: pointer;
	transition: background 0.1s ease;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.eplus-ac-item:last-child {
	border-bottom: none;
}

.eplus-ac-item:hover,
.eplus-ac-item.active {
	background: rgba(56, 189, 248, 0.14);
}

.eplus-ac-name {
	font-size: 13.5px;
	font-weight: 500;
	color: #f1f5f9;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.eplus-ac-name mark {
	background: transparent;
	color: #38bdf8;
	font-weight: 700;
}

.eplus-ac-sub {
	font-size: 11px;
	color: #64748b;
	flex-shrink: 0;
}

.eplus-ac-ar {
	font-size: 11px;
	color: #94a3b8;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Cairo", sans-serif;
	direction: rtl;
	margin-left: 6px;
	opacity: 0.85;
}

.eplus-ac-price {
	font-size: 11px;
	font-weight: 700;
	color: #34d399;
	background: rgba(16, 185, 129, 0.12);
	border: 1px solid rgba(16, 185, 129, 0.25);
	padding: 2px 7px;
	border-radius: 4px;
	white-space: nowrap;
	letter-spacing: 0.2px;
}

.eda-status-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: rgba(16, 185, 129, 0.08);
	border: 1px solid rgba(16, 185, 129, 0.25);
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 12px;
	color: #a7f3d0;
	transition: all 0.2s ease;
}

.eda-status-pill:hover {
	background: rgba(16, 185, 129, 0.16);
	border-color: rgba(16, 185, 129, 0.45);
}

.eda-status-dot {
	width: 7px;
	height: 7px;
	background-color: #10b981;
	border-radius: 50%;
	box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
	animation: edaPulse 2.5s infinite;
}

@keyframes edaPulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.4; transform: scale(0.85); }
}

.eda-status-text b {
	color: #34d399;
	font-weight: 700;
}

/* ========================================== */
/* BARCODE SCANNER & QUICK-ADD STYLES */
/* ========================================== */
.barcode-scan-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	background: rgba(15, 23, 42, 0.7);
	border: 1px solid rgba(56, 189, 248, 0.25);
	padding: 8px 12px;
	border-radius: 10px;
	transition: all 0.2s ease;
}

.barcode-scan-bar:focus-within {
	border-color: #38bdf8;
	box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
	background: rgba(15, 23, 42, 0.9);
}

.barcode-input-container {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	min-width: 0;
}

.barcode-input-container svg {
	color: #38bdf8;
	flex-shrink: 0;
}

.barcode-input-container input {
	background: transparent;
	border: none;
	outline: none;
	color: #f1f5f9;
	font-size: 13px;
	width: 100%;
	font-family: 'JetBrains Mono', monospace;
	letter-spacing: 0.5px;
}

.barcode-input-container input::placeholder {
	color: #64748b;
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 12px;
}

.barcode-btn-submit {
	background: #0284c7;
	color: #fff;
	border: none;
	padding: 5px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease;
}

.barcode-btn-submit:hover {
	background: #0369a1;
}

.barcode-cam-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(56, 189, 248, 0.1);
	border: 1px solid rgba(56, 189, 248, 0.3);
	color: #38bdf8;
	padding: 5px 10px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.15s ease;
}

.barcode-cam-btn:hover,
.barcode-cam-btn.active {
	background: #38bdf8;
	color: #0f172a;
}

.barcode-quick-pills {
	display: flex;
	align-items: center;
	gap: 6px;
	overflow-x: auto;
	padding-bottom: 6px;
	margin-bottom: 12px;
}

.quick-pill-label {
	font-size: 11px;
	color: #94a3b8;
	font-weight: 600;
	white-space: nowrap;
}

.quick-barcode-pill {
	background: rgba(30, 41, 59, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #cbd5e1;
	padding: 3px 9px;
	border-radius: 12px;
	font-size: 11px;
	font-family: 'JetBrains Mono', monospace;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.15s ease;
}

.quick-barcode-pill:hover {
	background: rgba(56, 189, 248, 0.15);
	border-color: #38bdf8;
	color: #38bdf8;
}

.barcode-toast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	background: #0f172a;
	border: 1px solid #10b981;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 18px rgba(16, 185, 129, 0.35);
	color: #f1f5f9;
	padding: 12px 18px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	gap: 12px;
	z-index: 999999;
	animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.barcode-toast.toast-error {
	border-color: #ef4444;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 18px rgba(239, 68, 68, 0.35);
}

@keyframes toastSlideIn {
	from { transform: translateY(20px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.barcode-hud-banner {
	position: absolute;
	top: 14px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(15, 23, 42, 0.85);
	border: 1px solid #10b981;
	color: #a7f3d0;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 7px;
	z-index: 15;
	backdrop-filter: blur(4px);
}

/* ==========================================
   ROSHETA AI — UNIFIED APPLICATION HUB (INDEX)
   ========================================== */
.hub-layout {
	max-width: 1360px;
	margin: 24px auto 48px;
	padding: 0 24px;
	display: flex;
	flex-direction: column;
	gap: 32px;
	width: 100%;
}

.hub-hero {
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(7, 13, 24, 0.95) 100%);
	border: 1px solid rgba(56, 189, 248, 0.25);
	border-radius: var(--radius-lg);
	padding: 44px 40px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 30px rgba(56, 189, 248, 0.08);
	position: relative;
	overflow: hidden;
	text-align: center;
}

.hub-hero::before {
	content: '';
	position: absolute;
	top: -120px;
	left: 50%;
	transform: translateX(-50%);
	width: 500px;
	height: 250px;
	background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
	pointer-events: none;
}

.hub-badge-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(56, 189, 248, 0.1);
	border: 1px solid rgba(56, 189, 248, 0.3);
	padding: 6px 16px;
	border-radius: 9999px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--accent-blue);
	margin-bottom: 18px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.hub-hero h1 {
	font-size: 38px;
	font-weight: 800;
	letter-spacing: -0.8px;
	color: #fff;
	margin-bottom: 14px;
	line-height: 1.25;
}

.hub-hero h1 span {
	background: linear-gradient(135deg, var(--accent-blue), var(--accent-emerald));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.hub-hero p {
	font-size: 16px;
	color: var(--text-secondary);
	max-width: 820px;
	margin: 0 auto 28px;
	line-height: 1.6;
}

.hub-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	max-width: 1060px;
	margin: 0 auto;
}

.hub-stat-card {
	background: rgba(15, 23, 42, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	padding: 16px;
	text-align: center;
	transition: all 0.2s ease;
}

.hub-stat-card:hover {
	border-color: rgba(56, 189, 248, 0.35);
	transform: translateY(-2px);
}

.hub-stat-num {
	font-size: 24px;
	font-weight: 800;
	color: #fff;
	font-family: 'JetBrains Mono', monospace;
	display: block;
	margin-bottom: 4px;
}

.hub-stat-num.accent-blue { color: var(--accent-blue); }
.hub-stat-num.accent-emerald { color: var(--accent-emerald); }
.hub-stat-num.accent-amber { color: var(--accent-amber); }

.hub-stat-label {
	font-size: 11.5px;
	color: var(--text-muted);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

/* Portals 3-Column Grid */
.hub-portals-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.hub-card {
	background: var(--card-bg);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	padding: 32px 28px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
	position: relative;
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	overflow: hidden;
}

.hub-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: rgba(255, 255, 255, 0.1);
	transition: background 0.3s ease;
}

.hub-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.hub-card.card-pharmacist {
	border-color: rgba(56, 189, 248, 0.3);
}
.hub-card.card-pharmacist::before {
	background: linear-gradient(90deg, #0284c7, #38bdf8);
}
.hub-card.card-pharmacist:hover {
	border-color: var(--accent-blue);
	box-shadow: 0 20px 45px -10px rgba(56, 189, 248, 0.25);
}

.hub-card.card-patient {
	border-color: rgba(16, 185, 129, 0.3);
}
.hub-card.card-patient::before {
	background: linear-gradient(90deg, #059669, #10b981);
}
.hub-card.card-patient:hover {
	border-color: var(--accent-emerald);
	box-shadow: 0 20px 45px -10px rgba(16, 185, 129, 0.25);
}

.hub-card.card-pitch {
	border-color: rgba(245, 158, 11, 0.3);
}
.hub-card.card-pitch::before {
	background: linear-gradient(90deg, #d97706, #f59e0b);
}
.hub-card.card-pitch:hover {
	border-color: var(--accent-amber);
	box-shadow: 0 20px 45px -10px rgba(245, 158, 11, 0.25);
}

.hub-card-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 20px;
}

.hub-card-icon {
	width: 50px;
	height: 50px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	flex-shrink: 0;
}

.icon-blue {
	background: rgba(56, 189, 248, 0.12);
	color: var(--accent-blue);
	border: 1px solid rgba(56, 189, 248, 0.25);
}

.icon-emerald {
	background: rgba(16, 185, 129, 0.12);
	color: var(--accent-emerald);
	border: 1px solid rgba(16, 185, 129, 0.25);
}

.icon-amber {
	background: rgba(245, 158, 11, 0.12);
	color: var(--accent-amber);
	border: 1px solid rgba(245, 158, 11, 0.25);
}

.hub-card-title h3 {
	font-size: 20px;
	font-weight: 800;
	color: #fff;
	margin-bottom: 3px;
}

.hub-card-tag {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.tag-blue { color: var(--accent-blue); }
.tag-emerald { color: var(--accent-emerald); }
.tag-amber { color: var(--accent-amber); }

.hub-card-desc {
	font-size: 14px;
	color: var(--text-secondary);
	line-height: 1.55;
	margin-bottom: 24px;
}

.hub-feature-list {
	list-style: none;
	padding: 0;
	margin: 0 0 28px 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.hub-feature-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	color: #cbd5e1;
	line-height: 1.45;
}

.hub-feature-item svg {
	flex-shrink: 0;
	margin-top: 2px;
}

.hub-btn-launch {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 20px;
	border-radius: var(--radius-sm);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: all 0.2s ease;
	cursor: pointer;
	border: none;
	width: 100%;
}

.btn-launch-blue {
	background: linear-gradient(135deg, #0284c7, #38bdf8);
	color: #04101c;
	box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}
.btn-launch-blue:hover {
	box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
	transform: translateY(-1px);
}

.btn-launch-emerald {
	background: linear-gradient(135deg, #059669, #10b981);
	color: #04101c;
	box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.btn-launch-emerald:hover {
	box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
	transform: translateY(-1px);
}

.btn-launch-amber {
	background: linear-gradient(135deg, #d97706, #f59e0b);
	color: #04101c;
	box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.btn-launch-amber:hover {
	box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
	transform: translateY(-1px);
}

/* Personas Quick-Start Section */
.hub-personas-card {
	background: var(--card-bg);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	padding: 28px 32px;
	box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.hub-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 12px;
}

.hub-section-head h3 {
	font-size: 19px;
	font-weight: 800;
	color: #fff;
	display: flex;
	align-items: center;
	gap: 10px;
}

.hub-section-head p {
	font-size: 13px;
	color: var(--text-secondary);
}

.personas-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}

.persona-box {
	background: rgba(15, 23, 42, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 16px;
	transition: all 0.2s ease;
}

.persona-box:hover {
	border-color: rgba(56, 189, 248, 0.3);
	background: rgba(15, 23, 42, 0.95);
}

.persona-top {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.persona-avatar {
	width: 42px;
	height: 42px;
	border-radius: 10px;
	background: rgba(56, 189, 248, 0.15);
	border: 1px solid rgba(56, 189, 248, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	flex-shrink: 0;
}

.persona-meta h4 {
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	margin-bottom: 2px;
}

.persona-id-chip {
	font-family: 'JetBrains Mono', monospace;
	font-size: 12px;
	color: var(--accent-blue);
	font-weight: 600;
}

.persona-detail {
	font-size: 12.5px;
	color: var(--text-secondary);
	line-height: 1.45;
}

.persona-actions {
	display: flex;
	gap: 8px;
}

.persona-btn {
	flex: 1;
	padding: 8px 10px;
	border-radius: 6px;
	font-size: 11.5px;
	font-weight: 700;
	text-decoration: none;
	text-align: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	transition: all 0.15s ease;
}

.persona-btn-pharmacist {
	background: rgba(56, 189, 248, 0.12);
	border: 1px solid rgba(56, 189, 248, 0.3);
	color: var(--accent-blue);
}
.persona-btn-pharmacist:hover {
	background: rgba(56, 189, 248, 0.25);
}

.persona-btn-patient {
	background: rgba(16, 185, 129, 0.12);
	border: 1px solid rgba(16, 185, 129, 0.3);
	color: var(--accent-emerald);
}
.persona-btn-patient:hover {
	background: rgba(16, 185, 129, 0.25);
}

/* Architecture Strip */
.hub-arch-card {
	background: rgba(15, 23, 42, 0.6);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	padding: 24px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.arch-step {
	display: flex;
	align-items: center;
	gap: 12px;
}

.arch-step-num {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(56, 189, 248, 0.15);
	border: 1px solid var(--accent-blue);
	color: var(--accent-blue);
	font-size: 12px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'JetBrains Mono', monospace;
}

.arch-step-info h5 {
	font-size: 13.5px;
	font-weight: 700;
	color: #fff;
	margin-bottom: 2px;
}

.arch-step-info span {
	font-size: 11.5px;
	color: var(--text-muted);
}

.arch-arrow {
	color: var(--text-muted);
	font-size: 16px;
}

/* Hub Footer */
.hub-footer {
	text-align: center;
	padding: 24px 0 12px;
	font-size: 13px;
	color: var(--text-muted);
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hub-footer a {
	color: var(--accent-blue);
	text-decoration: none;
}

@media (max-width: 1024px) {
	.hub-stats-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.hub-portals-grid {
		grid-template-columns: 1fr;
	}
	.personas-grid {
		grid-template-columns: 1fr;
	}
	.hub-arch-card {
		flex-direction: column;
		align-items: flex-start;
	}
	.arch-arrow {
		display: none;
	}
}

@media (max-width: 640px) {
	.hub-hero {
		padding: 30px 18px;
	}
	.hub-hero h1 {
		font-size: 26px;
	}
	.hub-hero p {
		font-size: 14px;
	}
	.hub-stats-grid {
		grid-template-columns: 1fr;
	}
}

/* ========================================================
   ePLUS PHARMACY POS & ACCOUNTING STYLES
   ======================================================== */

/* Shift Status Pill in Header */
.shift-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.shift-status-pill:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.shift-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulse-dot 2s infinite ease-in-out;
}

/* POS Card Controls in Med Review Card */
.med-pos-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-top: 10px;
    gap: 12px;
    flex-wrap: wrap;
}

.med-unit-toggle {
    display: inline-flex;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 6px;
    padding: 2px;
    border: 1px solid var(--border-color);
}

.unit-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.unit-btn.active {
    background: #0284c7;
    color: #fff;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4);
}

.med-qty-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.qty-step-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.15s ease;
}

.qty-step-btn:hover {
    background: #334155;
    border-color: #64748b;
}

.med-qty-val {
    width: 38px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: #f8fafc;
    padding: 2px 0;
}

.med-price-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
}

.med-price-input {
    width: 75px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: #38bdf8;
    padding: 3px 6px;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    text-align: right;
}

.med-line-total {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #10b981;
    font-size: 0.95rem;
    margin-left: auto;
}

/* POS Billing Summary Box */
.pos-billing-summary {
    background: #0d1527;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 18px 0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.pos-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
    margin-bottom: 12px;
}

.pos-summary-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-items-count {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.pos-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pos-val {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--text-primary);
}

.pos-discount-row {
    background: rgba(15, 23, 42, 0.4);
    padding: 8px 10px;
    border-radius: 6px;
    margin: 6px 0;
}

.pos-discount-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pos-disc-inputs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pos-disc-input {
    width: 60px;
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: #f8fafc;
    padding: 3px 6px;
    font-size: 0.82rem;
    font-family: 'JetBrains Mono', monospace;
    text-align: right;
}

.pos-disc-unit {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.pos-disc-sep {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin: 0 4px;
}

.pos-val-discount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: #f87171;
}

.pos-net-row {
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    margin-top: 8px;
    padding-top: 12px;
}

.pos-net-row span:first-child {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
}

.pos-val-net {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.45rem;
    font-weight: 800;
    color: #10b981;
    text-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

/* Payment Tender Row */
.pos-tender-row {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pos-tender-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.pos-tender-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.pos-tender-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    user-select: none;
}

.pos-tender-pill input {
    display: none;
}

.pos-tender-pill.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #34d399;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

/* Checkout Action Rows */
.pos-checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.pos-aux-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.pos-aux-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.82rem;
    padding: 8px;
}

.held-badge {
    background: #f59e0b;
    color: #0f172a;
    border-radius: 999px;
    padding: 1px 6px;
    font-size: 0.7rem;
    font-weight: 800;
}

/* Keybinds Hints */
kbd {
    display: inline-block;
    padding: 2px 5px;
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #e2e8f0;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    vertical-align: middle;
}

.kbd-hint {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
    color: #94a3b8;
    margin-left: 4px;
}

.kbd-action-hint {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    margin-left: 8px;
}

.kbd-modal-title {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.5);
    color: #38bdf8;
    margin-left: 8px;
}

/* Sticky Bottom ePlus Keybinds Bar */
.eplus-keybinds-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid #1e293b;
    padding: 8px 16px;
    z-index: 999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.keybinds-track {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 2px;
}

.keybinds-track::-webkit-scrollbar {
    height: 4px;
}
.keybinds-track::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

.keybind-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #cbd5e1;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.keybind-pill:hover {
    background: #334155;
    border-color: #64748b;
    transform: translateY(-1px);
}

.keybind-pill kbd {
    background: #0f172a;
    border-color: #475569;
    color: #38bdf8;
}

.keybind-primary {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}
.keybind-primary kbd {
    color: #10b981;
}

.keybind-success {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

/* Modals Enhancements */
.modal-wide {
    max-width: 900px;
}

.modal-receipt-card {
    max-width: 440px;
}

.modal-search-strip {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.modal-search-strip input {
    flex: 1;
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #f8fafc;
    padding: 8px 12px;
    font-size: 0.88rem;
}

.receipts-table-wrap {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.receipts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    text-align: left;
}

.receipts-table th {
    background: #1e293b;
    color: var(--text-secondary);
    padding: 10px 12px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--border-color);
}

.receipts-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.receipts-table tr:hover td {
    background: rgba(56, 189, 248, 0.05);
}

/* Shift Settlement Metrics Grid */
.shift-grid-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.shift-metric-card {
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.metric-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.text-emerald { color: #10b981; }
.text-blue { color: #38bdf8; }
.text-amber { color: #f59e0b; }
.text-danger { color: #ef4444; }

.shift-expected-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 14px;
}

.shift-expected-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 0.95rem;
}

.shift-expected-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.35rem;
    color: #10b981;
}

.shift-calc-formula {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.shift-count-box {
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shift-count-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shift-input {
    flex: 1;
    background: #0f172a;
    border: 1px solid #475569;
    border-radius: 6px;
    padding: 10px 14px;
    color: #f8fafc;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.15rem;
    font-weight: 700;
}

.shift-input-unit {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--text-secondary);
}

.discrepancy-badge {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 4px;
}

.discrepancy-badge.balanced {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.discrepancy-badge.shortage {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.discrepancy-badge.overage {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Debt Repayment Strip */
.debt-repayment-strip {
    background: #1e293b;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.repay-input {
    width: 140px;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    color: #10b981;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

/* Thermal Receipt Paper & Print View */
.thermal-paper-scroll {
    max-height: 440px;
    overflow-y: auto;
    background: #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: center;
}

.thermal-receipt-paper {
    width: 78mm;
    background: #fff;
    color: #000;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    line-height: 1.4;
    padding: 14px 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

.thermal-receipt-header {
    text-align: center;
    border-bottom: 1px dashed #000;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.thermal-pharmacy-name {
    font-size: 14px;
    font-weight: bold;
}

.thermal-receipt-meta {
    font-size: 10px;
    margin-top: 4px;
}

.thermal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 11px;
}

.thermal-table th {
    border-bottom: 1px solid #000;
    text-align: left;
    padding: 2px 0;
}

.thermal-table td {
    padding: 3px 0;
    vertical-align: top;
}

.thermal-summary {
    border-top: 1px dashed #000;
    border-bottom: 1px dashed #000;
    padding: 6px 0;
    margin: 6px 0;
}

.thermal-summary-row {
    display: flex;
    justify-content: space-between;
}

.thermal-net-row {
    font-size: 13px;
    font-weight: bold;
}

.thermal-receipt-footer {
    text-align: center;
    font-size: 10px;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed #000;
}

.receipt-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

/* PRINT ONLY CSS FOR 80mm THERMAL PRINTER */
@media print {
    body * {
        visibility: hidden !important;
    }
    #thermal-printable-receipt, #thermal-printable-receipt * {
        visibility: visible !important;
    }
    #thermal-printable-receipt {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 78mm !important;
        margin: 0 !important;
        padding: 4mm !important;
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
        font-family: 'Courier New', Courier, monospace !important;
    }
    @page {
        size: 80mm auto;
        margin: 0;
    }
}
