/*------------------------------------------------------------------
  UtilityCloud - Edifícios Jardim: modern responsive theme
  Loaded LAST on every page. Restyles the existing Bootstrap 3 /
  legacy classes only - markup, ids and scripts stay the same.
------------------------------------------------------------------*/

:root {
	--brand: #2a4590;
	--brand-dark: #1f346f;
	--brand-soft: #e9eef9;
	--water: #1e88e5;
	--energy: #f59e0b;
	--success: #16a34a;
	--danger: #dc2626;
	--warning-bg: #fff4e5;
	--warning-text: #b45309;
	--bg: #f3f5f9;
	--surface: #ffffff;
	--text: #1f2937;
	--muted: #6b7280;
	--border: #e3e7ee;
	--radius: 14px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .06);
	--shadow-hover: 0 2px 4px rgba(16, 24, 40, .08), 0 10px 24px rgba(16, 24, 40, .10);
	--accent: #2a4590;          /* brand colour for text/icons on cards */
	--header-bg: #2a4590;
	--field-border: #d3d8e0;
	--subtle: #f6f7f9;          /* addons, table headers, read-only fields */
	--subtle-2: #fafbfc;        /* card footers, table row hover */
	--focus-ring: rgba(42, 69, 144, .15);
	--on-brand: #ffffff;         /* text on primary buttons */
	--warning-border: #fde3bf;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Dark theme: chosen with the header button (js/tema.js), saved per browser */
:root {
	color-scheme: light;
}

html[data-theme="dark"] {
	color-scheme: dark;
	/* neutral black / grey palette; colour only where it carries meaning */
	--brand: #ededef;           /* primary buttons: light on black */
	--brand-dark: #ffffff;
	--on-brand: #0a0a0b;
	--brand-soft: rgba(255, 255, 255, .08);
	--accent: #ededef;
	--header-bg: #111113;
	--water: #4aa8ff;
	--energy: #fbbf24;
	--success: #22a55a;
	--danger: #e5484d;
	--warning-bg: rgba(251, 191, 36, .10);
	--warning-text: #fbbf24;
	--warning-border: rgba(251, 191, 36, .25);
	--bg: #0a0a0b;
	--surface: #161618;
	--text: #ededef;
	--muted: #a0a0a8;
	--border: #26262a;
	--field-border: #3a3a40;
	--subtle: #1f1f22;
	--subtle-2: #1b1b1e;
	--focus-ring: rgba(255, 255, 255, .16);
	--shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 4px 14px rgba(0, 0, 0, .35);
	--shadow-hover: 0 2px 4px rgba(0, 0, 0, .55), 0 10px 24px rgba(0, 0, 0, .45);
}

html[data-theme="dark"] body > .navbar-inverse {
	box-shadow: 0 1px 0 #232326;
}

/* black line drawing of the building (login): show it light on dark */
html[data-theme="dark"] body > div > img.center-block {
	-webkit-filter: invert(1) hue-rotate(180deg);
	filter: invert(1) hue-rotate(180deg);
	opacity: .85;
}

/* Bootstrap bits that are not driven by the variables above */
html[data-theme="dark"] .table,
html[data-theme="dark"] .table > tbody > tr > td {
	color: var(--text);
}

html[data-theme="dark"] hr {
	border-top-color: var(--border);
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .help-block {
	color: var(--muted);
}

html[data-theme="dark"] .form-control::-webkit-input-placeholder,
html[data-theme="dark"] .login-fields input::-webkit-input-placeholder {
	color: #7c8798;
}

html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] .login-fields input::placeholder {
	color: #7c8798;
}


/*------------------------------------------------------------------
  Base
------------------------------------------------------------------*/
html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.55;
	overflow-x: hidden;
}

p,
input,
button,
select,
textarea {
	font-family: var(--font);
}

p {
	font-size: 14px;
	line-height: 1.55;
}

h1, h2, h3, h4 {
	font-family: var(--font);
	font-weight: 650;
	color: var(--text);
	letter-spacing: -.01em;
}

