/* Os dois temas definem fundo, texto e controles juntos. */
a:link,
a:visited {
  color: var(--link-fg);
}
#header {
  height: auto !important;
  flex-shrink: 0;
}
select {
  height: auto !important;
  min-height: 42px;
}
input[type="number"],
.vIntegerField,
.vPositiveIntegerField {
  width: 120px;
  min-width: 100px;
}
.aligned .form-row > div {
  min-width: 0;
}
#app-sidebar {
  flex: 0 0 246px;
  width: 246px;
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow: auto;
  align-self: flex-start;
  background: var(--surface);
  border-right: 1px solid var(--hairline-color);
}
#app-sidebar[hidden] {
  display: none;
}
#app-nav-search {
  width: 100%;
  margin-bottom: 8px;
  font-size: 12px;
}
#app-nav-toggle {
  flex: 0 0 26px;
  width: 26px;
  min-height: 42px;
  padding: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--link-fg);
  align-self: flex-start;
  position: sticky;
  top: 12px;
}
.main > .content {
  flex: 1;
  max-width: 100%;
}
@media (max-width: 767px) {
  #app-sidebar,
  #app-nav-toggle {
    display: none;
  }
}
:root,
html[data-theme="light"] {
  color-scheme: light;
  --primary: #087f83;
  --secondary: #17354d;
  --accent: #e97525;
  --body-bg: #f3f6f8;
  --body-fg: #203548;
  --body-quiet-color: #536779;
  --body-medium-color: #405668;
  --body-loud-color: #102c42;
  --surface: #fff;
  --darkened-bg: #edf2f5;
  --hairline-color: #dce5eb;
  --border-color: #c6d4de;
  --link-fg: #076e73;
  --link-hover-color: #054e52;
  --link-selected-fg: #075d62;
  --selected-bg: #e8f5f2;
  --selected-row: #e8f5f2;
  --header-bg: #133249;
  --header-color: #fff;
  --header-link-color: #fff;
  --breadcrumbs-bg: #fff;
  --breadcrumbs-fg: #536779;
  --breadcrumbs-link-fg: #076e73;
  --button-bg: #087b7f;
  --button-fg: #fff;
  --button-hover-bg: #066367;
  --default-button-bg: #087b7f;
  --default-button-hover-bg: #066367;
  --object-tools-bg: #087b7f;
  --object-tools-hover-bg: #066367;
  --error-fg: #b32d3a;
  --message-error-bg: #ffedf0;
  --message-success-bg: #e7f4ed;
  --message-warning-bg: #fff3d7;
  --input-bg: #fff;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --primary: #5ed2cc;
  --accent: #ffad70;
  --body-bg: #101c28;
  --body-fg: #dce8f1;
  --body-quiet-color: #afc2d1;
  --body-medium-color: #bdcedc;
  --body-loud-color: #f2f7fb;
  --surface: #182a3a;
  --darkened-bg: #203749;
  --hairline-color: #344c60;
  --border-color: #526b80;
  --link-fg: #72d9d3;
  --link-hover-color: #a2f0ec;
  --link-selected-fg: #a2f0ec;
  --selected-bg: #214440;
  --selected-row: #214440;
  --breadcrumbs-bg: #182a3a;
  --breadcrumbs-fg: #afc2d1;
  --breadcrumbs-link-fg: #72d9d3;
  --error-fg: #ffb6bd;
  --message-error-bg: #4d2631;
  --message-success-bg: #214139;
  --message-warning-bg: #483c23;
  --input-bg: #102334;
}
* {
  box-sizing: border-box;
}
body {
  font-family:
    Inter,
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 14px;
  line-height: 1.55;
  background: var(--body-bg);
  color: var(--body-fg);
}
a {
  text-underline-offset: 3px;
}
a:hover {
  text-decoration: underline;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
button,
input,
select,
textarea {
  font: inherit;
}
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not(
    [type="submit"]
  ),
select,
textarea {
  background: var(--input-bg);
  color: var(--body-fg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  max-width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: var(--body-quiet-color);
  opacity: 1;
}
button,
.button,
a.button,
input[type="submit"],
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  background: var(--button-bg);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
}
button:hover,
.button:hover,
a.button:hover,
input[type="submit"]:hover,
.btn:hover {
  background: var(--button-hover-bg);
  color: #fff;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
.btn-secondary,
.btn-link {
  background: var(--surface);
  color: var(--link-fg);
  border-color: var(--border-color);
}
.btn-secondary:hover,
.btn-link:hover {
  background: var(--darkened-bg);
  color: var(--link-fg);
}
h1,
h2,
h3 {
  color: var(--body-loud-color);
  letter-spacing: -0.025em;
}
h1 {
  font-size: 28px;
  font-weight: 750;
  margin: 0 0 24px;
  line-height: 1.25;
}
#header {
  min-height: 80px;
  padding: 18px 32px;
  border-bottom: 3px solid #e97525;
  gap: 20px;
}
.inovab-brand {
  display: inline-block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1px;
  text-decoration: none !important;
  color: #fff !important;
  line-height: 1.15;
}
.inovab-brand span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  display: block;
  margin-top: 5px;
  color: #c7dce8;
}
#user-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  flex-wrap: wrap;
}
#user-tools a,
#logout-form button {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}
#logout-form button {
  min-height: auto;
  padding: 4px;
  background: none;
  border: none;
  display: inline;
  color: #fff;
  font-weight: 500;
}
.theme-toggle {
  padding: 6px;
  min-height: 32px;
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  opacity: 0.9;
}
div.breadcrumbs {
  padding: 14px 32px;
  border-bottom: 1px solid var(--hairline-color);
  font-size: 12px;
}
#content {
  padding: 32px;
  max-width: 1500px;
  min-width: 0;
}
#content-main {
  width: 100%;
  min-width: 0;
}
.main > .content {
  min-width: 0;
}
#nav-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--hairline-color);
  flex: 0 0 246px;
  width: 246px;
}
.inovab-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 14px;
}
.nav-caption {
  padding: 4px 12px 10px;
  color: var(--body-quiet-color);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.inovab-nav a {
  padding: 10px 12px;
  border-radius: 7px;
  font-weight: 550;
  font-size: 13px;
  color: var(--body-fg);
  line-height: 1.4;
  text-decoration: none;
}
.inovab-nav a:hover {
  background: var(--darkened-bg);
}
.inovab-nav a[aria-current="page"] {
  background: var(--selected-bg);
  color: var(--link-selected-fg);
  font-weight: 750;
  border-left: 3px solid var(--primary);
}
#toggle-nav-sidebar {
  min-height: 44px;
  min-width: 24px;
  padding: 0;
  background: var(--surface);
  color: var(--link-fg);
  border-radius: 0;
  border-right: 1px solid var(--hairline-color);
}
.environment {
  border: 1px solid var(--hairline-color);
  border-left: 3px solid #e97525;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 8px;
  color: var(--body-quiet-color);
  font-size: 13px;
}
.page-intro {
  margin-bottom: 26px;
  max-width: 700px;
  color: var(--body-quiet-color);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--link-fg);
  margin: 0 0 10px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.metrics article {
  padding: 22px;
  border: 1px solid var(--hairline-color);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 3px 12px #12324a04;
}
.metrics article span {
  display: block;
  color: var(--body-quiet-color);
  font-size: 12px;
}
.metrics article strong {
  display: block;
  font-size: 34px;
  padding-top: 12px;
  color: var(--body-loud-color);
  letter-spacing: -0.04em;
}
.quick-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0 28px;
}
.operations-copy {
  padding: 12px 22px;
  line-height: 1.65;
}
.operations-evidence {
  max-width: 40rem;
  overflow-wrap: anywhere;
}
.metrics article strong.metric-date {
  font-size: 20px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.panel-section {
  margin: 24px 0;
  border: 1px solid var(--hairline-color);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--hairline-color);
}
.section-heading h2 {
  font-size: 17px;
  margin: 0;
  font-weight: 700;
}
.section-heading a {
  font-size: 12px;
  font-weight: 650;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  background: var(--surface);
}
table th,
table td {
  padding: 13px 18px;
  vertical-align: middle;
  color: var(--body-fg);
  border-bottom: 1px solid var(--hairline-color);
  font-size: 13px;
}
thead th {
  font-size: 11px;
  letter-spacing: 0.035em;
  color: var(--body-quiet-color);
  background: var(--darkened-bg);
  font-weight: 700;
}
tr:nth-child(odd),
tr:nth-child(even) {
  background: var(--surface);
}
.module {
  border: 1px solid var(--hairline-color);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 20px;
  background: var(--surface);
}
.module h2,
.module caption {
  background: var(--darkened-bg);
  color: var(--body-loud-color);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
}
.module caption a:link,
.module caption a:visited {
  color: var(--link-fg);
}
.module p {
  padding: 0 18px;
}
.module > button {
  margin: 0 18px 16px;
}
.indicator {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.verde {
  background: #e1f4e8;
  color: #17673e;
}
.amarelo {
  background: #fff2cc;
  color: #805b00;
}
.vermelho {
  background: #fbe5e5;
  color: #992f2f;
}
.cinza {
  background: #e9edef;
  color: #405361;
}
#footer {
  padding: 0;
}
.inovab-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 22px 32px;
  border-top: 1px solid var(--hairline-color);
  font-size: 11px;
  color: var(--body-quiet-color);
  background: var(--surface);
}
.inovab-footer span:last-child {
  text-align: right;
}
#changelist {
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--hairline-color);
}
#changelist-filter {
  background: var(--surface);
}
#changelist .actions {
  background: var(--surface);
  color: var(--body-fg);
  padding: 14px;
}
#toolbar {
  background: var(--surface);
  padding: 16px !important;
  border-bottom: 1px solid var(--hairline-color);
}
.submit-row {
  background: var(--surface);
  border: 1px solid var(--hairline-color);
  padding: 16px;
  border-radius: 10px;
}
.form-row {
  padding: 18px;
  border-bottom: 1px solid var(--hairline-color);
}
.help,
.helptext {
  color: var(--body-quiet-color);
  font-size: 12px;
}
.errorlist {
  color: var(--error-fg);
  list-style: none;
  margin: 8px 0;
  padding: 0;
  font-size: 13px;
}
.errornote {
  border: 1px solid var(--error-fg);
  background: var(--message-error-bg);
  color: var(--error-fg);
  padding: 12px 16px;
  border-radius: 8px;
}
.mobile-navigation {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--hairline-color);
  padding: 12px 18px;
}
.mobile-navigation summary {
  font-weight: 650;
  color: var(--link-fg);
  cursor: pointer;
}
@media (max-width: 767px) {
  .mobile-navigation {
    display: block;
  }
}
/* Entrada e segurança usam cartões e campos, sem tabelas administrativas. */
body.auth-page {
  margin: 0;
  min-height: 100vh;
}
.auth-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.15fr);
  min-height: 100vh;
}
.auth-brand-panel {
  background: #133249;
  color: #fff;
  padding: 48px clamp(32px, 5vw, 88px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-brand-panel::after {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  border: 1px solid #ffffff12;
  border-radius: 50%;
  bottom: -160px;
  right: -140px;
  pointer-events: none;
}
.auth-brand-panel .inovab-brand {
  font-size: 34px;
}
.auth-brand-panel .inovab-brand span {
  font-size: 12px;
}
.auth-brand-copy {
  max-width: 390px;
  margin: 60px 0;
}
.auth-brand-copy .eyebrow {
  color: #80d8d3;
}
.auth-brand-copy h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
  margin: 16px 0 22px;
}
.auth-brand-copy p {
  color: #c7dce8;
  font-size: 15px;
  line-height: 1.8;
  margin: 0;
}
.auth-brand-footer {
  font-size: 11px;
  color: #b6ccdb;
  line-height: 1.8;
}
.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 76px 40px 40px;
  position: relative;
  min-width: 0;
}
.auth-toolbar {
  position: absolute;
  top: 24px;
  right: 28px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.auth-toolbar a {
  font-size: 12px;
}
.auth-toolbar .theme-toggle {
  color: var(--body-quiet-color);
  padding: 6px 10px;
  border-color: var(--border-color);
  font-size: 11px;
}
.auth-card {
  width: 100%;
  max-width: 470px;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--hairline-color);
  border-radius: 16px;
  box-shadow: 0 14px 48px #102d4208;
}
.auth-card h1 {
  font-size: 26px;
  margin: 0 0 14px;
  line-height: 1.25;
}
.auth-card p {
  font-size: 14px;
  color: var(--body-quiet-color);
  line-height: 1.7;
  margin: 0 0 22px;
}
.auth-card a {
  overflow-wrap: anywhere;
}
.auth-card .eyebrow {
  font-size: 10px;
  color: var(--link-fg);
  margin-bottom: 12px;
}
.auth-card form {
  margin-top: 22px;
}
.auth-field {
  margin-bottom: 20px;
}
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 8px;
  color: var(--body-loud-color);
}
.auth-field
  input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),
