/* ==========================================================================
   VomeHome Portal – Dark Theme (adapted from VomeSync)
   ========================================================================== */

/* ── CSS Variables ──────────────────────────────────────────────────────── */
/* Palette is "deep cool black with warm accents".  The orange primary
 * stayed but the backgrounds shifted from neutral greys (#121212/#1E1E1E)
 * toward a slightly cooler near-black; without that shift the
 * orange-on-warm-grey combination read as "brown" overall.  The
 * ambient body gradient (defined under ``body { … }`` below) adds a
 * faint amber→teal glow so the page doesn't feel like a flat slab. */
:root {
	--primary: #FF9800;
	--primary-dark: #E68A00;
	--secondary: #FFB74D;
	--accent: #10B981;
	--accent-bright: #34D399;
	--success: #22c55e;
	--warning: #f59e0b;
	--danger: #ef4444;
	--info: #10B981;

	--bg-primary: #0a0b0e;
	--bg-secondary: #14161c;
	--bg-tertiary: #1c1f27;

	--text-primary: #E8E8EC;
	--text-secondary: #B5B7C0;
	--text-muted: #7A7C85;

	--border: #262833;
	--border-light: #353846;

	--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
	--shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
	--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
	--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

	--radius-sm: 0.375rem;
	--radius: 0.5rem;
	--radius-lg: 0.75rem;
	--radius-xl: 1rem;

	--transition: all 0.2s ease;
}

/* ── Bootstrap variable overrides (dark palette) ────────────────────── */
:root,
[data-bs-theme="dark"] {
	--bs-body-bg: var(--bg-primary);
	--bs-body-color: var(--text-primary);
	--bs-border-color: var(--border);
	--bs-primary-rgb: 255, 152, 0;
	--bs-secondary-rgb: 255, 183, 77;
	--bs-success-rgb: 34, 197, 94;
	--bs-danger-rgb: 239, 68, 68;
	--bs-warning-rgb: 245, 158, 11;
	--bs-info-rgb: 16, 185, 129;
	--bs-link-color-rgb: 255, 152, 0;
	--bs-link-hover-color-rgb: 16, 185, 129;
}

/* ── Reset & Global ─────────────────────────────────────────────────── */
body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	/* Faint, fixed-position radial highlights: amber from the top-left
	 * (mimics the navbar / hero CTA), teal from the bottom-right (echoes
	 * the accent colour).  Both are very low-opacity so the page still
	 * reads as "dark mode" — they just stop it from looking like a flat
	 * brown slab on big monitors. */
	background:
		radial-gradient(1100px 600px at 12% -10%, rgba(255, 152, 0, 0.06), transparent 60%),
		radial-gradient(900px 500px at 100% 110%, rgba(16, 185, 129, 0.05), transparent 55%),
		var(--bg-primary);
	background-attachment: fixed;
	color: var(--text-primary);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	padding-top: 72px;
	padding-bottom: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

body > .container.mt-4 {
	flex: 1;
}

a {
	color: var(--primary);
	text-decoration: none;
	transition: color 0.15s ease;
}
a:hover {
	color: var(--accent);
}

h1, h2, h3, h4, h5, h6 {
	color: var(--text-primary);
}

.lead {
	color: var(--text-secondary);
}

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

hr {
	border-color: var(--border);
	opacity: 0.5;
}

code {
	color: var(--accent);
	background: rgba(16, 185, 129, 0.1);
	padding: 0.15em 0.4em;
	border-radius: var(--radius-sm);
	font-size: 0.875em;
}

pre {
	background: var(--bg-primary);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1rem 1.25rem;
	color: var(--text-secondary);
	font-size: 0.85rem;
	line-height: 1.6;
	overflow-x: auto;
	margin-bottom: 1rem;
}

pre code {
	background: transparent;
	padding: 0;
	color: inherit;
	font-size: inherit;
	border-radius: 0;
}

/* ── Navbar ──────────────────────────────────────────────────────────── */
.vome-navbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1030;
	background: rgba(10, 11, 14, 0.85);
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	border-bottom: 1px solid var(--border);
	height: 64px;
}

.vome-navbar .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
}

.vome-nav-brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 700;
	font-size: 1.15rem;
	color: var(--text-primary) !important;
	text-decoration: none !important;
}

.vome-nav-brand:hover {
	color: var(--text-primary) !important;
}

.vome-nav-brand svg {
	color: var(--primary);
}

.vome-nav-links {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.vome-nav-links a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.45rem 0.85rem;
	border-radius: var(--radius);
	color: var(--text-secondary);
	font-size: 0.9rem;
	font-weight: 500;
	transition: var(--transition);
	text-decoration: none;
	white-space: nowrap;
}

.vome-nav-links a:hover,
.vome-nav-links a.active {
	color: var(--text-primary);
	background: rgba(255, 255, 255, 0.06);
}

.vome-nav-links .nav-cta {
	background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
	color: #fff !important;
	border: 1px solid rgba(255, 255, 255, 0.1);
	padding: 0.45rem 1rem;
	font-weight: 600;
}

