/* eb_dashboard's own rules, loaded after eb.css (a copy of eb_blueprint templates/design/eb.css,
   never edited here). New rules use only eb.css's tokens, no colour literals. */

.subtabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: -0.5rem 0 1.25rem;
}

.subtabs a {
	padding: 0.25rem 0.8rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--title);
	font-size: 0.8667rem;
	font-weight: 600;
	text-decoration: none;
}

.subtabs a[aria-current='page'] {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--accent-ink);
}

/* --- Icons and shared bits -------------------------------------------------- */

.icon {
	flex: none;
	width: 2.5rem;
	height: 2.5rem;
	object-fit: contain;
	border-radius: 0.5rem;
}

.icon.small {
	width: 1.75rem;
	height: 1.75rem;
}

.icon.initials {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--neutral);
	color: var(--muted);
	font-size: 0.85rem;
	font-weight: 800;
}

.icon.small.initials {
	font-size: 0.7rem;
}

/* --- Lists and forms ------------------------------------------------------ */

.group-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin: 1.25rem 0 0.25rem;
	font-size: 1rem;
}

.group-head:first-of-type {
	margin-top: 0;
}

.icon-cell {
	width: 2.5rem;
}

.small {
	font-size: 0.8rem;
}

.tag {
	display: inline-flex;
	align-items: center;
	padding: 0.05rem 0.55rem;
	border-radius: 999px;
	background: var(--neutral);
	color: var(--text);
	font-size: 0.78rem;
	white-space: nowrap;
}

.move {
	display: inline-flex;
	gap: 0.25rem;
	white-space: nowrap;
}

.move .pill:disabled {
	opacity: 0.35;
	cursor: default;
}

.inline-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
}

.inline-form input:not([type='hidden']),
.inline-form select {
	width: auto;
	min-height: 2rem;
	padding: 0.2rem 0.5rem;
}

.inline-form .short-input {
	width: 11rem;
}

.row-actions {
	white-space: nowrap;
}

.row-actions form + form {
	margin-left: 0.35rem;
}

.small-button {
	min-height: 2rem;
	padding: 0.2rem 0.75rem;
	font-size: 0.8667rem;
}

.grid .wide {
	grid-column: span 2;
}