.auth-field select {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 12px;
  border-radius: 8px;
  font-size: 15px;
}
.auth-field ul {
  padding-left: 0;
  list-style: none;
}
.auth-field ul label {
  display: flex;
  gap: 10px;
  align-items: center;
}
.auth-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 26px;
  flex-wrap: wrap;
}
.auth-actions .btn-primary {
  flex: 1;
  min-height: 46px;
}
.auth-card img {
  display: block;
  max-width: 100%;
  width: 200px;
  height: auto;
  margin: 20px auto;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
}
.auth-card hr {
  border: 0;
  border-top: 1px solid var(--hairline-color);
  margin: 26px 0;
}
.auth-note {
  margin-top: 22px;
  max-width: 430px;
  text-align: center;
  font-size: 11px;
  color: var(--body-quiet-color);
  line-height: 1.7;
}
.auth-backup-codes {
  font-family: ui-monospace, monospace;
  padding: 18px;
  background: var(--darkened-bg);
  border-radius: 8px;
  columns: 2;
  list-style: none;
  line-height: 2;
}
@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .auth-brand-panel {
    padding: 40px 30px;
  }
  .auth-card {
    padding: 28px;
  }
}
@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .auth-brand-panel {
    padding: 24px 28px;
  }
  .auth-brand-copy,
  .auth-brand-footer {
    display: none;
  }
  .auth-brand-panel .inovab-brand {
    font-size: 26px;
  }
  .auth-main {
    padding: 78px 22px 32px;
    justify-content: flex-start;
  }
  .auth-card {
    max-width: 500px;
  }
  .inovab-footer {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .inovab-footer span:last-child {
    text-align: left;
  }
  #content {
    padding: 24px;
  }
  .section-heading {
    padding: 16px;
  }
  .auth-toolbar {
    top: 20px;
    right: 24px;
  }
}
@media (max-width: 600px) {
  #header {
    padding: 18px 20px;
    align-items: flex-start;
  }
  #user-tools {
    gap: 10px;
    margin: 12px 0 0;
  }
  #content {
    padding: 20px 14px;
  }
  h1 {
    font-size: 24px;
  }
  .metrics {
    gap: 10px;
  }
  .metrics article {
    padding: 16px;
  }
  .metrics article strong {
    font-size: 28px;
  }
  .section-heading {
    flex-wrap: wrap;
  }
  .inovab-footer {
    padding: 20px;
  }
  .auth-card {
    padding: 24px 20px;
  }
  .auth-card h1 {
    font-size: 24px;
  }
  .auth-main {
    padding-left: 16px;
    padding-right: 16px;
  }
  .quick-links .button {
    flex: 1;
  }
  .auth-actions .btn {
    min-width: 100px;
  }
}
