/* =============================================================================
   FlowSw - tema visual
   Carregado DEPOIS do template (style.min.css) e sobrescreve apenas o visual.
   Cores centralizadas em variáveis: para mudar a identidade, altere só :root.
   ============================================================================= */

:root {
	/* Paleta "Contraste" (07/11/2026): menu escuro, ciano forte nos destaques, ícones de status sólidos. */

	/* Marca (cor padrão do sistema) */
	--fs-primary: #0891b2;
	--fs-primary-600: #0e7490;
	--fs-primary-700: #155e75;
	--fs-primary-50: #ecfeff;
	--fs-primary-100: #cffafe;
	--fs-focus: rgba(8, 145, 178, .22);

	/* Superfícies e texto */
	--fs-bg: #f5f7fa;
	--fs-surface: #ffffff;
	--fs-surface-2: #f8fafc;
	--fs-border-strong: #cbd5e1;
	--fs-overlay: rgba(255, 255, 255, .82);
	--fs-overlay-strong: rgba(255, 255, 255, .96);
	color-scheme: light;
	--fs-border: #e3e8ee;
	--fs-text: #0b1220;
	--fs-text-2: #2d3748;
	--fs-muted: #5f6b7a;

	/* Menu lateral e barra superior */
	--fs-nav: #111827;
	--fs-nav-2: #1f2937;
	--fs-nav-text: #d1d5db;
	--fs-nav-text-strong: #f9fafb;
	--fs-nav-accent: #06b6d4;
	--fs-nav-active-bg: rgba(6, 182, 212, .18);

	/* Status: texto/fundo das etiquetas e cor sólida dos ícones dos indicadores */
	--fs-success: #11803c;
	--fs-success-bg: #d3f5df;
	--fs-success-solid: #16a34a;
	--fs-warning: #b25e00;
	--fs-warning-bg: #ffedc7;
	--fs-warning-solid: #f59e0b;
	--fs-danger: #c81e1e;
	--fs-danger-bg: #fde0e0;
	--fs-danger-solid: #dc2626;
	--fs-info: #0369a1;
	--fs-info-bg: #d7eefc;
	--fs-info-solid: #0ea5e9;
	--fs-neutral: #475569;
	--fs-neutral-bg: #e2e8f0;
	--fs-neutral-solid: #64748b;

	/* Forma */
	--fs-radius: 10px;
	--fs-radius-sm: 6px;
	--fs-shadow: 0 1px 2px rgba(17, 24, 39, .06), 0 2px 6px rgba(17, 24, 39, .07);
	--fs-shadow-lg: 0 10px 30px rgba(17, 24, 39, .14);
	--fs-font: "Nunito Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	/* DataTables 1.13: realce de linha (hover/seleção) na cor da marca em vez de cinza (valores R, G, B) */
	--dt-row-hover: 8, 145, 178;
	--dt-row-selected: 8, 145, 178;
}

/* ----------------------------------------------------------------- base */
body {
	background: var(--fs-bg) !important;
	color: var(--fs-text-2);
	font-family: var(--fs-font);
	-webkit-font-smoothing: antialiased;
}
.page-wrapper { background: var(--fs-bg) !important; }
a { color: var(--fs-primary); }
a:hover { color: var(--fs-primary-700); }
h1, h2, h3, h4, h5, h6, .page-title, .card-title { color: var(--fs-text); }

/* ----------------------------------------------------------------- barra superior */
.topbar, .topbar .top-navbar, .topbar .navbar-collapse,
.topbar .top-navbar .navbar-header,
#main-wrapper[data-layout] .topbar .top-navbar .navbar-header[data-logobg=skin5],
#main-wrapper[data-layout] .topbar .navbar-collapse[data-navbarbg=skin5],
#main-wrapper[data-layout] .topbar[data-navbarbg=skin5] {
	background: var(--fs-nav) !important;
}
.topbar { box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.topbar .navbar-nav .nav-link { color: var(--fs-nav-text) !important; }
.topbar .navbar-nav .nav-link:hover { color: var(--fs-nav-text-strong) !important; }
.topbar .pro-pic img { border: 2px solid rgba(255, 255, 255, .15); }
.topbar .user-dd { border: 0; border-radius: var(--fs-radius); box-shadow: var(--fs-shadow-lg); padding: 6px 0; }
.topbar .user-dd .dropdown-item { padding: 8px 18px; cursor: pointer; }
.topbar .user-dd .dropdown-item i { color: var(--fs-muted); margin-right: 6px; }

/* ----------------------------------------------------------------- menu lateral */
.left-sidebar,
#main-wrapper[data-layout] .left-sidebar[data-sidebarbg=skin5],
#main-wrapper[data-layout] .left-sidebar[data-sidebarbg=skin5] ul {
	background: var(--fs-nav) !important;
}
.left-sidebar { box-shadow: 1px 0 0 rgba(255, 255, 255, .05); }
.sidebar-nav ul .sidebar-item .sidebar-link {
	color: var(--fs-nav-text) !important;
	opacity: 1 !important;
	border-radius: var(--fs-radius-sm);
	margin: 1px 10px;
	padding: 10px 12px;
	font-size: 14px;
	transition: background .15s, color .15s;
}
.sidebar-nav ul .sidebar-item .sidebar-link i { color: #94a3b8 !important; font-size: 19px; width: 26px; }
.sidebar-nav ul .sidebar-item .sidebar-link:hover {
	background: var(--fs-nav-2) !important;
	color: var(--fs-nav-text-strong) !important;
}
.sidebar-nav ul .sidebar-item .sidebar-link:hover i { color: var(--fs-nav-text-strong) !important; }
.sidebar-nav ul .sidebar-item.selected > .sidebar-link,
.sidebar-nav ul .sidebar-item .sidebar-link.active,
.sidebar-nav ul .sidebar-item .sidebar-link.fs-active {
	background: var(--fs-nav-active-bg) !important;
	box-shadow: inset 3px 0 0 var(--fs-nav-accent);
	color: #fff !important;
	font-weight: 700;
}
.sidebar-nav ul .sidebar-item .sidebar-link.fs-active i,
.sidebar-nav ul .sidebar-item.selected > .sidebar-link i { color: #fff !important; }
.sidebar-nav ul .sidebar-item .first-level { padding-left: 8px; }
.sidebar-nav ul .sidebar-item .first-level .sidebar-item .sidebar-link {
	font-size: 13.5px;
	padding: 8px 12px;
}
.sidebar-nav ul .sidebar-item .first-level .sidebar-item .sidebar-link i { font-size: 16px; }
/* nomes longos (ex.: "Importar Histórico de Hidrômetro") quebram linha em vez de serem cortados pela largura do menu */
.sidebar-nav ul .sidebar-item .sidebar-link { white-space: normal; line-height: 1.3; align-items: flex-start; }
.sidebar-nav ul .sidebar-item .sidebar-link i { flex: none; line-height: 1.1; }
.sidebar-nav ul .sidebar-item .sidebar-link .hide-menu { min-width: 0; overflow-wrap: anywhere; padding-top: 1px; }
.sidebar-nav ul .sidebar-item .sidebar-link.has-arrow { padding-right: 30px; }
.sidebar-nav .has-arrow::after { border-color: #64748b !important; }
.sidebar-nav .fs-nav-section {
	color: #64748b;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 16px 22px 6px;
}
#main-wrapper[data-sidebartype=mini-sidebar] .sidebar-nav .fs-nav-section { display: none; }

/* ----------------------------------------------------------------- cabeçalho da página */
.page-breadcrumb { padding: 22px 24px 4px; }
.page-breadcrumb .page-title { font-size: 21px; font-weight: 700; margin: 0; }
.breadcrumb { background: transparent; margin: 0; padding: 0; font-size: 13px; }
.breadcrumb-item, .breadcrumb-item a { color: var(--fs-muted); }
.breadcrumb-item.active { color: var(--fs-text-2); }
.container-fluid { padding: 16px 24px 24px; }

/* ----------------------------------------------------------------- cards */
.card {
	border: 1px solid var(--fs-border);
	border-radius: var(--fs-radius);
	box-shadow: var(--fs-shadow);
	margin-bottom: 20px;
}
.card .card-body { padding: 22px 24px; }
.card .card-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.card .card-subtitle { color: var(--fs-muted); }

/* ----------------------------------------------------------------- botões */
.btn { border-radius: var(--fs-radius-sm); font-weight: 600; box-shadow: none !important; }
.btn-primary, .btn-info, .btn-cyan {
	background: var(--fs-primary) !important;
	border-color: var(--fs-primary) !important;
	color: #fff !important;
}
.btn-primary:hover, .btn-info:hover, .btn-cyan:hover {
	background: var(--fs-primary-600) !important;
	border-color: var(--fs-primary-600) !important;
}
.btn-success { background: var(--fs-success); border-color: var(--fs-success); }
.btn-danger { background: var(--fs-danger); border-color: var(--fs-danger); }
.btn-outline-primary { color: var(--fs-primary); border-color: var(--fs-primary); }
.btn-outline-primary:hover { background: var(--fs-primary); color: #fff; }

/* ----------------------------------------------------------------- formulários */
.form-control, .select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
	border: 1px solid var(--fs-border-strong) !important;
	border-radius: var(--fs-radius-sm) !important;
	min-height: 38px;
	color: var(--fs-text);
}
.form-control:focus, .select2-container--focus .select2-selection {
	border-color: var(--fs-primary) !important;
	box-shadow: 0 0 0 3px rgba(8, 145, 178, .15) !important;
}
label { color: var(--fs-text-2); font-weight: 600; font-size: 13.5px; }

/* ----------------------------------------------------------------- tabelas */
.table { color: var(--fs-text-2); font-size: 13.5px; }
.table thead th, .table thead td,
table.dataTable thead th, table.dataTable thead td {
	background: var(--fs-primary) !important;
	color: #fff !important;
	border-bottom: 1px solid var(--fs-primary-600) !important;
	border-top: 0 !important;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	white-space: nowrap;
}
.table td, .table th { border-top: 1px solid var(--fs-border); vertical-align: middle !important; padding: .7rem .75rem; }
.table-striped tbody tr:nth-of-type(odd) { background: var(--fs-surface-2); }
.table-hover tbody tr:hover, table.dataTable tbody tr:hover { background: var(--fs-primary-50) !important; }
.table-dark, .table .thead-dark th { background: var(--fs-primary) !important; color: #fff !important; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
	border: 1px solid var(--fs-border-strong);
	border-radius: var(--fs-radius-sm);
	padding: 4px 8px;
}
.page-item.active .page-link { background: var(--fs-primary); border-color: var(--fs-primary); }
.page-link { color: var(--fs-primary); }

/* ----------------------------------------------------------------- etiquetas de status */
.fs-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.5;
	white-space: nowrap;
	background: var(--fs-neutral-bg);
	color: var(--fs-neutral);
}
.fs-badge::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
}
.fs-badge--success { background: var(--fs-success-bg); color: var(--fs-success); }
.fs-badge--warning { background: var(--fs-warning-bg); color: var(--fs-warning); }
.fs-badge--danger { background: var(--fs-danger-bg); color: var(--fs-danger); }
.fs-badge--info { background: var(--fs-info-bg); color: var(--fs-info); }

/* ----------------------------------------------------------------- mensagens (toast) */
.fs-toasts {
	position: fixed;
	top: 76px;
	right: 20px;
	z-index: 2000;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 380px;
}
.fs-toast {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: var(--fs-surface);
	border: 1px solid var(--fs-border);
	border-left: 4px solid var(--fs-primary);
	border-radius: var(--fs-radius);
	box-shadow: var(--fs-shadow-lg);
	padding: 12px 14px;
	color: var(--fs-text);
	font-size: 14px;
	animation: fs-toast-in .2s ease-out;
}
.fs-toast i { font-size: 20px; line-height: 1; color: var(--fs-primary); }
.fs-toast--success { border-left-color: var(--fs-success); }
.fs-toast--success i { color: var(--fs-success); }
.fs-toast--danger { border-left-color: var(--fs-danger); }
.fs-toast--danger i { color: var(--fs-danger); }
.fs-toast--warning { border-left-color: var(--fs-warning); }
.fs-toast--warning i { color: var(--fs-warning); }
.fs-toast .fs-toast-close {
	margin-left: auto;
	border: 0;
	background: none;
	color: var(--fs-muted);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.fs-toast.fs-hide { opacity: 0; transform: translateX(20px); transition: all .25s; }
@keyframes fs-toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------------- confirmação de exclusão */
.fs-confirm .modal-dialog { max-width: 440px !important; }
.fs-confirm .modal-content { border: 0; border-radius: 14px; box-shadow: var(--fs-shadow-lg); }
.fs-confirm .modal-body { padding: 26px 26px 10px; text-align: center; }
.fs-confirm .fs-confirm-icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--fs-danger-bg);
	color: var(--fs-danger);
	font-size: 28px;
	margin-bottom: 12px;
}
.fs-confirm h5 { font-weight: 700; margin-bottom: 6px; }
.fs-confirm p { color: var(--fs-muted); margin: 0; }
.fs-confirm .modal-footer { border: 0; justify-content: center; padding: 16px 26px 24px; gap: 8px; }

