:root {
  --blue: #0B49CF;
  --blue-deep: #050079;
  --blue-night: #020819;
  --orange: #FC6705;
  --cream: #EFE0B8;
  --paper: #F6F6F3;
  --soft: #ECEEF3;
  --white: #FFFFFF;
  --ink: #05070E;
  --muted: #69707D;
  --line: rgba(5, 7, 14, .13);
  --serif: "Newsreader", Georgia, serif;
  --sans: "IBM Plex Sans Condensed", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(11, 73, 207, .05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(252, 103, 5, .06) 1px, transparent 1px),
    var(--paper);
  background-size: 64px 64px;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
select,
textarea,
button {
  font: inherit;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--blue);
  padding: 48px 18px 56px;
}

.login-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px;
  z-index: 5;
  text-align: center;
  color: rgba(255,255,255,.76);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  pointer-events: none;
}

.login-shell {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  background: var(--white);
  box-shadow: 16px 16px 0 var(--blue-deep);
}

.login-brand {
  background: var(--blue);
  color: var(--white);
  padding: 58px;
  position: relative;
  overflow: hidden;
}

.login-brand-logo {
  width: 104px;
  height: 104px;
  display: block;
  object-fit: contain;
  margin-bottom: 22px;
}

.login-brand::after {
  display: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--blue-deep);
  color: var(--white);
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 8px;
  left: -8px;
  background: var(--orange);
  transform: rotate(-28deg);
}

.brand-mark::before {
  top: 10px;
}

.brand-mark::after {
  bottom: 10px;
}

.brand-mark span {
  position: relative;
  z-index: 1;
  font-size: 23px;
  font-weight: 700;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--orange);
  font-size: 13px;
}

.login-brand .eyebrow {
  color: rgba(255,255,255,.82);
}

.login-brand h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 104px;
  line-height: .84;
  letter-spacing: -.07em;
}

.login-brand p:last-child {
  max-width: 560px;
  color: rgba(255,255,255,.82);
  font-size: 24px;
  line-height: 1.05;
}

.login-card {
  padding: 40px 36px;
}

.login-card h2 {
  margin: 0 0 24px;
  color: var(--blue-deep);
  font-size: 36px;
  line-height: .92;
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--blue-deep);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 14px;
  margin-bottom: 16px;
  outline: 0;
}


/* FLUXUS fix: campos de data e inputs nativos não podem ultrapassar a margem do formulário */
input,
select,
textarea {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="week"],
input[type="email"],
input[type="number"],
input[type="text"],
input[type="url"],
input[type="tel"],
input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="week"] {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

.form-card form,
.panel-card form,
.panel-body form {
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 900px) {
  .form-card input:not([type="checkbox"]):not([type="radio"]),
  .form-card select,
  .form-card textarea,
  .panel-card input:not([type="checkbox"]):not([type="radio"]),
  .panel-card select,
  .panel-card textarea,
  .panel-body input:not([type="checkbox"]):not([type="radio"]),
  .panel-body select,
  .panel-body textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}


textarea {
  min-height: 120px;
  resize: vertical;
}

/* FLUXUS fix: checkboxes e radios não devem herdar largura total dos campos de texto */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-width: 0;
  max-width: none;
  height: auto;
  padding: 0;
  margin: 0;
  display: inline-block;
  flex: 0 0 auto;
  box-sizing: border-box;
}

/* Mantém textos de opções ao lado da caixa de seleção em formulários */
label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]) {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
}

label:has(> input[type="checkbox"]) input,
label:has(> input[type="radio"]) input {
  margin-bottom: 0;
}


button,
.button {
  border: 0;
  background: var(--orange);
  color: var(--white);
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button.small {
  padding: 8px 11px;
  font-size: 14px;
}

.alert {
  background: rgba(186, 26, 26, .10);
  color: #BA1A1A;
  padding: 13px;
  margin-bottom: 18px;
}

.success-box {
  background: rgba(11, 122, 75, .12);
  color: #0B7A4B;
  padding: 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(11, 122, 75, .25);
}

.login-help {
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.15;
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
}

.sidebar {
  background: var(--blue-night);
  color: var(--white);
  padding: 22px;
  min-height: 100vh;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.brand-mark-img.clean-logo {
  width: 72px !important;
  height: 72px !important;
  object-fit: cover !important;
  display: block !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  flex: 0 0 72px !important;
}

.sidebar .brand .brand-mark {
  margin: 0;
  background: var(--blue);
}

.sidebar .brand strong {
  display: block;
  font-size: 24px;
  line-height: .95;
}

.sidebar .brand small {
  color: rgba(255,255,255,.62);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 11px;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-nav a {
  padding: 13px 12px;
  color: rgba(255,255,255,.76);
  border: 1px solid transparent;
}

.side-nav a.active,
.side-nav a:hover {
  color: var(--white);
  background: rgba(11, 73, 207, .38);
  border-color: rgba(255,255,255,.12);
}

/* Rodapé compacto do menu lateral */
.sidebar,
.admin-sidebar,
aside.sidebar,
aside.admin-sidebar {
  display: flex;
  flex-direction: column;
}

.side-nav {
  flex: 1 1 auto;
  align-content: start;
  padding-bottom: 42px;
  box-sizing: border-box;
}

.sidebar-footer {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 18px 2px 0;
  border-top: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.54);
  font-size: 10px;
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-footer strong {
  display: block;
  color: rgba(255,255,255,.84);
  font-size: 11px;
  line-height: 1.1;
}

.sidebar-footer span {
  display: block;
  margin-top: 3px;
}

.main-content {
  padding: 28px;
}

.topbar,
.simple-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 24px;
}

.topbar > div:first-child,
.simple-head > div:first-child {
  flex: 1 1 460px;
  min-width: 0;
}

.simple-head-actions,
.topbar > div + div,
.simple-head > div + div {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar > .button,
.topbar > a.button,
.simple-head > .button,
.simple-head > a.button {
  flex: 0 0 auto;
  white-space: normal;
  text-align: center;
}

.breadcrumb {
  margin: 0 0 5px;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-family: var(--serif);
  color: var(--blue-deep);
  font-size: clamp(42px, 5vw, 74px);
  line-height: .88;
  letter-spacing: -.06em;
}

.user-pill {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 12px 14px;
  color: var(--blue-deep);
}

.hero-panel {
  background: var(--blue);
  color: var(--white);
  padding: 36px;
  margin-bottom: 22px;
  box-shadow: 12px 12px 0 rgba(5, 0, 121, .15);
}

.hero-panel h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 82px);
  line-height: .88;
  letter-spacing: -.06em;
}

.hero-panel p {
  max-width: 820px;
  font-size: 23px;
  line-height: 1.05;
  color: rgba(255,255,255,.82);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.metric-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 18px;
  min-height: 160px;
}

.metric-card span {
  color: #0B7A4B;
  text-transform: uppercase;
  letter-spacing: .10em;
  font-size: 12px;
}

.metric-card strong {
  display: block;
  margin: 18px 0 12px;
  font-family: var(--serif);
  color: var(--blue-deep);
  font-size: 60px;
  line-height: .78;
  letter-spacing: -.07em;
}

.metric-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.05;
}

