/* ==================================================================
   Al Salam Bank - Branch Queue Monitor
   Brand colours taken from the logo:
     navy    #0B1730
     orange  #F2643B
   ================================================================== */

html, body {
	background-color: #F4F5F7;
}

body {
	font-family: Arial, Helvetica, sans-serif;
	color: #0B1730;
	-webkit-font-smoothing: antialiased;
}

/* ---------- header ---------- */

header {
	position: relative;
	min-height: 66px;
	background-color: #0B1730;
	padding: 14px 18px;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	justify-content: space-between;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	row-gap: 8px;
}

.header-brand {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.logo {
	height: 34px;
	width: auto;
	display: block;
	-ms-flex-negative: 0;
	flex-shrink: 0;
}

.welcome {
	display: none;
	color: #ffffff;
	font-size: 13px;
	opacity: .85;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Toggled from JS with addClass/removeClass rather than jQuery's
   show()/hide(), which would otherwise guess "block" for a <div> and
   break the flex layout below. Font size and width scale down smoothly
   with the viewport (via clamp) instead of the text disappearing on a
   phone-sized screen - it just gets smaller and truncates with an
   ellipsis if it still doesn't fit. */
.welcome.is-visible {
	display: inline-block;
	font-size: clamp(10px, 3vw, 13px);
	max-width: clamp(72px, 34vw, 240px);
}

.title, .nextTitle {
	margin: 0;
	padding: 18px 0;
	text-align: center;
	background-color: #0B1730;
	color: #ffffff;
}

.nextTitle {
	display: none;
}

/* ---------- header icon buttons (refresh / sign out) ---------- */

.header-actions {
	display: none;
	-ms-flex-negative: 0;
	flex-shrink: 0;
	margin: 0;
}

/* Toggled from JS with addClass/removeClass - see the note on .welcome
   above. This is the rule that actually lays the two icons out in a
   row; without it, showing this div the plain jQuery way stacks them
   instead of sitting them side by side. */
.header-actions.is-visible {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	gap: 10px;
}

.header-actions .icon-btn {
	display: block;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .22);
	text-align: center;
	-webkit-transition: background .15s ease, border-color .15s ease;
	transition: background .15s ease, border-color .15s ease;
}

.header-actions .icon-btn:hover,
.header-actions .icon-btn:focus {
	background: #F2643B;
	border-color: #F2643B;
}

.header-actions .icon-btn svg {
	width: 20px;
	height: 20px;
	margin-top: 9px;
	fill: none;
	stroke: #ffffff;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

#refresh.asb-spin svg {
	-webkit-animation: asb-rotate .8s linear infinite;
	animation: asb-rotate .8s linear infinite;
}

@-webkit-keyframes asb-rotate { to { -webkit-transform: rotate(360deg); } }
@keyframes asb-rotate { to { transform: rotate(360deg); } }

/* ---------- login ---------- */

.login {
	max-width: 420px;
	margin: 0 auto;
	padding-top: 42px;
}

.login-card {
	background: #ffffff;
	border-radius: 16px;
	padding: 30px 26px 26px;
	box-shadow: 0 1px 2px rgba(11, 23, 48, .06), 0 8px 24px rgba(11, 23, 48, .07);
}

.login-title {
	font-size: 21px;
	font-weight: bold;
	color: #0B1730;
	margin: 0;
}

.login-title::after {
	content: "";
	display: block;
	width: 34px;
	height: 3px;
	background: #F2643B;
	border-radius: 3px;
	margin-top: 10px;
}

.login-sub {
	font-size: 13px;
	color: #5C6478;
	margin: 12px 0 22px;
}

form {
	text-align: left;
}

.field-label {
	display: block;
	font-size: 11px;
	font-weight: bold;
	letter-spacing: .6px;
	text-transform: uppercase;
	color: #8A91A3;
	margin-bottom: 5px;
}

.login .form-control {
	border: 1px solid #E0E3EB;
	border-radius: 10px;
	box-shadow: none;
	background: #FAFBFC;
	font-size: 15px;
	color: #0B1730;
	height: auto;
	padding: 11px 13px;
	margin-bottom: 16px;
	-webkit-transition: border-color .15s ease, background .15s ease;
	transition: border-color .15s ease, background .15s ease;
}

.login .form-control:focus {
	border-color: #F2643B;
	background: #ffffff;
	outline: none;
}

.login .form-check {
	margin: 2px 0 20px;
	font-size: 13px;
	color: #5C6478;
}

.login .form-check label {
	font-weight: normal;
	margin-left: 6px;
	cursor: pointer;
}

.login button.btn {
	width: 100%;
	font-size: 15px;
	font-weight: bold;
	color: #ffffff;
	background: #F2643B;
	border: 0;
	border-radius: 10px;
	padding: 13px;
	-webkit-transition: background .15s ease;
	transition: background .15s ease;
}

.login button.btn:hover,
.login button.btn:focus,
.login button.btn:active {
	background: #D9502A;
	color: #ffffff;
}

.login button.link-btn {
	display: block;
	margin: 14px auto 0;
	padding: 4px 8px;
	background: none;
	border: 0;
	color: #F2643B;
	font-size: 14px;
	cursor: pointer;
}

.login button.link-btn:hover,
.login button.link-btn:focus {
	text-decoration: underline;
}

/* ---------- loading ---------- */

.loadingScreen {
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	display: none;
	z-index: 1000;
	background-color: rgba(244, 245, 247, .72);
}

.loader {
	text-align: center;
	height: 100%;
}

.spinner {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 38px;
	height: 38px;
	margin: -19px 0 0 -19px;
	border: 3px solid #E0E3EB;
	border-top-color: #F2643B;
	border-radius: 50%;
	-webkit-animation: asb-rotate .7s linear infinite;
	animation: asb-rotate .7s linear infinite;
}

.small_loader {
	display: none;
}

.main {
	display: none;
}


/* ==================================================================
   Dashboard (post-login). Scoped to body.asb-mode, a class added by
   init() once sign-in succeeds.
   ================================================================== */

body.asb-mode .container {
	max-width: 900px;
	padding: 18px 12px 48px;
}

/* ---- summary tiles with infographics ---- */

.asb-tiles {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	margin: 0 -5px 12px;
}

.asb-tile {
	-webkit-box-flex: 1;
	-ms-flex: 1 1 calc(50% - 10px);
	flex: 1 1 calc(50% - 10px);
	background: #ffffff;
	border-radius: 14px;
	padding: 12px 14px;
	margin: 0 5px 10px;
	box-shadow: 0 1px 2px rgba(11, 23, 48, .05);
}

.asb-tile-l {
	font-size: 11px;
	font-weight: bold;
	letter-spacing: .5px;
	text-transform: uppercase;
	color: #8A91A3;
}

.asb-tile-body {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: end;
	-ms-flex-align: end;
	align-items: flex-end;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	justify-content: space-between;
	margin-top: 4px;
}

.asb-tile-v {
	font-size: 26px;
	font-weight: bold;
	color: #0B1730;
	line-height: 1.1;
}

.asb-unit {
	font-size: 11px;
	font-weight: normal;
	color: #8A91A3;
}

.asb-graph {
	-ms-flex-negative: 0;
	flex-shrink: 0;
	margin-left: 10px;
	line-height: 0;
}

.asb-red   { color: #C62828; }
.asb-green { color: #0F6E56; }
.asb-muted { color: #8A91A3; }

/* ---- alert banners ---- */

.asb-alert {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: start;
	-ms-flex-align: start;
	align-items: flex-start;
	background: #ffffff;
	border-left: 4px solid #F2643B;
	border-radius: 10px;
	padding: 11px 14px;
	margin-bottom: 8px;
	font-size: 13px;
	line-height: 1.45;
	color: #3A2015;
	box-shadow: 0 1px 2px rgba(11, 23, 48, .05);
}

.asb-alert:last-of-type {
	margin-bottom: 16px;
}

.asb-alert strong {
	font-weight: bold;
	color: #0B1730;
}

.asb-alert .asb-i {
	color: #F2643B;
	margin-right: 10px;
	-ms-flex-negative: 0;
	flex-shrink: 0;
	margin-top: 1px;
}

/* ---- inline icons ---- */

.asb-i {
	width: 14px;
	height: 14px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: -2px;
}

.asb-i-lg {
	width: 17px;
	height: 17px;
}

/* ---- branch cards (jQuery UI accordion headers) ---- */

body.asb-mode #accordions {
	border: 0;
}

body.asb-mode #accordions h3.asb-branch,
body.asb-mode #accordions .ui-accordion-header {
	display: block;
	background: #ffffff !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 14px !important;
	margin: 0 0 10px !important;
	padding: 14px 16px !important;
	color: #0B1730 !important;
	font-family: Arial, Helvetica, sans-serif !important;
	font-weight: normal;
	font-size: 100%;
	cursor: pointer;
	outline: none;
	box-shadow: 0 1px 2px rgba(11, 23, 48, .05);
}

body.asb-mode #accordions .ui-accordion-header-icon {
	display: none !important;
}

body.asb-mode #accordions h3.asb-branch.ui-state-active {
	margin-bottom: 0 !important;
	border-bottom-left-radius: 0 !important;
	border-bottom-right-radius: 0 !important;
}

