:root {
	--cz-primary: #0d47a1;
	--cz-primary-dark: #08306b;
	--cz-primary-light: #e7f0fd;
	--cz-sidebar-bg: #14213d;
	--cz-sidebar-hover: #1f3057;
	--cz-radius: 0.85rem;
	--cz-radius-sm: 0.6rem;
	--cz-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 8px rgba(16, 24, 40, 0.06);
	--cz-shadow-hover: 0 4px 10px rgba(16, 24, 40, 0.06), 0 10px 24px rgba(16, 24, 40, 0.1);
	--cz-border: 1px solid rgba(16, 24, 40, 0.06);
}

body {
	background-color: #f4f6fb;
	font-feature-settings: "cv02", "cv03", "cv04", "cv11";
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-weight: 600;
	letter-spacing: -0.01em;
}

/* ---- App shell ------------------------------------------------------- */
.app-topbar {
	position: sticky;
	top: 0;
	z-index: 1030;
	background-color: #ffffff;
	border-bottom: var(--cz-border);
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.app-sidebar {
	background-color: var(--cz-sidebar-bg) !important;
	min-height: 100vh;
	width: 250px;
	flex-shrink: 0;
}

.app-sidebar .nav-link {
	color: rgba(255, 255, 255, 0.68);
	border-radius: var(--cz-radius-sm);
	padding: 0.6rem 0.9rem;
	margin: 0.15rem 0.6rem;
	font-size: 0.925rem;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.app-sidebar .nav-link:hover {
	background-color: rgba(255, 255, 255, 0.06);
	color: #ffffff;
}

.app-sidebar .nav-link.active {
	background-color: var(--cz-primary);
	color: #ffffff;
	box-shadow: 0 2px 6px rgba(13, 71, 161, 0.4);
}

.app-sidebar .nav-link i {
	width: 1.25rem;
	text-align: center;
	margin-right: 0.5rem;
}

.app-sidebar .nav-link-group {
	display: flex;
	align-items: center;
	cursor: pointer;
}

.app-sidebar .nav-group-caret {
	width: auto !important;
	margin-right: 0 !important;
	font-size: 0.7rem;
	transition: transform 0.2s ease;
}

.app-sidebar .nav-link-group[aria-expanded="true"] .nav-group-caret {
	transform: rotate(180deg);
}

.app-sidebar .nav-sub .nav-link {
	padding-left: 2.1rem;
	font-size: 0.87rem;
}

.app-sidebar .sidebar-brand {
	color: #ffffff;
	font-weight: 600;
	font-size: 1.1rem;
}

.app-content {
	padding: 1.5rem;
}

@media (min-width: 992px) {
	.app-content-wrapper {
		margin-left: 250px;
	}
}

/* ---- Cards / tables ---------------------------------------------------- */
.card {
	border: var(--cz-border);
	border-radius: var(--cz-radius);
	box-shadow: var(--cz-shadow);
}

.card-hover {
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.card-header {
	border-bottom: var(--cz-border);
	font-size: 0.925rem;
}

/* Stat tiles: icon chip + value + label, with a subtle colored left accent */
.stat-card {
	position: relative;
	overflow: hidden;
}

.stat-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 4px;
	background: var(--stat-accent, var(--cz-primary));
}

.stat-card .stat-icon {
	width: 2.75rem;
	height: 2.75rem;
	border-radius: var(--cz-radius-sm);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.15rem;
	background: var(--stat-accent-bg, var(--cz-primary-light));
	color: var(--stat-accent, var(--cz-primary));
}

.stat-card.stat-primary { --stat-accent: #0d47a1; --stat-accent-bg: #e7f0fd; }
.stat-card.stat-info    { --stat-accent: #0891b2; --stat-accent-bg: #e0f7fa; }
.stat-card.stat-success { --stat-accent: #198754; --stat-accent-bg: #e6f6ed; }
.stat-card.stat-warning { --stat-accent: #b8860b; --stat-accent-bg: #fdf3d9; }
.stat-card.stat-danger  { --stat-accent: #dc3545; --stat-accent-bg: #fbe7e9; }
.stat-card.stat-dark    { --stat-accent: #343a40; --stat-accent-bg: #e9ecef; }

.stat-card .stat-value {
	font-size: 1.85rem;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.stat-card .stat-label {
	font-size: 0.8rem;
	color: #6c757d;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
}

.table-modern thead th {
	background-color: #f8f9fa;
	border-bottom: 2px solid #e9ecef;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 700;
	color: #6c757d;
}

.table-modern tbody tr {
	transition: background-color 0.1s ease;
}

.table-modern tbody tr:hover {
	background-color: #f8faff;
}

.table-responsive-cards .table-modern {
	min-width: 720px;
}

/* ---- Chart cards (compact, not full-bleed) ------------------------------ */
.chart-card-body {
	position: relative;
	height: 220px;
}

.chart-card-body canvas {
	max-height: 100%;
}

/* ---- Credential masking ------------------------------------------------ */
.credential-value {
	font-family: "Consolas", "Courier New", monospace;
	letter-spacing: 1px;
}

.btn-icon {
	width: 2.1rem;
	height: 2.1rem;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.btn {
	font-weight: 500;
}

/* Bootstrap's badges/buttons default to baseline alignment, which looks
   misaligned whenever a pill badge sits next to a button outside of a
   d-flex+align-items-center wrapper (e.g. inline in a table cell). */
.badge {
	vertical-align: middle;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.btn {
	vertical-align: middle;
}

/* ---- Activity / notification feed items --------------------------------- */
.feed-item {
	padding: 0.65rem 0;
	border-bottom: 1px solid #f1f3f5;
}

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

.feed-icon {
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85rem;
	flex-shrink: 0;
}

/* ---- Auth pages --------------------------------------------------------- */
.auth-shell {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--cz-primary) 0%, var(--cz-primary-dark) 100%);
	padding: 1.5rem;
}

.auth-card {
	width: 100%;
	max-width: 420px;
	border-radius: var(--cz-radius);
	border: none;
}

.otp-input {
	letter-spacing: 0.6rem;
	font-size: 1.5rem;
	text-align: center;
	font-weight: 600;
}

/* ---- Ctrl+K quick search ------------------------------------------------- */
.quick-search-modal .modal-content {
	border-radius: var(--cz-radius);
	border: none;
	overflow: hidden;
}

.quick-search-input {
	border: none;
	box-shadow: none !important;
	font-size: 1.05rem;
	padding: 1rem 1.25rem;
}

.quick-search-results {
	max-height: 60vh;
	overflow-y: auto;
}

.quick-search-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 1.25rem;
	cursor: pointer;
	border-left: 3px solid transparent;
}

.quick-search-item:hover,
.quick-search-item.active {
	background-color: var(--cz-primary-light);
	border-left-color: var(--cz-primary);
}

.quick-search-kbd {
	font-size: 0.7rem;
	padding: 0.1rem 0.4rem;
	border-radius: 0.3rem;
	background: #f1f3f5;
	border: 1px solid #dee2e6;
	color: #6c757d;
}

/* ---- HRMS calendar (Attendance / Leave) ----------------------------------- */
.hr-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0.4rem;
}

.hr-calendar-head {
	text-align: center;
	font-size: 0.75rem;
	font-weight: 600;
	color: #6c757d;
	text-transform: uppercase;
	padding-bottom: 0.25rem;
}

.hr-calendar-cell {
	border: 1px solid var(--cz-border-color, #e9ecef);
	border-radius: var(--cz-radius-sm);
	min-height: 78px;
	padding: 0.4rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.2rem;
}

.hr-calendar-cell-empty {
	border: none;
}

.hr-calendar-today {
	border-color: var(--cz-primary);
	box-shadow: 0 0 0 1px var(--cz-primary);
}

.hr-calendar-day-num {
	font-weight: 600;
	font-size: 0.85rem;
}

.hr-calendar-badge {
	font-size: 0.62rem;
}

.hr-calendar-time {
	font-size: 0.62rem;
	color: #6c757d;
	text-align: center;
}

@media (max-width: 767.98px) {
	.hr-calendar-cell {
		min-height: 56px;
		padding: 0.25rem;
	}
	.hr-calendar-badge,
	.hr-calendar-time {
		display: none;
	}
}
