* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: #f5f7f5;
	color: #26332b;
	font-family: Arial, Helvetica, sans-serif;
}

.site-header {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	min-height: 110px;
	padding: 10px 24px;
	background: #2f7047;
	color: #fff;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	color: inherit;
	text-decoration: none;
}

.brand img {
	display: block;
	width: 112px;
	height: 90px;
	object-fit: contain;
}

.brand h1 {
	margin: 0;
	font-size: 21px;
	font-weight: 600;
}

.sidebar {
	position: fixed;
	top: 110px;
	bottom: 0;
	left: 0;
	width: 235px;
	padding: 18px 12px;
	overflow-y: auto;
	background: #e9efe9;
}

.sidebar ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sidebar li + li {
	margin-top: 4px;
}

.sidebar a {
	display: block;
	padding: 10px 12px;
	border-radius: 3px;
	color: #294d35;
	text-decoration: none;
}

.sidebar a:hover,
.sidebar a[aria-current="page"] {
	background: #d3e2d5;
}

main {
	margin-left: 235px;
	padding: 32px;
}

.cadastro,
.agendamento {
	width: min(100%, 620px);
	margin: 32px auto;
	padding: 28px;
	border: 1px solid #d8e0d9;
	border-radius: 5px;
	background: #fff;
}

.cadastro h2,
.agendamento h2 {
	margin: 0 0 24px;
	color: #2f7047;
	font-size: 24px;
}

.cadastro form > div:not(.form-actions) {
	margin-bottom: 17px;
}

.agendamento form > div {
	margin-bottom: 17px;
}

.cadastro label,
.agendamento label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.cadastro input,
.agendamento input,
.agendamento select {
	width: 100%;
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid #b9c7bc;
	border-radius: 3px;
	background: #fff;
	color: #26332b;
	font: inherit;
}

.cadastro input:focus,
.agendamento input:focus,
.agendamento select:focus {
	border-color: #2f7047;
	outline: 2px solid #d3e2d5;
}

.form-actions,
.agendamento-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}

.form-actions button,
.agendamento-actions button,
.agendamento-actions a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 9px 16px;
	border: 1px solid #2f7047;
	border-radius: 3px;
	background: #2f7047;
	color: #fff;
	font: inherit;
	cursor: pointer;
	text-decoration: none;
}

.form-actions .button-secondary,
.agendamento-actions .button-secondary,
.agendamento-actions a {
	border-color: #87958a;
	background: #fff;
	color: #344139;
}

.appointment-list {
	max-width: 900px;
	margin-right: auto;
	margin-left: auto;
}

.appointment-list > h2 {
	margin: 0 0 8px;
	color: #2f7047;
	font-size: 24px;
}

.appointment-note {
	margin: 0 0 20px;
	color: #59665c;
}

.appointment-cards {
	display: grid;
	gap: 12px;
	max-width: 720px;
}

.appointment-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 68px;
	padding: 12px 16px;
	border: 1px solid #d8e0d9;
	border-radius: 4px;
	background: #fff;
}

.appointment-card > h3 {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
}

.appointment-info {
	display: grid;
	width: 32px;
	height: 32px;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: #2878c7;
	color: #fff;
	font: inherit;
	font-size: 20px;
	font-weight: 700;
	cursor: pointer;
}

.appointment-info:focus-visible,
.popover-close:focus-visible {
	outline: 2px solid #174b7d;
	outline-offset: 2px;
}

.appointment-popover {
	width: min(440px, calc(100vw - 32px));
	max-height: min(80vh, 500px);
	padding: 20px;
	overflow: auto;
	border: 1px solid #cbd6cd;
	border-radius: 5px;
	background: #fff;
	color: #26332b;
	font: inherit;
}

.popover-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.popover-heading h3 {
	margin: 0;
	color: #2f7047;
	font-size: 19px;
}

.popover-close {
	width: 30px;
	height: 30px;
	border: 1px solid #b9c7bc;
	border-radius: 3px;
	background: #fff;
	color: #26332b;
	font-size: 20px;
	cursor: pointer;
}

.appointment-popover dl {
	margin: 0;
}

.appointment-popover dl > div {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 10px;
	padding: 9px 0;
	border-top: 1px solid #e4e9e5;
}

.appointment-popover dt {
	font-weight: 600;
}

.appointment-popover dd {
	margin: 0;
}

.home-calendar {
	max-width: 1050px;
	margin-right: auto;
	margin-left: auto;
}

.calendar-card {
	padding: 24px;
	border: 1px solid #d8e0d9;
	border-radius: 5px;
	background: #fff;
}

.calendar-card > h2 {
	margin: 0 0 8px;
	color: #2f7047;
	font-size: 24px;
}

.calendar-note {
	margin: 0 0 22px;
	color: #59665c;
}

.month-selector {
	margin: 0;
	padding: 0;
	border: 0;
}

.month-selector legend {
	margin-bottom: 10px;
	font-weight: 600;
}

.month-selector .visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.month-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.month-tabs label {
	padding: 8px 11px;
	border: 1px solid #cbd6cd;
	border-radius: 3px;
	background: #fff;
	color: #294d35;
	cursor: pointer;
}

