/**
 * Agro — camada de UI administrativa (refino visual global).
 * Carregar após style.css, skin-modes e color*.css.
 * Não altera comportamento; apenas tokens, ritmo e hierarquia visual.
 */

:root {
	--agro-radius-sm: 6px;
	--agro-radius: 10px;
	--agro-radius-lg: 14px;
	--agro-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
	--agro-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
	--agro-border: rgba(15, 23, 42, 0.08);
	--agro-surface: #ffffff;
	--agro-canvas: #f1f4f9;
	--agro-text-muted: #64748b;
	--agro-focus: rgba(112, 94, 200, 0.35);
	--agro-primary: #705ec8;
}

/* Tipografia base (stack sistema — sem dependência externa) */
body.app {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	font-size: 0.9375rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	color: #1e293b;
}

body.app h1, body.app h2, body.app h3, body.app h4, body.app h5, body.app h6 {
	font-weight: 600;
	letter-spacing: -0.02em;
	color: #0f172a;
}

body.app .text-muted,
body.app small,
body.app .small {
	color: var(--agro-text-muted) !important;
}

/* Área principal: “canvas” neutro (padrão dashboards profissionais) */
body.app .side-app {
	background-color: var(--agro-canvas);
	min-height: calc(100vh - 0px);
	padding-bottom: 2rem;
}

/* Cabeçalho fixo mais limpo */
body.app .app-header.header {
	box-shadow: var(--agro-shadow-sm);
	border-bottom: 1px solid var(--agro-border);
	background-color: var(--agro-surface) !important;
}

body.app .header-brand-img {
	max-height: 2.25rem;
	width: auto;
}

/* Breadcrumb / page header */
body.app .page-header {
	margin-bottom: 1.25rem;
	padding: 0.35rem 0 0;
	border: none;
}

body.app .page-header .breadcrumb {
	background: transparent;
	padding: 0.5rem 0.85rem;
	margin-bottom: 0;
	border-radius: var(--agro-radius-sm);
	border: 1px solid var(--agro-border);
	background-color: rgba(255, 255, 255, 0.85);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	font-size: 0.8125rem;
}

body.app .page-header .breadcrumb-item + .breadcrumb-item::before {
	color: #94a3b8;
	font-weight: 400;
}

body.app .page-header .breadcrumb-item a {
	color: var(--agro-primary);
	font-weight: 500;
}

body.app .page-header .breadcrumb-item.active a,
body.app .page-header .breadcrumb-item.active {
	color: #475569;
	font-weight: 500;
}

/* Notificações / flash — bloco mais legível */
body.app aside.right-side #notific {
	max-width: 52rem;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

body.app aside.right-side #notific .alert {
	border-radius: var(--agro-radius);
	border: 1px solid var(--agro-border);
	box-shadow: var(--agro-shadow-sm);
	margin-bottom: 0.75rem;
}

