/* tbox design system — dark shell, sidebar nav, card surfaces. */

:root {
	--bg: #0b0d12;
	--sidebar: #12141b;
	--sidebar-border: #21242e;

	--surface: #171a22;
	--surface-border: #22262f;
	--surface-2: #1c2029;
	--surface-2-border: #262b36;

	--hover: #1a1d26;
	--row-border: #1d212b;

	--text: #eef1f6;
	--text-soft: #c4cad6;
	--muted: #8b93a3;
	--dim: #6b7385;
	--nav-idle: #9aa3b5;
	--dot-idle: #3a4050;

	--accent: #6d6af6;
	--accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
	--accent-soft-16: color-mix(in srgb, var(--accent) 16%, transparent);
	--accent-soft-20: color-mix(in srgb, var(--accent) 20%, transparent);

	--success: #33c17a;
	--warning: #f0a94e;
	--danger: #f2555c;
	--info: #4db8f0;

	--radius-card: 16px;
	--radius-field: 10px;
	--radius-btn: 9px;

	--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	--sans: -apple-system, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 14px;
	line-height: 1.5;
}

::selection {
	background: rgba(109, 106, 246, 0.35);
}

@keyframes tbx-spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes tbx-fade-in {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ---------- shell ---------- */

.shell {
	display: flex;
	min-height: 100vh;
	width: 100%;
}

.sidebar {
	position: sticky;
	top: 0;
	align-self: flex-start;
	height: 100vh;
	width: 252px;
	flex-shrink: 0;
	background: var(--sidebar);
	border-right: 1px solid var(--sidebar-border);
	display: flex;
	flex-direction: column;
	padding: 22px 14px 16px;
}

.sidebar-brand {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 8px 24px;
	text-decoration: none;
	color: inherit;
}

.sidebar-mark {
	width: 30px;
	height: 30px;
	border-radius: 9px;
	background: var(--accent-soft-20);
	color: var(--accent);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 14px;
	flex-shrink: 0;
}

.sidebar-name {
	font-weight: 700;
	font-size: 16px;
	letter-spacing: -0.01em;
	line-height: 1.2;
}

.sidebar-tagline {
	font-size: 11px;
	color: var(--dim);
	line-height: 1.2;
}

.sidebar-nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	text-align: left;
	text-decoration: none;
	border: none;
	background: transparent;
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--nav-idle);
	padding: 9px 12px;
	border-radius: var(--radius-field);
	cursor: pointer;
	transition: background 0.12s ease;
}

.nav-item:hover {
	background: var(--hover);
}

.nav-item.is-active {
	background: var(--accent-soft-16);
	color: var(--accent);
}

.nav-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--dot-idle);
	flex-shrink: 0;
}

.nav-item.is-active .nav-dot {
	background: var(--accent);
}

.sidebar-spacer {
	flex: 1;
}

.sidebar-user {
	border-top: 1px solid var(--sidebar-border);
	padding: 14px 8px 4px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.sidebar-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #242833;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	color: var(--nav-idle);
	flex-shrink: 0;
}

.sidebar-user-meta {
	flex: 1;
	min-width: 0;
}

.sidebar-user-name {
	font-size: 12.5px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sidebar-signout {
	font-size: 11px;
	color: var(--dim);
	text-decoration: none;
}

.sidebar-signout:hover {
	color: var(--text);
}

.main {
	flex: 1;
	min-width: 0;
}

.container {
	max-width: 1180px;
	margin: 0 auto;
	padding: 40px 44px 60px;
	animation: tbx-fade-in 0.2s ease;
}

/* ---------- typography ---------- */

.page-header {
	margin-bottom: 26px;
}

.page-header h1 {
	margin: 0 0 6px;
	font-size: 26px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.page-header p {
	margin: 0;
	color: var(--muted);
	font-size: 14.5px;
}

.section-label {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--dim);
	margin-bottom: 12px;
}

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

.hint {
	font-size: 12.5px;
	color: var(--dim);
	margin: 8px 0 0;
}

.error {
	color: var(--danger);
	font-size: 13.5px;
}

.ok {
	color: var(--success);
	font-size: 13.5px;
}

code {
	font-family: var(--mono);
	background: var(--surface-2);
	border: 1px solid var(--surface-2-border);
	padding: 1px 5px;
	border-radius: 5px;
	font-size: 0.92em;
}

a {
	color: var(--accent);
}

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

.mt {
	margin-top: 14px;
}

.right {
	text-align: right;
}

/* ---------- cards ---------- */

.card {
	background: var(--surface);
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-card);
	padding: 22px;
	margin-bottom: 20px;
}

