/* ═══════════════════════════════════════════════════════════════════
   Patient Profile Modal
   ═══════════════════════════════════════════════════════════════════ */

/* ── Sidebar Nav ─────────────────────────────────────────────────── */
#modalPatientProfile .pp-sidebar .nav-link {
	font-size: 0.875rem;
	padding: 0.6rem 0.75rem;
	border-radius: 0.5rem;
	color: #495057;
	transition: all 0.15s ease;
}
#modalPatientProfile .pp-sidebar .nav-link:hover:not([disabled]) {
	background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.08);
	color: var(--bs-primary);
}
#modalPatientProfile .pp-sidebar .nav-link.active {
	background: transparent;
	color: #212529;
	font-weight: 600;
}
#modalPatientProfile .pp-sidebar .nav-link[disabled] {
	opacity: 0.45;
	font-style: italic;
}
#modalPatientProfile .pp-sidebar .nav-link i {
	width: 18px;
	text-align: center;
}

/* ── Stat & Info Cards ───────────────────────────────────────────── */
.pp-stat-card {
	border-radius: 0.75rem;
	border: 1px solid #e9ecef;
	background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}
.pp-info-card {
	border-radius: 0.75rem;
	border: 1px solid #e9ecef;
	overflow: hidden;
}
.pp-info-card .card-header {
	background: #f8f9fa;
	border-bottom: 1px solid #e9ecef;
}
.pp-order-row:hover {
	background-color: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.04);
}
.pp-order-detail > td {
	border-top: none;
}

