@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
	--app-bg: #EEF0F5;
	--surface: #fff;
	--surface-sunk: #F6F7FB;
	--border: #EDEFF5;
	--brand: #4E46E8;
	--brand-strong: #4B3D9B;
	--brand-deep: #3E3384;
	--brand-tint: #EDEBFB;
	--accent-cyan: #74DCEC;
	--accent-coral: #F58A6C;
	--accent-violet: #6B5CE7;
	--ok: #3FBF8F;
	--warn: #F0A742;
	--risk: #E4694F;
	--ok-tint: #E7F6F0;
	--warn-tint: #FDF3E3;
	--risk-tint: #FBEAE5;
	--ink: #2E3247;
	--ink-2: #5A6178;
	--ink-3: #8B95AE;
	--sidebar: #2A1258;
	--nav-idle: rgba(255,255,255,.62);
	--nav-hover: rgba(255,255,255,.07);
	--nav-active: #5B3FD4;
	--r-card: 16px;
	--r-btn: 10px;
	--r-pill: 999px;
	--sh-card: 0 6px 20px rgba(46,50,71,.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
	background: var(--app-bg);
	font-family: 'Poppins', system-ui, sans-serif;
	color: var(--ink);
	font-size: 14px;
	-webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* Almost invisible scrollbars */
.scroll,
.SideMenu,
.ModInner,
.DetailPanel {
	scrollbar-width: thin;
	scrollbar-color: rgba(46,50,71,.12) transparent;
}
.scroll::-webkit-scrollbar,
.SideMenu::-webkit-scrollbar,
.ModInner::-webkit-scrollbar,
.DetailPanel::-webkit-scrollbar { width: 5px; height: 5px; }
.scroll::-webkit-scrollbar-track,
.SideMenu::-webkit-scrollbar-track,
.ModInner::-webkit-scrollbar-track,
.DetailPanel::-webkit-scrollbar-track { background: transparent; }
.scroll::-webkit-scrollbar-thumb,
.SideMenu::-webkit-scrollbar-thumb,
.ModInner::-webkit-scrollbar-thumb,
.DetailPanel::-webkit-scrollbar-thumb {
	background: rgba(46,50,71,.14);
	border-radius: 999px;
}
.SideMenu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); }

body.drawer-open { overflow: hidden; }

.btn {
	height: 38px;
	padding: 0 15px;
	border-radius: var(--r-btn);
	font-size: 13.5px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	transition: .14s;
	white-space: nowrap;
}
.b-pri { background: var(--brand-strong); color: #fff; }
.b-pri:hover { background: var(--brand-deep); }
.b-sec { background: var(--surface); color: var(--ink-2); border: 1px solid var(--border); }
.b-sec:hover { background: var(--surface-sunk); }
.b-ghost { color: var(--brand-strong); }
.b-ghost:hover { background: var(--brand-tint); }
.b-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }

.card {
	background: var(--surface);
	border-radius: var(--r-card);
	box-shadow: var(--sh-card);
	padding: 20px 22px;
}
.card.flush { padding: 0; overflow: hidden; }

.pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 23px;
	padding: 0 9px;
	border-radius: var(--r-pill);
	font-size: 11.5px;
	font-weight: 600;
}
.pill i { width: 5px; height: 5px; border-radius: 50%; }
.p-ok { background: var(--ok-tint); color: #22775A; }
.p-ok i { background: var(--ok); }
.p-warn { background: var(--warn-tint); color: #9A6516; }
.p-warn i { background: var(--warn); }
.p-risk { background: var(--risk-tint); color: #A6402B; }
.p-risk i { background: var(--risk); }
.p-mute { background: var(--surface-sunk); color: var(--ink-3); }
.p-mute i { background: var(--ink-3); }
.p-info { background: var(--brand-tint); color: var(--brand-strong); }
.p-info i { background: var(--brand); }

.who { display: flex; align-items: center; gap: 10px; }
.av {
	border-radius: 50%;
	display: grid;
	place-items: center;
	color: #fff;
	font-weight: 600;
	flex: none;
}
img.av {
	object-fit: cover;
	display: block;
	background: var(--surface-sunk);
}
.av-32 { width: 32px; height: 32px; font-size: 11px; }
.av-40 { width: 40px; height: 40px; font-size: 13px; }
.s2 { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 500; margin-top: 2px; }
.mt16 { margin-top: 16px; }
.mt20 { margin-top: 20px; }
.num { font-variant-numeric: tabular-nums; }

.grid12 {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 20px;
	align-items: start;
}
.gc3 { grid-column: span 3; }
.gc4 { grid-column: span 4; }
.gc5 { grid-column: span 5; }
.gc6 { grid-column: span 6; }
.gc7 { grid-column: span 7; }
.gc8 { grid-column: span 8; }
@media (max-width: 1100px) {
	.gc3, .gc4, .gc5, .gc6, .gc7, .gc8 { grid-column: span 12; }
}

.statrow { display: flex; flex-direction: column; gap: 0; }
.stat { padding: 12px 0; border-bottom: 1px solid var(--border); }
.stat:last-child { border-bottom: none; }
.stat .lb { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.stat .vl { font-size: 22px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.stat .dl { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.kv span { color: var(--ink-3); font-weight: 500; }
.kv b { font-weight: 600; color: var(--ink); text-align: right; }

.find { background: var(--surface-sunk); border-radius: 10px; padding: 12px 13px; margin-top: 9px; border-left: 3px solid var(--warn); }
.find.info { border-left-color: var(--brand); }
.find.risk { border-left-color: var(--risk); }
.find.ok { border-left-color: var(--ok); }
.find b { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 3px; }
.find p { font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.find cite { display: block; font-size: 10.5px; color: var(--ink-3); font-style: normal; margin-top: 6px; }
.find .acts { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }

.assist {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--brand-tint);
	border: 1.5px dashed var(--brand);
	border-radius: 12px;
	padding: 12px 16px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}
.assist .tx { flex: 1; font-size: 13px; color: var(--brand-strong); font-weight: 500; min-width: 220px; }

.stools { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; flex-wrap: wrap; }
.stools .sp { flex: 1; }
.dpick {
	display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 13px;
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-btn);
	font-size: 13px; font-weight: 600;
}
.sq {
	width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
	color: var(--ink-3); border: 1px solid var(--border); background: var(--surface);
}
.sq:hover { background: var(--surface-sunk); color: var(--ink); }

.strip { display: flex; margin-bottom: 20px; flex-wrap: wrap; }
.step {
	flex: 1; display: flex; align-items: center; gap: 9px; padding: 12px 16px;
	background: var(--surface-sunk); font-size: 12.5px; font-weight: 500; color: var(--ink-3); min-width: 130px;
}
.step:first-child { border-radius: 11px 0 0 11px; }
.step:last-child { border-radius: 0 11px 11px 0; }
.step.done { background: var(--brand-tint); color: var(--brand-strong); font-weight: 600; }
.step.now { background: var(--brand-strong); color: #fff; font-weight: 600; }
.step .n {
	width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.07);
	display: grid; place-items: center; font-size: 10.5px; font-weight: 700; flex: none;
}
.step.now .n { background: rgba(255,255,255,.22); }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 8px 14px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); cursor: pointer; }
.seg button.on { background: var(--brand-strong); color: #fff; }

.ov {
	display: none; position: fixed; inset: 0; background: rgba(46,50,71,.45);
	z-index: 3000; align-items: center; justify-content: center; padding: 24px;
}
.ov.on { display: flex; }
.mod {
	background: var(--surface); border-radius: 16px; width: 100%; max-width: 560px;
	box-shadow: 0 20px 50px rgba(46,50,71,.2); max-height: 90vh; overflow: auto;
}
.mod-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.mod-h h2 { font-size: 17px; font-weight: 600; }
.mod-b { padding: 18px 22px; }
.mod-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); }
.fs { margin-bottom: 18px; }
.fs h4 { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.fh { font-size: 12.5px; color: var(--ink-3); margin-bottom: 12px; }

.link { font-size: 13px; font-weight: 600; color: var(--brand-strong); cursor: pointer; }
.link:hover { text-decoration: underline; }

.tgl { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; color: var(--ink-2); }

.mx td.cell { text-align: center; }
.mcell {
	width: 26px; height: 26px; border-radius: 8px;
	display: inline-grid; place-items: center; font-size: 13px; font-weight: 600;
}
.m-add { background: var(--surface-sunk); color: var(--brand); }
.m-ok { background: var(--ok-tint); color: var(--ok); }
.m-wait { background: var(--warn-tint); color: #9A6516; }
.m-exp { background: var(--risk-tint); color: var(--risk); }

.rows .row.ok { }
.rows .row.warn .tx b { color: var(--ink); }
.rows .row.on,
tbody tr.onb-row.on td { background: var(--brand-tint); }

.sw {
	width: 36px; height: 20px; border-radius: var(--r-pill); background: #D6DBE7;
	position: relative; transition: .16s; flex: none; cursor: pointer;
}
.sw i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .16s; }
.sw.on { background: var(--brand); }
.sw.on i { left: 18px; }

.tags {
	display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
	border: 1px solid var(--border); border-radius: var(--r-btn);
	padding: 7px 9px; background: var(--surface); min-height: 38px;
}
.tag {
	display: inline-flex; align-items: center; gap: 6px; height: 25px;
	padding: 0 6px 0 10px; border-radius: 7px;
	background: var(--brand-strong); color: #fff; font-size: 12px; font-weight: 600;
}
.tag.lt { background: var(--brand-tint); color: var(--brand-strong); }
.tag .x {
	width: 15px; height: 15px; border-radius: 50%; background: rgba(255,255,255,.25);
	display: grid; place-items: center; font-size: 10px; cursor: pointer; border: 0; color: inherit;
}
.tag.lt .x { background: rgba(75,61,155,.16); }
.tags input { border: none; outline: none; flex: 1; min-width: 130px; background: none; }

table { width: 100%; border-collapse: collapse; }
thead th {
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--ink-3);
	text-align: left;
	padding: 11px 14px;
	background: var(--surface-sunk);
	white-space: nowrap;
}
thead th:first-child { border-radius: 9px 0 0 9px; }
thead th:last-child { border-radius: 0 9px 9px 0; }
tbody td {
	padding: 13px 14px;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--ink-2);
	border-bottom: 1px solid var(--border);
	vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #FAFBFD; }
tbody td.empty { text-align: center; color: var(--ink-3); padding: 28px; }
.row-action { color: var(--brand-strong); font-weight: 600; cursor: pointer; font-size: 12.5px; }
.row-action:hover { text-decoration: underline; }

.search {
	display: flex;
	align-items: center;
	gap: 9px;
	height: 38px;
	padding: 0 14px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-btn);
	min-width: 220px;
}
.search input { border: none; outline: none; flex: 1; color: var(--ink); background: none; }

.ph { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ph-t h1 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.ph-t .sub { font-size: 12.5px; color: var(--ink-3); font-weight: 500; margin-top: 2px; }
.ph-mid { display: flex; align-items: center; }
.ph-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.ctl { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.ctl .sp { flex: 1; }
.ListCount { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }

.ptabs { display: inline-flex; background: var(--surface-sunk); border-radius: var(--r-btn); padding: 4px; gap: 2px; }
.ptabs button { height: 34px; padding: 0 18px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink-3); }
.ptabs button.on { background: var(--brand-strong); color: #fff; font-weight: 600; }
.subtabs { display: inline-flex; background: var(--surface-sunk); border-radius: var(--r-btn); padding: 3px; margin-bottom: 18px; flex-wrap: wrap; }
.subtabs button { height: 32px; padding: 0 16px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.subtabs button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(46,50,71,.1); }
.ht { display: none; }
.ht.on { display: block; }
.ts { display: none; }
.ts.on { display: block; }
.over { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.note { font-size: 11.5px; color: var(--ink-3); line-height: 1.6; font-weight: 500; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.rows .row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rows .row:last-child { border-bottom: none; }
.rows .row.warn { border-left: 3px solid var(--warn); padding-left: 10px; }
.rows .row.risk { border-left: 3px solid var(--risk); padding-left: 10px; }
.rows .row.ok { border-left: 3px solid var(--ok); padding-left: 10px; }
.rows .tx { flex: 1; min-width: 0; }
.rows .tx b { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.rows .tx small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }
.lines td { padding: 0; background: var(--surface-sunk); }
.lines-in { padding: 14px 18px 16px 52px; }
.ln {
	display: grid;
	grid-template-columns: 1.3fr 90px 110px 1fr;
	gap: 14px;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid var(--border);
	font-size: 12.5px;
}
.ln:last-of-type { border-bottom: none; }
.ln .cd { font-weight: 600; color: var(--ink); }
.ln .q { font-weight: 700; text-align: right; }
.ln .sc { font-size: 10.5px; color: var(--ink-3); font-weight: 500; }
.fr { margin-bottom: 14px; }
.fr label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.inp { width: 100%; height: 38px; border: 1px solid var(--border); border-radius: var(--r-btn); padding: 0 12px; background: var(--surface); color: var(--ink); outline: none; }
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }

.ch- {
	display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
	margin-bottom: 14px;
}
.ch- h2 { font-size: 16px; font-weight: 600; }
.ch- .desc { font-size: 12.5px; color: var(--ink-3); font-weight: 500; margin-top: 2px; }

.hiw {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	margin: 18px 0 22px;
}
@media (max-width: 900px) {
	.hiw { grid-template-columns: repeat(2, 1fr); }
}
.hiw .st .ic {
	width: 44px; height: 44px; border-radius: 13px;
	background: var(--brand-tint); display: grid; place-items: center;
	color: var(--brand-strong); margin-bottom: 11px; font-weight: 700;
}
.hiw .st .lb {
	font-size: 10.5px; font-weight: 700; letter-spacing: .09em;
	color: var(--ink-3); margin-bottom: 4px;
}
.hiw .st p { font-size: 13px; color: var(--ink-2); line-height: 1.5; font-weight: 500; }
.chk {
	display: flex; align-items: center; gap: 10px;
	padding: 7px 0; font-size: 13.5px; color: var(--ink-2); font-weight: 500;
}
.chk svg { color: var(--ok); flex: none; }
.code {
	background: #241348; border-radius: 11px; padding: 15px 17px;
	font-family: ui-monospace, Menlo, monospace; font-size: 11.5px;
	line-height: 1.7; color: #C9D0E4; overflow-x: auto; white-space: pre;
}
.code .t { color: #8FD3E8; }
.code .a { color: #C7B6F5; }
.code .s { color: #F3A98C; }

.ShowLoading .AppLoading,
.ShowLoadingModules .LoadingModules { display: flex; }
.AppLoading, .LoadingModules {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(238,240,245,.85);
	z-index: 9999;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 12px;
	font-weight: 600;
	color: var(--brand-strong);
}
.spinner {
	width: 36px; height: 36px;
	border: 3px solid var(--brand-tint);
	border-top-color: var(--brand-strong);
	border-radius: 50%;
	animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.AppAlert {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(46,50,71,.45);
	z-index: 10000;
	align-items: center;
	justify-content: center;
}
.AppAlert.show { display: flex; }
.AppAlert .AlertBox {
	background: var(--surface);
	border-radius: var(--r-card);
	padding: 24px;
	max-width: 420px;
	width: 90%;
	box-shadow: 0 16px 44px rgba(46,50,71,.18);
}
.AppAlert .AlertTitle { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.AppAlert .AlertBody { color: var(--ink-2); line-height: 1.5; margin-bottom: 16px; }
.AppAlert .AlertClose { margin-top: 8px; }

.AppToast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	background: var(--sidebar);
	color: #fff;
	padding: 12px 18px;
	border-radius: var(--r-btn);
	box-shadow: var(--sh-card);
	opacity: 0;
	transform: translateY(10px);
	transition: .2s;
	z-index: 10001;
	pointer-events: none;
}
.AppToast.show { opacity: 1; transform: translateY(0); }

/* Dev hint: missing key in active (non-en) catalogue */
.i18n-miss { outline: 1px dashed #c44; outline-offset: 2px; }

@media (max-width: 900px) {
	body.sidebar-collapsed .SideNav { transform: translateX(-100%); }
	.SideNav { position: fixed; z-index: 100; height: 100%; transition: transform .2s; }
}
