:root {
  --brand-green: #0b8f48;
  --brand-green-dark: #076536;
  --brand-green-soft: #dff4e7;
  --brand-teal: #169d76;
  --ink: #123126;
  --muted: #567065;
  --line: #cfe5d8;
  --surface: #ffffff;
  --surface-alt: #f4fbf6;
  --shadow: 0 18px 45px rgba(7, 101, 54, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(22, 157, 118, 0.16), transparent 22%),
    linear-gradient(180deg, #eef9f1 0%, #f9fcfa 45%, #edf7f0 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.58), transparent 18%),
    radial-gradient(circle at 88% 82%, rgba(11, 143, 72, 0.08), transparent 24%);
}

input,
select,
textarea,
button {
  font-size: 16px;
}

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

.app-view[hidden] {
  display: none;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 16px;
}

.app-nav {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 26px rgba(7, 101, 54, 0.08);
}

.app-nav-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.app-nav-button.is-active {
  background: linear-gradient(90deg, var(--brand-green-dark), var(--brand-green));
  color: #fff;
  box-shadow: 0 10px 20px rgba(11, 143, 72, 0.18);
}

.auth-shell {
  position: fixed;
  inset: 0;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 28px 16px 36px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 420px);
  gap: 14px;
  align-items: center;
  justify-content: center;
  z-index: 12000;
  background: rgba(10, 35, 24, 0.34);
  backdrop-filter: blur(10px);
}

.auth-shell[hidden] {
  display: none;
}

.auth-hero,
.auth-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(207, 229, 216, 0.9);
  box-shadow: var(--shadow);
}

