:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --sidebar: #101722;
  --sidebar-2: #16202c;
  --sidebar-line: #263240;
  --line: #dfe5ec;
  --line-soft: #edf1f5;
  --text: #172234;
  --muted: #66758a;
  --muted-2: #93a0b2;
  --red: #ed1b2f;
  --red-dark: #c91427;
  --green: #16b97f;
  --yellow: #e7aa06;
  --blue: #1676c8;
  --purple: #7a36d6;
  --navy: #2c2a98;
  --navy-dark: #211f72;
  --blue-light: #3d74ad;
  --gold: #b27b38;
  --brand-yellow: #fece00;
  --shadow: 0 8px 26px rgba(31, 44, 61, 0.07);
  --radius: 13px;
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
}

/* SIDEBAR */
/* Reserva o espaço/aparência da barra lateral (cor escura, largura, posição) já na primeira
   renderização, antes do JS montar o menu — evita o "flash" claro→escuro ao trocar de página. */
#sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 268px;
  height: 100vh;
  background: linear-gradient(180deg, #111925 0%, #0f1722 100%);
  border-right: 1px solid #202c39;
  z-index: 49;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 268px;
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #111925 0%, #0f1722 100%);
  border-right: 1px solid #202c39;
  z-index: 50;
  color: #dce4ee;
  scrollbar-width: thin;
  scrollbar-color: #3b495a transparent;
}
.sidebar-header {
  height: 90px;
  padding: 20px 20px;
  border-bottom: 1px solid var(--sidebar-line);
  display: flex;
  gap: 13px;
  align-items: center;
}
.sidebar-logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--navy), var(--navy-dark));
  box-shadow: 0 8px 22px rgba(44, 42, 152, 0.32);
  padding: 7px;
}
.sidebar-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sidebar-brand strong {
  display: block;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: #fff;
}
.sidebar-brand span {
  display: block;
  margin-top: 4px;
  color: #8492a4;
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.nav {
  padding: 12px 11px 26px;
}
.nav-group {
  margin: 10px 0 13px;
}
.nav-module {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 8px 9px;
  border-radius: 9px;
  color: #f5f7fa;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: 0.16s;
}
.nav-module:hover {
  background: #17212e;
}
.nav-group.active-group > .nav-module {
  background: linear-gradient(90deg, rgba(178, 123, 56, 0.28), rgba(178, 123, 56, 0.08));
  box-shadow: inset 0 0 0 1px rgba(178, 123, 56, 0.32);
}
.module-icon {
  width: 31px;
  height: 31px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  flex: 0 0 auto;
  box-shadow: 0 6px 14px rgba(44, 42, 152, 0.28);
}
.module-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}
.module-label {
  flex: 1;
}
.module-chevron {
  font-size: 10px;
  color: #a9b5c4;
  transition: transform 0.18s;
}
.nav-group.collapsed .module-chevron {
  transform: rotate(-90deg);
}
.nav-items {
  padding: 3px 0 2px 13px;
}
.nav-group.collapsed .nav-items {
  display: none;
}
.nav a.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 36px;
  padding: 7px 10px;
  margin: 1px 0;
  border-radius: 8px;
  text-decoration: none;
  color: #c5cfdb;
  font-size: 13px;
  font-weight: 500;
  transition: 0.15s;
}
.nav a.nav-item:hover {
  background: #182330;
  color: #fff;
}
.nav a.nav-item.active {
  color: #fff;
  background: #1d2936;
  font-weight: 700;
}
.nav a.nav-item.active:before {
  content: "";
  width: 3px;
  height: 18px;
  border-radius: 5px;
  background: var(--brand-yellow);
  margin-left: -10px;
}
.nav-subicon {
  width: 18px;
  display: grid;
  place-items: center;
  color: #8e9bad;
}
.nav-subicon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}
.session-group {
  border-top: 1px solid var(--sidebar-line);
  padding-top: 12px;
  margin-top: 16px;
}
.sidebar-footer {
  padding: 16px 20px 22px;
  border-top: 1px solid var(--sidebar-line);
  color: #718095;
  font-size: 8px;
}
.sidebar-footer strong {
  color: #fff;
  font-size: 10px;
  margin-right: 6px;
}

