@font-face {
	font-family: 'Axiforma';
	src: url('../fonts/Axiforma-Regular.woff2') format('woff2'),
		url('../fonts/Axiforma-Regular.woff') format('woff');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Axiforma';
	src: url('../fonts/Axiforma-Medium.woff2') format('woff2'),
		url('../fonts/Axiforma-Medium.woff') format('woff');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Axiforma';
	src: url('../fonts/Axiforma-SemiBold.woff2') format('woff2'),
		url('../fonts/Axiforma-SemiBold.woff') format('woff');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Axiforma';
	src: url('../fonts/Axiforma-Bold.woff2') format('woff2'),
		url('../fonts/Axiforma-Bold.woff') format('woff');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

:root {
	--bg: #f5efe7;
	--ink: #1f2b24;
	--muted: #52645a;
	--accent: #0f766e;
	--accent-soft: #d8f3ee;
	--accent-strong: #0b5f58;
	--stroke: #cfd9d3;
	--input-bg: #fbfcfb;
	--warn: #b45309;
	--danger: #991b1b;
	--white: #ffffff;
	--panel-shadow: 0 20px 40px rgba(23, 42, 33, 0.08);
	--radius: 18px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: 'Axiforma', sans-serif;
	color: var(--ink);
	background:
		radial-gradient(1100px 500px at 0% -10%, #f5d99f 10%, transparent 60%),
		radial-gradient(900px 400px at 100% 0%, #ccebe4 0%, transparent 55%),
		var(--bg);
}

h1,
h2,
h3,
h4 {
	font-family: 'Axiforma', sans-serif;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-top: 0;
}

a {
	text-decoration: none;
	color: inherit;
}

.app-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	min-height: 100vh;
}

.sidebar {
	background: rgba(255, 255, 255, 0.78);
	backdrop-filter: blur(10px);
	border-right: 1px solid rgba(17, 24, 39, 0.08);
	padding: 28px 20px;
	position: sticky;
	top: 0;
	height: 100vh;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
}

.brand-mark {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--accent), #15a087);
	color: #fff;
	font-weight: 700;
}

.side-nav {
	display: grid;
	gap: 8px;
}

.side-nav a {
	padding: 10px 12px;
	border-radius: 12px;
	font-weight: 500;
	color: var(--muted);
}

.side-nav a.active,
.side-nav a:hover {
	background: var(--accent-soft);
	color: var(--accent-strong);
}

.side-user {
	margin-top: auto;
	background: #fff;
	border-radius: var(--radius);
	padding: 14px;
	box-shadow: var(--panel-shadow);
}

.main-content,
.public-content {
	width: 100%;
	max-width: 1480px;
	margin: 0 auto;
	padding: 28px;
	overflow-x: hidden;
}

.hero-panel {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	align-items: center;
	background: rgba(255, 255, 255, 0.82);
	border-radius: 24px;
	padding: 22px;
	box-shadow: var(--panel-shadow);
	margin-bottom: 20px;
}

.hero-panel p {
	color: var(--muted);
	margin: 0;
}

.hero-actions {
	display: flex;
	gap: 10px;
}

.cards-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 18px;
}

.metric-card {
	border-radius: 20px;
	padding: 16px;
	background: #fff;
	box-shadow: var(--panel-shadow);
	border: 1px solid rgba(17, 24, 39, 0.05);
	display: grid;
	gap: 6px;
}

.metric-card small {
	color: var(--muted);
}

.metric-card strong {
	font-size: 1.3rem;
}

.panel-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.panel {
	background: #fff;
	border-radius: 20px;
	padding: 16px;
	box-shadow: var(--panel-shadow);
	border: 1px solid rgba(17, 24, 39, 0.05);
	min-width: 0;
	overflow: hidden;
}

.reports-stack {
	display: grid;
	gap: 14px;
	margin-top: 14px;
}

.reports-stack .panel {
	margin: 0;
}

.full-width {
	grid-column: 1 / -1;
}

.panel header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.panel-head-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.panel-toggle-btn {
	min-width: 96px;
}

.panel.is-collapsed > :not(header) {
	display: none;
}

.panel.is-collapsed header {
	margin-bottom: 0;
}

.table-wrap {
	max-width: 100%;
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
	min-width: 680px;
}