.panel-card,
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  margin-bottom: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  color: var(--blue-deep);
  font-size: 32px;
  line-height: .95;
}

.panel-head a {
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
}

.panel-body {
  padding: 18px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--blue-deep);
  background: rgba(11,73,207,.05);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
}

td strong {
  display: block;
  color: var(--ink);
}

td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  background: var(--cream);
  color: var(--blue-deep);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 12px;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
}

.page-simple {
  width: min(1180px, calc(100% - 36px));
  margin: 32px auto;
}


/* Páginas internas do painel: mesma largura útil do dashboard */
.app-layout .main-content > .page-simple {
  width: 100%;
  max-width: none;
  margin: 0;
}

/* Padrão visual das áreas Financeiro, Configuração e Administrativo */
.app-layout .main-content > .page-simple,
.app-layout .main-content > .fxcfg-page,
.app-layout .main-content > .logs-page,
.app-layout .main-content > .finance-page {
  max-width: none;
}

.simple-head,
.topbar,
.fxcfg-head {
  margin-bottom: 22px;
}

.breadcrumb,
.fxcfg-breadcrumb {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.1;
  font-weight: 800;
}

.simple-head h1,
.topbar h1,
.fxcfg-head h1 {
  color: var(--blue-deep) !important;
  font-family: var(--serif) !important;
  font-size: clamp(46px, 5.2vw, 76px) !important;
  line-height: .88 !important;
  letter-spacing: -.06em !important;
}

.finance-hero,
.mail-hero,
.translations-hero,
.users-hero,
.logs-hero,
.fxcfg-intro {
  background: var(--blue-deep) !important;
  color: var(--white) !important;
  padding: clamp(26px, 3vw, 36px) !important;
  margin-bottom: 22px !important;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(5, 7, 14, .16) !important;
  box-shadow: 12px 12px 0 rgba(5, 0, 121, .12) !important;
}

.finance-hero::after,
.mail-hero::after,
.translations-hero::after,
.users-hero::after,
.fxcfg-intro::after {
  content: "" !important;
  position: absolute !important;
  right: -110px !important;
  top: -120px !important;
  width: 310px !important;
  height: 310px !important;
  background: var(--orange) !important;
  clip-path: polygon(50% 0%, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0% 50%, 39% 38%) !important;
  transform: rotate(14deg) !important;
}

.finance-hero > *,
.mail-hero > *,
.translations-hero > *,
.users-hero > *,
.logs-hero > *,
.fxcfg-intro > * {
  position: relative;
  z-index: 1;
}

.finance-hero .eyebrow,
.mail-hero .eyebrow,
.translations-hero .eyebrow,
.users-hero .eyebrow,
.logs-hero .eyebrow,
.fxcfg-intro span {
  display: block;
  margin: 0 0 10px;
  color: rgba(255,255,255,.78) !important;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
}

.finance-hero h1,
.mail-hero h1,
.translations-hero h1,
.users-hero h1,
.logs-hero h1,
.fxcfg-intro h2 {
  max-width: 1060px !important;
  margin: 0 !important;
  color: var(--white) !important;
  font-family: var(--serif) !important;
  font-size: clamp(42px, 4.8vw, 72px) !important;
  line-height: .88 !important;
  letter-spacing: -.06em !important;
}

.finance-hero p:not(.eyebrow),
.mail-hero p:not(.eyebrow),
.translations-hero p:not(.eyebrow),
.users-hero p:not(.eyebrow),
.logs-hero p:not(.eyebrow) {
  max-width: 900px !important;
  margin: 16px 0 0 !important;
  color: rgba(255,255,255,.84) !important;
  font-size: clamp(18px, 1.6vw, 23px);
  line-height: 1.08 !important;
}

.panel-head h2,
.form-card h2,
.chart-box h2,
.mail-card h2,
.translations-panel h2,
.user-card h2,
.logs-card h2,
.fxcfg-card-header h2 {
  color: var(--blue-deep) !important;
  font-family: var(--sans);
  font-size: clamp(28px, 2.4vw, 36px) !important;
  line-height: .94 !important;
  letter-spacing: -.035em !important;
}

.panel-card,
.form-card,
.chart-box,
.mail-card,
.translations-panel,
.user-card,
.logs-card,
.fxcfg-card,
.finance-metric,
.user-metric,
.translations-stat {
  border: 1px solid var(--line) !important;
  background: var(--white) !important;
  box-shadow: 8px 8px 0 rgba(5, 0, 121, .06) !important;
}

.mail-button,
.mail-button-secondary,
.mail-small-button,
.mail-tab,
.translations-button,
.translations-tabs a,
.finance-actions a,
.user-actions a,
.user-actions button,
.logs-actions a,
.logs-actions button,
.fxcfg-btn,
.button {
  border-radius: 0 !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.mail-button-secondary,
.mail-tab,
.translations-tabs a,
.button.secondary,
.finance-actions a.secondary {
  background: var(--white) !important;
  color: var(--blue-deep) !important;
  border: 1px solid var(--line) !important;
}

.mail-tab.active,
.translations-tabs a.active,
.fxcfg-btn.secondary,
.mail-small-button,
.user-actions a,
.user-actions button,
.logs-actions a,
.logs-actions button {
  background: var(--blue-deep) !important;
  color: var(--white) !important;
  border-color: var(--blue-deep) !important;
}

.mail-button,
.translations-button,
.finance-actions a,
.logs-actions .orange,
.user-actions .warning,
.fxcfg-btn,
.button:not(.secondary) {
  background: var(--orange) !important;
  color: var(--white) !important;
  border-color: var(--orange) !important;
}

.public-head {
  background: var(--blue);
  color: var(--white);
  padding: 40px;
  margin-bottom: 22px;
}

.public-head h1 {
  color: var(--white);
}

.public-head p:last-child {
  max-width: 720px;
  font-size: 24px;
  line-height: 1.05;
  color: rgba(255,255,255,.82);
}

.form-card {
  padding: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 721px) {
  .login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 48px 18px 56px;
  }

  .login-shell {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    background: var(--white);
    box-shadow: 16px 16px 0 var(--blue-deep);
  }
}