h1 { font-size: 28px; }
h2 { font-size: 22px; margin: 4px 0 18px; }
h3 { font-size: 18px; }

a {
	color: var(--accent);
}

a:hover,
a:focus {
	color: var(--brand-dark);
}

/* Focus ring: Bootstrap draws one on every focused link, also after a mouse
   click / tap (and on card links it outlines each text line). Show it only
   for keyboard navigation (:focus-visible), as a clean ring. */
a:focus {
	outline: 0;
}

a:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* card links fill the card header, so the keyboard ring frames the card content */
.panel-heading > a {
	display: block;
	border-radius: var(--radius-sm);
}

.panel-heading > a:focus-visible {
	outline-offset: 6px;
	border-radius: var(--radius-sm);
}

img {
	max-width: 100%;
	height: auto;
}

canvas {
	max-width: 100%;
}

/*------------------------------------------------------------------
  Top bar (logo, title, user name, "Sair")
------------------------------------------------------------------*/
body > .navbar-inverse {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 1030;
	background: var(--header-bg);
	border: 0;
	box-shadow: 0 2px 10px rgba(16, 24, 40, .18);
}

.navbar.navbar-inverse {
	position: static;
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: center;
	align-items: center;
	min-height: 60px;
	max-width: 1170px;
	margin: 0 auto;
	padding: 0 16px;
	background: var(--header-bg);
	border: 0;
	border-radius: 0;
}

.navbar.navbar-inverse:before,
.navbar.navbar-inverse:after {
	display: none;
}

.navbar.navbar-inverse > .navbar-header,
.navbar.navbar-inverse > .navbar-header2 {
	float: none;
	margin: 0;
}

.navbar.navbar-inverse > .navbar-header:first-child {
	-webkit-flex: 0 0 auto;
	flex: 0 0 auto;
	margin-right: 10px;
}

/* the title takes the free space and shrinks first */
.navbar.navbar-inverse > .navbar-header + .navbar-header {
	-webkit-flex: 1 1 auto;
	flex: 1 1 auto;
	min-width: 0;
}

/* DOM order is: logo, title, "Sair", user name -> show user name, theme toggle, "Sair" */
.navbar.navbar-inverse > .navbar-header2 {
	-webkit-order: 4;
	order: 4;
	-webkit-flex: 0 0 auto;
	flex: 0 0 auto;
}

.navbar.navbar-inverse > .navbar-header2:last-child {
	-webkit-order: 2;
	order: 2;
	-webkit-flex: 0 1 auto;
	flex: 0 1 auto;
	min-width: 0;
}

.navbar .avatar {
	display: block;
	line-height: 0;
}

.navbar .avatar img {
	width: auto;
	height: 38px;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25));
}

.navbar-inverse .navbar-brand {
	float: none;
	display: block;
	height: auto;
	padding: 8px 0;
	margin: 0 !important;
	color: #fff;
	font-size: 17px;
	font-weight: 650;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.navbar-inverse .navbar-brand:hover,
.navbar-inverse .navbar-brand:focus {
	color: #fff;
}

/* user name */
.navbar-header2 #usernameBar {
	padding: 6px 10px;
	font-size: 14px;
	font-weight: 500;
	color: rgba(255, 255, 255, .85);
}

.navbar-header2 #usernameBar:before {
	content: "\f007";
	font-family: FontAwesome;
	margin-right: 6px;
	opacity: .8;
}

/* "Sair" (logout) */
.navbar-header2 a[href^="javascript:logOut"] {
	margin-left: 4px !important;
	padding: 6px 12px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, .45);
	border-radius: 999px;
}

.navbar-header2 a[href^="javascript:logOut"]:before {
	content: "\f08b";
	font-family: FontAwesome;
	margin-right: 6px;
}