body.asb-mode #accordions h3.asb-branch.asb-closed {
	background: #ECEEF2 !important;
	box-shadow: none;
}

body.asb-mode #accordions h3.asb-branch.asb-closed .asb-name {
	color: #6E7688;
}

.asb-head {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
}

.asb-name {
	font-size: 16px;
	font-weight: bold;
	color: #0B1730;
	-webkit-box-flex: 1;
	-ms-flex: 1 1 auto;
	flex: 1 1 auto;
}

.asb-head::after {
	content: "";
	width: 8px;
	height: 8px;
	border-right: 2px solid #A7AEBE;
	border-bottom: 2px solid #A7AEBE;
	-webkit-transform: rotate(45deg);
	transform: rotate(45deg);
	margin: -4px 0 0 12px;
	-ms-flex-negative: 0;
	flex-shrink: 0;
	-webkit-transition: -webkit-transform .2s ease;
	transition: transform .2s ease;
}

body.asb-mode #accordions h3.asb-branch.ui-state-active .asb-head::after {
	-webkit-transform: rotate(-135deg);
	transform: rotate(-135deg);
	margin-top: 2px;
}

/* ---- status pills ---- */

.asb-pill {
	font-size: 10px;
	font-weight: bold;
	letter-spacing: .3px;
	line-height: 1.6;
	padding: 3px 10px;
	border-radius: 20px;
	white-space: nowrap;
	margin-left: 8px;
	-ms-flex-negative: 0;
	flex-shrink: 0;
}