.vome-nav-links .nav-cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
	background: linear-gradient(135deg, var(--primary-dark) 0%, #CC7A00 100%);
}

/* ── Burger-only navbar (mobile *and* desktop). The right-hand side has
   a single CTA + a burger that opens a dropdown panel with the rest of
   the navigation, including cross-product links (Vome, VomeSync) and
   utility actions (HomeLink, Alerts, Logout).  The dropdown is
   position-absolute so it doesn't displace page content when opened.  */
.vome-nav-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.vome-nav-cta {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 1rem;
	border-radius: var(--radius);
	background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
	color: #fff !important;
	border: 1px solid rgba(255, 255, 255, 0.1);
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
	transition: var(--transition);
}

.vome-nav-cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
	background: linear-gradient(135deg, var(--primary-dark) 0%, #CC7A00 100%);
	color: #fff !important;
}

.vome-nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	width: 38px;
	height: 38px;
	color: var(--text-secondary);
	cursor: pointer;
	font-size: 1.2rem;
	transition: var(--transition);
}

.vome-nav-toggle:hover {
	color: var(--text-primary);
	border-color: var(--text-secondary);
}

.vome-nav-menu {
	position: absolute;
	top: 64px;
	right: 1rem;
	min-width: 240px;
	background: rgba(18, 18, 18, 0.97);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
	padding: 0.5rem;
	z-index: 1031;
}

.vome-nav-menu[hidden] {
	display: none;
}

.vome-nav-menu .vome-nav-links {
	flex-direction: column;
	align-items: stretch;
	gap: 0.15rem;
}

.vome-nav-menu .vome-nav-links a {
	display: flex;
	align-items: center;
	padding: 0.55rem 0.8rem;
	border-radius: var(--radius-sm);
}

.vome-nav-menu .vome-nav-links a .ms-auto {
	margin-left: auto;
}

.vome-nav-divider {
	height: 1px;
	background: var(--border);
	margin: 0.35rem 0.25rem;
	list-style: none;
}

@media (max-width: 480px) {
	/* Collapse the CTA label so the bar stays single-line on tiny
	   screens — the icon alone still conveys intent. */
	.vome-nav-cta-text {
		display: none;
	}
	.vome-nav-cta {
		padding: 0.45rem 0.7rem;
	}
	.vome-nav-menu {
		right: 0.5rem;
		left: 0.5rem;
		min-width: 0;
	}
}

/* ── Cards ───────────────────────────────────────────────────────────── */
.card {
	background: var(--bg-secondary);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	color: var(--text-primary);
	transition: var(--transition);
}

.card:hover {
	box-shadow: var(--shadow-lg);
}

.card-header {
	background: var(--bg-tertiary) !important;
	border-bottom: 1px solid var(--border);
	color: var(--text-primary) !important;
	font-weight: 600;
	padding: 1rem 1.25rem;
}

/* Coloured headers → subtle tinted glass */
.card-header.bg-primary {
	background: linear-gradient(135deg, rgba(255, 152, 0, 0.2), rgba(255, 183, 77, 0.12)) !important;
	border-bottom-color: rgba(255, 152, 0, 0.2);
}
.card-header.bg-success {
	background: rgba(34, 197, 94, 0.15) !important;
	border-bottom-color: rgba(34, 197, 94, 0.2);
}
.card-header.bg-dark {
	background: var(--bg-tertiary) !important;
	border-bottom-color: var(--border);
}
.card-header.bg-info {
	background: rgba(16, 185, 129, 0.15) !important;
	border-bottom-color: rgba(16, 185, 129, 0.2);
}
.card-header.bg-secondary {
	background: rgba(255, 183, 77, 0.12) !important;
	border-bottom-color: rgba(255, 183, 77, 0.2);
}
.card-header.bg-danger {
	background: rgba(239, 68, 68, 0.15) !important;
	border-bottom-color: rgba(239, 68, 68, 0.2);
}
.card-header.bg-warning {
	background: rgba(245, 158, 11, 0.15) !important;
	border-bottom-color: rgba(245, 158, 11, 0.2);
}

.card-body {
	padding: 1.25rem;
	color: var(--text-secondary);
}

.card-footer {
	background: var(--bg-tertiary);
	border-top: 1px solid var(--border);
	color: var(--text-secondary);
}

/* ── List Group ──────────────────────────────────────────────────────── */
.list-group-item {
	background: var(--bg-secondary);
	border-color: var(--border);
	color: var(--text-primary);
}

.list-group-item:hover,
.list-group-item-action:hover {
	background: var(--bg-tertiary);
	color: var(--text-primary);
	border-color: var(--border-light);
}

.list-group-item-action:focus {
	background: var(--bg-tertiary);
	color: var(--text-primary);
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
	font-weight: 600;
	font-size: 0.9375rem;
	border-radius: var(--radius);
	transition: var(--transition);
	line-height: 1.5;
}

