/* ===========================================================================
   Always Connected — white-label brand layer
   ---------------------------------------------------------------------------
   Emitted by theme/style.custom.php, which every customer-facing page already
   loads LAST (index, tracking, cpanel, mobile/index, mobile/tracking,
   mod/share, func/fn_object.follow). So this file wins the cascade without
   editing a single page, and without touching theme/style.css.

   This is presentation only. It changes no markup, no selector the JavaScript
   depends on, and no semantic status colour.

   PALETTE NOTE — why there are two greens.
   The supplied brand green #38A375 carries only 3.15:1 against white, which
   fails WCAG AA for normal-size text (4.5:1 needed). It is kept for large
   decorative fills, where the logo and big shapes sit and 3:1 is the bar.
   A darker #2B825F (4.71:1) is used anywhere white text sits on green — the
   header bar and primary buttons — and for green text on white.
   =========================================================================== */

:root {
	--ac-primary:        #38A375;  /* brand green - large decorative fills only */
	--ac-primary-strong: #2B825F;  /* AA-safe for white text and text-on-white  */
	--ac-primary-hover:  #257254;
	--ac-secondary:      #4CB298;
	--ac-mint:           #8CC9AA;
	--ac-mint-soft:      #EAF5EF;  /* hover / selected row wash */
	--ac-background:     #F4FAF7;
	--ac-surface:        #FFFFFF;
	--ac-text:           #24332D;
	--ac-text-muted:     #66756F;
	--ac-border:         #DDEBE4;
	--ac-radius:         10px;
	--ac-radius-sm:      6px;
	--ac-shadow:         0 10px 30px rgba(36, 51, 45, 0.07);
	--ac-focus:          0 0 0 3px rgba(43, 130, 95, 0.18);
}

/* ===========================================================================
   LOGIN  (body#login)
   Desktop: brand panel left, white card right. Mobile: branded band on top.
   The brand panel is a ::before pseudo-element, so the DOM is untouched.
   =========================================================================== */

body#login {
	background-color: var(--ac-background);
	/* background-image is decided in style.custom.php: suppressed when
	   img/login-background.jpg is absent, honoured (and cache-busted) when an
	   administrator has uploaded one. */
	display: flex;
	min-height: 100vh;
	margin: 0;
	color: var(--ac-text);
	/* The stock footer floats the two app-store badges with fixed side margins,
	   which pushes the page wider than a phone viewport and knocks the whole
	   layout sideways. Contain it rather than restyle the badges. */
	overflow-x: hidden;
}

/* The stock login plays a background video and overlays a pattern image that
   is hard-coded to an external host. Both are off-brand here, and the overlay
   is a cross-domain request to a host this deployment does not control. */
body#login #video_background,
body#login #video_pattern { display: none !important; }

/* Brand panel. Gradient plus translucent discs echo the supplied artwork; the
   official SVG sits on top at its natural ratio (height auto, never stretched). */
body#login::before {
	content: "";
	flex: 0 0 44%;
	background-color: var(--ac-primary);
	background-image:
		/* Resolved dynamically by style.custom.php to a filemtime-versioned URL,
		   so an administrator's logo upload shows immediately instead of waiting
		   out the 7-day SVG cache. Falls back to the plain path. */
		var(--ac-login-logo, url(../img/logo.svg)),
		radial-gradient(circle at 16% 82%, rgba(255,255,255,0.17) 0 23%, transparent 23.5%),
		radial-gradient(circle at 74% 16%, rgba(255,255,255,0.11) 0 31%, transparent 31.5%),
		radial-gradient(circle at 92% 88%, rgba(255,255,255,0.09) 0 18%, transparent 18.5%),
		linear-gradient(135deg, var(--ac-secondary) 0%, var(--ac-primary) 100%);
	background-repeat: no-repeat;
	background-position: center center, center, center, center, center;
	background-size: min(320px, 58%) auto, cover, cover, cover, cover;
}

#login .wrapper {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	padding: 40px 24px;
}

#login .wrapper .inner-wrapper {
	box-sizing: border-box;
	width: 420px;
	max-width: 100%;
	margin: 0;
	padding: 36px 32px;
	background: var(--ac-surface);
	opacity: 1;                        /* stock card is 0.9 and washes text out */
	border: 1px solid var(--ac-border);
	border-radius: var(--ac-radius);
	box-shadow: var(--ac-shadow);
}

/* The brand panel already carries the logo on desktop. */
#login .logo-block { display: none; }

/* NOTE: do NOT override .content / .content-block height. Those 250px boxes with
   overflow:hidden are the clipping window for the login / recover / register
   carousel. Changing them reveals all three forms stacked at once. */