/* light / dark toggle (added by js/tema.js) */
.tema-toggle {
	-webkit-order: 3;
	order: 3;
	-webkit-flex: 0 0 auto;
	flex: 0 0 auto;
	display: -webkit-inline-flex;
	display: inline-flex;
	-webkit-align-items: center;
	align-items: center;
	-webkit-justify-content: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin-left: 6px;
	padding: 0;
	font-size: 17px;
	color: #fff;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, .45);
	border-radius: 50%;
	cursor: pointer;
}

.tema-toggle:hover {
	background: rgba(255, 255, 255, .15);
}

.tema-toggle:focus {
	outline: 0;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, .35);
}

/* on pages without user name / "Sair" (login) keep it on the right */
.navbar.navbar-inverse > .tema-toggle:last-child {
	margin-left: auto;
}

.navbar-header2 a[href^="javascript:logOut"]:hover {
	background: rgba(255, 255, 255, .15);
}

/*------------------------------------------------------------------
  Page wrapper + main menu
------------------------------------------------------------------*/
.subnavbar {
	margin: 0;
}

.subnavbar-inner {
	height: auto;
	background: transparent;
	border: 0;
}

.subnavbar .container {
	width: auto;
	max-width: 1170px;
	padding-left: 16px;
	padding-right: 16px;
}

.subnavbar .container > ul.mainnav {
	display: -webkit-flex;
	display: flex;
	-webkit-flex-wrap: wrap;
	flex-wrap: wrap;
	gap: 2px;
	width: 100%;
	height: auto;
	margin: 16px 0 20px;
	padding: 6px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.subnavbar .container > ul.mainnav:empty {
	display: none;
}

.subnavbar .container > ul.mainnav > li {
	float: none;
	width: auto;
	min-width: 0;
	height: auto;
	margin: 0;
	border: 0;
	list-style: none;
}

.subnavbar .container > ul.mainnav > li > a {
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: center;
	align-items: center;
	gap: 6px;
	height: auto;
	padding: 9px 9px;
	font-size: 14px;
	font-weight: 600;
	color: var(--muted);
	border: 0;
	border-radius: var(--radius-sm);
	text-decoration: none;
	-webkit-transition: background .15s, color .15s;
	transition: background .15s, color .15s;
}

.subnavbar .container > ul.mainnav > li > a > i {
	width: auto;
	height: auto;
	margin: 0;
	font-size: 17px;
	line-height: 1;
}

.subnavbar .container > ul.mainnav > li > a > span {
	display: inline;
}

.subnavbar .container > ul.mainnav > li > a:hover {
	color: var(--text);
	background: var(--bg);
}

.subnavbar .container > ul.mainnav > li.active > a,
.subnavbar .container > ul.mainnav > li.active > a:hover {
	color: var(--accent);
	background: var(--brand-soft);
	border: 0;
	font-size: 14px;
}

/*------------------------------------------------------------------
  Cards (buildings, apartments, consumption, user) - .panel
------------------------------------------------------------------*/
#divElem,
#divExt {
	margin-left: -8px;
	margin-right: -8px;
}

#divElem > [class*="col-"],
#divExt > [class*="col-"] {
	padding-left: 8px;
	padding-right: 8px;
}

/* cards side by side (large screens): every card in a row gets the same
   height, e.g. the resident's name card next to the water / energy cards */
@media (min-width: 1200px) {
	#divElem {
		display: -webkit-flex;
		display: flex;
		-webkit-flex-wrap: wrap;
		flex-wrap: wrap;
	}

	#divElem:before,
	#divElem:after {
		display: none;   /* Bootstrap clearfix would become an extra flex item */
	}

	#divElem > [class*="col-"] {
		display: -webkit-flex;
		display: flex;
		-webkit-flex-direction: column;
		flex-direction: column;
	}

	#divElem > [class*="col-"] > .panel {
		-webkit-flex: 1 1 auto;
		flex: 1 1 auto;
	}
}

.panel {
	margin-bottom: 16px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
	-webkit-transition: box-shadow .15s, -webkit-transform .15s;
	transition: box-shadow .15s, transform .15s;
}