@media (max-width: 720px) {
  .metrics-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .simple-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-body {
    min-height: 100svh;
    height: 100svh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top)) 18px calc(46px + env(safe-area-inset-bottom));
    background: var(--blue);
  }

  .login-shell {
    flex: 0 1 auto;
    width: 100%;
    max-width: 430px;
    min-height: 0;
    height: auto;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    row-gap: 14px;
    align-content: center;
    background: transparent;
    box-shadow: none;
  }

  .login-brand {
    min-height: 0;
    padding: 0;
    background: var(--blue);
    color: var(--white);
  }

  .login-brand-logo {
    width: 52px;
    height: 52px;
    margin-bottom: 5px;
  }

  .login-brand::after {
    display: none;
  }

  .login-brand .eyebrow {
    margin: 0 0 4px;
    font-size: 9px;
    line-height: 1;
    letter-spacing: .09em;
  }

  .login-brand h1 {
    font-size: clamp(44px, 15vw, 58px);
    line-height: .82;
  }

  .login-brand p:last-child {
    display: none;
  }

  .login-card {
    align-self: start;
    justify-self: center;
    width: 100%;
    max-width: 430px;
    min-height: 0;
    margin: 0 auto;
    padding: 20px 20px 22px;
    background: var(--white);
    color: var(--ink);
    border: 1px solid rgba(5, 7, 14, .12);
    box-shadow: 10px 10px 0 var(--blue-deep);
  }

  .login-card h2 {
    margin: 0 0 14px;
    color: var(--blue-deep);
    font-size: clamp(28px, 7.2vw, 34px);
    line-height: .92;
  }

  .login-card form {
    display: grid;
    gap: 6px;
  }

  .login-card label {
    margin-bottom: 0;
    color: var(--blue-deep);
    font-size: 10px;
    line-height: 1;
    letter-spacing: .12em;
  }

  .login-card input {
    min-height: 40px;
    margin-bottom: 2px;
    padding: 9px 12px;
    border: 1px solid rgba(5, 7, 14, .16);
    background: var(--paper);
  }

  .login-card button {
    width: 100%;
    min-height: 42px;
    margin-top: 5px;
  }

  .login-card .alert {
    margin-bottom: 12px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.2;
    background: rgba(186, 26, 26, .10);
    color: #BA1A1A;
  }

  .login-footer {
    bottom: max(12px, env(safe-area-inset-bottom));
    padding: 0 18px;
    color: rgba(255,255,255,.78);
    font-size: 9px;
    letter-spacing: .10em;
  }
}

@media (max-width: 380px), (max-height: 700px) {
  .login-body {
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: calc(36px + env(safe-area-inset-bottom));
  }

  .login-shell {
    row-gap: 10px;
  }

  .login-brand {
    padding-top: 0;
    padding-bottom: 0;
  }

  .login-brand-logo {
    width: 44px;
    height: 44px;
    margin-bottom: 3px;
  }

  .login-brand::after {
    display: none;
  }

  .login-brand .eyebrow {
    font-size: 8px;
  }

  .login-brand h1 {
    font-size: 42px;
  }

  .login-card {
    padding: 16px 16px 18px;
    box-shadow: 8px 8px 0 var(--blue-deep);
  }

  .login-card h2 {
    margin-bottom: 10px;
    font-size: 27px;
  }

  .login-card form {
    gap: 5px;
  }

  .login-card input {
    min-height: 38px;
    padding: 8px 10px;
  }

  .login-card button {
    min-height: 40px;
  }
}

.mobile-menu-button,
.mobile-menu-overlay,
.fluxus-mobile-appbar,
.fluxus-mobile-bottom-nav {
  display: none;
}

