:root {
	--bg: #0f172a;
	--card: #ffffff;
	--muted: #64748b;
	--primary: #2563eb;
	--accent: #7c3aed;
	--ok: #16a34a;
	--warn: #d97706;
	--bad: #dc2626;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: 'Segoe UI', system-ui, Arial;
	background: #f1f5f9;
	color: #0f172a;
}

a {
	color: var(--primary);
	text-decoration: none;
}

.wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 20px;
}

body.has-sidebar .main {
	margin-left: 264px;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

body.has-sidebar .main .wrap {
	width: 100%;
	flex: 1;
}

.sidebar {
	background: linear-gradient(180deg, #1e3a8a 0%, #4c1d95 60%, #6d28d9 100%);
	color: #fff;
	padding: 20px 16px;
	box-shadow: 2px 0 10px rgba(0, 0, 0, .15);
	position: fixed;
	left: 0;
	top: 0;
	bottom: 0;
	width: 264px;
	overflow-y: auto;
	z-index: 40;
}

.sidebar .sidebar-inner {
	height: 100%;
	min-height: calc(100vh - 40px);
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

.brand {
	display: flex;
	gap: 12px;
	align-items: center;
	font-weight: 700;
	font-size: 18px;
}

.brand .logo {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: #fff;
	color: #4c1d95;
	display: grid;
	place-items: center;
	font-weight: 900;
}

.brand-logo {
	display: block;
	object-fit: contain;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.login-logo {
	height: 90px;
	width: auto;
	margin: 0 auto 8px;
	display: block;
}

.report-head {
	display: flex;
	align-items: center;
	gap: 14px;
	justify-content: center;
	text-align: center;
}

.report-head img {
	height: 70px;
	width: auto;
}

@media print {
	.report-head img {
		height: 60px;
	}
}

.sidebar .nav {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	margin-top: 24px;
}

.sidebar .nav a {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #fff;
	margin-left: 0;
	padding: 10px 12px;
	border-radius: 10px;
	font-weight: 600;
	font-size: 14px;
}

.sidebar .nav a .ico {
	width: 22px;
	text-align: center;
}

.sidebar .nav-sep {
	margin: 12px 6px 2px;
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .65);
}

.sidebar .nav a:hover,
.sidebar .nav a.active {
	background: rgba(255, 255, 255, .22);
}

.sidebar-foot {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid rgba(255, 255, 255, .25);
	display: grid;
	gap: 8px;
}

.user-chip {
	font-size: 13px;
	font-weight: 700;
}

.user-chip small {
	font-weight: 400;
	color: rgba(255, 255, 255, .8);
}

.sidebar-foot .logout {
	display: block;
	text-align: center;
	background: rgba(0, 0, 0, .28);
	color: #fff;
	padding: 9px 12px;
	border-radius: 10px;
	font-weight: 700;
}

.sidebar-foot .logout:hover {
	background: rgba(0, 0, 0, .42);
}

.sidebar-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, .5);
	z-index: 35;
}

.mobilebar {
	display: none;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	background: #fff;
	border-bottom: 1px solid #e2e8f0;
	position: sticky;
	top: 0;
	z-index: 30;
}

.mobilebar-title {
	font-weight: 800;
}

.hamburger {
	border: 1px solid #cbd5e1;
	background: #0f172a;
	color: #fff;
	border-radius: 8px;
	font-size: 18px;
	line-height: 1;
	padding: 7px 11px;
	cursor: pointer;
}

body.no-scroll {
	overflow: hidden;
}

.card {
	background: #fff;
	border-radius: 14px;
	padding: 20px;
	box-shadow: 0 6px 24px rgba(15, 23, 42, .08);
	margin-bottom: 18px;
}

.grid {
	display: grid;
	gap: 16px;
}

.g4 {
	grid-template-columns: repeat(4, 1fr);
}

.g3 {
	grid-template-columns: repeat(3, 1fr);
}

.g2 {
	grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
	.g4,
	.g3,
	.g2 {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 860px) {
	.mobilebar {
		display: flex;
	}

	body.has-sidebar .main {
		margin-left: 0;
	}

	.sidebar {
		transform: translateX(-105%);
		transition: transform .22s ease;
		width: 272px;
	}

	.sidebar.open {
		transform: none;
	}

	.footer {
		margin-left: 0;
	}
}

.stat {
	border-left: 6px solid var(--primary);
	padding: 6px 4px;
}

.stat h3 {
	margin: 4px 0;
	font-size: 30px;
}

.stat p {
	margin: 0;
	color: var(--muted);
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: .06em;
}

table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
}

th,
td {
	padding: 10px 12px;
	border-bottom: 1px solid #e2e8f0;
	text-align: left;
	font-size: 14px;
}

th {
	background: #0f172a;
	color: #fff;
}

tr:hover td {
	background: #f8fafc;
}

.btn {
	display: inline-block;
	padding: 9px 14px;
	border-radius: 9px;
	border: 0;
	cursor: pointer;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.4;
}

.btn-p,
a.btn-p, button.btn-p {
	background: var(--primary);
	color: #fff;
}

.btn-g,
a.btn-g, button.btn-g {
	background: #e2e8f0;
	color: #0f172a;
}

.btn-d,
a.btn-d, button.btn-d {
	background: var(--bad);
	color: #fff;
}

.btn-o,
a.btn-o, button.btn-o {
	background: var(--ok);
	color: #fff;
}

.btn-w,
a.btn-w, button.btn-w {
	background: var(--warn);
	color: #fff;
}

.btn-p:hover, .btn-d:hover, .btn-o:hover { filter: brightness(.92); color: #fff; }
.btn-g:hover { filter: brightness(.95); color: #0f172a; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

input,
select,
textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 9px;
	margin: 6px 0 12px;
}

label {
	font-weight: 600;
	font-size: 13px;
	color: #334155;
}

.badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
}

.b-green {
	background: #dcfce7;
	color: #166534;
}

.b-yellow {
	background: #fef9c3;
	color: #854d0e;
}

.b-red {
	background: #fee2e2;
	color: #991b1b;
}

.b-blue {
	background: #dbeafe;
	color: #1e40af;
}

.b-purple {
	background: #ede9fe;
	color: #5b21b6;
}

.b-gray {
	background: #e2e8f0;
	color: #334155;
}

.alert {
	padding: 12px 14px;
	border-radius: 10px;
	margin: 10px 0;
}

.alert-err {
	background: #fee2e2;
	color: #991b1b;
}

.alert-ok {
	background: #dcfce7;
	color: #166534;
}

.login-wrap {
	min-height: 100vh;
	display: grid;
	place-items: center;
	background: linear-gradient(135deg, #1e3a8a, #7c3aed, #06b6d4);
	padding: 20px;
}

.login-card {
	width: 100%;
	max-width: 430px;
	background: #fff;
	border-radius: 18px;
	padding: 28px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

.captcha {
	font-size: 22px;
	font-weight: 900;
	letter-spacing: 4px;
	background: #0f172a;
	color: #facc15;
	padding: 10px;
	text-align: center;
	border-radius: 10px;
}

.filters {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.filters > * {
	flex: 1;
	min-width: 160px;
}

@media print {
	.sidebar,
	.mobilebar,
	.no-print {
		display: none !important;
	}

	body.has-sidebar .main {
		margin: 0;
	}

	body {
		background: #fff;
	}

	.card {
		box-shadow: none;
	}
}

.footer {
	text-align: center;
	color: var(--muted);
	padding: 18px;
	font-size: 13px;
}

@media print {
	.footer {
		margin-left: 0;
	}
}

.welcome-banner {
	margin-bottom: 18px;
	padding: 22px 26px;
	border-radius: 8px;
	background: linear-gradient(110deg, #1e3a8a, #4c1d95, #6d28d9);
	color: #fff;
}

.welcome-eyebrow {
	margin: 0 0 8px;
	color: rgba(255, 255, 255, .78);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

.welcome-banner h1 {
	margin: 0 0 8px;
	font-size: 28px;
	line-height: 1.2;
}

.welcome-description {
	margin: 0;
	color: rgba(255, 255, 255, .9);
	font-size: 15px;
	line-height: 1.5;
}

@media (max-width: 860px) {
	.welcome-banner {
		padding: 18px 20px;
	}

	.welcome-banner h1 {
		font-size: 24px;
	}
}