a > .panel:hover,
.panel:hover {
	box-shadow: var(--shadow-hover);
}

.panel-info {
	border-color: var(--border);
}

.panel-info > .panel-heading,
.panel-heading {
	padding: 18px 20px;
	color: var(--text);
	background: var(--surface);
	border: 0;
	border-radius: 0;
}

.panel a,
.panel a:hover,
a .panel {
	color: inherit;
	text-decoration: none;
}

/* card icons: plain coloured glyphs, no background */
.panel-heading .fa-5x {
	font-size: 38px;
	line-height: 1;
	color: var(--accent);
}

.panel-heading .fa-tint {
	color: var(--water);
}

.panel-heading .fa-flash {
	color: var(--energy);
}

.announcement-heading {
	font-size: 28px;
	font-weight: 650;
	line-height: 1.2;
	letter-spacing: -.02em;
	color: var(--text);
	/* long names (e.g. "Marco de Canaveses") wrap instead of being cut */
	white-space: normal;
	overflow-wrap: break-word;
}

.announcement-text {
	font-size: 17px;
	font-weight: 600;
	color: var(--text);
}

.announcement-text .fa-tint { color: var(--water); }
.announcement-text .fa-flash { color: var(--energy); }

.announcement-text-small {
	font-size: 14px;
	color: var(--muted);
	white-space: normal;
}

.panel-footer,
.announcement-bottom {
	padding: 12px 20px;
	background: var(--subtle-2);
	border-top: 1px solid var(--border);
}

.panel-footer-warning {
	padding: 12px 20px;
	background: var(--warning-bg);
	border-top: 1px solid var(--warning-border);
}

.text-footer-warning,
.text-footer-warning:hover {
	color: var(--warning-text);
	font-weight: 600;
	text-decoration: none;
}

/*------------------------------------------------------------------
  Content boxes (forms, tables) - .widget / .widget-content
------------------------------------------------------------------*/
.widget {
	margin-bottom: 20px;
	background: transparent;
	border: 0;
}

.widget-header {
	height: auto;
	padding: 14px 20px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-bottom: 0;
	border-radius: var(--radius) var(--radius) 0 0;
	box-shadow: none;
}

.widget-header h3 {
	top: 0;
	left: 0;
	margin: 0;
	font-size: 16px;
	color: var(--text);
	text-shadow: none;
}