#login input.inputbox {
	background-color: var(--ac-surface);
	border: 1px solid var(--ac-border);
	border-radius: var(--ac-radius);
	color: var(--ac-text);
}
#login input.inputbox:hover { background-color: var(--ac-surface); border-color: var(--ac-mint); }
#login input.inputbox:focus {
	outline: none;
	border-color: var(--ac-primary-strong);
	box-shadow: var(--ac-focus);
}

#login .wrapper .content-block input.button {
	background: var(--ac-primary-strong);
	border-radius: var(--ac-radius);
	font-weight: 600;
	letter-spacing: 0.01em;
	transition: background-color 0.15s ease;
}
#login .wrapper .content-block input.button:hover { background: var(--ac-primary-hover); opacity: 1; }
#login .wrapper .content-block input.button:focus-visible { outline: none; box-shadow: var(--ac-focus); }

#login .submit-btn .remember-block .custom-checkbox.checked {
	background-color: var(--ac-primary-strong);
	border-color: var(--ac-primary-strong);
}

/* App-store badges.
   Both images are 160x64, so they were never mismatched in size - the stock
   markup floats one left with a 35px margin and the other right with a 40px
   margin, which is what knocks them out of alignment and, on a phone, pushes
   the page wider than the viewport. One centred flex row fixes both. The
   markup and the destination links are untouched. */
#login .footer.text div[style*="margin-top"] {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 32px !important;
}
#login .footer.text div[style*="float"] {
	float: none !important;
	margin: 0 !important;
}
#login #Appstore,
#login #Playstore {
	display: block;
	height: 48px;
	width: auto;      /* 160x64 source, so this keeps both identical and sharp */
	max-width: 100%;
}

/* Mobile / tablet: single column, compact branded band above the form. */
@media (max-width: 900px) {
	body#login { display: block; }
	body#login::before {
		display: block;
		flex: none;
		width: 100%;
		height: 170px;
		background-size: min(220px, 62%) auto, cover, cover, cover, cover;
	}
	#login .wrapper { display: block; padding: 0 16px 32px; }
	#login .wrapper .inner-wrapper { width: auto; max-width: 100%; margin: -32px 0 0; padding: 28px 20px; }
}

/* ===========================================================================
   TOP PANEL  (the application header)
   =========================================================================== */

#top_panel {
	background: var(--ac-primary-strong);
	border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}

/* Header icons ship as monochrome #6F6F6F, unreadable on green. They are all
   single-colour UI glyphs, so forcing them white is safe and keeps one file. */
#top_panel .tp-menu a img { filter: brightness(0) invert(1); }

/* The official mark needs a little more room than the 16px utility icons. */
#top_panel .about-btn img {
	width: 22px;
	height: auto;
	max-height: 22px;
	padding: 2px 0;
}

#top_panel .tp-menu div a { color: #FFFFFF; border-radius: var(--ac-radius-sm); }
#top_panel a:hover { background-color: rgba(255, 255, 255, 0.16); }
#top_panel a.active { background-color: rgba(255, 255, 255, 0.24); }

/* Stock gives these three buttons separate accent colours. On a green bar that
   reads as noise, so they become one restrained translucent treatment. */
#top_panel .map-btn a,
#top_panel .cpanel-btn a,
#top_panel .billing-btn a {
	background-color: rgba(255, 255, 255, 0.16);
	border-radius: var(--ac-radius-sm);
}
#top_panel .map-btn a:hover,
#top_panel .cpanel-btn a:hover,
#top_panel .billing-btn a:hover { background-color: rgba(255, 255, 255, 0.26); opacity: 1; }

/* ===========================================================================
   BUTTONS AND FORMS  (application-wide)
   Semantic colours are deliberately untouched: .button.delete / .red / .warning
   and anything amber or red keeps its meaning.
   =========================================================================== */

input.button,
input.button-32 { border-radius: var(--ac-radius-sm); }

input.button:focus-visible,
input.button-32:focus-visible,
.inputbox:focus-visible { outline: none; box-shadow: var(--ac-focus); }

.inputbox:focus,
textarea.inputbox:focus,
.inputbox-search:focus {
	outline: none;
	border-color: var(--ac-primary-strong);
	box-shadow: var(--ac-focus);
}

/* ===========================================================================
   DIALOGS  (jQuery UI)
   =========================================================================== */