.month-selector input:focus-visible ~ .month-tabs {
	outline: 2px solid #2f7047;
	outline-offset: 3px;
}

.month-content {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid #e4e9e5;
}

.availability-month {
	display: none;
}

.availability-month h3 {
	margin: 0 0 14px;
	color: #2f7047;
	font-size: 20px;
}

.available-days {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.available-days article {
	padding: 14px;
	border: 1px solid #d8e0d9;
	border-radius: 4px;
	background: #f8faf8;
}

.available-days h4 {
	margin: 0 0 8px;
	font-size: 16px;
}

.available-days p {
	margin: 0;
	color: #2f7047;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.8;
}

.available-days p span::before {
	content: " | ";
	color: #87958a;
	font-weight: 400;
}

#month-dec-2026:checked ~ .month-tabs label[for="month-dec-2026"],
#month-jan-2027:checked ~ .month-tabs label[for="month-jan-2027"],
#month-feb-2027:checked ~ .month-tabs label[for="month-feb-2027"],
#month-mar-2027:checked ~ .month-tabs label[for="month-mar-2027"],
#month-apr-2027:checked ~ .month-tabs label[for="month-apr-2027"],
#month-may-2027:checked ~ .month-tabs label[for="month-may-2027"],
#month-jun-2027:checked ~ .month-tabs label[for="month-jun-2027"],
#month-jul-2027:checked ~ .month-tabs label[for="month-jul-2027"],
#month-aug-2027:checked ~ .month-tabs label[for="month-aug-2027"],
#month-sep-2027:checked ~ .month-tabs label[for="month-sep-2027"],
#month-oct-2027:checked ~ .month-tabs label[for="month-oct-2027"],
#month-nov-2027:checked ~ .month-tabs label[for="month-nov-2027"] {
	border-color: #2f7047;
	background: #e9efe9;
	color: #294d35;
	font-weight: 600;
}

#month-dec-2026:checked ~ .month-content #schedule-dec-2026,
#month-jan-2027:checked ~ .month-content #schedule-jan-2027,
#month-feb-2027:checked ~ .month-content #schedule-feb-2027,
#month-mar-2027:checked ~ .month-content #schedule-mar-2027,
#month-apr-2027:checked ~ .month-content #schedule-apr-2027,
#month-may-2027:checked ~ .month-content #schedule-may-2027,
#month-jun-2027:checked ~ .month-content #schedule-jun-2027,
#month-jul-2027:checked ~ .month-content #schedule-jul-2027,
#month-aug-2027:checked ~ .month-content #schedule-aug-2027,
#month-sep-2027:checked ~ .month-content #schedule-sep-2027,
#month-oct-2027:checked ~ .month-content #schedule-oct-2027,
#month-nov-2027:checked ~ .month-content #schedule-nov-2027 {
	display: block;
}

@media (max-width: 700px) {
	.site-header {
		flex-direction: column;
		align-items: stretch;
		min-height: 72px;
		padding: 8px 14px;
	}

	.brand img {
		width: 84px;
		height: 68px;
	}

	.brand h1 {
		font-size: 17px;
	}

	.sidebar {
		position: static;
		width: auto;
		padding: 8px;
	}

	.sidebar ul {
		display: flex;
		flex-wrap: wrap;
		gap: 2px;
	}

	.sidebar li + li {
		margin-top: 0;
	}

	.sidebar a {
		padding: 8px;
		font-size: 14px;
	}

	main {
		margin-left: 0;
		padding: 20px 16px;
	}

	.cadastro,
	.agendamento {
		width: 100%;
		margin: 20px auto;
		padding: 20px;
	}

	.appointment-list > h2 {
		font-size: 21px;
	}

	.appointment-popover dl > div {
		grid-template-columns: 1fr;
		gap: 3px;
	}

	.calendar-card {
		padding: 18px;
	}

	.calendar-card > h2 {
		font-size: 21px;
	}

	.month-tabs label {
		padding: 7px 9px;
		font-size: 14px;
	}

	.available-days {
		grid-template-columns: 1fr;
	}
}

/* ===== Complementos: apenas o que não tinha estilo correspondente ===== */

/* index.html */
.boas-vindas {
	width: min(100%, 620px);
	margin: 32px auto;
	padding: 28px;
	border: 1px solid #d8e0d9;
	border-radius: 5px;
	background: #fff;
}

.boas-vindas h2 {
	margin: 0 0 12px;
	color: #2f7047;
	font-size: 24px;
}

.boas-vindas p {
	margin: 0;
}

.boas-vindas a {
	color: #2f7047;
	font-weight: 600;
}

/* agendamento.html: mensagem de retorno */
.agendamento [role="status"]:not([hidden]) {
	margin: 0 0 20px;
	padding: 10px 14px;
	border: 1px solid #b9c7bc;
	border-left: 4px solid #2f7047;
	border-radius: 3px;
	background: #e9efe9;
	color: #294d35;
}

.agendamento [role="status"].mensagem-erro:not([hidden]) {
	border-color: #e3b3ae;
	border-left-color: #b3261e;
	background: #fbeeed;
	color: #7a1f19;
}