.widget-content {
	margin-bottom: 20px;
	padding: 20px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

/* headers hold floated columns (title, button): contain them */
.widget-header:after {
	content: "";
	display: table;
	clear: both;
}

.widget-header h3,
.widget-header h4 {
	margin: 4px 0;
}

/* a header on its own at the end of a widget (e.g. "Consumo do último mês"
   + "Suspender serviço"): a full card with text and button side by side */
.widget > .widget-content + .widget-header:last-child {
	display: -webkit-flex;
	display: flex;
	-webkit-flex-wrap: wrap;
	flex-wrap: wrap;
	-webkit-align-items: center;
	align-items: center;
	-webkit-justify-content: space-between;
	justify-content: space-between;
	gap: 12px;
	border-bottom: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.widget > .widget-content + .widget-header:last-child:after {
	display: none;
}

.widget > .widget-content + .widget-header:last-child > [class*="col-"] {
	float: none;
	width: auto;
	padding: 0;
	-webkit-flex: 0 1 auto;
	flex: 0 1 auto;
}

.widget-header + .widget-content {
	border-top: 1px solid var(--border);
	border-radius: 0 0 var(--radius) var(--radius);
}

/*------------------------------------------------------------------
  Forms
------------------------------------------------------------------*/
.form-control,
.form-control-error,
select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"] {
	font-size: 16px; /* 16px stops iOS zooming into fields */
}

.form-control,
.form-control-error {
	height: 44px;
	padding: 10px 14px;
	color: var(--text);
	background-color: var(--surface);
	border: 1px solid var(--field-border);
	border-radius: var(--radius-sm);
	box-shadow: none;
	-webkit-transition: border-color .15s, box-shadow .15s;
	transition: border-color .15s, box-shadow .15s;
}

.form-control-error {
	border-color: var(--danger);
	box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

/* fields in error keep their place inside icon groups (Bootstrap only
   styles .form-control there) */
.input-group .form-control-error {
	position: relative;
	z-index: 2;
	display: table-cell;
	float: left;
	width: 100%;
	margin-bottom: 0;
}

.input-group .form-control-error:not(:first-child) {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

.input-group .form-control-error:not(:last-child) {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

.form-control:focus {
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--focus-ring);
	outline: 0;
}

.form-control[disabled],
.form-control[readonly] {
	color: var(--muted);
	background-color: var(--subtle);
}

.form-group {
	margin-bottom: 14px;
}

.input-group-addon {
	min-width: 44px;
	padding: 10px 12px;
	font-size: 15px;
	color: var(--muted);
	background-color: var(--subtle);
	border: 1px solid var(--field-border);
	border-radius: var(--radius-sm);
}

select.form-control {
	padding-right: 10px;
}

/* plain selects without .form-control (e.g. Pagamentos) look the same */
select:not(.form-control) {
	display: block;
	width: 100%;
	max-width: 420px;
	height: 44px;
	padding: 8px 12px;
	color: var(--text);
	background-color: var(--surface);
	border: 1px solid var(--field-border);
	border-radius: var(--radius-sm);
}

select:not(.form-control):focus {
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--focus-ring);
	outline: 0;
}

/*------------------------------------------------------------------
  Buttons
------------------------------------------------------------------*/
.btn {
	min-height: 44px;
	padding: 10px 18px;
	font-size: 15px;
	font-weight: 600;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	box-shadow: none;
	text-shadow: none;
	background-image: none;
	-webkit-transition: background-color .15s, box-shadow .15s;
	transition: background-color .15s, box-shadow .15s;
}

.btn:focus {
	outline: 0;
	box-shadow: 0 0 0 3px rgba(42, 69, 144, .2);
}

.btn-primary { background-color: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active { background-color: var(--brand-dark); border-color: var(--brand-dark); color: var(--on-brand); }

.btn-success { background-color: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover,
.btn-success:focus,
.btn-success:active { background-color: #15803d; border-color: #15803d; color: #fff; }

.btn-danger { background-color: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active { background-color: #b91c1c; border-color: #b91c1c; color: #fff; }

.containerBtn {
	margin-top: 6px;
}

.containerBtn:after {
	content: "";
	display: table;
	clear: both;
}

.right {
	width: auto;
	padding-left: 0;
}

/*------------------------------------------------------------------
  Tables
------------------------------------------------------------------*/
.table-responsive {
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	-webkit-overflow-scrolling: touch;
}

.table {
	margin-bottom: 0;
	font-size: 14px;
	background: var(--surface);
}

.table > thead > tr > th,
.table-bordered th {
	padding: 12px 14px;
	font-size: 13px;
	font-weight: 650;
	color: var(--muted);
	text-transform: none;
	background: var(--subtle);
	border-color: var(--border);
}

.table > tbody > tr > td {
	padding: 12px 14px;
	border-color: var(--border);
}

.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td {
	border-color: var(--border);
}

/* Recibos wraps its form (not a table) in .table-responsive: no frame */
#area2.table-responsive {
	overflow: visible;
	border: 0;
}

.table-responsive > .table-bordered {
	border: 0;
}

.table-hover > tbody > tr:hover > td {
	background: var(--subtle-2);
}

.table .btn {
	min-height: 36px;
	padding: 6px 12px;
	font-size: 14px;
}

/*------------------------------------------------------------------
  Footer
------------------------------------------------------------------*/
.paddingLine20 {
	padding-top: 12px;
	padding-bottom: 12px;
}

.footer {
	margin: 24px 0 0;
	border: 0;
	border-top: 1px solid var(--border);
}

.footer-inner {
	padding: 18px 0 24px;
	font-size: 13px;
	color: var(--muted);
	background: transparent;
}

.footer .container {
	width: auto;
	max-width: 1170px;
	margin: 0 auto;
	padding: 0 16px;
}

.footer .row {
	margin: 0;
}

.footer .span12 {
	padding: 0;
}

.footer a,
.footer a:hover {
	color: var(--muted);
}

/*------------------------------------------------------------------
  Login page
------------------------------------------------------------------*/
.account-container {
	width: auto;
	max-width: 400px;
	margin: 8px auto 40px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.account-container .content {
	padding: 24px 24px 28px;
}

.account-container h1 {
	margin: 0 0 20px;
	font-size: 26px;
	font-weight: 650;
	color: var(--text);
}

.login-fields .field {
	margin-bottom: 14px;
}

.login-fields input {
	width: 100%;
	height: 48px;
	padding: 10px 14px 10px 52px;
	font-family: var(--font);
	font-size: 16px;
	color: var(--text);
	background-color: var(--surface);
	background-position: left center;
	border: 1px solid var(--field-border);
	border-radius: var(--radius-sm);
	box-shadow: none;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
}

/* field icons: drawn with Font Awesome in a box (the old PNG icons have a
   white background that breaks the dark theme) */
.login-fields .field {
	position: relative;
}

.login-fields .field:before {
	position: absolute;
	top: 1px;
	left: 1px;
	bottom: 1px;
	z-index: 1;
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: center;
	align-items: center;
	-webkit-justify-content: center;
	justify-content: center;
	width: 42px;
	font-family: FontAwesome;
	font-size: 16px;
	color: var(--muted);
	background: var(--subtle);
	border-right: 1px solid var(--field-border);
	border-radius: var(--radius-sm) 0 0 var(--radius-sm);
	pointer-events: none;
}

.login-fields .field:nth-child(1):before { content: "\f007"; }  /* user */
.login-fields .field:nth-child(2):before { content: "\f084"; }  /* key */

.login-fields input.username-field,
.login-fields input.password-field {
	background-image: none;
}

.login-fields input:focus {
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--focus-ring);
	outline: 0;
}

/* error messages on every page (js/erros.js): one per place, always red */
.mensagem-erro {
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: center;
	align-items: center;
	gap: 8px;
	margin: 4px 0 14px;
	padding: 10px 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--danger);
	background: rgba(220, 38, 38, .08);
	border: 1px solid rgba(220, 38, 38, .25);
	border-radius: var(--radius-sm);
}

.mensagem-erro .fa {
	font-size: 16px;
}

html[data-theme="dark"] .mensagem-erro {
	color: #ff6b6b;
	background: rgba(229, 72, 77, .12);
	border-color: rgba(229, 72, 77, .35);
}

.login-actions {
	float: none;
	margin: 6px 0 0;
}

.login-actions .btn {
	display: block;
	width: 100%;
	float: none;
	min-height: 48px;
	font-size: 16px;
}

body > div > img.center-block {
	max-width: 60%;
	max-height: 180px;
	width: auto;
	margin: 24px auto 16px;
}

/*------------------------------------------------------------------
  "Informação do utilizador" profile card (js/apartment.js drawInfo)
------------------------------------------------------------------*/
.perfil-topo {
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: center;
	align-items: center;
	gap: 16px;
	padding-bottom: 18px;
	margin-bottom: 18px;
	border-bottom: 1px solid var(--border);
}

.perfil-avatar {
	-webkit-flex: 0 0 auto;
	flex: 0 0 auto;
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: center;
	align-items: center;
	-webkit-justify-content: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: .02em;
	color: var(--accent);
	background: var(--brand-soft);
	border-radius: 50%;
}

.perfil-topo > div:last-child {
	min-width: 0;
}

.perfil-nome {
	margin: 0;
	font-size: 20px;
	font-weight: 650;
	line-height: 1.3;
	color: var(--text);
	overflow-wrap: break-word;
}

.perfil-sub {
	margin: 2px 0 0;
	font-size: 14px;
	color: var(--muted);
}

.perfil-dados {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.perfil-item {
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: flex-start;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 14px;
	background: var(--subtle);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}

.perfil-item > .fa {
	-webkit-flex: 0 0 auto;
	flex: 0 0 auto;
	width: 20px;
	margin-top: 3px;
	font-size: 16px;
	text-align: center;
	color: var(--accent);
}

.perfil-textos {
	display: -webkit-flex;
	display: flex;
	-webkit-flex-direction: column;
	flex-direction: column;
	min-width: 0;
}

.perfil-etiqueta {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--muted);
}

.perfil-valor {
	font-size: 15px;
	font-weight: 500;
	color: var(--text);
	overflow-wrap: anywhere;    /* long emails wrap instead of overflowing */
	word-break: break-word;
}

a.perfil-valor {
	color: var(--accent);
	text-decoration: none;
}

a.perfil-valor:hover {
	text-decoration: underline;
}

/* dark theme: accent = text colour, so mark the links with a soft underline */
html[data-theme="dark"] a.perfil-valor {
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, .35);
	text-underline-offset: 3px;
}

@media (max-width: 767px) {
	.perfil-dados {
		grid-template-columns: minmax(0, 1fr);
	}

	.perfil-avatar {
		width: 52px;
		height: 52px;
		font-size: 19px;
	}

	.perfil-nome {
		font-size: 18px;
	}
}

/*------------------------------------------------------------------
  Tablet and smaller
------------------------------------------------------------------*/
@media (max-width: 1199px) {
	.subnavbar .container > ul.mainnav > li > a {
		padding: 8px 9px;
		font-size: 13px;
	}
}

/*------------------------------------------------------------------
  Phones
------------------------------------------------------------------*/
@media (max-width: 767px) {
	/* undo the old negative margins that made pages scroll sideways */
	#main,
	.subnavbar,
	.footer,
	.extra {
		margin-left: 0;
		margin-right: 0;
	}

	.navbar.navbar-inverse {
		min-height: 56px;
		padding: 0 12px;
	}

	.navbar .avatar img {
		height: 32px;
	}

	/* title may use two lines instead of being cut */
	.navbar-inverse .navbar-brand {
		padding: 6px 0;
		font-size: 14px;
		line-height: 1.2;
		white-space: normal;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}

	.navbar-header2 #usernameBar {
		max-width: 30vw;
		padding: 6px 6px;
		font-size: 13px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.navbar-header2 a[href^="javascript:logOut"] {
		padding: 5px 10px;
		font-size: 13px;
	}

	.subnavbar .container {
		padding-left: 12px;
		padding-right: 12px;
	}

	/* menu: same buttons, as a compact grid of tiles (icon above label) */
	.subnavbar .container > ul.mainnav {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
		gap: 4px;
		margin: 12px 0 16px;
		padding: 6px;
	}

	.subnavbar .container > ul.mainnav > li > a {
		-webkit-flex-direction: column;
		flex-direction: column;
		-webkit-justify-content: flex-start;
		justify-content: flex-start;
		gap: 5px;
		height: 100%;
		padding: 9px 4px 8px;
		font-size: 11.5px;
		line-height: 1.25;
		text-align: center;
	}

	.subnavbar .container > ul.mainnav > li.active > a,
	.subnavbar .container > ul.mainnav > li.active > a:hover {
		font-size: 11.5px;
	}

	.subnavbar .container > ul.mainnav > li > a > i {
		font-size: 19px;
	}

	#divElem,
	#divExt {
		margin-left: -6px;
		margin-right: -6px;
	}

	#divElem > [class*="col-"],
	#divExt > [class*="col-"] {
		padding-left: 6px;
		padding-right: 6px;
	}

	.panel {
		margin-bottom: 12px;
	}

	.panel-heading,
	.panel-info > .panel-heading {
		padding: 16px;
	}

	.panel-heading .fa-5x {
		font-size: 32px;
	}

	.announcement-heading {
		font-size: 24px;
	}

	.widget-content {
		padding: 16px;
	}

	/* nested columns stack on phones: drop their extra indentation */
	.widget-content [class*="col-"] [class*="col-"] {
		padding-left: 0;
		padding-right: 0;
	}

	h2 { font-size: 20px; }

	.table > thead > tr > th,
	.table > tbody > tr > td {
		padding: 10px 8px;
	}

	/* action buttons: full width, easy to tap */
	.containerBtn .right,
	.containerBtn .rightFloat {
		float: none;
		width: 100%;
		padding-left: 0;
	}

	.containerBtn .btn {
		display: block;
		width: 100%;
		margin-bottom: 8px;
	}

	/* "Consumo do último mês" card: text above a full-width button */
	.widget > .widget-content + .widget-header:last-child > [class*="col-"] {
		-webkit-flex: 1 1 100%;
		flex: 1 1 100%;
	}

	.widget > .widget-content + .widget-header:last-child .btn {
		display: block;
		width: 100%;
		white-space: normal;
	}

	.account-container {
		margin-left: 12px;
		margin-right: 12px;
	}
}

@media (max-width: 380px) {
	.navbar-inverse .navbar-brand {
		font-size: 13px;
	}

	.navbar-header2 #usernameBar:before {
		display: none;
	}
}

/*------------------------------------------------------------------
  Loaders (js/loader.js)
------------------------------------------------------------------*/
.loader {
	display: -webkit-flex;
	display: flex;
	-webkit-flex-direction: column;
	flex-direction: column;
	-webkit-align-items: center;
	align-items: center;
	-webkit-justify-content: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	min-height: 160px;
	padding: 28px 16px;
	color: var(--muted);
	font-size: 14px;
	font-weight: 500;
	clear: both;
}

/* rotating ring: a transform animation keeps spinning even while a
   synchronous request is blocking the page */
.loader-spinner,
#circularG:before {
	content: "";
	display: block;
	width: 36px;
	height: 36px;
	border: 3px solid var(--brand-soft);
	border-top-color: var(--accent);
	border-radius: 50%;
	-webkit-animation: loader-girar .8s linear infinite;
	animation: loader-girar .8s linear infinite;
	will-change: transform;
}

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