/* MAIN + TOP BAR */
/* padding-top reserva o espaço da barra superior (que só é criada pelo JS) já de início, para o
   conteúdo não "pular" para baixo quando ela é inserida. Some assim que common.js adiciona a
   classe chrome-ready (ver injectTopbar). */
.main {
  margin-left: 268px;
  min-height: 100vh;
  padding: 100px 26px 42px;
  background: var(--bg);
}
.main.chrome-ready {
  padding-top: 0;
}
.app-topbar {
  height: 72px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -26px 28px;
  padding: 0 26px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 35;
  box-shadow: 0 2px 8px rgba(22, 34, 52, 0.02);
}
.top-left,
.top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.top-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
}
.mobile-menu {
  border: 0;
  background: transparent;
  color: #172234;
  border-radius: 8px;
  padding: 8px;
  display: none;
  min-height: 0;
}
.mobile-menu svg {
  width: 21px;
  height: 21px;
}
.topbar-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #364457;
  font-size: 11px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #12c98b;
  box-shadow: 0 0 10px rgba(18, 201, 139, 0.25);
}
.top-search {
  position: relative;
  width: 260px;
}
.top-search input {
  width: 100%;
  height: 38px;
  min-height: 38px;
  background: #f8fafc;
  border: 1px solid #d8dee7;
  border-radius: 9px;
  padding: 0 13px 0 36px;
  color: var(--text);
  font-size: 13px;
}
.top-search svg {
  position: absolute;
  left: 12px;
  top: 11px;
  width: 16px;
  height: 16px;
  stroke: #7b899b;
}
.notification {
  position: relative;
  width: 37px;
  height: 37px;
  border: 0;
  background: transparent;
  color: #253245;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 9px;
  min-height: 0;
}
.notification:hover {
  background: #f2f5f8;
}
.notification svg {
  width: 20px;
  height: 20px;
}
.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.userbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 4px;
}
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--navy), var(--navy-dark));
  font-weight: 850;
  color: #fff;
}
.user-meta {
  text-align: left;
}
.user-meta strong {
  display: block;
  font-size: 11px;
  color: #1d2838;
}
.user-meta span {
  display: block;
  margin-top: 2px;
  color: #8a96a6;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* TYPOGRAPHY + PANELS */
h1 {
  margin: 0 0 5px;
  font-size: 27px;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: #152033;
}
h2,
h3 {
  color: #182436;
  letter-spacing: -0.02em;
}
p {
  color: var(--muted);
  line-height: 1.5;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.top p {
  margin: 3px 0 0;
  font-size: 12px;
}
.page-subtitle {
  margin: 3px 0 0;
  font-size: 12px;
}
.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel {
  padding: 20px;
  margin-top: 18px;
}
.panel h2,
.panel h3 {
  margin-top: 0;
}
.panel > p:first-child {
  margin-top: 0;
}
.panel > p:last-child {
  margin-bottom: 0;
}
.panel:not(.compact-toolbar) {
  border-left-width: 4px;
  border-left-color: var(--navy);
}
.mini-cards .card:nth-child(1) {
  border-left-color: var(--red);
}
.mini-cards .card:nth-child(2) {
  border-left-color: var(--yellow);
}
.mini-cards .card:nth-child(3) {
  border-left-color: var(--blue-light);
}
.mini-cards .card:nth-child(4) {
  border-left-color: #8a97a8;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 21px;
}
.card {
  padding: 17px;
  min-height: 114px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 15px;
  border-left-width: 4px;
  transition:
    transform 0.16s,
    box-shadow 0.16s,
    border-color 0.16s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(31, 44, 61, 0.11);
}
.metric-icon {
  width: 67px;
  height: 67px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.metric-icon svg {
  width: 31px;
  height: 31px;
  stroke: currentColor;
}
.metric-icon.red {
  background: #ffe8eb;
  color: #ee1e32;
  box-shadow: 0 6px 16px rgba(238, 30, 50, 0.18);
}
.metric-icon.yellow {
  background: #fff4d7;
  color: #dca800;
  box-shadow: 0 6px 16px rgba(220, 168, 0, 0.18);
}
.metric-icon.blue {
  background: #e5f2ff;
  color: #1676c8;
  box-shadow: 0 6px 16px rgba(22, 118, 200, 0.18);
}
.metric-icon.green {
  background: #e4f8ef;
  color: #0ca86f;
  box-shadow: 0 6px 16px rgba(12, 168, 111, 0.18);
}
.card:has(.metric-icon.red) {
  border-left-color: var(--red);
}
.card:has(.metric-icon.yellow) {
  border-left-color: var(--yellow);
}
.card:has(.metric-icon.blue) {
  border-left-color: var(--blue);
}
.card:has(.metric-icon.green) {
  border-left-color: var(--green);
}
.metric-content {
  min-width: 0;
}
.metric-label {
  font-size: 10px;
  font-weight: 850;
  color: #62728a;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.metric-value {
  display: block;
  margin-top: 7px;
  font-size: 24px;
  line-height: 1;
  color: #172234;
  font-weight: 850;
  letter-spacing: -0.04em;
}
.metric-note {
  display: block;
  margin-top: 7px;
  color: #78869a;
  font-size: 10px;
}
.metric-arrow {
  margin-left: auto;
  color: var(--navy);
  font-size: 21px;
  font-weight: 300;
}

/* DASHBOARD */
.welcome-banner {
  margin-top: 26px;
  min-height: 137px;
  background: linear-gradient(90deg, #f9fbfd 0%, #f0f4f9 65%, #fff 100%);
  border: 1px solid #e3e8ef;
  border-left: 6px solid var(--navy);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 29px;
  box-shadow: var(--shadow);
}
.welcome-banner h2 {
  margin: 0 0 2px;
  font-size: 22px;
}
.welcome-banner h3 {
  margin: 0 0 10px;
  font-size: 14px;
}
.welcome-banner p {
  margin: 0;
  font-size: 11px;
  max-width: 800px;
}
.fortal-wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-left: 34px;
  border-left: 1px solid #ccd5df;
  min-width: 230px;
  justify-content: center;
}
.fortal-symbol {
  font-size: 47px;
  line-height: 1;
  font-weight: 1000;
  font-style: italic;
  color: var(--red);
  transform: skew(-8deg);
}
.fortal-text strong {
  display: block;
  font-size: 30px;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-style: italic;
}
.fortal-text span {
  display: block;
  font-size: 6px;
  margin-top: 5px;
  letter-spacing: 0.08em;
  font-weight: 750;
}
.fortal-logo-img {
  height: 82px;
  width: auto;
  display: block;
}
.companies-strip {
  margin-top: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 24px;
  box-shadow: var(--shadow);
}
.companies-strip-title {
  margin: 0 0 14px;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #78869a;
}
.companies-strip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}
.companies-strip-row img {
  height: 38px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}
.dashboard-section-title {
  margin: 31px 0 2px;
  font-size: 16px;
}
.dashboard-section-sub {
  margin: 0 0 13px;
  font-size: 11px;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 11px;
}
.quick-card {
  min-height: 127px;
  background: #fff;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;
  transition:
    transform 0.16s,
    box-shadow 0.16s,
    border-color 0.16s;
}
.quick-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(31, 44, 61, 0.13);
}
.quick-icon {
  width: 49px;
  height: 49px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 9px;
}
.quick-icon svg {
  width: 25px;
  height: 25px;
  stroke: currentColor;
}
.quick-card strong {
  font-size: 11px;
  text-align: center;
  max-width: 95px;
}
.quick-arrow {
  position: absolute;
  right: 12px;
  bottom: 14px;
  color: #76879b;
  font-size: 16px;
}
.quick-icon.red {
  background: #ffe5e8;
  color: #e92235;
  box-shadow: 0 6px 14px rgba(233, 34, 53, 0.18);
}
.quick-icon.yellow {
  background: #fff1cb;
  color: #d5a400;
  box-shadow: 0 6px 14px rgba(213, 164, 0, 0.18);
}
.quick-icon.green {
  background: #e1f8ed;
  color: #0ea96f;
  box-shadow: 0 6px 14px rgba(14, 169, 111, 0.18);
}
.quick-icon.blue {
  background: #e2f1ff;
  color: #126fb7;
  box-shadow: 0 6px 14px rgba(18, 111, 183, 0.18);
}
.quick-icon.purple {
  background: #f0e5ff;
  color: #7d32cb;
  box-shadow: 0 6px 14px rgba(125, 50, 203, 0.18);
}
.quick-icon.gray {
  background: #edf1f5;
  color: #657487;
  box-shadow: 0 6px 14px rgba(101, 116, 135, 0.14);
}
.quick-card:has(.quick-icon.red) {
  border-left-color: var(--red);
}
.quick-card:has(.quick-icon.yellow) {
  border-left-color: var(--yellow);
}
.quick-card:has(.quick-icon.green) {
  border-left-color: var(--green);
}
.quick-card:has(.quick-icon.blue) {
  border-left-color: var(--blue);
}
.quick-card:has(.quick-icon.purple) {
  border-left-color: var(--purple);
}
.quick-card:has(.quick-icon.gray) {
  border-left-color: #8a97a8;
}
.dashboard-lower {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 25px;
}
.info-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-left-color: var(--navy);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.info-panel-head {
  padding: 15px 20px 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.info-panel-head .head-icon {
  color: var(--navy);
  display: grid;
  place-items: center;
}
.info-panel-head svg {
  width: 22px;
  height: 22px;
}
.info-panel-head h3 {
  margin: 0;
  font-size: 13px;
}
.info-panel-head p {
  margin: 2px 0 0;
  font-size: 10px;
}
.view-all {
  margin-left: auto;
  border: 1px solid #d7dee7;
  background: #fff;
  color: #233146;
  min-height: 32px;
  height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
}
.view-all:hover {
  background: #f7f9fb;
  transform: none;
}
.empty-dashboard {
  min-height: 150px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #75859a;
}
.empty-dashboard svg {
  width: 35px;
  height: 35px;
  stroke: #8796aa;
  margin-bottom: 7px;
}
.empty-dashboard strong {
  display: block;
  font-size: 11px;
}
.empty-dashboard span {
  display: block;
  font-size: 10px;
  margin-top: 4px;
}
.dashboard-date {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #dfe5ec;
  border-radius: 9px;
  padding: 10px 15px;
  color: #1d2b3e;
  min-width: 250px;
}
.dashboard-date svg {
  width: 22px;
  height: 22px;
}
.dashboard-date strong {
  display: block;
  font-size: 11px;
}
.dashboard-date span {
  display: block;
  color: #6f7d90;
  font-size: 10px;
  margin-top: 2px;
}

/* FORMS + TABLES */
form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
input,
select,
textarea {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d8dfe8;
  border-radius: 8px;
  background: #fff;
  color: #263447;
  outline: none;
  margin: 0;
  font-size: 13px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
input::placeholder,
textarea::placeholder {
  color: #9aa6b5;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #6664c4;
  box-shadow: 0 0 0 3px rgba(44, 42, 152, 0.1);
}
button {
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: #fff;
  font-weight: 750;
  font-size: 13px;
  cursor: pointer;
  transition:
    filter 0.15s,
    transform 0.15s;
}
button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.panel table button {
  min-height: 31px;
  padding: 5px 10px;
  font-size: 11px;
  background: #fff0f2;
  border: 1px solid #ffd0d5;
  color: #cc1830;
}
.table-wrap,
#tbl,
#x {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  color: #354458;
  font-size: 12px;
}
th,
td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid #edf0f4;
  white-space: nowrap;
}
th {
  color: #64758b;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  background: #f7f9fb;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover td {
  background: #fbfcfe;
}
.empty-state {
  padding: 34px;
  text-align: center;
  color: #8694a7;
}

.app-footer {
  margin-top: 26px;
  border-top: 1px solid #dbe2e9;
  padding: 18px 0 3px;
  display: flex;
  justify-content: space-between;
  color: #718096;
  font-size: 10px;
}
.online {
  display: flex;
  align-items: center;
  gap: 7px;
}
.online:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #18b97e;
}