.card-title {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 600;
}

.card-flush {
	padding: 0;
	overflow: hidden;
}

/* ---------- buttons ---------- */

.btn {
	font: inherit;
	font-weight: 600;
	font-size: 13px;
	border-radius: var(--radius-btn);
	cursor: pointer;
	transition: opacity 0.1s ease, background 0.12s ease;
	border: 1px solid transparent;
	padding: 9px 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-decoration: none;
}

.btn:hover {
	opacity: 0.9;
}

.btn:disabled {
	background: var(--surface-2-border);
	color: var(--dim);
	border-color: transparent;
	cursor: not-allowed;
	opacity: 1;
}

.btn-primary {
	background: var(--accent);
	color: #fff;
}

.btn-secondary {
	background: var(--surface-2);
	color: var(--text);
	border-color: var(--surface-2-border);
}

.btn-ghost {
	background: transparent;
	color: var(--text);
	border-color: var(--surface-2-border);
}

.btn-ghost:hover {
	background: var(--surface-2);
}

.btn-danger {
	background: color-mix(in srgb, var(--danger) 14%, transparent);
	color: var(--danger);
}

.btn-ghost-danger {
	background: transparent;
	color: var(--danger);
	border-color: #3a2529;
}

.btn-accent-soft {
	background: var(--accent-soft);
	color: var(--accent);
}

.btn-link {
	background: transparent;
	border: none;
	color: var(--accent);
	padding: 0;
	font-size: 12.5px;
}

.btn-link:hover {
	text-decoration: underline;
}

.btn-sm {
	font-size: 12px;
	border-radius: 7px;
	padding: 5px 11px;
}

.btn-lg {
	font-size: 14px;
	padding: 11px 20px;
}

/* ---------- forms ---------- */

.field {
	display: block;
}

.field + .field,
.field.mt {
	margin-top: 14px;
}

.field-label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--muted);
	margin-bottom: 6px;
}

.input {
	width: 100%;
	font: inherit;
	font-size: 13.5px;
	color: var(--text);
	background: var(--surface-2);
	border: 1px solid var(--surface-2-border);
	border-radius: var(--radius-field);
	padding: 10px 13px;
}

.input:focus {
	outline: none;
	border-color: var(--accent);
}

.input::placeholder {
	color: var(--dim);
}

.textarea {
	font-family: var(--mono);
	font-size: 13px;
	resize: vertical;
	min-height: 96px;
}

select.input {
	appearance: none;
	cursor: pointer;
}

.input-inline {
	width: 180px;
	font-size: 13px;
	border-radius: 8px;
	padding: 7px 12px;
}

/* The button sits on the input's baseline, below the field label. */
.form-inline {
	display: flex;
	gap: 10px;
	align-items: flex-end;
}

.form-inline .field {
	flex: 1;
	min-width: 0;
}

/* ---------- badges & alerts ---------- */

.badge {
	display: inline-flex;
	align-items: center;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 3px 9px;
	border-radius: 999px;
}

.badge-neutral {
	background: color-mix(in srgb, var(--dim) 18%, transparent);
	color: var(--dim);
}
.badge-info {
	background: color-mix(in srgb, var(--info) 18%, transparent);
	color: var(--info);
}
.badge-success {
	background: color-mix(in srgb, var(--success) 18%, transparent);
	color: var(--success);
}
.badge-warning {
	background: color-mix(in srgb, var(--warning) 18%, transparent);
	color: var(--warning);
}
.badge-danger {
	background: color-mix(in srgb, var(--danger) 18%, transparent);
	color: var(--danger);
}

.alert {
	border-radius: 12px;
	padding: 12px 16px;
	font-size: 13.5px;
	border: 1px solid transparent;
}

