:root {
	--background: #e5e7eb;
	--foreground: #1f2937;
	--card: #ffffff;
	--muted: #4b5563;
	--border: #d1d5db;
	--primary: #ff6f00;
	--primary-hover: #e76400;
	--ring: rgba(255, 111, 0, 0.25);
	--accent: #7cc47a;
	--glass-highlight: rgba(255, 255, 255, 0.5);
	--glass-shadow: rgba(31, 41, 55, 0.12);
}

html,
body {
	height: 100%;
}

body {
	font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	color: var(--foreground);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	background: var(--background);
}

.bg-brand { background: #f3f4f6; }

.bg-app {
	background-color: var(--background);
}

.bg-soft {
	background: url("../images/bg-klinik.png") center center / cover no-repeat fixed;
}

.btn-brand {
	background: var(--primary);
	color: #fff;
	border: 1px solid #d65e00;
	font-weight: 600;
	border-radius: 14px;
	padding: 0.5rem 0.95rem;
	transition: all 0.2s ease;
	box-shadow: 0 6px 14px rgba(31, 41, 55, 0.12);
}

.btn-brand:hover {
	background: var(--primary-hover);
	color: #fff;
	border-color: #c75600;
	transform: translateY(-1px);
}

.page-head {
	margin-bottom: 1.25rem;
}

.page-head h2 {
	font-weight: 700;
	letter-spacing: -0.02em;
}

.text-soft {
	color: var(--muted);
}

.table-modern thead th {
	background-color: rgba(255, 255, 255, 0.45);
	font-size: 0.74rem;
	color: #64748b;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-bottom: 1px solid var(--border);
}

.table-modern tbody td {
	border-color: #f1f5f9;
	vertical-align: middle;
}

.card.login-card {
	position: relative;
	overflow: hidden;
	border-radius: 18px;
	width: min(92vw, 440px);
	max-width: 440px;
	aspect-ratio: 1 / 1;
	background: rgba(255, 255, 255, 0.16);
	border: 1px solid rgba(255, 255, 255, 0.48);
	backdrop-filter: blur(6px) saturate(122%);
	-webkit-backdrop-filter: blur(6px) saturate(122%);
	box-shadow:
		0 10px 26px rgba(15, 23, 42, 0.16),
		inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.card.login-card::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: rgba(255, 255, 255, 0.08);
}

.bg-soft .card.login-card .card-body {
	padding: 1.7rem 1.5rem !important;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.bg-soft .card.login-card .form-label {
	color: rgba(248, 250, 252, 0.9);
	font-weight: 600;
	font-size: 0.95rem;
	margin-bottom: 0.45rem;
}

.bg-soft .card.login-card .form-control {
	background: rgba(248, 250, 252, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.66);
	border-radius: 12px;
	color: #0f172a;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.7),
		0 1px 2px rgba(15, 23, 42, 0.06);
	font-size: 1rem;
}

.bg-soft .card.login-card .form-control:focus {
	background: rgba(255, 255, 255, 0.96);
	border-color: rgba(191, 219, 254, 0.9);
	box-shadow:
		0 0 0 0.16rem rgba(191, 219, 254, 0.26),
		inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.bg-soft .card.login-card .btn-brand {
	border-radius: 12px;
	font-size: 1rem;
	font-weight: 700;
	padding-top: 0.68rem;
	padding-bottom: 0.68rem;
	background: var(--primary);
	border: 1px solid #d65e00;
	box-shadow: 0 6px 14px rgba(31, 41, 55, 0.12);
}

.bg-soft .card.login-card .btn-brand:hover {
	background: var(--primary-hover);
	border-color: #c75600;
}

@media (max-width: 575.98px) {
	.card.login-card {
		width: min(94vw, 430px);
		aspect-ratio: auto;
	}
}

.stat-card {
	border: 1px solid rgba(255, 255, 255, 0.72);
	background: #eef2f7;
	color: #14532d;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.86),
		0 10px 20px rgba(34, 197, 94, 0.1);
}

.timeline {
	list-style: none;
	padding: 0;
	margin: 0;
}

.timeline-item {
	border-left: 2px solid #bbf7d0;
	padding-left: 1rem;
	margin-bottom: 1rem;
}

.app-footer {
	background: rgba(255, 255, 255, 0.5);
	border-top: 1px solid rgba(255, 255, 255, 0.6);
	margin-top: auto;
	backdrop-filter: blur(12px) saturate(145%);
	-webkit-backdrop-filter: blur(12px) saturate(145%);
}

.app-main {
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
}

.app-shell {
	display: flex;
	flex: 1 0 auto;
	min-height: 0;
}

.app-sidebar {
	width: 240px;
	background: rgba(255, 255, 255, 0.52);
	border-right: 1px solid rgba(255, 255, 255, 0.65);
	padding: 1rem 0.75rem;
	position: sticky;
	top: 58px;
	height: calc(100vh - 58px);
	flex-direction: column;
	justify-content: space-between;
	transition: width 0.2s ease;
	overflow: hidden;
	backdrop-filter: blur(13px) saturate(145%);
	-webkit-backdrop-filter: blur(13px) saturate(145%);
}

.sidebar-title {
	font-size: 0.74rem;
	font-weight: 700;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin: 0.25rem 0.5rem 0.6rem;
}

.sidebar-nav {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.sidebar-footer {
	padding-top: 0.75rem;
	border-top: 1px solid var(--border);
}

.sidebar-logout {
	color: #b91c1c;
}

.sidebar-logout:hover {
	background: #fef2f2;
	color: #991b1b;
}

.sidebar-link {
	display: block;
	text-decoration: none;
	color: #334155;
	padding: 0.56rem 0.65rem;
	border-radius: 12px;
	font-size: 0.9rem;
}

.sidebar-link:hover {
	background: rgba(241, 245, 249, 0.62);
	color: #0f172a;
}

.sidebar-link.active {
	background: #e5e7eb;
	color: #0f172a;
	font-weight: 600;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.75),
		0 6px 12px rgba(148, 163, 184, 0.18);
}

.app-main-content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.app-main-content > .container-fluid {
	flex: 1 0 auto;
}

body.sidebar-collapsed .app-sidebar {
	width: 0;
	padding: 0;
	border-right: none;
}

body.sidebar-collapsed .app-sidebar > * {
	opacity: 0;
	pointer-events: none;
}

.footer-logo {
	width: 44px;
	height: 44px;
	object-fit: contain;
	background: #f8fafc;
	border-radius: 50%;
	padding: 4px;
	border: 1px solid var(--border);
}

.footer-title {
	color: #0f172a;
}

.footer-subtitle {
	color: #64748b;
}

.card {
	border-radius: 18px;
	border: 1px solid var(--border);
	background: var(--card);
	box-shadow:
		0 10px 24px var(--glass-shadow),
		inset 0 1px 0 var(--glass-highlight);
	backdrop-filter: blur(12px) saturate(145%);
	-webkit-backdrop-filter: blur(12px) saturate(145%);
}

.navbar .navbar-brand {
	color: #0f172a;
	letter-spacing: 0.01em;
}

.brand-chip {
	background: #e5e7eb;
	border: 1px solid rgba(255, 255, 255, 0.72);
	color: #475569;
	padding: 0.25rem 0.55rem;
	border-radius: 999px;
	font-size: 0.7rem;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.status-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
	border: 1px solid rgba(255, 255, 255, 0.72);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.status-menunggu {
	background: #fed7aa;
	color: #9a3412;
}

.status-diproses {
	background: #bbf7d0;
	color: #166534;
}

.status-selesai {
	background: #bfdbfe;
	color: #155e75;
}

.ios-ui .form-control,
.ios-ui .form-select {
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, 0.72);
	padding: 0.56rem 0.78rem;
	background: #f9fafb;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.ios-ui .form-control:focus,
.ios-ui .form-select:focus {
	border-color: rgba(191, 219, 254, 0.95);
	box-shadow:
		0 0 0 3px var(--ring),
		inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.ios-navbar {
	border-bottom: 1px solid rgba(255, 255, 255, 0.72);
	position: sticky;
	top: 0;
	z-index: 1050;
	backdrop-filter: saturate(165%) blur(14px);
	-webkit-backdrop-filter: saturate(165%) blur(14px);
	box-shadow: 0 8px 20px rgba(148, 163, 184, 0.18);
}

.nav-user-chip {
	max-width: 220px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nav-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.ios-ui .table {
	border-radius: 16px;
	overflow: hidden;
}

.mobile-tabbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1040;
	display: flex;
	flex-wrap: nowrap;
	gap: 0.35rem;
	justify-content: space-between;
	padding: 0.5rem 0.7rem calc(0.55rem + env(safe-area-inset-bottom));
	background: rgba(255, 255, 255, 0.58);
	border-top: 1px solid rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(14px) saturate(150%);
	-webkit-backdrop-filter: blur(14px) saturate(150%);
	overflow: hidden;
}

.mobile-tabbar::-webkit-scrollbar {
	display: none;
}

.mobile-tabbar.admin-tabs {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mobile-tabbar.admin-tabs-full {
	display: flex;
}

.mobile-tabbar.staff-tabs-full {
	display: flex;
}

.tab-item {
	text-decoration: none;
	color: #64748b;
	text-align: center;
	border-radius: 12px;
	padding: 0.42rem 0.2rem;
	transition: background-color 0.15s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.12rem;
	min-height: 48px;
	flex: 1 1 0;
	min-width: 0;
}

.tab-item.is-active {
	color: #0f172a;
	background: #e5e7eb;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.78),
		0 6px 12px rgba(148, 163, 184, 0.2);
}

.tab-icon {
	font-size: 0.95rem;
	line-height: 1;
}

.tab-label {
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.attachment-preview {
	width: 100%;
	height: 110px;
	object-fit: cover;
	border: 1px solid var(--border);
}

.notif-unread {
	background: #f8fafc;
	border-left: 3px solid var(--primary);
}

.list-group-item {
	border-color: rgba(226, 232, 240, 0.9);
}

.stat-bar-track {
	width: 100%;
	height: 8px;
	background: #eef2f7;
	border-radius: 999px;
	overflow: hidden;
}

.stat-bar-fill {
	height: 100%;
	background: var(--primary);
	border-radius: 999px;
}

.chart-box {
	position: relative;
	height: 280px;
}

.chart-box-lg {
	height: 300px;
}

@media (max-width: 767.98px) {
	html,
	body {
		background: #eef2f7;
	}

	body {
		font-size: 14px;
	}

	.ios-navbar {
		border-bottom: 1px solid rgba(203, 213, 225, 0.7);
		box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
	}

	.ios-navbar .nav-mobile-wrap {
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex-wrap: nowrap;
	}

	.ios-navbar .nav-mobile-wrap {
		padding-left: 0.75rem !important;
		padding-right: 0.75rem !important;
	}

	.ios-navbar .nav-mobile-brand,
	.ios-navbar .nav-mobile-actions {
		width: auto;
	}

	.ios-navbar .nav-mobile-actions {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		gap: 0.45rem !important;
	}

	.ios-navbar .navbar-brand {
		font-size: 1.05rem;
		font-weight: 700;
	}

	.ios-navbar .navbar-brand img {
		width: 24px;
		height: 24px;
	}

	.ios-navbar .nav-mobile-actions .btn {
		padding: 0.35rem 0.6rem;
		font-size: 0.86rem;
		border-radius: 10px;
	}

	.nav-user-dropdown {
		flex: 1 1 auto;
		min-width: 0;
	}

	.nav-user-chip {
		width: 100%;
		max-width: 100%;
		font-size: 0.75rem;
		border-radius: 10px;
	}

	.app-main {
		padding-bottom: 7.4rem !important;
	}

	.container-fluid.py-4 {
		padding-top: 0.8rem !important;
		padding-left: 0.7rem !important;
		padding-right: 0.7rem !important;
	}

	.page-head {
		display: flex;
		flex-direction: column;
		align-items: flex-start !important;
		gap: 0.6rem;
		margin-bottom: 0.9rem;
	}

	.page-head .btn,
	.page-head .btn-group,
	.page-head .d-flex {
		width: 100%;
		flex-wrap: wrap;
	}

	.page-head .btn {
		flex: 1 1 auto;
		min-height: 38px;
	}

	.card .card-body {
		padding: 0.9rem;
	}

	.card {
		border-radius: 16px;
		box-shadow:
			0 6px 16px rgba(15, 23, 42, 0.08),
			inset 0 1px 0 rgba(255, 255, 255, 0.65);
	}

	.row {
		--bs-gutter-x: 0.75rem;
		--bs-gutter-y: 0.75rem;
	}

	.ios-ui .form-control,
	.ios-ui .form-select {
		min-height: 40px;
		font-size: 0.95rem;
		border-radius: 12px;
	}

	textarea.form-control {
		min-height: 96px;
	}

	.table-responsive {
		border-radius: 14px;
		border: 1px solid rgba(203, 213, 225, 0.65);
		background: rgba(255, 255, 255, 0.85);
	}

	.table {
		font-size: 0.86rem;
		margin-bottom: 0;
	}

	.table-modern thead th {
		font-size: 0.68rem;
		letter-spacing: 0.05em;
		padding: 0.6rem 0.5rem;
	}

	.table-modern tbody td {
		padding: 0.58rem 0.5rem;
	}

	.list-group-item {
		padding-left: 0.75rem !important;
		padding-right: 0.75rem !important;
	}

	.timeline-item {
		padding-left: 0.75rem;
		margin-bottom: 0.75rem;
	}

	.pagination {
		flex-wrap: wrap;
		gap: 0.25rem;
		justify-content: flex-end;
	}

	.pagination .page-link {
		border-radius: 10px !important;
		padding: 0.34rem 0.58rem;
		font-size: 0.82rem;
	}

	.input-group {
		flex-wrap: wrap;
		gap: 0.45rem;
	}

	.input-group > .form-control,
	.input-group > .btn {
		width: 100%;
		border-radius: 12px !important;
	}

	.btn {
		border-radius: 12px;
		min-height: 38px;
		font-size: 0.9rem;
	}

	.chart-box {
		height: 215px;
	}

	.chart-box-lg {
		height: 235px;
	}

	.app-footer {
		display: none;
	}

	.app-footer .d-flex {
		align-items: flex-start !important;
	}
}

@media (max-width: 575.98px) {
	.container-fluid.py-4 {
		padding-left: 0.62rem !important;
		padding-right: 0.62rem !important;
	}

	.ios-navbar .nav-mobile-actions .btn {
		font-size: 0.78rem;
	}

	.ios-navbar .nav-mobile-actions .btn,
	.ios-navbar .nav-user-chip {
		padding: 0.4rem 0.55rem !important;
		min-height: 34px;
	}

	.ios-navbar .nav-mobile-actions .nav-label,
	.ios-navbar .nav-user-chip .nav-label {
		display: none;
	}

	.ios-navbar .nav-mobile-actions .nav-icon,
	.ios-navbar .nav-user-chip .nav-icon {
		font-size: 0.96rem;
	}

	.ios-navbar .nav-user-chip.dropdown-toggle::after {
		display: none;
	}

	.nav-user-chip {
		padding-left: 0.45rem;
		padding-right: 0.45rem;
	}

	.mobile-tabbar {
		padding-left: 0.45rem;
		padding-right: 0.45rem;
		padding-top: 0.34rem;
		padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
		background: rgba(248, 250, 252, 0.96);
		border-top: 1px solid rgba(203, 213, 225, 0.85);
		box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
		gap: 0.28rem;
	}

	.tab-label {
		font-size: 0.66rem;
	}

	.tab-item {
		padding-top: 0.34rem;
		padding-bottom: 0.34rem;
		min-height: 44px;
		flex-basis: 0;
	}

	.mobile-tabbar.admin-tabs-full .tab-item,
	.mobile-tabbar.staff-tabs-full .tab-item {
		padding-top: 0.3rem;
		padding-bottom: 0.3rem;
	}

	.tab-icon {
		font-size: 0.86rem;
	}

	.status-pill {
		font-size: 0.72rem;
		padding: 0.2rem 0.5rem;
	}

	.btn {
		padding-left: 0.66rem;
		padding-right: 0.66rem;
	}
}