@media (max-width: 900px) {
  body {
    overflow-x: hidden;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding-top: calc(86px + env(safe-area-inset-top));
    padding-bottom: calc(106px + env(safe-area-inset-bottom));
  }

  .fluxus-mobile-appbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    height: calc(66px + env(safe-area-inset-top));
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 54px;
    align-items: center;
    gap: 8px;
    padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid rgba(5,7,14,.12);
    box-shadow: 0 10px 30px rgba(5,7,14,.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .fluxus-mobile-logo {
    justify-self: center;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
  }

  .fluxus-mobile-logo img {
    width: 46px;
    height: 46px;
    display: block;
    object-fit: cover;
  }

  .fluxus-mobile-icon-button {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(5,7,14,.14);
    background: var(--white);
    color: var(--blue-deep);
    box-shadow: 4px 4px 0 rgba(5,0,121,.08);
    cursor: pointer;
  }

  .fluxus-mobile-menu-trigger {
    justify-self: start;
    gap: 4px;
  }

  .fluxus-mobile-menu-trigger span {
    width: 22px;
    height: 2px;
    display: block;
    background: currentColor;
  }

  .fluxus-mobile-alert-button {
    justify-self: end;
    background: #FFF7ED;
    color: var(--orange);
    border: 2px solid var(--orange);
    position: relative;
    overflow: visible;
    box-shadow: 5px 5px 0 rgba(252,103,5,.18);
  }

  .fluxus-mobile-alert-button::after {
    display: none;
  }

  .fluxus-mobile-icon-button svg,
  .fluxus-mobile-bottom-nav svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: square;
    stroke-linejoin: miter;
  }

  .fluxus-mobile-alert-siren {
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 29px;
    line-height: 1;
    transform: translate(-50%, -47%);
    pointer-events: none;
  }

  .fluxus-mobile-bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 9998;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 72px;
    padding: 8px;
    background: rgba(255,255,255,.97);
    border: 1px solid rgba(5,7,14,.13);
    box-shadow: 0 14px 36px rgba(5,7,14,.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .fluxus-mobile-bottom-nav a {
    min-width: 0;
    min-height: 56px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    color: var(--muted);
    text-align: center;
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
  }

  .fluxus-mobile-bottom-nav a.active {
    color: var(--blue-deep);
    background: rgba(11,73,207,.08);
  }

  .fluxus-mobile-nav-icon {
    position: relative;
    display: grid;
    place-items: center;
  }

  .fluxus-mobile-nav-icon em {
    position: absolute;
    top: -8px;
    right: -14px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    background: #DC2626;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0;
  }

  .page-simple {
    width: 100%;
    max-width: 100%;
    margin: 16px auto 28px;
  }

  .topbar,
  .simple-head {
    gap: 14px;
  }

  .simple-head h1 {
    font-size: clamp(46px, 16vw, 68px);
    line-height: .84;
    overflow-wrap: anywhere;
  }

  .simple-head > div + div {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px !important;
  }

  .simple-head > div + div > .button,
  .simple-head > div + div > a,
  .simple-head > div + div > button {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    text-align: center;
    white-space: normal;
  }

  .simple-head > div + div > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .mobile-menu-button {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 10020;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: var(--blue-night);
    color: var(--white);
    padding: 11px 13px;
    font: inherit;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    box-shadow: 6px 6px 0 rgba(252,103,5,.22);
    cursor: pointer;
    display: none !important;
  }

  .mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--white);
    box-shadow: 0 6px 0 var(--white), 0 -6px 0 var(--white);
  }

  .mobile-menu-button span:nth-child(2),
  .mobile-menu-button span:nth-child(3) {
    display: none;
  }

  body.menu-open .mobile-menu-button {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: block;
    background: rgba(5,7,14,.56);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  body.menu-open .mobile-menu-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar,
  .admin-sidebar,
  aside.sidebar,
  aside.admin-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: min(82vw, 340px) !important;
    max-width: 340px !important;
    height: 100vh !important;
    min-height: 100vh !important;
    z-index: 10010 !important;
    transform: translateX(-105%) !important;
    transition: transform .24s ease !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: var(--blue-night) !important;
    box-shadow: 14px 0 35px rgba(0,0,0,.28) !important;
    padding-top: 22px !important;
  }

  body.menu-open .sidebar,
  body.menu-open .admin-sidebar,
  body.menu-open aside.sidebar,
  body.menu-open aside.admin-sidebar {
    transform: translateX(0) !important;
  }

  .sidebar a,
  .admin-sidebar a,
  aside.sidebar a,
  aside.admin-sidebar a {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 48px !important;
    padding: 14px 22px !important;
    color: var(--white) !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255,255,255,.12) !important;
    font-size: 16px !important;
    line-height: 1.1 !important;
    white-space: normal !important;
  }

  .sidebar a:hover,
  .admin-sidebar a:hover,
  aside.sidebar a:hover,
  aside.admin-sidebar a:hover {
    background: rgba(252,103,5,.22) !important;
  }

  body.menu-open {
    overflow: hidden;
  }
}

@media (max-width: 520px) {
  .main-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .simple-head > div + div {
    grid-template-columns: 1fr;
  }

  .simple-head > div + div > :last-child:nth-child(odd) {
    grid-column: auto;
  }
}

body.modo-impressao .mobile-menu-button,
body.modo-impressao .mobile-menu-overlay,
body.modo-impressao .fluxus-mobile-appbar,
body.modo-impressao .fluxus-mobile-bottom-nav,
body.modo-impressao .sidebar {
  display: none !important;
}

body.modo-impressao .app-layout {
  display: block !important;
}


