body {
	margin: 0;
	background-color: #DEDEDE;
}

div.bg {
	margin: 0px;
	max-width: 1280px;
	width: 100%;
	overflow-x: hidden;
	margin-left: auto;
    margin-right: auto;
	background-color: #FFFFFF;
	font-family: Calibri, Arial;
	border: 0px solid black;
}

div.menu {
	width: 98%;
	margin-bottom: 1vw;
	display: table;
}

img.menu {
	max-width: 70%;
	margin-left: 5vw;
}

div.menu-logo {
	display: table-cell;
	width: 35%;
}

div.menu-text {
	display: table-cell;
	text-align: right;
	width: 65%;
	vertical-align: bottom;
	padding-bottom: 0.8vw;
}

a.menu-text {
	color: #FF0000;
	font-weight: bold;
	text-decoration: none;
	font-size: 2vw;
	font-style: normal;
	padding-right: 1.8vw;
}

a.menu-text:hover {
	font-style: italic;
}

br.menu-linebreak {
	/* Only used once the nav links stack onto their own line(s) — forces
	   the wrap to happen right after "WhatsApp API" instead of wherever
	   the browser would otherwise break the inline links. */
	display: none;
}

div.banner {
	width: 100%;
	height: 34vw;
	background-size: 108%;
	text-align: center;
}

div.login {
	width: 100%;
	height: 17vw;
	background-size: 100%;
	background-position: center;
	text-align: center;
	position: relative;
}

div.ticker {
	width: 100%;
	padding: 0.5vw;
	margin-top: 11vw;
	background-color: #FFFFFF;
	opacity: .8;
	filter: alpha(opacity=80); /* For IE8 and earlier */
	position: absolute;
	font-size: 1.7vw;
}

div.content-header, h1.content-header, h2.content-header {
	text-align: center;
	width: 100%;
	color: #FF0000;
	font-weight: bold;
	font-size: 3vw;
	padding-top: 2.5vw;
}

div.content {
	display: table;
	width: 95%;
	margin-left: auto;
    margin-right: auto;
}

div.content-text {
	display: table-cell;
	font-size: 1.7vw;
	padding: 2.5vw;
	vertical-align: top;
	text-align: justify;
}

div.cell-text {
	font-size: 1.7vw;
	vertical-align: top;
	text-align: justify;
}

span.cell-hint {
	font-size: 1.3vw;
	color: #888888;
	font-style: italic;
}

div.cell-text-messages {
	font-size: 1.7vw;
	vertical-align: top;
	text-align: justify;
	overflow: auto;
	width: 30vw;
}

/* Address book checkbox list (sms_compose-content.php / control_sms_compose-
   content.php) — flex row so a wrapped second line of label text indents
   past the checkbox instead of falling back to the left edge. */
label.addressbook-entry {
	display: flex;
	align-items: flex-start;
	gap: 0.5vw;
	font-size: 1.7vw;
	margin-bottom: 0.3vw;
}

label.addressbook-entry input[type="checkbox"] {
	flex: 0 0 auto;
	margin-top: 0.2vw;
}

a.cell-text {
	color: #FF0000;
	text-decoration: none;
	font-size: 1.7vw;
	font-style: normal;
}

a.cell-text:hover {
	font-style: italic;
}

.textfield {
	width: 30%;
	background-color: #FFFFFF;
	font-family: Calibri, Arial;
	font-size: 2vw;
	padding: 0.5vw;
	border: 1px solid red;
}

.submitbutton {
	background: #d10b0b;
	font-family: Calibri, Arial;
	font-size: 2vw;
	color: #FFFFFF;
	padding: 0.5vw;
	border: 1px solid red;
	padding-left: 2vw;
	padding-right: 2vw;
}

.submitbutton:hover {
	background: #c41212;
}

.cell-textfield {
	width: 40%;
	background-color: #FFFFFF;
	font-family: Calibri, Arial;
	font-size: 1.7vw;
	padding: 0.5vw;
	border: 1px solid red;
}