.ui-dialog { border-radius: var(--ac-radius); overflow: hidden; box-shadow: var(--ac-shadow); }
.ui-dialog .ui-dialog-titlebar { background-color: var(--ac-primary-strong); color: #FFFFFF; }
.ui-dialog .ui-dialog-titlebar .ui-dialog-title { color: #FFFFFF; font-weight: 600; }

/* ===========================================================================
   TABLES  (jqGrid) — scannable first, branded second
   =========================================================================== */

.ui-jqgrid .ui-jqgrid-htable th { background: var(--ac-background); color: var(--ac-text); }
.ui-jqgrid tr.jqgrow td { border-bottom: 1px solid var(--ac-border); }
.ui-jqgrid tr.jqgrow:hover td { background-color: var(--ac-mint-soft); }
.ui-jqgrid tr.ui-state-highlight td,
.ui-jqgrid tr.jqgrow.ui-state-highlight td { background-color: var(--ac-mint-soft); }

/* ===========================================================================
   PANELS / CARDS / HEADINGS
   =========================================================================== */

.title-block { color: var(--ac-primary-strong); }
#cpanel h1.title { color: var(--ac-primary-strong); }

#cpanel_user_list,
#cpanel_object_list,
#cpanel_unused_object_list,
#cpanel_billing_plan_list,
#cpanel_manage_server { border-top-color: var(--ac-primary-strong); }

.menu.ui-menu .first-item { border-top: 3px solid var(--ac-primary-strong); }

/* ===========================================================================
   MAP CHROME  (surrounding UI only)
   The map engine, markers, clustering and coordinate handling are untouched.
   =========================================================================== */

.leaflet-bar a {
	border-radius: var(--ac-radius-sm);
	color: var(--ac-text);
}
.leaflet-bar a:hover { background-color: var(--ac-mint-soft); }
.leaflet-popup-content-wrapper { border-radius: var(--ac-radius); box-shadow: var(--ac-shadow); }

/* ===========================================================================
   WHITE LOGO ON LIGHT SURFACES
   The official Always Connected mark is white-only. Anywhere the application
   places it on a white or near-white surface it would otherwise be invisible:
   the loading and blocking panels, the About dialog, the Branding and UI
   preview tiles, and the share / paypal / mobile pages. A brand-green plate
   behind the image solves all of them without touching the asset itself, so
   an administrator's uploaded logo still renders exactly as uploaded.
   =========================================================================== */

#loading_panel .logo,
#blocking_panel .logo,
#loading_panel_text .logo,
#blocking_panel_text .logo,
.ui-dialog .logo,
#cpanel_manage_server #cpanel_manage_server_logo,
#cpanel_manage_server #cpanel_manage_server_logo_small {
	background-color: var(--ac-primary-strong);
	padding: 14px 18px;
	border-radius: var(--ac-radius);
	box-sizing: border-box;
	max-width: 100%;
	height: auto;
}

/* Branding and UI preview tiles. Only the preview is restyled - the stored
   files are untouched. The favicon preview keeps a light tile, because that
   asset carries its own background. */
#cpanel .ui-img-container {
	background: var(--ac-background);
	border: 1px solid var(--ac-border);
	border-radius: var(--ac-radius);
	padding: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 86px;
	box-sizing: border-box;
}
#cpanel_manage_server #cpanel_manage_server_favicon {
	background: none;
	padding: 0;
	max-height: 56px;
	width: auto;
}

/* ===========================================================================
   CONTROL PANEL POLISH  (presentation only - no handler, no structure)
   =========================================================================== */

body#cpanel { background: var(--ac-background); color: var(--ac-text); }

#cpanel h1.title { color: var(--ac-primary-strong); }
#cpanel h1.title span { color: var(--ac-text-muted); }
#cpanel .title-block {
	color: var(--ac-primary-strong);
	border-bottom: 1px solid var(--ac-border);
	padding-bottom: 6px;
	margin-bottom: 10px;
}

/* Section cards: the lists already carry a coloured top border; make the rest
   of the surface agree with it. */
#cpanel_user_list,
#cpanel_object_list,
#cpanel_unused_object_list,
#cpanel_billing_plan_list,
#cpanel_manage_server {
	background: var(--ac-surface);
	border: 1px solid var(--ac-border);
	border-top-color: var(--ac-primary-strong);
	border-radius: var(--ac-radius);
}

/* jqGrid headers inside the control panel */
#cpanel .ui-jqgrid .ui-jqgrid-htable th,
#cpanel .ui-jqgrid .ui-jqgrid-labels th {
	background: var(--ac-background);
	color: var(--ac-text);
	border-bottom: 1px solid var(--ac-border);
}
#cpanel .ui-jqgrid tr.jqgrow:hover td { background-color: var(--ac-mint-soft); }

/* Action menus: the first item already carries a brand top border. */
#cpanel .menu.ui-menu .first-item { border-top-color: var(--ac-primary-strong); }
#cpanel .menu.ui-menu li a:hover { background-color: var(--ac-mint-soft); }

/* Form fields and buttons pick up the same treatment as the rest of the app. */
#cpanel .inputbox,
#cpanel .select { border-radius: var(--ac-radius-sm); }
#cpanel input.button { border-radius: var(--ac-radius-sm); }
:root{--ac-login-logo:url("https://alwaysconnected.tracka2b.nl/img/logo.svg?v=1791075997");}body#login{background-image:none;}