.alert-info {
	background: color-mix(in srgb, var(--info) 12%, transparent);
	border-color: color-mix(in srgb, var(--info) 30%, transparent);
	color: var(--info);
}
.alert-success {
	background: color-mix(in srgb, var(--success) 12%, transparent);
	border-color: color-mix(in srgb, var(--success) 30%, transparent);
	color: var(--success);
}
.alert-warning {
	background: color-mix(in srgb, var(--warning) 12%, transparent);
	border-color: color-mix(in srgb, var(--warning) 30%, transparent);
	color: var(--warning);
}
.alert-danger {
	background: color-mix(in srgb, var(--danger) 12%, transparent);
	border-color: color-mix(in srgb, var(--danger) 30%, transparent);
	color: var(--danger);
}

/* ---------- tables ---------- */

.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
}

.table th {
	text-align: left;
	padding: 9px 10px;
	border-bottom: 1px solid var(--surface-border);
	color: var(--dim);
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
}

.table th.right {
	text-align: right;
}

.table td {
	padding: 11px 10px;
	border-bottom: 1px solid var(--row-border);
}

.table tbody tr:hover {
	background: var(--hover);
}

.table .mono {
	font-family: var(--mono);
}

.table .cell-muted {
	color: var(--muted);
}

.table a {
	color: var(--accent);
	text-decoration: none;
}

.table a:hover {
	text-decoration: underline;
}

.toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 16px;
}

.toolbar .card-title {
	margin: 0;
}

.toolbar-actions {
	display: flex;
	gap: 8px;
}

.is-hidden {
	display: none !important;
}

.filter-empty {
	margin-top: 10px;
}

/* ---------- dashboard ---------- */

.stat-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-bottom: 28px;
}

.stat {
	background: var(--surface);
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-card);
	padding: 20px;
}

.stat-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--dim);
	margin-bottom: 10px;
}

.stat-value {
	font-size: 28px;
	font-weight: 700;
}

.stat-value.is-active {
	color: var(--accent);
}

.action-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin-bottom: 32px;
}

.action-card {
	background: var(--surface);
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-card);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.action-card.is-featured {
	border: 2px solid var(--accent);
}

.action-title {
	font-size: 15px;
	font-weight: 600;
}

.action-desc {
	font-size: 13px;
	color: var(--muted);
	line-height: 1.5;
	flex: 1;
}

.action-card .btn {
	align-self: flex-start;
}

.recent-list {
	background: var(--surface);
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-card);
	overflow: hidden;
}

.recent-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 20px;
	border-bottom: 1px solid var(--row-border);
	text-decoration: none;
	color: inherit;
}

.recent-row:last-child {
	border-bottom: none;
}

.recent-row:hover {
	background: var(--hover);
}

.recent-thumb {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	object-fit: cover;
	background: var(--surface-2);
	flex-shrink: 0;
}

.recent-meta {
	flex: 1;
	min-width: 0;
}

.recent-title {
	font-size: 14px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.recent-sub {
	font-size: 12px;
	color: var(--dim);
}

.recent-cta {
	font-size: 12px;
	color: var(--dim);
	flex-shrink: 0;
}

.empty {
	padding: 18px 20px;
	margin: 0;
	font-size: 13.5px;
	color: var(--dim);
}

/* ---------- makerworld wizard ---------- */

.mw-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

.mw-main {
	min-width: 0;
}

.mw-rail {
	display: flex;
	flex-direction: column;
	gap: 16px;
	position: sticky;
	top: 40px;
	min-width: 0;
}

.mw-rail .card {
	padding: 18px;
	margin-bottom: 0;
}

.steps {
	display: flex;
	align-items: center;
	margin-bottom: 26px;
}

.step {
	display: flex;
	align-items: center;
	flex: 1;
}

.step-head {
	display: flex;
	align-items: center;
	gap: 9px;
}

.step-circle {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	background: var(--surface-2);
	color: var(--dim);
	border: 2px solid var(--surface-2-border);
	flex-shrink: 0;
}

.step-label {
	font-size: 13px;
	font-weight: 500;
	color: var(--dim);
	white-space: nowrap;
}

.step-line {
	flex: 1;
	height: 2px;
	background: var(--surface-border);
	margin: 0 10px;
	min-width: 12px;
}

.step.is-current .step-circle,
.step.is-done .step-circle {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.step.is-current .step-label,
.step.is-done .step-label {
	color: var(--text);
}

.step.is-current .step-label {
	font-weight: 700;
}

.step.is-done .step-line {
	background: var(--accent);
}

/* photo picker */

.mw-photos {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-bottom: 18px;
}

.mw-photo {
	position: relative;
	cursor: pointer;
	border-radius: 12px;
	overflow: hidden;
	border: 3px solid transparent;
	transition: transform 0.1s ease, border-color 0.1s ease;
	display: block;
}

.mw-photo img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	background: var(--surface-2);
}

.mw-photo input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.mw-photo::after {
	content: "";
	position: absolute;
	top: 6px;
	right: 6px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	line-height: 1;
	color: #fff;
}

.mw-photo:has(input:checked) {
	border-color: var(--accent);
	transform: scale(0.97);
}

.mw-photo:has(input:checked)::after {
	content: "✓";
	background: var(--accent);
}

.mw-description {
	font-size: 13.5px;
	color: var(--text-soft);
	line-height: 1.6;
	padding: 14px;
	background: var(--surface-2);
	border: 1px solid var(--surface-2-border);
	border-radius: var(--radius-field);
}

.mw-zip-form {
	margin-bottom: 14px;
}

/* prompt set picker (radio rows) */

.pset-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 8px;
}