/* Search/filter dropdowns sitting alone in their own feature-box (e.g.
   control_users-content.php's company search, control_invoices-content.php's
   company filter) — narrower than the default .cell-textfield width since
   there's no label column eating up space next to it. */
.filter-input {
	width: 30%;
}

.cell-smalltextfield {
	width: 7%;
	background-color: #FFFFFF;
	font-family: Calibri, Arial;
	font-size: 1.7vw;
	padding-left: 0.5vw;
	padding-right: 0.5vw;
	border: 1px solid red;
}

.cell-submitbutton {
	background: #d10b0b;
	font-family: Calibri, Arial;
	font-size: 1.7vw;
	color: #FFFFFF;
	padding: 0.5vw;
	border: 1px solid red;
	padding-left: 2vw;
	padding-right: 2vw;
}

.cell-submitbutton:hover {
	background: #c41212;
}

a.content-text {
	color: #FF0000;
	text-decoration: none;
	font-size: 1.7vw;
	font-style: normal;
}

a.content-text:hover {
	font-style: italic;
}

img.icon {
	max-width: 100%;
}

img.clients_logo {
	max-width: 80%;
}

div.box-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5vw;
	justify-content: center;
	align-items: stretch;
	width: 100%;
}

div.box-grid-4 > div.feature-box, div.box-grid-4 > a.feature-box {
	flex: 0 1 calc((100% - 4.5vw) / 4);
	display: flex;
	flex-direction: column;
}

div.box-grid-4 a.cta-button, div.box-grid-4 span.cta-button {
	font-size: 1.4vw;
	padding: 0.8vw 2vw;
	white-space: nowrap;
	margin-top: auto;
	align-self: center;
}

div.box-grid-4 > a.feature-box > div {
	margin-bottom: 1.5vw;
}

div.feature-box, a.feature-box {
	display: block;
	flex: 0 1 calc((100% - 3vw) / 3);
	box-sizing: border-box;
	background-color: #FAFAFA;
	border: 1px solid #EAEAEA;
	border-radius: 10px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	padding: 1.5vw;
	text-align: left;
	font-size: 1.7vw;
	line-height: 1.5;
	color: inherit;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

a.feature-box, div.feature-box.cta-box, div.feature-box.feature-box-clickable {
	cursor: pointer;	/* only the boxes that are actually clickable (links or onclick) get the pointer cursor */
}

div.feature-box.logo-box {
	background-color: #FFFFFF;
	height: 9vw;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}

div.feature-box.logo-box a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

div.feature-box.logo-box img {
	display: block;
	margin: 0 auto;
	max-width: 80%;
	max-height: 70%;
	width: auto;
	height: auto;
}

div.feature-box:hover, a.feature-box:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
	border-color: #d10b0b;
	text-decoration: none;
}

div.feature-box b, a.feature-box b {
	color: #FF0000;
	display: block;
	margin-bottom: 0.5vw;
}

div.feature-box b.menu-title, a.feature-box b.menu-title {
	color: #333333;
}

a.cta-button, span.cta-button {
	display: inline-block;
	background: #e05c52;
	text-shadow: 1px 1px 3px #666666;
	font-family: Calibri, Arial;
	color: #ffffff;
	font-size: 2vw;
	padding: 1vw 5vw 1vw 5vw;
	text-decoration: none;
	border: 0px;
	transition: background 0.15s ease, transform 0.15s ease;
}

div.feature-box.cta-box, a.feature-box.cta-box {
	background-color: #FFF1F0;
	border-color: #F3B9B5;
	flex: none;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	margin: 1.5vw auto;
}

div.feature-box.promo-box {
	background-color: #FFF8E1;
	border-color: #F3DA8D;
}

a.cta-button:hover, span.cta-button:hover {
	background: #c94840;
	transform: translateY(-2px);
	text-decoration: none;
}

/* For rows with multiple cta-buttons side by side (e.g. Previous / Admin
   Panel / Next) — keeps them on one line, with mobile breakpoints below
   shrinking the buttons further so 3 still fit without wrapping. */
