/*
 * The admin pages' parts (js/components/admin-page.js, and the programs' admin pages built with it: Paneo's 设置 ›
 * 管理, GeoI's AI 助手管理): lists of items inside cards, their badges, small forms. Moved here from the copies in
 * Paneo's and GeoI's admin.css (2026-10-23), which had drifted apart.
 */

.set-stack.is-busy {
	opacity: 0.7;
	transition: opacity 0.2s var(--ease);
}

.adm-form > .input {
	flex: 1 1 140px;
	min-width: 0;
	width: auto;
}

.adm-form > .set-select {
	flex: none;
	width: auto;
}

/* `.set-inline .input` stretches every input; these stay small */
.set-inline .input.adm-num {
	flex: none;
	min-width: 0;
}

.adm-num {
	width: 6.5em;
}

.adm-textarea {
	resize: vertical;
	min-height: 2.6em;
}

.adm-mono,
.adm-link {
	font-family: var(--mono);
	overflow-wrap: anywhere;
}

.adm-link {
	font-size: calc(12px * var(--ui-scale));
	color: var(--text);
}

.adm-copy.is-done {
	color: var(--ok);
}

.adm-actions-end {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.adm-list {
	padding-top: 0;
}

.adm-item {
	padding: 10px 0;
}

.adm-item + .adm-item {
	border-top: 1px dashed var(--border);
}

.adm-item.is-current .adm-item-title {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.adm-item-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.adm-item-title {
	font-weight: 500;
	color: var(--text-strong);
	overflow-wrap: anywhere;
}

.adm-item-side {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
	font-size: calc(12px * var(--ui-scale));
	color: var(--muted);
}

.adm-item-actions {
	margin-top: 8px;
	gap: 6px;
}

.adm-item-actions .btn,
.adm-item-actions a.btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	text-decoration: none;
}

.adm-badge {
	margin-left: 0;
	padding: 0 7px;
	font-size: calc(11px * var(--ui-scale));
}

.adm-badge.is-admin {
	background: var(--surface-2);
	color: var(--text-strong);
}

.adm-badge.is-ok {
	background: var(--ok-bg);
	color: var(--ok);
}

.adm-badge.is-quiet {
	background: var(--surface-2);
	color: var(--muted);
}

.adm-badge.is-warn {
	background: var(--warn-bg);
	color: var(--warn);
}

.adm-badge.is-danger {
	background: var(--danger-bg);
	color: var(--danger);
}

/* while sorting, every row folds to its grip, avatar and name */
.set-rows.is-sorting {
	cursor: grabbing;
	user-select: none;
}