/* Correção responsiva global: evita largura fantasma no mobile */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.app-layout,
.main-content,
.page-simple,
.topbar,
.simple-head,
.panel-card,
.form-card,
.hero-panel {
  min-width: 0;
  max-width: 100%;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

button,
.button {
  max-width: 100%;
  min-width: 0;
  text-align: center;
  white-space: normal;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
  .main-content {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow-x: hidden;
    padding: 72px 18px 28px;
  }

  .page-simple {
    width: 100%;
    max-width: 100%;
    margin: 16px 0 28px;
  }

  .topbar,
  .simple-head {
    width: 100%;
    max-width: 100%;
  }

  .simple-head > div:first-child,
  .topbar > div:first-child {
    width: 100%;
    min-width: 0;
  }

  .breadcrumb {
    max-width: 100%;
    font-size: 18px;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  h1,
  .simple-head h1 {
    max-width: 100%;
    font-size: clamp(38px, 11vw, 50px);
    line-height: .9;
    letter-spacing: -.05em;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .hero-panel {
    padding: 26px 22px;
  }

  .hero-panel h2 {
    max-width: 100%;
    font-size: clamp(36px, 12vw, 50px);
    line-height: .9;
    letter-spacing: -.05em;
    overflow-wrap: anywhere;
  }

  .hero-panel p {
    max-width: 100%;
    font-size: 20px;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  .simple-head > div + div,
  .topbar > div + div {
    width: 100%;
    min-width: 0;
  }

  .simple-head > div + div > .button,
  .simple-head > div + div > a,
  .simple-head > div + div > button,
  .topbar > div + div > .button,
  .topbar > div + div > a,
  .topbar > div + div > button {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 520px) {
  .main-content {
    padding: 74px 14px 26px;
  }

  .breadcrumb {
    font-size: 16px;
  }

  h1,
  .simple-head h1 {
    font-size: clamp(34px, 10.5vw, 42px);
    line-height: .92;
    letter-spacing: -.045em;
  }

  .simple-head > div + div,
  .topbar > div + div {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .simple-head > div + div > *,
  .topbar > div + div > * {
    width: 100% !important;
  }

  .hero-panel {
    padding: 24px 18px;
  }

  .hero-panel h2 {
    font-size: clamp(34px, 11vw, 44px);
  }

  .hero-panel p {
    font-size: 18px;
  }
}

/* Correção: rolagem real do menu lateral em iPhone/Safari */
@media (max-width: 900px) {
  body.menu-open {
    overflow: hidden !important;
    height: 100%;
  }

  body.menu-open .mobile-menu-overlay {
    touch-action: none;
  }

  body.menu-open .sidebar,
  body.menu-open .admin-sidebar,
  body.menu-open aside.sidebar,
  body.menu-open aside.admin-sidebar {
    top: 0 !important;
    bottom: auto !important;
    height: var(--fluxus-menu-height, 100dvh) !important;
    max-height: var(--fluxus-menu-height, 100dvh) !important;
    min-height: 0 !important;
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    box-sizing: border-box !important;
    padding-bottom: max(128px, calc(env(safe-area-inset-bottom) + 116px)) !important;
  }

  body.menu-open .side-nav {
    padding-bottom: 48px !important;
  }
}

@supports not (height: 100dvh) {
  @media (max-width: 900px) {
    body.menu-open .sidebar,
    body.menu-open .admin-sidebar,
    body.menu-open aside.sidebar,
    body.menu-open aside.admin-sidebar {
      height: var(--fluxus-menu-height, 100vh) !important;
      max-height: var(--fluxus-menu-height, 100vh) !important;
    }
  }
}

/* Correção do cabeçalho do menu lateral no mobile */
@media (max-width: 900px) {
  .sidebar .brand,
  .admin-sidebar .brand,
  aside.sidebar .brand,
  aside.admin-sidebar .brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    min-height: auto !important;
    padding: 14px 8px 18px !important;
    margin: 0 0 18px !important;
    border-bottom: 1px solid rgba(255,255,255,.16) !important;
    color: var(--white) !important;
    overflow: hidden !important;
  }

  .sidebar .brand .brand-mark-img.clean-logo,
  .admin-sidebar .brand .brand-mark-img.clean-logo,
  aside.sidebar .brand .brand-mark-img.clean-logo,
  aside.admin-sidebar .brand .brand-mark-img.clean-logo {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    object-fit: cover !important;
  }

  .sidebar .brand > div,
  .admin-sidebar .brand > div,
  aside.sidebar .brand > div,
  aside.admin-sidebar .brand > div {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .sidebar .brand strong,
  .admin-sidebar .brand strong,
  aside.sidebar .brand strong,
  aside.admin-sidebar .brand strong {
    display: block !important;
    font-size: 24px !important;
    line-height: .92 !important;
    letter-spacing: .01em !important;
    white-space: normal !important;
  }

  .sidebar .brand small,
  .admin-sidebar .brand small,
  aside.sidebar .brand small,
  aside.admin-sidebar .brand small {
    display: block !important;
    margin-top: 5px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    letter-spacing: .12em !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
}

@media (max-width: 420px) {
  .sidebar,
  .admin-sidebar,
  aside.sidebar,
  aside.admin-sidebar {
    width: min(88vw, 320px) !important;
  }

  .sidebar .brand .brand-mark-img.clean-logo,
  .admin-sidebar .brand .brand-mark-img.clean-logo,
  aside.sidebar .brand .brand-mark-img.clean-logo,
  aside.admin-sidebar .brand .brand-mark-img.clean-logo {
    width: 52px !important;
    height: 52px !important;
    flex-basis: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
  }

  .sidebar .brand strong,
  .admin-sidebar .brand strong,
  aside.sidebar .brand strong,
  aside.admin-sidebar .brand strong {
    font-size: 22px !important;
  }
}

/* Ajuste final da marca no menu mobile: não deixar o link geral do menu deformar o logo */
@media (max-width: 900px) {
  .sidebar a.brand,
  .admin-sidebar a.brand,
  aside.sidebar a.brand,
  aside.admin-sidebar a.brand {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 64px !important;
    height: auto !important;
    padding: 8px 12px 14px !important;
    margin: 0 0 18px !important;
    color: var(--white) !important;
    text-decoration: none !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.14) !important;
    outline: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .sidebar a.brand:hover,
  .sidebar a.brand:focus,
  .sidebar a.brand:focus-visible,
  .admin-sidebar a.brand:hover,
  .admin-sidebar a.brand:focus,
  .admin-sidebar a.brand:focus-visible,
  aside.sidebar a.brand:hover,
  aside.sidebar a.brand:focus,
  aside.sidebar a.brand:focus-visible,
  aside.admin-sidebar a.brand:hover,
  aside.admin-sidebar a.brand:focus,
  aside.admin-sidebar a.brand:focus-visible {
    background: transparent !important;
    outline: 0 !important;
    box-shadow: none !important;
  }

  .sidebar a.brand img,
  .sidebar a.brand .brand-mark-img,
  .sidebar a.brand .brand-mark-img.clean-logo,
  .admin-sidebar a.brand img,
  .admin-sidebar a.brand .brand-mark-img,
  .admin-sidebar a.brand .brand-mark-img.clean-logo,
  aside.sidebar a.brand img,
  aside.sidebar a.brand .brand-mark-img,
  aside.sidebar a.brand .brand-mark-img.clean-logo,
  aside.admin-sidebar a.brand img,
  aside.admin-sidebar a.brand .brand-mark-img,
  aside.admin-sidebar a.brand .brand-mark-img.clean-logo {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    flex: 0 0 46px !important;
    object-fit: cover !important;
    display: block !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .sidebar a.brand > div,
  .admin-sidebar a.brand > div,
  aside.sidebar a.brand > div,
  aside.admin-sidebar a.brand > div {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    display: block !important;
    overflow: visible !important;
    padding-top: 1px !important;
  }

  .sidebar a.brand strong,
  .admin-sidebar a.brand strong,
  aside.sidebar a.brand strong,
  aside.admin-sidebar a.brand strong {
    display: block !important;
    font-size: 20px !important;
    line-height: 1 !important;
    letter-spacing: .02em !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }

  .sidebar a.brand small,
  .admin-sidebar a.brand small,
  aside.sidebar a.brand small,
  aside.admin-sidebar a.brand small {
    display: block !important;
    margin-top: 4px !important;
    font-size: 8px !important;
    line-height: 1.15 !important;
    letter-spacing: .12em !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }
}

@media (max-width: 420px) {
  .sidebar a.brand img,
  .sidebar a.brand .brand-mark-img,
  .sidebar a.brand .brand-mark-img.clean-logo,
  .admin-sidebar a.brand img,
  .admin-sidebar a.brand .brand-mark-img,
  .admin-sidebar a.brand .brand-mark-img.clean-logo,
  aside.sidebar a.brand img,
  aside.sidebar a.brand .brand-mark-img,
  aside.sidebar a.brand .brand-mark-img.clean-logo,
  aside.admin-sidebar a.brand img,
  aside.admin-sidebar a.brand .brand-mark-img,
  aside.admin-sidebar a.brand .brand-mark-img.clean-logo {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    flex-basis: 42px !important;
  }

  .sidebar a.brand strong,
  .admin-sidebar a.brand strong,
  aside.sidebar a.brand strong,
  aside.admin-sidebar a.brand strong {
    font-size: 18px !important;
  }

  .sidebar a.brand small,
  .admin-sidebar a.brand small,
  aside.sidebar a.brand small,
  aside.admin-sidebar a.brand small {
    font-size: 7.5px !important;
  }
}


.fx-checkbox-line {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: fit-content;
  max-width: 100%;
}

.fx-checkbox-line input[type="checkbox"],
.fx-checkbox-line input[type="radio"] {
  width: auto !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}



/* FLUXUS fix: espaçamento uniforme entre divisor e opções de seleção */
.fx-checkbox-divider {
  margin: 10px 0 12px !important;
}

.fx-checkbox-line {
  margin-top: 0 !important;
  margin-bottom: 12px !important;
  line-height: 1.15;
}

.fx-checkbox-line + .fx-checkbox-line {
  margin-top: 0 !important;
}



/* FLUXUS fix: divisor centralizado entre campos e seções de seleção */
.fx-field-before-divider {
  margin-bottom: 0 !important;
}

.fx-checkbox-divider {
  display: block;
  height: 0;
  border: 0 !important;
  border-top: 1px solid rgba(5,7,14,.13) !important;
  margin: 18px 0 !important;
}

.fx-checkbox-divider + .fx-checkbox-line {
  margin-top: 0 !important;
}

/* FLUXUS fix: alinhamento global de formulários de filtro em grid.
   O CSS base define input/select/textarea com margin-bottom:16px; em filtros,
   isso desalinha o botão Aplicar/Filtrar em relação aos selects. */
.filter-form input,
.filter-form select,
.filter-form textarea,
.filters form input,
.filters form select,
.filters form textarea,
.prof-filter input,
.prof-filter select,
.prof-filter textarea,
.gts-filter-form input,
.gts-filter-form select,
.gts-filter-form textarea,
.filter-bar form input,
.filter-bar form select,
.filter-bar form textarea {
  margin-bottom: 0 !important;
}

.filter-form button,
.filter-form .button,
.filters form button,
.filters form .button,
.prof-filter button,
.prof-filter .button,
.gts-filter-form button,
.gts-filter-form .button,
.filter-bar form button,
.filter-bar form .button {
  align-self: end;
  margin-bottom: 0 !important;
}

.filter-form > button,
.filters form > button,
.prof-filter > button,
.gts-filter-form > button {
  min-height: 54px;
}


/* FLUXUS fix global: alinhamento de botões em filtros dentro de painéis.
   Cobre filtros com .filter-form e também formulários GET em .panel-body
   que usam grid inline, como criterios_avaliacao.php. */
.panel-card .panel-body form[method="get"] input:not([type="checkbox"]):not([type="radio"]),
.panel-card .panel-body form[method="get"] select,
.panel-card .panel-body form[method="get"] textarea,
.panel-card .panel-body form[method="GET"] input:not([type="checkbox"]):not([type="radio"]),
.panel-card .panel-body form[method="GET"] select,
.panel-card .panel-body form[method="GET"] textarea {
  margin-bottom: 0 !important;
}

.panel-card .panel-body form[method="get"] > button,
.panel-card .panel-body form[method="get"] > .button,
.panel-card .panel-body form[method="GET"] > button,
.panel-card .panel-body form[method="GET"] > .button {
  align-self: end !important;
  min-height: 54px;
  margin: 0 !important;
}

@media (max-width: 900px) {
  .panel-card .panel-body form[method="get"] > button,
  .panel-card .panel-body form[method="get"] > .button,
  .panel-card .panel-body form[method="GET"] > button,
  .panel-card .panel-body form[method="GET"] > .button {
    width: 100%;
  }
}



/* FLUXUS global: quando houver muitos botões de ação no cabeçalho mobile,
   organiza automaticamente em grid compacto de 2 colunas.
   Aplica-se a grupos de ações com 3 ou mais itens em .simple-head e .topbar. */
@media (max-width: 520px) {
  .simple-head > div + div:has(> :nth-child(3)),
  .topbar > div + div:has(> :nth-child(3)),
  .fluxus-actions-grid,
  .fx-actions-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    align-items: stretch !important;
  }

  .simple-head > div + div:has(> :nth-child(3)) > *,
  .topbar > div + div:has(> :nth-child(3)) > *,
  .fluxus-actions-grid > *,
  .fx-actions-grid > * {
    width: 100% !important;
    min-width: 0 !important;
  }

  .simple-head > div + div:has(> :nth-child(3)) > .button,
  .simple-head > div + div:has(> :nth-child(3)) > a,
  .simple-head > div + div:has(> :nth-child(3)) > button,
  .topbar > div + div:has(> :nth-child(3)) > .button,
  .topbar > div + div:has(> :nth-child(3)) > a,
  .topbar > div + div:has(> :nth-child(3)) > button,
  .fluxus-actions-grid > .button,
  .fluxus-actions-grid > a,
  .fluxus-actions-grid > button,
  .fx-actions-grid > .button,
  .fx-actions-grid > a,
  .fx-actions-grid > button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 46px !important;
    padding: 12px 10px !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .simple-head > div + div:has(> :nth-child(3)) > :last-child:nth-child(odd),
  .topbar > div + div:has(> :nth-child(3)) > :last-child:nth-child(odd),
  .fluxus-actions-grid > :last-child:nth-child(odd),
  .fx-actions-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
  }
}



/* FLUXUS global: grid compacto de métricas no mobile.
   Use a classe .fluxus-mobile-metrics-grid ou .fx-mobile-metrics-grid
   em qualquer grupo de cards numéricos.
   4 cards: 2x2.
   5 cards: 3 na primeira linha e 2 na segunda.
   6 cards: 3x2. */
@media (max-width: 620px) {
  .fluxus-mobile-metrics-grid,
  .fx-mobile-metrics-grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .fluxus-mobile-metrics-grid > *,
  .fx-mobile-metrics-grid > * {
    grid-column: span 3 !important;
    min-width: 0 !important;
  }

  .fluxus-mobile-metrics-grid:has(> :nth-child(3):last-child) > *,
  .fx-mobile-metrics-grid:has(> :nth-child(3):last-child) > *,
  .fluxus-mobile-metrics-grid:has(> :nth-child(6):last-child) > *,
  .fx-mobile-metrics-grid:has(> :nth-child(6):last-child) > * {
    grid-column: span 2 !important;
  }

  .fluxus-mobile-metrics-grid:has(> :nth-child(5):last-child) > *,
  .fx-mobile-metrics-grid:has(> :nth-child(5):last-child) > * {
    grid-column: span 2 !important;
  }

  .fluxus-mobile-metrics-grid:has(> :nth-child(5):last-child) > :nth-child(n+4),
  .fx-mobile-metrics-grid:has(> :nth-child(5):last-child) > :nth-child(n+4) {
    grid-column: span 3 !important;
  }

  .fluxus-mobile-metrics-grid > *:last-child:nth-child(odd):not(:nth-child(3)):not(:nth-child(5)),
  .fx-mobile-metrics-grid > *:last-child:nth-child(odd):not(:nth-child(3)):not(:nth-child(5)) {
    grid-column: 1 / -1 !important;
  }

  .fluxus-mobile-metrics-grid span,
  .fx-mobile-metrics-grid span {
    font-size: 10px !important;
    line-height: 1.05 !important;
  }

  .fluxus-mobile-metrics-grid strong,
  .fx-mobile-metrics-grid strong {
    margin-top: 9px !important;
    font-size: 34px !important;
  }
}



/* FLUXUS global: normalização do interlineado dos títulos e textos institucionais.
   Objetivo: manter a mesma compactação visual das caixas hero, como na Central Técnica de Chamados. */
:root {
  --fluxus-leading-title: .90;
  --fluxus-leading-title-mobile: .94;
  --fluxus-leading-subtitle: 1.08;
  --fluxus-leading-card-title: .92;
  --fluxus-leading-body: 1.14;
  --fluxus-hero-title-size: clamp(42px, 4.8vw, 72px);
  --fluxus-hero-title-size-mobile: clamp(34px, 10.5vw, 42px);
  --fluxus-hero-subtitle-size: 22px;
  --fluxus-hero-subtitle-size-mobile: 18px;
  --fluxus-head-title-size: clamp(46px, 5.2vw, 76px);
  --fluxus-head-title-size-mobile: clamp(30px, 9vw, 40px);
}

/* Cabeçalhos administrativos simples */
.simple-head h1,
.topbar h1,
.fxcfg-head h1 {
  font-size: var(--fluxus-head-title-size) !important;
  line-height: .88 !important;
  letter-spacing: -.06em !important;
}

/* Títulos principais de heros/faixas azuis */
[class*="-hero"] h1,
[class*="-hero"] h2,
[class^="hero-"] h1,
[class^="hero-"] h2,
[class*=" hero-"] h1,
[class*=" hero-"] h2,
[class*="_hero"] h1,
[class*="_hero"] h2,
.hero h1,
.hero h2,
.hero-panel h1,
.hero-panel h2,
.registration-hero h1,
.submission-hero h1,
.admin-review-hero h1,
.users-hero h1,
.finance-hero h1,
.support-admin-hero h1,
.types-hero h1,
.caderno-dashboard-hero h1,
.participant-hero h2 {
  font-size: var(--fluxus-hero-title-size) !important;
  line-height: var(--fluxus-leading-title) !important;
  letter-spacing: -.06em !important;
}

/* Etiquetas/kickers acima dos títulos dos heros */
[class*="-hero"] .eyebrow,
[class^="hero-"] .eyebrow,
[class*=" hero-"] .eyebrow,
[class*="_hero"] .eyebrow,
.hero .eyebrow,
.hero-panel .eyebrow {
  display: block !important;
  margin: 0 0 10px !important;
  color: rgba(255,255,255,.82) !important;
  font-size: 13px !important;
  line-height: 1 !important;
  letter-spacing: .12em !important;
}

/* Textos de apoio dentro das faixas azuis / heros */
[class*="-hero"] p:not(.eyebrow),
[class^="hero-"] p:not(.eyebrow),
[class*=" hero-"] p:not(.eyebrow),
[class*="_hero"] p:not(.eyebrow),
.hero p:not(.eyebrow),
.hero-panel p:not(.eyebrow),
.registration-hero p:not(.eyebrow),
.submission-hero p:not(.eyebrow),
.admin-review-hero p:not(.eyebrow),
.users-hero p:not(.eyebrow),
.finance-hero p:not(.eyebrow),
.support-admin-hero p:not(.eyebrow),
.types-hero p:not(.eyebrow),
.caderno-dashboard-hero p:not(.eyebrow),
.participant-hero p:not(.eyebrow) {
  font-size: var(--fluxus-hero-subtitle-size) !important;
  line-height: var(--fluxus-leading-subtitle) !important;
}

/* Títulos de cards, painéis e caixas internas */
.panel-head h2,
.panel-head h3,
.card-head h2,
.card-head h3,
.form-card h2,
.form-card h3,
.panel-card h2,
.panel-card h3,
.prof-card h2,
.prof-card h3,
.user-card h2,
.user-card h3,
.type-card h2,
.type-card h3,
.evaluation-card h2,
.evaluation-card h3,
.registration-card h2,
.registration-card h3,
.cad-card h2,
.cad-card h3,
.gts-card h2,
.gts-card h3,
.task-card h2,
.task-card h3,
.support-ticket h2,
.support-ticket h3,
.activity-card h2,
.activity-card h3,
.event-card h2,
.event-card h3,
.submission-card h2,
.submission-card h3,
.cert-card h2,
.cert-card h3,
.pending-card h2,
.pending-card h3,
.profile-card h2,
.profile-card h3,
.kpi-card h2,
.kpi-card h3,
[class*="-card"] h2,
[class*="-card"] h3,
[class*="_card"] h2,
[class*="_card"] h3,
h2 {
  line-height: var(--fluxus-leading-card-title) !important;
}

.metric-card strong,
.kpi-card strong,
.support-metric strong,
.user-metric strong,
[class*="-metric"] strong,
[class*="_metric"] strong {
  line-height: var(--fluxus-leading-card-title) !important;
}

/* Parágrafos de caixas internas */
.panel-card p,
.form-card p,
.card p,
.notice p,
.material p,
.user-card p,
.type-card p,
.registration-card p,
.evaluation-card p,
.activity-card p,
.event-card p,
.submission-card p,
.cert-card p,
.pending-card p,
.profile-card p,
.support-ticket p,
[class*="-card"] p,
[class*="_card"] p {
  line-height: var(--fluxus-leading-body) !important;
}

@media (max-width: 720px) {
  .simple-head h1,
  .topbar h1,
  .fxcfg-head h1 {
    font-size: var(--fluxus-head-title-size-mobile) !important;
    line-height: .98 !important;
    letter-spacing: -.035em !important;
  }

  [class*="-hero"] h1,
  [class*="-hero"] h2,
  [class^="hero-"] h1,
  [class^="hero-"] h2,
  [class*=" hero-"] h1,
  [class*=" hero-"] h2,
  [class*="_hero"] h1,
  [class*="_hero"] h2,
  .hero h1,
  .hero h2,
  .hero-panel h1,
  .hero-panel h2,
  .registration-hero h1,
  .submission-hero h1,
  .admin-review-hero h1,
  .users-hero h1,
  .finance-hero h1,
  .support-admin-hero h1,
  .types-hero h1,
  .caderno-dashboard-hero h1,
  .participant-hero h2 {
    font-size: var(--fluxus-hero-title-size-mobile) !important;
    line-height: var(--fluxus-leading-title-mobile) !important;
  }

  [class*="-hero"] .eyebrow,
  [class^="hero-"] .eyebrow,
  [class*=" hero-"] .eyebrow,
  [class*="_hero"] .eyebrow,
  .hero .eyebrow,
  .hero-panel .eyebrow {
    margin-bottom: 8px !important;
    font-size: 12px !important;
    line-height: 1.05 !important;
  }

  [class*="-hero"] p:not(.eyebrow),
  [class^="hero-"] p:not(.eyebrow),
  [class*=" hero-"] p:not(.eyebrow),
  [class*="_hero"] p:not(.eyebrow),
  .hero p:not(.eyebrow),
  .hero-panel p:not(.eyebrow),
  .registration-hero p:not(.eyebrow),
  .submission-hero p:not(.eyebrow),
  .admin-review-hero p:not(.eyebrow),
  .users-hero p:not(.eyebrow),
  .finance-hero p:not(.eyebrow),
  .support-admin-hero p:not(.eyebrow),
  .types-hero p:not(.eyebrow),
  .caderno-dashboard-hero p:not(.eyebrow),
  .participant-hero p:not(.eyebrow) {
    font-size: var(--fluxus-hero-subtitle-size-mobile) !important;
    line-height: 1.10 !important;
  }

  .panel-head h2,
  .panel-head h3,
  .card-head h2,
  .card-head h3,
  .form-card h2,
  .form-card h3,
  .panel-card h2,
  .panel-card h3,
  .prof-card h2,
  .prof-card h3,
  .user-card h2,
  .user-card h3,
  .type-card h2,
  .type-card h3,
  .evaluation-card h2,
  .evaluation-card h3,
  .registration-card h2,
  .registration-card h3,
  .cad-card h2,
  .cad-card h3,
  .gts-card h2,
  .gts-card h3,
  .task-card h2,
  .task-card h3,
  .support-ticket h2,
  .support-ticket h3,
  .activity-card h2,
  .activity-card h3,
  .event-card h2,
  .event-card h3,
  .submission-card h2,
  .submission-card h3,
  .cert-card h2,
  .cert-card h3,
  .pending-card h2,
  .pending-card h3,
  .profile-card h2,
  .profile-card h3,
  .kpi-card h2,
  .kpi-card h3,
  [class*="-card"] h2,
  [class*="-card"] h3,
  [class*="_card"] h2,
  [class*="_card"] h3,
  h2 {
    line-height: .94 !important;
  }

  .panel-card p,
  .form-card p,
  .card p,
  .notice p,
  .material p,
  .user-card p,
  .type-card p,
  .registration-card p,
  .evaluation-card p,
  .activity-card p,
  .event-card p,
  .submission-card p,
  .cert-card p,
  .pending-card p,
  .profile-card p,
  .support-ticket p,
  [class*="-card"] p,
  [class*="_card"] p {
    line-height: 1.16 !important;
  }
}


/* FLUXUS · correção mobile para evitar espaços verticais fantasmas em páginas internas */
@media (max-width: 760px) {
  .main-content,
  .page-simple,
  .dashboard-page,
  .support-page,
  .support-admin-page,
  .page-simple > main,
  .page-simple > section {
    min-height: 0 !important;
  }

  .support-admin-hero,
  .support-hero,
  .hero-panel,
  [class*="support"][class*="hero"] {
    min-height: 0 !important;
  }

  .simple-head,
  .topbar {
    margin-bottom: 18px !important;
  }
}


/* FLUXUS · correção mobile do espaço fantasma no cabeçalho
   Quando .topbar/.simple-head vira coluna, o flex-basis: 460px do desktop
   passava a atuar como altura. Isso criava o grande vazio antes do user-pill/cards. */
@media (max-width: 900px) {
  .topbar,
  .simple-head {
    justify-content: flex-start !important;
    align-content: flex-start !important;
  }

  .topbar > div:first-child,
  .simple-head > div:first-child {
    flex: 0 1 auto !important;
    flex-basis: auto !important;
    min-height: 0 !important;
  }

  .topbar > div + div,
  .simple-head > div + div {
    flex: 0 1 auto !important;
    flex-basis: auto !important;
    min-height: 0 !important;
  }

  .user-pill {
    width: 100%;
    min-height: 0 !important;
    margin-top: 0 !important;
  }
}




/* FLUXUS · modo demonstração somente leitura */
.fluxus-demo-banner {
  position: sticky;
  top: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 18px;
  background: #FC6705;
  color: #fff;
  border-bottom: 1px solid rgba(5,7,14,.18);
  font-family: "IBM Plex Sans Condensed", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 6px 0 rgba(5,0,121,.10);
}

.fluxus-demo-banner strong {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.fluxus-demo-banner span {
  font-weight: 800;
}

@media (max-width: 760px) {
  .fluxus-demo-banner {
    position: relative;
    z-index: 20;
    display: grid;
    gap: 3px;
    padding: 9px 56px 9px 12px;
    text-align: left;
    font-size: 12px;
  }
}