/* Cartões */
body.app .card {
	border-radius: var(--agro-radius);
	border: 1px solid var(--agro-border);
	box-shadow: var(--agro-shadow-sm);
	background-color: var(--agro-surface);
	overflow: hidden;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

body.app .card:hover {
	box-shadow: var(--agro-shadow);
	border-color: rgba(15, 23, 42, 0.1);
}

body.app .card-header {
	background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
	border-bottom: 1px solid var(--agro-border);
	font-weight: 600;
	padding: 0.85rem 1.15rem;
}

body.app .card-title {
	font-size: 1.05rem;
	margin-bottom: 0;
}

body.app .card-body {
	padding: 1.15rem 1.25rem;
}

body.app .card-footer {
	background-color: #f8fafc;
	border-top: 1px solid var(--agro-border);
}

/* Tabelas */
body.app .table {
	border-collapse: separate;
	border-spacing: 0;
}

body.app .table thead th {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
	color: #64748b;
	background-color: #f8fafc;
	border-bottom: 1px solid var(--agro-border);
	vertical-align: middle;
}

body.app .table tbody tr:hover {
	background-color: rgba(241, 244, 249, 0.65);
}

body.app .table-bordered {
	border: 1px solid var(--agro-border);
	border-radius: var(--agro-radius-sm);
	overflow: hidden;
}

body.app .table-responsive {
	border-radius: var(--agro-radius-sm);
}

/* Botões */
body.app .btn {
	border-radius: var(--agro-radius-sm);
	font-weight: 500;
	padding: 0.45rem 1rem;
	transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

body.app .btn-sm {
	padding: 0.3rem 0.65rem;
	font-size: 0.8125rem;
}

body.app .btn:focus,
body.app .btn.focus {
	box-shadow: 0 0 0 3px var(--agro-focus);
}

body.app .btn:active:not(:disabled) {
	transform: translateY(1px);
}

body.app .btn-primary,
body.app .btn-primary:focus {
	box-shadow: 0 1px 2px rgba(112, 94, 200, 0.25);
}

/* Formulários */
body.app .form-control,
body.app .custom-select,
body.app select.form-control {
	border-radius: var(--agro-radius-sm);
	border: 1px solid #cbd5e1;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.app .form-control:focus,
body.app .custom-select:focus,
body.app select.form-control:focus {
	border-color: var(--agro-primary);
	box-shadow: 0 0 0 3px var(--agro-focus);
}

body.app label,
body.app .col-form-label {
	font-weight: 500;
	color: #334155;
	font-size: 0.875rem;
}

body.app .input-group-text {
	background-color: #f1f5f9;
	border-color: #cbd5e1;
	color: #475569;
	border-radius: var(--agro-radius-sm);
}

/* Badges e pills */
body.app .badge {
	font-weight: 600;
	padding: 0.35em 0.55em;
	border-radius: 6px;
	letter-spacing: 0.01em;
}

/* Sidebar — contraste e respiração (mantém cores do tema) */
body.app .app-sidebar {
	border-right: 1px solid var(--agro-border);
	box-shadow: 2px 0 12px rgba(15, 23, 42, 0.04);
}

body.app .side-menu .side-menu__item {
	border-radius: var(--agro-radius-sm);
	margin: 2px 0.5rem;
	padding: 0.55rem 0.85rem;
	transition: background-color 0.15s ease;
}

body.app .side-menu .side-menu__item:hover {
	background-color: rgba(112, 94, 200, 0.14);
}

body.app .side-item-category {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.85;
	margin-top: 1rem !important;
	padding-left: 1rem !important;
}

/* Dropdown perfil */
body.app .dropdown-menu {
	border-radius: var(--agro-radius);
	border: 1px solid var(--agro-border);
	box-shadow: var(--agro-shadow);
	padding: 0.5rem 0;
}

body.app .dropdown-item {
	padding: 0.45rem 1.15rem;
	font-size: 0.9rem;
}

body.app .dropdown-item:hover {
	background-color: #f1f4f9;
}

/* Paginação */
body.app .pagination .page-link {
	border-radius: var(--agro-radius-sm);
	margin: 0 2px;
	border: 1px solid var(--agro-border);
	color: #475569;
}

body.app .pagination .page-item.active .page-link {
	font-weight: 600;
}

/* Modais */
body.app .modal-content {
	border-radius: var(--agro-radius);
	border: 1px solid var(--agro-border);
	box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
}

body.app .modal-header {
	border-bottom: 1px solid var(--agro-border);
}

body.app .modal-footer {
	border-top: 1px solid var(--agro-border);
	background-color: #f8fafc;
}

/* Abas */
body.app .nav-tabs .nav-link {
	border-radius: var(--agro-radius-sm) var(--agro-radius-sm) 0 0;
	font-weight: 500;
	color: #64748b;
}

body.app .nav-tabs .nav-link.active {
	color: var(--agro-primary);
	border-color: var(--agro-border) var(--agro-border) #fff;
}

/* List groups */
body.app .list-group-item {
	border-color: var(--agro-border);
}

/* Utilitário: ritmo horizontal em containers de conteúdo comuns */
body.app .side-app > .container,
body.app .side-app > .container-fluid {
	padding-top: 0.25rem;
}

/* Acessibilidade: foco visível em links principais */
body.app a:focus-visible {
	outline: 2px solid var(--agro-primary);
	outline-offset: 2px;
}

/* Impressão: não forçar fundo colorido */
@media print {
	body.app .side-app {
		background: #fff !important;
	}
	body.app .card {
		box-shadow: none !important;
	}
}
