/*
 * G2CS Client Portal — branding overrides (loads after TailAdmin vendor CSS).
 * Do not edit assets/vendor/tailadmin/css/style.css.
 */

/* -------------------------------------------------------------------------
   Token remap — :root so Tailwind v4 @theme vars resolve to G2CS red/charcoal
   ------------------------------------------------------------------------- */
:root:has(body.g2cs-portal),
body.g2cs-portal {
	--g2cs-brand: #8f1010;
	--g2cs-brand-hover: #a31818;
	--g2cs-brand-deep: #6b0c0c;
	--g2cs-brand-soft: #f5e8e8;
	--g2cs-brand-ring: rgb(143 16 16 / 0.22);
	--g2cs-black: #000000;
	--g2cs-charcoal: #141414;
	--g2cs-charcoal-elevated: #1f1f1f;
	--g2cs-charcoal-border: #2e2e2e;
	--g2cs-border-dark: #3a3a44;
	--g2cs-border-dark-hover: #4a4a54;
	--g2cs-border-dark-muted: #2c2c32;
	--g2cs-border: #d4d4d4;
	--g2cs-muted: #6b7280;

	--color-brand-50: #faf4f4;
	--color-brand-100: #f0dede;
	--color-brand-200: #e0bcbc;
	--color-brand-300: #c88a8a;
	--color-brand-400: #b85c5c;
	--color-brand-500: #8f1010;
	--color-brand-600: #7a0e0e;
	--color-brand-800: #5c0c0c;
	--color-brand-950: #2d0606;

	--color-gray-900: #141414;
	--color-gray-800: #1f1f1f;
	--color-gray-dark: #141414;
	--color-black: #000000;
}

/* Light portal theme — brand red with contrast on white (not error #ff0000) */
body.g2cs-portal:not(.dark) {
	--g2cs-brand: #c1121f;
	--g2cs-brand-hover: #7a0d0d;
	--g2cs-brand-deep: #7a0d0d;
	--g2cs-brand-soft: #f8ecec;
	--g2cs-brand-ring: rgb(193 18 31 / 0.22);

	--color-brand-50: #faf4f4;
	--color-brand-100: #f5e0e2;
	--color-brand-200: #e8b8bc;
	--color-brand-300: #d47880;
	--color-brand-400: #d01818;
	--color-brand-500: #c1121f;
	--color-brand-600: #7a0d0d;
	--color-brand-800: #5c0a0a;
	--color-brand-950: #3d0606;
}

/* -------------------------------------------------------------------------
   Surfaces (remove blue-grey TailAdmin dark tint)
   ------------------------------------------------------------------------- */
html,
body.g2cs-portal {
	background: #ffffff;
}

body.g2cs-portal.dark,
body.g2cs-portal.dark.bg-gray-900 {
	background: var(--g2cs-charcoal) !important;
}

body.g2cs-portal.dark .sidebar {
	background-color: var(--g2cs-charcoal) !important;
	border-color: var(--g2cs-border-dark) !important;
}

body.g2cs-portal.dark .border-gray-800 {
	border-color: var(--g2cs-border-dark);
}

body.g2cs-portal.dark .dark\:bg-gray-900,
body.g2cs-portal.dark .bg-gray-900 {
	background-color: var(--g2cs-charcoal) !important;
}

/* Header — restore visible borders on charcoal canvas */
body.g2cs-portal.dark header.sticky {
	border-bottom-color: var(--g2cs-border-dark) !important;
}

body.g2cs-portal.dark header .border-gray-200,
body.g2cs-portal.dark header .dark\:border-gray-800,
body.g2cs-portal.dark header .border-b.border-gray-200 {
	border-color: var(--g2cs-border-dark) !important;
}

body.g2cs-portal.dark header .rounded-full.border,
body.g2cs-portal.dark header button.rounded-lg.border,
body.g2cs-portal.dark header button.rounded-lg.xl\:border {
	border-color: var(--g2cs-border-dark) !important;
	background-color: var(--g2cs-charcoal-elevated) !important;
}

body.g2cs-portal.dark header .rounded-full.border:hover,
body.g2cs-portal.dark header button.rounded-lg.border:hover {
	border-color: var(--g2cs-border-dark-hover) !important;
	background-color: #2c2c34 !important;
}

body.g2cs-portal.dark header .g2cs-input,
body.g2cs-portal.dark header #search-input,
body.g2cs-portal.dark header #search-button {
	border-color: var(--g2cs-border-dark) !important;
}

body.g2cs-portal.dark header .g2cs-input:hover,
body.g2cs-portal.dark header #search-input:hover {
	border-color: var(--g2cs-border-dark-hover) !important;
}

/* -------------------------------------------------------------------------
   Sidebar / nav
   ------------------------------------------------------------------------- */
body.g2cs-portal .sidebar {
	--g2cs-sidebar-width: 15.625rem;
	--g2cs-sidebar-width-collapsed: 5.625rem;
	--g2cs-sidebar-nav-inline: calc(var(--spacing) * 3);
	width: var(--g2cs-sidebar-width);
}

body.g2cs-portal .sidebar:hover {
	width: var(--g2cs-sidebar-width);
}

@media (min-width: 1280px) {
	body.g2cs-portal .sidebar.xl\:w-\[90px\] {
		width: var(--g2cs-sidebar-width-collapsed);
	}
}

body.g2cs-portal .menu-item-active,
body.g2cs-portal .menu-dropdown-item-active,
body.g2cs-portal .docs-menu-item-active {
	background-color: var(--g2cs-brand-soft) !important;
	color: var(--g2cs-brand) !important;
}

body.g2cs-portal.dark .menu-item-active,
body.g2cs-portal.dark .menu-dropdown-item-active,
body.g2cs-portal.dark .docs-menu-item-active {
	background-color: rgb(143 16 16 / 0.22) !important;
	color: #f5d5d5 !important;
}

