﻿



:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Tema claro (padrão) */
  --bg-primary: #f4f6fb;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --border-color: rgba(15, 23, 42, 0.06);
  --shadow-light: rgba(15, 23, 42, 0.08);
  --shadow-medium: rgba(15, 23, 42, 0.12);
  --shadow-heavy: rgba(15, 23, 42, 0.2);
  --gradient-header: linear-gradient(135deg, #3757ff, #7c3aed);
  --gradient-button: linear-gradient(135deg, #4f46e5, #7c3aed);
  --button-bg: rgba(255, 255, 255, 0.18);
  --button-bg-hover: rgba(255, 255, 255, 0.28);
  --filter-bg: #e0e7ff;
  --filter-text: #1d4ed8;
  --filter-bg-hover: #c7d2fe;
  --status-message-bg: rgba(79, 70, 229, 0.08);
  --status-message-text: #312e81;
  --modal-backdrop: rgba(15, 23, 42, 0.55);
  --empty-state-bg: rgba(15, 23, 42, 0.05);
  --empty-state-text: #475569;
  --downtime-bg: rgba(15, 23, 42, 0.03);
  --downtime-border: rgba(99, 102, 241, 0.1);
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-header {
  padding: 1.5rem clamp(1rem, 5vw, 3rem);
  background: var(--gradient-header);
  color: white;
  box-shadow: 0 2px 12px rgba(55, 87, 255, 0.25);
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2.5rem);
}

.page-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header__logo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

@media (max-width: 960px) {
  .page-header__logo {
    width: 96px;
    height: 96px;
  }
}

.page-header__button {
  border: none;
  border-radius: 0.75rem;
  padding: 0.7rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--button-bg);
  color: #f8fafc;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  backdrop-filter: blur(6px);
}

.page-header__button:hover,
.page-header__button:focus {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.28);
  background: var(--button-bg-hover);
}

.page-header__button:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

main {
  padding: 2rem clamp(1rem, 5vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.page-header__button.is-success {
  background: rgba(34, 197, 94, 0.85);
  color: #052e16;
}

.page-header__button.is-error {
  background: rgba(248, 113, 113, 0.9);
  color: #581c1c;
}

.page-header__button.is-warn {
  background: rgba(253, 224, 71, 0.92);
  color: #713f12;
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-card);
  padding: 1.25rem clamp(1rem, 4vw, 2rem);
  border-radius: 1rem;
  box-shadow: 0 10px 30px var(--shadow-light);
  border: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.filters__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.filters input,
.filters select {
  padding: 0.6rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border-color);
  font-size: 0.95rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.filters input::placeholder,
.filters select::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.filters input[type="datetime-local"] {
  color: var(--text-primary);
}

.filters input[type="datetime-local"]::-webkit-datetime-edit,
.filters input[type="datetime-local"]::-webkit-datetime-edit-text,
.filters input[type="datetime-local"]::-webkit-datetime-edit-month-field,
.filters input[type="datetime-local"]::-webkit-datetime-edit-day-field,
.filters input[type="datetime-local"]::-webkit-datetime-edit-year-field,
.filters input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
.filters input[type="datetime-local"]::-webkit-datetime-edit-minute-field,
.filters input[type="datetime-local"]::-webkit-datetime-edit-second-field,
.filters input[type="datetime-local"]::-webkit-datetime-edit-ampm-field {
  color: var(--text-primary);
}

.filters__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filters__quick button {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--filter-bg);
  color: var(--filter-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.3s ease;
}

.filters__quick button:hover,
.filters__quick button:focus {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(30, 64, 175, 0.25);
  background: var(--filter-bg-hover);
}

.filters__quick button.is-active {
  background: var(--gradient-button);
  color: white;
}

.status-summary {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 0.85rem clamp(0.85rem, 3vw, 1.25rem);
  box-shadow: 0 8px 22px var(--shadow-medium);
  color: var(--text-primary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  min-height: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.summary-card--online {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border-color: rgba(34, 197, 94, 0.35);
  color: #065f46;
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.18);
}

[data-theme="dark"] .summary-card--online {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.15));
  color: #86efac;
}

.summary-card--offline {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-color: rgba(239, 68, 68, 0.4);
  color: #7f1d1d;
  box-shadow: 0 10px 26px rgba(239, 68, 68, 0.18);
}

[data-theme="dark"] .summary-card--offline {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.15));
  color: #fca5a5;
}

.summary-card--unknown {
  background: var(--bg-card);
  color: var(--text-primary);
}

.summary-card--online .status-pill[data-status="LIGADA"],
.summary-card--offline .status-pill[data-status="DESLIGADA"] {
  background: rgba(255, 255, 255, 0.5);
  color: inherit;
}

.summary-card--online .summary-card__status small,
.summary-card--offline .summary-card__status small {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.85;
}

.summary-card--online .summary-card__totals,
.summary-card--offline .summary-card__totals {
  color: inherit;
}

.summary-card--online .summary-card__totals strong,
.summary-card--offline .summary-card__totals strong {
  color: inherit;
}

.summary-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex: 1 1 220px;
  min-width: 320px;
}

.summary-card__title {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 700;
  color: inherit;
}

.summary-card__status {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
}

.summary-card__status small {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.85;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
}

.status-pill::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.65);
}