/* Despesas.html: grupo do produto */
.agendamento fieldset {
	min-width: 0;
	margin: 0 0 17px;
	padding: 16px 16px 0;
	border: 1px solid #d8e0d9;
	border-radius: 4px;
}

.agendamento legend {
	padding: 0 8px;
	color: #2f7047;
	font-weight: 600;
}

.agendamento fieldset > div {
	margin-bottom: 17px;
}

/* listagem.html: alterar status dentro do popover */
.status-editor {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e4e9e5;
}

.status-editor label {
	font-weight: 600;
}

.status-editor select {
	width: 100%;
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid #b9c7bc;
	border-radius: 3px;
	background: #fff;
	color: #26332b;
	font: inherit;
}

.status-editor select:focus {
	border-color: #2f7047;
	outline: 2px solid #d3e2d5;
}

.status-editor button {
	min-height: 40px;
	padding: 9px 16px;
	border: 1px solid #2f7047;
	border-radius: 3px;
	background: #2f7047;
	color: #fff;
	font: inherit;
	cursor: pointer;
}

.status-editor button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.status-editor small {
	color: #59665c;
}

/* Tabelas (listagem de despesas e de serviços) */
.data-list {
	max-width: 1200px;
}

.table-wrapper {
	overflow-x: auto;
	border: 1px solid #d8e0d9;
	border-radius: 5px;
	background: #fff;
}

.data-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.data-table th,
.data-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #e4e9e5;
	text-align: left;
	vertical-align: middle;
}

.data-table thead th {
	background: #2f7047;
	color: #fff;
	font-weight: 600;
	white-space: nowrap;
}

.data-table tbody tr:nth-child(even) {
	background: #f8faf8;
}

.data-table tbody tr:hover {
	background: #e9efe9;
}

.data-table tbody tr:last-child td {
	border-bottom: 0;
}

.data-table .num {
	text-align: right;
	white-space: nowrap;
}

.data-table .empty-row {
	padding: 22px 12px;
	color: #59665c;
	text-align: center;
}

.status-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
}

.status-badge.pago {
	background: #d3e2d5;
	color: #294d35;
}

.status-badge.pendente {
	background: #f3e3c3;
	color: #6b4a0a;
}

.table-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.table-actions form {
	margin: 0;
}

.table-actions button {
	min-height: 32px;
	padding: 5px 12px;
	border: 1px solid #2f7047;
	border-radius: 3px;
	background: #2f7047;
	color: #fff;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}

.table-actions .button-secondary {
	border-color: #87958a;
	background: #fff;
	color: #344139;
}

/* Janelas (dialog): aviso de despesa e edição de despesa */
.popup-despesa,
.modal-editar {
	width: calc(100% - 32px);
	padding: 20px 24px;
	border: 1px solid #cbd6cd;
	border-radius: 5px;
	background: #fff;
	color: #26332b;
	font: inherit;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.popup-despesa {
	max-width: 440px;
}

.modal-editar {
	max-width: 460px;
}

.popup-despesa::backdrop,
.modal-editar::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

.popup-despesa.sucesso {
	border-top: 5px solid #2f7047;
}

.popup-despesa.erro {
	border-top: 5px solid #b3261e;
}

.popup-despesa h3,
.modal-editar h3 {
	margin: 0 0 12px;
	color: #2f7047;
	font-size: 19px;
}

.popup-despesa.erro h3 {
	color: #b3261e;
}

.popup-despesa p {
	margin: 0 0 14px;
	line-height: 1.45;
}

.popup-despesa ul {
	margin: 0 0 16px;
	padding-left: 20px;
	line-height: 1.5;
}

.popup-despesa-acoes,
.acoes-modal {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 16px;
}

.popup-despesa-acoes button,
.acoes-modal button {
	min-height: 40px;
	padding: 9px 16px;
	border: 1px solid #2f7047;
	border-radius: 3px;
	background: #2f7047;
	color: #fff;
	font: inherit;
	cursor: pointer;
}

.acoes-modal .button-secondary {
	border-color: #87958a;
	background: #fff;
	color: #344139;
}

.modal-editar form > div {
	margin-bottom: 14px;
}

.modal-editar .acoes-modal {
	margin-bottom: 0;
}

.modal-editar label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.modal-editar input,
.modal-editar select {
	width: 100%;
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid #b9c7bc;
	border-radius: 3px;
	background: #fff;
	color: #26332b;
	font: inherit;
}

.modal-editar input:focus,
.modal-editar select:focus {
	border-color: #2f7047;
	outline: 2px solid #d3e2d5;
}

.modal-editar hr {
	margin: 16px 0;
	border: 0;
	border-top: 1px solid #e4e9e5;
}

.modal-editar h4 {
	margin: 0 0 12px;
	color: #2f7047;
	font-size: 16px;
}

@media (max-width: 700px) {
	.boas-vindas {
		width: 100%;
		margin: 20px auto;
		padding: 20px;
	}

	.data-table {
		font-size: 13px;
	}

	.data-table th,
	.data-table td {
		padding: 8px;
	}

	.popup-despesa,
	.modal-editar {
		padding: 16px;
	}
}