.asb-pill-clear    { background: #E4F3EE; color: #0F6E56; }
.asb-pill-busy     { background: #FDECE4; color: #8C3616; }
.asb-pill-critical { background: #FBEAE8; color: #9E1F1F; }
.asb-pill-closed   { background: #DDE1E9; color: #6E7688; }

/* ---- branch metrics row ---- */

.asb-meta {
	display: block;
	margin-top: 10px;
	font-size: 12px;
	color: #5C6478;
}

.asb-meta > span {
	margin-right: 15px;
	white-space: nowrap;
}

/* ---- drill-down panel ---- */

body.asb-mode #accordions .ui-accordion-content {
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 0 10px !important;
	height: auto !important;
	overflow: hidden !important;
	/* jQuery UI's own stylesheet sets .ui-widget to font-family: Calibri
	   with no fallback. Calibri isn't installed on iOS/Mac, so without
	   this override every counter/staff name here silently drops to
	   the browser's default serif font instead of matching the rest of
	   the page, which is why staff names looked like a different font
	   from everything else. */
	font-family: Arial, Helvetica, sans-serif !important;
}

.asb-panel {
	background: #ffffff;
	border-top: 1px solid #EDEFF3;
	border-radius: 0 0 14px 14px;
	padding: 4px 16px 10px;
	box-shadow: 0 1px 2px rgba(11, 23, 48, .05);
}

.asb-panel-head {
	font-size: 11px;
	font-weight: bold;
	color: #8A91A3;
	text-transform: uppercase;
	letter-spacing: .6px;
	padding: 10px 0 3px;
}

/* ---- collapsed-by-default counters row, inside the expanded branch
   panel, below the "By queue" list ---- */

.asb-subhead {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	justify-content: space-between;
	cursor: pointer;
	padding: 10px 2px 8px;
	margin-top: 4px;
	border-top: 1px solid #EDEFF3;
	font-size: 11px;
	font-weight: bold;
	color: #8A91A3;
	text-transform: uppercase;
	letter-spacing: .6px;
}

.asb-chev {
	width: 14px;
	height: 14px;
	color: #A7AEBE;
	-ms-flex-negative: 0;
	flex-shrink: 0;
	-webkit-transition: -webkit-transform .2s ease;
	transition: transform .2s ease;
}

.asb-subhead.is-open .asb-chev {
	-webkit-transform: rotate(180deg);
	transform: rotate(180deg);
}

.asb-staff-list {
	display: none;
}

.asb-staff-list.is-open {
	display: block;
}

/* ---- branch-wide stat grid, inside the branch's <h3> header itself so
   it shows whether the branch is expanded or not (Today), or inside the
   expanded Yesterday panel (with icons, three tiles instead of four -
   see the :has() rule further down) ---- */

.asb-stats {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #EDEFF3;
}

body.asb-mode #accordions h3.asb-branch.asb-closed .asb-stats {
	border-top-color: #DDE1E9;
}

#dayView .asb-panel .asb-stats {
	/* Inside the Yesterday panel this isn't the first thing under a
	   header line the way it is on Today's card - no border needed, the
	   panel's own top border already separates it from the branch name. */
	margin-top: 0;
	padding: 4px 0 6px;
	border-top: 0;
}

.asb-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	row-gap: 10px;
	column-gap: 6px;
}

