/* ============================================================
   Contabler — Fontes
   ============================================================ */
@font-face {
	font-family: 'Jost';
	font-style: normal;
	font-weight: 400;
	src: url('../fonts/jost-v20-latin-regular.woff2') format('woff2');
	font-display: swap;
}
@font-face {
	font-family: 'Jost';
	font-style: normal;
	font-weight: 500;
	src: url('../fonts/jost-v20-latin-500.woff2') format('woff2');
	font-display: swap;
}
@font-face {
	font-family: 'Jost';
	font-style: normal;
	font-weight: 600;
	src: url('../fonts/jost-v20-latin-600.woff2') format('woff2');
	font-display: swap;
}
@font-face {
	font-family: 'Jost';
	font-style: normal;
	font-weight: 700;
	src: url('../fonts/jost-v20-latin-700.woff2') format('woff2');
	font-display: swap;
}
/* ============================================================
   Contabler — Estilos globais
   ============================================================ */
:root {
	--border: #eaeef0;
	--border-input: #d7dcdf;
	--danger: #dc2626;
	--g2: repeat(2, minmax(0, 1fr));
	--g3: repeat(3, minmax(0, 1fr));
	--g4: repeat(4, minmax(0, 1fr));
	--g5: repeat(5, minmax(0, 1fr));
	--g6: repeat(6, minmax(0, 1fr));
	--gray: #eef0f1;
	--green-light: #d1fae5;
	--header-h: 60px;
	--primary: #1268df;
	--primary-dark: #0e54b8;
	--primary-light: #eceff4;
	--radius: 8px;
	--shadow: 0 1px 3px hsl(var(--text) / .04), 0 4px 16px -2px hsl(var(--text) / .06);
	--sidebar-w: 240px;
	--success: #16a34a;
	--text: #424851;
	--text-muted: #6b7280;
	--warning: #d97706;
	--white: #ffffff;
}
/* Tema escuro */
[data-theme="dark"] {
	--border: #30353f;
	--border-input: #323946;
	--gray: #191d25;
	--green-light: #224835;
	--primary-light: #2c303a;
	--shadow: 0 1px 3px rgba(0, 0, 0, .3);
	--text: #e2e8f0;
	--text-muted: #94a3b8;
	--white: #262a35;
}
*, *::before, *::after {
	padding: 0;
	margin: 0;
	box-sizing: border-box;
}
html {
	font-size: 16px;
}
body {
	font-family: 'Jost', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
	line-height: 1.2;
	color: var(--text);
	background: var(--gray);
}
a {
	color: var(--primary);
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
.relative, .notif-inner {
	position: relative;
}
/* ============================================================
   Layout geral: sidebar + main
   ============================================================ */
.app-layout {
	display: flex;
	min-height: 100vh;
}
/* -------- Sidebar (mobile-only drawer) -------- */
.sidebar {
	position: fixed;
	top: var(--header-h);
	bottom: 0;
	left: 0;
	z-index: 200;
	display: none;
	/* hidden on desktop */
	width: var(--sidebar-w);
	background: var(--white);
	border-right: 1px solid var(--border);
	transform: translateX(-100%);
	box-shadow: var(--shadow);
	transition: transform .25s ease;
	flex-direction: column;
}
.sidebar.open {
	transform: translateX(0);
}
.sidebar-overlay {
	position: fixed;
	z-index: 199;
	display: none;
	background: rgba(0, 0, 0, .35);
	inset: 0;
}
.sidebar-overlay.open {
	display: block;
}
.sidebar__nav {
	padding: 12px 0;
	overflow-y: auto;
	flex: 1;
}
.sidebar__nav a {
	display: flex;
	padding: 10px 20px;
	font-size: .9rem;
	color: var(--text);
	border-left: 3px solid transparent;
	transition: background .15s, border-color .15s;
	align-items: center;
	gap: 10px;
}
.sidebar__nav a:hover,
.sidebar__nav a.active {
	color: var(--primary);
	text-decoration: none;
	background: var(--primary-light);
	border-left-color: var(--primary);
}
.sidebar__nav a svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}
.sidebar__section-label {
	padding: 16px 20px 4px;
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: .05em;
	color: var(--text-muted);
	text-transform: uppercase;
}
/* -------- Main area -------- */
.main-area {
	display: flex;
	min-height: 100vh;
	flex: 1;
	flex-direction: column;
	padding-bottom: 80px;
}
/* -------- Header -------- */
.top-header {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 102;
	display: flex;
	width: 100%;
	height: var(--header-h);
	padding: 0 20px;
	background: var(--white);
	box-shadow: var(--shadow);
	align-items: center;
	gap: 0;
	justify-content: space-between;
}
/* Brand: hamburger + logo */
.top-header__brand {
	display: flex;
	margin-right: 12px;
	align-items: center;
	flex-shrink: 0;
	gap: 10px;
}
.top-header__logo {
	display: flex;
	text-decoration: none;
	align-items: center;
	gap: 8px;
}
.top-header__logo img {
	height: 32px;
}
.top-header__logo span {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 12px;
}
/* Hamburger: hidden on desktop, shown on mobile */
#sidebar-toggle {
	display: none;
}
.btn-icon {
	display: flex;
	width: 34px;
	height: 34px;
	padding: 0;
	color: var(--text);
	cursor: pointer;
	background: none;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: background .15s;
	align-items: center;
	flex-shrink: 0;
	justify-content: center;
}
.btn-icon:hover {
	background: var(--gray);
}
/* Desktop nav links */
.top-nav {
	display: flex;
	overflow-x: auto;
	align-items: center;
	flex: 1;
	gap: 2px;
	justify-content: center;
	scrollbar-width: none;
}
.top-nav::-webkit-scrollbar {
	display: none;
}
.top-nav a {
	display: flex;
	padding: 6px 10px;
	font-size: .875rem;
	font-weight: 500;
	color: var(--text);
	text-decoration: none;
	white-space: nowrap;
	border-radius: var(--radius);
	transition: background .15s, color .15s;
	align-items: center;
}
.top-nav a:hover {
	color: var(--primary);
	background: var(--gray);
}
.top-nav a.active {
	color: var(--primary);
	background: var(--primary-light);
}
.top-header__actions {
	display: flex;
	align-items: center;
	gap: 16px;
}
/* Notificações */
.notif-btn {
	position: relative;
	display: flex;
	padding: 4px;
	color: var(--text-muted);
	cursor: pointer;
	background: none;
	border: none;
}
.notif-btn svg {
	width: 22px;
	height: 22px;
}
.notif-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	display: flex;
	height: 16px;
	min-width: 16px;
	padding: 0 3px;
	font-size: .65rem;
	font-weight: 700;
	color: #fff;
	background: var(--danger);
	border-radius: 8px;
	align-items: center;
	justify-content: center;
}
/* Avatar / usuário */
.user-menu {
	display: flex;
	padding: 4px 8px;
	cursor: pointer;
	border-radius: var(--radius);
	transition: background .15s;
	align-items: center;
	gap: 8px;
}
.user-menu:hover {
	background: var(--gray);
}
.user-avatar {
	display: flex;
	width: 32px;
	height: 32px;
	font-size: .8rem;
	font-weight: 700;
	color: #fff;
	background: var(--primary);
	border-radius: 50%;
	align-items: center;
	flex-shrink: 0;
	justify-content: center;
	overflow: hidden;
}
.user-avatar-img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}
/* Avatar upload widget (página de perfil) */
.avatar-upload {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}
.avatar-upload__preview {
	position: relative;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: var(--primary);
	cursor: pointer;
	overflow: hidden;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.avatar-upload__initials {
	font-size: 2rem;
	font-weight: 700;
	color: #fff;
	user-select: none;
}
.avatar-upload__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}
.avatar-upload__overlay {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .45);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity .18s;
	color: #fff;
}
.avatar-upload__preview:hover .avatar-upload__overlay {
	opacity: 1;
}
.avatar-upload__actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
/* Logo upload widget (página de configurações) */
.logo-upload {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.logo-upload__preview {
	display: flex;
	align-items: center;
	min-height: 64px;
	padding: 12px 16px;
	border: 1px dashed var(--border);
	border-radius: 8px;
	background: var(--bg-alt, #F7F9FD);
}
.logo-upload__img {
	max-height: 50px;
	max-width: 280px;
	display: block;
	object-fit: contain;
}
.logo-upload__placeholder {
	font-size: .85rem;
	color: var(--text-muted);
}
.logo-upload__actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}
.user-name {
	font-size: .85rem;
	font-weight: 500;
}
.user-role {
	font-size: .7rem;
	color: var(--text-muted);
}
/* Toggle tema */
.theme-toggle {
	display: flex;
	padding: 4px 10px;
	font-size: .78rem;
	color: var(--text);
	cursor: pointer;
	background: none;
	border: 1px solid var(--border);
	border-radius: 6px;
	transition: background .15s;
	align-items: center;
	gap: 5px;
}
.theme-toggle:hover {
	background: var(--gray);
}
/* -------- Content -------- */
.page-content {
	padding: 86px 28px 28px;
	flex: 1;
}
/* ============================================================
   Componentes
   ============================================================ */
/* Card */
.card {
	padding: 20px;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.card__title {
	margin-bottom: 16px;
	font-size: .95rem;
	font-weight: 600;
}
/* Botões */
.btn {
	display: inline-flex;
	padding: 8px 16px;
	font-size: .875rem;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	border: none;
	border-radius: var(--radius);
	transition: opacity .15s, background .15s;
	align-items: center;
	gap: 6px;
	min-height: 30px;
}
.btn:hover {
	text-decoration: none;
	opacity: .88;
}
.btn-primary {
	color: #fff;
	background: var(--primary);
}
.btn-danger {
	color: #fff;
	background: var(--danger);
}
.btn-outline {
	color: var(--text);
	background: transparent;
	border: 1px solid var(--text-muted);
}
.btn-outline:hover {
	color: var(--white);
	background: var(--text-muted);
}
.btn-sm {
	padding: 5px 10px;
	font-size: .8rem;
}
/* Formulários */
.form-group {
	margin-bottom: 16px;
}
.form-label {
	display: block;
	margin-bottom: 6px;
	font-size: .85rem;
	font-weight: 500;
}
.form-control {
	width: 100%;
	padding: 7px 12px;
	font-size: .9rem;
	color: var(--text);
	background: var(--white);
	border: 1px solid var(--border-input);
	border-radius: var(--radius);
	outline: none;
	transition: border-color .15s;
}
.form-control:focus {
	border-color: var(--primary);
}
/* Alertas */
@keyframes alert-in {
	from {
		opacity: 0;
		transform: translateX(24px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}
@keyframes alert-out {
	from {
		opacity: 1;
		transform: translateX(0);
	}
	to {
		opacity: 0;
		transform: translateX(24px);
	}
}
.alert {
	position: fixed;
	top: 62px;
	right: 15px;
	z-index: 1000;
	display: flex;
	min-width: 360px;
	min-height: 60px;
	padding: 12px 16px;
	margin-bottom: 16px;
	font-size: .875rem;
	line-height: 1.2;
	border-radius: var(--radius);
	animation: alert-in .3s ease forwards;
	align-items: center;
	flex-wrap: wrap;
}
.alert.alert-hiding {
	animation: alert-out .4s ease forwards;
}
.alert-error {
	color: #991b1b;
	background: #fef2f2;
	border: 1px solid #fecaca;
}
.alert-success {
	color: var(--text);
	background: var(--green-light);
	border: 1px solid #065f46;
}
.alert-info {
	color: var(--text);
	background: var(--white);
	border: 1px solid var(--primary);
}
/* Badge */
.badge {
	display: inline-flex;
	padding: 2px 8px;
	font-size: .72rem;
	font-weight: 600;
	border-radius: 12px;
	align-items: center;
}
.badge-success {
	color: #065f46;
	background: var(--green-light);
}
.badge-warning {
	color: #92400e;
	background: #fef3c7;
}
.badge-danger {
	color: #991b1b;
	background: #fee2e2;
}
.badge-info {
	color: #1e40af;
	background: #dbeafe;
}
.badge-gray {
	color: #374151;
	background: #f3f4f6;
}
/* Tabelas */
.table-wrapper {
	overflow-x: auto;
	width: 100%;
	max-width: calc(100vw - 32px);
}
table {
	width: 100%;
	font-size: .875rem;
	border-collapse: collapse;
	overflow-x: auto;
}
thead th {
	padding: 8px;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--text-muted);
	text-align: left;
	text-transform: uppercase;
	background: var(--gray);
	border-top: 1px solid #6b728024;
	border-bottom: 1px solid #6b728024;
}
tbody td {
	padding: 8px;
	vertical-align: middle;
	border-bottom: 1px solid var(--border);
}
thead th, tbody td {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
tbody tr:last-child td {
	border-bottom: none;
}
tbody tr:hover {
	/*background: var(--gray);*/
	background: var(--border);
}
table select.form-control {
	min-width: 94px;
}
/* Paginação */
.pagination {
	display: flex;
	padding: 16px 0 0;
	align-items: center;
	gap: 4px;
	justify-content: center;
}
.pagination a,
.pagination span {
	display: inline-flex;
	width: 32px;
	height: 32px;
	font-size: .85rem;
	color: var(--text);
	text-decoration: none;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: background .15s;
	align-items: center;
	justify-content: center;
}
.pagination a:hover {
	background: var(--gray);
}
.pagination .active {
	color: #fff;
	background: var(--primary);
	border-color: var(--primary);
}
.pagination .pagination__nav {
	font-size: 1rem;
	font-weight: 500;
	color: var(--text-muted);
}
.pagination .pagination__nav:hover {
	color: var(--primary);
	background: var(--gray);
}
.pagination .pagination__ellipsis {
	display: inline-flex;
	width: 32px;
	height: 32px;
	align-items: flex-end;
	justify-content: center;
	font-size: .85rem;
	color: var(--text-muted);
	padding-bottom: 4px;
	pointer-events: none;
	border: none;
	background: none;
}
/* ============================================================
   Layout de autenticação
   ============================================================ */
.auth-page {
	display: flex;
	min-height: 100vh;
	padding: 24px;
	background: var(--gray);
	align-items: center;
	justify-content: center;
}
.auth-box {
	width: 100%;
	max-width: 400px;
	padding: 40px;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.auth-logo {
	display: flex;
	margin-bottom: 28px;
	align-items: center;
	gap: 10px;
	justify-content: center;
}
.auth-logo img {
	height: 32px;
}
.auth-logo span {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--primary);
}
.auth-box h2 {
	margin-bottom: 6px;
	font-size: 1.15rem;
	font-weight: 600;
	text-align: center;
}
.auth-box p.subtitle {
	margin-bottom: 24px;
	font-size: .85rem;
	color: var(--text-muted);
	text-align: center;
}
/* ============================================================
   Sidebar footer
   ============================================================ */
.sidebar__footer {
	padding: 16px 20px;
	font-size: .8rem;
	color: var(--text-muted);
	border-top: 1px solid var(--border);
}
/* ============================================================
   Page header (título + botão de ação)
   ============================================================ */
.page-header {
	display: flex;
	margin-bottom: 20px;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
}
.page-title {
	margin: 0;
	font-size: 1.3rem;
	font-weight: 700;
}
.page-subtitle {
	margin-top: 2px;
	font-size: .85rem;
	color: var(--text-muted);
}
/* Cabeçalho de formulário (← Voltar + título) */
.form-header {
	display: flex;
	margin-bottom: 24px;
	align-items: center;
	gap: 12px;
}
.form-title {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 700;
}
/* Seção interna de um formulário (ex: settings) */
.section-title {
	padding-bottom: 10px;
	margin-bottom: 16px;
	font-size: .95rem;
	font-weight: 600;
	border-bottom: 1px solid var(--border);
}
.section-title+.section-title,
h2+.section-title {
	margin-top: 24px;
}
/* ============================================================
   Stat cards — dashboard
   ============================================================ */
.stat-grid {
	display: grid;
	margin-bottom: 28px;
	gap: 16px;
	grid-template-columns: var(--g4);
}
.stat-card {
	display: flex;
	align-items: center;
	gap: 16px;
}
.stat-icon {
	display: flex;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	align-items: center;
	flex-shrink: 0;
	justify-content: center;
}
.stat-icon--blue {
	background: var(--primary-light);
}
.stat-icon--yellow {
	background: #fef3c7;
}
.stat-icon--green {
	background: var(--green-light);
}
.stat-icon--purple {
	background: #ede9fe;
}
.stat-value {
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1;
}
.stat-label {
	margin-top: 2px;
	font-size: .8rem;
	color: var(--text-muted);
}
/* ============================================================
   Card variants
   ============================================================ */
/* Tabela dentro de card sem padding */
.card--table {
	padding: 0;
	overflow: hidden;
}
/* Cabeçalho do card com título + ação */
.card-header {
	display: flex;
	margin-bottom: 16px;
	align-items: center;
	justify-content: space-between;
}
.card-header .card__title {
	margin: 0;
	border: 0;
	padding: 0;
}
/* Larguras máximas reutilizáveis */
.mw-540 {
	max-width: 540px;
}
.mw-600 {
	max-width: 600px;
}
.mw-680 {
	max-width: 680px;
}
.mw-760 {
	max-width: 760px;
}
.mw-800 {
	max-width: 800px;
}
.m-auto {
	margin: auto;
}
/* ============================================================
   Filter bar
   ============================================================ */
.filter-bar {
	padding: 12px 16px;
	margin-bottom: 16px;
}
.filter-row {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 10px;
}
.filter-label {
	display: block;
	margin-bottom: 4px;
	font-size: .78rem;
	color: var(--text-muted);
}
.filter-actions {
	display: flex;
	align-self: flex-end;
	gap: 6px;
}
.date-range {
	display: flex;
	gap: 6px;
}
.date-range .fc--month {
	width: 80px;
}
.date-range .fc--year {
	width: 90px;
}
#bulk-bar>div {
	display: flex;
	gap: 4px;
	align-items: center;
	margin-right: 20px;
}
#bulk-bar button {
	min-height: 36px;
}
#bulk-bar>div button {
	font-size: 12px;
	line-height: 1;
}
/* ============================================================
   Table utilities
   ============================================================ */
.table-toolbar {
	display: flex;
	padding: 10px 16px;
	background: var(--gray);
	border-bottom: 1px solid var(--border);
	align-items: center;
	gap: 10px;
}
.table-footer {
	padding: 12px 16px;
	border-top: 1px solid var(--border);
}
.table-actions {
	display: flex;
	align-items: center;
	gap: 4px;
}
/* Célula de nome truncado */
.td-truncate {
	max-width: 200px;
	overflow: hidden;
	font-size: .875rem;
	font-weight: 500;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.td-sm {
	font-size: .875rem;
}
.td-xs {
	font-size: .82rem;
	color: var(--text-muted);
}
.td-sec {
	font-size: .75rem;
	color: var(--text-muted);
}
.td-empty {
	padding: 32px;
	color: var(--text-muted);
	text-align: center;
}
th.th-center,
td.td-center {
	text-align: center;
}
th.th-actions {
	width: 130px;
}
th.th-check {
	width: 32px;
}
th.th-status {
	width: 120px;
}
/* ============================================================
   Form layouts
   ============================================================ */
.form-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: 1fr 1fr;
}
.col-span-full {
	grid-column: 1 / -1;
}
.form-actions {
	display: flex;
	margin-top: 8px;
	gap: 10px;
}
.required {
	color: var(--danger);
}
.field-hint {
	margin-top: 4px;
	font-size: .8rem;
	color: var(--text-muted);
}
.field-error {
	display: block;
	margin-top: 4px;
	font-size: .8rem;
	color: var(--danger);
}
.label-hint {
	font-size: .8rem;
	font-weight: 400;
	color: var(--text-muted);
}
.border-danger {
	border-color: var(--danger) !important;
}
/* Checkbox row (ex: categorias) */
.checkbox-row {
	display: flex;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 24px;
}
.checkbox-label {
	display: flex;
	font-size: .9rem;
	cursor: pointer;
	align-items: center;
	gap: 8px;
}
/* Grid de checkboxes (ex: empresas do staff) */
.company-checkboxes {
	display: grid;
	max-height: 200px;
	padding: 10px;
	overflow-y: auto;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	gap: 8px;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.company-checkboxes .checkbox-label {
	font-size: .875rem;
}
/* ============================================================
   Notification dropdown
   ============================================================ */
.notif-dropdown {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 200;
	display: none;
	width: 340px;
	background: var(--border-input);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
.notif-dropdown__header {
	display: flex;
	padding: 12px 16px;
	border-bottom: 1px solid var(--border);
	align-items: center;
	justify-content: space-between;
}
.notif-dropdown__title {
	font-size: .9rem;
	font-weight: 600;
}
.notif-dropdown__links {
	display: flex;
	align-items: center;
	gap: 8px;
}
.notif-dropdown__mark-all {
	padding: 0;
	font-size: .78rem;
	color: var(--primary);
	cursor: pointer;
	background: none;
	border: none;
}
.notif-dropdown__see-all {
	font-size: .78rem;
	color: var(--text-muted);
}
.notif-dropdown__list {
	max-height: 360px;
	overflow-y: auto;
}
.notif-dropdown__empty {
	padding: 24px;
	font-size: .85rem;
	color: var(--text-muted);
	text-align: center;
}
/* Itens de notificação (dropdown e página de histórico) */
.notif-dropdown__list .notif-item {
	padding: 12px 16px;
}
.notif-item {
	display: flex;
	padding: 16px 20px;
	cursor: pointer;
	border-bottom: 1px solid var(--border);
	transition: background .15s;
	align-items: flex-start;
	gap: 14px;
}
.notif-item--unread {
	background: var(--gray);
}
.notif-item:hover {
	filter: brightness(.97);
}
.notif-item__icon {
	margin-top: 2px;
	font-size: 1.3rem;
	flex-shrink: 0;
}
.notif-item__body {
	min-width: 0;
	flex: 1;
}
.notif-item__meta {
	display: flex;
	margin-bottom: 4px;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: space-between;
}
.notif-item__type {
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--text-muted);
	text-transform: uppercase;
}
.notif-item__time {
	font-size: .78rem;
	color: var(--text-muted);
}
.notif-item__text {
	font-size: .9rem;
	line-height: 1.5;
	color: var(--text);
}
.notif-item__dot {
	width: 8px;
	height: 8px;
	margin-top: 6px;
	background: var(--primary);
	border-radius: 50%;
	flex-shrink: 0;
}
.notif-item .notif-check {
	flex-shrink: 0;
	margin-top: 2px;
	cursor: pointer;
}
.notif-item__meta-left {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}
.notif-item__sub {
	margin-top: 4px;
	font-size: .78rem;
	color: var(--text-muted);
}
.notif-recipient {
	font-size: .78rem;
	color: var(--text-muted);
}
.notif-item__actions {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
	opacity: 0;
	transition: opacity .15s;
}
.notif-item:hover .notif-item__actions {
	opacity: 1;
}
@media (max-width: 640px) {
	.notif-item__actions {
		opacity: 1;
	}
}
/* ── Tabs de direção (Recebidas / Enviadas / Arquivadas) ── */
.notif-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 14px;
	border-bottom: 2px solid var(--border);
}
.notif-tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 6px 6px 0 0;
	font-size: .875rem;
	font-weight: 500;
	color: var(--text-muted);
	text-decoration: none;
	border: 2px solid transparent;
	border-bottom: none;
	margin-bottom: -2px;
	transition: color .15s, background .15s;
}
.notif-tab:hover {
	color: var(--text);
	background: var(--gray);
}
.notif-tab--active {
	color: var(--primary);
	border-color: var(--border);
	border-bottom-color: var(--card-bg);
	background: var(--card-bg);
}
.count-badge--sm {
	font-size: .68rem;
	padding: 1px 5px;
	min-width: 17px;
}
/* ── Alertas flash ── */
.alert {
	padding: 10px 16px;
	border-radius: 8px;
	font-size: .875rem;
}
.alert--success {
	background: var(--green-light);
	color: #065f46;
	border: 1px solid #a7f3d0;
}
.alert--error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}
/* ============================================================
   Upload / Drop zone
   ============================================================ */