@media (max-width: 1280px) {
  .quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .top-search {
    width: 210px;
  }
}
@media (max-width: 950px) {
  #sidebar,
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main {
    margin-left: 0;
    padding: 100px 18px 35px;
  }
  .app-topbar {
    margin: 0 -18px 24px;
    padding: 0 18px;
  }
  .mobile-menu {
    display: grid;
    place-items: center;
  }
  .top-search {
    display: none;
  }
  .fortal-wordmark {
    display: none;
  }
  .dashboard-lower {
    grid-template-columns: 1fr;
  }
  .quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .cards,
  .quick-grid {
    grid-template-columns: 1fr 1fr;
  }
  .panel {
    padding: 14px;
  }
  input,
  select,
  textarea,
  form button {
    width: 100%;
  }
  .main {
    padding-left: 12px;
    padding-right: 12px;
  }
  .app-topbar {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .user-meta {
    display: none;
  }
  h1 {
    font-size: 23px;
  }
  .welcome-banner {
    padding: 20px;
  }
  .quick-card {
    min-height: 108px;
  }
  .dashboard-date {
    display: none;
  }
}

/* Componentes de cadastro/edicao - v1.2 */
.compact-toolbar {
  padding: 13px 15px;
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.filter-row input {
  flex: 1;
  min-width: 260px;
}
.filter-row select {
  min-width: 170px;
}
.record-counter {
  margin-left: auto;
  color: #718096;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.center {
  text-align: center;
}
.check-yes {
  color: var(--green);
  font-weight: 800;
  font-size: 15px;
}
.check-no {
  color: var(--red);
  font-weight: 800;
  font-size: 15px;
}
.wide-cell {
  max-width: 260px;
  white-space: normal;
  min-width: 150px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.small {
  min-height: 31px !important;
  height: 31px !important;
  padding: 5px 10px !important;
  font-size: 11px !important;
  border-radius: 7px !important;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 750;
}
.btn-light {
  background: #fff !important;
  color: #354458 !important;
  border: 1px solid #d5dde7 !important;
  box-shadow: none !important;
}
.btn-light:hover {
  background: #f7f9fb !important;
  filter: none !important;
}
.btn-danger-outline {
  background: #fff5f6 !important;
  color: #d71931 !important;
  border: 1px solid #ffc8cf !important;
  box-shadow: none !important;
}
.btn-drive {
  background: #f4f7fb;
  color: #41536b;
  border: 1px solid #d7e0eb;
}
.btn-drive:hover {
  background: #eaf0f7;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.status-badge.ok {
  background: #e5f5ef;
  color: #087b5a;
  border: 1px solid #bde3d6;
}
.status-badge.warning {
  background: #fff4d6;
  color: #996d00;
  border: 1px solid #f3daa0;
}
.status-badge.danger {
  background: #ffe8eb;
  color: #c71e32;
  border: 1px solid #ffc6ce;
}
.status-badge.neutral {
  background: #eef2f6;
  color: #657487;
  border: 1px solid #dbe2e9;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 25, 37, 0.42);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}
.modal-backdrop.show {
  display: flex;
}
.modal-card {
  width: min(760px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #f8f9fb;
  border: 1px solid #d8dee7;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(16, 27, 43, 0.25);
  padding: 20px;
}
.modal-card.large {
  width: min(820px, 96vw);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid #e3e7ed;
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.modal-head h2 {
  margin: 0 0 3px;
  font-size: 16px;
}
.modal-head p {
  margin: 0;
  font-size: 11px;
}
.modal-head button {
  min-height: 32px;
  height: 32px;
  padding: 6px 12px;
  font-size: 11px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #66758a;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  text-transform: none;
  font-size: 13px;
  color: #263447;
}
.form-grid textarea {
  resize: vertical;
}
.span-2 {
  grid-column: 1/-1;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #e3e7ed;
  padding-top: 14px;
  margin-top: 2px;
}
.form-actions button {
  min-width: 110px;
}
.email-tag-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  font-size: 13px;
  color: var(--text);
}
.email-tag-input-row {
  display: flex;
  gap: 8px;
}
.email-tag-input-row input {
  flex: 1;
}
.email-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.email-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 6px 4px 12px;
  font-size: 12px;
  font-weight: 600;
}
.email-chip button {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.email-chip button:hover {
  background: #ffe8eb;
  color: var(--red-dark);
}
.email-tag-input .empty-note {
  font-size: 11px;
  color: var(--muted-2);
}
.email-tag-input .field-error {
  font-size: 11px;
  font-weight: 700;
  color: var(--red-dark);
}
.mini-cards {
  /* auto-fit: se adapta ao número de cartões (3 em Extintores, 4 em Vencimentos), sem
     deixar espaço vazio nem exigir uma regra por página. */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 1100px;
}
@media (max-width: 760px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: 1;
  }
  .filter-row {
    flex-wrap: wrap;
  }
  .filter-row input,
  .filter-row select {
    width: 100%;
    min-width: 0;
  }
  .record-counter {
    margin-left: 0;
  }
  .modal-backdrop {
    padding: 10px;
  }
  .modal-card {
    padding: 15px;
  }
}