.asb-stats-grid.no-icon .asb-stat-v {
	font-size: 16px;
}

.asb-stat-row {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	gap: 5px;
}

.asb-stat-row .asb-i {
	width: 13px;
	height: 13px;
	color: #A7AEBE;
	-ms-flex-negative: 0;
	flex-shrink: 0;
}

.asb-stat-v {
	font-size: 14px;
	font-weight: bold;
	color: #0B1730;
}

.asb-stat-l {
	display: block;
	font-size: 10px;
	color: #8A91A3;
	margin-top: 1px;
}

/* Each queue is its own bordered card, two cards per row, so a branch
   with an odd number of queues just leaves the last slot empty rather
   than stretching one card full-width. */
.asb-queue-list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 6px;
}

.asb-queue-card {
	/* Same white as the panel around it (.asb-panel), not a separate
	   shade, so each card reads as part of the one white card rather
	   than a floating box sitting outside it. */
	border: 1px solid #EDEFF3;
	border-radius: 10px;
	padding: 10px 10px 9px;
	background: #ffffff;
	min-width: 0;
}

.asb-queue-name {
	display: -webkit-box;
	font-size: 11.5px;
	font-weight: bold;
	color: #0B1730;
	margin-bottom: 8px;
	line-height: 1.3;
	/* long queue names wrap to two lines and then clip, so every card
	   in a row stays the same height */
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.asb-queue-stats {
	/* Waiting / Served / Avg Wait side by side on one line - "Open" was
	   dropped so three fields fit without wrapping to a second row. */
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 6px;
}

.asb-queue-stat {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-orient: vertical;
	-webkit-box-direction: normal;
	-ms-flex-direction: column;
	flex-direction: column;
}

.asb-queue-stat-v {
	font-size: 13px;
	font-weight: bold;
	color: #0B1730;
}

.asb-queue-stat-l {
	font-size: 9.5px;
	color: #8A91A3;
	margin-top: 1px;
}

@media (max-width: 380px) {
	.asb-stats-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.asb-queue-list {
		grid-template-columns: 1fr;
	}
}

.asb-empty {
	font-size: 13px;
	color: #8A91A3;
	padding: 12px 0;
	margin: 0;
}

.asb-staff {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	padding: 10px 0;
	border-top: 1px solid #F4F5F7;
}

.asb-avatar {
	width: 33px;
	height: 33px;
	border-radius: 50%;
	background: #0B1730;
	color: #ffffff;
	font-size: 11px;
	font-weight: bold;
	line-height: 33px;
	text-align: center;
	margin-right: 11px;
	-ms-flex-negative: 0;
	flex-shrink: 0;
}

.asb-staff-txt {
	-webkit-box-flex: 1;
	-ms-flex: 1 1 auto;
	flex: 1 1 auto;
	min-width: 0;
}

.asb-staff-name {
	display: block;
	font-size: 13px;
	font-weight: bold;
	color: #0B1730;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.asb-staff-sub {
	display: block;
	font-size: 11px;
	color: #8A91A3;
	margin-top: 1px;
}

.asb-ticket {
	display: inline-block;
	font-size: 11px;
	font-weight: bold;
	color: #8C3616;
	background: #FDECE4;
	border-radius: 20px;
	padding: 2px 10px;
	margin-top: 5px;
	white-space: nowrap;
}

.asb-staff-off .asb-ticket {
	display: none;
}

.asb-status {
	font-size: 11px;
	color: #5C6478;
	white-space: nowrap;
	-ms-flex-negative: 0;
	flex-shrink: 0;
}

.asb-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #0F6E56;
	margin-right: 5px;
}

