:root {
	--bg: #f2f4f1;
	--bg-elevated: #fbfcf9;
	--surface: #ffffff;
	--surface-soft: #f7faf7;
	--text: #1b2121;
	--text-soft: #485657;
	--text-muted: #617173;
	--primary: #2f5f57;
	--primary-strong: #214d45;
	--primary-soft: #e8f2ee;
	--line: #d7dfd8;
	--line-strong: #c5cfca;
	--danger: #943b3b;
	--success: #2e6d4d;
	--warning: #8d6730;
	--shadow-soft: 0 10px 30px rgba(22, 31, 30, 0.08);
	--shadow-medium: 0 18px 40px rgba(22, 31, 30, 0.12);
	--radius-xl: 24px;
	--radius-lg: 18px;
	--radius-md: 13px;
	--radius-sm: 10px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	min-height: 100%;
}

body {
	font-family: "Avenir Next", "Segoe UI Variable", "SF Pro Text", "Noto Sans", sans-serif;
	background:
		radial-gradient(900px 520px at -8% -5%, rgba(56, 92, 82, 0.08), transparent 60%),
		radial-gradient(760px 480px at 106% 8%, rgba(62, 95, 121, 0.06), transparent 58%),
		var(--bg);
	color: var(--text);
	line-height: 1.45;
}

h1,
h2,
h3,
h4 {
	margin: 0;
	font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
	letter-spacing: -0.01em;
	color: var(--text);
}

h1 {
	font-size: clamp(1.8rem, 2vw, 2.5rem);
	line-height: 1.12;
}

h2 {
	font-size: clamp(1.25rem, 1.4vw, 1.7rem);
	line-height: 1.2;
}

h3 {
	font-size: clamp(1.1rem, 1.1vw, 1.35rem);
	line-height: 1.25;
}

p {
	margin: 0;
}

a {
	color: var(--primary-strong);
}

a:hover {
	color: var(--primary);
}

.app {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	min-height: 100vh;
}

.sidebar {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 24px 18px 20px;
	border-right: 1px solid rgba(197, 207, 202, 0.72);
	background: linear-gradient(178deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 248, 0.92));
	backdrop-filter: blur(6px);
	position: sticky;
	top: 0;
	height: 100vh;
}

.brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 2px 6px 16px;
	margin-bottom: 8px;
	border-bottom: 1px solid var(--line);
}

.brand-logo {
	display: block;
	width: 148px;
	max-width: 100%;
	height: auto;
}

.brand-text {
	font-size: 0.76rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--text-muted);
}