.auth-hero {
  min-height: 560px;
  padding: 36px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(135deg, var(--brand-green-dark), var(--brand-green) 55%, #25ad72 100%);
  color: #fff;
}

.auth-brand {
  display: grid;
  gap: 18px;
  max-width: 560px;
}

.auth-brand-copy small {
  display: block;
  margin-bottom: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.auth-brand-copy h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1;
}

.auth-brand-copy p {
  margin: 12px 0 0;
  max-width: 540px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.auth-feature-card {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
}

.auth-feature-card strong,
.auth-feature-card span {
  display: block;
}

.auth-feature-card strong {
  margin-bottom: 8px;
  font-size: 1rem;
}

.auth-feature-card span {
  color: rgba(255, 255, 255, 0.82);
}

.auth-card {
  padding: 28px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.auth-card-header {
  margin-bottom: 20px;
}

.web-contas-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(11, 143, 72, 0.16);
  background: linear-gradient(180deg, #f8fdf9, #ecf8ef);
  color: var(--brand-green-dark);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.web-contas-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(7, 101, 54, 0.12);
}

.web-contas-link:focus-visible {
  outline: 2px solid rgba(11, 143, 72, 0.25);
  outline-offset: 3px;
}

.web-contas-link-light {
  margin-top: 12px;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.web-contas-link-light:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
  background: rgba(255, 255, 255, 0.2);
}

.auth-card-header h2 {
  margin: 10px 0 8px;
  font-size: 1.7rem;
}

.auth-card-header p {
  margin: 0;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.auth-status {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fcfffd, #f1faf4);
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-status.is-error {
  border-color: #e1b2b2;
  background: #fff7f7;
  color: #8a3131;
}

.auth-status.is-success {
  border-color: #b7d8c2;
  background: #f3fbf6;
  color: var(--brand-green-dark);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--brand-green-dark), var(--brand-green) 55%, #23a36b 100%);
  box-shadow: var(--shadow);
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.session-badge {
  margin-left: auto;
  min-width: 210px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
}

.session-badge small {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.session-badge strong {
  display: block;
  line-height: 1.35;
  word-break: break-word;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-copy small {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
}

.brand-copy h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.brand-copy p {
  margin: 8px 0 0;
  max-width: 700px;
  color: rgba(255, 255, 255, 0.86);
}

.session-bar {
  margin-top: 22px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.session-bar small {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.session-bar strong {
  font-size: 1rem;
}

.floating-logout-button {
  margin-top: 12px;
  position: static;
  z-index: auto;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  background: linear-gradient(90deg, #f6fffa, #e5f6eb);
  color: var(--brand-green-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 18px 40px rgba(7, 101, 54, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.floating-logout-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 46px rgba(7, 101, 54, 0.22);
}

.floating-logout-button[hidden] {
  display: none;
}

.calculator-toggle,
.floating-calculator-button {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 10px 14px;
  background: linear-gradient(90deg, #0f8f4c, #24a768);
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 18px 40px rgba(7, 101, 54, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.calculator-toggle:hover,
.floating-calculator-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 46px rgba(7, 101, 54, 0.22);
}

.floating-calculator-button {
  position: fixed;
  top: 96px;
  right: 20px;
  z-index: 19999;
}

.projection-calculator {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 22000;
  width: min(840px, calc(100vw - 32px));
  min-width: min(360px, calc(100vw - 32px));
  min-height: 220px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f5fbf7);
  box-shadow: 0 28px 60px rgba(7, 101, 54, 0.22);
  overflow: hidden;
  resize: both;
  transition: padding 0.18s ease;
}

.projection-calculator::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 14px;
  height: 14px;
  pointer-events: none;
  background:
    linear-gradient(135deg, transparent 45%, rgba(7, 101, 54, 0.28) 46%, rgba(7, 101, 54, 0.28) 54%, transparent 55%),
    linear-gradient(135deg, transparent 65%, rgba(7, 101, 54, 0.28) 66%, rgba(7, 101, 54, 0.28) 74%, transparent 75%);
}

.projection-calculator[hidden] {
  display: none;
}

.projection-calculator-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  cursor: move;
  user-select: none;
}

.projection-calculator-header > div:first-child {
  min-width: 0;
}

.projection-window-controls {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
}

.projection-window-button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #edf8f1;
  color: var(--brand-green-dark);
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.projection-window-button:hover {
  background: #dff4e7;
}

.projection-calculator.is-minimized {
  width: min(360px, calc(100vw - 32px));
  min-height: 0;
  max-height: 68px;
  padding: 10px 12px;
  resize: none;
}

.projection-calculator.is-minimized::after {
  display: none;
}

.projection-calculator.is-minimized .projection-calculator-header {
  align-items: center;
}

.projection-calculator.is-minimized .projection-calculator-header p,
.projection-calculator.is-minimized .projection-summary,
.projection-calculator.is-minimized .projection-table-wrap {
  display: none;
}

.projection-calculator.is-minimized .projection-calculator-header h2 {
  margin-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projection-calculator.is-dragging,
.projection-calculator.is-dragging * {
  cursor: grabbing !important;
}

.projection-calculator-header small {
  display: block;
  color: var(--brand-green-dark);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.projection-calculator-header h2 {
  margin: 4px 0 2px;
  font-size: 1.08rem;
}

.projection-calculator-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.projection-summary {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.projection-summary-card {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  min-width: 0;
}

.projection-summary-card-highlight {
  background: linear-gradient(135deg, var(--brand-green-dark), var(--brand-green) 55%, #23a36b 100%);
  border-color: transparent;
  color: #fff;
  overflow: hidden;
}

.projection-summary-card-highlight strong,
.projection-summary-card-highlight span {
  color: #ffffff !important;
}

.projection-summary-card-highlight strong {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
  opacity: 1;
}

.projection-summary-card strong,
.projection-summary-card span {
  display: block;
}

.projection-summary-card strong {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.projection-summary-card span {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.projection-summary-card-highlight span {
  font-size: clamp(0.72rem, 1.7vw, 1.18rem);
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  white-space: normal;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.projection-summary-card span.is-warning {
  color: #a96b07;
}

.projection-summary-card span.is-danger {
  color: #ae3d3d;
}

.projection-summary-card span.is-success {
  color: var(--brand-green-dark);
}

.projection-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 8px;
  width: 100%;
  overflow: auto;
}

.projection-table {
  width: 100%;
  min-width: 660px;
  display: grid;
  gap: 6px;
}

.projection-table-head,
.projection-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(70px, 0.58fr) minmax(70px, 0.58fr) minmax(85px, 0.72fr);
  gap: 8px;
  align-items: start;
}

.projection-table-head {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.projection-table-row {
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.projection-table-row input,
.projection-table-row select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 0.82rem;
}

.projection-readonly {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-alt);
  font-weight: 700;
  font-size: 0.8rem;
  overflow: hidden;
}

.projection-row-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.66rem;
}

.review-modal {
  position: fixed;
  inset: 0;
  z-index: 25000;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.review-modal[hidden] {
  display: none;
}

.review-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 28, 18, 0.5);
  backdrop-filter: blur(4px);
}

.review-modal-card {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 32px));
  max-height: min(86vh, 920px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f5fbf7);
  box-shadow: 0 28px 60px rgba(7, 101, 54, 0.24);
}

.review-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 0;
}

.review-modal-header small {
  display: block;
  margin-bottom: 6px;
  color: var(--brand-green-dark);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.review-modal-header h2 {
  margin: 0;
  font-size: 1.45rem;
}

.review-modal-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.review-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #edf8f1;
  color: var(--brand-green-dark);
  font: inherit;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.review-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 22px;
}

.review-meta-item {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.review-meta-item strong,
.review-meta-item span {
  display: block;
}

.review-meta-item strong {
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.review-meta-item span {
  font-weight: 700;
}

.review-list {
  flex: 1 1 auto;
  padding: 0 22px;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  gap: 14px;
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}

.review-group {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.review-group h3 {
  margin: 0 0 12px;
  color: var(--brand-green-dark);
  font-size: 1rem;
}

.review-table {
  display: grid;
  gap: 10px;
}

.review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.4fr);
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #f7fcf9;
  border: 1px solid #e2f0e7;
}

.review-row-acessorio {
  grid-template-columns:
    minmax(110px, 0.9fr)
    minmax(220px, 1.7fr)
    minmax(90px, 0.7fr)
    minmax(110px, 0.8fr)
    minmax(170px, 1.2fr);
}

.review-row strong,
.review-row span {
  display: block;
}

.review-row strong {
  margin-bottom: 4px;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.review-row span {
  word-break: break-word;
}

.review-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 22px 22px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(245, 251, 247, 0.2), #f5fbf7 35%);
}

.content-grid {
  display: grid;
  gap: 22px;
  margin-top: 22px;
  grid-template-columns: minmax(0, 1fr);
}

.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(207, 229, 216, 0.88);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 0;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.badge {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand-green-soft);
  color: var(--brand-green-dark);
  font-weight: 700;
  font-size: 0.82rem;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.is-hidden {
  display: none;
}

.field label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  padding-right: 132px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  border-radius: 999px;
  background: rgba(11, 143, 72, 0.1);
  color: var(--brand-green-dark);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.password-toggle:hover {
  background: rgba(11, 143, 72, 0.16);
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(11, 143, 72, 0.25);
  outline-offset: 2px;
}

.password-toggle-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.password-toggle-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.password-toggle-text {
  line-height: 1;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 4px rgba(11, 143, 72, 0.12);
  transform: translateY(-1px);
}

.field span {
  color: var(--muted);
  font-size: 0.84rem;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: #d14343;
  box-shadow: 0 0 0 4px rgba(209, 67, 67, 0.12);
}

.field-message {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(209, 67, 67, 0.08);
  color: #a12f2f;
  font-size: 0.84rem;
  font-weight: 600;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0 24px 24px;
}

.summary-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fcfffd, #f1faf4);
  border: 1px solid var(--line);
}

.summary-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.summary-card span {
  font-size: 1.05rem;
  font-weight: 700;
}

.history-panel {
  margin: 0 24px 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #fcfffd, #f1faf4);
}

.history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.history-header strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.history-header p {
  margin: 0;
  color: var(--muted);
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-status {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.history-item strong,
.history-item span {
  display: block;
}

.history-item strong {
  margin-bottom: 4px;
  font-size: 0.96rem;
}

.history-item span {
  color: var(--muted);
  font-size: 0.88rem;
}

.history-item-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.history-empty {
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed #abd0b6;
  color: var(--muted);
  background: #fbfffc;
}

.cadastro-update-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
}

.cadastro-update-aside {
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfffd, #f1faf4);
}

.cadastro-update-aside strong {
  display: block;
  margin-bottom: 12px;
  color: var(--brand-green-dark);
}

.cadastro-update-aside ol {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.import-area {
  display: grid;
  gap: 16px;
  padding: 0;
}

.import-area textarea {
  min-height: 190px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.45;
}

.import-area input[type="file"] {
  padding: 14px;
  border: 1px dashed #abd0b6;
  border-radius: 16px;
  background: #fbfffc;
  color: var(--muted);
  cursor: pointer;
}

.import-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cadastro-directory {
  display: grid;
  gap: 16px;
  padding: 0 24px 24px;
}

.directory-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
}

.directory-header h3 {
  margin: 0 0 6px;
  color: var(--brand-green-dark);
  font-size: 1.1rem;
}

.directory-header p {
  margin: 0;
  color: var(--muted);
}

.directory-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(160px, 1fr));
  gap: 12px;
}

.directory-filters input,
.directory-filters select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.cadastro-directory-table-wrap {
  margin-top: 0;
}

.import-status,
.import-summary,
.import-preview {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--muted);
}

.import-status.is-error {
  border-color: #e1b2b2;
  background: #fff7f7;
  color: #8a3131;
}

.import-status.is-success {
  border-color: #b7d8c2;
  background: #f3fbf6;
  color: var(--brand-green-dark);
}

.import-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.import-summary[hidden],
.import-preview[hidden] {
  display: none;
}

.import-summary-item {
  padding: 12px;
  border-radius: 14px;
  background: #f7fcf9;
  border: 1px solid #e2f0e7;
}

.import-summary-item strong,
.import-summary-item span {
  display: block;
}

.import-summary-item strong {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.import-summary-item span {
  color: var(--ink);
  font-size: 1.3rem;
  font-weight: 800;
}

.import-preview {
  max-height: 320px;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.import-preview-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: #f7fcf9;
  border: 1px solid #e2f0e7;
}

.import-preview-row strong {
  color: var(--ink);
}

.import-preview-row span {
  color: var(--muted);
  font-size: 0.9rem;
}

.user-admin-area {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.user-admin-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 1fr) minmax(150px, 0.8fr) auto;
  gap: 12px;
  align-items: center;
}

.user-admin-form input,
.user-admin-form select,
.user-edit-body input,
.user-edit-body select {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.user-permissions-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--ink);
  font-size: 0.92rem;
}

.user-permissions-row strong {
  color: #2782c5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.user-permissions-row label,
.user-active-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.user-table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

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

.user-admin-table th,
.user-admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #edf4ef;
}

.user-admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #dff4e7;
  color: #5c7a34;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.user-admin-table td {
  color: var(--muted);
}

.user-admin-table strong {
  color: var(--ink);
}

.user-role-admin {
  color: #7b3ff2;
  font-weight: 800;
}

.user-role-gestor {
  color: #0070ad;
  font-weight: 800;
}

.user-status-active {
  color: #008c4a;
  font-weight: 800;
}

.user-status-inactive {
  color: #a33b3b;
  font-weight: 800;
}

.user-edit-card {
  position: relative;
  z-index: 1;
  width: min(830px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f9fffb, #eef8f2);
  box-shadow: 0 28px 70px rgba(20, 35, 29, 0.28);
}

.user-edit-body {
  display: grid;
  gap: 16px;
  padding: 0 22px 22px;
}

.user-edit-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.2fr);
  gap: 14px;
}

.user-edit-field {
  display: grid;
  gap: 8px;
}

.user-edit-field span,
.user-edit-section > strong {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.user-edit-section {
  display: grid;
  gap: 10px;
}

.user-permissions-box,
.user-active-row {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.user-permissions-box {
  align-items: stretch;
}

.user-permissions-box label {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #e3efe8;
  border-radius: 12px;
  background: #f8fffb;
}

.user-active-row {
  align-items: flex-start;
  gap: 12px;
}

.user-active-row input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--brand-green);
}

.user-active-row span {
  display: grid;
  gap: 4px;
}

.user-active-row span strong {
  color: var(--ink);
  font-size: 0.98rem;
  letter-spacing: 0;
  text-transform: none;
}

.user-active-row span small {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.user-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.report-area {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.report-filter-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) repeat(5, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.report-filter-field[hidden] {
  display: none;
}

.report-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.report-table-wrap {
  max-height: 520px;
}

.report-table-wrap .user-admin-table {
  min-width: 920px;
  table-layout: fixed;
  font-size: 0.86rem;
}

.report-table-wrap.has-meta-columns .user-admin-table {
  min-width: 1120px;
}

.report-table-wrap .user-admin-table th,
.report-table-wrap .user-admin-table td {
  padding: 8px 10px;
  line-height: 1.25;
  vertical-align: middle;
}

.report-table-wrap .user-admin-table th:nth-child(1),
.report-table-wrap .user-admin-table td:nth-child(1) {
  width: 86px;
}

.report-table-wrap .user-admin-table th:nth-child(2),
.report-table-wrap .user-admin-table td:nth-child(2),
.report-table-wrap .user-admin-table th:nth-child(3),
.report-table-wrap .user-admin-table td:nth-child(3) {
  width: 112px;
}

.report-table-wrap .user-admin-table th:nth-child(4),
.report-table-wrap .user-admin-table td:nth-child(4) {
  width: 210px;
}

.report-table-wrap .user-admin-table th:nth-child(5),
.report-table-wrap .user-admin-table td:nth-child(5) {
  width: 210px;
}

.report-table-wrap .user-admin-table th:nth-child(6),
.report-table-wrap .user-admin-table td:nth-child(6) {
  width: 150px;
}

.report-table-wrap .user-admin-table th:nth-child(7),
.report-table-wrap .user-admin-table td:nth-child(7) {
  width: 150px;
}

.report-table-wrap.has-meta-columns .user-admin-table th:nth-child(5),
.report-table-wrap.has-meta-columns .user-admin-table td:nth-child(5),
.report-table-wrap.has-meta-columns .user-admin-table th:nth-child(6),
.report-table-wrap.has-meta-columns .user-admin-table td:nth-child(6) {
  width: 92px;
}

.report-table-wrap.has-meta-columns .user-admin-table th:nth-child(7),
.report-table-wrap.has-meta-columns .user-admin-table td:nth-child(7) {
  width: 190px;
}

.report-table-wrap.has-meta-columns .user-admin-table th:nth-child(8),
.report-table-wrap.has-meta-columns .user-admin-table td:nth-child(8) {
  width: 150px;
}

.report-table-wrap.has-meta-columns .user-admin-table th:nth-child(9),
.report-table-wrap.has-meta-columns .user-admin-table td:nth-child(9) {
  width: 150px;
}

.report-table-wrap .user-admin-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.report-row-actions .btn.btn-small {
  padding: 7px 10px;
  font-size: 0.78rem;
}

.report-edit-card {
  max-width: 860px;
}

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

.report-edit-field-wide {
  grid-column: 1 / -1;
}

.report-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 106px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.report-status-pill.is-pointed {
  background: #e4f7ea;
  color: #087042;
}

.report-status-pill.is-missing {
  background: #fff1df;
  color: #9a5200;
}

.metas-admin-area {
  display: grid;
  gap: 16px;
  margin: 22px 24px 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfffc;
}

.metas-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

.metas-admin-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.metas-admin-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.metas-editor-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #d9eadf;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(46, 83, 58, 0.08);
}

.metas-editor-card[hidden] {
  display: none;
}

.metas-editor-header strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
}

.metas-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(240px, 1.4fr) repeat(2, minmax(110px, 0.5fr)) auto auto;
  gap: 12px;
  align-items: center;
}

.metas-form input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
}

.metas-search input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

.metas-table-wrap {
  max-height: 420px;
}

.graph-area {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.graph-filter-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) repeat(5, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.graph-filter-field[hidden] {
  display: none;
}

.graph-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-weight: 800;
}

.graph-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.graph-dot {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(42, 111, 85, 0.08);
}

.graph-dot.is-done {
  background: #25b35f;
}

.graph-dot.is-admin {
  background: #f6c343;
}

.graph-dot.is-no-production {
  background: #2f80ed;
}

.graph-dot.is-overdue {
  background: #d64545;
}

.graph-dot.is-missing {
  background: #d4e2d9;
}

.graph-matrix-wrap {
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.graph-matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.graph-matrix th,
.graph-matrix td {
  min-width: 42px;
  height: 42px;
  border-right: 1px solid #dfeee5;
  border-bottom: 1px solid #dfeee5;
  text-align: center;
}

.graph-matrix th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 4px 6px;
  background: #d9f0df;
  color: #426d1c;
  font-size: 0.76rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.graph-matrix .graph-row-title {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 170px;
  padding: 0 14px;
  background: #f8fffb;
  color: var(--text);
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.graph-matrix th:not(.graph-row-title),
.graph-matrix .graph-row-title {
  align-items: center;
  gap: 8px;
}

.graph-matrix th:not(.graph-row-title) {
  text-align: center;
}

.graph-matrix th:not(.graph-row-title) span,
.graph-matrix .graph-row-title span {
  display: inline-block;
  vertical-align: middle;
}

.graph-matrix thead th:not(.graph-row-title) .graph-hide-button {
  display: flex;
  margin: 2px auto 0;
}

.graph-hide-button {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  border: 1px solid rgba(214, 69, 69, 0.28);
  border-radius: 999px;
  background: #fff;
  color: #b72222;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.graph-hide-button:hover {
  border-color: rgba(214, 69, 69, 0.55);
  background: #fff0f0;
  transform: translateY(-1px);
}

.graph-matrix thead .graph-row-title {
  z-index: 3;
  background: #2f6f55;
  color: #fff;
}

.graph-status-cell {
  background: #fbfffc;
}

.graph-status-cell[data-graph-no-production-key] {
  cursor: pointer;
}

.graph-status-cell.is-done {
  background: #effbf3;
}

.graph-status-cell.is-admin {
  background: #fff6cf;
}

.graph-status-cell.is-overdue {
  background: #fff0f0;
}

.graph-status-cell.is-no-production {
  background: #eaf3ff;
}

.graph-status-cell.is-filtered-out {
  background: #f7fbf8;
}

.graph-status-marker {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #d4e2d9;
  color: #6d8174;
  font-size: 0.78rem;
  font-weight: 900;
}

.graph-status-cell.is-done .graph-status-marker {
  background: linear-gradient(135deg, #1ba956, #65c90f);
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 179, 95, 0.28);
}

.graph-status-cell.is-admin .graph-status-marker {
  background: linear-gradient(135deg, #f6c343, #f0a51a);
  color: #4b3500;
  box-shadow: 0 4px 10px rgba(240, 165, 26, 0.28);
}

.graph-status-cell.is-overdue .graph-status-marker {
  background: linear-gradient(135deg, #d64545, #b72222);
  color: #fff;
  box-shadow: 0 4px 10px rgba(214, 69, 69, 0.24);
}

.graph-status-cell.is-no-production .graph-status-marker {
  background: linear-gradient(135deg, #2f80ed, #1d5fd1);
  color: #fff;
  box-shadow: 0 4px 10px rgba(47, 128, 237, 0.28);
}

.graph-status-cell.is-filtered-out .graph-status-marker {
  background: transparent;
  box-shadow: none;
}

.graph-empty-cell {
  padding: 18px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.graph-hidden-panel {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #dfeee5;
  border-radius: 14px;
  background: #fbfffc;
}

.graph-hidden-panel[hidden] {
  display: none;
}

.graph-hidden-panel strong {
  display: block;
  margin-bottom: 4px;
}

.graph-hidden-panel span {
  color: var(--muted);
  font-weight: 800;
}

.graph-hidden-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.graph-hidden-chip,
.graph-hidden-clear {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #cfe5d7;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.graph-hidden-chip:hover,
.graph-hidden-clear:hover {
  border-color: #2f6f55;
  background: #edf8f1;
}

.graph-hidden-clear {
  border-color: rgba(214, 69, 69, 0.28);
  color: #9f2424;
}

.btn.btn-small {
  padding: 10px 16px;
  font-size: 0.9rem;
}

.table-wrap {
  padding: 0 24px 24px;
  overflow-x: auto;
}

.seed-layout {
  padding: 0 24px 24px;
}

.seed-intro {
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfffc, #eff8f2);
}

.seed-intro strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.seed-intro p {
  margin: 0;
  color: var(--muted);
}

.seed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.cell-section-list {
  display: grid;
  gap: 22px;
}

.cell-section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f7fcf9);
}

.cell-section-header {
  margin-bottom: 16px;
}

.cell-section-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--brand-green-dark);
}

.seed-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f5fbf7);
  box-shadow: 0 12px 30px rgba(7, 101, 54, 0.08);
  min-width: 0;
  overflow: visible;
}

.seed-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.seed-card-header h3 {
  margin: 6px 0 0;
  font-size: 1.1rem;
}

.seed-tag {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-green-soft);
  color: var(--brand-green-dark);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.seed-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 0 0 40px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.seed-list {
  display: grid;
  gap: 14px;
}

.seed-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  min-width: 0;
  position: relative;
  z-index: 0;
}

.seed-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-green);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.seed-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.name-field {
  position: relative;
  min-width: 0;
  width: 100%;
  display: block;
  overflow: visible;
  margin: 0;
  padding: 0;
}

.seed-inputs > input,
.name-field > input {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 16px 18px;
  font-size: 1rem;
  border-radius: 18px;
  display: block;
}

.acessorio-process-grid {
  align-items: start;
}

.acessorio-process-card {
  overflow: visible;
}

.acessorio-process-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(130px, 0.8fr) minmax(150px, 0.9fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 0 0 40px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.acessorio-process-row {
  align-items: start;
}

.acessorio-process-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(130px, 0.8fr) minmax(150px, 0.9fr) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.acessorio-process-inputs > input {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 16px 18px;
  font-size: 1rem;
  border-radius: 18px;
  display: block;
}

.name-suggest-input.is-invalid {
  border-color: #c95656;
  box-shadow: 0 0 0 3px rgba(201, 86, 86, 0.12);
}

.name-status-warning {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff4d8;
  color: #8a5a00;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.name-status-warning[hidden] {
  display: none;
}

.floating-suggestions {
  position: fixed;
  width: min(460px, calc(100vw - 32px));
  max-height: 360px;
  z-index: 30000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 44px rgba(7, 101, 54, 0.18);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #82c69a #edf8f1;
}

.floating-suggestions[hidden] {
  display: none;
}

.floating-suggestions::-webkit-scrollbar {
  width: 10px;
}

.floating-suggestions::-webkit-scrollbar-track {
  background: #edf8f1;
  border-radius: 999px;
}

.floating-suggestions::-webkit-scrollbar-thumb {
  background: #82c69a;
  border-radius: 999px;
}

.floating-suggestion-item {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #f4fbf6;
  color: var(--ink);
  text-align: left;
  font: inherit;
  font-size: 0.96rem;
  line-height: 1.3;
  cursor: pointer;
}

.floating-suggestion-item:hover,
.floating-suggestion-item.is-active {
  background: #e5f6eb;
  border-color: #b9ddc5;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
}

thead th {
  padding: 16px 14px;
  text-align: left;
  background: linear-gradient(180deg, #0e8747, #0a713d);
  color: #fff;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

tbody td {
  padding: 12px 14px;
  border-top: 1px solid #e4f1e8;
  vertical-align: middle;
}

tbody tr:nth-child(even) {
  background: #fbfefc;
}

tbody input,
tbody select {
  padding: 14px 14px;
  border-radius: 18px;
}

.graph-matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: visible;
}

.graph-matrix thead th {
  min-width: 42px;
  height: 42px;
  padding: 0;
  background: #d9f0df;
  color: #426d1c;
  font-size: 0.76rem;
  text-align: center;
  letter-spacing: 0;
}

.graph-matrix tbody td {
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-top: 0;
  text-align: center;
}

.graph-matrix tbody tr:nth-child(even) {
  background: transparent;
}

.graph-matrix .graph-row-title {
  width: 170px;
  min-width: 170px;
  max-width: 170px;
  padding: 0 14px;
  text-align: left;
  position: sticky !important;
  left: 0 !important;
  inset-inline-start: 0 !important;
  z-index: 4;
  box-shadow: 8px 0 14px rgba(47, 111, 85, 0.08);
  background-clip: padding-box;
  transform: translateZ(0);
}

.graph-matrix .graph-row-title.graph-row-title-compact {
  padding: 0 8px;
  font-size: 0.68rem;
}

.graph-matrix .graph-row-title.graph-row-title-compact span {
  max-width: 118px;
  white-space: normal;
  line-height: 1.05;
}

.graph-matrix .graph-row-title.graph-row-title-compact .graph-hide-button {
  width: 20px;
  height: 20px;
  margin-left: 4px;
  font-size: 0.86rem;
}

.graph-matrix tbody .graph-row-title {
  z-index: 5;
  background: #f8fffb !important;
}

.graph-matrix thead .graph-row-title {
  z-index: 8;
  top: 0;
  background: #2f6f55 !important;
  color: #fff !important;
}

.activity-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand-green-soft);
  color: var(--brand-green-dark);
  font-weight: 700;
  font-size: 0.86rem;
}

.empty-state {
  margin: 0 24px 24px;
  padding: 26px;
  border-radius: var(--radius-md);
  border: 1px dashed #abd0b6;
  background: linear-gradient(180deg, #fbfffc, #f0f9f2);
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 12px;
  padding: 0 24px 24px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(90deg, var(--brand-green-dark), var(--brand-green));
  color: #fff;
  box-shadow: 0 12px 24px rgba(11, 143, 72, 0.2);
}

.btn-secondary {
  background: #edf8f1;
  color: var(--brand-green-dark);
  border: 1px solid var(--line);
}

.btn-danger {
  background: #fff1f1;
  color: #b42323;
  border: 1px solid #f3c4c4;
}

@media (max-width: 980px) {
  .page-shell {
    width: min(100% - 24px, 100%);
    margin: 16px auto 32px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    padding: 18px 14px 24px;
  }

  .auth-hero {
    min-height: auto;
    padding: 28px 24px;
  }

  .auth-card {
    padding: 24px;
  }

  .app-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .app-nav {
    width: 100%;
  }

  .app-nav-button {
    flex: 1;
  }

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

  .directory-header {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .graph-filter-row {
    grid-template-columns: 1fr;
  }

  .metas-form {
    grid-template-columns: 1fr;
  }

  .user-edit-grid {
    grid-template-columns: 1fr;
  }

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

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

  .brand-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .brand-copy {
    flex: 1 1 320px;
  }

  .session-badge {
    margin-left: 0;
    width: 100%;
    min-width: 0;
  }

  .seed-grid {
    grid-template-columns: 1fr;
  }

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

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

  .floating-logout-button {
    width: 100%;
    text-align: center;
  }

  .projection-calculator {
    top: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-height: calc(100vh - 32px);
  }

  .projection-summary {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 640px) {
  body {
    background:
      linear-gradient(180deg, #edf8f0 0%, #f8fcf9 38%, #edf6ef 100%);
  }

  .page-shell {
    width: min(100% - 20px, 100%);
    margin-top: 10px;
    margin-bottom: 88px;
  }

  .auth-shell {
    width: 100%;
    padding-top: 12px;
  }

  .hero,
  .panel,
  .auth-hero,
  .auth-card {
    border-radius: 20px;
  }

  .hero {
    padding: 18px 16px 16px;
  }

  .brand-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 8px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 1.1rem;
    flex: 0 0 48px;
  }

  .brand-copy h1 {
    font-size: 1.65rem;
    line-height: 1.05;
  }

  .brand-copy p {
    font-size: 0.94rem;
    max-width: none;
  }

  .session-badge {
    grid-column: 1 / -1;
    padding: 12px 14px;
    border-radius: 18px;
  }

  .session-badge strong {
    font-size: 0.98rem;
  }

  .calculator-toggle,
  .floating-calculator-button {
    width: 100%;
  }

  .panel-header,
  .form-grid,
  .summary-cards,
  .history-panel,
  .table-wrap,
  .seed-layout,
  .cadastro-update-layout,
  .cadastro-directory,
  .actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .form-grid,
  .summary-cards {
    grid-template-columns: 1fr;
  }

  .import-summary {
    grid-template-columns: 1fr;
  }

  .directory-filters {
    grid-template-columns: 1fr;
  }

  .user-edit-actions {
    flex-direction: column-reverse;
  }

  .user-edit-actions .btn {
    width: 100%;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-header h2 {
    font-size: 1.18rem;
  }

  .panel-header p {
    font-size: 0.93rem;
  }

  .auth-feature-grid,
  .session-bar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-hero,
  .auth-card {
    padding: 20px 18px;
  }

  .auth-card-header h2 {
    font-size: 1.5rem;
  }

  .auth-brand-copy h1 {
    font-size: 2rem;
  }

  .auth-brand-copy p,
  .auth-feature-card span {
    font-size: 0.96rem;
  }

  .history-panel {
    margin-left: 16px;
    margin-right: 16px;
    padding: 16px;
  }

  .history-header,
  .history-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .review-modal {
    padding: 12px;
    align-items: start;
  }

  .review-modal-card {
    width: min(100vw - 12px, 100%);
    max-height: calc(100vh - 24px);
    min-height: calc(100vh - 24px);
    border-radius: 20px;
  }

  .review-modal-header,
  .review-meta,
  .review-list,
  .review-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .review-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .review-list {
    max-height: none;
  }

  .seed-columns,
  .seed-inputs {
    grid-template-columns: 1fr;
  }

  .acessorio-process-columns,
  .acessorio-process-inputs {
    grid-template-columns: 1fr;
  }

  .acessorio-process-columns {
    padding-left: 0;
  }

  .seed-columns {
    padding-left: 0;
  }

  .seed-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .seed-index {
    width: 36px;
    height: 36px;
  }

  .cell-section {
    padding: 16px;
    border-radius: 18px;
  }

  .seed-card {
    padding: 15px;
    border-radius: 18px;
  }

  .seed-card-header {
    margin-bottom: 10px;
  }

  .seed-card-header h3 {
    font-size: 1rem;
  }

  .seed-list {
    gap: 12px;
  }

  .seed-inputs > input,
  .name-field > input,
  .field input,
  .field select,
  .field textarea {
    min-height: 54px;
    padding: 15px 16px;
    border-radius: 16px;
  }

  .summary-card span {
    font-size: 0.98rem;
  }

  .empty-state,
  .seed-intro {
    padding: 18px 16px;
    border-radius: 18px;
  }

  .floating-suggestions {
    width: calc(100vw - 20px);
    left: 10px !important;
    right: 10px;
    max-height: min(48vh, 320px);
    padding: 8px;
    border-radius: 16px;
  }

  .floating-suggestion-item {
    padding: 14px;
    font-size: 0.95rem;
  }

  .actions {
    flex-direction: column;
    gap: 10px;
    position: sticky;
    bottom: 12px;
    z-index: 20;
    margin: 0 10px 10px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(248, 252, 249, 0.92);
    border: 1px solid rgba(207, 229, 216, 0.9);
    box-shadow: 0 18px 36px rgba(7, 101, 54, 0.14);
    backdrop-filter: blur(10px);
  }

  .actions .btn,
  .auth-actions .btn,
  .history-header .btn,
  .review-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .review-actions {
    flex-direction: column-reverse;
  }
}

/* Visual refinement layer */
:root {
  --brand-green: #078d4a;
  --brand-green-dark: #075534;
  --brand-green-soft: #e6f5ec;
  --brand-teal: #0e8f82;
  --accent-amber: #d9951c;
  --ink: #14231d;
  --muted: #62736b;
  --line: #d7e4dc;
  --surface: #ffffff;
  --surface-alt: #f6faf7;
  --shadow: 0 14px 34px rgba(28, 52, 41, 0.09);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
}

html {
  background: #eef3ef;
}

body {
  background:
    linear-gradient(rgba(11, 85, 52, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 85, 52, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #f7faf8 0%, #eef5f0 100%);
  background-size: 28px 28px, 28px 28px, auto;
  letter-spacing: 0;
}

body::before {
  display: none;
}

::selection {
  background: rgba(7, 141, 74, 0.18);
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin-top: 18px;
}

.auth-shell {
  background:
    linear-gradient(rgba(20, 35, 29, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 35, 29, 0.035) 1px, transparent 1px),
    #eef3ef;
  background-size: 30px 30px, 30px 30px, auto;
  backdrop-filter: none;
}

.auth-hero,
.auth-card,
.hero,
.panel,
.projection-calculator,
.review-modal-card {
  border-radius: 14px;
}

.auth-hero,
.hero {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(135deg, #073b29 0%, #075534 48%, #0d8a54 100%);
}

.auth-hero::after,
.hero::after {
  display: none;
}

.auth-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 520px;
}

.brand-mark {
  border-radius: 12px;
  background: #ffffff;
  color: var(--brand-green-dark);
  box-shadow: 0 10px 24px rgba(5, 50, 31, 0.16);
}

.auth-brand-copy small,
.brand-copy small,
.review-modal-header small,
.projection-calculator-header small {
  letter-spacing: 0.1em;
}

.auth-feature-grid {
  align-items: stretch;
}

.auth-feature-card {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.auth-card,
.panel {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(215, 228, 220, 0.96);
  box-shadow: var(--shadow);
}

.auth-card {
  padding: 30px;
}

.panel {
  overflow: clip;
}

.panel-header {
  padding-top: 22px;
}

.panel-header h2,
.auth-card-header h2,
.review-modal-header h2 {
  color: var(--ink);
  line-height: 1.12;
}

.badge,
.seed-tag {
  border-radius: 999px;
  background: #eef6f1;
  border: 1px solid #cde5d6;
  color: var(--brand-green-dark);
}

.form-grid {
  gap: 14px;
}

.field {
  gap: 7px;
}

.field label {
  color: #30463b;
  font-size: 0.86rem;
}

.field input,
.field select,
.field textarea,
.seed-inputs > input,
.name-field > input,
.acessorio-process-inputs > input,
.projection-table-row input,
.projection-table-row select,
.projection-readonly {
  border-radius: 10px;
  border-color: #cbded3;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(20, 35, 29, 0.03);
}

.field input,
.field select,
.field textarea {
  padding: 14px 15px;
}

.seed-inputs > input,
.name-field > input,
.acessorio-process-inputs > input {
  min-height: 48px;
  padding: 13px 14px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.seed-inputs > input:focus,
.name-field > input:focus,
.acessorio-process-inputs > input:focus,
.projection-table-row input:focus,
.projection-table-row select:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(7, 141, 74, 0.14);
  transform: none;
}

.password-input-wrap input {
  padding-right: 116px;
}

.password-toggle {
  right: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #eef6f1;
}

.summary-cards {
  gap: 12px;
}

.summary-card,
.history-panel,
.history-status,
.history-item,
.seed-intro,
.cell-section,
.seed-card,
.empty-state,
.review-group,
.review-row,
.review-meta-item,
.projection-summary-card {
  border-radius: 10px;
  background: #ffffff;
  border-color: var(--line);
  box-shadow: none;
}

.summary-card,
.history-panel,
.seed-intro {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
}

.summary-card strong,
.review-meta-item strong,
.review-row strong,
.projection-summary-card strong,
.seed-columns,
.acessorio-process-columns {
  letter-spacing: 0.045em;
}

.history-panel {
  margin-top: 2px;
}

.history-status {
  background: #f8fbf9;
}

.seed-layout {
  display: grid;
  gap: 16px;
}

.seed-intro {
  margin-bottom: 0;
  padding: 16px 18px;
}

.cell-section {
  padding: 18px;
}

.cell-section-header h3 {
  color: var(--ink);
}

.seed-card {
  padding: 18px;
  background: #ffffff;
}

.seed-card-header {
  margin-bottom: 12px;
}

.seed-card-header h3 {
  color: #143828;
}

.seed-row {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
}

.seed-index {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #0b7142;
}

.seed-list {
  gap: 10px;
}

.seed-inputs,
.acessorio-process-inputs,
.acessorio-process-columns {
  gap: 10px;
}

.floating-suggestions {
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(20, 35, 29, 0.18);
}

.floating-suggestion-item {
  border-radius: 8px;
  background: #ffffff;
}

.floating-suggestion-item:hover,
.floating-suggestion-item.is-active {
  background: #eef7f2;
}

.actions {
  align-items: center;
}

.btn,
.floating-logout-button,
.floating-calculator-button,
.projection-window-button,
.review-close {
  border-radius: 10px;
}

.btn {
  min-height: 46px;
  padding: 12px 18px;
}

.btn-primary,
.floating-calculator-button,
.calculator-toggle {
  background: linear-gradient(180deg, #0a8c4f, #076b3e);
  box-shadow: 0 10px 20px rgba(7, 107, 62, 0.18);
}

.btn-secondary {
  background: #ffffff;
  color: #24493a;
}

.btn:hover,
.floating-calculator-button:hover,
.floating-logout-button:hover {
  transform: translateY(-1px);
}

.btn:active,
.floating-calculator-button:active,
.floating-logout-button:active {
  transform: translateY(0);
}

.projection-calculator {
  background: #ffffff;
  border-color: #c8dcd0;
  box-shadow: 0 20px 48px rgba(20, 35, 29, 0.2);
}

.projection-calculator-header {
  padding-bottom: 8px;
  border-bottom: 1px solid #e3eee7;
}

.projection-window-button,
.review-close {
  background: #eef6f1;
}

.projection-summary-card-highlight {
  background: linear-gradient(180deg, #0b8d50, #087042);
}

.projection-table-wrap {
  padding-right: 4px;
}

.projection-table-row {
  border-radius: 10px;
  background: #ffffff;
}

.review-modal-backdrop {
  background: rgba(14, 29, 23, 0.56);
  backdrop-filter: blur(7px);
}

.review-modal-card {
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(14, 29, 23, 0.28);
}

.review-actions {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), #ffffff 34%);
}

.review-list {
  gap: 12px;
}

.review-row {
  background: #f8fbf9;
}

.empty-state {
  background:
    linear-gradient(135deg, rgba(7, 141, 74, 0.05), transparent 32%),
    #ffffff;
  border-style: dashed;
}

@media (max-width: 980px) {
  .auth-shell {
    background: #eef3ef;
  }

  .projection-calculator {
    min-width: min(340px, calc(100vw - 32px));
  }
}

@media (max-width: 640px) {
  body {
    background: #f3f7f4;
  }

  .auth-hero,
  .auth-card,
  .hero,
  .panel {
    border-radius: 12px;
  }

  .actions {
    border-radius: 12px;
  }

  .seed-row {
    grid-template-columns: 1fr;
  }

  .seed-index {
    border-radius: 8px;
  }
}

@media (max-width: 420px) {
  .page-shell {
    width: min(100% - 12px, 100%);
    margin-top: 6px;
  }

  .auth-shell {
    padding: 10px 8px 18px;
    gap: 12px;
  }

  .hero,
  .panel,
  .auth-hero,
  .auth-card {
    border-radius: 16px;
  }

  .hero {
    padding: 18px 14px 16px;
  }

  .brand-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 1rem;
    flex-basis: 42px;
  }

  .panel-header,
  .form-grid,
  .summary-cards,
  .history-panel,
  .seed-layout,
  .actions {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand-copy h1 {
    font-size: 1.45rem;
  }

  .auth-brand-copy h1 {
    font-size: 1.7rem;
  }

  .brand-copy p,
  .panel-header p,
  .field span,
  .history-header p,
  .history-status {
    font-size: 0.9rem;
  }

  .summary-card,
  .history-status,
  .seed-intro,
  .review-meta-item {
    padding: 14px;
  }

  .cell-section,
  .seed-card {
    padding: 14px;
  }

  .review-meta {
    grid-template-columns: 1fr;
  }

  .review-modal {
    padding: 8px;
  }

  .review-modal-card {
    width: calc(100vw - 8px);
    max-height: calc(100vh - 16px);
    min-height: calc(100vh - 16px);
    border-radius: 16px;
  }

  .review-modal-header,
  .review-meta,
  .review-list,
  .review-actions {
    padding-left: 12px;
    padding-right: 12px;
  }

  .seed-index {
    width: 34px;
    height: 34px;
  }

  .floating-logout-button {
    width: 100%;
    padding: 13px 18px;
  }

  .floating-calculator-button {
    top: auto;
    right: 10px;
    left: 10px;
    bottom: 60px;
    width: calc(100% - 20px);
    padding: 11px 16px;
  }

  .projection-calculator {
    top: 8px;
    right: 8px;
    left: 8px;
    max-height: calc(100vh - 16px);
    padding: 12px;
    border-radius: 16px;
    overflow: auto;
  }

  .projection-table {
    min-width: 0;
  }

  .projection-table-head {
    display: none;
  }

  .projection-table-row {
    grid-template-columns: 1fr;
  }

  .actions {
    bottom: 8px;
    margin: 0 6px 8px;
    padding: 10px;
    border-radius: 16px;
  }
}

@media (max-width: 420px) {
  .hero,
  .panel,
  .auth-hero,
  .auth-card,
  .review-modal-card,
  .projection-calculator,
  .actions {
    border-radius: 12px;
  }

  .field input,
  .field select,
  .field textarea,
  .seed-inputs > input,
  .name-field > input,
  .acessorio-process-inputs > input {
    border-radius: 10px;
  }
}

/* AMB screen standard */
body {
  background:
    radial-gradient(circle at 18% 8%, rgba(84, 187, 45, 0.12), transparent 28%),
    radial-gradient(circle at 86% 20%, rgba(61, 116, 139, 0.12), transparent 30%),
    linear-gradient(105deg, #eef9ef 0%, #e9f6f0 48%, #eaf5ff 100%);
}

.amb-top-pill {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6bcc19, #319746);
  color: #fff;
  box-shadow: 0 14px 30px rgba(55, 157, 56, 0.26);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.amb-top-pill img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.42);
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 6px 0 18px;
}

.auth-shell {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 28px 16px;
  background:
    radial-gradient(circle at 20% 10%, rgba(95, 200, 35, 0.12), transparent 26%),
    radial-gradient(circle at 86% 22%, rgba(59, 114, 138, 0.12), transparent 28%),
    linear-gradient(105deg, #eef9ef 0%, #e9f6f0 48%, #eaf5ff 100%);
}

.auth-shell .amb-top-pill {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.auth-hero {
  display: none;
}

.auth-logo-main {
  display: block;
  width: min(150px, 42vw);
  height: auto;
  margin-top: 34px;
}

.auth-card {
  width: min(320px, calc(100vw - 32px));
  padding: 26px 20px 24px;
  border-radius: 18px;
  border: 1px solid rgba(215, 228, 220, 0.88);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 20px 50px rgba(32, 68, 51, 0.13);
  backdrop-filter: blur(10px);
}

.auth-card-header {
  margin-bottom: 20px;
}

.auth-card-header h2 {
  margin: 8px 0 6px;
  font-size: 1.45rem;
  color: #263b31;
}

.auth-card-header p {
  max-width: 250px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.auth-form {
  gap: 14px;
}

.auth-card .field label {
  color: #5c7468;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-card .field input {
  min-height: 42px;
  padding: 12px 14px;
  border-radius: 12px;
  border-color: #bfcfdd;
  background: #e8f1ff;
  font-size: 0.78rem;
  color: #0f1d18;
}

.auth-card .password-input-wrap input {
  padding-right: 48px;
}

.auth-card .password-toggle {
  width: 32px;
  height: 32px;
  right: 6px;
  padding: 0;
  justify-content: center;
  border-radius: 10px;
  background: transparent;
}

.auth-card .password-toggle-text {
  display: none;
}

.auth-card .password-toggle-icon {
  width: 16px;
  height: 16px;
}

.auth-actions {
  margin-top: 4px;
}

.auth-actions .btn {
  width: 100%;
  min-height: 43px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6ed21a, #3aa247);
  box-shadow: 0 14px 28px rgba(65, 171, 52, 0.28);
}

.auth-status {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(245, 250, 247, 0.86);
  font-size: 0.78rem;
}

.page-shell {
  width: min(1136px, calc(100% - 48px));
  margin: 24px auto 48px;
}

.hero {
  padding: 28px 32px;
  overflow: visible;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(135deg, #dff4e4 0%, #c8edcf 45%, #b8e7d9 100%);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(68, 99, 89, 0.11);
  color: #163d30;
}

.brand-row {
  align-items: end;
  gap: 18px;
  margin-top: 8px;
}

.app-logo {
  width: 148px;
  height: auto;
  object-fit: contain;
  align-self: center;
}

.brand-copy {
  flex: 1 1 auto;
}

.brand-copy small {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #118140;
  font-size: 0.68rem;
  font-weight: 900;
}

.brand-copy h1 {
  margin-top: 20px;
  color: #153b31;
  font-size: clamp(2.05rem, 4vw, 3.05rem);
  line-height: 0.95;
}

.brand-copy p {
  color: #487365;
  font-size: 0.95rem;
}

.session-badge {
  min-width: 320px;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #173d31;
  box-shadow: inset 0 0 0 1px rgba(207, 229, 216, 0.75);
}

.session-badge small {
  color: #4770a3;
}

.session-badge strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-logout-button {
  margin-top: 8px;
  width: 100%;
  background: linear-gradient(90deg, #6bd11a, #37a047);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(57, 163, 56, 0.22);
}

.content-grid {
  gap: 18px;
  margin-top: 22px;
}

.panel {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 46px rgba(68, 99, 89, 0.11);
  backdrop-filter: blur(12px);
}

.panel-header {
  padding: 20px 23px 0;
}

.panel-header h2 {
  font-size: 1.25rem;
  color: #132d25;
}

.panel-header p {
  color: #5f766d;
  font-size: 0.86rem;
}

.badge,
.seed-tag {
  background: #dfeee6;
  border: 0;
  color: #168042;
  font-size: 0.66rem;
}

.form-grid {
  padding: 22px 23px;
}

.field input,
.field select,
.field textarea,
.seed-inputs > input,
.name-field > input,
.acessorio-process-inputs > input {
  border-radius: 12px;
  border-color: #d7e3dc;
  background: rgba(255, 255, 255, 0.78);
}

.summary-cards {
  padding: 0 23px 23px;
}

.summary-card,
.history-panel,
.seed-intro,
.cell-section,
.seed-card,
.empty-state,
.review-modal-card,
.projection-calculator {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(215, 228, 220, 0.86);
}

.summary-card {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.btn-primary,
.floating-calculator-button,
.calculator-toggle {
  background: linear-gradient(90deg, #6bd11a, #37a047);
  box-shadow: 0 14px 28px rgba(57, 163, 56, 0.22);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.74);
  border-color: #d9e3de;
}

.projection-summary-card-highlight {
  background: linear-gradient(90deg, #69cf1b, #35a046);
}

.review-modal-backdrop {
  background: rgba(216, 231, 222, 0.72);
  backdrop-filter: blur(9px);
}

.app-notification {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 3000;
  transform: translate(-50%, -12px);
  min-width: 160px;
  padding: 14px 22px;
  border-radius: 12px;
  background: #1f7a34;
  color: #ffffff;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 18px 42px rgba(31, 122, 52, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-notification.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.theme-toggle {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(215, 228, 220, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(68, 99, 89, 0.1);
}

.theme-toggle-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--brand-green-soft);
  color: var(--brand-green-dark);
  line-height: 1;
}

:root[data-theme="dark"] {
  --brand-green: #3bcc75;
  --brand-green-dark: #19a45c;
  --brand-green-soft: #193929;
  --brand-teal: #32c2a1;
  --accent-amber: #f0b544;
  --ink: #edf8f1;
  --muted: #aac4b8;
  --line: #294338;
  --surface: #10231b;
  --surface-alt: #162b22;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] body {
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(59, 204, 117, 0.16), transparent 24%),
    linear-gradient(180deg, #07120d 0%, #0e1d17 48%, #07120d 100%);
}

:root[data-theme="dark"] body::before {
  background:
    radial-gradient(circle at 12% 18%, rgba(67, 217, 133, 0.08), transparent 19%),
    radial-gradient(circle at 88% 82%, rgba(50, 194, 161, 0.08), transparent 24%);
}

:root[data-theme="dark"] .app-nav,
:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .summary-card,
:root[data-theme="dark"] .history-panel,
:root[data-theme="dark"] .seed-intro,
:root[data-theme="dark"] .cell-section,
:root[data-theme="dark"] .seed-card,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .review-modal-card,
:root[data-theme="dark"] .user-edit-card,
:root[data-theme="dark"] .projection-calculator,
:root[data-theme="dark"] .graph-matrix-wrap,
:root[data-theme="dark"] .report-table-wrap,
:root[data-theme="dark"] .user-table-wrap,
:root[data-theme="dark"] .floating-suggestions {
  border-color: rgba(54, 86, 72, 0.92);
  background: rgba(16, 35, 27, 0.88);
  color: var(--ink);
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .amb-top-pill,
:root[data-theme="dark"] .session-badge,
:root[data-theme="dark"] .btn-secondary,
:root[data-theme="dark"] .graph-hidden-panel,
:root[data-theme="dark"] .review-row,
:root[data-theme="dark"] .projection-summary-card,
:root[data-theme="dark"] .activity-chip {
  border-color: rgba(54, 86, 72, 0.92);
  background: rgba(22, 43, 34, 0.9);
  color: var(--ink);
}

:root[data-theme="dark"] .panel-header h2,
:root[data-theme="dark"] .seed-card-header h3,
:root[data-theme="dark"] .cell-section-header h3,
:root[data-theme="dark"] .directory-header h3,
:root[data-theme="dark"] .metas-admin-header h3,
:root[data-theme="dark"] .history-header strong,
:root[data-theme="dark"] .summary-card strong,
:root[data-theme="dark"] .user-admin-table strong,
:root[data-theme="dark"] label,
:root[data-theme="dark"] .field label {
  color: var(--ink);
}

:root[data-theme="dark"] .panel-header p,
:root[data-theme="dark"] .field span,
:root[data-theme="dark"] .history-header p,
:root[data-theme="dark"] .directory-header p,
:root[data-theme="dark"] .metas-admin-header p,
:root[data-theme="dark"] .summary-card span,
:root[data-theme="dark"] .import-status,
:root[data-theme="dark"] .graph-legend,
:root[data-theme="dark"] .user-admin-table td {
  color: var(--muted);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] .seed-inputs > input,
:root[data-theme="dark"] .name-field > input,
:root[data-theme="dark"] .acessorio-process-inputs > input,
:root[data-theme="dark"] .user-edit-body input,
:root[data-theme="dark"] .user-edit-body select {
  border-color: #365648;
  background: #0d1c16;
  color: var(--ink);
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #789688;
}

:root[data-theme="dark"] .badge,
:root[data-theme="dark"] .seed-tag,
:root[data-theme="dark"] .theme-toggle-icon {
  background: #193929;
  color: #87e8a9;
}

:root[data-theme="dark"] .user-admin-table th,
:root[data-theme="dark"] .report-table-head,
:root[data-theme="dark"] .projection-table-head,
:root[data-theme="dark"] .graph-matrix th {
  background: #153c2b;
  color: #c9f5d8;
}

:root[data-theme="dark"] tbody tr:nth-child(even),
:root[data-theme="dark"] tbody td,
:root[data-theme="dark"] .user-admin-table td {
  background: #10231b;
  border-color: #294338;
}

:root[data-theme="dark"] tbody tr:nth-child(odd) td {
  background: #0d1c16;
}

:root[data-theme="dark"] .graph-matrix .graph-row-title,
:root[data-theme="dark"] .graph-matrix tbody .graph-row-title {
  background: #10231b !important;
  color: var(--ink);
}

:root[data-theme="dark"] .graph-matrix thead .graph-row-title {
  background: #0f5e3b !important;
  color: #fff !important;
}

:root[data-theme="dark"] .graph-status-cell {
  background: #10231b;
}

:root[data-theme="dark"] .graph-status-cell.is-done {
  background: #123b23;
}

:root[data-theme="dark"] .graph-status-cell.is-admin {
  background: #423313;
}

:root[data-theme="dark"] .graph-status-cell.is-overdue {
  background: #3a1717;
}

:root[data-theme="dark"] .graph-status-cell.is-no-production {
  background: #102f54;
}

:root[data-theme="dark"] .graph-status-cell.is-filtered-out {
  background: #172820;
}

:root[data-theme="dark"] .graph-hide-button {
  background: #1f2f28;
  border-color: rgba(255, 120, 120, 0.36);
  color: #ff9c9c;
}

:root[data-theme="dark"] .floating-suggestion-item {
  background: #132820;
  color: var(--ink);
}

:root[data-theme="dark"] .floating-suggestion-item:hover,
:root[data-theme="dark"] .floating-suggestion-item.is-active {
  background: #1d3a2e;
}

:root[data-theme="dark"] .review-modal-backdrop {
  background: rgba(2, 8, 5, 0.72);
}

:root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .floating-logout-button,
:root[data-theme="dark"] .floating-calculator-button,
:root[data-theme="dark"] .calculator-toggle {
  color: #06100b;
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    margin-top: 10px;
  }

  .brand-row {
    align-items: start;
  }

  .app-logo {
    width: 112px;
    grid-column: 1 / -1;
  }

  .brand-copy h1 {
    margin-top: 12px;
  }

  .session-badge {
    min-width: 0;
  }
}

/* Chamada login */
body:has(.auth-shell) {
  background:
    radial-gradient(circle at 16% 12%, rgba(137, 200, 94, 0.2), transparent 34%),
    radial-gradient(circle at 82% 30%, rgba(116, 166, 147, 0.15), transparent 30%),
    linear-gradient(105deg, #e5f3df 0%, #f4faf6 52%, #ddecda 100%);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(380px, 540px) minmax(280px, 330px);
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  justify-items: center;
  align-content: center;
  gap: 24px;
  padding: 24px;
  background:
    radial-gradient(circle at 14% 18%, rgba(137, 200, 94, 0.16), transparent 28%),
    radial-gradient(circle at 87% 31%, rgba(95, 145, 122, 0.11), transparent 30%),
    linear-gradient(105deg, #e5f3df 0%, #f5faf7 52%, #dcebd8 100%);
  background-size: 120% 120%, 120% 120%, 100% 100%;
  animation: authBackgroundDrift 12s ease-in-out infinite alternate;
}

@keyframes authBackgroundDrift {
  0% {
    background-position: 0% 0%, 100% 18%, center;
  }

  100% {
    background-position: 12% 10%, 88% 36%, center;
  }
}

.auth-hero,
.auth-card {
  display: block;
  width: 100%;
  height: 420px;
  min-height: 420px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 54px rgba(49, 86, 70, 0.12);
  backdrop-filter: blur(14px);
}

.auth-hero {
  padding: 56px 38px 48px;
  color: #233128;
}

.auth-brand {
  display: block;
  max-width: 460px;
}

.auth-logo {
  width: 212px;
  height: auto;
  margin: 0 0 38px;
  object-fit: contain;
}

.auth-brand-copy small,
.auth-card .seed-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 5px 13px;
  border: 0;
  border-radius: 999px;
  background: #e5f3dc;
  color: #5b7f3b;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.auth-brand-copy h1 {
  margin: 20px 0 18px;
  max-width: 430px;
  color: #26322a;
  font-size: 3rem;
  font-weight: 900;
  line-height: 0.98;
}

.auth-brand-copy p {
  max-width: 500px;
  color: #66796e;
  font-size: 1rem;
  line-height: 1.55;
}

.auth-card {
  padding: 40px 30px;
}

.auth-card-header {
  margin-bottom: 24px;
}

.auth-card-header h2 {
  margin: 18px 0 8px;
  color: #26322a;
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.05;
}

.auth-card-header p {
  max-width: none;
  margin: 0;
  color: #687b70;
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-card .field {
  display: grid;
  gap: 8px;
}

.auth-card .field label {
  color: #4e6256;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.auth-card .field input {
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  border: 1px solid #d8dfda;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: #233128;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: none;
}

.auth-card .field input::placeholder {
  color: #9aa7a0;
  font-weight: 600;
}

.auth-card .password-input-wrap input {
  padding-right: 52px;
}

.auth-card .password-toggle {
  display: inline-flex;
  width: 34px;
  height: 34px;
  right: 8px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #288c5f;
  background: rgba(40, 140, 95, 0.08);
}

.auth-actions {
  margin-top: 2px;
}

.auth-actions .btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(90deg, #75dc17 0%, #288c5f 62%, #356f88 100%);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(91, 201, 33, 0.24);
}

.auth-status {
  display: none;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.78rem;
}

.auth-status.is-error,
.auth-status.is-success {
  display: block;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    overflow-y: auto;
  }

  .auth-hero,
  .auth-card {
    width: min(548px, 100%);
    height: auto;
    min-height: 0;
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    padding: 16px;
    gap: 12px;
  }

  .auth-hero {
    padding: 32px 24px;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .auth-logo {
    width: 176px;
    margin-bottom: 26px;
  }

  .auth-brand-copy h1 {
    font-size: 2.35rem;
  }
}

/* Dark theme contrast pass */
:root[data-theme="dark"] body {
  color: #edf8f1;
  background:
    radial-gradient(circle at 18% 8%, rgba(42, 170, 96, 0.16), transparent 28%),
    radial-gradient(circle at 86% 20%, rgba(41, 112, 133, 0.14), transparent 30%),
    linear-gradient(105deg, #06110d 0%, #0c1a15 52%, #07120e 100%);
}

:root[data-theme="dark"] {
  background: #06110d;
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] .page-shell {
  background-color: #06110d;
}

:root[data-theme="dark"] body:has(.auth-shell),
:root[data-theme="dark"] .auth-shell {
  background:
    radial-gradient(circle at 16% 12%, rgba(42, 170, 96, 0.2), transparent 34%),
    radial-gradient(circle at 82% 30%, rgba(55, 111, 136, 0.18), transparent 30%),
    linear-gradient(105deg, #06110d 0%, #0c1a15 52%, #07120e 100%);
}

:root[data-theme="dark"] .hero {
  background:
    linear-gradient(120deg, rgba(79, 218, 132, 0.1), transparent 42%),
    linear-gradient(135deg, #0b2118 0%, #113226 48%, #12583a 100%);
  border-color: rgba(72, 112, 94, 0.72);
  color: #edf8f1;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] .brand-copy h1,
:root[data-theme="dark"] .brand-copy p,
:root[data-theme="dark"] .brand-copy small,
:root[data-theme="dark"] .session-badge strong {
  color: #edf8f1;
}

:root[data-theme="dark"] .brand-copy small,
:root[data-theme="dark"] .session-badge,
:root[data-theme="dark"] .amb-top-pill,
:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .app-nav {
  border-color: rgba(72, 112, 94, 0.78);
  background: rgba(14, 31, 24, 0.9);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .app-nav-button {
  color: #aac4b8;
}

:root[data-theme="dark"] .app-nav-button.is-active {
  color: #06100b;
  background: linear-gradient(90deg, #8ae23f, #3bcc75);
}

:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .summary-card,
:root[data-theme="dark"] .history-panel,
:root[data-theme="dark"] .history-item,
:root[data-theme="dark"] .history-status,
:root[data-theme="dark"] .history-empty,
:root[data-theme="dark"] .cadastro-update-aside,
:root[data-theme="dark"] .import-status,
:root[data-theme="dark"] .import-summary,
:root[data-theme="dark"] .import-preview,
:root[data-theme="dark"] .import-summary-item,
:root[data-theme="dark"] .import-preview-row,
:root[data-theme="dark"] .user-table-wrap,
:root[data-theme="dark"] .user-edit-card,
:root[data-theme="dark"] .user-permissions-box,
:root[data-theme="dark"] .user-permissions-box label,
:root[data-theme="dark"] .user-active-row,
:root[data-theme="dark"] .report-table-wrap,
:root[data-theme="dark"] .metas-admin-area,
:root[data-theme="dark"] .metas-editor-card,
:root[data-theme="dark"] .graph-matrix-wrap,
:root[data-theme="dark"] .graph-hidden-panel,
:root[data-theme="dark"] .seed-intro,
:root[data-theme="dark"] .cell-section,
:root[data-theme="dark"] .seed-card,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .review-modal-card,
:root[data-theme="dark"] .review-meta-item,
:root[data-theme="dark"] .review-group,
:root[data-theme="dark"] .review-row,
:root[data-theme="dark"] .projection-calculator,
:root[data-theme="dark"] .projection-summary-card,
:root[data-theme="dark"] .projection-table-row,
:root[data-theme="dark"] .floating-suggestions,
:root[data-theme="dark"] table {
  border-color: rgba(54, 86, 72, 0.92);
  background: #10231b;
  color: #edf8f1;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .panel-header h2,
:root[data-theme="dark"] .directory-header h3,
:root[data-theme="dark"] .metas-admin-header h3,
:root[data-theme="dark"] .seed-card-header h3,
:root[data-theme="dark"] .cell-section-header h3,
:root[data-theme="dark"] .review-modal-header h2,
:root[data-theme="dark"] .review-group h3,
:root[data-theme="dark"] .projection-calculator-header h2,
:root[data-theme="dark"] .history-header strong,
:root[data-theme="dark"] .summary-card strong,
:root[data-theme="dark"] .import-summary-item span,
:root[data-theme="dark"] .user-admin-table strong,
:root[data-theme="dark"] .user-active-row span strong,
:root[data-theme="dark"] .metas-editor-header strong,
:root[data-theme="dark"] .import-preview-row strong,
:root[data-theme="dark"] .review-meta-item span {
  color: #edf8f1;
}

:root[data-theme="dark"] .panel-header p,
:root[data-theme="dark"] .field span,
:root[data-theme="dark"] .directory-header p,
:root[data-theme="dark"] .metas-admin-header p,
:root[data-theme="dark"] .seed-intro p,
:root[data-theme="dark"] .summary-card span,
:root[data-theme="dark"] .history-item span,
:root[data-theme="dark"] .history-header p,
:root[data-theme="dark"] .import-preview-row span,
:root[data-theme="dark"] .review-modal-header p,
:root[data-theme="dark"] .review-meta-item strong,
:root[data-theme="dark"] .review-row strong,
:root[data-theme="dark"] .projection-calculator-header p,
:root[data-theme="dark"] .projection-summary-card strong,
:root[data-theme="dark"] .graph-legend,
:root[data-theme="dark"] .user-admin-table td {
  color: #aac4b8;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] .directory-filters input,
:root[data-theme="dark"] .directory-filters select,
:root[data-theme="dark"] .user-admin-form input,
:root[data-theme="dark"] .user-admin-form select,
:root[data-theme="dark"] .user-edit-body input,
:root[data-theme="dark"] .user-edit-body select,
:root[data-theme="dark"] .metas-form input,
:root[data-theme="dark"] .metas-search input,
:root[data-theme="dark"] .seed-inputs > input,
:root[data-theme="dark"] .name-field > input,
:root[data-theme="dark"] .acessorio-process-inputs > input,
:root[data-theme="dark"] .projection-table-row input,
:root[data-theme="dark"] .projection-table-row select,
:root[data-theme="dark"] .projection-readonly {
  border-color: #365648;
  background: #0b1813;
  color: #edf8f1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] input[readonly],
:root[data-theme="dark"] .projection-readonly {
  background: #122a20;
  color: #cfe7dc;
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #789688;
}

:root[data-theme="dark"] thead th,
:root[data-theme="dark"] .user-admin-table th,
:root[data-theme="dark"] .report-table-head,
:root[data-theme="dark"] .projection-table-head,
:root[data-theme="dark"] .graph-matrix th {
  background: #163d2d;
  border-color: #294338;
  color: #d9f8e6;
}

:root[data-theme="dark"] tbody tr,
:root[data-theme="dark"] tbody tr:nth-child(even),
:root[data-theme="dark"] tbody tr:nth-child(odd),
:root[data-theme="dark"] tbody td,
:root[data-theme="dark"] .user-admin-table td {
  background: #10231b;
  border-color: #294338;
}

:root[data-theme="dark"] tbody tr:nth-child(even) td {
  background: #0d1c16;
}

:root[data-theme="dark"] .graph-matrix tbody .graph-row-title {
  background: #10231b !important;
  color: #edf8f1 !important;
}

:root[data-theme="dark"] .graph-matrix thead .graph-row-title {
  background: #0f5e3b !important;
  color: #ffffff !important;
}

:root[data-theme="dark"] .graph-status-cell {
  background: #0d1c16;
}

:root[data-theme="dark"] .graph-status-cell.is-done {
  background: #123b23;
}

:root[data-theme="dark"] .graph-status-cell.is-admin {
  background: #423313;
}

:root[data-theme="dark"] .graph-status-cell.is-overdue {
  background: #3a1717;
}

:root[data-theme="dark"] .graph-status-cell.is-no-production {
  background: #102f54;
}

:root[data-theme="dark"] .graph-status-cell.is-filtered-out {
  background: #172820;
}

:root[data-theme="dark"] .badge,
:root[data-theme="dark"] .seed-tag,
:root[data-theme="dark"] .activity-chip,
:root[data-theme="dark"] .theme-toggle-icon {
  background: #193929;
  color: #87e8a9;
}

:root[data-theme="dark"] .btn-secondary,
:root[data-theme="dark"] .review-close,
:root[data-theme="dark"] .projection-window-button,
:root[data-theme="dark"] .graph-hidden-chip,
:root[data-theme="dark"] .graph-hide-button {
  border-color: #365648;
  background: #162b22;
  color: #87e8a9;
}

:root[data-theme="dark"] .btn-danger,
:root[data-theme="dark"] .graph-hidden-clear {
  border-color: rgba(255, 120, 120, 0.34);
  background: #351919;
  color: #ff9c9c;
}

:root[data-theme="dark"] .import-status.is-error,
:root[data-theme="dark"] .name-status-warning,
:root[data-theme="dark"] .report-status-pill.is-missing {
  border-color: rgba(240, 181, 68, 0.38);
  background: #372813;
  color: #ffd27a;
}

:root[data-theme="dark"] .import-status.is-success,
:root[data-theme="dark"] .report-status-pill.is-pointed {
  border-color: rgba(80, 205, 128, 0.34);
  background: #143521;
  color: #87e8a9;
}

:root[data-theme="dark"] .floating-suggestion-item {
  border-color: transparent;
  background: #162b22;
  color: #edf8f1;
}

:root[data-theme="dark"] .floating-suggestion-item:hover,
:root[data-theme="dark"] .floating-suggestion-item.is-active,
:root[data-theme="dark"] .graph-hidden-chip:hover,
:root[data-theme="dark"] .graph-hidden-clear:hover {
  border-color: #47725f;
  background: #1e3a2f;
}

:root[data-theme="dark"] .review-actions {
  background: linear-gradient(180deg, rgba(16, 35, 27, 0), #10231b 35%);
}