.asb-dot-off {
	background: #C3C8D2;
}

.asb-staff-off .asb-avatar {
	background: #E4E7ED;
	color: #9AA1B1;
}

.asb-staff-off .asb-staff-name {
	color: #8A91A3;
}

/* ---- wider screens ---- */

@media (min-width: 640px) {
	.asb-tile {
		-ms-flex: 1 1 calc(25% - 10px);
		flex: 1 1 calc(25% - 10px);
	}

	.asb-meta > span {
		margin-right: 22px;
		font-size: 13px;
	}

	.asb-name {
		font-size: 17px;
	}

	.logo {
		height: 38px;
	}
}

@media (max-width: 420px) {
	/* Very narrow phones: give the shrinking welcome text (see
	   .welcome.is-visible above) a bit more room by tightening the
	   spacing around it, instead of hiding it. */
	.header-brand {
		gap: 8px;
	}

	header {
		padding: 12px 12px;
	}
}


/* ==================================================================
   Yesterday / Today switcher and the slide between them
   ================================================================== */

body.asb-mode {
	/* the sliding view must never cause a sideways scrollbar */
	overflow-x: hidden;
}

.asb-days {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	background: #ffffff;
	border-radius: 12px;
	padding: 4px;
	margin: 0 0 12px;
	box-shadow: 0 1px 2px rgba(11, 23, 48, .05);
}

.asb-day {
	-webkit-box-flex: 1;
	-ms-flex: 1 1 50%;
	flex: 1 1 50%;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: center;
	-ms-flex-pack: center;
	justify-content: center;
	gap: 7px;
	border: 0;
	background: transparent;
	border-radius: 9px;
	padding: 10px 8px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: bold;
	color: #5C6478;
	cursor: pointer;
	-webkit-transition: background .15s ease, color .15s ease;
	transition: background .15s ease, color .15s ease;
}

.asb-day:hover {
	color: #0B1730;
}

.asb-day.is-active {
	background: #0B1730;
	color: #ffffff;
}

.asb-day:focus {
	outline: none;
}

.asb-day:focus-visible {
	outline: 2px solid #F2643B;
	outline-offset: 2px;
}

.asb-day .asb-i {
	width: 15px;
	height: 15px;
	stroke-width: 2.2;
	vertical-align: 0;
}

.asb-day-sub {
	font-size: 12px;
	font-weight: normal;
	opacity: .75;
	white-space: nowrap;
}

.asb-live-dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #F2643B;
	margin-right: 5px;
	vertical-align: 1px;
}

.asb-day-note {
	font-size: 12px;
	color: #5C6478;
	margin: 0 2px 10px;
}

#dayView {
	-webkit-transition: -webkit-transform .24s ease, opacity .24s ease;
	transition: transform .24s ease, opacity .24s ease;
}

#dayView.asb-off-left {
	-webkit-transform: translateX(-35%);
	transform: translateX(-35%);
	opacity: 0;
}

#dayView.asb-off-right {
	-webkit-transform: translateX(35%);
	transform: translateX(35%);
	opacity: 0;
}

#dayView.asb-no-anim {
	-webkit-transition: none;
	transition: none;
}

/* The Yesterday panel has three stats, not four */
#dayView .asb-stats-grid:has(> .asb-stat:nth-child(3):last-child) {
	grid-template-columns: repeat(3, 1fr);
}

@media (prefers-reduced-motion: reduce) {
	#dayView {
		-webkit-transition: opacity .15s linear;
		transition: opacity .15s linear;
	}

	#dayView.asb-off-left,
	#dayView.asb-off-right {
		-webkit-transform: none;
		transform: none;
	}
}

/* Durations like "35m 41s" stay on one line in the queue cards */
.asb-queue-stat-v.asb-dur {
	white-space: nowrap;
	font-size: 12px;
	letter-spacing: -.2px;
}

/* ---- Past days button (compact) + Today (fills the rest) ---- */

.asb-past-wrap {
	position: relative;
	-webkit-box-flex: 0;
	-ms-flex: 0 0 auto;
	flex: 0 0 auto;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
}

.asb-day-past {
	gap: 5px;
	padding: 10px 12px;
	font-size: 13px;
	white-space: nowrap;
}