div.button-row {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
	gap: 1vw;
}

div.button-row a.cta-button, div.button-row span.cta-button {
	white-space: nowrap;
	margin: 0;
}

div.box-list {
	display: flex;
	flex-direction: column;
	gap: 1.5vw;
	width: 100%;
}

div.box-grid-2 {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5vw;
	justify-content: center;
	align-items: stretch;
	width: 100%;
}

div.box-grid-2 > div.feature-box-horizontal, div.box-grid-2 > a.feature-box-horizontal {
	flex: 0 1 calc((100% - 1.5vw) / 2);
}

div.box-grid-2 > div.feature-box, div.box-grid-2 > a.feature-box {
	flex: 0 1 calc((100% - 1.5vw) / 2);
}

div.feature-box.white-box, a.feature-box.white-box {
	background-color: #FFFFFF;
}

div.feature-box-horizontal, a.feature-box-horizontal {
	flex: 0 1 100%;
	display: flex;
	align-items: center;
	gap: 1.5vw;
}

div.feature-box-horizontal img, a.feature-box-horizontal img {
	flex: 0 0 28%;
	width: 28%;
	border-radius: 8px;
}

div.feature-box-horizontal.service-box img, a.feature-box-horizontal.service-box img {
	flex: 0 0 21%;
	width: 21%;
	margin: 0 auto;
	display: block;
}

div.feature-box-horizontal.service-box, a.feature-box-horizontal.service-box {
	padding-left: 2.59vw;	/* 2.16vw + another 20%, desktop only */
	padding-right: 2.59vw;
	min-height: 16vw;	/* tall enough that even the longest card's text doesn't grow past it, so all 4 stay equal regardless of which row they're in */
	box-sizing: border-box;
}

div.feature-box-horizontal div.feature-box-text, a.feature-box-horizontal div.feature-box-text {
	flex: 1;
}

div.footer {
	text-align: center;
	width: 100%;
	color: #000000;
	font-size: 1.2vw;
	padding: 2.5vw;
	padding-top: 6vw;
}

a.footer {
	color: #FF0000;
	text-decoration: none;
	font-size: 1.2vw;
	font-style: normal;
}

a.footer:hover {
	font-style: italic;
}

.btn {
	background: #d10b0b;
	text-shadow: 1px 1px 3px #666666;
	font-family: Calibri, Arial;
	color: #ffffff;
	font-size: 2vw;
	padding: 1vw 5vw 1vw 5vw;
	text-decoration: none;
	border: 0px;
	margin-top: 28vw;
}

.btn:hover {
	background: #c41212;
	text-decoration: none;
}

@media screen and (min-width: 835px) {
	/* Was min-width:1280px — widened down to 835px (right where the
	   tablet-portrait breakpoint above ends at max-width:834px) so
	   there's no more unstyled gap, e.g. iPad mini landscape (1024px). */
	a.menu-text {
		font-size: 21px;
	}

	div.content-header, h1.content-header, h2.content-header {
		font-size: 35px;
	}

	div.ticker {
		font-size: 18px;
	}

	.textfield {
		font-size: 28px;
	}

	.submitbutton {
		font-size: 28px;
		padding: 10px;
		padding-left: 50px;
		padding-right: 50px;
	}

	div.content {
		width: 85%;
	}

	div.content-text {
		font-size: 18px;
	}

	div.feature-box, a.feature-box {
		font-size: 18px;
	}

	a.cta-button, span.cta-button {
		font-size: 28px;
		padding: 10px 50px;
	}

	div.cell-text {
		font-size: 18px;
	}

	span.cell-hint {
		font-size: 14px;
	}

	label.addressbook-entry {
		font-size: 18px;
	}

	div.cell-text-messages {
		font-size: 18px;
	}

	a.cell-text {
		font-size: 18px;
	}

	.cell-textfield {
		font-size: 18px;
	}

	.cell-smalltextfield {
		font-size: 18px;
	}

	.cell-submitbutton {
		font-size: 18px;
	}

	a.content-text {
		font-size: 18px;
	}

	div.footer {
		font-size: 12px;
	}

	a.footer {
		font-size: 12px;
	}

	.btn {
	  font-size: 28px;
	  padding: 14px 70px 14px 70px;
	}
}