th,
td {
	text-align: left;
	border-bottom: 1px solid #ece7df;
	padding: 8px 6px;
	font-size: 0.9rem;
}

th {
	color: var(--muted);
	font-weight: 500;
}

.btn {
	border: 0;
	border-radius: 12px;
	padding: 10px 16px;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.1;
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover {
	transform: translateY(-1px);
	filter: brightness(1.02);
}

.btn-primary {
	background: linear-gradient(135deg, var(--accent), #0f8f7e);
	color: #fff;
	box-shadow: 0 8px 18px rgba(15, 118, 110, 0.2);
}

.btn-secondary {
	background: #1f2937;
	color: #fff;
}

.btn-light {
	background: #ffffff;
	color: #1d2f27;
	border: 1px solid #c9d8d0;
	box-shadow: 0 5px 14px rgba(25, 39, 31, 0.08);
}

.btn-danger {
	background: #fee2e2;
	color: var(--danger);
	border: 1px solid #fecaca;
}

.btn-cancel {
	background: #b91c1c;
	color: #ffffff;
	border: 1px solid #991b1b;
	box-shadow: 0 8px 18px rgba(153, 27, 27, 0.2);
}

.btn-cancel:hover {
	filter: brightness(1.06);
}

.side-nav-trigger,
.bottom-nav-trigger {
	appearance: none;
	border: 1px solid #c9d8d0;
	background: #ffffff;
	border-radius: 12px;
	padding: 10px 12px;
	text-align: left;
	font: inherit;
	font-weight: 600;
	color: #204034;
	cursor: pointer;
	box-shadow: 0 5px 14px rgba(25, 39, 31, 0.08);
	transition: all 0.2s ease;
}

.side-nav-trigger {
	width: 100%;
}

.side-nav-trigger:hover,
.bottom-nav-trigger:hover {
	background: var(--accent-soft);
	color: var(--accent-strong);
	border-color: #9ccfbe;
}

.auth-wrapper {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 18px;
	align-items: stretch;
	min-height: calc(100vh - 56px);
}

.auth-hero,
.auth-card {
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.86);
	box-shadow: var(--panel-shadow);
	padding: 24px;
}

.auth-hero p,
.auth-hero li {
	color: var(--muted);
}

.auth-showcase {
	display: grid;
	gap: 16px;
	align-content: start;
}

.auth-feature-list {
	margin: 0;
	padding-left: 18px;
	display: grid;
	gap: 6px;
}

.auth-services-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.auth-service-card {
	padding: 11px 12px;
	border-radius: 12px;
	border: 1px solid #d7e5df;
	background: linear-gradient(160deg, #ffffff 0%, #f3fbf8 100%);
	font-size: 0.86rem;
	font-weight: 600;
	color: #224337;
	box-shadow: 0 8px 18px rgba(16, 62, 52, 0.08);
}

.auth-dev-credit {
	margin: 2px 0 0;
	font-size: 0.9rem;
	color: #375146;
}

.auth-dev-credit a {
	color: #0b5f58;
	font-weight: 600;
	text-decoration: underline;
}

.auth-login-card {
	display: grid;
	gap: 10px;
	align-content: start;
}

.auth-title {
	margin: 0;
}

.auth-subtitle {
	margin: -2px 0 6px;
	color: var(--muted);
	font-size: 0.92rem;
}

.auth-tabs {
	display: flex;
	background: #f4f6f5;
	border-radius: 12px;
	padding: 4px;
	margin-bottom: 12px;
}

.tab-button {
	flex: 1;
	border: 0;
	border-radius: 9px;
	background: transparent;
	padding: 10px;
	cursor: pointer;
	font-weight: 600;
	color: var(--muted);
}

.tab-button.active {
	background: #fff;
	color: var(--ink);
}

.auth-form {
	display: none;
	gap: 8px;
}

.auth-form.is-visible {
	display: grid;
}

.auth-form-login,
.auth-form-register {
	gap: 9px;
}

.auth-form-actions {
	display: grid;
	gap: 8px;
	margin-top: 4px;
}

.auth-action-btn {
	width: min(290px, 100%);
	justify-self: center;
}

.auth-link-inline {
	appearance: none;
	border: 0;
	background: transparent;
	padding: 0;
	font: inherit;
	font-size: 0.82rem;
	line-height: 1.4;
	font-weight: 600;
	color: #0b5f58;
	text-decoration: underline;
	cursor: pointer;
	justify-self: center;
}

.auth-link-inline:hover {
	color: #0a514b;
}

label {
	font-size: 0.85rem;
	color: var(--muted);
}

input,
select,
textarea {
	width: 100%;
	border: 1px solid var(--stroke);
	border-radius: 11px;
	padding: 11px 12px;
	font: inherit;
	background: var(--input-bg);
	color: var(--ink);
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input::placeholder,
textarea::placeholder {
	color: #7b8c83;
}

input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: #7bb8a6;
	background: #ffffff;
	box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

input[type='date'],
input[type='number'] {
	min-height: 44px;
}

textarea {
	min-height: 88px;
	resize: vertical;
}

.check-inline {
	display: flex;
	align-items: center;
	gap: 8px;
}

.check-inline input {
	width: auto;
}

.recover-form {
	display: none;
	gap: 8px;
	margin-top: 2px;
	padding-top: 8px;
	border-top: 1px dashed #d8ddd9;
}

.recover-line {
	display: grid;
	gap: 8px;
}

.recover-form.is-visible {
	display: grid;
}

.flash-stack {
	position: fixed;
	top: 16px;
	right: 16px;
	z-index: 99999;
	display: grid;
	gap: 8px;
	width: min(440px, calc(100vw - 22px));
	pointer-events: none;
}

.alert {
	margin: 0;
	padding: 12px;
	border-radius: 12px;
	font-weight: 500;
}

.alert-floating {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px;
	align-items: start;
	box-shadow: 0 18px 32px rgba(17, 24, 39, 0.2);
	border: 1px solid transparent;
	pointer-events: auto;
	animation: alertSlideIn 0.22s ease;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.alert.is-closing {
	opacity: 0;
	transform: translateY(-8px);
}

.alert-message {
	line-height: 1.4;
}

.alert-close {
	appearance: none;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	padding: 2px 4px;
	border-radius: 6px;
}

.alert-close:hover {
	background: rgba(0, 0, 0, 0.08);
}

.alert-success {
	background: #dcfce7;
	border-color: #86efac;
	color: #166534;
}

.alert-error {
	background: #fee2e2;
	border-color: #fecaca;
	color: #991b1b;
}

.inline-actions,
.inline-edit {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.table-note {
	font-size: 0.78rem;
	font-weight: 600;
	color: #92400e;
	background: #ffedd5;
	border: 1px solid #fed7aa;
	padding: 5px 8px;
	border-radius: 10px;
}

.inline-edit input {
	min-width: 160px;
}

.filters-grid,
.form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.filters-grid .inline-actions {
	grid-column: 1 / -1;
}

.field-group {
	display: grid;
	gap: 6px;
}

.field-group.full-row {
	grid-column: 1 / -1;
}

.field-group label {
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #5b6a62;
}

.field-hint {
	font-size: 0.78rem;
	color: #4f6258;
	line-height: 1.35;
}

.form-actions {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-top: 2px;
}

.form-actions .btn {
	width: 100%;
}

.recebimento-actions-block {
	grid-column: 1 / -1;
	display: flex;
	justify-content: flex-start;
}

.purchase-selector {
	grid-column: 1 / -1;
	display: grid;
	gap: 8px;
	max-height: 220px;
	overflow-y: auto;
	padding-right: 4px;
}

.purchase-check {
	display: grid;
	grid-template-columns: 22px 1fr;
	gap: 6px 10px;
	align-items: start;
	border: 1px solid #d8e0dc;
	border-radius: 12px;
	padding: 10px 12px;
	background: #f9fbfa;
	cursor: pointer;
}

.purchase-check input {
	margin-top: 2px;
}

.purchase-check-title {
	font-weight: 600;
}

.purchase-check small {
	grid-column: 2 / 3;
	color: var(--muted);
	font-size: 0.8rem;
}

.purchase-check.hidden {
	display: none;
}

.recebimento-summary {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	padding: 10px;
	border: 1px solid #d8e0dc;
	border-radius: 12px;
	background: #f7faf9;
}

.recebimento-summary small {
	color: var(--muted);
	font-size: 0.75rem;
	display: block;
	margin-bottom: 4px;
}

.recebimento-summary strong {
	font-size: 1rem;
}

.compra-summary {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	padding: 10px;
	border: 1px solid #d8e0dc;
	border-radius: 12px;
	background: #f7faf9;
}

.compra-summary small {
	color: var(--muted);
	font-size: 0.75rem;
	display: block;
	margin-bottom: 4px;
}

.compra-summary strong {
	font-size: 0.95rem;
}

.recebimento-summary .is-negative {
	color: #b91c1c;
}

.recebimento-summary .is-positive {
	color: #166534;
}

.hidden-field {
	display: none;
}

.conditional-field {
	display: none;
}

.conditional-field.is-visible {
	display: grid;
	gap: 6px;
}

.hidden-field.is-visible {
	grid-column: 1 / -1;
	display: grid;
	gap: 6px;
	border: 1px solid #f0b8b8;
	border-color: #f0b8b8;
	background: #fff7f7;
	padding: 10px;
	border-radius: 12px;
}

.modal {
	position: fixed;
	inset: 0;
	background: rgba(14, 25, 21, 0.45);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	overflow-y: auto;
	z-index: 40;
}

.modal.is-open {
	display: flex;
	animation: fadeIn 0.2s ease;
}

.modal-card {
	width: min(640px, calc(100vw - 32px));
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 32px);
	background: #fff;
	border-radius: 20px;
	padding: 18px;
	box-shadow: 0 25px 45px rgba(6, 22, 16, 0.25);
	overflow-y: auto;
}

.modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}

.modal-head h3 {
	margin: 0;
}

.modal-head-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

.modal-head-actions .btn {
	padding: 8px 12px;
	font-size: 0.82rem;
}

.modal-body {
	display: block;
}

.modal-card.is-minimized {
	width: min(460px, 100%);
	padding-bottom: 12px;
}

.modal-card.is-minimized .modal-body {
	display: none;
}

.status-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 5px 10px;
	border-radius: 999px;
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	border: 1px solid transparent;
}

.status-chip-pendente {
	background: #fff7ed;
	border-color: #fed7aa;
	color: #9a3412;
}

.status-chip-parcial {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: #1d4ed8;
}

.status-chip-quitado {
	background: #ecfdf3;
	border-color: #bbf7d0;
	color: #166534;
}

.report-row-paid {
	background: #f7fcf9;
}

.report-row-partial {
	background: #f8fbff;
}

.report-row-pending {
	background: #fffdfa;
}

.confirm-modal-card {
	width: min(480px, 100%);
}

.confirm-modal-card p {
	color: var(--muted);
	margin-bottom: 14px;
}

.loading-overlay {
	position: fixed;
	inset: 0;
	background: rgba(7, 16, 13, 0.45);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 80;
}

.loading-overlay.is-active {
	display: flex;
}

.loading-card {
	background: #ffffff;
	padding: 16px 18px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	gap: 10px;
	box-shadow: 0 20px 35px rgba(7, 18, 14, 0.25);
}

.loading-spinner {
	width: 18px;
	height: 18px;
	border: 3px solid #d5e7df;
	border-top-color: var(--accent);
	border-radius: 999px;
	animation: spin 0.8s linear infinite;
}

.btn.is-loading {
	opacity: 0.72;
	cursor: wait;
}

.modal-links-card p {
	margin-top: -4px;
	color: var(--muted);
}

.quick-links-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	margin-top: 12px;
}

.quick-link-btn {
	appearance: none;
	border: 1px solid #c9d8d0;
	background: #ffffff;
	border-radius: 12px;
	padding: 12px 14px;
	font: inherit;
	font-weight: 600;
	color: #1d2f27;
	text-align: left;
	cursor: pointer;
	transition: all 0.2s ease;
}

.quick-link-btn:hover {
	background: var(--accent-soft);
	border-color: #9ccfbe;
	color: #0b5f58;
}

.quick-links-footer {
	display: flex;
	justify-content: flex-end;
	margin-top: 14px;
}

.bottom-nav {
	display: none;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

@keyframes alertSlideIn {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