body.g2cs-portal .menu-item-icon-active {
	color: var(--g2cs-brand) !important;
}

body.g2cs-portal.dark .menu-item-icon-active {
	color: #e8b4b4 !important;
}

body.g2cs-portal .menu-item-inactive:hover {
	color: var(--g2cs-charcoal) !important;
}

body.g2cs-portal.dark .menu-item-inactive:hover {
	color: #f3f4f6 !important;
}

/* -------------------------------------------------------------------------
   G2CS component classes (used in portal templates)
   ------------------------------------------------------------------------- */
body.g2cs-portal .g2cs-logo-badge {
	background-color: var(--g2cs-brand) !important;
	color: #ffffff !important;
}

/* Bailiff's Office logo (inline SVG from assets/images/bailiffs-office-logo.svg) */
body.g2cs-portal .g2cs-portal-logo-link {
	text-decoration: none;
}

body.g2cs-portal .g2cs-portal-logo {
	display: flex;
	align-items: center;
	min-width: 0;
	width: 100%;
}

body.g2cs-portal .g2cs-portal-logo-svg {
	display: block;
	height: auto;
	width: 100%;
	max-width: 100%;
}

/*
 * Sidebar logo: same vertical padding as main header toolbar (lg:py-4).
 * Logo height tracks header toggle + search (h-10 / xl:h-11).
 */
body.g2cs-portal {
	--g2cs-portal-topbar-control-height: 2.5rem;
	--g2cs-portal-sidebar-logo-scale: 1.128;
}

@media (min-width: 1280px) {
	body.g2cs-portal {
		--g2cs-portal-topbar-control-height: 2.75rem;
	}
}

body.g2cs-portal .sidebar-header {
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
	padding-inline: 0;
}

@media (min-width: 1024px) {
	body.g2cs-portal .sidebar-header {
		padding-top: 1.75rem;
		padding-bottom: 1rem;
		min-height: calc(1.75rem + var(--g2cs-portal-topbar-control-height) * var(--g2cs-portal-sidebar-logo-scale) + 1rem);
		align-items: center;
		box-sizing: border-box;
	}
}

@media (min-width: 1280px) {
	body.g2cs-portal .sidebar nav > div:first-child {
		padding-top: 1.5rem;
	}
}

body.g2cs-portal .sidebar-header .g2cs-portal-logo-link {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	padding-inline: 0;
}

body.g2cs-portal .g2cs-portal-logo--sidebar:not(.g2cs-portal-logo--mark) {
	display: block;
	line-height: 0;
	width: auto;
	max-width: 100%;
	margin-inline: auto;
}

body.g2cs-portal .g2cs-portal-logo--sidebar:not(.g2cs-portal-logo--mark) .g2cs-portal-logo-svg--wordmark {
	display: block;
	width: auto;
	max-width: 100%;
	height: calc(var(--g2cs-portal-topbar-control-height) * var(--g2cs-portal-sidebar-logo-scale));
	max-height: calc(var(--g2cs-portal-topbar-control-height) * var(--g2cs-portal-sidebar-logo-scale));
}

body.g2cs-portal .g2cs-portal-logo--header:not(.g2cs-portal-logo--mark) .g2cs-portal-logo-svg--wordmark {
	width: auto;
	max-width: 100%;
	height: var(--g2cs-portal-topbar-control-height);
	max-height: var(--g2cs-portal-topbar-control-height);
}

/* Auth brand panel: logo + tagline spacing (gap only — no negative margin on SVG). */
body.g2cs-portal .g2cs-auth-brand-stack {
	--g2cs-auth-logo-tagline-gap: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--g2cs-auth-logo-tagline-gap);
	width: min(100%, 18rem);
}

body.g2cs-portal .g2cs-portal-logo--auth {
	display: block;
	line-height: 0;
	width: 100%;
}

body.g2cs-portal .g2cs-portal-logo--auth .g2cs-portal-logo-svg {
	display: block;
	max-height: 7.5rem;
}

body.g2cs-portal .g2cs-auth-brand-tagline {
	margin: 0;
}

body.g2cs-portal .g2cs-portal-logo--mark {
	max-width: 2.75rem;
	overflow: hidden;
}

body.g2cs-portal .g2cs-portal-logo--mark .g2cs-portal-logo-svg {
	max-height: 2.5rem;
	width: 11rem;
	max-width: none;
}

/* Collapsed sidebar: scale wordmark (no shield crop). */
body.g2cs-portal .g2cs-portal-logo--sidebar.g2cs-portal-logo--mark {
	justify-content: center;
	max-width: 100%;
	overflow: visible;
}

body.g2cs-portal .sidebar-header:has(.g2cs-portal-logo--mark) .g2cs-portal-logo-link {
	padding-inline: 0;
}

body.g2cs-portal .sidebar-header:has(.g2cs-portal-logo--mark) {
	justify-content: center !important;
}

body.g2cs-portal .g2cs-portal-logo--sidebar.g2cs-portal-logo--mark .g2cs-portal-logo-svg--wordmark {
	width: 100%;
	max-width: 100%;
	max-height: 1.75rem;
}

/* Wordmark export uses fill="white" on paths (not .cls-1). */
body.g2cs-portal:not(.dark) .g2cs-portal-logo-svg--wordmark [fill='white'] {
	fill: #111827;
}

body.g2cs-portal .g2cs-portal-logo-svg .cls-1 {
	fill: #111827;
}

body.g2cs-portal.dark .g2cs-portal-logo-svg .cls-1 {
	fill: #ffffff;
}

body.g2cs-portal .g2cs-spinner {
	border-color: var(--g2cs-brand) !important;
	border-top-color: transparent !important;
}