.drop-zone {
	padding: 40px 20px;
	text-align: center;
	cursor: pointer;
	border: 2px dashed var(--border-input);
	border-radius: var(--radius);
	transition: border-color .2s, background .2s;
}
.drop-zone:hover,
.drop-zone.drag-over {
	background: var(--primary-light);
	border-color: var(--primary);
}
.drop-zone__icon {
	margin-bottom: 12px;
}
.drop-zone__hint {
	margin: 0;
	font-size: .9rem;
	color: var(--text-muted);
}
.drop-zone__hint span {
	color: var(--primary);
}
.drop-zone__types {
	margin-top: 6px;
	font-size: .78rem;
	color: var(--text-muted);
}
.upload-summary {
	display: none;
	padding: 12px 14px;
	margin-top: 16px;
	font-size: .875rem;
	background: var(--gray);
	border-radius: var(--radius);
}
.file-item {
	display: flex;
	padding: 10px 0;
	font-size: .875rem;
	border-bottom: 1px solid var(--border-input);
	align-items: center;
	gap: 12px;
}
.file-item:last-child {
	border-bottom: none;
}
.file-name {
	overflow: hidden;
	font-weight: 500;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
}
.file-size {
	font-size: .8rem;
	color: var(--text-muted);
	white-space: nowrap;
}
.progress-wrap {
	height: 6px;
	min-width: 80px;
	overflow: hidden;
	background: var(--border);
	border-radius: 3px;
	flex: 1;
}
.progress-bar {
	width: 0%;
	height: 100%;
	background: var(--primary);
	border-radius: 3px;
	transition: width .2s;
}
.status-icon {
	width: 20px;
	font-size: 1rem;
	text-align: center;
	flex-shrink: 0;
}
/* ============================================================
   Profile
   ============================================================ */