.asb-day-today {
	-webkit-box-flex: 1;
	-ms-flex: 1 1 auto;
	flex: 1 1 auto;
}

.asb-day-past .asb-caret {
	width: 13px;
	height: 13px;
	-webkit-transition: -webkit-transform .2s ease;
	transition: transform .2s ease;
}

.asb-day-past[aria-expanded="true"] .asb-caret {
	-webkit-transform: rotate(180deg);
	transform: rotate(180deg);
}

/* ---- Day picker: bottom sheet on phones ---- */

.asb-sheet-backdrop {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1100;
	background: rgba(11, 23, 48, .45);
	opacity: 0;
	-webkit-transition: opacity .2s ease;
	transition: opacity .2s ease;
}

.asb-sheet-backdrop.is-open {
	opacity: 1;
}

.asb-sheet {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1101;
	background: #ffffff;
	border-radius: 18px 18px 0 0;
	padding: 6px 8px calc(12px + env(safe-area-inset-bottom, 0px));
	max-height: 80vh;
	overflow-y: auto;
	box-shadow: 0 -8px 30px rgba(11, 23, 48, .18);
	-webkit-transform: translateY(100%);
	transform: translateY(100%);
	-webkit-transition: -webkit-transform .24s ease;
	transition: transform .24s ease;
}

.asb-sheet.is-open {
	-webkit-transform: translateY(0);
	transform: translateY(0);
}

/* small grab handle so it reads as a sheet */
.asb-sheet::before {
	content: "";
	display: block;
	width: 38px;
	height: 4px;
	border-radius: 4px;
	background: #DDE1E9;
	margin: 4px auto 6px;
}

.asb-sheet-head {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	justify-content: space-between;
	padding: 4px 8px 8px 12px;
	font-size: 15px;
	font-weight: bold;
	color: #0B1730;
}

.asb-sheet-close {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: #F4F5F7;
	color: #5C6478;
	cursor: pointer;
}

.asb-sheet-close .asb-i {
	width: 16px;
	height: 16px;
	vertical-align: middle;
}

.asb-sheet-item {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	width: 100%;
	min-height: 52px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	padding: 0 14px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 15px;
	color: #0B1730;
	text-align: left;
	cursor: pointer;
}

.asb-sheet-item + .asb-sheet-item {
	margin-top: 2px;
}

.asb-sheet-item:hover {
	background: #F4F5F7;
}

.asb-sheet-item:focus {
	outline: none;
}

.asb-sheet-item:focus-visible {
	outline: 2px solid #F2643B;
	outline-offset: -2px;
}

.asb-sheet-wd {
	font-weight: bold;
	-webkit-box-flex: 1;
	-ms-flex: 1 1 auto;
	flex: 1 1 auto;
}

.asb-sheet-date {
	color: #5C6478;
	font-size: 14px;
	white-space: nowrap;
}

.asb-sheet-check {
	width: 18px;
	height: 18px;
	margin-left: 12px;
	stroke-width: 2.4;
	color: #F2643B;
	visibility: hidden;
}

.asb-sheet-item.is-selected {
	background: #0B1730;
	color: #ffffff;
}

.asb-sheet-item.is-selected .asb-sheet-date {
	color: rgba(255, 255, 255, .75);
}

.asb-sheet-item.is-selected .asb-sheet-check {
	visibility: visible;
}

/* ---- Day picker: popover under the button on wider screens ---- */

@media (min-width: 640px) {
	.asb-sheet-backdrop {
		background: transparent;
	}

	.asb-sheet {
		position: absolute;
		top: calc(100% + 10px);
		left: -4px;
		right: auto;
		bottom: auto;
		width: 280px;
		border-radius: 14px;
		padding: 6px;
		max-height: none;
		box-shadow: 0 2px 4px rgba(11, 23, 48, .06), 0 12px 32px rgba(11, 23, 48, .16);
		opacity: 0;
		-webkit-transform: translateY(-6px);
		transform: translateY(-6px);
		-webkit-transition: opacity .16s ease, -webkit-transform .16s ease;
		transition: opacity .16s ease, transform .16s ease;
	}

	.asb-sheet.is-open {
		opacity: 1;
		-webkit-transform: translateY(0);
		transform: translateY(0);
	}

	.asb-sheet::before,
	.asb-sheet-head {
		display: none;
	}

	.asb-sheet-item {
		min-height: 42px;
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.asb-sheet,
	.asb-sheet-backdrop {
		-webkit-transition: none;
		transition: none;
	}
}

/* Durations like "35m 41s" stay on one line in the queue cards */
.asb-queue-stat-v.asb-dur {
	white-space: nowrap;
	font-size: 12px;
	letter-spacing: -.2px;
}

/* ---- Past-day dropdown (compact) + Today (fills the rest) ---- */

.asb-day-past {
	-webkit-box-flex: 0;
	-ms-flex: 0 0 auto;
	flex: 0 0 auto;
	position: relative;
	gap: 4px;
	padding: 0 10px;
	margin: 0;
}

.asb-day-today {
	-webkit-box-flex: 1;
	-ms-flex: 1 1 auto;
	flex: 1 1 auto;
}

.asb-day-past select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 13px;
	padding: 10px 0;
	cursor: pointer;
	max-width: 150px;
	outline: none;
}

