:root {
	color-scheme: light;
	--bg: #f7f7f4;
	--panel: #ffffff;
	--text: #202321;
	--muted: #5d665f;
	--line: #d9ded8;
	--action: #11634a;
	--action-hover: #0d4f3b;
	--danger: #9c2f2f;
	--secondary: #f0f3ef;
	--secondary-hover: #e4eae3;
	--field: #fbfcfb;
}
* {
	box-sizing: border-box;
}
body {
	margin: 0;
	min-height: 100vh;
	font-family: Arial, Helvetica, sans-serif;
	background: var(--bg);
	color: var(--text);
}
main {
	width: min(760px, calc(100% - 32px));
	margin: 0 auto;
	padding: 44px 0;
}
main.medium {
	width: min(860px, calc(100% - 32px));
}
main.wide {
	width: min(1180px, calc(100% - 32px));
}
h1 {
	font-size: 24px;
	margin: 0 0 18px;
	letter-spacing: 0;
}
h2 {
	font-size: 12px;
	margin: 0 0 14px;
	letter-spacing: 0;
	color: var(--muted);
	font-weight: 700;
	text-transform: uppercase;
}
.session {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
	color: var(--muted);
	font-size: 14px;
}
button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 16px;
	border-radius: 6px;
	border: 1px solid transparent;
	font-size: 15px;
	font-weight: 700;
	background: var(--action);
	color: #fff;
	cursor: pointer;
}
button.secondary {
	color: var(--text);
	background: var(--secondary);
	border-color: var(--line);
}
.back {
	display: inline-block;
	margin-bottom: 18px;
	color: var(--action);
	text-decoration: none;
	font-weight: 700;
}
.back:hover {
	color: var(--action-hover);
}
.inline-form {
	display: inline;
}
.inline-form button {
	min-height: 34px;
	padding: 0 12px;
	font-size: 14px;
}
.badge {
	display: inline-flex;
	align-items: center;
	min-height: 22px;
	padding: 0 8px;
	border-radius: 999px;
	background: var(--secondary);
	border: 1px solid var(--line);
	color: var(--muted);
	font-size: 12px;
	font-weight: 700;
}
.panel {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 10px 24px rgba(24, 35, 29, 0.06);
	margin-bottom: 16px;
}
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
	align-items: start;
}
.subpanel {
	border: 1px dashed var(--line);
	border-radius: 8px;
	padding: 16px;
	margin-top: 6px;
	background: var(--secondary);
}
.subpanel h3 {
	margin: 0 0 12px;
	font-size: 15px;
	display: flex;
	align-items: center;
	gap: 8px;
}
/* A labeled group of one or more panels: heading above the card(s), not
   inside — the standard shape for "this table/panel is called X". When the
   heading needs an inline action button, put both in an `.actions` row
   instead of a bare `<h2>`. */
.section {
	margin-bottom: 32px;
}
.section > h2 {
	font-size: 15px;
	margin-bottom: 8px;
}
.section > .actions {
	margin-bottom: 8px;
}
.section > .actions h2 {
	margin: 0;
	flex: 1;
}
.muted {
	color: var(--muted);
	margin: 0;
}
.message {
	border-left: 4px solid var(--action);
	background: #eef7f2;
	padding: 12px 14px;
	margin-bottom: 16px;
	border-radius: 6px;
	font-size: 14px;
}
.message.error {
	border-left-color: var(--danger);
	background: #fff0f0;
}
.message.warning {
	border-left-color: #b26a00;
	background: #fff7e8;
}
table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
th,
td {
	text-align: left;
	border-bottom: 1px solid var(--line);
	padding: 10px 8px;
	vertical-align: middle;
}
th {
	font-size: 12px;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0;
}
table.clickable tbody { cursor: pointer; }
table.clickable tbody tr:hover td { background: rgba(0, 0, 0, 0.05); }
th a.sort-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: inherit;
	font: inherit;
	text-transform: inherit;
	letter-spacing: inherit;
	text-decoration: none;
}
th a.sort-link:hover {
	color: var(--text);
}
th a.sort-link .sort-arrow {
	font-size: 8px;
	color: var(--line);
}
th a.sort-link.sort-active .sort-arrow {
	color: var(--action);
}
td a {
	color: var(--action);
	font-weight: 700;
	text-decoration: none;
}
td a:hover {
	color: var(--action-hover);
	text-decoration: underline;
}
.dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	flex-shrink: 0;
	vertical-align: middle;
	margin-right: 5px;
}
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 16px;
	border-radius: 6px;
	border: 1px solid transparent;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	color: #fff;
	background: var(--action);
	cursor: pointer;
}
.button:hover {
	background: var(--action-hover);
}
.button.secondary {
	color: var(--text);
	background: var(--secondary);
	border-color: var(--line);
}
.button.secondary:hover {
	background: var(--secondary-hover);
}
.button.danger {
	background: var(--danger);
}
.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}
.check {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 8px 0;
	color: var(--text);
	font-weight: 400;
}
.check input {
	width: auto;
	min-height: 0;
}
.empty {
	color: var(--muted);
	margin: 0;
}
label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: var(--muted);
	margin-bottom: 6px;
}
input,
select,
textarea {
	width: 100%;
	min-height: 40px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--field);
	padding: 8px 10px;
	color: var(--text);
	font: inherit;
}
textarea {
	min-height: 86px;
	resize: vertical;
}
.form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
}
.form-row {
	margin-bottom: 14px;
}
.kv {
	display: grid;
	grid-template-columns: minmax(140px, 190px) 1fr;
	gap: 0;
	font-size: 14px;
}
.kv dt,
.kv dd {
	padding: 9px 0;
	border-bottom: 1px solid var(--line);
	margin: 0;
}
.kv dt:last-of-type,
.kv dd:last-of-type {
	border-bottom: none;
}
.kv dt {
	color: var(--muted);
	font-weight: 700;
	padding-right: 16px;
}
.kv dd {
	overflow-wrap: anywhere;
}
.pill {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	border: 1px solid var(--line);
	background: var(--secondary);
	color: var(--muted);
}
.pill.active {
	background: #eef7f2;
	border-color: #b6deca;
	color: #0d6640;
}
.pill.inactive {
	background: #fff0f0;
	border-color: #f0c0c0;
	color: #9c2f2f;
}
.badge-more {
	color: var(--muted);
	background: transparent;
	border-style: dashed;
	cursor: default;
}
.badge-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.nav-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
}
.nav-card {
	display: block;
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--secondary);
	text-decoration: none;
	color: var(--text);
	font-weight: 700;
	font-size: 15px;
	transition: background 0.1s;
}
.nav-card:hover {
	background: var(--secondary-hover);
}
.nav-card .nav-desc {
	display: block;
	font-weight: 400;
	font-size: 13px;
	color: var(--muted);
	margin-top: 4px;
}