@media screen and (min-width: 835px) and (max-width: 1099px) {
	/* The 5 nav links at a flat 21px + 1.8vw gaps need ~590px, which
	   doesn't fit the 65%-wide menu-text column until the viewport is
	   roughly 1100px+ — below that it was wrapping onto a second row.
	   Rather than shrinking the links, stack the logo above the nav
	   (like the tablet/phone breakpoint below does) so the links keep
	   their normal desktop size and have the full row to lay out in. */
	div.menu-logo, div.menu-text {
		width: 100%;
		display: block;
		text-align: center;
	}

	div.menu-text {
		margin-top: 3vw;
	}

	.btn {
		/* ~10% less than the base 28vw — just a slight nudge up */
		margin-top: 25vw;
	}

	div.ticker {
		/* same nudge up as .btn above, applied to the Admin Panel / Logout bar */
		margin-top: 9.5vw;
	}
}

@media screen and (max-width: 834px) {
	/* Widened from 768px to 834px so tablets in portrait (iPad Air ~820px,
	   iPad Pro 11" ~834px) get the same stacking/sizing fixes as phones,
	   instead of falling into an unstyled gap between this breakpoint and
	   the 1280px desktop one. */
	/* Force real responsive stacking regardless of the legacy
	   ?mobile JS-redirect/PHP-computed inline widths, so layout
	   reflows on actual viewport resize without a page reload. */
	div.content {
		display: block !important;
	}

	/* Pages set an inline min-width:600px on tables inside feature-box
	   grey boxes so columns don't get crushed on desktop. That same
	   min-width forces an unnecessary horizontal scrollbar on tablet/
	   phone even when the table would otherwise fit. Override it
	   (needs !important since inline styles otherwise win) so the
	   table only scrolls if it genuinely can't fit the screen. */
	div.feature-box table {
		min-width: 0 !important;
	}

	/* sms_compose's Delivery Time row: date and time inputs sit side
	   by side on desktop, but stack (time below date) on tablet/phone
	   so they don't get crushed. */
	div.delivery-time-fields {
		flex-direction: column;
		align-items: flex-start !important;
		gap: 0.8vw;
	}

	div.content-text {
		display: block !important;
		width: 100% !important;
		box-sizing: border-box;
		padding: 2.5vw !important;
		font-size: 3vw;	/* comparable to the 3vw mobile content-text size */
	}

	img.icon {
		display: block;
		margin: 0 auto;
		max-width: 60% !important;
	}

	img.clients_logo {
		max-width: 70% !important;
	}

	div.feature-box, a.feature-box {
		flex: 1 1 100%;
		font-size: 2.5vw;	/* ~65% larger than the 1.7vw base — vw scaling alone reads too small on phones */
		padding: 2.5vw;	/* more breathing room from the edges on mobile */
	}

	a.content-text {
		/* Otherwise this anchor's own 1.7vw rule (set outside any media
		   query) wins over the inherited 2.5vw feature-box text size above,
		   making mailto:/tel: links look smaller than the paragraph around them. */
		font-size: 2.5vw;
	}

	div.box-grid-4 > div.feature-box, div.box-grid-4 > a.feature-box {
		flex: 1 1 100%;
	}

	div.box-grid-4 a.cta-button, div.box-grid-4 span.cta-button {
		font-size: 2.5vw;
		padding: 1vw 5vw;
		white-space: normal;
	}

	a.cta-button, span.cta-button {
		font-size: 2.5vw;	/* matches the boosted feature-box text size so the button doesn't look undersized next to it */
		padding: 1vw 5vw;
		margin: 1.5vw;
	}

	.btn {
		/* was never boosted in this breakpoint (only at 1280px and 480px),
		   so it looked smaller than the cta-buttons above on tablets */
		font-size: 2.5vw;
		padding: 1vw 5vw;
		/* ~10% less than the base 28vw — just a slight nudge up */
		margin-top: 25vw;
	}

	div.ticker {
		/* same nudge up as .btn above, applied to the Admin Panel / Logout bar */
		margin-top: 9.5vw;
	}

	table.field-table td:first-child {
		/* extra gap between the label column and the field column
		   (e.g. profile-content.php) on tablets */
		padding-right: 3vw;
	}

	.textfield {
		/* same gap as .btn above — only boosted at 835px+ and 480px */
		width: 50%;
		font-size: 2.5vw;
		padding: 0.8vw;
	}

	.submitbutton {
		font-size: 2.5vw;
		padding: 0.8vw 3vw;
	}

	.cell-textfield {
		/* same gap as .textfield above — admin pages (e.g. profile-content.php)
		   use this "cell-" variant inside their own feature-box, and it was
		   only boosted at 835px+ and 480px too */
		width: 60%;
		font-size: 2.5vw;
		padding: 0.8vw;
	}

	/* Standalone search/filter dropdowns (control_users-content.php's company
	   search, control_invoices-content.php's company filter) — full-width
	   and stacked above their submit button instead of squeezed onto one
	   line, since there's no room for both side-by-side on tablet/phone. */
	.filter-input {
		width: 100% !important;
		box-sizing: border-box;
		display: block;
		margin: 0 auto 2vw auto;
	}

	.cell-smalltextfield {
		font-size: 2.5vw;
	}

	.cell-submitbutton {
		font-size: 2.5vw;
		padding: 0.8vw 3vw;
	}

	div.cell-text, div.cell-text-messages, a.cell-text {
		/* same gap again — these label/text classes were only boosted
		   at 835px+ and 480px, so they looked tiny next to the now-larger
		   feature-box/button/textfield text on tablets */
		font-size: 2.5vw;
	}

	label.addressbook-entry {
		font-size: 2.5vw;
		gap: 1.5vw;
	}

	label.addressbook-entry input[type="checkbox"] {
		margin-top: 0.5vw;
	}

	div.button-row {
		gap: 1.5vw;
	}

	div.button-row a.cta-button, div.button-row span.cta-button {
		font-size: 2.4vw;
		padding: 1.2vw 5.3vw;
		margin: 0;
	}

	div.feature-box-horizontal.service-box, a.feature-box-horizontal.service-box {
		padding-left: 2.5vw;	/* reset the desktop-only 20% increase back to the standard mobile padding */
		padding-right: 2.5vw;
		min-height: 28vw;
	}

	div.box-grid-2 > div.feature-box-horizontal, div.box-grid-2 > a.feature-box-horizontal {
		flex: 1 1 100%;
	}

	div.box-grid-2 > div.feature-box, div.box-grid-2 > a.feature-box {
		flex: 1 1 100%;
	}

	div.feature-box.logo-box {
		flex: 0 1 calc((100% - 1.5vw) / 2);
		height: 25vw;
	}

	div.feature-box-horizontal img, a.feature-box-horizontal img {
		flex: 0 0 32%;
		width: 32%;
	}

	div.feature-box-horizontal.service-box img, a.feature-box-horizontal.service-box img {
		flex: 0 0 18%;
		width: 18%;
		margin: 0 auto;
		display: block;
	}

	div.feature-box-horizontal, a.feature-box-horizontal {
		gap: 4vw;
	}

	div.feature-box-horizontal div.feature-box-text, a.feature-box-horizontal div.feature-box-text {
		padding-left: 2vw;
	}

	div.menu-logo, div.menu-text {
		width: 100% !important;
		display: block !important;
		text-align: center !important;
	}

	div.menu-text {
		margin-top: 5vw;	/* breathing room between the logo and the nav links once they stack in portrait */
		padding-bottom: 0;
	}

	a.menu-text {
		font-size: 3vw;	/* was 4vw — too large now that wider tablets fall in this breakpoint too */
		padding: 1.5vw 2.5vw;	/* more breathing room around each link now that they wrap onto their own lines */
		display: inline-block;
	}

	br.menu-linebreak {
		display: block;
		content: "";
		margin-top: 2vw;	/* gap between the two stacked menu lines */
	}

	div.footer {
		/* Base 1.2vw was never overridden until the 480px breakpoint,
		   so tablets in portrait (481-834px) rendered the footer at the
		   tiny desktop size. */
		font-size: 2.2vw;
	}

	a.footer {
		font-size: 2.2vw;
	}
}