.pset-option {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: var(--radius-field);
	background: var(--surface-2);
	border: 1px solid var(--surface-2-border);
	cursor: pointer;
}

.pset-option:has(input:checked) {
	background: var(--accent-soft);
	border-color: var(--accent);
}

.pset-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.pset-radio {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid var(--dot-idle);
	flex-shrink: 0;
}

.pset-option:has(input:checked) .pset-radio {
	border-color: var(--accent);
	background: var(--accent);
	box-shadow: inset 0 0 0 3px var(--surface-2);
}

.pset-name {
	font-size: 13.5px;
	font-weight: 600;
}

.pset-count {
	font-size: 12px;
	color: var(--dim);
}

/* generation output */

.gen-preview {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.gen-source-img {
	width: 64px;
	height: 64px;
	border-radius: 10px;
	object-fit: cover;
	background: var(--surface-2);
}

.gen-hint {
	margin-bottom: 14px;
}

.gen-progress {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px;
	background: var(--surface-2);
	border-radius: 12px;
	margin-bottom: 16px;
	font-size: 14px;
	font-weight: 600;
}

.gen-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-bottom: 20px;
}

.gen-item {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	background: var(--surface-2);
}

.gen-item img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.gen-item .btn {
	position: absolute;
	left: 6px;
	right: 6px;
	bottom: 6px;
	opacity: 0;
	transition: opacity 0.12s ease;
}

.gen-item:hover .btn,
.gen-item .btn:focus-visible {
	opacity: 1;
}

/* Without hover there is no way to reveal the download button, so pin it. */
@media (hover: none) {
	.gen-item .btn {
		opacity: 1;
	}
}

.allegro-title-preview {
	font-size: 15px;
	font-weight: 600;
	padding: 12px 14px;
	background: var(--surface-2);
	border: 1px solid var(--surface-2-border);
	border-radius: var(--radius-field);
	margin: 0 0 4px;
}

.allegro-desc-preview {
	font-size: 13.5px;
	color: var(--text-soft);
	line-height: 1.6;
	padding: 14px;
	background: var(--surface-2);
	border: 1px solid var(--surface-2-border);
	border-radius: var(--radius-field);
}

.allegro-desc-source {
	width: 100%;
	min-height: 160px;
	margin-top: 10px;
	font-family: var(--mono);
	font-size: 12.5px;
	color: var(--text);
	background: var(--surface-2);
	border: 1px solid var(--surface-2-border);
	border-radius: 8px;
	padding: 10px 11px;
	resize: vertical;
}

/* right rail: tasks + history */

.rail-title {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--dim);
	margin: 0 0 12px;
}

.rail-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 0;
	border-bottom: 1px solid var(--row-border);
	text-decoration: none;
	color: inherit;
}

.rail-row:last-child {
	border-bottom: none;
}

.rail-thumb {
	width: 30px;
	height: 30px;
	border-radius: 8px;
	object-fit: cover;
	background: var(--surface-2);
	flex-shrink: 0;
}

.rail-meta {
	flex: 1;
	min-width: 0;
}

