/* Created by Mercury AI Agent. */

/* character counter ring: SVG stroke, gray track + coloured arc */
.cc{
	position:absolute;
	right:.35rem;
	width:22px;
	height:22px;
	pointer-events:none;
	z-index:3;
}

.cc svg{
	display:block;
	width:100%;
	height:100%;
	overflow:visible;
}

.cc.cc-inp{
	top:50%;
	transform:translateY(-50%);
}

.cc.cc-ta{
	right:.35rem;
	bottom:.3rem;
}

/* gray track */
.cc .cc-tr{
	fill:none;
	stroke:#dee2e6;
	stroke-width:2.5;
}

/* progress arc, starts at 12 o'clock */
.cc .cc-pg{
	fill:none;
	stroke:#2563eb;
	stroke-width:2.5;
	stroke-linecap:round;
	stroke-dasharray:61.26;
	stroke-dashoffset:61.26;
	transform:rotate(-90deg);
	transform-origin:11px 11px;
	transition:stroke .15s ease, stroke-dashoffset .12s linear;
}

/* digits: SVG text, not affected by the browser minimum font size */
.cc .cc-tx{
	display:none;
	fill:#db2777;
	font-family:'Roboto',system-ui,Arial,sans-serif;
	font-size:9px;
	font-weight:700;
	letter-spacing:-.3px;
}