.btn-primary {
	background: linear-gradient(135deg, var(--primary) 0%, #E68A00 100%);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #fff;
	box-shadow: 0 4px 6px -1px rgba(230, 138, 0, 0.2);
}
.btn-primary:hover, .btn-primary:focus {
	background: linear-gradient(135deg, var(--primary-dark) 0%, #CC7A00 100%);
	transform: translateY(-1px);
	box-shadow: 0 6px 12px -2px rgba(230, 138, 0, 0.3);
	color: #fff;
}
.btn-check:checked + .btn-primary,
.btn-primary:active {
	background: linear-gradient(135deg, #CC7A00 0%, #B36B00 100%);
}

.btn-success {
	background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #fff;
	box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.2);
}
.btn-success:hover, .btn-success:focus {
	background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
	transform: translateY(-1px);
	color: #fff;
}

.btn-dark {
	background: var(--bg-tertiary);
	border: 1px solid var(--border-light);
	color: var(--text-primary);
}
.btn-dark:hover, .btn-dark:focus {
	background: var(--bg-secondary);
	border-color: var(--primary);
	color: var(--text-primary);
}

.btn-info {
	background: linear-gradient(135deg, var(--accent) 0%, #059669 100%);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #fff;
}
.btn-info:hover {
	transform: translateY(-1px);
	color: #fff;
}

.btn-danger {
	background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #fff;
}
.btn-danger:hover {
	background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
	transform: translateY(-1px);
	color: #fff;
}

.btn-secondary {
	background: var(--bg-tertiary);
	border: 1px solid var(--border-light);
	color: var(--text-primary);
}
.btn-secondary:hover {
	background: var(--bg-secondary);
	border-color: var(--primary);
	color: var(--text-primary);
}

.btn-warning {
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #fff;
}
.btn-warning:hover {
	color: #fff;
}

/* Outline buttons */
.btn-outline-primary {
	color: var(--primary);
	border-color: var(--primary);
	background: transparent;
}
.btn-outline-primary:hover {
	background: rgba(255, 152, 0, 0.12);
	color: #FFE0B2;
	border-color: var(--primary);
}

.btn-outline-secondary {
	color: var(--text-secondary);
	border-color: var(--border-light);
	background: transparent;
}
.btn-outline-secondary:hover {
	background: var(--bg-tertiary);
	color: var(--text-primary);
	border-color: var(--border-light);
}

.btn-outline-dark {
	color: var(--text-secondary);
	border-color: var(--border);
	background: transparent;
}
.btn-outline-dark:hover {
	background: var(--bg-tertiary);
	color: var(--text-primary);
	border-color: var(--border-light);
}

.btn-outline-danger {
	color: var(--danger);
	border-color: var(--danger);
	background: transparent;
}
.btn-outline-danger:hover {
	background: rgba(239, 68, 68, 0.12);
	color: #fca5a5;
	border-color: var(--danger);
}

.btn-outline-light {
	color: var(--text-primary);
	border-color: var(--border-light);
	background: transparent;
}
.btn-outline-light:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	border-color: var(--text-secondary);
}

.btn-outline-warning {
	color: var(--warning);
	border-color: var(--warning);
	background: transparent;
}
.btn-outline-warning:hover {
	background: rgba(245, 158, 11, 0.12);
	color: #fcd34d;
	border-color: var(--warning);
}

.btn-outline-info {
	color: var(--accent);
	border-color: var(--accent);
	background: transparent;
}
.btn-outline-info:hover {
	background: rgba(16, 185, 129, 0.12);
	color: #6EE7B7;
	border-color: var(--accent);
}

.btn-outline-success {
	color: var(--success);
	border-color: var(--success);
	background: transparent;
}
.btn-outline-success:hover {
	background: rgba(34, 197, 94, 0.12);
	color: #86efac;
	border-color: var(--success);
}

/* ── Badges ──────────────────────────────────────────────────────────── */
.badge {
	font-weight: 600;
	font-size: 0.75rem;
	letter-spacing: 0.03em;
	border-radius: 9999px;
	padding: 0.3em 0.7em;
}

.badge.bg-success {
	background: rgba(34, 197, 94, 0.15) !important;
	color: #86efac !important;
	border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge.bg-danger {
	background: rgba(239, 68, 68, 0.15) !important;
	color: #fca5a5 !important;
	border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge.bg-warning {
	background: rgba(245, 158, 11, 0.15) !important;
	color: #fcd34d !important;
	border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge.bg-info {
	background: rgba(16, 185, 129, 0.15) !important;
	color: #6EE7B7 !important;
	border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge.bg-secondary {
	background: rgba(255, 183, 77, 0.15) !important;
	color: #FFE0B2 !important;
	border: 1px solid rgba(255, 183, 77, 0.3);
}

/* ── Coloured stat cards (admin dashboard etc.) ─────────────────────── */
.card.bg-dark {
	background: var(--bg-tertiary) !important;
	border-color: var(--border);
}
.card.bg-success {
	background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.35)) !important;
	border-color: rgba(34, 197, 94, 0.3);
	color: #dcfce7;
}
.card.bg-danger {
	background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.35)) !important;
	border-color: rgba(239, 68, 68, 0.3);
	color: #fee2e2;
}
.card.bg-warning {
	background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.35)) !important;
	border-color: rgba(245, 158, 11, 0.3);
	color: #fef3c7;
}
.card.bg-secondary {
	background: linear-gradient(135deg, rgba(255, 183, 77, 0.15), rgba(230, 138, 0, 0.25)) !important;
	border-color: rgba(255, 183, 77, 0.3);
	color: #FFF3E0;
}
.card.bg-success .card-body,
.card.bg-danger .card-body,
.card.bg-warning .card-body,
.card.bg-secondary .card-body {
	color: inherit;
}