.end-label {
	color: var(--eyebrow);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.tag-picker {
	display: grid;
	gap: 0.5rem;
	margin: 0.75rem 0 0;
}

.picks {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

label.pick {
	flex-direction: row;
	align-items: center;
	gap: 0.45rem;
	padding: 0.3rem 0.85rem 0.3rem 0.6rem;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: var(--surface);
	font-weight: 600;
	cursor: pointer;
}

label.pick:hover {
	background: var(--surface-soft);
}

label.pick:has(input:checked) {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--accent-ink);
}

.new-tags {
	max-width: 24rem;
}

.save-bar {
	justify-content: flex-end;
	margin: 0 0 1rem;
}

.event-nav {
	margin-bottom: 0.5rem;
}

.back {
	font-size: 0.8667rem;
	font-weight: 600;
	text-decoration: none;
}

@media (max-width: 40rem) {
	.grid .wide {
		grid-column: auto;
	}
}

/* --- Icons ---------------------------------------------------------------- */

.head-tools {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.quick-filter {
	width: 13rem;
	min-height: 2rem;
}

.icon-current {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.icon-results {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
	gap: 0.4rem;
	margin-top: 0.5rem;
}

.icon-results[hidden] {
	display: none;
}

.icon-choice {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0.5rem;
	border: 1px solid var(--line);
	border-radius: 0.6rem;
	background: var(--surface);
	color: var(--title);
	font: inherit;
	font-size: 0.8rem;
	text-align: left;
	cursor: pointer;
}

.icon-choice:hover,
.icon-choice:focus-visible {
	border-color: var(--accent);
	background: var(--surface-soft);
}

.icon-choice .icon {
	width: 1.75rem;
	height: 1.75rem;
}

.icon-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.icon-grid li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

[data-search][hidden],
[data-group][hidden] {
	display: none;
}


/* --- Shortcuts list: one aligned table per dashboard, one line per shortcut ---- */

.sc-card {
	padding: 1rem 1.1rem;
}

.sc-card h2 {
	margin-bottom: 0.5rem;
}

.sc-table {
	table-layout: fixed;
}

.sc-table col.c-icon {
	width: 2.25rem;
}

.sc-table col.c-name {
	width: 26%;
}

.sc-table col.c-tags {
	width: 22%;
}

.sc-table col.c-act {
	width: 5.5rem;
}

.sc-table th,
.sc-table td {
	padding: 0.3rem 0.5rem;
	vertical-align: middle;
}

.sc-table thead th {
	padding-top: 0;
	font-size: 0.75rem;
}

.sc-table tr.sc-group th,
.sc-table tr.sc-group td {
	padding-top: 1rem;
	border-bottom: 1px solid var(--line-strong);
	color: var(--title);
	font-size: 0.9rem;
	font-weight: 700;
}

.sc-table tr.sc-group th .muted {
	font-weight: 600;
}

.sc-table tbody tr:last-child td {
	border-bottom: 0;
}

.sc-name,
.sc-url,
.sc-tags {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sc-name a {
	color: var(--title);
	font-weight: 700;
	text-decoration: none;
}

.sc-name a:hover,
.sc-name a:focus-visible {
	color: var(--link);
	text-decoration: underline;
}

.sc-url a {
	color: var(--muted);
	font-size: 0.8rem;
	text-decoration: none;
}

.sc-url a:hover,
.sc-url a:focus-visible {
	color: var(--link);
	text-decoration: underline;
}

.sc-tags .tag {
	margin-right: 0.15rem;
}

.sc-add {
	padding-block: 0.1rem;
	font-size: 0.78rem;
}

.sc-table .move .pill {
	min-width: 1.75rem;
	padding: 0.05rem 0.4rem;
}

@media (max-width: 40rem) {
	/* Phones: no link column; the name takes the room, tags wrap under nothing else. */
	.sc-table {
		table-layout: auto;
	}

	.sc-table col.c-name,
	.sc-table col.c-url,
	.sc-table col.c-tags {
		width: auto;
	}

	.sc-table th.c-url,
	.sc-table td.c-url {
		display: none;
	}

	.sc-name {
		max-width: 9rem;
	}

	.sc-tags {
		white-space: normal;
	}
}

/* --- Dashboard: tag rail + groups as columns ----------------------------------- */

.dash {
	display: flex;
	gap: 1.5rem;
	align-items: flex-start;
}

.rail {
	display: flex;
	flex: 0 0 12.5rem;
	flex-direction: column;
	gap: 1.1rem;
	position: sticky;
	top: 1rem;
}

.rail-dashboards {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.rail-dashboards a,
.facet {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.3rem 0.65rem;
	border-radius: 0.55rem;
	color: var(--title);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}

.rail-dashboards a:hover,
.facet:hover {
	background: var(--surface-soft);
}

.rail-dashboards a[aria-current='page'] {
	background: var(--accent);
	color: var(--accent-ink);
	font-weight: 700;
}

.rail-tools {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.rail-tools .quick-filter {
	width: 100%;
}

.rail-tools .pill {
	align-self: flex-start;
}

.rail-section .end-label {
	margin: 0 0 0.25rem 0.65rem;
}

.rail-section ul {
	display: flex;
	flex-direction: column;
	gap: 0.05rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.facet.on {
	background: var(--good-surface);
	color: var(--title);
}

.facet-name {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.facet-count {
	color: var(--muted);
	font-size: 0.8rem;
	font-variant-numeric: tabular-nums;
}

.dot {
	flex: none;
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 999px;
	background: var(--muted);
}

.dot.env-prod {
	background: var(--good);
}

.dot.env-staging {
	background: var(--warn-text);
}

.dot.env-other {
	border: 1px solid var(--muted);
	background: transparent;
}

.dot.dot-host {
	background: var(--muted);
}

.dot.dot-tag {
	background: var(--line-strong);
}

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

.filter-state {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin: 0 0 0.75rem;
	color: var(--muted);
	font-size: 0.8667rem;
}

.filter-state .clear {
	margin-left: auto;
	font-weight: 600;
}

.columns {
	column-gap: 0.9rem;
	column-width: 17rem;
}

.group-col {
	margin: 0 0 0.9rem;
	padding: 0.6rem 0.35rem 0.4rem;
	border: 1px solid var(--line);
	border-radius: 0.9rem;
	background: var(--surface);
	box-shadow: var(--shadow);
	break-inside: avoid;
}

.group-col h2 {
	display: flex;
	justify-content: space-between;
	margin: 0 0.5rem 0.3rem;
	color: var(--eyebrow);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.group-col h2 .count {
	color: var(--muted);
	font-weight: 600;
}

.group-col ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.row {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	min-height: 2rem;
	padding: 0 0.5rem;
	border-radius: 0.5rem;
	color: var(--title);
	text-decoration: none;
}

.row:hover,
.row:focus-visible {
	background: var(--surface-soft);
}

.icon.row-icon {
	width: 1.3rem;
	height: 1.3rem;
	border-radius: 0.3rem;
}

.icon.row-icon.initials {
	font-size: 0.6rem;
}

.row-name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	font-size: 0.9rem;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.env,
.host {
	flex: none;
	padding: 0 0.4rem;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1.1rem;
	white-space: nowrap;
}

.env.env-prod {
	background: var(--good-surface);
	color: var(--good);
}

.env.env-staging {
	background: var(--warn-surface);
	color: var(--warn-text);
}

.env.env-other {
	border: 1px solid var(--line-strong);
	color: var(--muted);
}

.host {
	background: var(--neutral);
	color: var(--text);
}

@media (max-width: 40rem) {
	/* Phones: the rail becomes rows of chips above the lists. */
	.dash {
		flex-direction: column;
		align-items: stretch;
		gap: 0.75rem;
	}

	.rail {
		position: static;
		flex-basis: auto;
		width: 100%;
		gap: 0.6rem;
	}

	.rail-dashboards,
	.rail-section ul {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 0.3rem;
	}

	.rail-section .end-label {
		margin-left: 0;
	}

	.rail-dashboards a,
	.facet {
		border: 1px solid var(--line);
		border-radius: 999px;
		padding: 0.15rem 0.6rem;
		font-size: 0.8rem;
	}

	.rail-tools {
		flex-direction: row;
	}
}