/* ----------------------------------------------------------------- carregamento */
.preloader { background: rgba(241, 245, 249, .85) !important; }
.lds-ripple .lds-pos { border-color: var(--fs-primary) !important; }
.fs-topbar-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	width: 0;
	background: var(--fs-primary);
	z-index: 3000;
	transition: width .3s ease, opacity .3s;
	opacity: 0;
}
.fs-topbar-progress.fs-on { opacity: 1; width: 70%; transition: width 8s cubic-bezier(.1, .7, .2, 1); }
.fs-loading-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: var(--fs-overlay);
	color: var(--fs-text-2);
	font-weight: 600;
	z-index: 5;
	border-radius: inherit;
}
.fs-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid var(--fs-primary-100);
	border-top-color: var(--fs-primary);
	border-radius: 50%;
	animation: fs-spin .8s linear infinite;
}
@keyframes fs-spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------------- página inicial */
.fs-kpi {
	display: flex;
	align-items: center;
	gap: 16px;
	background: var(--fs-surface);
	border: 1px solid var(--fs-border);
	border-radius: var(--fs-radius);
	box-shadow: var(--fs-shadow);
	padding: 18px 20px;
	height: 100%;
	color: inherit;
	text-decoration: none !important;
	transition: box-shadow .15s, transform .15s;
}
a.fs-kpi:hover { box-shadow: var(--fs-shadow-lg); transform: translateY(-1px); }
.fs-kpi-icon {
	flex: 0 0 48px;
	height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	background: var(--fs-primary-50);
	color: var(--fs-primary);
}
.fs-kpi--success .fs-kpi-icon { background: var(--fs-success-solid); color: #fff; }
.fs-kpi--warning .fs-kpi-icon { background: var(--fs-warning-solid); color: #fff; }
.fs-kpi--danger .fs-kpi-icon { background: var(--fs-danger-solid); color: #fff; }
.fs-kpi--neutral .fs-kpi-icon { background: var(--fs-neutral-solid); color: #fff; }
.fs-kpi-value { font-size: 26px; font-weight: 800; color: var(--fs-text); line-height: 1.1; }
.fs-kpi-label { color: var(--fs-muted); font-size: 13px; font-weight: 600; }
.fs-section-title { font-size: 15px; font-weight: 700; color: var(--fs-text); margin: 6px 0 12px; }
.fs-list { list-style: none; margin: 0; padding: 0; }
.fs-list li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px solid var(--fs-border);
	font-size: 13.5px;
}
.fs-list li:last-child { border-bottom: 0; }
.fs-list .fs-list-main { flex: 1; min-width: 0; }
.fs-list .fs-list-title { color: var(--fs-text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-list .fs-list-sub { color: var(--fs-muted); font-size: 12.5px; }
.fs-empty { color: var(--fs-muted); text-align: center; padding: 24px 0; font-size: 14px; }
.fs-empty i { display: block; font-size: 32px; color: #94a3b8; margin-bottom: 6px; }
.fs-weather {
	background: linear-gradient(135deg, var(--fs-primary-700), var(--fs-primary));
	color: #fff;
	border-radius: var(--fs-radius);
	padding: 16px 18px;
	box-shadow: var(--fs-shadow);
	height: 100%;
}
.fs-weather h4 { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.fs-weather .fs-weather-temp { font-size: 30px; font-weight: 800; line-height: 1; }
.fs-weather dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 12px 0 0; font-size: 13px; }
.fs-weather dt { font-weight: 600; opacity: .8; }
.fs-weather dd { margin: 0; text-align: right; }
.fs-weather .fs-weather-time { font-size: 12px; opacity: .75; margin-top: 10px; }

/* ----------------------------------------------------------------- rodapé */
.footer { background: transparent; color: var(--fs-muted); border-top: 1px solid var(--fs-border); font-size: 13px; }
.footer a { color: var(--fs-muted); }

/* ----------------------------------------------------------------- celular */
@media (max-width: 767px) {
	.page-breadcrumb { padding: 16px 16px 0; }
	.container-fluid { padding: 12px 16px 16px; }
	.card .card-body { padding: 16px; }
	.fs-toasts { left: 16px; right: 16px; max-width: none; }
}

/* separador do breadcrumb: o template usava a fonte Themify, que não é mais carregada */
.breadcrumb-item + .breadcrumb-item::before {
	content: "\F142" !important;
	font-family: "Material Design Icons" !important;
	color: #94a3b8 !important;
}

/* ----------------------------------------------------------------- login */
.fs-login-body { background: var(--fs-bg) !important; margin: 0; }
.fs-login { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.fs-login-brand {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 48px 56px;
	color: #e2e8f0;
	background:
		radial-gradient(1200px 600px at -10% 110%, rgba(34, 211, 238, .18), transparent 60%),
		radial-gradient(800px 500px at 110% -10%, rgba(8, 145, 178, .45), transparent 60%),
		linear-gradient(160deg, var(--fs-nav) 0%, var(--fs-primary-700) 100%);
	overflow: hidden;
}
.fs-login-brand::after {
	content: "";
	position: absolute;
	inset: auto -120px -160px auto;
	width: 420px;
	height: 420px;
	border-radius: 50%;
	border: 60px solid rgba(255, 255, 255, .04);
}
.fs-login-logo { max-height: 56px; max-width: 240px; }
.fs-login-wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; color: #fff; }
.fs-login-wordmark i { font-size: 30px; color: #67e8f9; }
.fs-login-brand-body { max-width: 460px; position: relative; z-index: 1; }
.fs-login-brand h1 { color: #fff; font-size: 34px; font-weight: 800; line-height: 1.15; margin: 0 0 14px; }
.fs-login-brand p { color: #cbd5e1; font-size: 16px; line-height: 1.6; margin: 0 0 26px; }
.fs-login-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fs-login-features li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #e2e8f0; }
.fs-login-features i {
	width: 34px;
	height: 34px;
	border-radius: 9px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, .08);
	color: #67e8f9;
	font-size: 18px;
}
.fs-login-brand-foot { font-size: 12px; color: #94a3b8; position: relative; z-index: 1; }

.fs-login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.fs-login-card { width: 100%; max-width: 400px; }
.fs-login-mobile-logo { display: none; }
.fs-login-card h2 { font-size: 26px; font-weight: 800; color: var(--fs-text); margin: 0 0 4px; }
.fs-login-sub { color: var(--fs-muted); margin: 0 0 26px; }
.fs-login-alert {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: var(--fs-danger-bg);
	color: var(--fs-danger);
	border-radius: var(--fs-radius-sm);
	padding: 11px 14px;
	margin-bottom: 18px;
	font-size: 14px;
	font-weight: 600;
}
.fs-login-alert i { font-size: 18px; line-height: 1.2; }
.fs-field { margin-bottom: 16px; }
.fs-field label { display: block; margin-bottom: 6px; }
.fs-input { position: relative; display: flex; align-items: center; }
.fs-input > i { position: absolute; left: 13px; color: var(--fs-muted); font-size: 18px; pointer-events: none; }
.fs-input input {
	width: 100%;
	height: 46px;
	padding: 0 44px 0 42px;
	border: 1px solid var(--fs-border-strong);
	border-radius: var(--fs-radius-sm);
	background: var(--fs-surface);
	color: var(--fs-text);
	font-size: 15px;
	transition: border-color .15s, box-shadow .15s;
}
.fs-input input:focus { outline: none; border-color: var(--fs-primary); box-shadow: 0 0 0 3px rgba(8, 145, 178, .15); }
.fs-input-action {
	position: absolute;
	right: 6px;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--fs-muted);
	font-size: 18px;
	cursor: pointer;
}
.fs-input-action:hover { background: var(--fs-neutral-bg); color: var(--fs-text); }
.fs-login-submit {
	position: relative;
	height: 46px;
	margin-top: 8px;
	font-size: 15px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 10px;
}
.fs-login-submit:disabled { opacity: .55; cursor: not-allowed; }
.fs-spinner--sm { width: 18px; height: 18px; border-width: 2px; display: none; border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.fs-login-submit.fs-is-loading .fs-spinner--sm { display: inline-block; }
.fs-login-submit.fs-is-loading { pointer-events: none; }
.fs-login-legal { color: var(--fs-muted); font-size: 12px; text-align: center; margin: 28px 0 0; }
.grecaptcha-badge { box-shadow: var(--fs-shadow) !important; }

@media (max-width: 900px) {
	.fs-login { grid-template-columns: 1fr; }
	.fs-login-brand { display: none; }
	.fs-login-mobile-logo {
		display: block;
		background: var(--fs-nav);
		border-radius: var(--fs-radius);
		padding: 14px;
		text-align: center;
		margin-bottom: 22px;
	}
	.fs-login-mobile-logo:empty { display: none; }
	.fs-login-mobile-logo img { max-height: 44px; max-width: 100%; }
}

/* ----------------------------------------------------------------- páginas de erro */
.fs-error-body { background: var(--fs-bg) !important; margin: 0; }
.fs-error { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.fs-error-card {
	background: var(--fs-surface);
	border: 1px solid var(--fs-border);
	border-radius: 16px;
	box-shadow: var(--fs-shadow-lg);
	max-width: 520px;
	width: 100%;
	padding: 40px 36px 30px;
	text-align: center;
}
.fs-error-icon {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 34px;
	background: var(--fs-primary-50);
	color: var(--fs-primary);
	margin-bottom: 14px;
}
.fs-error-icon--warning { background: var(--fs-warning-bg); color: var(--fs-warning); }
.fs-error-icon--danger { background: var(--fs-danger-bg); color: var(--fs-danger); }
.fs-error-code { color: var(--fs-muted); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 4px; }
.fs-error-card h1 { font-size: 24px; font-weight: 800; color: var(--fs-text); margin: 0 0 10px; }
.fs-error-card p { color: var(--fs-muted); line-height: 1.6; }
.fs-error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.fs-error-meta { font-size: 12px; margin: 18px 0 0; }

/* ----------------------------------------------------------------- atalhos (página inicial) */
.fs-shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.fs-shortcut {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 14px 8px;
	border: 1px solid var(--fs-border);
	border-radius: var(--fs-radius);
	color: var(--fs-text-2) !important;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	text-decoration: none !important;
	transition: border-color .15s, background .15s;
}
.fs-shortcut i { font-size: 24px; color: var(--fs-primary); }
.fs-shortcut:hover { border-color: var(--fs-primary); background: var(--fs-primary-50); }
a.fs-kpi:not([href]) { cursor: default; }
a.fs-kpi:not([href]):hover { box-shadow: var(--fs-shadow); transform: none; }

/* nome do sistema na barra superior quando o parceiro não tem logo */
.fs-brand-text { color: #fff; font-weight: 800; font-size: 18px; letter-spacing: .01em; }
.fs-brand-text i { color: #67e8f9; }

/* ----------------------------------------------------------------- painel de controle */
.fs-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.fs-toolbar .fs-toolbar-field { flex: 1 1 320px; min-width: 220px; }
.fs-toolbar .fs-toolbar-field label { margin-bottom: 4px; }
.fs-toolbar-meta { color: var(--fs-muted); font-size: 12.5px; margin-left: auto; display: flex; align-items: center; gap: 6px; }
.fs-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 16px; }

.fs-progress-row { margin-top: 12px; }
.fs-progress-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--fs-muted); margin-bottom: 5px; gap: 8px; }
.fs-progress-head strong { color: var(--fs-text); font-weight: 700; }
.fs-progress { height: 8px; background: var(--fs-neutral-bg); border-radius: 999px; overflow: hidden; }
.fs-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--fs-primary); transition: width .4s; }
.fs-progress--warning > span { background: #f59e0b; }
.fs-progress--danger > span { background: #dc2626; }

.fs-outorga-card {
	display: flex;
	flex-direction: column;
	background: var(--fs-surface);
	border: 1px solid var(--fs-border);
	border-top: 4px solid var(--fs-success);
	border-radius: var(--fs-radius);
	box-shadow: var(--fs-shadow);
	padding: 16px 18px;
	height: 100%;
	color: inherit !important;
	text-decoration: none !important;
	transition: box-shadow .15s, transform .15s;
}
.fs-outorga-card:hover { box-shadow: var(--fs-shadow-lg); transform: translateY(-1px); }
.fs-outorga-card--warning { border-top-color: #f59e0b; }
.fs-outorga-card--danger { border-top-color: #dc2626; }
.fs-outorga-card h5 { font-size: 14.5px; font-weight: 700; color: var(--fs-text); margin: 8px 0 0; line-height: 1.35; word-break: break-word; }
.fs-outorga-card .fs-equip { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--fs-border); }
.fs-outorga-card .fs-equip-title { font-size: 11.5px; font-weight: 700; color: var(--fs-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.fs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fs-chips .fs-badge { font-weight: 600; }
.fs-outorga-card .fs-card-foot { margin-top: auto; padding-top: 12px; font-size: 12.5px; color: var(--fs-primary); font-weight: 600; }

.fs-status-hero {
	display: flex;
	align-items: center;
	gap: 16px;
	background: var(--fs-surface);
	border: 1px solid var(--fs-border);
	border-left: 6px solid var(--fs-success);
	border-radius: var(--fs-radius);
	box-shadow: var(--fs-shadow);
	padding: 16px 20px;
	margin-bottom: 16px;
}
.fs-status-hero--warning { border-left-color: #f59e0b; }
.fs-status-hero--danger { border-left-color: #dc2626; }
.fs-status-hero .fs-status-text { font-size: 18px; font-weight: 800; color: var(--fs-text); }
.fs-status-hero .fs-status-sub { color: var(--fs-muted); font-size: 13px; }

.fs-pump {
	background: var(--fs-surface);
	border: 1px solid var(--fs-border);
	border-radius: var(--fs-radius);
	box-shadow: var(--fs-shadow);
	padding: 14px 16px;
	height: 100%;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.fs-pump-head { display: flex; align-items: center; gap: 12px; }
.fs-pump-icon {
	flex: 0 0 42px;
	height: 42px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	background: var(--fs-neutral-bg);
	color: var(--fs-neutral);
}
.fs-pump--on .fs-pump-icon { background: var(--fs-success-bg); color: var(--fs-success); }
.fs-pump-name { font-weight: 700; color: var(--fs-text); font-size: 14px; line-height: 1.3; word-break: break-word; }
.fs-pump-type { font-size: 12px; color: var(--fs-muted); }
.fs-pump-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fs-pump-stat { background: var(--fs-surface-2); border-radius: var(--fs-radius-sm); padding: 8px 10px; }
.fs-pump-stat span { display: block; font-size: 11.5px; color: var(--fs-muted); font-weight: 600; }
.fs-pump-stat strong { font-size: 15px; color: var(--fs-text); }
.fs-pump form { margin: 0; }
.fs-pump .btn { width: 100%; }
.fs-chart { width: 100%; min-height: 300px; }

/* ----------------------------------------------------------------- permissões de acesso */
.fs-perm { padding-bottom: 80px; }
.fs-perm-muted { color: var(--fs-muted); font-size: 13px; }
.fs-perm-users { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; }
.fs-perm-users-label { color: var(--fs-text-2); font-weight: 700; font-size: 13.5px; margin-right: 4px; }
.fs-perm-section { margin-bottom: 18px; }
.fs-perm-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.fs-perm-type { margin: 0; cursor: pointer; }
.fs-perm-type input { position: absolute; opacity: 0; pointer-events: none; }
.fs-perm-type-box {
	display: block;
	height: 100%;
	border: 1.5px solid var(--fs-border);
	border-radius: var(--fs-radius);
	padding: 12px 14px;
	transition: border-color .15s, background .15s, box-shadow .15s;
}
.fs-perm-type-box strong { display: block; color: var(--fs-text); font-size: 14px; }
.fs-perm-type-box small { color: var(--fs-muted); font-weight: 400; line-height: 1.4; }
.fs-perm-type:hover .fs-perm-type-box { border-color: #94a3b8; }
.fs-perm-type input:checked + .fs-perm-type-box { border-color: var(--fs-primary); background: var(--fs-primary-50); box-shadow: 0 0 0 3px rgba(8, 145, 178, .12); }
.fs-perm-type input:focus-visible + .fs-perm-type-box { outline: 2px solid var(--fs-primary); outline-offset: 2px; }

.fs-perm-tabs { border-bottom: 1px solid var(--fs-border); }
.fs-perm-tabs .nav-link { color: var(--fs-muted); font-weight: 600; border: 0; border-bottom: 2px solid transparent; padding: 10px 16px; }
.fs-perm-tabs .nav-link.active { color: var(--fs-primary); border-bottom-color: var(--fs-primary); background: transparent; }
.fs-count {
	display: inline-block;
	min-width: 22px;
	padding: 0 7px;
	margin-left: 4px;
	border-radius: 999px;
	background: var(--fs-neutral-bg);
	color: var(--fs-text-2);
	font-size: 12px;
	text-align: center;
}
.fs-perm-tabs .nav-link.active .fs-count { background: var(--fs-primary); color: #fff; }
.fs-perm-content { padding-top: 16px; }
.fs-perm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.fs-perm-actions > .fs-perm-muted { margin-right: auto; }
.fs-perm-search { flex: 1 1 320px; }
.fs-perm-search input { height: 38px; }

.fs-perm-module { border: 1px solid var(--fs-border); border-radius: var(--fs-radius); height: 100%; transition: border-color .15s; }
.fs-perm-module--on { border-color: var(--fs-primary-100); }
.fs-perm-module-head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 14px;
	background: var(--fs-surface-2);
	border-bottom: 1px solid var(--fs-border);
	border-radius: var(--fs-radius) var(--fs-radius) 0 0;
	cursor: pointer;
}
.fs-perm-module--on .fs-perm-module-head { background: var(--fs-primary-50); }
.fs-perm-module-head i { color: var(--fs-primary); font-size: 18px; }
.fs-perm-module-name { font-weight: 700; color: var(--fs-text); flex: 1; }
.fs-perm-module-count { color: var(--fs-muted); font-size: 12px; font-weight: 700; }
.fs-perm-module-body { padding: 8px 14px 10px; display: grid; gap: 2px; }
.fs-check { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 5px 0; font-weight: 500; cursor: pointer; }
.fs-check input, .fs-perm-module-head input, .fs-tree summary input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--fs-primary); flex: 0 0 auto; cursor: pointer; }
.fs-check small { display: block; color: var(--fs-muted); font-size: 11.5px; font-weight: 400; }
.fs-check--chip { display: inline-flex; align-items: center; padding: 4px 10px; border: 1px solid var(--fs-border); border-radius: 999px; font-size: 12.5px; }
.fs-check--chip input { margin-top: 0; }
.fs-check--chip:has(input:checked) { border-color: var(--fs-primary); background: var(--fs-primary-50); }

.fs-tree { border: 1px solid var(--fs-border); border-radius: var(--fs-radius); max-height: 60vh; overflow: auto; }
.fs-tree-node > summary {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	cursor: pointer;
	list-style: none;
	border-bottom: 1px solid var(--fs-border);
	font-size: 13.5px;
}
.fs-tree-node > summary::-webkit-details-marker { display: none; }
.fs-tree-node > summary::before {
	content: "\F142";
	font-family: "Material Design Icons";
	color: #94a3b8;
	transition: transform .15s;
	width: 14px;
}
.fs-tree-node[open] > summary::before { transform: rotate(90deg); }
.fs-tree-node > summary:hover { background: var(--fs-surface-2); }
.fs-tree-node > summary i { color: var(--fs-muted); }
.fs-tree-label { color: var(--fs-text); font-weight: 600; }
.fs-tree-l1 > summary { background: var(--fs-surface-2); font-size: 14px; }
.fs-tree-l2 > summary { padding-left: 38px; }
.fs-tree-l3 > summary { padding-left: 62px; }
.fs-tree-l2 > summary .fs-tree-label, .fs-tree-l3 > summary .fs-tree-label { font-weight: 500; }
.fs-tree-leaves { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 12px 86px; border-bottom: 1px solid var(--fs-border); }
.fs-tree-l1 > .fs-tree-leaves { padding-left: 38px; }

.fs-perm-bar {
	position: sticky;
	bottom: 0;
	z-index: 20;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 20px -24px -22px;
	padding: 12px 24px;
	background: var(--fs-overlay-strong);
	border-top: 1px solid var(--fs-border);
	border-radius: 0 0 var(--fs-radius) var(--fs-radius);
	box-shadow: 0 -6px 16px rgba(15, 23, 42, .06);
	backdrop-filter: blur(6px);
}
.fs-perm-summary { display: flex; flex-wrap: wrap; gap: 14px; margin-right: auto; color: var(--fs-muted); font-size: 13px; }
.fs-perm-summary strong { color: var(--fs-text); }
@media (max-width: 767px) {
	.fs-perm-bar { margin: 16px -16px -16px; padding: 12px 16px; }
	.fs-tree-l2 > summary { padding-left: 26px; }
	.fs-tree-l3 > summary { padding-left: 40px; }
	.fs-tree-leaves { padding-left: 40px; }
}

/* ----------------------------------------------------------------- badges do Bootstrap no padrão do tema
   (as telas antigas e o Java usam "badge badge-success" etc.; ficam iguais às .fs-badge) */
.badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.5;
	white-space: nowrap;
	vertical-align: middle;
	background: var(--fs-neutral-bg);
	color: var(--fs-neutral);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge:empty { display: none; }
.badge-success, .badge.bg-success { background: var(--fs-success-bg) !important; color: var(--fs-success) !important; }
.badge-danger, .badge.bg-danger { background: var(--fs-danger-bg) !important; color: var(--fs-danger) !important; }
.badge-warning, .badge.bg-warning { background: var(--fs-warning-bg) !important; color: var(--fs-warning) !important; }
.badge-info, .badge-primary, .badge-cyan, .badge.bg-info, .badge.bg-primary { background: var(--fs-info-bg) !important; color: var(--fs-info) !important; }
.badge-secondary, .badge-dark, .badge-light, .badge.bg-secondary, .badge.bg-dark { background: var(--fs-neutral-bg) !important; color: var(--fs-neutral) !important; }

/* ----------------------------------------------------------------- botões de ação em tabelas */
.fs-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.fs-action {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 30px;
	padding: 0 10px;
	border: 1px solid var(--fs-border);
	border-radius: var(--fs-radius-sm);
	background: var(--fs-surface);
	color: var(--fs-text-2) !important;
	font-size: 12.5px;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background .15s, border-color .15s, color .15s;
}
.fs-action i { font-size: 15px; }
.fs-action:hover { border-color: var(--fs-primary); color: var(--fs-primary) !important; background: var(--fs-primary-50); }
.fs-action--danger:hover { border-color: var(--fs-danger); color: var(--fs-danger) !important; background: var(--fs-danger-bg); }

/* atalhos configuráveis no cadastro do usuário */
.fs-shortcut-config { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--fs-border); }
.fs-shortcut-options { display: flex; flex-wrap: wrap; gap: 8px; }
.fs-shortcut-options .fs-check--chip { gap: 6px; }
.fs-shortcut-options .fs-check--chip i { color: var(--fs-primary); }
.fs-shortcut-options .fs-check--chip:has(input:disabled) { opacity: .5; cursor: not-allowed; }
a.fs-kpi[data-fs-bombas] { cursor: pointer; }

/* =============================================================================
   Celular e tablet
   ============================================================================= */

/* menu lateral aberto no celular: fundo escurecido; tocar fora fecha (flowsw-ui.js) */
.fs-sidebar-backdrop {
	position: fixed;
	inset: 0;
	z-index: 9;
	background: rgba(15, 23, 42, .45);
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s, visibility .2s;
}
@media (max-width: 767px) {
	#main-wrapper.show-sidebar .fs-sidebar-backdrop { opacity: 1; visibility: visible; }
	body.fs-sidebar-open { overflow: hidden; }
	.left-sidebar { z-index: 10; transition: left .2s ease; }
	#main-wrapper.show-sidebar .left-sidebar { box-shadow: var(--fs-shadow-lg); }
	.left-sidebar .scroll-sidebar { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
	/* o template usa 766px e o Bootstrap 767px: em exatamente 767px o menu ficava indefinido */
	#main-wrapper[data-sidebartype=mini-sidebar] .page-wrapper { margin-left: 0; }
	#main-wrapper[data-sidebartype=mini-sidebar]:not(.show-sidebar) .left-sidebar { left: -250px; }
	#main-wrapper.show-sidebar .left-sidebar { left: 0; }
	/* itens do menu com área de toque confortável */
	.sidebar-nav ul .sidebar-item .sidebar-link,
	.sidebar-nav ul .sidebar-item .first-level .sidebar-item .sidebar-link { padding-top: 12px; padding-bottom: 12px; }
}

@media (max-width: 767px) {
	/* barra superior: botões com 44px de toque */
	.topbar .nav-toggler, .topbar .topbartoggler { min-width: 44px; min-height: 44px; display: flex !important; align-items: center; justify-content: center; font-size: 22px; }
	.topbar .logo-text img, .topbar .logo-icon img { max-height: 36px; max-width: 100%; }
	.topbar .fs-brand-text { font-size: 16px; white-space: nowrap; }
	.topbar .pro-pic span { display: inline-block; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
	.topbar .user-dd .dropdown-item { padding: 12px 18px; }

	/* cabeçalho da página: título e breadcrumb empilhados em vez de espremidos na mesma linha */
	.page-breadcrumb .row > div { flex-wrap: wrap; gap: 2px 12px; }
	.page-breadcrumb .page-title { font-size: 18px; flex: 1 1 100%; }
	.page-breadcrumb .ml-auto { margin-left: 0 !important; text-align: left !important; }
	.breadcrumb { flex-wrap: wrap; font-size: 12px; }

	/* iOS dá zoom na tela ao focar campos com fonte menor que 16px */
	input.form-control, select.form-control, textarea.form-control, .custom-select,
	.select2-container .select2-search__field, .dataTables_wrapper .dataTables_filter input,
	.dataTables_wrapper .dataTables_length select { font-size: 16px !important; }
	.form-control, .custom-select { min-height: 44px; }
	.select2-container--default .select2-selection--single { min-height: 44px !important; }
	.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 42px !important; }
	.select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px !important; }
	.select2-container { max-width: 100%; }
	.select2-results__option { padding: 10px 12px; }

	/* botões e ações com área de toque mínima */
	.btn { min-height: 40px; }
	.btn-sm { min-height: 34px; }
	.fs-action { height: 38px; padding: 0 12px; }
	.dropdown-menu .dropdown-item { padding: 10px 16px; white-space: normal; }
	.dropdown-menu { max-width: calc(100vw - 32px); }
	/* grupos de botões de ação (Ações, Gerenciar...) quebram linha sem encostar um no outro */
	.card-body .btn-group { margin-right: 6px; margin-bottom: 10px; }

	/* caixas de seleção das tabelas (customcheckbox) maiores para o dedo */
	.customcheckbox { min-width: 28px; min-height: 28px; }

	/* tabelas: rolagem lateral suave, com sombra indicando que há mais colunas */
	.table-responsive {
		-webkit-overflow-scrolling: touch;
		background:
			linear-gradient(90deg, var(--fs-surface) 30%, transparent) left / 24px 100% no-repeat local,
			linear-gradient(270deg, var(--fs-surface) 30%, transparent) right / 24px 100% no-repeat local,
			radial-gradient(farthest-side at 0 50%, rgba(15, 23, 42, .14), transparent) left / 10px 100% no-repeat scroll,
			radial-gradient(farthest-side at 100% 50%, rgba(15, 23, 42, .14), transparent) right / 10px 100% no-repeat scroll;
	}
	.table-responsive > .table, .table-responsive .dataTables_wrapper { background: transparent; }
	.table td, .table th { padding: .6rem .6rem; }

	/* DataTables: busca em largura total, "exibir N" e paginação empilhados */
	.dataTables_wrapper > .row { margin: 0; }
	.dataTables_wrapper > .row > [class*=col-] { padding: 0; flex: 0 0 100%; max-width: 100%; }
	.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter,
	.dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_paginate { text-align: left !important; float: none !important; margin-bottom: 8px; }
	.dataTables_wrapper .dataTables_filter label { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0; }
	.dataTables_wrapper .dataTables_filter input { flex: 1; margin-left: 0 !important; min-height: 40px; width: auto !important; }
	.dataTables_wrapper .dataTables_info { white-space: normal !important; font-size: 13px; padding-top: 4px !important; }
	.dataTables_wrapper .dataTables_paginate .pagination { justify-content: center !important; flex-wrap: wrap; gap: 4px 0; }
	.dataTables_wrapper .dataTables_paginate .page-link { min-width: 40px; min-height: 40px; display: flex; align-items: center; justify-content: center; }

	/* modais: quase tela cheia, com abas roláveis em vez de quebrarem em várias linhas */
	.modal-dialog { margin: 8px; max-width: none !important; }
	.modal-header { padding: 12px 16px; }
	.modal-header .modal-title { font-size: 17px; line-height: 1.3; word-break: break-word; }
	.modal-header .close { min-width: 44px; min-height: 44px; margin: -12px -16px -12px auto; padding: 0; }
	.modal-body { padding: 14px 16px; overflow-wrap: anywhere; }
	.modal-footer { flex-wrap: wrap; }
	.modal-footer > .btn { flex: 1 1 auto; }
	.nav-tabs:not(.fs-perm-tabs) { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
	.nav-tabs:not(.fs-perm-tabs)::-webkit-scrollbar { display: none; }
	.nav-tabs .nav-link { white-space: nowrap; padding: 10px 12px; font-size: 13px; }

	/* mapa: altura proporcional à tela em vez de 600px fixos */
	#map { height: 65vh !important; min-height: 320px; }
	.fs-chart { min-height: 240px; }

	/* página inicial */
	.fs-kpi { padding: 14px 16px; gap: 12px; }
	.fs-kpi-value { font-size: 22px; }
	.fs-shortcuts { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
	.fs-status-hero { flex-wrap: wrap; padding: 14px 16px; }
	.fs-toolbar-meta { margin-left: 0; }

	/* rodapé e notificações acima da barra do iPhone */
	.footer { padding: 16px; }
	.fs-toasts { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

/* telas de toque (celular e tablet): sem efeitos que dependem do mouse */
@media (hover: none) {
	a.fs-kpi:hover, .fs-outorga-card:hover { transform: none; }
	a, .btn, .sidebar-link, .dropdown-item, .fs-action { -webkit-tap-highlight-color: rgba(8, 145, 178, .15); }
}
/* links de ação sem href (abrem por onclick) não mostravam a "mãozinha" nem eram tratados como clicáveis */
.dropdown-item[onclick], a[onclick]:not([href]) { cursor: pointer; }

/* login: 100vh no celular inclui a barra do navegador e cortava o formulário */
@supports (min-height: 100dvh) {
	.fs-login, .fs-error { min-height: 100dvh; }
}
@media (max-width: 900px) {
	.fs-login-panel { align-items: flex-start; padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
	.fs-input input { font-size: 16px; }
	.fs-input-action { width: 40px; height: 40px; }
	.fs-login-mobile-logo .fs-login-wordmark { font-size: 20px; }
}

/* ----------------------------------------------------------------- cadastro de parceiros */
.fs-parceiro-atual {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: var(--fs-info-bg);
	color: var(--fs-info);
	border-radius: var(--fs-radius-sm);
	padding: 10px 14px;
	margin-bottom: 16px;
	font-size: 13.5px;
}
.fs-parceiro-atual i { font-size: 18px; line-height: 1.2; }
.fs-parceiro-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--fs-border);
	border-radius: var(--fs-radius);
	overflow: hidden;
	background: var(--fs-surface);
}
/* prévia sobre o mesmo fundo escuro da barra superior e do login */
.fs-parceiro-preview {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 72px;
	padding: 12px;
	background: var(--fs-nav);
	border-radius: var(--fs-radius-sm);
}
.fs-parceiro-card .fs-parceiro-preview { border-radius: 0; }
.fs-parceiro-preview img { max-height: 48px; max-width: 100%; object-fit: contain; }
.fs-parceiro-preview .fs-preview-vazio { color: #94a3b8; font-size: 12.5px; }
.fs-parceiro-body { padding: 12px 16px; flex: 1; }
.fs-parceiro-body h5 { font-size: 15px; font-weight: 700; margin: 0 0 2px; word-break: break-word; }
.fs-parceiro-dominio { font-size: 13px; word-break: break-all; }
.fs-parceiro-foot { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--fs-border); background: var(--fs-surface-2); }
.fs-logo-field { height: 100%; border: 1px solid var(--fs-border); border-radius: var(--fs-radius); padding: 12px 14px; }
.fs-logo-field .form-control-file { font-size: 13px; max-width: 100%; }

/* ----------------------------------------------------------------- perímetro */
.fs-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.fs-head-title { font-size: 18px; font-weight: 800; color: var(--fs-text); margin: 0; line-height: 1.3; word-break: break-word; }
.fs-head-sub { color: var(--fs-muted); font-size: 13px; margin-top: 2px; }
.fs-map {
	position: relative;
	width: 100%;
	height: 60vh;
	min-height: 360px;
	max-height: 680px;
	border: 1px solid var(--fs-border);
	border-radius: var(--fs-radius);
	overflow: hidden;
	background: var(--fs-neutral-bg);
}
.fs-map .fs-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.fs-map-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 12.5px; color: var(--fs-muted); font-weight: 600; }
.fs-map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fs-map-legend img { height: 22px; }
.fs-map-info { font-family: var(--fs-font); min-width: 180px; }
.fs-map-info strong { display: block; font-size: 14px; color: var(--fs-text); margin-bottom: 4px; }
.fs-map-info div { font-size: 12.5px; color: var(--fs-muted); }
.fs-pump--info .fs-pump-icon { background: var(--fs-info-bg); color: var(--fs-info); }
.fs-pump--success .fs-pump-icon { background: var(--fs-success-bg); color: var(--fs-success); }
.fs-pump-stat--wide { grid-column: 1 / -1; }
.fs-modal-wide .modal-dialog { width: calc(100vw - 48px); max-width: 1600px !important; margin: 24px auto; }
.fs-modal-wide .modal-content { border: 0; border-radius: 14px; box-shadow: var(--fs-shadow-lg); max-height: calc(100vh - 48px); }
.fs-modal-wide .modal-body { overflow-y: auto; }
.fs-modal-wide .fs-chart { min-height: 0 !important; height: 55vh; max-height: 560px; }
@media (max-width: 767px) {
	.fs-modal-wide .modal-dialog { width: auto; margin: 8px; }
	.fs-modal-wide .modal-content { max-height: calc(100vh - 16px); }
	.fs-modal-wide .fs-chart { height: 340px; }
}
.fs-report-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 767px) {
	.fs-map { height: 52vh; min-height: 300px; }
	.fs-report-actions .btn { flex: 1 1 100%; }
}

/* ----------------------------------------------------------------- modais (todos)
   O style.css antigo deixava todo modal com 100% da largura da tela. Aqui:
   tamanho por tipo, cabeçalho e rodapé fixos com rolagem só no corpo,
   e o mesmo visual de cards do restante do tema. */
.modal-backdrop { background: #0f172a; }
.modal-backdrop.show { opacity: .55; }
.modal.fade .modal-dialog { transform: translateY(14px) scale(.985); transition: transform .2s ease-out; }
.modal.show .modal-dialog { transform: none; }

.modal-content {
	border: 0;
	border-radius: 14px;
	box-shadow: var(--fs-shadow-lg);
	overflow: hidden;
	background: var(--fs-surface);
}
.modal-header {
	align-items: center;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--fs-border);
	background: var(--fs-surface);
}
.modal-header .modal-title {
	font-size: 18px;
	font-weight: 800;
	color: var(--fs-text);
	line-height: 1.3;
	margin: 0;
	word-break: break-word;
}
.modal-header .close {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: -4px -6px -4px auto;
	padding: 0;
	border-radius: 50%;
	font-size: 24px;
	font-weight: 400;
	line-height: 1;
	color: var(--fs-muted);
	text-shadow: none;
	opacity: 1;
	transition: background .15s, color .15s;
}
.modal-header .close:hover, .modal-header .close:focus { background: var(--fs-neutral-bg); color: var(--fs-text); opacity: 1; outline: none; }
.modal-header .close:focus-visible { box-shadow: 0 0 0 3px rgba(8, 145, 178, .25); }
.modal-body { padding: 18px 20px; color: var(--fs-text-2); }
.modal-footer {
	gap: 8px;
	padding: 12px 20px;
	border-top: 1px solid var(--fs-border);
	background: var(--fs-surface-2);
}
.modal-footer > * { margin: 0; }

/* conteúdo comum dentro dos modais */
.modal-body h3, .modal-body h4 { font-size: 15px; font-weight: 700; color: var(--fs-text); margin: 18px 0 10px; }
.modal-body .row > [class*="col"] > b:first-child,
.modal-body .row > [class*="col"] > label:first-child { color: var(--fs-muted); font-weight: 600; }
.modal-body .card { border: 1px solid var(--fs-border); border-radius: var(--fs-radius); box-shadow: none; margin-bottom: 0; }
.modal-body .tabcontent-border { border: 0; }
.modal-body .tab-content > .tab-pane > .card { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }
.modal-body .nav-tabs { border-bottom: 1px solid var(--fs-border); gap: 4px; }
.modal-body .nav-tabs .nav-link {
	border: 0;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	color: var(--fs-muted);
	font-weight: 700;
	font-size: 12.5px;
	letter-spacing: .03em;
	padding: 10px 14px;
	background: transparent;
}
.modal-body .nav-tabs .nav-link:hover { color: var(--fs-text); }
.modal-body .nav-tabs .nav-link.active { color: var(--fs-primary); border-bottom-color: var(--fs-primary); background: transparent; }
.modal-body .table { margin-bottom: 0; font-size: 13.5px; }
.modal-body .table-responsive { border: 1px solid var(--fs-border); border-radius: var(--fs-radius); }
.modal-body iframe { display: block; border: 0; border-radius: var(--fs-radius); background: var(--fs-neutral-bg); }

@media (min-width: 768px) {
	.modal-dialog { width: calc(100vw - 48px); max-width: 960px; margin: 24px auto; }
	.modal-dialog.modal-sm { max-width: 420px; }
	.modal-dialog.modal-lg { max-width: 1140px; }
	.modal-content { max-height: calc(100vh - 48px); }
	.modal-body { overflow-y: auto; }
}
@media (max-width: 767px) {
	.modal-content { max-height: calc(100vh - 16px); border-radius: 12px; }
	.modal-body { overflow-y: auto; }
	.modal-header { padding: 12px 16px; }
	.modal-header .close { margin: -4px -6px -4px auto; min-width: 40px; min-height: 40px; }
}
/* confirmação de exclusão (fs-confirm) mantém o visual próprio, sem rodapé destacado */
.fs-confirm .modal-footer { background: transparent; border-top: 0; }
.fs-confirm .modal-body { overflow: visible; }

/* ----------------------------------------------------------------- tabelas (refinamento)
   - texto alinhado à esquerda (o style.css antigo centralizava tudo); colunas de seleção
     e tabelas marcadas com style="text-align: center" continuam centralizadas
   - células do corpo feitas com <th> deixam de ficar todas em negrito
   - tabela dentro de um contorno arredondado, linha selecionada destacada
   - controles do DataTables (busca, "exibir N", paginação) no visual do tema */
.table th, .table td { text-align: left; }
.table[style*="center"] th, .table[style*="center"] td,
.table .text-center { text-align: center !important; }
.table .text-right { text-align: right !important; }
.table:has(tbody .customcheckbox) tr > :first-child { text-align: center; width: 1%; white-space: nowrap; }
.table tbody th { font-weight: 400; }
.table tbody td, .table tbody th { color: var(--fs-text-2); }
.table tbody tr { transition: background .12s; }
.table tbody tr:has(input[type="checkbox"]:checked) { background: var(--fs-primary-50); }
.table tbody tr:has(input[type="checkbox"]:checked) > :first-child { box-shadow: inset 3px 0 0 var(--fs-primary); }
.table thead th { vertical-align: middle !important; padding-top: .65rem; padding-bottom: .65rem; }

/* contorno: a área que rola para o lado vira um "card" */
.table-responsive {
	border: 1px solid var(--fs-border);
	border-radius: var(--fs-radius);
	background-color: var(--fs-surface);
}
.table-responsive > .table, .table-responsive > table.dataTable { margin: 0 !important; }
.table-responsive > .table thead th { border-top: 0 !important; }
.table-responsive > .table tbody tr:last-child > * { border-bottom: 0; }
.fs-dt-host { overflow: visible; }

/* DataTables */
table.dataTable { border-collapse: collapse !important; }
table.dataTable td.dataTables_empty { text-align: center !important; color: var(--fs-muted); padding: 32px 12px !important; }
/* setas de ordenação (seletores do DataTables 1.13; posição fica a cargo da biblioteca) */
table.dataTable thead > tr > th.sorting:before, table.dataTable thead > tr > th.sorting:after,
table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_asc:after,
table.dataTable thead > tr > th.sorting_desc:before, table.dataTable thead > tr > th.sorting_desc:after { opacity: .4; color: #fff; }
table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_desc:after { opacity: 1; }
table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc { color: #fff !important; }

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter { margin-bottom: 12px; }
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; color: var(--fs-muted); font-size: 13px; }
.dataTables_wrapper .dataTables_length select {
	height: 36px;
	padding: 0 28px 0 10px;
	border: 1px solid var(--fs-border) !important;
	border-radius: var(--fs-radius-sm);
	background-color: var(--fs-surface);
	color: var(--fs-text);
	font-weight: 600;
}
.dataTables_wrapper .dataTables_filter input {
	height: 36px;
	width: 260px !important;
	margin-left: 0 !important;
	padding: 0 12px 0 34px !important;
	border: 1px solid var(--fs-border) !important;
	border-radius: var(--fs-radius-sm);
	background: var(--fs-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M9.5 3a6.5 6.5 0 0 1 5.2 10.4l5.4 5.4-1.4 1.4-5.4-5.4A6.5 6.5 0 1 1 9.5 3zm0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z'/%3E%3C/svg%3E") no-repeat 10px center / 16px;
	color: var(--fs-text);
	transition: border-color .15s, box-shadow .15s;
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus { outline: none; border-color: var(--fs-primary) !important; box-shadow: 0 0 0 3px rgba(8, 145, 178, .15); }
.dataTables_wrapper .dataTables_info { color: var(--fs-muted); font-size: 13px; padding-top: 16px !important; }
.dataTables_wrapper .dataTables_paginate { padding-top: 10px; }
.dataTables_wrapper .dataTables_paginate .pagination { gap: 4px; margin: 0; }
.dataTables_wrapper .dataTables_paginate .page-link {
	min-width: 34px;
	height: 34px;
	padding: 0 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0 !important;
	border-radius: 8px !important;
	background: transparent;
	color: var(--fs-text-2);
	font-weight: 700;
	font-size: 13px;
	box-shadow: none !important;
}
.dataTables_wrapper .dataTables_paginate .page-link:hover { background: var(--fs-neutral-bg); color: var(--fs-text); }
.dataTables_wrapper .dataTables_paginate .page-item.active .page-link { background: var(--fs-primary); color: #fff; }
.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link { background: transparent; color: var(--fs-border-strong); }
.dataTables_wrapper .dataTables_paginate .previous .page-link,
.dataTables_wrapper .dataTables_paginate .next .page-link { font-size: 18px; line-height: 1; }

@media (max-width: 767px) {
	.dataTables_wrapper .dataTables_filter input { width: auto !important; }
	.dataTables_wrapper .dataTables_length label, .dataTables_wrapper .dataTables_filter label { width: 100%; }
}

/* ----------------------------------------------------------------- painel: equipamentos no cartão da outorga */
.fs-outorga-card .fs-equip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.fs-outorga-card .fs-equip-head .fs-equip-title { margin-bottom: 0; }
.fs-equip-count { font-size: 12px; font-weight: 700; color: var(--fs-muted); white-space: nowrap; }
.fs-equip-count--on { color: var(--fs-success); }
.fs-equip-bar { height: 4px; margin-bottom: 8px; }
.fs-equip-bar > span { background: var(--fs-success); }
.fs-outorga-card .fs-chips .fs-badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.fs-badge--more { background: var(--fs-surface); color: var(--fs-primary); border: 1px dashed var(--fs-primary); }
.fs-badge--more::before { display: none; }

/* ----------------------------------------------------------------- telas de relatório (padrão) */
.fs-periodo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -2px 0 16px; }
.fs-periodo-label { color: var(--fs-muted); font-size: 13px; font-weight: 600; margin-right: 2px; }
.fs-periodo .btn { border: 1px solid var(--fs-border); font-weight: 600; }
.fs-periodo .btn.active { background: var(--fs-primary-50); border-color: var(--fs-primary); color: var(--fs-primary); }
.fs-report-bar { border-top: 1px solid var(--fs-border); padding-top: 16px; }
.fs-report-bar .btn-outline-success:hover { color: #fff; }
.fs-report-note { color: var(--fs-muted); font-size: 12.5px; margin: 8px 0 0; }
.fs-report-preview { margin-top: 24px; }
.fs-report-preview > .fs-section-title { display: flex; align-items: center; gap: 8px; }
#tabela-shell { position: relative; min-height: 40px; }

/* ----------------------------------------------------------------- seleção nas tabelas (customcheckbox)
   Substitui o visual do multicheck.css (quadrado cinza / azul fora da marca).
   Seleção única (onlyOne) aparece como botão de opção (círculo); múltipla, como caixa. */
.customcheckbox {
	position: relative;
	display: inline-block;
	width: 20px;
	height: 20px;
	padding: 0;
	margin: 0;
	font-size: 0;
	line-height: 0;
	vertical-align: middle;
	cursor: pointer;
}
.customcheckbox input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	z-index: 1;
	cursor: pointer;
}
.customcheckbox .checkmark {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	box-sizing: border-box;
	transform: translate(-50%, -50%);
	background: var(--fs-surface);
	border: 1.5px solid #94a3b8;
	border-radius: 5px;
	transition: background .12s, border-color .12s, box-shadow .12s;
}
.customcheckbox:hover input ~ .checkmark,
.table tbody tr:hover .customcheckbox .checkmark { border-color: var(--fs-primary); background: var(--fs-primary-50); }
.customcheckbox input:focus-visible ~ .checkmark { box-shadow: 0 0 0 3px rgba(8, 145, 178, .28); border-color: var(--fs-primary); }
.customcheckbox input:checked ~ .checkmark,
.table tbody tr:hover .customcheckbox input:checked ~ .checkmark { background: var(--fs-primary); border-color: var(--fs-primary); }
.customcheckbox .checkmark:after {
	left: 50%;
	top: 45%;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: translate(-50%, -50%) rotate(45deg);
}
/* seleção única: círculo com ponto */
.customcheckbox:has(input[onclick*="onlyOne"]) .checkmark { border-radius: 50%; }
.customcheckbox:has(input[onclick*="onlyOne"]) input:checked ~ .checkmark { background: var(--fs-surface); border-width: 2px; }
.customcheckbox:has(input[onclick*="onlyOne"]) .checkmark:after {
	top: 50%;
	width: 8px;
	height: 8px;
	border: 0;
	border-radius: 50%;
	background: var(--fs-primary);
	transform: translate(-50%, -50%);
}
/* a linha inteira seleciona */
.table tbody tr:has(.customcheckbox) { cursor: pointer; }
@media (max-width: 767px) {
	.customcheckbox { width: 28px; height: 28px; }
	.customcheckbox .checkmark { width: 22px; height: 22px; }
}

/* ----------------------------------------------------------------- prévia dos relatórios: totais e resumo */
.fs-report-totais { margin-top: 24px; }
.fs-report-kpis .fs-kpi { padding: 14px 16px; gap: 12px; }
.fs-report-kpis .fs-kpi-value { font-size: 20px; white-space: nowrap; }
.fs-report-kpis .fs-kpi-icon { flex: 0 0 42px; width: 42px; height: 42px; font-size: 22px; }
.fs-share { display: flex; align-items: center; gap: 10px; }
.fs-share .fs-progress { flex: 1; min-width: 70px; }
.fs-share strong { min-width: 48px; text-align: right; font-size: 12.5px; color: var(--fs-text); }
.table tfoot th { background: var(--fs-surface-2); color: var(--fs-text); font-weight: 800; border-top: 2px solid var(--fs-border); }
#tabela-shell > .fs-summary { margin-bottom: 12px; }

/* ----------------------------------------------------------------- monitoramento */
.fs-kpi-filtro { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.fs-kpi-filtro:hover { box-shadow: var(--fs-shadow-lg); transform: translateY(-1px); }
.fs-kpi-filtro:focus { outline: none; }
.fs-kpi-filtro:focus-visible { box-shadow: 0 0 0 3px rgba(8, 145, 178, .28); }
.fs-kpi-filtro.active { border-color: var(--fs-primary); box-shadow: 0 0 0 2px var(--fs-primary-100), var(--fs-shadow); }
.fs-kpi--neutral .fs-kpi-icon { background: var(--fs-neutral-solid); color: #fff; }
.fs-badge--sm { font-size: 10.5px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; }
.fs-badge--sm::before { width: 5px; height: 5px; }
.fs-cell-title { font-weight: 600; color: var(--fs-text); white-space: normal; min-width: 160px; }
.fs-tabela-monitoramento td { white-space: nowrap; }
.fs-tabela-monitoramento td:nth-child(2) { white-space: normal; }

/* =============================================================================
   TEMA ESCURO
   Ativado por <html data-theme="dark"> (definido antes do primeiro desenho por um script no <head>,
   conforme a escolha do usuário no topo: Automático segue o sistema, Claro ou Escuro).
   1) redefine as variáveis; 2) ajusta componentes do Bootstrap/plugins que usam cores fixas.
   ============================================================================= */
html[data-theme="dark"] {
	color-scheme: dark;
	--fs-primary: #22b8d6;
	--fs-primary-600: #38c6e2;
	--fs-primary-700: #67e8f9;
	--fs-primary-50: rgba(34, 184, 214, .10);
	--fs-primary-100: rgba(34, 184, 214, .18);
	--fs-focus: rgba(34, 184, 214, .30);

	--fs-bg: #0b1120;
	--fs-surface: #141c2b;
	--fs-surface-2: #1a2333;
	--fs-border: #273244;
	--fs-border-strong: #364257;
	--fs-overlay: rgba(11, 17, 32, .82);
	--fs-overlay-strong: rgba(20, 28, 43, .96);
	--fs-text: #e8edf4;
	--fs-text-2: #c9d2de;
	--fs-muted: #8f9bad;

	--fs-nav: #0a0f1a;
	--fs-nav-2: #182132;

	--fs-success: #4ade80;
	--fs-success-bg: rgba(34, 197, 94, .16);
	--fs-warning: #fbbf24;
	--fs-warning-bg: rgba(245, 158, 11, .16);
	--fs-danger: #f87171;
	--fs-danger-bg: rgba(239, 68, 68, .16);
	--fs-info: #38bdf8;
	--fs-info-bg: rgba(14, 165, 233, .16);
	--fs-neutral: #b4bfcd;
	--fs-neutral-bg: rgba(148, 163, 184, .16);

	--fs-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .30);
	--fs-shadow-lg: 0 10px 30px rgba(0, 0, 0, .55);
	--dt-row-hover: 34, 184, 214;
	--dt-row-selected: 34, 184, 214;
}

/* Estação climática do início: no escuro o degradê das cores primárias vira ciano claro com texto branco (pouco
   contraste). Vira cartão escuro com um toque de ciano; textos claros (contraste >= 7:1) e temperatura em destaque. */
html[data-theme="dark"] .fs-weather {
	background: linear-gradient(135deg, rgba(34, 184, 214, .22), rgba(34, 184, 214, .06)), var(--fs-surface);
	border: 1px solid var(--fs-primary-100);
	color: var(--fs-text);
}
html[data-theme="dark"] .fs-weather h4 { color: var(--fs-text); }
html[data-theme="dark"] .fs-weather .fs-weather-temp { color: var(--fs-primary-700); }
html[data-theme="dark"] .fs-weather dt { color: var(--fs-text-2); opacity: 1; }
html[data-theme="dark"] .fs-weather dt .mdi { color: var(--fs-primary); }
html[data-theme="dark"] .fs-weather dd { color: var(--fs-text); }
html[data-theme="dark"] .fs-weather .fs-weather-time { color: var(--fs-text-2); opacity: 1; border-top: 1px solid var(--fs-border); padding-top: 8px; }

/* texto e superfícies básicas */
html[data-theme="dark"] body,
html[data-theme="dark"] .page-wrapper { color: var(--fs-text-2); }
html[data-theme="dark"] .text-dark, html[data-theme="dark"] .text-body { color: var(--fs-text) !important; }
html[data-theme="dark"] .text-muted, html[data-theme="dark"] .form-text { color: var(--fs-muted) !important; }
html[data-theme="dark"] .text-primary { color: var(--fs-primary) !important; }
html[data-theme="dark"] .text-success { color: var(--fs-success) !important; }
html[data-theme="dark"] .text-danger { color: var(--fs-danger) !important; }
html[data-theme="dark"] .text-warning { color: var(--fs-warning) !important; }
html[data-theme="dark"] .text-info { color: var(--fs-info) !important; }
html[data-theme="dark"] .bg-white, html[data-theme="dark"] .bg-light { background-color: var(--fs-surface) !important; }
html[data-theme="dark"] .border, html[data-theme="dark"] .border-top, html[data-theme="dark"] .border-bottom,
html[data-theme="dark"] .border-left, html[data-theme="dark"] .border-right { border-color: var(--fs-border) !important; }
html[data-theme="dark"] hr { border-color: var(--fs-border); }
html[data-theme="dark"] code { color: #f0abfc; background: rgba(240, 171, 252, .08); }
html[data-theme="dark"] label, html[data-theme="dark"] .col-form-label { color: var(--fs-text-2); }
html[data-theme="dark"] .preloader { background: var(--fs-bg); }
html[data-theme="dark"] .footer { background: transparent; color: var(--fs-muted); border-color: var(--fs-border); }
html[data-theme="dark"] ::selection { background: rgba(34, 184, 214, .35); }

/* cartões, listas, abas */
html[data-theme="dark"] .card, html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .jumbotron { background-color: var(--fs-surface); border-color: var(--fs-border); color: var(--fs-text-2); }
html[data-theme="dark"] .card-header, html[data-theme="dark"] .card-footer { background-color: var(--fs-surface-2); border-color: var(--fs-border); }
html[data-theme="dark"] .nav-tabs { border-color: var(--fs-border); }
html[data-theme="dark"] .nav-tabs .nav-link:hover { border-color: var(--fs-border) var(--fs-border) transparent; }
html[data-theme="dark"] .nav-tabs .nav-link.active, html[data-theme="dark"] .nav-tabs .nav-item.show .nav-link {
	background-color: var(--fs-surface); color: var(--fs-text); border-color: var(--fs-border) var(--fs-border) var(--fs-surface);
}
html[data-theme="dark"] .breadcrumb { background: transparent; }
html[data-theme="dark"] .breadcrumb-item.active { color: var(--fs-text-2); }

/* formulários */
html[data-theme="dark"] .form-control, html[data-theme="dark"] .custom-select,
html[data-theme="dark"] .custom-file-label, html[data-theme="dark"] .input-group-text {
	background-color: var(--fs-surface-2); border-color: var(--fs-border-strong); color: var(--fs-text);
}
html[data-theme="dark"] .form-control:focus, html[data-theme="dark"] .custom-select:focus {
	background-color: var(--fs-surface-2); color: var(--fs-text); border-color: var(--fs-primary); box-shadow: 0 0 0 .2rem var(--fs-focus);
}
html[data-theme="dark"] .form-control::placeholder { color: #6b778a; }
html[data-theme="dark"] .form-control:disabled, html[data-theme="dark"] .form-control[readonly],
html[data-theme="dark"] .custom-select:disabled { background-color: #111827; color: var(--fs-muted); }
html[data-theme="dark"] .form-control-plaintext { color: var(--fs-text); }
html[data-theme="dark"] select.form-control option, html[data-theme="dark"] select.form-control optgroup { background: var(--fs-surface); color: var(--fs-text); }

/* tabelas */
html[data-theme="dark"] .table { color: var(--fs-text-2); }
html[data-theme="dark"] .table th, html[data-theme="dark"] .table td, html[data-theme="dark"] .table thead th { border-color: var(--fs-border); }
html[data-theme="dark"] .table thead th, html[data-theme="dark"] .thead-light th { background-color: var(--fs-surface-2); color: var(--fs-text); }
html[data-theme="dark"] .table-hover tbody tr:hover { background-color: rgba(34, 184, 214, .07); color: var(--fs-text); }
html[data-theme="dark"] .table-bordered, html[data-theme="dark"] .table-bordered th, html[data-theme="dark"] .table-bordered td { border-color: var(--fs-border); }
html[data-theme="dark"] .table-active, html[data-theme="dark"] .table-active > td { background-color: rgba(148, 163, 184, .10); }

/* modais, menus suspensos, alertas, paginação */
html[data-theme="dark"] .modal-content { background-color: var(--fs-surface); color: var(--fs-text-2); border-color: var(--fs-border); }
html[data-theme="dark"] .modal-header, html[data-theme="dark"] .modal-footer { border-color: var(--fs-border); }
html[data-theme="dark"] .modal-backdrop.show { opacity: .7; }
html[data-theme="dark"] .close { color: var(--fs-text); text-shadow: none; }
html[data-theme="dark"] .dropdown-menu { background-color: var(--fs-surface); border-color: var(--fs-border); color: var(--fs-text-2); }
html[data-theme="dark"] .dropdown-item { color: var(--fs-text-2); }
html[data-theme="dark"] .dropdown-item:hover, html[data-theme="dark"] .dropdown-item:focus { background-color: var(--fs-surface-2); color: var(--fs-text); }
html[data-theme="dark"] .dropdown-divider { border-color: var(--fs-border); }
html[data-theme="dark"] .alert-success { background: var(--fs-success-bg); border-color: rgba(34, 197, 94, .35); color: #bbf7d0; }
html[data-theme="dark"] .alert-danger { background: var(--fs-danger-bg); border-color: rgba(239, 68, 68, .35); color: #fecaca; }
html[data-theme="dark"] .alert-warning { background: var(--fs-warning-bg); border-color: rgba(245, 158, 11, .35); color: #fde68a; }
html[data-theme="dark"] .alert-info { background: var(--fs-info-bg); border-color: rgba(14, 165, 233, .35); color: #bae6fd; }
html[data-theme="dark"] .alert-secondary, html[data-theme="dark"] .alert-light { background: var(--fs-surface-2); border-color: var(--fs-border); color: var(--fs-text-2); }
html[data-theme="dark"] .page-link { background-color: var(--fs-surface); border-color: var(--fs-border); color: var(--fs-text-2); }
html[data-theme="dark"] .page-item.active .page-link { background-color: #0e7490; border-color: #0e7490; color: #fff; }
html[data-theme="dark"] .page-item.disabled .page-link { background-color: var(--fs-surface); color: var(--fs-border-strong); }
html[data-theme="dark"] .progress { background-color: var(--fs-surface-2); }

/* botões claros/contorno */
html[data-theme="dark"] .btn-light { background-color: var(--fs-surface-2); border-color: var(--fs-border-strong); color: var(--fs-text); }
html[data-theme="dark"] .btn-light:hover { background-color: #222d40; color: var(--fs-text); }
html[data-theme="dark"] .btn-secondary { background-color: #334155; border-color: #334155; }
html[data-theme="dark"] .btn-outline-secondary, html[data-theme="dark"] .btn-outline-dark { color: var(--fs-text-2); border-color: var(--fs-border-strong); }
html[data-theme="dark"] .btn-outline-secondary:hover, html[data-theme="dark"] .btn-outline-dark:hover { background-color: var(--fs-surface-2); color: var(--fs-text); }

/* Select2 */
html[data-theme="dark"] .select2-container--default .select2-selection--single,
html[data-theme="dark"] .select2-container--default .select2-selection--multiple,
html[data-theme="dark"] .select2-dropdown { background-color: var(--fs-surface-2); border-color: var(--fs-border-strong) !important; }
html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered,
html[data-theme="dark"] .select2-results__option { color: var(--fs-text); }
html[data-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field,
html[data-theme="dark"] .select2-container--default .select2-search--inline .select2-search__field { background: var(--fs-surface); color: var(--fs-text); border-color: var(--fs-border-strong); }
html[data-theme="dark"] .select2-container--default .select2-results__option[aria-selected=true] { background-color: var(--fs-surface); }
html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: #0e7490; color: #fff; }
html[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice { background: var(--fs-primary-100); border-color: var(--fs-border-strong); color: var(--fs-text); }

/* DataTables */
html[data-theme="dark"] .dataTables_wrapper .dataTables_length, html[data-theme="dark"] .dataTables_wrapper .dataTables_filter,
html[data-theme="dark"] .dataTables_wrapper .dataTables_info, html[data-theme="dark"] .dataTables_wrapper .dataTables_processing { color: var(--fs-muted); }
html[data-theme="dark"] .dataTables_wrapper .dataTables_processing { background: var(--fs-surface); }
html[data-theme="dark"] table.dataTable tbody tr { background-color: transparent; }

/* seletor de data nativo e barra de rolagem */
html[data-theme="dark"] * { scrollbar-color: #334155 transparent; }

/* imagens de logo claras sobre fundo escuro: nada a fazer; mapas e gráficos ficam com as cores próprias */

/* ----------------------------------------------------------------- seletor de tema (barra superior) */
.fs-tema-toggle { font-size: 20px; line-height: 1; }
.fs-tema-menu .dropdown-item { display: flex; align-items: center; gap: 8px; }
.fs-tema-menu .dropdown-item .fs-tema-check { margin-left: auto; visibility: hidden; color: var(--fs-primary); }
.fs-tema-menu .dropdown-item[aria-checked="true"] .fs-tema-check { visibility: visible; }
.fs-tema-menu .dropdown-item[aria-checked="true"] { font-weight: 700; }

/* tema escuro: preenchimentos sólidos (botões, cabeçalho de tabela) usam tons mais fechados, para o texto branco
   manter contraste — as variáveis --fs-primary/--fs-success/--fs-danger ficam claras no escuro porque servem a textos */
html[data-theme="dark"] .btn-primary, html[data-theme="dark"] .btn-info, html[data-theme="dark"] .btn-cyan {
	background: #0e7490 !important; border-color: #0e7490 !important; color: #fff !important;
}
html[data-theme="dark"] .btn-primary:hover, html[data-theme="dark"] .btn-info:hover, html[data-theme="dark"] .btn-cyan:hover {
	background: #0891b2 !important; border-color: #0891b2 !important;
}
html[data-theme="dark"] .btn-success { background: #15803d; border-color: #15803d; color: #fff; }
html[data-theme="dark"] .btn-success:hover { background: #16a34a; border-color: #16a34a; }
html[data-theme="dark"] .btn-danger { background: #b91c1c; border-color: #b91c1c; color: #fff; }
html[data-theme="dark"] .btn-danger:hover { background: #dc2626; border-color: #dc2626; }
html[data-theme="dark"] .btn-warning { background: #b45309; border-color: #b45309; color: #fff; }
html[data-theme="dark"] .btn-outline-primary:hover { background: #0e7490; border-color: #0e7490; color: #fff; }
html[data-theme="dark"] .table thead th, html[data-theme="dark"] .table thead td,
html[data-theme="dark"] table.dataTable thead th, html[data-theme="dark"] table.dataTable thead td {
	background: #12495a !important; border-bottom-color: #1b6378 !important; color: #e6fbff !important;
}

/* ----------------------------------------------------------------- gráficos (fs-graficos.js) */
.fs-chart { min-height: 300px; }
.fs-grafico-acoes { margin-top: 6px; font-size: 13px; }
.fs-grafico-acoes .btn-link { color: var(--fs-primary); font-weight: 600; text-decoration: none; }
.fs-grafico-tabela { margin-top: 8px; max-height: 360px; overflow: auto; border: 1px solid var(--fs-border); border-radius: var(--fs-radius-sm); }
.fs-grafico-tabela table { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.fs-grafico-tabela thead th { position: sticky; top: 0; z-index: 1; }
/* tooltip HTML do Google Charts nos dois temas */
.google-visualization-tooltip {
	background: var(--fs-surface) !important; border: 1px solid var(--fs-border) !important;
	border-radius: var(--fs-radius-sm) !important; box-shadow: var(--fs-shadow-lg) !important;
	color: var(--fs-text-2) !important; font-family: var(--fs-font) !important; padding: 2px 4px;
}
.google-visualization-tooltip-item, .google-visualization-tooltip-item-list .google-visualization-tooltip-item:first-child { margin: 6px 0; }
.google-visualization-tooltip span { color: var(--fs-text-2) !important; }
.google-visualization-tooltip b, .google-visualization-tooltip strong { color: var(--fs-text) !important; }

/* card principal escondido quando a página não tem conteúdo para o usuário (ex.: estações na tela inicial sem permissão) */
.card:has(.fs-card-oculto) { display: none; }

/* ---------------------------------------------------------------- prévia das coordenadas nos cadastros (fs-coordenadas.js) */
.fs-coord {
	margin: 4px 0 18px;
	border: 1px solid var(--fs-border);
	border-radius: 8px;
	overflow: hidden;
	background: var(--fs-surface);
}
.fs-coord-mapa {
	width: 100%;
	height: 320px;
	background: var(--fs-surface-2);
}
.fs-coord-barra {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-top: 1px solid var(--fs-border);
	font-size: .85rem;
	color: var(--fs-muted);
}
.fs-coord-barra > .mdi { color: var(--fs-primary); font-size: 1.1rem; }
.fs-coord-msg { flex: 1 1 220px; }
.fs-coord-msg.fs-coord-alterado { color: var(--fs-warning); font-weight: 600; }
.fs-coord [hidden] { display: none !important; }
@media (max-width: 576px) {
	.fs-coord-mapa { height: 240px; }
}