/* ── Alerts ──────────────────────────────────────────────────────────── */
.alert {
	border-radius: var(--radius);
	border: 1px solid;
	font-size: 0.9375rem;
}

.alert-success {
	background: rgba(34, 197, 94, 0.1);
	border-color: rgba(34, 197, 94, 0.25);
	color: #86efac;
}

.alert-danger {
	background: rgba(239, 68, 68, 0.1);
	border-color: rgba(239, 68, 68, 0.25);
	color: #fca5a5;
}

.alert-warning {
	background: rgba(245, 158, 11, 0.1);
	border-color: rgba(245, 158, 11, 0.25);
	color: #fcd34d;
}

.alert-info {
	background: rgba(255, 152, 0, 0.1);
	border-color: rgba(255, 152, 0, 0.25);
	color: #FFE0B2;
}

/* ── Forms ────────────────────────────────────────────────────────────── */
.form-control,
.form-select {
	background: var(--bg-primary);
	border: 1px solid var(--border);
	color: var(--text-primary);
	border-radius: var(--radius);
	padding: 0.6rem 0.85rem;
	transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
	background: var(--bg-primary);
	border-color: var(--primary);
	color: var(--text-primary);
	box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.15);
}

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

.form-label {
	color: var(--text-secondary);
	font-weight: 500;
	font-size: 0.9rem;
}

.form-text {
	color: var(--text-muted);
	font-size: 0.825rem;
}

.form-check-input {
	background-color: var(--bg-tertiary);
	border-color: var(--border-light);
}

.form-check-input:checked {
	background-color: var(--primary);
	border-color: var(--primary);
}

.form-check-label {
	color: var(--text-secondary);
}

/* ── Input Group ─────────────────────────────────────────────────────── */
.input-group .form-control {
	border-color: var(--border);
}

.input-group .form-control:focus {
	border-color: var(--primary);
	z-index: 3;
}

.input-group-text {
	background: var(--bg-tertiary);
	border-color: var(--border);
	color: var(--text-secondary);
}

/* ── Tables ───────────────────────────────────────────────────────────── */
.table {
	color: var(--text-primary);
	border-color: var(--border);
}

.table > thead {
	border-color: var(--border);
}

.table > thead > tr > th {
	background: var(--bg-tertiary);
	color: var(--text-secondary);
	font-weight: 600;
	font-size: 0.85rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	border-color: var(--border);
}

.table > tbody > tr > td {
	border-color: var(--border);
	color: var(--text-secondary);
	vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
	background: rgba(255, 255, 255, 0.02);
}

.table-hover > tbody > tr:hover > td {
	background: rgba(255, 152, 0, 0.05);
}

.table-sm > :not(caption) > * > * {
	padding: 0.4rem 0.5rem;
}

/* Override text-dark so it stays legible on dark backgrounds */
.card-header .text-dark,
.modal-header .text-dark {
	color: var(--text-primary) !important;
}

/* ── Modals ───────────────────────────────────────────────────────────── */
.modal-content {
	background: var(--bg-secondary);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	color: var(--text-primary);
}

.modal-header {
	border-bottom: 1px solid var(--border);
}

.modal-header.bg-danger {
	background: rgba(239, 68, 68, 0.15) !important;
	border-bottom-color: rgba(239, 68, 68, 0.2);
}

.modal-header.bg-warning {
	background: rgba(245, 158, 11, 0.15) !important;
	border-bottom-color: rgba(245, 158, 11, 0.2);
	color: var(--text-primary) !important;
}

.modal-footer {
	border-top: 1px solid var(--border);
}

.btn-close {
	filter: invert(1) grayscale(100%) brightness(200%);
}

/* ── Dropdown ─────────────────────────────────────────────────────────── */
.dropdown-menu {
	background: var(--bg-secondary);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
}

.dropdown-item {
	color: var(--text-secondary);
	padding: 0.5rem 1rem;
	transition: var(--transition);
}

.dropdown-item:hover, .dropdown-item:focus {
	background: var(--bg-tertiary);
	color: var(--text-primary);
}

