/*
 * Tema IPOG — sistema Apoio (layout "Compacto Moderno")
 * Carregado DEPOIS do Bootstrap 5.3. Sobrescreve variáveis/classes do Bootstrap,
 * então as views existentes (btn-primary, badge bg-success, card, table...) mudam
 * sem precisar editar cada tela.
 *
 * Cor da marca: #E52B30 (vermelho do logo IPOG).
 * Vermelho de AÇÃO (botões) = #CF2328 (um tom mais fechado pra texto branco ter contraste).
 * Vermelho de PERIGO (excluir/erro) = vinho #9F1D2A, pra não confundir com o botão principal.
 */

/* ===================================================================== */
/* 1. Tokens                                                              */
/* ===================================================================== */
:root {
	--ipog-red: #E52B30;
	--ipog-red-strong: #CF2328;
	--ipog-red-hover: #B51E23;
	--ipog-red-active: #9C1A1F;
	--ipog-red-soft: #FDECEC;
	--ipog-red-border: #F5C2C4;

	--ipog-graphite: #1B1F24;
	--ipog-graphite-2: #2A3038;
	--ipog-graphite-text: #A3ACB9;

	--ipog-wine: #9F1D2A;
	--ipog-wine-hover: #85161F;
	--ipog-wine-soft: #F8E6E8;
	--ipog-green: #1F8A5B;
	--ipog-green-hover: #18724A;
	--ipog-green-soft: #E6F4EC;
	--ipog-amber: #B7791F;
	--ipog-amber-soft: #FBF1DF;
	--ipog-blue: #2E6BD6;
	--ipog-blue-soft: #E8F0FC;
	--ipog-gray-soft: #F2F4F7;

	--ipog-bg: #F5F6F8;
	--ipog-surface: #FFFFFF;
	--ipog-border: #E4E7EC;
	--ipog-border-soft: #EEF0F3;
	--ipog-text: #1F2933;
	--ipog-muted: #667085;

	--ipog-rail: 72px;
	--ipog-rail-open: 260px;
	--ipog-topbar: 64px;

	/* Bootstrap */
	--bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--bs-body-bg: var(--ipog-bg);
	--bs-body-color: var(--ipog-text);
	--bs-border-color: var(--ipog-border);
	--bs-secondary-color: var(--ipog-muted);

	--bs-primary: #CF2328;
	--bs-primary-rgb: 207, 35, 40;
	--bs-primary-text-emphasis: #8E171B;
	--bs-primary-bg-subtle: #FDECEC;
	--bs-primary-border-subtle: #F5C2C4;

	--bs-danger: #9F1D2A;
	--bs-danger-rgb: 159, 29, 42;
	--bs-danger-text-emphasis: #7A1520;
	--bs-danger-bg-subtle: #F8E6E8;
	--bs-danger-border-subtle: #E7C3C8;

	--bs-success: #1F8A5B;
	--bs-success-rgb: 31, 138, 91;
	--bs-success-text-emphasis: #145C3C;
	--bs-success-bg-subtle: #E6F4EC;
	--bs-success-border-subtle: #BFE3CF;

	--bs-secondary: #667085;
	--bs-secondary-rgb: 102, 112, 133;

	--bs-link-color: #CF2328;
	--bs-link-color-rgb: 207, 35, 40;
	--bs-link-hover-color: #B51E23;
	--bs-link-hover-color-rgb: 181, 30, 35;

	--bs-focus-ring-color: rgba(229, 43, 48, .18);
}