.profile-grid {
	display: grid;
	max-width: 760px;
	gap: 20px;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.profile-fields {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.profile-field__label {
	margin-bottom: 2px;
	font-size: .78rem;
	color: var(--text-muted);
}
.profile-field__value {
	font-weight: 500;
}
.page-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}
.page-header .btn, .page-header__actions .btn {
	min-height: 40px;
	padding: 0 25px;
	font-size: 14px;
	font-weight: 500;
}
/* ============================================================
   Page actions (botões abaixo do título, área do cliente)
   ============================================================ */
.page-actions {
	display: flex;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 16px;
}
/* ============================================================
   Auth extras
   ============================================================ */
.auth-actions {
	display: flex;
	margin-bottom: 20px;
	justify-content: flex-end;
}
.auth-link {
	font-size: .85rem;
}
.auth-footer {
	margin-top: 20px;
	font-size: .85rem;
	text-align: center;
}
.btn--full {
	width: 100%;
	justify-content: center;
}
/* ============================================================
   Utilities
   ============================================================ */
.text-muted {
	color: var(--text-muted);
}
.text-danger {
	color: var(--danger);
}
.text-success {
	color: var(--success);
}
.text-primary {
	color: var(--primary);
}
.text-sm {
	font-size: .875rem;
}
.text-xs {
	font-size: .82rem;
}
.font-medium {
	font-weight: 500;
}
.mt-0 {
	margin-top: 0;
}
.mw-700 {
	max-width: 700px;
}
.mw-900 {
	max-width: 900px;
}
.mw-1100 {
	max-width: 1100px;
}
.card__subtitle {
	margin-bottom: 24px;
	font-size: .9rem;
	color: var(--text-muted);
}
/* ============================================================
   grid
   ============================================================ */
.g:after {
	clear: both;
}
.vmiddle {
	vertical-align: middle;
	-webkit-box-align: center;
	align-items: center;
}
.justify-center {
	-webkit-box-pack: center;
	justify-content: center;
}
.vbottom {
	vertical-align: bottom;
	-webkit-box-align: end;
	align-items: flex-end;
}
.vtop {
	vertical-align: top;
	-webkit-box-align: start;
	align-items: flex-start;
}
.equal-height {
	grid-auto-rows: 1fr;
}
.g {
	display: grid;
	column-gap: 15px;
	grid-template-columns: repeat(12, 1fr);
	row-gap: 15px;
}
.g>* {
	position: relative;
	min-height: 1px;
	grid-column-start: span 12;
}
.g.grid10 {
	grid-template-columns: repeat(10, 1fr);
}
.g.cg0 {
	column-gap: 0px;
}
.g.rg0 {
	row-gap: 0px;
}
.g.cg1 {
	column-gap: 10px;
}
.g.rg1 {
	row-gap: 10px;
}
.g.cg2 {
	column-gap: 20px;
}
.g.rg2 {
	row-gap: 20px;
}
.g.cg3 {
	column-gap: 30px;
}
.g.rg3 {
	row-gap: 30px;
}
.g.cg4 {
	column-gap: 40px;
}
.g.rg4 {
	row-gap: 40px;
}
.g.cg5 {
	column-gap: 50px;
}
.g.rg5 {
	row-gap: 50px;
}
.g.cg6 {
	column-gap: 60px;
}
.g.rg6 {
	row-gap: 60px;
}
@media (min-width: 992px) {
	.g.md2 {
		grid-template-columns: var(--g2);
	}
	.g.md3 {
		grid-template-columns: var(--g3);
	}
	.g.md4 {
		grid-template-columns: var(--g4);
	}
	.g.md5 {
		grid-template-columns: var(--g5);
	}
	.g.md6 {
		grid-template-columns: var(--g6);
	}
	.g.md2>*,
	.g.md3>*,
	.g.md4>*,
	.g.md5>*,
	.g.md6>* {
		grid-column-start: auto;
	}
	.g.mdoff1 {
		width: calc(100% - 1 * 10%);
		margin-right: auto;
		margin-left: auto;
	}
	.g.mdoff2 {
		width: calc(100% - 2 * 10%);
		margin-right: auto;
		margin-left: auto;
	}
	.g.mdoff3 {
		width: calc(100% - 3 * 10%);
		margin-right: auto;
		margin-left: auto;
	}
	.g.mdoff4 {
		width: calc(100% - 4 * 10%);
		margin-right: auto;
		margin-left: auto;
	}
	.g .md1 {
		grid-column-start: span 1;
	}
	.g .md2 {
		grid-column-start: span 2;
	}
	.g .md3 {
		grid-column-start: span 3;
	}
	.g .md4 {
		grid-column-start: span 4;
	}
	.g .md5 {
		grid-column-start: span 5;
	}
	.g .md6 {
		grid-column-start: span 6;
	}
	.g .md7 {
		grid-column-start: span 7;
	}
	.g .md8 {
		grid-column-start: span 8;
	}
	.g .md9 {
		grid-column-start: span 9;
	}
	.g .md10 {
		grid-column-start: span 10;
	}
	.g .md11 {
		grid-column-start: span 11;
	}
	.g .md12 {
		grid-column-start: span 12;
	}
}
@media (min-width: 768px) and (max-width: 991px) {
	.inner {
		width: 100%;
	}
	.g.sm2 {
		grid-template-columns: var(--g2);
	}
	.g.sm3 {
		grid-template-columns: var(--g3);
	}
	.g.sm4 {
		grid-template-columns: var(--g4);
	}
	.g.sm5 {
		grid-template-columns: var(--g5);
	}
	.g.sm6 {
		grid-template-columns: var(--g6);
	}
	.g.sm2>*,
	.g.sm3>*,
	.g.sm4>*,
	.g.sm5>*,
	.g.sm6>* {
		grid-column-start: auto;
	}
	.g .sm1 {
		grid-column-start: span 1;
	}
	.g .sm2 {
		grid-column-start: span 2;
	}
	.g .sm3 {
		grid-column-start: span 3;
	}
	.g .sm4 {
		grid-column-start: span 4;
	}
	.g .sm5 {
		grid-column-start: span 5;
	}
	.g .sm6 {
		grid-column-start: span 6;
	}
	.g .sm7 {
		grid-column-start: span 7;
	}
	.g .sm8 {
		grid-column-start: span 8;
	}
	.g .sm9 {
		grid-column-start: span 9;
	}
	.g .sm10 {
		grid-column-start: span 10;
	}
	.g .sm11 {
		grid-column-start: span 11;
	}
	.g .sm12 {
		grid-column-start: span 12;
	}
	.hsm {
		display: none !important;
	}
}
@media all and (max-width: 767px) {
	.hxs {
		display: none !important;
	}
	.g.xs2 {
		grid-template-columns: var(--g2);
	}
	.g.xs3 {
		grid-template-columns: var(--g3);
	}
	.g.xs4 {
		grid-template-columns: var(--g4);
	}
	.g.xs5 {
		grid-template-columns: var(--g5);
	}
	.g.xs6 {
		grid-template-columns: var(--g6);
	}
	.g.xs2>*,
	.g.xs3>*,
	.g.xs4>*,
	.g.xs5>*,
	.g.xs6>* {
		grid-column-start: auto;
	}
	.g .xs1 {
		grid-column-start: span 1;
	}
	.g .xs2 {
		grid-column-start: span 2;
	}
	.g .xs3 {
		grid-column-start: span 3;
	}
	.g .xs4 {
		grid-column-start: span 4;
	}
	.g .xs5 {
		grid-column-start: span 5;
	}
	.g .xs6 {
		grid-column-start: span 6;
	}
	.g .xs7 {
		grid-column-start: span 7;
	}
	.g .xs8 {
		grid-column-start: span 8;
	}
	.g .xs9 {
		grid-column-start: span 9;
	}
	.g .xs10 {
		grid-column-start: span 10;
	}
	.g .xs11 {
		grid-column-start: span 11;
	}
	.g .xs12 {
		grid-column-start: span 12;
	}
	.g.cg2,
	.g.cg3,
	.g.cg4,
	.g.cg5,
	.g.cg6 {
		column-gap: 15px;
	}
	.invert-xs {
		grid-row: 1;
	}
}
/* ============================================================
   Utilitários — margin-bottom
   ============================================================ */
.mb-1 {
	margin-bottom: 8px;
}
.mb-2 {
	margin-bottom: 16px;
}
.mb-3 {
	margin-bottom: 24px;
}
.mb-4 {
	margin-bottom: 32px;
}
/* ============================================================
   Utilitários — layout
   ============================================================ */
.self-start {
	align-self: start;
}
/* ============================================================
   Hover list — listas de itens clicáveis
   ============================================================ */
.hover-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.hover-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 8px;
	border-radius: var(--radius);
	transition: background .15s;
}
.hover-item:hover {
	background: var(--gray);
}
.hover-item--unread {
	background: var(--gray);
}
.hover-item__body {
	flex: 1;
	min-width: 0;
}
.hover-item__title {
	font-weight: 600;
	font-size: .9rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.hover-item__meta {
	font-size: .78rem;
	color: var(--text-muted);
	margin-top: 2px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.hover-item__sub {
	font-size: .85rem;
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.hover-item__time {
	font-size: .75rem;
	color: var(--text-muted);
	margin-top: 3px;
}
/* ============================================================
   Avatares e ícones em lista
   ============================================================ */
.list-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--primary-light);
	color: var(--primary);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: .9rem;
	flex-shrink: 0;
}
.list-doc-icon {
	width: 36px;
	height: 36px;
	background: var(--primary-light);
	border-radius: var(--radius);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
/* ============================================================
   Icon button
   ============================================================ */
.icon-btn {
	flex-shrink: 0;
	color: var(--text-muted);
	padding: 4px;
	border-radius: var(--radius);
	display: flex;
	align-items: center;
	text-decoration: none;
	transition: color .15s;
	column-gap: 5px;
}
.icon-btn:hover {
	color: var(--primary);
	text-decoration: none;
}
/* ============================================================
   Count badge (número inline, ex: notificações não lidas)
   ============================================================ */
.count-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	background: var(--primary);
	color: #fff;
	border-radius: 50%;
	font-size: .7rem;
	font-weight: 700;
	margin-left: 6px;
	vertical-align: middle;
}
/* ============================================================
   Status indicators
   ============================================================ */
.status-ok {
	color: var(--success);
}
.status-warn {
	color: var(--warning);
}
.status-dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	background: var(--primary);
	border-radius: 50%;
	margin-left: 4px;
	vertical-align: middle;
}
/* ============================================================
   Card footer link
   ============================================================ */