.dropdown-header {
	color: var(--text-muted) !important;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.dropdown-divider {
	border-color: var(--border);
}

/* ── Blockquotes ──────────────────────────────────────────────────────── */
.blockquote {
	border-left: 3px solid var(--primary);
	padding-left: 1rem;
	margin-bottom: 1.25rem;
	color: var(--text-secondary);
	font-style: italic;
}

.blockquote-footer {
	color: var(--text-muted);
	font-size: 0.85rem;
	margin-top: 0.25rem;
}

.blockquote-footer::before {
	content: "\2014\00A0";
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.vome-footer {
	background: var(--bg-secondary);
	border-top: 1px solid var(--border);
	padding: 2rem 0 1.25rem;
	margin-top: auto;
}

.vome-footer .footer-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.vome-footer .footer-copy {
	color: var(--text-muted);
	font-size: 0.875rem;
	margin: 0;
}

.vome-footer .footer-links {
	display: flex;
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.vome-footer .footer-links a {
	color: var(--text-muted);
	font-size: 0.875rem;
	transition: var(--transition);
}

.vome-footer .footer-links a:hover {
	color: var(--primary);
}

/* ── Flash Messages ──────────────────────────────────────────────────── */
.alert-dismissible .btn-close {
	filter: invert(1) grayscale(100%) brightness(200%);
}

/* ── Utility: gradient text ──────────────────────────────────────────── */
.gradient-text {
	background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* ── Pagination ──────────────────────────────────────────────────────── */
.page-link {
	background: var(--bg-secondary);
	border-color: var(--border);
	color: var(--text-secondary);
}

.page-link:hover {
	background: var(--bg-tertiary);
	border-color: var(--border-light);
	color: var(--text-primary);
}

.page-item.active .page-link {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}

.page-item.disabled .page-link {
	background: var(--bg-primary);
	border-color: var(--border);
	color: var(--text-muted);
}

/* ── Breadcrumb ──────────────────────────────────────────────────────── */
.breadcrumb {
	background: transparent;
}

.breadcrumb-item a {
	color: var(--primary);
}

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

.breadcrumb-item + .breadcrumb-item::before {
	color: var(--text-muted);
}

/* ── Responsive Tweaks ───────────────────────────────────────────────── */
@media (max-width: 768px) {
	body {
		padding-top: 64px;
	}

	h1 {
		font-size: 1.75rem;
	}

	.vome-footer .footer-inner {
		flex-direction: column;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.btn-group {
		flex-direction: column;
		width: 100%;
	}
	.btn-group .btn {
		border-radius: var(--radius) !important;
		margin-bottom: 0.25rem;
	}
}

/* ── Signup Page ─────────────────────────────────────────────────────── */
.signup-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2.5rem;
	align-items: start;
	max-width: 960px;
	margin: 2rem auto;
}

.signup-value {
	padding: 2rem 0;
}

.signup-value h1 {
	font-size: 2rem;
	font-weight: 800;
	line-height: 1.2;
	margin-bottom: 0.5rem;
}

.signup-value .tagline {
	color: var(--text-muted);
	font-size: 1.05rem;
	margin-bottom: 2rem;
}

.value-list {
	list-style: none;
	padding: 0;
	margin: 0 0 2.5rem;
}

.value-list li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.6rem 0;
	color: var(--text-secondary);
	font-size: 0.95rem;
}

.value-list li .val-icon {
	width: 36px;
	height: 36px;
	border-radius: var(--radius);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 1rem;
}

.value-list li .val-icon.blue { background: rgba(255,152,0,0.12); color: var(--primary); }
.value-list li .val-icon.green { background: rgba(34,197,94,0.12); color: var(--success); }
.value-list li .val-icon.cyan { background: rgba(16,185,129,0.12); color: var(--accent); }
.value-list li .val-icon.purple { background: rgba(255,183,77,0.12); color: var(--secondary); }

.value-list li strong {
	color: var(--text-primary);
}

.easy-steps {
	background: var(--bg-secondary);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.25rem 1.5rem;
}

.easy-steps h4 {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-muted);
	margin-bottom: 1rem;
}

.step-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0;
}

.step-row:not(:last-child) {
	border-bottom: 1px solid var(--border);
}

.step-num {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--primary), var(--secondary));
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.step-row span:last-child {
	color: var(--text-secondary);
	font-size: 0.9rem;
}

.signup-form-card {
	background: var(--bg-secondary);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	padding: 2rem;
	box-shadow: var(--shadow-lg);
}

.signup-form-card h2 {
	font-size: 1.35rem;
	font-weight: 700;
	margin-bottom: 0.35rem;
}

.signup-form-card .subtitle {
	color: var(--text-muted);
	font-size: 0.9rem;
	margin-bottom: 1.5rem;
}

.signup-social {
	display: flex;
	gap: 0.75rem;
	margin-top: 1rem;
}

.signup-social a {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.55rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text-secondary);
	font-size: 0.9rem;
	font-weight: 500;
	transition: var(--transition);
}

.signup-social a:hover {
	border-color: var(--primary);
	background: rgba(255,152,0,0.06);
	color: var(--text-primary);
}

.signup-divider {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 1.25rem 0;
	color: var(--text-muted);
	font-size: 0.8rem;
}

.signup-divider::before,
.signup-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--border);
}

.signup-footer {
	text-align: center;
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--border);
	color: var(--text-muted);
	font-size: 0.9rem;
}