.status-pill[data-status="LIGADA"] {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

[data-theme="dark"] .status-pill[data-status="LIGADA"] {
  background: rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.status-pill[data-status="DESLIGADA"] {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

[data-theme="dark"] .status-pill[data-status="DESLIGADA"] {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.summary-card__totals {
  display: flex;
  flex: 1 1 200px;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  font-size: 0.85rem;
  text-align: right;
}

.summary-card__totals span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.summary-card__totals strong {
  font-size: 0.95rem;
}


.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0; /* avoid child overflow expanding container */
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  box-shadow: 0 15px 40px var(--shadow-medium);
  padding: 1.5rem clamp(1rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box; /* prevent padding from increasing width */
  /* Prevent any inner canvas from visually overflowing to the right */
  overflow: hidden;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.timeline-card__title {
  margin: 0;
  font-size: clamp(1.1rem, 2.3vw, 1.4rem);
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-card__expand {
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0.75rem;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.timeline-card__expand:hover,
.timeline-card__expand:focus-visible {
  background: var(--filter-bg);
  color: var(--filter-text);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px var(--shadow-light);
  outline: none;
}

.timeline-card__expand:focus {
  outline: none;
}

.timeline-card__chart {
  position: relative;
  width: 100%;
  /* Taller default to preencher a área visível do card */
  height: clamp(360px, 56vh, 560px);
  overflow: hidden; /* ensure no visual overflow from canvas */
  /* Remove side padding to maximize usable width */
  padding-left: 0;
  padding-right: 0;
}

.timeline-card--expanded .timeline-card__chart {
  height: clamp(560px, 80vh, 720px);
}

@media (max-width: 768px) {
  .timeline-card__chart {
    height: 260px;
  }

  .timeline-card--expanded .timeline-card__chart {
    height: clamp(380px, 80vh, 560px);
  }
}

.timeline-card__chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.timeline-card__empty {
  margin: 0;
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
}

.rankings {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: stretch;
}

@media (min-width: 1080px) {
  .rankings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ranking-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  box-shadow: 0 15px 40px var(--shadow-medium);
  padding: 1.5rem clamp(1rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.ranking-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ranking-card__title {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 700;
  color: var(--text-primary);
}

.ranking-card__chart {
  position: relative;
  width: 100%;
  min-height: 320px;
}

.ranking-card__chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.ranking-card__empty {
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.machines {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  align-items: stretch;
}

.machine-card {
  background: var(--bg-card);
  border-radius: 1.25rem;
  box-shadow: 0 15px 40px var(--shadow-medium);
  padding: 1.5rem clamp(1rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Highlight when last stop is "Falta de programação" */
.machine-card.machine-card--pcp {
  background: #FED7D7; /* bright red entire card */
  border-color: #FED7D7;
}
.machine-card.machine-card--pcp .machine-card__chart {
  background: #FED7D7; /* bright red behind donut */
  border-radius: 0.75rem;
}
.machine-card.machine-card--pcp [data-donut-tooltip-anchor] {
  background: #FED7D7;
  border-radius: 0.75rem;
}

.machine-card__toggle {
  border: none;
  align-self: center;
  padding: 0.55rem 1.2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  background: var(--filter-bg);
  color: var(--filter-text);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.machine-card__toggle:hover,
.machine-card__toggle:focus {
  background: var(--filter-bg-hover);
  transform: translateY(-1px);
}

.machine-card__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;

  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
}


.machine-card__insights-button {
  border: none;
  margin-left: auto;
  padding: 0.6rem 1.4rem;
  border-radius: 0.75rem;
  font-weight: 600;
  background: var(--gradient-button);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 12px 24px var(--shadow-light);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.machine-card__insights-button:hover,
.machine-card__insights-button:focus {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px var(--shadow-medium);
}

[data-theme="dark"] .machine-card__insights-button {
  color: #f8fafc;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.6);
}

.machine-card__insights {
  border: 1px solid var(--downtime-border);
  background: var(--downtime-bg);
  border-radius: 1rem;
  padding: 1.1rem clamp(1rem, 4vw, 1.6rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.machine-card__insights[hidden] {
  display: none;
}

.machine-card__insights-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--text-secondary);
}

.machine-card__insights-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.machine-card__insights-value {
  font-size: 1rem;
  color: var(--text-primary);
}

.machine-card__insights-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.machine-card__insights-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.machine-card__insights-alert {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #b91c1c;
  font-weight: 600;
}

.machine-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.machine-card__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.machine-card__chart {
  position: relative;
  min-height: 200px;
  height: clamp(220px, 28vw, 280px);
}

.machine-card__chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.oee-summary {
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.65rem;
  background: var(--bg-secondary);
  font-size: 0.85rem;
  box-shadow: none;
}

.oee-summary__header {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
  color: var(--text-primary);
}

.oee-summary__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.35rem 0.75rem;
}

.oee-summary__item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.oee-summary__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oee-summary__value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
}

.oee-highlights {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.35rem 0 0.65rem;
    justify-content: center; /* centraliza o grupo de cards */
}

/* OEE – Largura dos 4 cards
   Aumentar largura: troque o "0" do minmax por um valor em px.
   Ex.: grid-template-columns: repeat(4, minmax(130px, 1fr));
   Espaçamento entre eles: ajuste o valor de gap. */
.oee-highlights__cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem; /* espaço entre os cards */
    width: 100%;
    max-width: 100%;
    padding: 0 0.25rem; /* respiro nas laterais para evitar corte */
    margin: 0 auto;
}

/* OEE – Altura de cada card
   Aumentar altura: aumente o padding (primeiro valor = vertical).
   Ex.: padding: 0.6rem 0.75rem;  
   Se preferir, pode definir uma altura mínima:  
   Ex.: min-height: 60px; (adicione abaixo) */
.oee-highlight {
    min-width: 0;
    padding: 0.4rem 0.55rem;
    border: 1.5px solid #22c55e;
    border-radius: 0.55rem;
    background: #f6fff8;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    align-items: center; /* center children horizontally */
    width: 100%;
    box-sizing: border-box; /* inclui borda no cálculo da largura */
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.08);
}

.oee-highlight__label {
    font-size: 0.59rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #1e293b);
}

.oee-highlight__value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #15803d;
    /* Center only the numeric value inside each card */
    display: block;
    width: 100%;
    text-align: center !important;
    align-self: center;
}

.oee-highlight-circle {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    border: 2px solid #22c55e;
    background: #f6fff8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    text-align: center;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.12);
}

.oee-highlight-circle__label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #1f2937);
}

.oee-highlight-circle__value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #15803d;
}



.machine-card__details {
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.machine-card__details[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 50;
}

.modal[aria-hidden="false"] {
  display: grid;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-backdrop);
}

.modal__content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.75rem clamp(1rem, 4vw, 2rem);
  width: min(92vw, 400px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 30px 60px var(--shadow-heavy);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.modal select {
  padding: 0.6rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border-color);
  font-size: 0.95rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal__actions button {
  padding: 0.6rem 1.2rem;
  border-radius: 0.75rem;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#modal-save {
  background: #4f46e5;
  color: white;
}

#modal-cancel {
  background: var(--filter-bg);
  color: var(--text-secondary);
}

.modal__feedback {
  min-height: 1.2rem;
  font-size: 0.9rem;
  color: #1d4ed8;
}

[data-theme="dark"] .modal__feedback {
  color: #93c5fd;
}

@media (max-width: 720px) {
  .machine-card__chart {
    min-height: 180px;
    height: 220px;
  }

  .oee-summary__grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.3rem 0.6rem;
  }
}

.status-message {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: var(--status-message-bg);
  color: var(--status-message-text);
  font-weight: 500;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.machine-card__badge {
  background: rgba(99, 102, 241, 0.12);
  color: #3730a3;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

[data-theme="dark"] .machine-card__badge {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

.empty-state {
  margin: 0;
  text-align: center;
  padding: 1rem;
  border-radius: 0.85rem;
  background: var(--empty-state-bg);
  color: var(--empty-state-text);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.downtime-row {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: var(--downtime-bg);
  border: 1px solid var(--downtime-border);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.downtime-row__meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.downtime-row__info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Transições suaves para mudança de tema */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Ajustes específicos para elementos de formulário no tema escuro */
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

/* Melhor contraste para texto no tema escuro */
[data-theme="dark"] .filters label {
  color: var(--text-primary);
}

[data-theme="dark"] .machine-card__details {
  color: var(--text-secondary);
}

[data-theme="dark"] .downtime-row__info {
  color: var(--text-primary);
}
.hidden {
  display: none !important;
}

.screen-wrapper {
  min-height: 100vh;
  background: linear-gradient(180deg, #f2f6ff 0%, #f8fafc 100%);
}

.auth-screen,
.menu-screen,
.app-screen {
  min-height: 100vh;
}

.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.5rem, 5vw, 4rem);
}

.auth-card {
  width: min(100%, 420px);
  background: #ffffff;
  border-radius: 1.75rem;
  box-shadow: 0 24px 64px rgba(37, 99, 235, 0.18);
  padding: clamp(2rem, 5vw, 2.75rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.auth-card__logo {
  display: flex;
  justify-content: center;
}

.auth-card__logo img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  padding: 0.35rem;
  background: radial-gradient(circle at top, #1d4ed8 0%, #0f172a 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.auth-card__header {
  text-align: center;
}

.auth-card__header h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  margin: 0 0 0.5rem;
  color: #166534;
}

.auth-card__header p {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.auth-field label {
  font-weight: 600;
  color: #1e293b;
}

.auth-field input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1.5px solid rgba(15, 23, 42, 0.15);
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a; /* Garantir contraste no tema escuro */
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.auth-field__password {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(248, 250, 252, 0.9);
  border-radius: 0.85rem;
  border: 1.5px solid rgba(15, 23, 42, 0.15);
  padding-right: 0.35rem;
}

.auth-field__password:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.auth-field__password input {
  border: none;
  box-shadow: none;
  padding: 0.8rem 1rem;
  color: #0f172a; /* Garantir contraste no tema escuro */
}

/* Placeholders visíveis independentemente do tema */
.auth-field input::placeholder,
.auth-field__password input::placeholder {
  color: #64748b;
  opacity: 1;
}

.auth-field__toggle {
  border: none;
  background: transparent;
  color: #0f172a;
  font-size: 0.9rem;
  border-radius: 0.7rem;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.auth-field__toggle:hover,
.auth-field__toggle:focus {
  background: rgba(99, 102, 241, 0.08);
}

.auth-feedback {
  min-height: 1.25rem;
  margin: 0;
  font-size: 0.9rem;
  color: #b91c1c;
}

.auth-submit {
  border: none;
  border-radius: 0.9rem;
  padding: 0.9rem;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 118, 110, 0.3);
}

.auth-footer {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

.menu-screen {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1.5rem, 6vw, 4rem) 3rem;
  background: linear-gradient(180deg, #f1f5f9 0%, #ffffff 40%, #eef2ff 100%);
}

.menu-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.menu-header__brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.menu-header__brand img {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

.menu-header__brand h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  color: #166534;
}

.menu-header__brand p {
  margin: 0;
  color: #475569;
}

.menu-header__logout {
  border: none;
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: #ffffff;
  font-weight: 700;
  padding: 0.8rem 1.6rem;
  border-radius: 0.9rem;
  box-shadow: 0 16px 32px rgba(220, 38, 38, 0.28);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.menu-header__logout:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(220, 38, 38, 0.32);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

.menu-card {
  border: none;
  border-radius: 1.2rem;
  padding: 1.75rem 1.5rem;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.18);
  border-color: rgba(59, 130, 246, 0.35);
}

.menu-card__icon {
  font-size: 2rem;
}

.menu-card h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #0f172a;
}

.menu-card p {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
}

.menu-card--primary {
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.12) 0%, rgba(16, 185, 129, 0.12) 100%);
  border-color: rgba(37, 99, 235, 0.4);
}

.menu-footer {
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

.app-screen {
  display: none;
  flex-direction: column;
}

.app-screen:not(.hidden) {
  display: flex;
}

@media (max-width: 720px) {
  .auth-card {
    border-radius: 1.25rem;
  }

  .menu-header__brand {
    flex-direction: column;
    text-align: center;
  }

  .menu-header__brand img {
    width: 72px;
    height: 72px;
  }

  .menu-header__logout {
    width: 100%;
  }
}

.menu-header__greeting {
  display: block;
  margin-top: 0.35rem;
  font-weight: 600;
  color: #1d4ed8;
}


.menu-feedback {
  min-height: 1.25rem;
  text-align: center;
  font-weight: 600;
  color: #1d4ed8;
}

.menu-feedback.is-error {
  color: #b91c1c;
}




/* Controle de Producao */
.production-screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-primary);
}

.production-screen:not(.hidden) {
  display: flex;
}

.production-header .page-header__logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.production-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.production-main {
  padding: clamp(1.5rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.section-title {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  color: var(--text-primary);
}

.section-subtitle {
  margin: -0.35rem 0 1.4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.section-title__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.production-form-card,
.production-history-card,
.production-dashboard {
  background: var(--bg-secondary);
  border-radius: 1.4rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: 0 22px 45px var(--shadow-light);
  border: 1px solid var(--border-color);
}

.production-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.production-form__grid label,
.production-filters label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  color: var(--text-secondary);
  gap: 0.45rem;
}

.production-form__grid input,
.production-form__grid select,
.production-filters input,
.production-filters select {
  appearance: none;
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid var(--border-color);
  padding: 0.7rem 1rem;
  background-color: rgba(148, 163, 184, 0.08);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.production-form__grid input:focus,
.production-form__grid select:focus,
.production-filters input:focus,
.production-filters select:focus {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
  outline: none;
}

.production-form__actions,
.production-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.production-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  grid-column: 1 / -1;
  padding: 0.2rem 0;
}

.production-quick-filters__button {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.production-quick-filters__button:hover,
.production-quick-filters__button:focus-visible {
  background: rgba(59, 130, 246, 0.2);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
  outline: none;
}

.production-quick-filters__button--active {
  background: #2563eb;
  color: #f8fafc;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.btn-primary,
.btn-secondary,
.refresh-button,
.production-record__delete {
  border: none;
  border-radius: 0.9rem;
  padding: 0.75rem 1.7rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #f8fafc;
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.28);
}

.btn-secondary {
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #78350f;
  box-shadow: 0 18px 32px rgba(234, 179, 8, 0.28);
}

.refresh-button {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
  padding-inline: 1.2rem;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.24);
}

.production-record__delete {
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: #fff7ed;
  padding-inline: 1.2rem;
  align-self: center;
}

.btn-primary:hover,
.btn-secondary:hover,
.refresh-button:hover,
.production-record__delete:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.form-feedback {
  min-height: 1.2rem;
  margin-top: 0.6rem;
  font-weight: 600;
  color: #1e3a8a;
}

.form-feedback.is-error {
  color: #b91c1c;
}

.form-feedback.is-success {
  color: #15803d;
}

.production-history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0.6rem;
}

.production-history-list::-webkit-scrollbar {
  width: 8px;
}

.production-history-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}

.production-record {
  background: rgba(148, 163, 184, 0.12);
  border-radius: 1.1rem;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.production-record__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.production-record__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem 1.2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.production-record__meta span {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.production-record__meta strong {
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.production-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem 1.5rem;
  align-items: end;
}

.production-ranking-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.chart-card {
  background: rgba(15, 23, 42, 0.04);
  border-radius: 1.2rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(148, 163, 184, 0.26);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 420px;
}

.chart-card canvas {
  flex: 0 0 360px;
  width: 100% !important;
  min-height: 360px;
  max-height: 360px;
  height: 360px;
}

.chart-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.production-machine-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.6rem);
  justify-items: stretch;
  align-items: stretch;
  padding-inline: clamp(0.75rem, 3vw, 2rem);
  box-sizing: border-box;
}

.production-machine-card {
  width: min(100%, 420px);
  max-width: 100%;
  min-width: 0;
  background: var(--bg-secondary);
  border-radius: 1.5rem;
  padding: 1.5rem 1.35rem 1.8rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 20px 40px var(--shadow-light);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-inline: 0;
  box-sizing: border-box;
}

.production-machine-card h4 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.production-machine-card__subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.production-machine-card__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.production-machine-card__stat {
  border-radius: 1rem;
  padding: 0.75rem 0.9rem;
  background: rgba(148, 163, 184, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 72px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.15);
}

.production-machine-card__stat span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(15, 23, 42, 0.65);
}

.production-machine-card__stat strong {
  font-size: 1.2rem;
  color: var(--text-primary);
}

.production-machine-card__stat--max,
.production-machine-card__stat--avg,
.production-machine-card__stat--min {
  color: #fff;
}

.production-machine-card__stat--max {
  background: linear-gradient(135deg, #f97316, #facc15);
}

.production-machine-card__stat--avg {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
}

.production-machine-card__stat--min {
  background: linear-gradient(135deg, #c084fc, #7c3aed);
}

.production-machine-card__stat--max span,
.production-machine-card__stat--max strong,
.production-machine-card__stat--avg span,
.production-machine-card__stat--avg strong,
.production-machine-card__stat--min span,
.production-machine-card__stat--min strong {
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.production-machine-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.production-machine-card__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.production-machine-card__expand {
  border: none;
  border-radius: 0.75rem;
  padding: 0.35rem 0.7rem;
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-primary);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.production-machine-card__expand:hover,
.production-machine-card__expand:focus {
  transform: translateY(-1px);
  background: rgba(148, 163, 184, 0.26);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.production-machine-card__expand:active {
  transform: translateY(0);
}

.production-machine-card__goal-button {
  border: none;
  border-radius: 0.75rem;
  padding: 0.4rem 0.8rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

.production-machine-card__goal-button:hover,
.production-machine-card__goal-button:focus {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(29, 78, 216, 0.3);
}

.production-machine-card__goal-button:active {
  transform: translateY(0);
}

.production-machine-card__goal-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.production-goal-modal {
  width: min(94vw, 640px);
  max-height: 92vh;
  overflow: hidden;
}

.production-goal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.production-goal-form__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.production-goal-form__grid label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.production-goal-form__grid input,
.production-goal-form__grid select {
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.production-goal-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.production-goal-list__header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.production-goal-list__header h4 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.production-goal-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.production-goal-list__empty {
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px dashed var(--border-color);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.production-goal-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.1);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

[data-theme="dark"] .production-goal-list__item {
  background: rgba(148, 163, 184, 0.12);
}

.production-goal-list__item.is-editing {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
}

.production-goal-list__info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.production-goal-list__info strong {
  font-size: 1.05rem;
}

.production-goal-list__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: #2563eb;
}

.production-goal-list__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.production-goal-list__button {
  border: none;
  border-radius: 0.65rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
}

.production-goal-list__button:hover,
.production-goal-list__button:focus {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.production-goal-list__button:active {
  transform: translateY(0);
}

.production-goal-list__button--edit {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.production-goal-list__button--delete {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.production-goal-list__button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 640px) {
  .production-goal-modal {
    width: min(96vw, 100%);
  }

  .production-goal-form__grid {
    grid-template-columns: 1fr;
  }

  .production-goal-list__item {
    flex-direction: column;
    align-items: flex-start;
  }

  .production-goal-list__actions {
    align-self: stretch;
  }
}

.production-machine-card__expand span {
  pointer-events: none;
}


.production-machine-card__chart {
  width: 100%;
  box-sizing: border-box;
  border-radius: 1.15rem;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 1rem 1.25rem 1.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;

  contain: size;
}

.production-machine-card__chart canvas {
  width: 100% !important;
  height: auto !important;
  display: block;
  flex: 1 1 auto;
  min-height: 0;
}

@media (max-width: 720px) {
  .production-machine-card__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .production-machine-card__stats {
    grid-template-columns: 1fr;
  }
}

.production-empty {
  text-align: center;
  padding: 2rem 1rem;
  background: rgba(15, 23, 42, 0.05);
  border-radius: 1.1rem;
  color: var(--text-muted);
  font-weight: 600;
}

.page-header__button--warning {
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #78350f;
}

.page-header__button--danger {
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: #fff1f2;
}

@media (max-width: 960px) {
  .production-header .page-header__logo {
    width: 96px;
    height: 96px;
  }

  .production-machine-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

@media (max-width: 720px) {
  .production-machine-grid {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: clamp(0.5rem, 4vw, 1.35rem);
  }
}

@media (max-width: 640px) {
  .production-form__grid {
    grid-template-columns: 1fr;
  }

  .production-form__actions,
  .production-filters__actions,
  .production-header__actions {
    justify-content: stretch;
  }

  .btn-primary,
  .btn-secondary,
  .refresh-button,
  .production-record__delete {
    width: 100%;
    text-align: center;
  }
}

.production-chart-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 130;
}

.production-chart-modal.is-visible {
  display: flex;
}

.production-chart-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.production-chart-modal__content {
  position: relative;
  width: min(96vw, 960px);
  max-height: 92vh;
  background: var(--bg-secondary);
  border-radius: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: 0 30px 60px var(--shadow-heavy);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  z-index: 1;
}

.production-chart-modal__content:focus {
  outline: none;
}

.production-chart-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-primary);
  font-size: 1.4rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.production-chart-modal__close:hover,
.production-chart-modal__close:focus {
  background: rgba(148, 163, 184, 0.28);
}

.production-chart-modal__title {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  color: var(--text-primary);
}

.production-chart-modal__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.production-chart-modal__stats {
  margin: 1.25rem 0 1.5rem;
}

.production-chart-modal__stats .production-machine-card__stat {
  min-height: 0;
}

.production-chart-modal__canvas {
  flex: 1;
  min-height: clamp(320px, 60vh, 520px);
}

.production-chart-modal__canvas canvas {
  width: 100% !important;
  height: 100% !important;
}

body.is-production-chart-open {
  overflow: hidden;
}







/* Controle de Manutencao */
.maintenance-screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-primary);
}

.maintenance-screen:not(.hidden) {
  display: flex;
}

.maintenance-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.maintenance-main {
  padding: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.2rem);
}

.maintenance-card {
  background: var(--bg-secondary);
  border-radius: 1.4rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: 0 22px 45px var(--shadow-light);
  border: 1px solid var(--border-color);
}

.maintenance-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.maintenance-form__grid label,
.maintenance-form__full {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  color: var(--text-secondary);
  gap: 0.45rem;
}

.maintenance-form__grid input,
.maintenance-form__grid select,
.maintenance-form__full textarea,
.maintenance-form__grid textarea {
  appearance: none;
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid var(--border-color);
  padding: 0.7rem 1rem;
  background-color: rgba(148, 163, 184, 0.08);
  color: var(--text-primary);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.maintenance-form__grid input:focus,
.maintenance-form__grid select:focus,
.maintenance-form__full textarea:focus {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
  outline: none;
}

.maintenance-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-top: 1rem;
}

.maintenance-empty {
  margin-top: 1.5rem;
  padding: 1.1rem 1.4rem;
  border-radius: 1rem;
  background: var(--empty-state-bg);
  color: var(--empty-state-text);
  border: 1px dashed var(--border-color);
  font-weight: 600;
}

.maintenance-machine-grid {
  margin-top: 1.6rem;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.maintenance-machine-card {
  background: rgba(59, 130, 246, 0.07);
  border-radius: 1.2rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid rgba(59, 130, 246, 0.22);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: 0 14px 28px rgba(59, 130, 246, 0.18);
}

.maintenance-machine-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.maintenance-machine-card__title {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.maintenance-machine-card__code {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.75);
  background: rgba(15, 23, 42, 0.08);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

[data-theme="dark"] .maintenance-machine-card {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.45);
}

.maintenance-machine-card__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
  margin: 0;
}

.maintenance-machine-card__meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.maintenance-machine-card__meta dd {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
}

.maintenance-machine-card__notes {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.maintenance-machine-card__actions,
.maintenance-task__actions,
.maintenance-qr-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.maintenance-action {
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-primary);
  border-radius: 0.7rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.maintenance-action:hover,
.maintenance-action:focus {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.15);
}

.maintenance-action--primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: transparent;
  color: #f0fdf4;
}

.maintenance-action--danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border-color: transparent;
  color: #fee2e2;
}

.maintenance-action--subtle {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
  color: #1d4ed8;
}

.maintenance-table {
  margin-top: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.maintenance-task {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 1.2rem;
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: 0 16px 32px rgba(124, 58, 237, 0.18);
}

[data-theme="dark"] .maintenance-task {
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.45);
}

.maintenance-task__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.maintenance-task__title {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.maintenance-task__machine {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.maintenance-task__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem;
}

.maintenance-task__meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.maintenance-task__label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.maintenance-task__value {
  font-weight: 600;
  color: var(--text-primary);
}

.maintenance-task__notes {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.maintenance-task__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.maintenance-task__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.maintenance-task__status--ok {
  background: rgba(34, 197, 94, 0.18);
  color: #166534;
}

.maintenance-task__status--warning {
  background: rgba(250, 204, 21, 0.2);
  color: #854d0e;
}

.maintenance-task__status--late {
  background: rgba(239, 68, 68, 0.25);
  color: #991b1b;
}

.maintenance-qr-grid {
  margin-top: 1.6rem;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.maintenance-qr-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
  box-shadow: 0 18px 32px var(--shadow-light);
}

.maintenance-qr-card__header {
  text-align: center;
}

.maintenance-qr-card__title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.maintenance-qr-card__code {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.maintenance-qr-card__canvas {
  width: 320px;
  height: 320px;
  border-radius: 1rem;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.maintenance-qr-card__hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

.maintenance-lookup {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 20;
}

.maintenance-lookup:not(.hidden) {
  display: flex;
}

.maintenance-lookup__card {
  background: var(--bg-secondary);
  border-radius: 1.6rem;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  width: min(480px, 90vw);
  box-shadow: 0 32px 56px rgba(15, 23, 42, 0.38);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  text-align: center;
}

.maintenance-lookup__logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  align-self: center;
}

.maintenance-lookup__machine {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.maintenance-lookup__info {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.maintenance-lookup__info dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.maintenance-lookup__info dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.maintenance-lookup__status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.maintenance-lookup__actions {
  display: flex;
  justify-content: center;
}

.maintenance-lookup__button {
  padding-inline: 1.8rem;
}

@media (min-width: 1100px) {
  .maintenance-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .maintenance-main > .maintenance-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .maintenance-card {
    padding: 1.2rem;
  }

  .maintenance-action,
  .maintenance-task__footer {
    width: 100%;
  }

  .maintenance-task__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .maintenance-lookup {
    padding: 1rem;
  }
}








/* IA Dashycon */
.assistant-screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-primary);
}

.assistant-screen:not(.hidden) {
  display: flex;
}

.assistant-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  align-items: center;
}

.assistant-main {
  flex: 1;
  padding: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  grid-template-columns: minmax(280px, 1fr);
  align-items: start;
}

.assistant-card {
  background: var(--bg-secondary);
  border-radius: 1.35rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: 0 22px 45px var(--shadow-light);
  border: 1px solid var(--border-color);
}

.assistant-card--primary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.2));
  border-color: rgba(59, 130, 246, 0.35);
}

.assistant-card--meta {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.18);
  color: #f1f5f9;
}

.assistant-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.assistant-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.assistant-form__field textarea {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-primary);
  min-height: 110px;
  padding: 0.85rem 1.1rem;
  resize: vertical;
  font-size: 0.98rem;
  line-height: 1.4;
}

.assistant-form__field textarea:focus {
  border-color: rgba(37, 99, 235, 0.58);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  outline: none;
}

.assistant-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.assistant-suggestions button {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.assistant-suggestions button:hover,
.assistant-suggestions button:focus-visible {
  background: rgba(59, 130, 246, 0.24);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
  outline: none;
}

.assistant-status {
  min-height: 1.3rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 1rem;
}

.assistant-status.is-error {
  color: #dc2626;
}

.assistant-conversation {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.assistant-entry {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 1.2rem;
  border-radius: 1.1rem;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.assistant-entry--user {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(37, 99, 235, 0.3);
  align-self: flex-end;
  max-width: 620px;
}

.assistant-entry--assistant {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(148, 163, 184, 0.22);
  max-width: 720px;
}

.assistant-entry__label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(30, 64, 175, 0.85);
}

.assistant-entry--assistant .assistant-entry__label {
  color: rgba(15, 118, 110, 0.85);
}

.assistant-entry__content {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  color: var(--text-primary);
  font-size: 0.98rem;
  line-height: 1.55;
}

.assistant-entry__list {
  margin: 0;
  padding-left: 1.2rem;
}

.assistant-entry__meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.assistant-sources {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.assistant-sources li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.assistant-sources li[data-status="ready"] {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.4);
  color: #dcfce7;
}

.assistant-sources li[data-status="error"] {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fee2e2;
}

.assistant-sources li strong {
  font-size: 0.95rem;
}

.assistant-sources li span {
  font-size: 0.85rem;
  color: inherit;
}

@media (min-width: 960px) {
  .assistant-main {
    grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1fr) minmax(240px, 0.7fr);
  }
}

@media (max-width: 720px) {
  .assistant-form__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .assistant-suggestions {
    flex-direction: column;
  }
  .assistant-suggestions button {
    width: 100%;
    text-align: left;
  }
}



/* ===== FIX: impedir overflow do texto dentro dos cards ===== */
.summary-card,
.machine-card {
  overflow: hidden;
  min-width: 0;
}

.summary-card__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}

.summary-card__status{
  display:flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  max-width: 100%;
}

.summary-card__status small{
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: right;
}

.machine-card__header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-width: 0;
}

.status-summary,
.machines { min-width: 0; }


/* Keep 'Histórico de paradas' and 'Informações detalhadas' side-by-side */
.machine-card__actions .machine-card__toggle,
.machine-card__actions .machine-card__insights-button {
  align-self: center;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Remove auto push that caused misalignment */
.machine-card__insights-button {
  margin-left: 0 !important;
}

/* === Info badge (OEE help) ===================================== */
.machine-card__header-right{ display:inline-flex; align-items:center; gap:8px; }
.info-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  margin-left: 8px;
  border-radius: 999px;
  background: #4f46e5; /* indigo-600 */
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  cursor: help;
  position: relative;
  box-shadow: 0 2px 8px rgba(79,70,229,0.25);
}
.info-badge__icon{ pointer-events:none; }
.info-badge:focus { outline: 2px solid #a5b4fc; outline-offset: 2px; }

.info-badge__tooltip {
  position: absolute;
  right: 0;           /* ancora à direita para não vazar do card */
  left: auto;
  top: auto;
  bottom: -8px;       /* exibe ABAIXO do ícone para não ser cortado pelo card */
  transform: translate(0, 100%) scale(0.98);
  width: min(340px, calc(100vw - 40px));
  color: #fff;
  background: #0f172a;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 12px 28px rgba(2,6,23,0.35);
  text-align: left;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 1000;      /* acima de sombras/headers */
}
.info-badge__tooltip::after{
  content: "";
  position: absolute;
  right: 6px;         /* seta alinhada ao badge */
  top: -6px;          /* seta na parte superior do balão */
  transform: rotate(45deg);
  width: 12px;
  height: 12px;
  background: #0f172a;
}
.info-badge:hover .info-badge__tooltip,
.info-badge:focus .info-badge__tooltip {
  opacity: 1;
  transform: translate(0, 100%) scale(1);
}

[data-theme="dark"] .info-badge__tooltip { background: #111827; }
[data-theme="dark"] .info-badge__tooltip::after { background: #111827; }


/* === Production Uptime Modal (Ligada) === */
#production-uptime-modal .modal__content {
  width: min(92vw, 720px);
  max-width: 720px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem 1rem;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

#production-uptime-modal input[type="number"],
#production-uptime-modal input[type="text"],
#production-uptime-modal input[type="date"],
#production-uptime-modal input[type="datetime-local"],
#production-uptime-modal select {
  padding: 0.6rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border-color, #e5e7eb);
  font-size: 0.95rem;
  background: var(--bg-secondary, #0b1220);
  color: var(--text-primary, #e5e7eb);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

#production-uptime-modal .modal__subtitle {
  margin-top: -0.25rem;
  margin-bottom: 0.75rem;
  opacity: 0.85;
  font-size: 0.95rem;
}

#production-uptime-modal .modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.modal__feedback {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.modal__feedback.is-info { color: var(--info, #0ea5e9); }
.modal__feedback.is-error { color: var(--danger, #ef4444); }
.modal__feedback.is-success { color: var(--success, #16a34a); }


/* === Produção: seleção por gráfico de linha === */
.prod-line { margin-top: 0.75rem; }
.prod-line__header { display:flex; gap:.5rem; align-items:center; font-size:.95rem; opacity:.9; }
.prod-line__canvas-wrap { margin-top:.5rem; background: var(--bg-tertiary, #0a0f1a); border:1px solid var(--border-color, #1f2a44); border-radius: .75rem; padding:.5rem .75rem; }
.prod-line__tags { display:flex; align-items:center; gap:1rem; margin-top:.5rem; }
.prod-line__tags span { font-weight:600; }
.button--sm { padding: .35rem .6rem; font-size:.85rem; border-radius:.6rem; }


@media (min-width: 900px) {
  .production-ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}



/* Ajustes visuais para a seção de comparação por turno */
#downtime-comparison-container .ranking-card__chart {
  min-height: 280px;
}

/* Remove o "vazio" acima quando a tela de produtos está fora do wrapper */
#product-screen +  .screen-spacer { display:none }
body:has(#product-screen:not(.hidden)) .screen-wrapper { min-height: auto; }


/* Cadastro de Produtos */
.products-screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-primary);
}

.products-screen:not(.hidden) {
  display: flex;
}

.products-header .page-header__logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.products-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.products-main {
  padding: clamp(1.5rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.products-form-card,
.products-list-card {
  background: var(--bg-secondary);
  border-radius: 1.4rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: 0 22px 45px var(--shadow-light);
  border: 1px solid var(--border-color);
}

.products-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  grid-auto-flow: dense;
}

/* Organização dos campos de máquinas em telas largas (4 colunas) */
@media (min-width: 1100px) {
  .products-form__grid {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
  }
  .products-form__grid label:has(#product-machine1-name) { grid-column: 1; }
  .products-form__grid label:has(#product-machine1-target) { grid-column: 2; }
  .products-form__grid label:has(#product-machine2-name) { grid-column: 3; }
  .products-form__grid label:has(#product-machine2-target) { grid-column: 4; }
  .products-form__grid label:has(#product-machine3-name) { grid-column: 1; }
  .products-form__grid label:has(#product-machine3-target) { grid-column: 2; }
  .products-form__grid label:has(#product-machine4-name) { grid-column: 3; }
  .products-form__grid label:has(#product-machine4-target) { grid-column: 4; }
}

.products-form__grid label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.products-form__grid input,
.products-form__grid select {
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid var(--border-color);
  padding: 0.7rem 1rem;
  background-color: rgba(148, 163, 184, 0.08);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
}

.products-form__grid select {
  background-image: none;
}

.products-form__grid input:focus {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
  outline: none;
}

.products-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.products-list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  justify-content: space-between;
}

.products-list-header .section-title {
  margin-bottom: 0.35rem;
}

.products-list-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.products-search {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.products-search input {
  width: min(320px, 100%);
  border-radius: 0.9rem;
  border: 1px solid var(--border-color);
  padding: 0.65rem 1rem;
  background-color: rgba(148, 163, 184, 0.08);
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.products-search input:focus {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
  outline: none;
}

.products-list {
  margin-top: 1.5rem;
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.product-card {
  background: var(--bg-primary);
  border-radius: 1.1rem;
  border: 1px solid var(--border-color);
  padding: 1.35rem;
  box-shadow: 0 18px 32px var(--shadow-light);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-card--editing {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.24);
}

.product-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-card__title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.product-card__code {
  font-weight: 600;
  color: #2563eb;
}

.product-card__details {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.product-card__details-item {
  list-style: none;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 0.85rem;
  padding: 0.65rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--text-secondary);
}

.product-card__details-item strong {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.product-card__details-item span {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.product-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.product-card__action {
  border: none;
  border-radius: 0.85rem;
  padding: 0.6rem 1.3rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.product-card__action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.product-card__action--edit {
  background: rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
}

.product-card__action--edit:hover,
.product-card__action--edit:focus-visible {
  background: rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

.product-card__action--delete {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.product-card__action--delete:hover,
.product-card__action--delete:focus-visible {
  background: rgba(220, 38, 38, 0.2);
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .products-header__actions {
    justify-content: center;
  }

  .products-list-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .products-search input {
    width: 100%;
  }

  .products-form__actions,
  .product-card__actions {
    justify-content: stretch;
  }

  .product-card__actions {
    flex-direction: column;
  }
}


.products-empty {

  margin-top: 1.5rem;

  padding: 1.25rem;

  border-radius: 1rem;

  border: 1px dashed var(--border-color);

  background: rgba(148, 163, 184, 0.08);

  text-align: center;

  color: var(--text-secondary);

}



/* === Fix: remove top white space on Controle de Manutencao === */
#maintenance-screen {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
#maintenance-screen .page-header {
  margin-top: 0 !important;
  padding-top: 1.5rem; /* keep visual breathing without creating outside margin */
}
#maintenance-screen > :first-child {
  margin-top: 0 !important;
}
.screen-wrapper {
  padding-top: 0 !important;
}


/* Oculta o wrapper do menu/login quando o Controle de Manutencao estiver visivel */
body:has(#maintenance-screen:not(.hidden)) .screen-wrapper {
  display: none !important;
}


/* === Fix: remover espaço em branco no topo do Cadastro de Produtos === */
#product-screen {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
#product-screen .page-header {
  margin-top: 0 !important;
  padding-top: 1.5rem;
}
#product-screen > :first-child {
  margin-top: 0 !important;
}

/* Oculta o wrapper de menu/login quando o Cadastro de Produtos estiver visivel */
body:has(#product-screen:not(.hidden)) .screen-wrapper {
  display: none !important;
}


/* === Fix FINAL: remover espaço no topo para telas de módulos === */
#products-screen,
#production-screen,
#app-screen {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
#products-screen .page-header,
#production-screen .page-header,
#app-screen .page-header {
  margin-top: 0 !important;
  padding-top: 1.5rem;
}
#products-screen > :first-child,
#production-screen > :first-child,
#app-screen > :first-child {
  margin-top: 0 !important;
}

/* Quando qualquer tela de módulo estiver visível, esconda o wrapper do menu/login */
body:has(#maintenance-screen:not(.hidden)),
body:has(#products-screen:not(.hidden)),
body:has(#production-screen:not(.hidden)),
body:has(#app-screen:not(.hidden)) {
  /* elimina qualquer margem do body e do wrapper para evitar tapete branco */
  margin-top: 0 !important;
  padding-top: 0 !important;
}
body:has(#maintenance-screen:not(.hidden)) #login-screen,
body:has(#products-screen:not(.hidden)) #login-screen,
body:has(#production-screen:not(.hidden)) #login-screen,
body:has(#report-screen:not(.hidden)) #login-screen,
body:has(#app-screen:not(.hidden)) #login-screen {
  display: none !important;
}

/* Relatório Geral */
.report-main { display: flex; flex-direction: column; gap: 1.5rem; padding: 2rem clamp(1rem,5vw,3rem); }
.report-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 1.25rem; box-shadow: 0 15px 40px var(--shadow-medium); padding: 1.25rem clamp(1rem,4vw,2rem); }
.report-list { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); }
.report-list__item { display:flex; align-items:center; justify-content:space-between; gap:.75rem; border:1px solid var(--border-color); border-radius:.8rem; background:var(--bg-secondary); padding:.75rem 1rem; }
.report-list__label { font-weight:600; color:var(--text-primary); }
.report-list__value { font-variant-numeric: tabular-nums; }
.report-machine-list { display: grid; gap: 1rem; }
.report-machine { border:1px solid var(--border-color); border-radius:1rem; background:var(--bg-secondary); padding:1rem; }
.report-machine__header { display:flex; align-items:baseline; justify-content:space-between; }
.report-machine__products { margin-top:.5rem; display:grid; gap:.35rem; }
.section-title { margin:0 0 .25rem 0; }
.section-subtitle { margin:.25rem 0 .75rem 0; color:var(--text-muted); font-size:.9rem; }


/* ---- Fix top whitespace on Report screen ---- */
#report-screen {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
#report-screen .page-header {
  margin-top: 0 !important;
  padding-top: 1.5rem; /* keep breathing space inside header only */
}
#report-screen > :first-child {
  margin-top: 0 !important;
}
body:has(#report-screen:not(.hidden)) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ---- Report filters: layout + inputs ---- */
.report-form {
  display: block;
}
.report-form__grid {
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
}
.report-form__grid > label {
  display: grid;
  gap: 0.4rem;
  grid-column: span 3;
  font-weight: 600;
  color: var(--text-primary);
  font-size: .95rem;
}
@media (max-width: 1200px) {
  .report-form__grid > label { grid-column: span 4; }
}
@media (max-width: 800px) {
  .report-form__grid { grid-template-columns: 1fr; }
  .report-form__grid > label { grid-column: auto; }
}

/* Inputs/selects consistent look */
.report-form input[type="datetime-local"],
.report-form select {
  appearance: none;
  width: 100%;
  padding: .7rem .9rem;
  border: 1px solid var(--border-color);
  border-radius: .8rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.2;
  box-shadow: 0 0 0 0 rgba(79,70,229,0);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.report-form input[type="datetime-local"]:hover,
.report-form select:hover {
  border-color: rgba(79,70,229,.35);
}
.report-form input[type="datetime-local"]:focus,
.report-form select:focus {
  outline: none;
  border-color: rgba(79,70,229,.65);
  box-shadow: 0 0 0 .25rem rgba(79,70,229,.15);
}

/* Row for buttons */
.report-form__actions {
  display: flex;
  gap: .6rem;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  margin-top: .25rem;
}
.report-form .btn-primary,
.report-form .btn-secondary {
  border-radius: .9rem;
  padding: .7rem 1.25rem;
  font-weight: 700;
}


/* Esconde o wrapper do menu/login quando o Relatório Geral estiver ativo */
body:has(#report-screen:not(.hidden)) .screen-wrapper {
  display: none !important;
}


/* === Report quick filters (shortcuts) === */
.report-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  grid-column: 1 / -1;
  padding: 0.2rem 0;
  margin-top: .25rem;
}

.report-quick-filters__button {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  background: rgba(79, 70, 229, 0.10);
  color: #4f46e5;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.report-quick-filters__button:hover,
.report-quick-filters__button:focus-visible {
  background: rgba(79, 70, 229, 0.20);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.16);
  outline: none;
}
.report-quick-filters__button--active {
  background: #4f46e5;
  color: #f8fafc;
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.25);
}



/* ===== Fixo: faixa branca no topo da página de Cadastro de Produtos ===== */
/* Use um destes seletores no contêiner da página:
   <section id="products-screen"> ... </section>
   <section id="product-screen"> ... </section>
   <section class="products-screen"> ... </section>
*/
#products-screen,
#product-screen,
.products-screen {
  margin-top: 0 !important;
  padding-top: 0 !important;
  background: var(--bg-primary);
}

/* Se o wrapper principal (login/menu) ainda estiver no DOM, esconda-o quando a tela de produtos estiver visível */
body:has(#products-screen:not(.hidden)) .screen-wrapper,
body:has(#product-screen:not(.hidden)) .screen-wrapper,
body:has(.products-screen:not(.hidden)) .screen-wrapper {
  display: none !important;
}

/* Caso exista um espaçador logo acima da tela, remova */
#products-screen + .screen-spacer,
#product-screen + .screen-spacer,
.products-screen + .screen-spacer {
  display: none !important;
}

/* Garante que o primeiro bloco dentro da tela não crie espaço extra */
#products-screen > :first-child,
#product-screen > :first-child,
.products-screen > :first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Ajustes visuais do header quando estiver na tela de produtos */
#products-screen .page-header,
#product-screen .page-header,
.products-screen .page-header {
  margin-top: 0 !important;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}


/* === Enlarge and respect generated size for maintenance QR canvases === */
.qr-card canvas,
.qr-wrapper canvas {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated; /* keep QR edges sharp */
}
/* Optional: make the QR container roomy so larger sizes fit nicely */
.qr-card .qr-canvas,
.qr-wrapper .qr-canvas {
  display: block;
  margin-inline: auto;
}



/* ===== Dashycon Menu — Visual Upgrade (2025-09-28) ===== */
.menu-screen {
  background: linear-gradient(180deg, #f9fafb 0%, #eef2ff 100%);
  animation: dashy-fadeIn 0.6s ease;
}

@keyframes dashy-fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Grid breathing room */
.menu-grid {
  gap: clamp(1.4rem, 3.2vw, 2.25rem);
}

/* Cards: depth, glow & hover */
.menu-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
  will-change: transform, box-shadow;
}

.menu-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 28px 65px rgba(15, 23, 42, 0.2);
  border-color: rgba(59, 130, 246, 0.45);
}

.menu-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(16,185,129,0.08));
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.menu-card:hover::after {
  opacity: 1;
}

/* Focus state for keyboard users */
.menu-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25), 0 26px 60px rgba(15, 23, 42, 0.18);
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.55);
}

/* Icons: circular pill with gradient */
.menu-card__icon {
  font-size: 2.2rem;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(59,130,246,0.35);
}

/* Titles: gradient text branding */
.menu-header__brand h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 0.25rem;
}

.menu-header__brand p {
  font-size: 1rem;
  color: #64748b;
  margin: 0;
}

/* Dark mode fine-tuning */
[data-theme="dark"] .menu-card:hover {
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .menu-card__icon {
  box-shadow: 0 10px 22px rgba(59,130,246,0.45);
}



/* ===== Fix: Remover aro branco ao redor da logo no menu (2025-09-28) ===== */
.menu-header__brand img {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
}

/* Caso a imagem tenha bordas brancas internas, recorte forçado em círculo */
.menu-header__brand img {
  clip-path: circle(50% at 50% 50%);
}

/* Em dark mode, evitar halo claro de antialias */
[data-theme="dark"] .menu-header__brand img {
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.35));
}



/* ==== Ajuste fino: logo do MENU um pouco maior (somente tamanho) ==== */
.menu-header__brand img {
  width: 100px !important;
  height: 100px !important;
}

@media (max-width: 720px) {
  .menu-header__brand img {
    width: 84px !important;
    height: 84px !important;
  }
}



/* ==== Forçar tamanho maior da logo no MENU (prioridade alta) ==== */
.menu-header .menu-header__brand img {
  width: 120px !important;
  height: 120px !important;
}

@media (max-width: 720px) {
  .menu-header .menu-header__brand img {
    width: 96px !important;
    height: 96px !important;
  }
}



/* ==== Logo do MENU ainda maior (forçado) ==== */
.menu-header .menu-header__brand img {
  width: 150px !important;
  height: 150px !important;
}

@media (max-width: 720px) {
  .menu-header .menu-header__brand img {
    width: 120px !important;
    height: 120px !important;
  }
}



/* ==== Remover atalhos na página de Relatório (Monitoramento, Controle de produção, Controle de manutenção) ==== */
.report-header__actions #report-monitor-button,
.report-header__actions #report-production-button,
.report-header__actions #report-maintenance-button {
  display: none !important;
}


/* === Dashycon.Tech — Controle de Manutenção
   Ocultar atalhos "Interrupções" e "Produção" apenas no topo da página === */

/* 1) Alvos por href/aria-label (mais robusto, não depende da ordem) */
header a[href*="nterrup" i],
header a[aria-label*="nterrup" i],
header a[title*="nterrup" i],
header a[href*="roduc" i],
header a[aria-label*="roduc" i],
header a[title*="roduc" i] {
  display: none !important;
}

/* 2) Fallback por ordem dentro do grupo de atalhos (caso o container tenha essas classes) */
.maintenance-header__actions .page-header__button:nth-child(2),
.maintenance-header__actions .page-header__button:nth-child(3),
.nav-shortcuts a:nth-child(2),
.nav-shortcuts a:nth-child(3) {
  display: none !important;
}


/* === Menu principal — corrigir tile com cor diferente ===================== */
/* Força todos os cards do menu a usarem o mesmo fundo */
.menu-grid .card,
.menu-grid .module-card,
.menu-grid .menu-card,
.menu-grid a.card {
  background-color: #ffffff !important;
  background-image: none !important;
}

/* Garantia extra: aplica direto no 2º card (Monitoramento de máquinas) */
.menu-grid > *:nth-child(2) .card,
.menu-grid > a:nth-child(2),
.menu-grid > .menu-card:nth-child(2),
.menu-grid > .module-card:nth-child(2) {
  background-color: #ffffff !important;
  background-image: none !important;
}

/* Remove possíveis gradientes por pseudo-elemento */
.menu-grid .card::before,
.menu-grid .card::after,
.menu-grid .menu-card::before,
.menu-grid .menu-card::after {
  background: none !important;
}

/* Mantém borda e sombra iguais aos demais */
.menu-grid .card,
.menu-grid .menu-card {
  box-shadow: 0 10px 25px rgba(2, 8, 23, 0.08) !important;
  border: 1px solid rgba(2, 8, 23, 0.08) !important;
}


/* Auxiliar abaixo dos inputs para dicas/validação */
.field-hint{
  display:block;
  margin-top:0.35rem;
  font-size:0.85rem;
  color: var(--text-muted);
}
.field-hint.is-ok{ color:#16a34a; }
.field-hint.is-warn{ color:#b45309; }
.field-hint.is-error{ color:#b91c1c; }