/* ── Headshot ─────────────────────────────────────────────────────── */
.pp-headshot-container {
	position: relative;
	display: inline-block;
}
.pp-headshot {
	width: 130px;
	height: 130px;
	border-radius: 50%;
	overflow: hidden;
	border: 4px solid #e9ecef;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
	margin: 0 auto;
	font-size: 2.75rem;
	font-weight: 700;
	color: #64748b;
	letter-spacing: 1px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.pp-headshot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.pp-upload-btn {
	position: absolute;
	bottom: 4px;
	right: 4px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--bs-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: 3px solid #fff;
	box-shadow: 0 2px 6px rgba(0,0,0,0.15);
	transition: transform 0.15s ease;
}
.pp-upload-btn:hover {
	transform: scale(1.1);
}


/* ═══════════════════════════════════════════════════════════════════
   Document Library
   ═══════════════════════════════════════════════════════════════════ */

/* ── Empty State ─────────────────────────────────────────────────── */
.pp-docs-empty {
	text-align: center;
	padding: 2.5rem 1.5rem;
}
.pp-docs-empty__circle {
	width: 72px; height: 72px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	margin-bottom: 1rem;
	background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}
.pp-docs-empty__circle i {
	font-size: 1.6rem;
	color: var(--sa-primary-color, #0d6efd);
	opacity: 0.8;
}
.pp-docs-empty__title {
	font-weight: 600; font-size: 0.95rem;
	color: #1e293b; margin-bottom: 0.35rem;
}
.pp-docs-empty__text {
	color: #94a3b8; font-size: 0.82rem;
	max-width: 280px; margin: 0 auto 1.25rem; line-height: 1.5;
}

/* ── Upload Card ─────────────────────────────────────────────────── */
.pp-docs-upload-card {
	border: 1px solid #e2e8f0; border-radius: 0.75rem;
	background: #fff; overflow: hidden; margin-bottom: 1.25rem;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
	animation: ppDocCardIn 0.25s ease;
}
@keyframes ppDocCardIn {
	from { opacity: 0; transform: translateY(-8px); }
	to   { opacity: 1; transform: translateY(0); }
}
.pp-docs-upload-card__head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 0.7rem 1rem;
	border-bottom: 1px solid #f1f5f9; background: #fafbfc;
}
.pp-docs-upload-card__head h6 {
	margin: 0; font-size: 0.85rem; font-weight: 600; color: #334155;
}
.pp-docs-upload-card__body { padding: 1.25rem; }
.pp-docs-upload-card__foot {
	display: flex; justify-content: flex-end; align-items: center; gap: 0.5rem;
	padding: 0.75rem 1rem;
	border-top: 1px solid #f1f5f9; background: #fafbfc;
}

/* ── Dropzone ────────────────────────────────────────────────────── */
.pp-docs-dropzone {
	border: 2px dashed #dee2e6; border-radius: 0.5rem;
	padding: 2rem 1rem; text-align: center;
	cursor: pointer; transition: all 0.2s ease; background: #f8f9fa;
}
.pp-docs-dropzone:hover {
	border-color: var(--sa-primary-color, #0d6efd);
	background: rgba(13,110,253,0.02);
}
.pp-docs-dropzone.dragover {
	border-color: var(--sa-primary-color, #0d6efd);
	background: rgba(13,110,253,0.05);
	border-style: solid;
	transform: scale(1.005);
}
.pp-docs-dropzone__icon {
	width: 52px; height: 52px; border-radius: 50%;
	background: linear-gradient(135deg, #e8f0fe 0%, #d2e3fc 100%);
	display: inline-flex; align-items: center; justify-content: center;
	margin-bottom: 0.75rem; transition: transform 0.25s ease;
}
.pp-docs-dropzone:hover .pp-docs-dropzone__icon { transform: translateY(-3px); }
.pp-docs-dropzone__icon i { font-size: 1.3rem; color: var(--sa-primary-color, #0d6efd); }

/* ── File Preview ────────────────────────────────────────────────── */
.pp-docs-file {
	display: flex; align-items: center; gap: 0.75rem;
	padding: 0.75rem 1rem;
	border: 1px solid #e2e8f0; border-radius: 0.5rem; background: #fff;
}
.pp-docs-file__icon {
	width: 42px; height: 42px; border-radius: 0.5rem; flex-shrink: 0;
	display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
}
.pp-docs-file__name {
	font-weight: 600; font-size: 0.82rem; color: #1e293b; word-break: break-all;
}
.pp-docs-file__size { font-size: 0.72rem; color: #94a3b8; }
.pp-docs-file__remove {
	margin-left: auto; width: 30px; height: 30px; border-radius: 50%;
	border: none; background: #fee2e2; color: #ef4444; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	font-size: 0.72rem; flex-shrink: 0; transition: all 0.15s ease;
}
.pp-docs-file__remove:hover { background: #fca5a5; transform: scale(1.1); }

/* ── Progress Bar ────────────────────────────────────────────────── */
.pp-docs-progress {
	height: 4px; background: #e2e8f0; border-radius: 2px;
	overflow: hidden; margin-top: 0.75rem;
}
.pp-docs-progress__bar {
	height: 100%; width: 0; border-radius: 2px;
	background: linear-gradient(90deg, var(--sa-primary-color, #0d6efd), #6366f1);
	transition: width 0.3s ease;
}


/* ═══════════════════════════════════════════════════════════════════
   Bulk Upload Stepper
   ═══════════════════════════════════════════════════════════════════ */
.sa-bulk-stepper {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.5rem;
	border-bottom: 1px solid var(--default-border, #dee2e6);
	background: var(--custom-white, #fff);
}
.sa-bulk-step {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}
.sa-bulk-step-num {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2px solid #dee2e6;
	color: #adb5bd;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 0.8rem;
	transition: all 0.2s ease;
}
.sa-bulk-step.active .sa-bulk-step-num {
	background: rgb(var(--primary-rgb));
	border-color: rgb(var(--primary-rgb));
	color: #fff;
}
.sa-bulk-step.completed .sa-bulk-step-num {
	background: #198754;
	border-color: #198754;
	color: #fff;
}
.sa-bulk-step-label {
	font-size: 0.8rem;
	color: #adb5bd;
	font-weight: 500;
}
.sa-bulk-step.active .sa-bulk-step-label {
	color: var(--default-text-color, #333);
	font-weight: 600;
}
.sa-bulk-step.completed .sa-bulk-step-label {
	color: #198754;
}
.sa-bulk-step-line {
	width: 40px;
	height: 2px;
	background: #dee2e6;
	margin: 0 0.5rem;
	transition: background 0.2s ease;
}
.sa-bulk-step-line.completed {
	background: #198754;
}

/* ── Bulk Dropzone ───────────────────────────────────────────────── */
.sa-bulk-dropzone {
	border: 2px dashed #dee2e6;
	border-radius: 0.375rem;
	background: #f8f9fa;
	cursor: pointer;
	transition: all 0.2s ease;
}
.sa-bulk-dropzone-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
	text-align: center;
}
.sa-bulk-dropzone:hover {
	border-color: rgb(var(--primary-rgb));
	background: rgba(var(--primary-rgb), 0.05);
}
.sa-bulk-dropzone.dragover {
	border-color: rgb(var(--primary-rgb));
	background: rgba(var(--primary-rgb), 0.08);
	border-style: solid;
}

/* ── Review Table Error Rows ─────────────────────────────────────── */
#bulkPreviewTable .row-error {
	background-color: #fff5f5;
}
#bulkPreviewTable .row-error td {
	color: #842029;
}
.sa-bulk-error-detail td {
	padding: 0.25rem 0.5rem 0.5rem !important;
	background: #fff5f5;
	border-top: none !important;
}
.sa-bulk-error-msgs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}
.sa-bulk-error-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.15rem 0.5rem;
	border-radius: 0.25rem;
	background: #f8d7da;
	color: #842029;
	font-size: 0.75rem;
}
.sa-bulk-error-badge i {
	margin-right: 0.3rem;
	font-size: 0.65rem;
}

/* ── Filter Button Group Active State ────────────────────────────── */
#bulkUploadStep2 .btn-group .btn.active {
	background: rgb(var(--primary-rgb));
	border-color: rgb(var(--primary-rgb));
	color: #fff;
}

/* ── Success Checkmark Animation ─────────────────────────────────── */
.sa-bulk-chk-circle {
	stroke: #198754;
	stroke-width: 2;
	stroke-dasharray: 166;
	stroke-dashoffset: 166;
	animation: saChkCircle 0.6s ease-in-out forwards;
}
.sa-bulk-chk-path {
	stroke: #198754;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 48;
	stroke-dashoffset: 48;
	animation: saChkDraw 0.3s ease-in-out 0.5s forwards;
}
@keyframes saChkCircle { to { stroke-dashoffset: 0; } }
@keyframes saChkDraw { to { stroke-dashoffset: 0; } }


/* ═══════════════════════════════════════════════════════════════════
   Patient Dropdown (order entry)
   ═══════════════════════════════════════════════════════════════════ */
.patient-dropdown-list {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 1050;
	background: #fff;
	border: 1px solid #dee2e6;
	border-top: none;
	border-radius: 0 0 0.375rem 0.375rem;
	max-height: 320px;
	overflow-y: auto;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.patient-dropdown-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.5rem 0.75rem;
	font-size: 0.875rem;
	border-bottom: 1px solid #f1f3f5;
	cursor: default;
}
.patient-dropdown-item:last-child { border-bottom: none; }
.patient-dropdown-item-enabled {
	cursor: pointer;
}
.patient-dropdown-item-enabled:hover {
	background: #f0f6ff;
}
.patient-dropdown-item-disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
.patient-dropdown-name {
	font-weight: 500;
}