/* 30 or fewer left: pink arc + digits */
.cc.low .cc-pg{ stroke:#db2777; }
.cc.low .cc-tx{ display:block; }

/* nothing left: red arc + red 0 */
.cc.zero .cc-pg{ stroke:#dc3545; }
.cc.zero .cc-tx{ display:block; fill:#dc3545; }

/* 0 left: the field itself turns border-danger red */
[data-cc].cc-err{
	border-color:#dc3545 !important;
	box-shadow:inset 0 0 0 1px #dc3545 !important;
}

/* keep the value clear of the ring */
.form-floating>[data-cc]{
	padding-right:2.1rem;
}

.form-floating>textarea[data-cc]{
	padding-right:.75rem;
	padding-bottom:1.1rem;
}

/* selSM(): transparent trigger over the native select + custom option menu */
.form-floating{ position:relative; }

.cs-btn{
	position:absolute;
	inset:0;
	z-index:4;
	margin:0;
	padding:0;
	border:0;
	background:transparent;
	border-radius:inherit;
	cursor:pointer;
}

.cs-btn:focus-visible{
	outline:2px solid #2563eb;
	outline-offset:1px;
}

.cs-menu{
	position:fixed;
	z-index:1085;
	max-height:60vh;
	overflow-y:auto;
	overflow-x:hidden;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E") 0 0/140px 140px repeat,
		linear-gradient(135deg, rgba(255,253,255,.90) 0%, rgba(255,246,251,.88) 40%, rgba(255,240,247,.87) 70%, rgba(255,254,255,.90) 100%);
	background-blend-mode: overlay, normal;
	border:1px solid rgba(250,175,215,.45);
	border-radius:.5rem;
	box-shadow:0 .5rem 1.5rem rgba(220,60,140,.15),
		inset 0 0 0 1px rgba(255,255,255,.72),
		inset 0 1px 0 rgba(255,255,255,.95);
	-webkit-backdrop-filter:blur(10px) saturate(1.15);
	backdrop-filter:blur(10px) saturate(1.15);
	font-size:1.0rem;
}

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

.cs-item{
	padding:.35rem 1rem .35rem .75rem;
	overflow:visible;
	text-overflow:clip;
	cursor:pointer;
}

.cs-item.cs-hi{ background:rgba(255, 132, 204, 0.2); }
.cs-item[aria-selected=true]{ font-weight:600; }

.cs-item.cs-sep{
	background:transparent !important;
	color:rgb(110, 110, 133) !important;
	font-size:.8rem;
	cursor:default;
}

/* custom scrollbar inside the option menu — universal (desktop + mobile) */
@supports (-moz-appearance:none){
	.cs-menu{
		scrollbar-width:thin;
		scrollbar-color:rgba(255,120,190,.55) transparent;
	}
}
.cs-menu::-webkit-scrollbar{
	width:6px;
	height:6px;
}
.cs-menu::-webkit-scrollbar-button{
	display:none;
	width:0;
	height:0;
}
.cs-menu::-webkit-scrollbar-track{
	background:transparent;
	margin:4px 0;
}
.cs-menu::-webkit-scrollbar-thumb{
	border-radius:99px;
	border:1.5px solid transparent;
	background-image:
		linear-gradient(90deg, rgba(255,255,255,0) 14%, rgba(255,255,255,.55) 44%, rgba(255,255,255,.12) 62%, rgba(255,255,255,0) 92%),
		linear-gradient(rgba(255,150,200,.85), rgba(255,150,200,.85));
	background-clip:padding-box;
	box-shadow:inset 0 0 3px rgba(255,255,255,.35), 0 0 3px rgba(255,120,190,.40);
}
.cs-menu::-webkit-scrollbar-thumb:hover{
	background-image:
		linear-gradient(90deg, rgba(255,255,255,0) 14%, rgba(255,255,255,.72) 44%, rgba(255,255,255,.18) 62%, rgba(255,255,255,0) 92%),
		linear-gradient(rgba(255,130,190,1), rgba(255,130,190,1));
	background-clip:padding-box;
	box-shadow:inset 0 0 3px rgba(255,255,255,.45), 0 0 4px rgba(255,120,190,.55);
}
.cs-menu::-webkit-scrollbar-corner{
	background:transparent;
}

/* main window scrollbar (desktop only) — same shape, bc7 = MidnightBlue #191970 */
@media (hover:hover) and (pointer:fine){
	@supports (-moz-appearance:none){
		html{
			scrollbar-width:thin;
			scrollbar-color:rgba(25,25,112,.70) transparent;
		}
	}
	html::-webkit-scrollbar{
		width:15px;
		height:15px;
	}
	html::-webkit-scrollbar-button{
		display:none;
		width:0;
		height:0;
	}
	html::-webkit-scrollbar-track{
		background:linear-gradient(180deg,rgba(25,25,112,.04),rgba(25,25,112,.08));
		border-radius:99px;
	}
	/* shooting star: head at one end, glowing tail fading to the other end.
	   default + scroll-down = head at bottom (tail upward) */
	html::-webkit-scrollbar-thumb{
		border-radius:99px;
		border:3px solid transparent;
		background-clip:padding-box;
		background:
			linear-gradient(90deg, rgba(255,255,255,0) 20%, rgba(255,255,255,.55) 34%, rgba(255,255,255,.12) 52%, rgba(255,255,255,0) 68%),
			radial-gradient(circle at 50% 22%, rgba(255,255,255,.42) 0%, rgba(226,236,255,.22) 26%, rgba(140,165,255,0) 62%),
			linear-gradient(180deg, rgba(255,255,255,.34) 0%, rgba(240,246,255,.28) 45%, rgba(180,215,250,.20) 72%, rgba(135,206,250,.44) 100%),
			#3d34a5;
		box-shadow:inset 0 0 6px rgba(255,255,255,.45), 0 0 9px rgba(120,150,255,.55);
	}
	html.cs-up::-webkit-scrollbar-thumb{
		background:
			linear-gradient(90deg, rgba(255,255,255,0) 20%, rgba(255,255,255,.55) 34%, rgba(255,255,255,.12) 52%, rgba(255,255,255,0) 68%),
			radial-gradient(circle at 50% 22%, rgba(255,255,255,.42) 0%, rgba(226,236,255,.22) 26%, rgba(140,165,255,0) 62%),
			linear-gradient(180deg, rgba(255,255,255,.34) 0%, rgba(240,246,255,.28) 45%, rgba(180,215,250,.20) 72%, rgba(135,206,250,.44) 100%),
			#3d34a5;
	}
	html::-webkit-scrollbar-thumb:hover{
		filter:brightness(1.18);
	}
	html::-webkit-scrollbar-corner{
		background:transparent;
	}
}

/* no arrow buttons on any scrollbar (desktop browsers) */
@media (hover:hover) and (pointer:fine){
	::-webkit-scrollbar-button{
		display:none;
		width:0;
		height:0;
	}
}

/* acrylic panels: city list = lavender, client list = sky */
#city1,
#tcity1,
#ecity1{
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E") 0 0/140px 140px repeat,
		linear-gradient(135deg, #ffffff 0%, #fdfbff 40%, #faf6ff 70%, #ffffff 100%) !important;
	background-blend-mode: overlay, normal;
	border:1px solid rgba(196,183,244,.38) !important;
	box-shadow:0 .5rem 1.5rem rgba(110,90,195,.12),
		inset 0 0 0 1px rgba(255,255,255,.72),
		inset 0 1px 0 rgba(255,255,255,.95);
}

#clist1{
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E") 0 0/140px 140px repeat,
		linear-gradient(135deg, #ffffff 0%, #fafeff 40%, #f4fbff 70%, #ffffff 100%) !important;
	background-blend-mode: overlay, normal;
	border:1px solid rgba(160,205,245,.40) !important;
	box-shadow:0 .5rem 1.5rem rgba(30,110,200,.12),
		inset 0 0 0 1px rgba(255,255,255,.72),
		inset 0 1px 0 rgba(255,255,255,.95);
}

#city1,
#tcity1,
#ecity1,
#clist1{
	border-radius:.5rem;
	overflow:hidden;
	-webkit-backdrop-filter:blur(10px) saturate(1.15);
	backdrop-filter:blur(10px) saturate(1.15);
}

/* thin custom scrollbar inside the city / client list */
.gscroll{
	max-height:min(50vh,347px);
	overflow-y:auto;
	overflow-x:hidden;
	background:transparent;
}

@supports (-moz-appearance:none){
	.gscroll{
		scrollbar-width:thin;
		scrollbar-color:rgba(60,192,222,.55) transparent;
	}
}
.gscroll::-webkit-scrollbar{
	width:4px;
	height:4px;
}
.gscroll::-webkit-scrollbar-button{
	display:none;
	width:0;
	height:0;
}
.gscroll::-webkit-scrollbar-track{
	background:transparent;
	margin:4px 0;
}
.gscroll::-webkit-scrollbar-thumb{
	border:0;
	border-radius:99px;
	background-image:
		linear-gradient(90deg, rgba(255,255,255,0) 14%, rgba(255,255,255,.55) 44%, rgba(255,255,255,.12) 62%, rgba(255,255,255,0) 92%),
		linear-gradient(rgba(60,192,222,.55), rgba(60,192,222,.55));
	box-shadow:0 0 3px rgba(60,192,222,.35);
}
.gscroll::-webkit-scrollbar-thumb:hover{
	background-image:
		linear-gradient(90deg, rgba(255,255,255,0) 14%, rgba(255,255,255,.72) 44%, rgba(255,255,255,.18) 62%, rgba(255,255,255,0) 92%),
		linear-gradient(rgba(40,180,215,.80), rgba(40,180,215,.80));
	box-shadow:0 0 4px rgba(60,192,222,.45);
}
.gscroll::-webkit-scrollbar-corner{
	background:transparent;
}

/* city list scrollbar: light lavender, same hue as its panel */
@supports (-moz-appearance:none){
	#city1 .gscroll,
	#tcity1 .gscroll,
	#ecity1 .gscroll{
		scrollbar-color:rgba(170,150,238,.55) transparent;
	}
}
#city1 .gscroll::-webkit-scrollbar-thumb,
#tcity1 .gscroll::-webkit-scrollbar-thumb,
#ecity1 .gscroll::-webkit-scrollbar-thumb{
	background-image:
		linear-gradient(90deg, rgba(255,255,255,0) 14%, rgba(255,255,255,.55) 44%, rgba(255,255,255,.12) 62%, rgba(255,255,255,0) 92%),
		linear-gradient(rgba(170,150,238,.55), rgba(170,150,238,.55));
	box-shadow:0 0 3px rgba(150,125,230,.35);
}
#city1 .gscroll::-webkit-scrollbar-thumb:hover,
#tcity1 .gscroll::-webkit-scrollbar-thumb:hover,
#ecity1 .gscroll::-webkit-scrollbar-thumb:hover{
	background-image:
		linear-gradient(90deg, rgba(255,255,255,0) 14%, rgba(255,255,255,.72) 44%, rgba(255,255,255,.18) 62%, rgba(255,255,255,0) 92%),
		linear-gradient(rgba(155,132,235,.80), rgba(155,132,235,.80));
	box-shadow:0 0 4px rgba(150,125,230,.45);
}