.nav-desktop {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nav-item {
	position: relative;
	text-align: left;
	padding: 11px 12px 11px 15px;
	border: 1px solid transparent;
	background: transparent;
	border-radius: var(--radius-sm);
	font-size: 0.96rem;
	font-weight: 630;
	color: var(--text-soft);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-item::before {
	content: "";
	position: absolute;
	left: 7px;
	top: 9px;
	bottom: 9px;
	width: 3px;
	border-radius: 99px;
	background: transparent;
}

.nav-item:hover {
	background: #eef3ef;
	color: var(--text);
}

.nav-item.is-active {
	background: var(--surface);
	color: var(--primary-strong);
	border-color: var(--line);
	box-shadow: 0 8px 20px rgba(26, 39, 35, 0.08);
}

.nav-item.is-active::before {
	background: var(--primary);
}

.main {
	padding: 22px 30px 112px;
	max-width: 1480px;
}

.topbar {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 18px;
}

.session-panel {
	display: grid;
	grid-template-columns: minmax(240px, 1fr) auto;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: linear-gradient(180deg, #f8faf8, #f3f7f5);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.session-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.session-status {
	font-size: 0.965rem;
	font-weight: 650;
	color: var(--text);
}

.session-expiry {
	font-size: 0.84rem;
	color: var(--text-muted);
}

.session-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
}

.view {
	background: linear-gradient(180deg, var(--surface), var(--bg-elevated));
	border: 1px solid var(--line);
	border-radius: var(--radius-xl);
	padding: clamp(16px, 1.5vw, 26px);
	min-height: 320px;
	box-shadow: var(--shadow-soft);
}

.card-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.card {
	background: linear-gradient(180deg, #ffffff, var(--surface-soft));
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 14px;
	box-shadow: 0 6px 18px rgba(26, 39, 35, 0.05);
}

.stack {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.stack > ul,
.stack > ol {
	margin: 0;
	padding-left: 1.15rem;
}

.stack > ul.stack {
	list-style: disc;
	padding-left: 1.1rem;
}

.stack > ul.stack li,
.stack > ol li {
	margin: 0;
	color: var(--text-soft);
}

.wrap-row {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	align-items: center;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid transparent;
	border-radius: 11px;
	padding: 9px 13px;
	font-size: 0.94rem;
	font-weight: 630;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.14s ease;
}

.btn:hover {
	transform: translateY(-1px);
}

.btn:active {
	transform: translateY(0);
}

.btn:focus-visible,
.nav-item:focus-visible,
.mobile-item:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid rgba(47, 95, 87, 0.32);
	outline-offset: 1px;
}

.btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

.btn-primary {
	background: linear-gradient(180deg, #3d6f66, var(--primary));
	color: #f6f8f7;
	border-color: #2e5f56;
}

.btn-primary:hover {
	background: linear-gradient(180deg, #396a61, var(--primary-strong));
}

.btn-secondary {
	background: #edf2ef;
	color: #263434;
	border-color: #dce5df;
}

.btn-secondary:hover {
	background: #e4ece7;
	border-color: #cfdad3;
}

.muted {
	color: var(--text-muted);
}

.is-error {
	color: var(--danger);
}

.is-success {
	color: var(--success);
}

.is-warning {
	color: var(--warning);
}

label {
	display: block;
	font-size: 0.86rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	margin-bottom: 6px;
	color: var(--text-soft);
}

input[type="text"],
input[type="password"],
input[type="file"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
select,
textarea {
	width: 100%;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-md);
	padding: 9px 11px;
	font: inherit;
	line-height: 1.3;
	background: #fff;
	color: var(--text);
}

textarea {
	resize: vertical;
	min-height: 88px;
}

input::placeholder,
textarea::placeholder {
	color: #819091;
}

input:disabled,
select:disabled,
textarea:disabled {
	background: #f2f5f2;
	color: #819091;
}

table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	font-size: 0.94rem;
}

.table-scroll {
	overflow-x: auto;
}

th,
td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid var(--line);
}

th {
	color: var(--text-soft);
	font-size: 0.84rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.routing-form {
	gap: 13px;
}

.confidential-zone {
	border-color: #d6c7a2;
	background: linear-gradient(180deg, #fffdf7, #fdf8ee);
}

.confidential-auth-dialog {
	width: min(92vw, 540px);
	border: 1px solid var(--line);
	border-radius: 22px;
	padding: 0;
	background: linear-gradient(180deg, #fff, #f8fbf9);
	color: var(--text);
	box-shadow: var(--shadow-medium);
}

.confidential-auth-dialog::backdrop {
	background: rgba(20, 24, 26, 0.4);
	backdrop-filter: blur(3px);
}

.confidential-auth-shell {
	padding: 20px 20px 18px;
}

.confidential-auth-message {
	min-height: 1.2em;
}

.confidential-auth-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	flex-wrap: wrap;
}

.nav-mobile {
	display: none;
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: 8px;
	width: min(96vw, 720px);
	background: rgba(255, 255, 255, 0.94);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 7px;
	gap: 7px;
	backdrop-filter: blur(8px);
	box-shadow: 0 16px 34px rgba(22, 31, 30, 0.2);
	z-index: 30;
}

.mobile-item {
	flex: 1;
	border: 1px solid transparent;
	background: transparent;
	padding: 10px 8px;
	border-radius: 10px;
	font-size: 0.92rem;
	font-weight: 620;
	color: var(--text-soft);
}

.mobile-item.is-active {
	background: #ebf3ef;
	border-color: #cddbd4;
	color: var(--primary-strong);
}

@media (max-width: 1366px) {
	.app {
		grid-template-columns: 250px minmax(0, 1fr);
	}

	.main {
		padding: 20px 20px 108px;
	}
}

@media (max-width: 1120px) {
	.app {
		grid-template-columns: 228px minmax(0, 1fr);
	}

	.sidebar {
		padding: 20px 14px;
	}

	.brand-logo {
		width: 136px;
	}

	.topbar {
		flex-direction: column;
		align-items: stretch;
	}

	.session-panel {
		grid-template-columns: 1fr;
	}

	.session-actions {
		justify-content: flex-start;
	}
}

@media (max-width: 960px) {
	.app {
		grid-template-columns: 1fr;
	}

	.sidebar {
		display: none;
	}

	.main {
		padding: 14px 12px 92px;
	}

	.view {
		border-radius: 18px;
	}

	.card-grid {
		grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	}

	.nav-mobile {
		display: flex;
	}
}

@media (max-width: 640px) {
	body {
		font-size: 15px;
	}

	h1 {
		font-size: 1.9rem;
	}

	.view {
		padding: 14px;
	}

	.card {
		border-radius: 14px;
		padding: 12px;
	}

	.btn {
		padding: 8px 11px;
	}

	.nav-mobile {
		width: calc(100vw - 12px);
		bottom: 6px;
	}
}