/* Pagamentos: the existing 8-dot spinner gets the same look */
#circularG {
	position: static;
	display: -webkit-flex;
	display: flex;
	-webkit-flex-direction: column;
	flex-direction: column;
	-webkit-align-items: center;
	align-items: center;
	gap: 12px;
	width: auto;
	height: auto;
	margin: 0;
	padding: 28px 16px;
}

#circularG > .circularG {
	display: none;
}

#circularG:after {
	content: "A carregar…";
	color: var(--muted);
	font-size: 14px;
	font-weight: 500;
}

/* thin bar at the top while the next page loads */
html.a-mudar-pagina body:before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	z-index: 2000;
	width: 40%;
	height: 3px;
	background: linear-gradient(90deg, transparent, #7fb2ff, #fff, #7fb2ff, transparent);
	-webkit-animation: barra-carregar 1.1s ease-in-out infinite;
	animation: barra-carregar 1.1s ease-in-out infinite;
	will-change: transform;
}

html.a-mudar-pagina body {
	cursor: progress;
}

@-webkit-keyframes barra-carregar {
	from { -webkit-transform: translateX(-100%); }
	to { -webkit-transform: translateX(250%); }
}

@keyframes barra-carregar {
	from { transform: translateX(-100%); }
	to { transform: translateX(250%); }
}

@media (prefers-reduced-motion: reduce) {
	.loader-spinner,
	#circularG:before {
		-webkit-animation-duration: 2s;
		animation-duration: 2s;
	}

	html.a-mudar-pagina body:before {
		width: 100%;
		-webkit-animation: none;
		animation: none;
		opacity: .8;
	}
}