body {
	background-color: var(--ipog-bg);
	font-family: var(--bs-body-font-family);
	color: var(--ipog-text);
	font-size: .92rem;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { color: var(--ipog-text); letter-spacing: -.01em; }
.ipog-main > h2, .ipog-main h2.mb-0, .ipog-main h2.mb-4, .ipog-main > div > h2 {
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -.02em;
}
.text-muted { color: var(--ipog-muted) !important; }
a { text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ===================================================================== */
/* 2. Botões                                                              */
/* ===================================================================== */
.btn { border-radius: .6rem; font-weight: 600; }
.btn-sm { border-radius: .5rem; }

.btn-primary {
	--bs-btn-bg: var(--ipog-red-strong);
	--bs-btn-border-color: var(--ipog-red-strong);
	--bs-btn-hover-bg: var(--ipog-red-hover);
	--bs-btn-hover-border-color: var(--ipog-red-hover);
	--bs-btn-active-bg: var(--ipog-red-active);
	--bs-btn-active-border-color: var(--ipog-red-active);
	--bs-btn-disabled-bg: var(--ipog-red-strong);
	--bs-btn-disabled-border-color: var(--ipog-red-strong);
	--bs-btn-focus-shadow-rgb: 229, 43, 48;
	box-shadow: 0 1px 2px rgba(207, 35, 40, .25);
}
.btn-outline-primary {
	--bs-btn-color: var(--ipog-red-strong);
	--bs-btn-border-color: var(--ipog-red-border);
	--bs-btn-hover-bg: var(--ipog-red-strong);
	--bs-btn-hover-border-color: var(--ipog-red-strong);
	--bs-btn-active-bg: var(--ipog-red-hover);
	--bs-btn-active-border-color: var(--ipog-red-hover);
	--bs-btn-disabled-color: var(--ipog-red-strong);
	--bs-btn-disabled-border-color: var(--ipog-red-border);
	--bs-btn-focus-shadow-rgb: 229, 43, 48;
}
.btn-danger {
	--bs-btn-bg: var(--ipog-wine);
	--bs-btn-border-color: var(--ipog-wine);
	--bs-btn-hover-bg: var(--ipog-wine-hover);
	--bs-btn-hover-border-color: var(--ipog-wine-hover);
	--bs-btn-active-bg: var(--ipog-wine-hover);
	--bs-btn-active-border-color: var(--ipog-wine-hover);
	--bs-btn-disabled-bg: var(--ipog-wine);
	--bs-btn-disabled-border-color: var(--ipog-wine);
	--bs-btn-focus-shadow-rgb: 159, 29, 42;
}
.btn-outline-danger {
	--bs-btn-color: var(--ipog-wine);
	--bs-btn-border-color: #E7C3C8;
	--bs-btn-hover-bg: var(--ipog-wine);
	--bs-btn-hover-border-color: var(--ipog-wine);
	--bs-btn-active-bg: var(--ipog-wine-hover);
	--bs-btn-active-border-color: var(--ipog-wine-hover);
	--bs-btn-disabled-color: var(--ipog-wine);
	--bs-btn-focus-shadow-rgb: 159, 29, 42;
}
.btn-success {
	--bs-btn-bg: var(--ipog-green);
	--bs-btn-border-color: var(--ipog-green);
	--bs-btn-hover-bg: var(--ipog-green-hover);
	--bs-btn-hover-border-color: var(--ipog-green-hover);
	--bs-btn-active-bg: var(--ipog-green-hover);
	--bs-btn-active-border-color: var(--ipog-green-hover);
}
.btn-outline-success {
	--bs-btn-color: var(--ipog-green);
	--bs-btn-border-color: #BFE3CF;
	--bs-btn-hover-bg: var(--ipog-green);
	--bs-btn-hover-border-color: var(--ipog-green);
	--bs-btn-active-bg: var(--ipog-green-hover);
	--bs-btn-active-border-color: var(--ipog-green-hover);
}
.btn-outline-secondary {
	--bs-btn-color: #344054;
	--bs-btn-border-color: var(--ipog-border);
	--bs-btn-hover-color: #101828;
	--bs-btn-hover-bg: var(--ipog-gray-soft);
	--bs-btn-hover-border-color: #D0D5DD;
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: var(--ipog-graphite);
	--bs-btn-active-border-color: var(--ipog-graphite);
	background-color: #fff;
}
.btn-outline-secondary.active, .btn-check:checked + .btn-outline-secondary { background-color: var(--ipog-graphite); }
.btn-secondary {
	--bs-btn-bg: var(--ipog-graphite-2);
	--bs-btn-border-color: var(--ipog-graphite-2);
	--bs-btn-hover-bg: var(--ipog-graphite);
	--bs-btn-hover-border-color: var(--ipog-graphite);
}

/* ===================================================================== */
/* 3. Formulários                                                         */
/* ===================================================================== */
.form-control, .form-select, .input-group-text { border-color: var(--ipog-border); border-radius: .6rem; }
.input-group > .form-control, .input-group > .form-select, .input-group > .input-group-text, .input-group > .btn { border-radius: .6rem; }
.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.form-control:focus, .form-select:focus {
	border-color: #F0A3A6;
	box-shadow: 0 0 0 .2rem rgba(229, 43, 48, .15);
}
.form-label { font-weight: 600; font-size: .85rem; color: #344054; }
.form-check-input:checked { background-color: var(--ipog-red-strong); border-color: var(--ipog-red-strong); }
.form-check-input:focus { border-color: #F0A3A6; box-shadow: 0 0 0 .2rem rgba(229, 43, 48, .15); }
.form-switch .form-check-input:focus:not(:checked) {
	--bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23F0A3A6'/%3e%3c/svg%3e");
}
.form-range::-webkit-slider-thumb { background-color: var(--ipog-red-strong); }
.form-range::-moz-range-thumb { background-color: var(--ipog-red-strong); }

/* ===================================================================== */
/* 4. Cards, tabelas, badges, alertas, modais                             */
/* ===================================================================== */
.card { border-radius: .9rem; border-color: var(--ipog-border); }
.ipog-app .card { border: 1px solid var(--ipog-border) !important; }
.ipog-app .card.shadow-sm, .ipog-app .card.shadow { box-shadow: 0 1px 2px rgba(16, 24, 40, .04) !important; }
.card-header { background-color: #fff; border-bottom-color: var(--ipog-border); }
.card-header:first-child { border-radius: .9rem .9rem 0 0; }
.card-footer { background-color: #fff; border-top-color: var(--ipog-border); }

.table { --bs-table-hover-bg: #F6F7F9; --bs-table-border-color: var(--ipog-border-soft); --bs-table-striped-bg: #F7F8FA; }
/* Amostras de cor de legenda (<span class="badge bg-x">&nbsp;</span>) ficam mais visíveis com borda */
.badge:empty, .ipog-app .small > span > .badge { border: 1px solid rgba(16, 24, 40, .12); }
.table thead th {
	font-size: .7rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--ipog-muted);
	font-weight: 600;
	background-color: #FAFBFC;
	border-bottom: 1px solid var(--ipog-border) !important;
	white-space: nowrap;
}
.table thead th a { color: inherit; text-decoration: none; }
.table thead th a:hover { color: var(--ipog-text); }
.table-responsive { border-radius: .6rem; }
.table-light { --bs-table-bg: #FAFBFC; }
/* Linhas coloridas (ex.: legenda da escala: Inauguração / Encerramento / Cancelada) — mesmas cores dos badges */
.table-success { --bs-table-color: var(--ipog-text); --bs-table-bg: #E6F4EC; --bs-table-border-color: #CFE8DA; --bs-table-hover-bg: #D8EEE1; --bs-table-hover-color: var(--ipog-text); --bs-table-striped-bg: #DDF0E5; }
.table-primary { --bs-table-color: var(--ipog-text); --bs-table-bg: #E8F0FC; --bs-table-border-color: #D3E1F7; --bs-table-hover-bg: #DAE6FA; --bs-table-hover-color: var(--ipog-text); --bs-table-striped-bg: #DFEAFB; }
.table-danger  { --bs-table-color: var(--ipog-text); --bs-table-bg: #F8E6E8; --bs-table-border-color: #EDD0D4; --bs-table-hover-bg: #F2D8DB; --bs-table-hover-color: var(--ipog-text); --bs-table-striped-bg: #F4DDE0; }

.badge { font-weight: 600; border-radius: 999px; padding: .38em .7em; letter-spacing: .01em; }
.badge.bg-primary   { background-color: var(--ipog-red-soft) !important;   color: var(--ipog-red-strong); }
.badge.bg-danger    { background-color: var(--ipog-wine-soft) !important;  color: var(--ipog-wine); }
.badge.bg-success   { background-color: var(--ipog-green-soft) !important; color: var(--ipog-green); }
.badge.bg-warning   { background-color: var(--ipog-amber-soft) !important; color: var(--ipog-amber); }
.badge.bg-info      { background-color: var(--ipog-blue-soft) !important;  color: var(--ipog-blue); }
.badge.bg-secondary { background-color: var(--ipog-gray-soft) !important; color: #475467; }
.badge.bg-dark      { background-color: var(--ipog-graphite) !important;   color: #fff; }
.badge.bg-light     { background-color: #fff !important; color: #475467; border: 1px solid var(--ipog-border); }
.badge.bg-primary.text-white, .badge.bg-danger.text-white, .badge.bg-success.text-white,
.badge.bg-secondary.text-white, .badge.bg-info.text-white, .badge.bg-warning.text-white { color: inherit !important; }

.alert { border-radius: .75rem; border-width: 1px; border-left-width: 4px; }
.alert-success { --bs-alert-bg: var(--ipog-green-soft); --bs-alert-border-color: #BFE3CF; --bs-alert-color: #145C3C; border-left-color: var(--ipog-green); }
.alert-danger  { --bs-alert-bg: var(--ipog-wine-soft);  --bs-alert-border-color: #E7C3C8; --bs-alert-color: #7A1520; border-left-color: var(--ipog-wine); }
.alert-warning { --bs-alert-bg: var(--ipog-amber-soft); --bs-alert-border-color: #F1D9AE; --bs-alert-color: #7A5114; border-left-color: var(--ipog-amber); }
.alert-info    { --bs-alert-bg: var(--ipog-blue-soft);  --bs-alert-border-color: #C9DAF6; --bs-alert-color: #1D4A99; border-left-color: var(--ipog-blue); }
.alert-primary { --bs-alert-bg: var(--ipog-red-soft);   --bs-alert-border-color: var(--ipog-red-border); --bs-alert-color: #8E171B; border-left-color: var(--ipog-red); }

.modal-content { border: 0; border-radius: 1rem; box-shadow: 0 24px 60px rgba(16, 24, 40, .22); }
.modal-header { border-bottom-color: var(--ipog-border); }
.modal-footer { border-top-color: var(--ipog-border); }
.modal-title { font-weight: 700; }

.dropdown-menu {
	border: 1px solid var(--ipog-border);
	border-radius: .7rem;
	box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
	padding: .35rem;
	--bs-dropdown-link-active-bg: var(--ipog-red-strong);
}
.dropdown-item { border-radius: .45rem; padding: .45rem .7rem; font-size: .88rem; }
.dropdown-item:hover, .dropdown-item:focus { background-color: var(--ipog-bg); }
.dropdown-item.text-danger:hover { background-color: var(--ipog-wine-soft); }

.nav-pills { --bs-nav-pills-link-active-bg: var(--ipog-red-strong); }
.nav-tabs .nav-link { color: var(--ipog-muted); font-weight: 600; }
.nav-tabs .nav-link.active { color: var(--ipog-red-strong); border-bottom-color: #fff; }
.nav-tabs .nav-link:hover { color: var(--ipog-text); }
.pagination {
	--bs-pagination-color: #344054;
	--bs-pagination-hover-color: var(--ipog-red-strong);
	--bs-pagination-active-bg: var(--ipog-red-strong);
	--bs-pagination-active-border-color: var(--ipog-red-strong);
	--bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(229, 43, 48, .15);
}
.list-group { --bs-list-group-active-bg: var(--ipog-red-strong); --bs-list-group-active-border-color: var(--ipog-red-strong); }
.progress-bar { background-color: var(--ipog-red-strong); }
.spinner-border.text-primary { color: var(--ipog-red) !important; }

/* Ícone em círculo suave — útil em cards de indicadores */
.ipog-ico { width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }
.ipog-ico-red   { background: var(--ipog-red-soft);   color: var(--ipog-red-strong); }
.ipog-ico-green { background: var(--ipog-green-soft); color: var(--ipog-green); }
.ipog-ico-amber { background: var(--ipog-amber-soft); color: var(--ipog-amber); }
.ipog-ico-gray  { background: var(--ipog-gray-soft);  color: #475467; }
.ipog-ico-blue  { background: var(--ipog-blue-soft);  color: var(--ipog-blue); }

/* ===================================================================== */
/* 5. Layout interno: trilho lateral + cabeçalho                          */
/* ===================================================================== */
.ipog-rail { background-color: var(--ipog-graphite) !important; color: var(--ipog-graphite-text); }
.ipog-rail.offcanvas-lg { --bs-offcanvas-width: var(--ipog-rail-open); --bs-offcanvas-bg: var(--ipog-graphite); }

.ipog-brand {
	height: var(--ipog-topbar);
	display: flex;
	align-items: center;
	padding: 0 18px;
	flex-shrink: 0;
	border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.ipog-brand a { display: flex; align-items: center; text-decoration: none; min-width: 0; }
.ipog-mark {
	width: 36px; height: 36px; border-radius: 10px;
	background: var(--ipog-red); color: #fff;
	font-weight: 800; font-size: 1.1rem;
	display: grid; place-items: center; flex-shrink: 0;
}
/* O PNG do logo tem 500x300 com o texto no meio — o recorte mostra só o "IPOG" */
.ipog-wordmark { height: 26px; width: 120px; overflow: hidden; margin-left: 12px; transition: opacity .15s, width .2s, margin .2s; }
.ipog-wordmark img { width: 120px; margin-top: -22px; display: block; }

.ipog-rail-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 14px 12px; }
.ipog-nav { list-style: none; margin: 0; padding: 0; }
.ipog-nav .nav-item { margin-bottom: 2px; }
.ipog-nav .nav-link {
	position: relative;
	display: flex; align-items: center; gap: 14px;
	min-height: 42px; padding: 0 14px;
	color: var(--ipog-graphite-text);
	border-radius: .6rem;
	white-space: nowrap;
	font-weight: 500;
	transition: background-color .15s, color .15s;
}
.ipog-nav .nav-link > .bi:first-child { font-size: 1.15rem; width: 20px; text-align: center; flex-shrink: 0; }
.ipog-nav .nav-link .nav-label { overflow: hidden; text-overflow: ellipsis; transition: opacity .15s; }
.ipog-nav .nav-link .ipog-chev { margin-left: auto; font-size: .75rem; transition: transform .2s, opacity .15s; }
.ipog-nav .nav-link[aria-expanded="true"] .ipog-chev { transform: rotate(180deg); }
.ipog-nav .nav-link:hover { background-color: var(--ipog-graphite-2); color: #fff; }
.ipog-nav .nav-link.active, .ipog-nav .nav-link.ipog-ancestor { color: #fff; }
.ipog-nav > .nav-item > .nav-link.active, .ipog-nav > .nav-item > .nav-link.ipog-ancestor { background-color: rgba(229, 43, 48, .16); }
.ipog-nav > .nav-item > .nav-link.active::before, .ipog-nav > .nav-item > .nav-link.ipog-ancestor::before {
	content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px;
	border-radius: 0 3px 3px 0; background: var(--ipog-red);
}
.ipog-nav > .nav-item > .nav-link.active > .bi:first-child, .ipog-nav > .nav-item > .nav-link.ipog-ancestor > .bi:first-child { color: #FF6B6F; }

.ipog-subnav { list-style: none; margin: 2px 0 6px 34px; padding: 0 0 0 8px; border-left: 1px solid rgba(255, 255, 255, .08); }
.ipog-subnav .nav-link { min-height: 34px; padding: 0 10px; font-size: .86rem; gap: 10px; color: #8D96A3; }
.ipog-subnav .nav-link > .bi:first-child { font-size: .95rem; width: 16px; }
.ipog-subnav .nav-link.active { color: #fff; font-weight: 600; background-color: var(--ipog-graphite-2); }

.ipog-rail-foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .06); flex-shrink: 0; }
.ipog-pin {
	display: flex; align-items: center; gap: 14px;
	width: 100%; height: 40px; padding: 0 14px;
	color: #8D96A3; background: none; border: 0; border-radius: .6rem;
	white-space: nowrap; font-weight: 500;
}
.ipog-pin:hover { background-color: var(--ipog-graphite-2); color: #fff; }
.ipog-pin .bi { font-size: 1.05rem; width: 20px; text-align: center; flex-shrink: 0; }
.ipog-pin .nav-label { transition: opacity .15s; }

/* Cabeçalho */
.ipog-topbar {
	position: sticky; top: 0; z-index: 1030;
	height: var(--ipog-topbar);
	display: flex; align-items: center; gap: 14px;
	padding: 0 28px;
	background: rgba(255, 255, 255, .92);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--ipog-border);
}
.ipog-crumb { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ipog-muted); font-weight: 500; white-space: nowrap; overflow: hidden; }
.ipog-crumb .bi { font-size: .7rem; color: #98A2B3; }
.ipog-crumb a { color: var(--ipog-muted); text-decoration: none; }
.ipog-crumb a:hover { color: var(--ipog-text); }
.ipog-crumb .ipog-crumb-atual { color: var(--ipog-text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }

.ipog-iconbtn {
	width: 40px; height: 40px; flex-shrink: 0;
	display: inline-grid; place-items: center;
	border: 1px solid var(--ipog-border); border-radius: .7rem;
	background: #fff; color: #475467;
}
.ipog-iconbtn:hover { background: var(--ipog-gray-soft); color: var(--ipog-text); }

/* Busca de telas (Ctrl+K) */
.ipog-search { position: relative; margin-left: auto; width: 320px; max-width: 40vw; }
.ipog-search-box {
	display: flex; align-items: center; gap: 10px;
	height: 40px; padding: 0 12px;
	border: 1px solid var(--ipog-border); border-radius: .7rem;
	background: #F9FAFB; color: #98A2B3;
	transition: border-color .15s, box-shadow .15s, background .15s;
}
.ipog-search-box:focus-within { background: #fff; border-color: #F0A3A6; box-shadow: 0 0 0 .2rem rgba(229, 43, 48, .12); }
.ipog-search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ipog-text); font-size: .9rem; }
.ipog-search-box input::placeholder { color: #98A2B3; }
.ipog-kbd { font-size: .7rem; border: 1px solid var(--ipog-border); border-radius: .35rem; padding: 1px 6px; background: #fff; color: var(--ipog-muted); font-weight: 600; white-space: nowrap; }
.ipog-search-results {
	position: absolute; top: calc(100% + 6px); left: 0; right: 0;
	background: #fff; border: 1px solid var(--ipog-border); border-radius: .8rem;
	box-shadow: 0 16px 40px rgba(16, 24, 40, .16);
	padding: 6px; max-height: 360px; overflow-y: auto; display: none; z-index: 1060;
}
.ipog-search-results.show { display: block; }
.ipog-search-results a {
	display: flex; align-items: center; gap: 10px;
	padding: 8px 10px; border-radius: .5rem;
	color: #344054; text-decoration: none; font-size: .88rem;
}
.ipog-search-results a .bi { color: var(--ipog-muted); width: 18px; text-align: center; }
.ipog-search-results a small { margin-left: auto; color: #98A2B3; font-size: .75rem; }
.ipog-search-results a.ativo, .ipog-search-results a:hover { background: var(--ipog-red-soft); color: var(--ipog-red-strong); }
.ipog-search-results a.ativo .bi, .ipog-search-results a:hover .bi { color: var(--ipog-red-strong); }
.ipog-search-vazio { padding: 10px; color: var(--ipog-muted); font-size: .85rem; }

/* Usuário */
.ipog-user { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; text-align: left; }
.ipog-avatar {
	width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
	background: var(--ipog-red); color: #fff;
	font-weight: 700; font-size: .85rem;
	display: grid; place-items: center;
	box-shadow: 0 0 0 3px var(--ipog-red-soft);
}
.ipog-user-info { line-height: 1.15; max-width: 180px; }
.ipog-user-info .nome { font-weight: 600; color: var(--ipog-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ipog-user-info small { color: var(--ipog-muted); }

.ipog-main { padding: 28px; min-width: 0; }

/* ---- Desktop: trilho fixo que expande no hover ---- */
@media (min-width: 992px) {
	.ipog-rail {
		position: fixed; inset: 0 auto 0 0; z-index: 1040;
		width: var(--ipog-rail);
		display: flex; flex-direction: column;
		overflow: hidden;
		transition: width .2s ease, box-shadow .2s;
	}
	.ipog-rail .offcanvas-body { display: block; flex: 1; overflow-y: auto !important; overflow-x: hidden; padding: 14px 12px; }
	.ipog-shell { margin-left: var(--ipog-rail); transition: margin .2s ease; }

	/* Recolhido: só ícones */
	.ipog-rail:not(:hover) .nav-label,
	.ipog-rail:not(:hover) .ipog-chev { opacity: 0; }
	.ipog-rail:not(:hover) .ipog-wordmark { opacity: 0; width: 0; margin-left: 0; }
	.ipog-rail:not(:hover) .ipog-subnav { display: none; }

	/* Expandido no hover — por cima do conteúdo */
	.ipog-rail:hover { width: var(--ipog-rail-open); box-shadow: 8px 0 30px rgba(16, 24, 40, .25); }

	/* Fixado aberto (preferência do usuário) — empurra o conteúdo */
	html.ipog-pinned .ipog-rail { width: var(--ipog-rail-open); box-shadow: none; }
	html.ipog-pinned .ipog-rail .nav-label,
	html.ipog-pinned .ipog-rail .ipog-chev { opacity: 1; }
	html.ipog-pinned .ipog-rail .ipog-wordmark { opacity: 1; width: 120px; margin-left: 12px; }
	html.ipog-pinned .ipog-rail .ipog-subnav { display: block; }
	html.ipog-pinned .ipog-shell { margin-left: var(--ipog-rail-open); }
}
/* .collapse:not(.show) continua escondendo o submenu fechado em qualquer modo */
.ipog-rail .collapse:not(.show) { display: none; }

/* ---- Celular/tablet ---- */
@media (max-width: 991.98px) {
	.ipog-rail { display: flex; flex-direction: column; }
	.ipog-topbar { padding: 0 14px; gap: 10px; }
	.ipog-main { padding: 18px 16px 32px; }
	.ipog-crumb .ipog-crumb-pai, .ipog-crumb .ipog-crumb-sep { display: none; }
	.ipog-search { width: auto; max-width: none; }
	.ipog-search-box { width: 40px; padding: 0; justify-content: center; cursor: pointer; }
	.ipog-search-box input, .ipog-search-box .ipog-kbd { display: none; }
	.ipog-search.aberta { position: absolute; left: 10px; right: 10px; top: 12px; margin: 0; }
	.ipog-search.aberta .ipog-search-box { width: 100%; padding: 0 12px; justify-content: flex-start; background: #fff; }
	.ipog-search.aberta .ipog-search-box input { display: block; }
	.ipog-user-info { display: none; }
}

/* ===================================================================== */
/* 6. Páginas fora do sistema (login, recuperação, páginas públicas)      */
/* ===================================================================== */
.ipog-auth {
	min-height: 100vh;
	display: flex; align-items: center; justify-content: center;
	padding: 32px 16px;
	background: #15181C;
	position: relative;
	overflow-x: hidden;
}
.ipog-auth::before {
	content: ""; position: fixed;
	width: 720px; height: 720px; right: -220px; top: -260px; border-radius: 50%;
	background: radial-gradient(circle, rgba(229, 43, 48, .38), transparent 62%);
	pointer-events: none;
}
.ipog-auth::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 4px; background: var(--ipog-red); }
.ipog-auth-card {
	position: relative; z-index: 1;
	width: 100%; max-width: 400px;
	background: #fff; border-radius: 1.2rem;
	padding: 34px 32px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.ipog-auth-logo { height: 40px; width: 180px; overflow: hidden; margin-bottom: 22px; }
.ipog-auth-logo img { width: 180px; margin-top: -34px; margin-left: -6px; display: block; }
.ipog-auth-card h3 { font-weight: 700; font-size: 1.35rem; margin-bottom: 4px; }
.ipog-auth-sub { color: var(--ipog-muted); margin-bottom: 22px; }
.ipog-auth-card .form-control { height: 44px; }
.ipog-auth-card .btn-primary { height: 46px; }
.ipog-auth-card a.link-ipog { color: var(--ipog-red-strong); font-weight: 600; text-decoration: none; font-size: .85rem; }
.ipog-auth-card a.link-ipog:hover { text-decoration: underline; }
.ipog-auth-codigo { letter-spacing: .5em; text-align: center; font-size: 1.4rem; font-weight: 700; }

/* Páginas públicas: faixa superior grafite com o logo */
.ipog-public { background: var(--ipog-bg); min-height: 100vh; }
.ipog-public-bar {
	background: var(--ipog-graphite);
	border-bottom: 3px solid var(--ipog-red);
	color: #fff;
}
.ipog-public-bar .container, .ipog-public-bar .container-fluid { min-height: 64px; display: flex; align-items: center; gap: 14px; }
.ipog-public-bar .ipog-wordmark { margin-left: 0; }
.ipog-public-bar .ipog-public-titulo { color: #C9CED6; font-weight: 500; border-left: 1px solid rgba(255, 255, 255, .15); padding-left: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===================================================================== */
/* 7. Painel do apoio — destaque "Você foi escalado"                      */
/* ===================================================================== */
.ipog-hero {
	position: relative; overflow: hidden;
	border-radius: 1.1rem;
	background: linear-gradient(120deg, #1B1F24 0%, #2A3038 60%, #3A1418 100%);
	color: #fff;
	padding: 26px 28px;
}
.ipog-hero::after {
	content: ""; position: absolute; right: -60px; top: -60px;
	width: 260px; height: 260px; border-radius: 50%;
	background: radial-gradient(circle, rgba(229, 43, 48, .55), transparent 65%);
	pointer-events: none;
}
.ipog-hero > * { position: relative; z-index: 1; }
.ipog-hero-badge {
	display: inline-flex; gap: 8px; align-items: center;
	background: var(--ipog-red); color: #fff;
	border-radius: 999px; padding: 5px 12px;
	font-weight: 700; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase;
}
.ipog-hero h3 { color: #fff; font-size: 1.7rem; font-weight: 800; margin: 14px 0 6px; letter-spacing: -.02em; }
.ipog-hero p { color: #C9CED6; margin: 0; }