/* admin sidebar (mobile drawer) */
.sidebar {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: 320px;
	max-width: 85vw;
	background: #fff;
	box-shadow: 2px 0 12px rgba(0,0,0,.15);
	z-index: 1040;
	display: flex;
	flex-direction: column;
	transform: translateX(-100%);
	transition: transform .25s ease;
}
.sidebar-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.4);
	z-index: 1039;
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s, visibility .2s;
}
.sidebar-open .sidebar {
	transform: translateX(0);
}
.sidebar-open .sidebar-backdrop {
	opacity: 1;
	visibility: visible;
}
.sidebar-header {
	flex-shrink: 0;
}
.sidebar-body {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.sidebar-footer {
	flex-shrink: 0;
}
.sidebar .accordion-button {
	padding: .6rem 1rem;
	font-size: .85rem;
	background: transparent;
	border: none;
	box-shadow: none;
}
.sidebar .accordion-button:not(.collapsed) {
	color: var(--bs-primary);
	background: rgba(var(--bs-primary-rgb), .08);
}
.sidebar .accordion-button::after {
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
	margin-left: auto;
	background-size: 1rem;
}
.sidebar .accordion-body {
	padding: 0;
}
.sidebar .accordion-body ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.sidebar .accordion-body .dropdown-item {
	display: block;
	padding: .5rem 1rem .5rem 2.5rem;
	font-size: .85rem;
	color: #333;
	text-decoration: none;
	border-left: 3px solid transparent;
	transition: background .15s, border-color .15s;
}
.sidebar .accordion-body .dropdown-item:hover,
.sidebar .accordion-body .dropdown-item:focus {
	background: rgba(var(--bs-primary-rgb), .06);
	border-left-color: var(--bs-primary);
	color: var(--bs-primary);
}
.sidebar .accordion-body .dropdown-item.active {
	background: rgba(var(--bs-primary-rgb), .1);
	border-left-color: var(--bs-primary);
	color: var(--bs-primary);
	font-weight: 500;
}
.sidebar .accordion-body hr {
	margin: .5rem 1rem;
	border-color: rgba(0,0,0,.08);
}
.sidebar .accordion-body .pc7 {
	padding-left: 1rem;
	padding-right: 1rem;
	font-size: .75rem;
}
.sidebar .btn-close {
	opacity: .8;
}
.sidebar .btn-close:hover {
	opacity: 1;
}

#sidebarToggle {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
#sidebarToggle:focus-visible {
	outline: 2px solid var(--bs-primary);
	outline-offset: 2px;
}

/* lock page scroll while the mobile drawer is open */
@media (max-width: 767.98px) {
	.sidebar-open {
		overflow: hidden;
	}
}