.signup-footer a {
	font-weight: 600;
}

@media (max-width: 768px) {
	.signup-wrapper {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
	.signup-value {
		padding: 0;
		text-align: center;
	}
	.value-list li {
		text-align: left;
	}
}

/* ── Check-Email Page ────────────────────────────────────────────────── */
.check-email-card {
	max-width: 520px;
	margin: 3rem auto;
	text-align: center;
}

.check-email-card .email-icon {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: rgba(255,152,0,0.12);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 1.5rem;
	color: var(--primary);
	font-size: 2rem;
}

.next-steps-mini {
	text-align: left;
	background: var(--bg-tertiary);
	border-radius: var(--radius);
	padding: 1.25rem;
	margin-top: 1.5rem;
}

.next-steps-mini h5 {
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-muted);
	margin-bottom: 0.75rem;
}

.next-steps-mini ol {
	padding-left: 1.25rem;
	margin: 0;
}

.next-steps-mini li {
	color: var(--text-secondary);
	font-size: 0.9rem;
	padding: 0.25rem 0;
}

/* ── Onboarding (Dashboard) ──────────────────────────────────────────── */
.onboarding-hero {
	background:
		radial-gradient(700px 240px at 0% 0%, rgba(255,152,0,0.10), transparent 60%),
		linear-gradient(135deg, rgba(16,185,129,0.05), rgba(255,152,0,0.04));
	border: 1px solid var(--border-light);
	border-radius: var(--radius-xl);
	padding: 2.5rem 2rem;
	text-align: center;
	margin-bottom: 2rem;
}

.onboarding-hero h2 {
	font-weight: 800;
	margin-bottom: 0.5rem;
}

.onboarding-hero p {
	color: var(--text-secondary);
	max-width: 500px;
	margin: 0 auto 2rem;
}

.onboarding-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	max-width: 700px;
	margin: 0 auto;
}

.ob-step {
	background: var(--bg-secondary);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.25rem;
	text-align: center;
	position: relative;
}

.ob-step.completed {
	border-color: var(--success);
	background: rgba(34,197,94,0.06);
}

.ob-step.current {
	border-color: var(--primary);
	box-shadow: 0 0 20px rgba(255,152,0,0.1);
}

.ob-step .ob-num {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--bg-tertiary);
	color: var(--text-muted);
	font-weight: 700;
	font-size: 0.85rem;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 0.75rem;
}

.ob-step.completed .ob-num {
	background: var(--success);
	color: #fff;
}

.ob-step.current .ob-num {
	background: linear-gradient(135deg, var(--primary), var(--secondary));
	color: #fff;
}