/* Dropdown options use the system's own colours, not the tab's */
.asb-day-past select option {
	color: #0B1730;
	background: #ffffff;
}

.asb-day-past .asb-caret {
	width: 13px;
	height: 13px;
	pointer-events: none;
}

.asb-day-past:focus-within {
	outline: 2px solid #F2643B;
	outline-offset: 2px;
}

/* ---- Today's branch grid: all five figures on one line ----
   Waiting / Being Served / Total Served / Avg Wait / Avg Serving,
   equal columns on every screen size. Labels may wrap to two lines on
   a phone; the numbers stay on one. */
.asb-stats-grid.asb-stats-5,
#dayView .asb-stats-grid.asb-stats-5 {
	grid-template-columns: repeat(5, minmax(0, 1fr));
	column-gap: 6px;
	-webkit-box-align: start;
	align-items: start;
}

.asb-stats-grid.asb-stats-5 .asb-stat-v {
	white-space: nowrap;
}

.asb-stats-grid.asb-stats-5 .asb-stat-l {
	line-height: 1.25;
}

@media (max-width: 420px) {
	.asb-stats-grid.asb-stats-5 .asb-stat-v {
		font-size: 14px;
		letter-spacing: -.2px;
	}

	.asb-stats-grid.asb-stats-5 .asb-stat-l {
		font-size: 9.5px;
	}
}

/* ---- Queue cards with four figures ----
   Phones: two by two. Wider screens: one row of four. */
.asb-queue-stats.asb-queue-stats-4 {
	grid-template-columns: repeat(2, 1fr);
	row-gap: 6px;
}

@media (min-width: 640px) {
	.asb-queue-stats.asb-queue-stats-4 {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Note under Today's summary tiles */
.asb-day-note.asb-day-note-live {
	font-size: 11px;
	color: #8A91A3;
	margin-top: -4px;
}

/* ---- Sign-in state ----
   Until Firebase has said whether someone is already signed in on this
   device, the login form stays hidden (the loading spinner shows
   instead), so a signed-in user never sees it flash up on refresh. */
body.auth-pending .login {
	display: none;
}

body.auth-pending .loadingScreen {
	display: block;
}

/* "Welcome, <name>" - tap to change the name. The name is saved on the
   person's Firebase account, so it stays the same across deployments. */
.welcome.is-visible {
	cursor: pointer;
}

.welcome-edit {
	display: none;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	gap: 6px;
}

.welcome-edit.is-visible {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
}

.welcome-edit input {
	width: clamp(90px, 34vw, 180px);
	height: 30px;
	padding: 2px 8px;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, .35);
	background: rgba(255, 255, 255, .1);
	color: #ffffff;
	font-size: 13px;
}

.welcome-edit button {
	height: 30px;
	padding: 0 10px;
	border: 0;
	border-radius: 8px;
	background: #F2643B;
	color: #ffffff;
	font-size: 12px;
	font-weight: bold;
}

.welcome.is-visible.is-editing {
	display: none;
}

/* "Sort by" menu under Today's summary tiles, right-aligned */
.asb-sortbar {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-pack: end;
	-ms-flex-pack: end;
	justify-content: flex-end;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	gap: 8px;
	margin: 0 2px 10px;
}

.asb-sortbar label {
	font-size: 12px;
	font-weight: bold;
	color: #5C6478;
	margin: 0;
}

.asb-sortbar select {
	height: 34px;
	padding: 0 30px 0 12px;
	border: 1px solid #DDE1E8;
	border-radius: 10px;
	background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B1730' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	color: #0B1730;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