@media screen and (max-width: 480px) {
	/* Cells holding two side-by-side submit buttons (e.g. the API Password
	   box's "Change Password" / "Disable Password" pair) — stack them with
	   a gap instead of letting them wrap mid-button. Phone-only: tablets
	   (481-834px) keep the original side-by-side layout. */
	td.button-cell {
		display: flex;
		flex-direction: column;
		gap: 1.5vw;
	}

	td.button-cell input.cell-submitbutton {
		width: 100%;
		box-sizing: border-box;
		margin: 0;
	}

	div.menu-logo {
		width: 100%;
	}

	img.menu {
		max-width: 40%;
	}

	div.menu-text {
		width: 100%;
		vertical-align: middle;
		margin-top: 0;	/* the 834px breakpoint's margin-top would otherwise stack on top of padding-top below */
		padding-top: 6vw;
		padding-bottom: 3vw;
	}

	a.menu-text {
		font-size: 3vw;
		padding: 0 1.8vw 0 0;	/* keep the original tighter spacing on phones — only tablets get the wider padding */
	}

	br.menu-linebreak {
		margin-top: 0;	/* keep the original tighter spacing on phones — only tablets get the wider gap */
	}

	div.content-header, h1.content-header, h2.content-header {
		font-size: 4.5vw;
		padding-top: 4vw;
		padding-bottom: 3vw;
	}

	div.content-text {
		font-size: 3vw;
	}

	div.cell-text {
		font-size: 2.7vw;
	}

	span.cell-hint {
		font-size: 2.1vw;
	}

	table.field-table td:first-child {
		/* extra gap between the label column and the field column
		   (e.g. profile-content.php) on phones */
		padding-right: 4vw;
	}

	div.cell-text-messages {
		font-size: 2.7vw;
		width: 20vw;
	}

	a.cell-text {
		font-size: 2.7vw;
	}

	.cell-textfield {
		font-size: 2.7vw;
		width: 70%;
	}

	.cell-smalltextfield {
		font-size: 2.7vw;
		width: 10%;
	}

	.cell-submitbutton {
		font-size: 2.7vw;
	}

	a.content-text {
		font-size: 3vw;
	}

	img.icon {
		max-width: 80%;
	}

	.textfield {
		width: 50%;
		font-size: 3vw;
	}

	.submitbutton {
		font-size: 3vw;
		padding: 1.5vw;
		padding-left: 3.5vw;
		padding-right: 3.5vw;
	}

	img.clients_logo {
		max-width: 60%;
	}

	div.ticker {
		font-size: 3vw;
		padding: 0.5vw;
		margin-top: 7vw;
	}

	div.footer {
		font-size: 2.2vw;
		margin-top: 3vw;
	}

	a.footer {
		font-size: 2.2vw;
	}

	.btn {
	  font-size: 2.7vw;
	  padding: 1vw 7vw 1vw 7vw;
	  margin-top: 27vw;
	}

	a.cta-button, span.cta-button {
	  font-size: 2.7vw;
	  padding: 1vw 7vw 1vw 7vw;
	  margin: 1.5vw;
	}

	div.button-row {
		gap: 1.2vw;
	}

	div.button-row a.cta-button, div.button-row span.cta-button {
		font-size: 2.6vw;
		padding: 1.1vw 4.1vw;
		margin: 0;
	}
}