.card-footer-link {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--border);
	text-align: center;
	font-size: .83rem;
	font-weight: 500;
}
/* ============================================================
   Checklist mensal
   ============================================================ */
.checklist {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.checklist-item {
	display: flex;
	align-items: center;
	gap: 12px;
}
.checklist-check {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.checklist-check--done {
	background: var(--primary);
}
.checklist-check--pending {
	border: 2px solid var(--border);
}
.checklist-label {
	font-size: .9rem;
}
.checklist-label--done {
	color: var(--text-muted);
	text-decoration: line-through;
}
/* ============================================================
   Alert box (alerta inline dentro de card)
   ============================================================ */
.alert-box {
	margin-top: 20px;
	padding: 10px 12px;
	border-radius: var(--radius);
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: .83rem;
}
.alert-box--warn {
	background: var(--primary-light);
	border: 1px solid var(--border-input);
	color: #92400e;
}
.alert-box--success {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
}
/* ============================================================
   Progress header (label + counter row)
   ============================================================ */
.progress-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}
/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991px) {
	.top-header__actions {
		column-gap: 5px;
	}
	.top-header__logo {
		column-gap: 4px;
	}
	.top-header__logo span {
		font-size: 14px;
	}
	.table-wrapper {
		padding-bottom: 25px;
	}
	thead th, tbody td {
		padding: 4px;
		font-size: 14px;
	}
	thead th {
		font-size: 12px;
		padding: 10px 10px 10px 0;
	}
	.filter-row {
		justify-content: space-between;
	}
}
@media (max-width: 768px) {
	body {
		padding-bottom: 80px;
	}
	.sidebar {
		display: flex;
	}
	/* Hide desktop nav, show hamburger */
	.top-nav {
		display: none;
	}
	#sidebar-toggle {
		display: flex !important;
	}
	.page-content {
		padding: 80px 0 20px;
		width: calc(100vw - 30px);
		overflow: hidden;
		margin: 0 auto;
	}
	.form-grid {
		grid-template-columns: 1fr;
	}
	.col-span-full {
		grid-column: 1;
	}
	.stat-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	}
	.notif-dropdown {
		right: 16px;
		width: calc(100vw - 32px);
	}
	.date-range {
		width: 100%;
	}
	.date-range .fc--month {
		flex: 1;
	}
	.date-range .fc--year {
		width: 90px;
	}
	.filter-row>div {
		flex: 1;
	}
	.td-sm, .td-sec {
		font-size: .875rem;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 200px;
		font-size: 12px;
	}
	.notif-inner {
		position: inherit;
	}
}