/* Shared components for the temple demo. Plum and white only. */
:root {
	--p50: #fbf5fa;
	--p100: #f6e9f4;
	--p200: #edd3ea;
	--p300: #dfb0da;
	--p400: #c97fc1;
	--p500: #b05ba6;
	--p600: #96458b;
	--p700: #7c3772;
	--p800: #66305e;
	--p900: #552b4f;
	--p950: #33142f;
}

html {
	-webkit-text-size-adjust: 100%;
}
body {
	background: var(--p50);
	color: var(--p950);
	font-family: Inter, 'Noto Sans Tamil', system-ui, sans-serif;
}

.card {
	background: #fff;
	border: 1px solid var(--p100);
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(85, 43, 79, 0.05);
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.55rem 1rem;
	border-radius: 10px;
	font-weight: 600;
	font-size: 0.875rem;
	line-height: 1.25rem;
	transition:
		background 0.15s,
		color 0.15s,
		border-color 0.15s;
	white-space: nowrap;
	cursor: pointer;
}
.btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
.btn-primary {
	background: var(--p700);
	color: #fff;
	border: 1px solid var(--p700);
}
.btn-primary:hover:not(:disabled) {
	background: var(--p800);
}
.btn-outline {
	background: #fff;
	color: var(--p800);
	border: 1px solid var(--p300);
}
.btn-outline:hover:not(:disabled) {
	background: var(--p50);
	border-color: var(--p500);
}
.btn-ghost {
	background: transparent;
	color: var(--p700);
	border: 1px solid transparent;
}
.btn-ghost:hover:not(:disabled) {
	background: var(--p100);
}
.btn-sm {
	padding: 0.35rem 0.7rem;
	font-size: 0.8rem;
	border-radius: 8px;
}
.btn-lg {
	padding: 0.85rem 1.25rem;
	font-size: 1rem;
	border-radius: 12px;
}
.btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 10px;
	color: var(--p700);
}
.btn-icon:hover {
	background: var(--p100);
}

.label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--p700);
	margin-bottom: 0.3rem;
}
.input {
	width: 100%;
	border: 1px solid var(--p200);
	border-radius: 10px;
	padding: 0.55rem 0.75rem;
	background: #fff;
	color: var(--p950);
	font-size: 0.875rem;
	line-height: 1.25rem;
	outline: none;
	transition:
		border-color 0.15s,
		box-shadow 0.15s;
}
.input::placeholder {
	color: var(--p300);
}
.input:focus {
	border-color: var(--p500);
	box-shadow: 0 0 0 3px var(--p100);
}
select.input {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%237c3772'%3E%3Cpath d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.6rem center;
	background-size: 1.1rem;
	padding-right: 2rem;
}
.input-lg {
	font-size: 1.5rem;
	font-weight: 700;
	padding: 0.6rem 0.9rem;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.4rem 0.8rem;
	border-radius: 999px;
	border: 1px solid var(--p200);
	background: #fff;
	color: var(--p800);
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s;
}
.chip:hover {
	border-color: var(--p400);
}
.chip[aria-pressed='true'] {
	background: var(--p700);
	border-color: var(--p700);
	color: #fff;
}

.seg {
	display: inline-flex;
	padding: 3px;
	border-radius: 12px;
	background: var(--p100);
	gap: 2px;
}
.seg button {
	padding: 0.4rem 0.85rem;
	border-radius: 9px;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--p700);
}
.seg button[aria-pressed='true'] {
	background: #fff;
	color: var(--p900);
	box-shadow: 0 1px 2px rgba(85, 43, 79, 0.15);
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	white-space: nowrap;
}
.badge-solid {
	background: var(--p700);
	color: #fff;
}
.badge-soft {
	background: var(--p100);
	color: var(--p800);
}
.badge-line {
	border: 1px solid var(--p400);
	color: var(--p700);
}
.badge-dash {
	border: 1px dashed var(--p400);
	color: var(--p600);
}
.badge-faint {
	background: var(--p50);
	color: var(--p500);
	border: 1px solid var(--p200);
}

.table {
	width: 100%;
	font-size: 0.85rem;
	border-collapse: separate;
	border-spacing: 0;
}
.table th {
	text-align: left;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--p600);
	font-weight: 700;
	padding: 0.65rem 0.85rem;
	background: var(--p50);
	border-bottom: 1px solid var(--p100);
	white-space: nowrap;
}
.table td {
	padding: 0.7rem 0.85rem;
	border-bottom: 1px solid var(--p100);
	vertical-align: middle;
}
.table tbody tr:hover td {
	background: var(--p50);
}
.table tr.is-cancelled td {
	color: var(--p400);
}
.table .num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.num {
	font-variant-numeric: tabular-nums;
}

.form-error {
	margin-top: 1rem;
	padding: 0.65rem 0.85rem;
	border-radius: 10px;
	background: var(--p100);
	color: var(--p900);
	border-left: 4px solid var(--p700);
	font-size: 0.85rem;
	font-weight: 500;
}

.nav-link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 0.85rem;
	border-radius: 10px;
	color: var(--p200);
	font-size: 0.875rem;
	font-weight: 500;
	transition: all 0.15s;
}
.nav-link:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}
.nav-link[aria-current='page'] {
	background: #fff;
	color: var(--p900);
	font-weight: 600;
}

.scroll-thin {
	scrollbar-width: thin;
	scrollbar-color: var(--p300) transparent;
}
.scroll-thin::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}
.scroll-thin::-webkit-scrollbar-thumb {
	background: var(--p300);
	border-radius: 6px;
}

.toast {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 60;
	background: var(--p900);
	color: #fff;
	padding: 0.75rem 1rem;
	border-radius: 12px;
	font-size: 0.875rem;
	box-shadow: 0 8px 24px rgba(51, 20, 47, 0.25);
	max-width: calc(100vw - 2rem);
	animation: toast-in 0.2s ease-out;
}
@keyframes toast-in {
	from {
		transform: translateY(8px);
		opacity: 0;
	}
}

.kpi-label {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
	color: var(--p600);
}

.empty {
	padding: 2.5rem 1rem;
	text-align: center;
	color: var(--p500);
	font-size: 0.875rem;
}

@media print {
	.no-print {
		display: none !important;
	}
	body {
		background: #fff !important;
	}
	#sidebar,
	#topbar {
		display: none !important;
	}
	.print-flat {
		padding-left: 0 !important;
	}
	.card {
		box-shadow: none;
		border-color: var(--p200);
	}
}