body.g2cs-portal .g2cs-btn-primary {
	background-color: var(--g2cs-brand) !important;
	color: #ffffff !important;
}

body.g2cs-portal .g2cs-btn-primary:hover:not(:disabled) {
	background-color: var(--g2cs-brand-hover) !important;
}

body.g2cs-portal .g2cs-btn-view {
	border-color: var(--g2cs-border) !important;
	color: #374151 !important;
	background-color: #ffffff !important;
}

body.g2cs-portal .g2cs-btn-view:hover {
	border-color: #c88a8a !important;
	color: var(--g2cs-brand) !important;
	background-color: #fafafa !important;
}

body.g2cs-portal.dark .g2cs-btn-view {
	border-color: var(--g2cs-charcoal-border) !important;
	color: #e5e7eb !important;
	background-color: var(--g2cs-charcoal-elevated) !important;
}

body.g2cs-portal.dark .g2cs-btn-view:hover {
	border-color: var(--g2cs-brand) !important;
	color: #f0d4d4 !important;
	background-color: rgb(143 16 16 / 0.14) !important;
}

body.g2cs-portal .g2cs-input:focus,
body.g2cs-portal select.g2cs-input:focus,
body.g2cs-portal input.g2cs-input:focus {
	border-color: #b85c5c !important;
	--tw-ring-color: var(--g2cs-brand-ring) !important;
	outline: none;
}

body.g2cs-portal:not(.dark) .g2cs-input:focus,
body.g2cs-portal:not(.dark) select.g2cs-input:focus,
body.g2cs-portal:not(.dark) input.g2cs-input:focus {
	border-color: #c1121f !important;
}

body.g2cs-portal.dark .g2cs-input:focus,
body.g2cs-portal.dark select.g2cs-input:focus,
body.g2cs-portal.dark input.g2cs-input:focus {
	border-color: #8f1010 !important;
	--tw-ring-color: rgb(143 16 16 / 0.35) !important;
}

/* TailAdmin “Pagination with Icon” — solid brand square, white digit */
body.g2cs-portal .g2cs-page-active {
	background-color: var(--g2cs-brand) !important;
	color: #ffffff !important;
}

body.g2cs-portal .g2cs-page-active:hover {
	background-color: var(--g2cs-brand-hover) !important;
	color: #ffffff !important;
}

body.g2cs-portal .g2cs-page-btn:hover:not(.g2cs-page-active) {
	color: var(--g2cs-brand) !important;
	background-color: rgb(143 16 16 / 0.08) !important;
}

body.g2cs-portal.dark .g2cs-page-btn:hover:not(.g2cs-page-active) {
	color: #f0d4d4 !important;
	background-color: rgb(143 16 16 / 0.12) !important;
}

body.g2cs-portal .g2cs-pagination-ellipsis:hover {
	color: var(--g2cs-brand) !important;
	background-color: rgb(143 16 16 / 0.08) !important;
}

body.g2cs-portal .g2cs-sort-active {
	fill: var(--g2cs-brand) !important;
}

body.g2cs-portal .g2cs-avatar-chip {
	background-color: #f3f4f6 !important;
	color: #374151 !important;
}

body.g2cs-portal.dark .g2cs-avatar-chip {
	background-color: rgb(255 255 255 / 0.08) !important;
	color: #e5e7eb !important;
}

body.g2cs-portal .g2cs-accent-dot {
	background-color: var(--g2cs-brand) !important;
}

/* -------------------------------------------------------------------------
   Residual TailAdmin brand utilities (templates not yet migrated)
   ------------------------------------------------------------------------- */
body.g2cs-portal .bg-brand-500,
body.g2cs-portal .hover\:bg-brand-500:hover {
	background-color: var(--g2cs-brand) !important;
}

body.g2cs-portal .hover\:bg-brand-600:hover,
body.g2cs-portal .bg-brand-500:hover {
	background-color: var(--g2cs-brand-hover) !important;
}

body.g2cs-portal .text-brand-500,
body.g2cs-portal .text-brand-600,
body.g2cs-portal .text-brand-700,
body.g2cs-portal .hover\:text-brand-500:hover,
body.g2cs-portal .dark\:hover\:text-brand-500:hover {
	color: var(--g2cs-brand) !important;
}

body.g2cs-portal.dark .text-brand-300,
body.g2cs-portal.dark .text-brand-400 {
	color: #e8b4b4 !important;
}

body.g2cs-portal .bg-brand-500\/\[0\.08\],
body.g2cs-portal .hover\:bg-brand-500\/\[0\.08\]:hover,
body.g2cs-portal .bg-brand-500\/10,
body.g2cs-portal .bg-brand-500\/15,
body.g2cs-portal.dark .bg-brand-500\/15,
body.g2cs-portal.dark .bg-brand-500\/20,
body.g2cs-portal.dark .dark\:bg-brand-500\/15,
body.g2cs-portal.dark .dark\:bg-brand-500\/20 {
	background-color: rgb(143 16 16 / 0.1) !important;
}

body.g2cs-portal .fill-brand-500,
body.g2cs-portal .stroke-brand-500 {
	fill: var(--g2cs-brand) !important;
	stroke: var(--g2cs-brand) !important;
}

body.g2cs-portal .border-brand-500,
body.g2cs-portal .border-brand-300,
body.g2cs-portal .focus\:border-brand-300:focus,
body.g2cs-portal .dark\:focus\:border-brand-800:focus,
body.g2cs-portal .focus\:border-brand-500:focus {
	border-color: #c88a8a !important;
}

body.g2cs-portal .focus\:ring-brand-500\/10:focus,
body.g2cs-portal .focus\:ring-brand-500:focus {
	--tw-ring-color: var(--g2cs-brand-ring) !important;
}

body.g2cs-portal .ring-brand-500 {
	--tw-ring-color: var(--g2cs-brand) !important;
}