.ob-step h5 {
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.ob-step p {
	font-size: 0.8rem;
	color: var(--text-muted);
	margin: 0;
}

/* ── HomeLink Section Cards ──────────────────────────────────────────── */
.homelink-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.homelink-header .hl-badge {
	background: linear-gradient(135deg, var(--accent), #059669);
	color: #fff;
	font-size: 0.65rem;
	font-weight: 700;
	padding: 0.2em 0.6em;
	border-radius: 9999px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* ── Platform Tabs (peer configs) ────────────────────────────────────── */
.platform-tabs {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}

.platform-tab {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	padding: 0.75rem 1.25rem;
	background: var(--bg-tertiary);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	color: var(--text-muted);
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	transition: var(--transition);
	min-width: 90px;
}

.platform-tab i {
	font-size: 1.35rem;
}

.platform-tab:hover {
	border-color: var(--primary);
	color: var(--text-primary);
}

.platform-tab.active {
	border-color: var(--primary);
	background: rgba(255,152,0,0.1);
	color: var(--primary);
}

.platform-content {
	display: none;
}

.platform-content.active {
	display: block;
}

.setup-instruction {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	padding: 0.75rem 0;
}

.setup-instruction:not(:last-child) {
	border-bottom: 1px solid var(--border);
}

.setup-instruction .inst-num {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(255,152,0,0.12);
	color: var(--primary);
	font-size: 0.8rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.setup-instruction p {
	margin: 0;
	color: var(--text-secondary);
	font-size: 0.9rem;
	line-height: 1.5;
}

.setup-instruction a {
	font-weight: 600;
}

.qr-prominent {
	background: #fff;
	border-radius: var(--radius-lg);
	padding: 1rem;
	display: inline-block;
	margin: 1rem 0;
}

.qr-prominent img.qr-img,
.qr-prominent img {
	/* Bumped from 180px → 240px so phone cameras can lock on from a
	   reasonable distance.  Anything bigger than ~260 starts to crowd
	   the slot card on tablet-portrait viewports. */
	width: 240px;
	height: 240px;
	cursor: zoom-in;
	transition: transform 120ms ease;
}

.qr-prominent img.qr-img:hover,
.qr-prominent img.qr-img:focus {
	transform: scale(1.03);
	outline: 2px solid var(--vome-primary, #f7931e);
	outline-offset: 2px;
}

.qr-zoom-hint {
	display: block;
	font-size: 0.78rem;
	letter-spacing: 0.02em;
}

/* ── QR lightbox (click-to-enlarge) ──────────────────────────────────── */
.qr-lightbox[hidden] {
	display: none !important;
}
.qr-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(15, 18, 28, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2050; /* above Bootstrap modal-backdrop (1040) */
	opacity: 0;
	pointer-events: none;
	transition: opacity 180ms ease;
	cursor: zoom-out;
	padding: 1.5rem;
}

.qr-lightbox.open {
	opacity: 1;
	pointer-events: auto;
}

.qr-lightbox-inner {
	text-align: center;
	max-width: min(90vw, 90vh);
}

.qr-lightbox-inner img {
	max-width: min(85vw, 85vh);
	max-height: min(85vw, 85vh);
	width: auto;
	height: auto;
	background: #fff;
	border-radius: var(--radius-lg, 12px);
	padding: 1rem;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
	/* Critical for QR scannability — keep the bitmap crisp instead of
	   smoothing it into mush at 2-3× upscale. */
	image-rendering: pixelated;
	image-rendering: -moz-crisp-edges;
	image-rendering: crisp-edges;
}

.qr-lightbox-close {
	position: absolute;
	top: 1rem;
	right: 1.5rem;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.qr-lightbox-close:hover,
.qr-lightbox-close:focus {
	background: rgba(255, 255, 255, 0.3);
}

body.qr-lightbox-open {
	overflow: hidden;
}

/* ── Config download cards ───────────────────────────────────────────── */
.device-config-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 1rem;
}

.device-config-card {
	background: var(--bg-tertiary);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.25rem;
	text-align: center;
	transition: var(--transition);
}

.device-config-card:hover {
	border-color: var(--primary);
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

.device-config-card .dc-icon {
	font-size: 1.5rem;
	color: var(--primary);
	margin-bottom: 0.5rem;
}

.device-config-card h6 {
	font-size: 0.85rem;
	margin-bottom: 0.75rem;
}

.device-config-card .btn {
	font-size: 0.8rem;
	padding: 0.35rem 0.75rem;
}

/* ── Subnets page improvements ───────────────────────────────────────── */
.subnet-explainer {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
	margin: 1.5rem 0;
}

.subnet-example {
	background: var(--bg-tertiary);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1rem;
}

.subnet-example code {
	display: block;
	font-size: 0.95rem;
	margin-bottom: 0.35rem;
}

.subnet-example .desc {
	color: var(--text-muted);
	font-size: 0.8rem;
}

/* ── Tile system (dashboard + server detail) ───────────────────────────
   "Big square" cards in the spirit of a Home Assistant welcome view.
   One concept per tile, glanceable status at top-right, primary actions
   sit directly on the tile so users rarely need to drill in.            */

.tile-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.tile-grid.tile-grid-wide {
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tile-grid.tile-grid-two {
	grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.tile {
	position: relative;
	background: var(--bg-secondary);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.25rem 1.25rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.tile.tile-interactive:hover {
	border-color: var(--primary);
	transform: translateY(-1px);
	box-shadow: var(--shadow-lg);
	cursor: pointer;
}

.tile-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.6rem;
}

.tile-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	color: var(--text-primary);
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.tile-title i.bi {
	color: var(--primary);
	font-size: 1.1rem;
}

.tile-value {
	font-size: 1.55rem;
	font-weight: 800;
	color: var(--text-primary);
	line-height: 1.15;
}

.tile-value small {
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--text-muted);
	margin-left: 0.25rem;
}

.tile-sub {
	font-size: 0.85rem;
	color: var(--text-muted);
	margin: 0;
	line-height: 1.35;
}

.tile-foot {
	margin-top: auto;
	padding-top: 0.6rem;
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

/* Tile status pill (top right) */
.tile-status {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.25em 0.7em;
	border-radius: 9999px;
}
.tile-status .dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}
/* tile-status palette is intentionally tied to the brand: ok=green,
   warn=amber, bad=red, muted=grey, busy=primary-orange (transitional
   state — we don't introduce a cyan/blue just for "Starting" because
   it would add a 6th colour family to an otherwise warm theme). */
.tile-status.ok { background: rgba(34,197,94,0.12); color: var(--success); }
.tile-status.warn { background: rgba(245,158,11,0.12); color: var(--warning); }
.tile-status.bad { background: rgba(220,53,69,0.14); color: #ff7d8a; }
.tile-status.muted { background: rgba(180,180,180,0.10); color: var(--text-muted); }
.tile-status.busy { background: rgba(255,152,0,0.12); color: var(--primary); }

/* Bigger "server tile" — primary card on the dashboard. */
.tile-server {
	padding: 1.5rem 1.25rem 1.25rem;
}

.tile-server .tile-title { font-size: 1.25rem; }

/* The clickable head area (status pill + meta line) — anywhere here
   toggles the expanded panel.  Buttons in `.tile-actions` are
   excluded by the click handler so "Manage" still navigates. */
.tile-server-head {
	cursor: pointer;
	border-radius: var(--radius);
	margin: -0.25rem -0.25rem 0;
	padding: 0.25rem;
	transition: background-color .15s ease;
}
.tile-server-head:hover {
	background: rgba(255,152,0,0.04);
}
.tile-server-head:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 1px;
}

/* Server-tile primary actions — natural-width buttons sit side-by-side,
   wrapping when there isn't space.  The "stretched to full width"
   look was confusing on the dashboard because the buttons all read
   the same; users couldn't tell which was the primary CTA.  Buttons
   here keep their natural width and the full-width "Manage this
   server" CTA lives inside the expanded detail panel instead. */
.tile-actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-top: 0.5rem;
}

.tile-actions .btn {
	white-space: nowrap;
}

/* Equal-width grid action row — used on the server detail page where
   the Restart button can swap text mid-flight.  ``auto-fit`` keeps
   every column identical so the row never reflows.  Not used on the
   dashboard tile (see ``.tile-actions`` above for that). */
.tile-actions-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0.5rem;
}
.tile-actions-grid .btn {
	width: 100%;
	min-width: 0;
	text-align: center;
}

/* ── Expanded server-detail panel on the dashboard ─────────────────
   "Snazzy but informative": a strip of status badges across the top,
   resource bars (HA Core CPU / RAM), small donut tiles for app
   count / HAOS / plan, an update chips row, then a full-width
   Manage button at the bottom. */
.dash-detail {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--border, rgba(255,255,255,.06));
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.dash-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.dash-badges .tile-status {
	font-size: 0.78rem;
	padding: 0.32rem 0.7rem;
	font-weight: 500;
}

.dash-bars {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0.85rem;
}

.dash-stat {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.dash-stat-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 0.85rem;
}

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

.dash-stat-value {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}

.dash-stat-bar {
	height: 8px;
	background: rgba(255,255,255,0.06);
	border-radius: 4px;
	overflow: hidden;
}

.dash-stat-fill {
	height: 100%;
	border-radius: 4px;
	transition: width .4s ease;
}

.dash-donuts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0.65rem;
}

.dash-donut {
	background: rgba(255,255,255,0.03);
	border: 1px solid var(--border, rgba(255,255,255,.06));
	border-radius: 14px;
	padding: 0.7rem;
	display: grid;
	grid-template-columns: 36px 1fr;
	align-items: center;
	gap: 0.6rem;
	color: var(--primary);
}

.dash-donut-svg {
	width: 36px;
	height: 36px;
}

.dash-donut-text {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
	color: var(--text);
}

.dash-donut-text strong {
	font-size: 1.05rem;
	font-variant-numeric: tabular-nums;
}

.dash-donut-text small {
	font-size: 0.72rem;
	color: var(--text-muted);
	margin-top: 1px;
}

.dash-donut-sub {
	grid-column: 1 / -1;
	font-size: 0.72rem;
	color: var(--text-muted);
	margin-top: -0.2rem;
}

.dash-updates {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	align-items: center;
}

.dash-update-chip {
	background: rgba(245,158,11,0.12);
	color: var(--warning);
	font-size: 0.78rem;
	padding: 0.22rem 0.55rem;
	border-radius: 999px;
}

.dash-update-chip-more {
	background: rgba(255,255,255,0.06);
	color: var(--text-muted);
}

.dash-manage-btn {
	font-weight: 600;
}

/* Access tile rows — form-switch widget on the right, label on the
   left.  Mirrors a settings-row pattern (e.g. iOS/Android settings)
   so the state of the switch is unambiguous at a glance. */
.access-row {
	display: flex;
	align-items: center;
}

.access-row .form-check {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding-left: 0;
	min-height: 0;
}

.access-row .form-check-input.access-switch {
	width: 2.6em;
	height: 1.4em;
	margin: 0;
	flex-shrink: 0;
	background-color: rgba(255,255,255,0.07);
	border-color: rgba(255,255,255,0.18);
	cursor: pointer;
}

.access-row .form-check-input.access-switch:checked {
	background-color: var(--success);
	border-color: var(--success);
}

.access-row .form-check-input.access-switch:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 0.18rem rgba(255,152,0,0.25);
}

.access-row .form-check-label {
	cursor: pointer;
	flex: 1;
}

.access-row .form-check-label small {
	margin-top: 0.15rem;
}

/* Inline expanded detail under a tile (replaces the "click to expand" panel) */
.tile-detail {
	margin-top: 0.5rem;
	border-top: 1px solid var(--border);
	padding-top: 0.85rem;
}

.tile-detail .row > [class^='col'] {
	margin-bottom: 0.3rem;
}

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

/* When the tile itself is a link we wrap content in this stretched anchor
   so the entire card is tappable but inner buttons keep their own targets. */
.tile-link {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	z-index: 0;
}
.tile > *:not(.tile-link) { position: relative; z-index: 1; }

@media (max-width: 575px) {
	.tile { padding: 1rem; }
	.tile-server { padding: 1.1rem; }
	.tile-value { font-size: 1.35rem; }
}