.rail-name {
	font-size: 12.5px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rail-date {
	font-size: 11px;
	color: var(--dim);
}

.rail-empty {
	margin: 0;
	font-size: 13px;
	color: var(--dim);
}

/* A flex summary drops the native disclosure marker, so draw our own. */
summary {
	cursor: pointer;
}

summary.rail-row,
summary.btn {
	list-style: none;
}

summary.rail-row::-webkit-details-marker,
summary.btn::-webkit-details-marker {
	display: none;
}

summary.rail-row::after {
	content: "▾";
	color: var(--dim);
	font-size: 12px;
	flex-shrink: 0;
	transition: transform 0.12s ease;
}

details[open] > summary.rail-row::after {
	transform: rotate(180deg);
}

details.prompt-card:not([open]) > summary.rail-row {
	border-bottom: none;
}

/* ---------- spinners ---------- */

.spinner {
	width: 16px;
	height: 16px;
	border: 2px solid var(--surface-2-border);
	border-top-color: var(--accent);
	border-radius: 50%;
	display: inline-block;
	animation: tbx-spin 0.7s linear infinite;
	flex-shrink: 0;
	visibility: hidden;
}

.htmx-request .spinner,
.spinner.htmx-request {
	visibility: visible;
}

/* Always-visible spinner for a task that is known to be running, as opposed to
   .spinner which only shows during an htmx request. */
.rail-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid var(--surface-2-border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: tbx-spin 0.7s linear infinite;
	flex-shrink: 0;
}

.spinner-lg {
	width: 26px;
	height: 26px;
	border: 3px solid var(--surface-2-border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: tbx-spin 0.7s linear infinite;
	flex-shrink: 0;
}

/* ---------- prompt sets page ---------- */

.prompts-layout {
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: 18px;
	align-items: start;
}

.prompts-layout .card {
	margin-bottom: 0;
	min-width: 0;
}

.prompt-sets-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.prompt-subhead {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--dim);
}

.prompt-intro {
	margin: 0 0 16px;
	font-size: 13px;
}

.prompt-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.prompt-set-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: var(--radius-field);
}

.prompt-set-row:hover {
	background: var(--hover);
}

.prompt-set-active,
.prompt-set-active:hover {
	background: var(--accent-soft);
}

.prompt-set-open {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: none;
	font: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
	padding: 0;
}

.prompt-set-name {
	font-size: 13.5px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.prompt-set-count {
	font-size: 11.5px;
	color: var(--dim);
	font-weight: 500;
}

.prompt-editor-title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 16px;
}

.prompt-shots-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 24px 0 14px;
}

.prompt-shots-head .prompt-editor-title {
	margin: 0;
}

.prompt-card {
	background: var(--surface-2);
	border: 1px solid var(--surface-2-border);
	border-radius: 12px;
	padding: 14px;
}

.prompt-list .prompt-card + .prompt-card {
	margin-top: 10px;
}

.prompt-card-head {
	display: flex;
	gap: 10px;
	margin-bottom: 10px;
	min-width: 0;
}

.prompt-name {
	flex: 1;
	min-width: 0;
	font-size: 13px;
	font-weight: 600;
	background: var(--surface);
	border-radius: 8px;
	padding: 8px 11px;
}

.prompt-body {
	background: var(--surface);
	border-radius: 8px;
	font-size: 12.5px;
	min-height: 64px;
	padding: 10px 11px;
}

.prompt-panel {
	min-height: 320px;
}

/* ---------- login ---------- */

.login-wrap {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.login-card {
	width: 100%;
	max-width: 360px;
	padding: 32px;
	margin: 0;
}

.login-title {
	margin: 0 0 4px;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.login-subtitle {
	margin: 0 0 22px;
	font-size: 13.5px;
}

.login-error {
	margin: 0 0 14px;
}

.login-submit {
	width: 100%;
	margin-top: 18px;
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
	.mw-layout,
	.prompts-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.mw-rail {
		position: static;
	}

	.action-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.stat-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 860px) {
	.shell {
		flex-direction: column;
	}

	.sidebar {
		position: static;
		width: 100%;
		height: auto;
		border-right: none;
		border-bottom: 1px solid var(--sidebar-border);
	}

	.sidebar-nav {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.nav-item {
		width: auto;
	}

	.sidebar-spacer {
		display: none;
	}

	.container {
		padding: 28px 20px 48px;
	}

	.mw-photos,
	.gen-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.step-label {
		display: none;
	}
}