/* Neutralize blue accent hovers not used for status semantics */
body.g2cs-portal .hover\:bg-blue-500\/\[0\.08\]:hover {
	background-color: rgb(143 16 16 / 0.08) !important;
}

body.g2cs-portal .text-theme-purple-500,
body.g2cs-portal .bg-theme-purple-500\/\[0\.08\] {
	color: var(--g2cs-muted) !important;
	background-color: rgb(55 65 81 / 0.08) !important;
}

/* -------------------------------------------------------------------------
   Bailiff tags
   ------------------------------------------------------------------------- */
body.g2cs-portal .g2cs-bailiff-pill {
	background-color: #f3f4f6;
	color: #374151;
}

body.g2cs-portal.dark .g2cs-bailiff-pill {
	background-color: rgb(255 255 255 / 0.08);
	color: #d1d5db;
}

/* -------------------------------------------------------------------------
   Files table
   ------------------------------------------------------------------------- */
.g2cs-file-number {
	word-break: break-word;
	hyphens: auto;
}

.g2cs-location-cell {
	display: -webkit-box;
	max-width: 10rem;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

body.g2cs-portal .g2cs-files-row:hover {
	background-color: #f9fafb;
}

body.g2cs-portal.dark .g2cs-files-row:hover {
	background-color: rgb(255 255 255 / 0.02);
}

.g2cs-pagination-ellipsis {
	letter-spacing: 0.12em;
}

body.g2cs-portal .g2cs-files-table-scroll {
	-webkit-overflow-scrolling: touch;
}

/*
 * Shared column tracks so header/body vertical borders line up (subgrid).
 */
body.g2cs-portal .g2cs-files-table-inner {
	display: grid;
	grid-template-columns:
		minmax(0, 1fr)
		minmax(9.375rem, 1fr)
		minmax(6.25rem, 1fr)
		repeat(4, minmax(0, 1fr))
		repeat(2, minmax(0, 1fr))
		minmax(0, 1fr)
		minmax(0, 1fr)
		minmax(0, 1fr);
}

body.g2cs-portal .g2cs-files-header-row,
body.g2cs-portal .g2cs-files-row {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: subgrid;
}

/* Dashboard — Top Locations card containment */
body.g2cs-portal .g2cs-top-locations-card {
	min-width: 0;
}

body.g2cs-portal .g2cs-top-locations-list {
	max-width: 100%;
}

body.g2cs-portal .g2cs-top-location-row {
	min-width: 0;
}

body.g2cs-portal .g2cs-top-location-row > .flex-1 {
	flex: 1 1 50%;
	max-width: 50%;
}

body.g2cs-portal .g2cs-location-bar-fill {
	background-color: var(--g2cs-brand, #8f1010) !important;
	min-width: 2px;
}

/* Dashboard — Leaflet map (Top Locations card) */
body.g2cs-portal .g2cs-dashboard-map-wrap {
	min-width: 0;
	border-radius: 0.75rem;
}

body.g2cs-portal .g2cs-dashboard-map {
	min-height: 220px;
}

body.g2cs-portal .g2cs-dashboard-map .leaflet-container {
	font-family: inherit;
}

body.g2cs-portal .g2cs-dashboard-map .leaflet-control-attribution {
	font-size: 10px;
	line-height: 1.3;
}

/* Dark portal theme — Dark Matter tiles */
body.g2cs-portal.dark .g2cs-dashboard-map-wrap {
	border: 2px solid #2e2e2e;
	background: var(--g2cs-charcoal, #141414);
}

body.g2cs-portal.dark .g2cs-dashboard-map,
body.g2cs-portal.dark .g2cs-dashboard-map .leaflet-container {
	background: var(--g2cs-charcoal, #141414);
}

body.g2cs-portal.dark .g2cs-dashboard-map .leaflet-control-attribution {
	background: rgb(20 20 20 / 0.88);
	color: #9ca3af;
}

body.g2cs-portal.dark .g2cs-dashboard-map .leaflet-control-attribution a {
	color: #d1d5db;
}

/* Light portal theme — Voyager tiles */
body.g2cs-portal:not(.dark) .g2cs-dashboard-map-wrap {
	border: 1px solid #e5e7eb;
	background: #f3f4f6;
}

body.g2cs-portal:not(.dark) .g2cs-dashboard-map,
body.g2cs-portal:not(.dark) .g2cs-dashboard-map .leaflet-container {
	background: #f3f4f6;
}

body.g2cs-portal:not(.dark) .g2cs-dashboard-map .leaflet-control-attribution {
	background: rgb(255 255 255 / 0.92);
	color: #6b7280;
}

body.g2cs-portal:not(.dark) .g2cs-dashboard-map .leaflet-control-attribution a {
	color: #374151;
}

body.g2cs-portal .g2cs-map-info {
	color: #141414;
	line-height: 1.4;
}

/* -------------------------------------------------------------------------
   Auth pages — sign-in & reset password (TailAdmin layout)
   ------------------------------------------------------------------------- */
body.g2cs-portal.g2cs-auth-page {
	min-height: 100vh;
}

body.g2cs-portal.g2cs-auth-page:not(.dark) {
	background: #ffffff;
}

body.g2cs-portal.g2cs-auth-page.dark {
	background: var(--g2cs-charcoal) !important;
}

body.g2cs-portal .g2cs-auth-brand-panel {
	min-height: 100vh;
}

body.g2cs-portal .g2cs-auth-grid {
	position: absolute;
	z-index: 0;
	pointer-events: none;
	width: min(100%, 450px);
	max-width: 450px;
}

body.g2cs-portal .g2cs-auth-grid img {
	display: block;
	height: auto;
	width: 100%;
}

body.g2cs-portal .g2cs-auth-grid--top {
	top: 0;
	right: 0;
}

body.g2cs-portal .g2cs-auth-grid--bottom {
	bottom: 0;
	left: 0;
	transform: rotate(180deg);
}

body.g2cs-portal:not(.dark) .g2cs-auth-grid img {
	opacity: 0.5;
}

body.g2cs-portal.dark .g2cs-auth-grid img {
	opacity: 0.65;
}

body.g2cs-portal .g2cs-sign-in-error {
	border-color: rgb(239 68 68 / 0.35);
}

body.g2cs-portal .g2cs-sign-in-notice {
	border-color: rgb(34 197 94 / 0.35);
}

body.g2cs-portal .g2cs-sign-in-checkbox {
	accent-color: var(--g2cs-brand);
}

body.g2cs-portal .g2cs-auth-social-btn:disabled {
	pointer-events: none;
}

/* -------------------------------------------------------------------------
   Files index — list / map view toggle + map layout
   ------------------------------------------------------------------------- */
[x-cloak] {
	display: none !important;
}

body.g2cs-portal .g2cs-files-view-toggle-inactive {
	color: #6b7280;
}

body.g2cs-portal .g2cs-files-view-toggle-inactive:hover {
	color: #374151;
	background-color: rgb(0 0 0 / 0.04);
}

body.g2cs-portal.dark .g2cs-files-view-toggle-inactive {
	color: #9ca3af;
}

body.g2cs-portal.dark .g2cs-files-view-toggle-inactive:hover {
	color: #e5e7eb;
	background-color: rgb(255 255 255 / 0.06);
}

body.g2cs-portal .g2cs-files-view-toggle-active {
	background-color: var(--g2cs-brand) !important;
	color: #ffffff !important;
}

/* Map + legend stack (single bordered card) */
body.g2cs-portal .g2cs-map-stack,
body.g2cs-portal .g2cs-files-map-stack {
	min-width: 0;
}

body.g2cs-portal.dark .g2cs-map-stack,
body.g2cs-portal.dark .g2cs-files-map-stack {
	border: 2px solid #2e2e2e;
	background: var(--g2cs-charcoal, #141414);
}

body.g2cs-portal:not(.dark) .g2cs-map-stack,
body.g2cs-portal:not(.dark) .g2cs-files-map-stack {
	border: 1px solid #e5e7eb;
	background: #f3f4f6;
}

body.g2cs-portal .g2cs-map-stack .g2cs-dashboard-map-wrap,
body.g2cs-portal .g2cs-files-map-stack .g2cs-files-map-wrap {
	border: none;
	border-radius: 0;
	background: transparent;
}

body.g2cs-portal .g2cs-map-legend-panel {
	border-top: 1px solid rgb(255 255 255 / 0.06);
	padding: 1rem 1.25rem 1.125rem;
}

body.g2cs-portal:not(.dark) .g2cs-map-legend-panel {
	border-top-color: #e5e7eb;
	background: #ffffff;
}

body.g2cs-portal.dark .g2cs-map-legend-panel {
	background: var(--g2cs-charcoal-elevated, #1a1a1a);
}

body.g2cs-portal .g2cs-map-legend-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.875rem;
}

body.g2cs-portal .g2cs-map-legend-title {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #374151;
}

body.g2cs-portal.dark .g2cs-map-legend-title {
	color: #e5e7eb;
}

body.g2cs-portal .g2cs-map-legend-total {
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
	color: #6b7280;
	white-space: nowrap;
}

body.g2cs-portal.dark .g2cs-map-legend-total {
	color: #9ca3af;
}

body.g2cs-portal .g2cs-map-status-bar-track {
	height: 1.25rem;
	padding: 3px;
	border-radius: 0.5rem;
	background: rgb(0 0 0 / 0.2);
}

body.g2cs-portal:not(.dark) .g2cs-map-status-bar-track {
	background: #e5e7eb;
}

body.g2cs-portal .g2cs-map-status-bar {
	display: flex;
	align-items: stretch;
	width: 100%;
	height: 100%;
	gap: 3px;
}

body.g2cs-portal .g2cs-map-status-bar-segment {
	min-width: 4px;
	border-radius: 0.25rem;
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.15);
}

body.g2cs-portal:not(.dark) .g2cs-map-status-bar-segment {
	box-shadow: inset 0 -1px 0 rgb(0 0 0 / 0.08);
}

body.g2cs-portal .g2cs-map-legend-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
	gap: 0.5rem;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	body.g2cs-portal .g2cs-map-legend-grid {
		grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
		gap: 0.625rem;
	}
}

body.g2cs-portal .g2cs-map-legend-grid > li {
	min-width: 0;
}

body.g2cs-portal button.g2cs-map-legend-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	min-width: 0;
	padding: 0.5rem 0.625rem;
	border-radius: 0.5rem;
	background: rgb(255 255 255 / 0.04);
	border: 1px solid rgb(255 255 255 / 0.06);
	cursor: pointer;
	text-align: left;
	transition:
		opacity 0.2s ease,
		background-color 0.2s ease,
		border-color 0.2s ease;
}

body.g2cs-portal:not(.dark) button.g2cs-map-legend-item {
	background: #f9fafb;
	border-color: #e5e7eb;
}

body.g2cs-portal button.g2cs-map-legend-item:hover:not(.g2cs-map-legend-item--off) {
	border-color: rgb(255 255 255 / 0.14);
	background: rgb(255 255 255 / 0.07);
}

body.g2cs-portal:not(.dark) button.g2cs-map-legend-item:hover:not(.g2cs-map-legend-item--off) {
	border-color: #d1d5db;
	background: #f3f4f6;
}

body.g2cs-portal button.g2cs-map-legend-item--off {
	opacity: 0.42;
	background: transparent;
	border-style: dashed;
	border-color: rgb(255 255 255 / 0.12);
}

body.g2cs-portal:not(.dark) button.g2cs-map-legend-item--off {
	border-color: #d1d5db;
}

body.g2cs-portal button.g2cs-map-legend-item--off .g2cs-map-legend-dot {
	opacity: 0.35;
	filter: grayscale(0.85);
}

body.g2cs-portal button.g2cs-map-legend-item--off .g2cs-map-legend-label,
body.g2cs-portal button.g2cs-map-legend-item--off .g2cs-map-legend-count {
	color: #6b7280;
	text-decoration: line-through;
	text-decoration-color: rgb(156 163 175 / 0.65);
}

body.g2cs-portal.dark button.g2cs-map-legend-item--off .g2cs-map-legend-label,
body.g2cs-portal.dark button.g2cs-map-legend-item--off .g2cs-map-legend-count {
	color: #6b7280;
}

body.g2cs-portal .g2cs-map-legend-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 0;
	padding: 0.5rem 0.625rem;
	border-radius: 0.5rem;
	background: rgb(255 255 255 / 0.04);
	border: 1px solid rgb(255 255 255 / 0.06);
}

body.g2cs-portal:not(.dark) .g2cs-map-legend-item {
	background: #f9fafb;
	border-color: #e5e7eb;
}

body.g2cs-portal .g2cs-map-legend-dot {
	flex-shrink: 0;
	width: 0.625rem;
	height: 0.625rem;
	border-radius: 9999px;
	box-shadow: 0 0 0 1px rgb(0 0 0 / 0.12);
}

body.g2cs-portal .g2cs-map-legend-label {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.75rem;
	font-weight: 500;
	color: #374151;
}

body.g2cs-portal.dark .g2cs-map-legend-label {
	color: #d1d5db;
}

body.g2cs-portal .g2cs-map-legend-count {
	flex-shrink: 0;
	font-size: 0.75rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: #6b7280;
}

body.g2cs-portal.dark .g2cs-map-legend-count {
	color: #9ca3af;
}

body.g2cs-portal .g2cs-files-map-wrap {
	min-width: 0;
}

body.g2cs-portal .g2cs-files-map,
body.g2cs-portal .g2cs-files-map-empty {
	min-height: var(--g2cs-files-map-min-h, 676px);
}

body.g2cs-portal .g2cs-files-map {
	height: var(--g2cs-files-map-min-h, 676px);
	cursor: pointer;
}

body.g2cs-portal .g2cs-files-map .leaflet-marker-icon,
body.g2cs-portal .g2cs-files-map .leaflet-interactive {
	cursor: pointer;
}

body.g2cs-portal .g2cs-files-map .leaflet-control-zoom a {
	background-color: var(--g2cs-charcoal-elevated, #1f1f1f);
	color: #e5e7eb;
	border-color: var(--g2cs-border-dark, #3a3a44);
}

body.g2cs-portal:not(.dark) .g2cs-files-map .leaflet-control-zoom a {
	background-color: #ffffff;
	color: #374151;
	border-color: #d1d5db;
}

body.g2cs-portal .leaflet-tooltip.g2cs-files-map-tooltip-wrap,
body.g2cs-portal .leaflet-popup.g2cs-map-marker-popup .leaflet-popup-content-wrapper {
	background: var(--g2cs-charcoal-elevated, #1f1f1f);
	color: #f3f4f6;
	border: 1px solid var(--g2cs-border-dark, #3a3a44);
	border-radius: 0.625rem;
	box-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
	padding: 0;
}

body.g2cs-portal:not(.dark) .leaflet-tooltip.g2cs-files-map-tooltip-wrap,
body.g2cs-portal:not(.dark) .leaflet-popup.g2cs-map-marker-popup .leaflet-popup-content-wrapper {
	background: #ffffff;
	color: #111827;
	border-color: #e5e7eb;
	box-shadow: 0 8px 20px rgb(15 23 42 / 0.12);
}

body.g2cs-portal .leaflet-tooltip.g2cs-files-map-tooltip-wrap {
	padding: 0;
}

body.g2cs-portal .leaflet-tooltip.g2cs-files-map-tooltip-wrap::before {
	border-top-color: var(--g2cs-charcoal-elevated, #1f1f1f);
}

body.g2cs-portal:not(.dark) .leaflet-tooltip.g2cs-files-map-tooltip-wrap::before {
	border-top-color: #ffffff;
}

body.g2cs-portal .leaflet-popup.g2cs-map-marker-popup .leaflet-popup-content {
	margin: 0;
	line-height: 1.4;
}

body.g2cs-portal .leaflet-popup.g2cs-map-marker-popup .leaflet-popup-tip {
	background: var(--g2cs-charcoal-elevated, #1f1f1f);
	border: 1px solid var(--g2cs-border-dark, #3a3a44);
	box-shadow: none;
}

body.g2cs-portal:not(.dark) .leaflet-popup.g2cs-map-marker-popup .leaflet-popup-tip {
	background: #ffffff;
	border-color: #e5e7eb;
}

body.g2cs-portal .g2cs-map-marker-card {
	padding: 0.75rem 0.85rem;
	min-width: 11.5rem;
	max-width: 16rem;
}

body.g2cs-portal .g2cs-map-marker-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

body.g2cs-portal .g2cs-map-marker-card-file {
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #f9fafb;
}

body.g2cs-portal:not(.dark) .g2cs-map-marker-card-file {
	color: #111827;
}

body.g2cs-portal .g2cs-map-marker-card-status {
	display: inline-flex;
	align-items: center;
	max-width: 7.5rem;
	padding: 0.15rem 0.5rem;
	border-radius: 9999px;
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--g2cs-status-color, #c1121f);
	background: color-mix(in srgb, var(--g2cs-status-color, #c1121f) 22%, transparent);
	border: 1px solid color-mix(in srgb, var(--g2cs-status-color, #c1121f) 35%, transparent);
}

body.g2cs-portal .g2cs-map-marker-card-meta {
	margin: 0;
	display: grid;
	gap: 0.35rem;
}

body.g2cs-portal .g2cs-map-marker-card-row {
	display: grid;
	grid-template-columns: 4.25rem 1fr;
	gap: 0.35rem;
	align-items: baseline;
}

body.g2cs-portal .g2cs-map-marker-card-row dt {
	margin: 0;
	font-size: 0.6875rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #9ca3af;
}

body.g2cs-portal:not(.dark) .g2cs-map-marker-card-row dt {
	color: #6b7280;
}

body.g2cs-portal .g2cs-map-marker-card-row dd {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 500;
	color: #e5e7eb;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.g2cs-portal:not(.dark) .g2cs-map-marker-card-row dd {
	color: #374151;
}

body.g2cs-portal .g2cs-map-marker-card-link {
	display: inline-flex;
	margin-top: 0.55rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--g2cs-brand, #c1121f);
	text-decoration: none;
}

body.g2cs-portal .g2cs-map-marker-card-hint {
	margin: 0.55rem 0 0;
	font-size: 0.6875rem;
	color: #9ca3af;
}

body.g2cs-portal:not(.dark) .g2cs-map-marker-card-hint {
	color: #6b7280;
}

body.g2cs-portal .g2cs-files-map .leaflet-container {
	font-family: inherit;
}

body.g2cs-portal .g2cs-files-map .leaflet-control-attribution {
	font-size: 10px;
	line-height: 1.3;
}

body.g2cs-portal.dark .g2cs-files-map-wrap {
	border: 2px solid #2e2e2e;
	background: var(--g2cs-charcoal, #141414);
}

body.g2cs-portal.dark .g2cs-files-map,
body.g2cs-portal.dark .g2cs-files-map .leaflet-container {
	background: var(--g2cs-charcoal, #141414);
}

body.g2cs-portal.dark .g2cs-files-map .leaflet-control-attribution {
	background: rgb(20 20 20 / 0.88);
	color: #9ca3af;
}

body.g2cs-portal.dark .g2cs-files-map .leaflet-control-attribution a {
	color: #d1d5db;
}

body.g2cs-portal:not(.dark) .g2cs-files-map-wrap {
	border: 1px solid #e5e7eb;
	background: #f3f4f6;
}

body.g2cs-portal:not(.dark) .g2cs-files-map,
body.g2cs-portal:not(.dark) .g2cs-files-map .leaflet-container {
	background: #f3f4f6;
}

body.g2cs-portal:not(.dark) .g2cs-files-map .leaflet-control-attribution {
	background: rgb(255 255 255 / 0.92);
	color: #6b7280;
}

body.g2cs-portal:not(.dark) .g2cs-files-map .leaflet-control-attribution a {
	color: #374151;
}

body.g2cs-portal .g2cs-files-map-empty {
	background: inherit;
}

body.g2cs-portal .g2cs-map-marker-card-link:hover {
	text-decoration: underline;
}

/* File detail workspace */
body.g2cs-portal .g2cs-file-workspace-meta {
	margin: 0;
}

/* Column split: spacing only — no visible divider line */
body.g2cs-portal .g2cs-file-workspace-aside {
	border: none;
}

@media (min-width: 1024px) {
	body.g2cs-portal .g2cs-file-workspace-grid {
		column-gap: 0.5rem;
	}
}

body.g2cs-portal .g2cs-file-metric {
	min-height: 5.5rem;
}

body.g2cs-portal .g2cs-file-workspace-fields {
	width: 100%;
	row-gap: 1.5rem;
}

body.g2cs-portal .g2cs-file-workspace-fields > .grid {
	row-gap: 1.5rem;
}

body.g2cs-portal .g2cs-file-workspace-location--map {
	margin-top: 0.25rem;
}

body.g2cs-portal .g2cs-file-workspace-location {
	width: 100%;
	min-width: 0;
}

body.g2cs-portal .g2cs-file-detail-location-map-wrap,
body.g2cs-portal .g2cs-file-detail-location-empty {
	width: 100%;
	min-width: 0;
	height: 300px;
	min-height: 300px;
}

body.g2cs-portal .g2cs-file-detail-location-map {
	width: 100%;
	height: 100%;
	min-height: 300px;
}

body.g2cs-portal .g2cs-file-detail-location-map .leaflet-container {
	height: 100%;
	background: var(--g2cs-surface-muted, #f3f4f6);
}

body.g2cs-portal.dark .g2cs-file-detail-location-map .leaflet-container {
	background: rgba(255, 255, 255, 0.03);
}

body.g2cs-portal .g2cs-file-detail-location-map .leaflet-control-attribution {
	font-size: 10px;
	line-height: 1.2;
	padding: 2px 6px;
	background: rgba(255, 255, 255, 0.88);
}

body.g2cs-portal.dark .g2cs-file-detail-location-map .leaflet-control-attribution {
	background: rgba(17, 24, 39, 0.88);
	color: #9ca3af;
}

body.g2cs-portal .g2cs-file-detail-location-map .leaflet-control-attribution a {
	color: inherit;
}

body.g2cs-portal .g2cs-file-detail-tabs {
	min-height: 2.75rem;
}

/* File detail — asset preview (G2CS charcoal, vehicle-only) */
body.g2cs-portal .g2cs-file-asset-preview {
	background-color: var(--g2cs-charcoal-elevated);
	border: 1px solid var(--g2cs-charcoal-border);
}

body.g2cs-portal:not(.dark) .g2cs-file-asset-preview {
	background-color: #ffffff;
	border-color: #e5e7eb;
}

body.g2cs-portal .g2cs-file-asset-preview-media {
	min-height: 10rem;
	background-color: var(--g2cs-charcoal);
	border: 1px solid var(--g2cs-border-dark-muted);
}

body.g2cs-portal .g2cs-file-asset-preview-image {
	display: block;
}

body.g2cs-portal .g2cs-file-asset-preview-image-trigger {
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
	transition: opacity 0.15s ease;
}

body.g2cs-portal .g2cs-file-asset-preview-image-trigger:hover {
	opacity: 0.9;
}

body.g2cs-portal .g2cs-file-asset-preview-image-trigger:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.35);
	outline-offset: 2px;
}

body.g2cs-portal .g2cs-vehicle-image-modal__image {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

body.g2cs-portal:not(.dark) .g2cs-file-asset-preview-media {
	background-color: #f9fafb;
	border-color: #e5e7eb;
}

body.g2cs-portal:not(.dark) .g2cs-file-asset-preview-icon,
body.g2cs-portal:not(.dark) .g2cs-file-asset-preview-placeholder-text {
	color: #6b7280;
}

body.g2cs-portal:not(.dark) .g2cs-file-asset-preview-spec-label,
body.g2cs-portal:not(.dark) .g2cs-file-asset-preview .g2cs-copy-field-label {
	color: #6b7280;
}

body.g2cs-portal:not(.dark) .g2cs-file-asset-preview-spec-value {
	color: #1f2937;
}

body.g2cs-portal:not(.dark) .g2cs-file-asset-preview .g2cs-copy-field-input {
	border-color: #d1d5db;
	background-color: #ffffff;
	color: #1f2937;
}

body.g2cs-portal:not(.dark) .g2cs-file-asset-preview .g2cs-copy-field-input:focus {
	border-color: var(--g2cs-brand);
	box-shadow: 0 0 0 3px var(--g2cs-brand-ring);
}

body.g2cs-portal:not(.dark) .g2cs-file-asset-preview .g2cs-copy-field-input[disabled] {
	background-color: #f3f4f6;
	color: #9ca3af;
}

body.g2cs-portal:not(.dark) .g2cs-file-asset-preview .copy-btn {
	border-color: #d1d5db;
	border-left-color: #d1d5db;
	background-color: #f9fafb;
	color: #374151;
}

body.g2cs-portal:not(.dark) .g2cs-file-asset-preview .copy-btn:hover:not(:disabled) {
	background-color: #f3f4f6;
	border-color: #d1d5db;
	border-left-color: #d1d5db;
	color: #111827;
}

body.g2cs-portal:not(.dark) .g2cs-file-asset-preview .copy-btn.g2cs-copy-btn-copied {
	color: #4b5563;
	border-left-color: #d1d5db;
}

body.g2cs-portal:not(.dark) .g2cs-file-asset-preview-image-trigger:focus-visible {
	outline-color: var(--g2cs-brand);
}

body.g2cs-portal .g2cs-file-asset-preview-icon {
	color: var(--g2cs-muted);
}

body.g2cs-portal .g2cs-file-asset-preview-placeholder-text {
	color: var(--g2cs-muted);
}

body.g2cs-portal .g2cs-file-asset-preview-spec-label,
body.g2cs-portal .g2cs-file-asset-preview .g2cs-copy-field-label {
	color: #9ca3af;
}

body.g2cs-portal .g2cs-file-asset-preview-spec {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 1.25rem;
	row-gap: 1.5rem;
	margin-bottom: 1.5rem;
}

body.g2cs-portal .g2cs-file-asset-preview-spec-cell {
	padding: 0;
}

body.g2cs-portal .g2cs-file-asset-preview-spec-label {
	display: block;
}

body.g2cs-portal .g2cs-file-asset-preview-spec-value {
	margin: 0;
	color: rgb(255 255 255 / 0.9);
}

/* VIN copy row — TailAdmin structure, G2CS colours (no brand-blue inputs) */
body.g2cs-portal .g2cs-file-asset-preview .g2cs-copy-field {
	margin-bottom: 0;
}

body.g2cs-portal .g2cs-file-asset-preview .g2cs-copy-field-label {
	color: var(--g2cs-muted);
}

body.g2cs-portal .g2cs-file-asset-preview .g2cs-copy-field-input {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: 0.875rem;
	letter-spacing: 0.02em;
	min-height: 3rem;
	padding-right: 5.75rem !important;
	border: 1px solid var(--g2cs-border-dark-muted);
	background-color: var(--g2cs-charcoal);
	color: rgb(255 255 255 / 0.88);
	box-shadow: none;
}

body.g2cs-portal .g2cs-file-asset-preview .g2cs-copy-field-input:focus {
	border-color: var(--g2cs-border-dark-hover);
	box-shadow: 0 0 0 3px var(--g2cs-brand-ring);
}

body.g2cs-portal .g2cs-file-asset-preview .g2cs-copy-field-input[disabled] {
	cursor: not-allowed;
	opacity: 0.5;
}

body.g2cs-portal .g2cs-file-asset-preview .copy-btn {
	min-width: 5.25rem;
	min-height: 3rem;
	border-color: var(--g2cs-border-dark-muted);
	border-left-color: var(--g2cs-border-dark);
	background-color: var(--g2cs-charcoal-elevated);
	color: #c4c4c4;
}

body.g2cs-portal .g2cs-file-asset-preview .copy-btn:hover:not(:disabled) {
	background-color: var(--g2cs-border-dark-muted);
	border-color: var(--g2cs-border-dark-muted);
	border-left-color: var(--g2cs-border-dark);
	color: #f3f4f6;
}

body.g2cs-portal .g2cs-file-asset-preview .copy-btn.g2cs-copy-btn-copied {
	color: #d4d4d4;
	border-left-color: var(--g2cs-muted);
}
