@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;900&family=Playfair+Display:ital,wght@0,700;1,400&display=swap");
@import url("sidebar-menu.css");

/* Sistema de Controle de Corte - Styles */
/* Baseado nos wireframes com identidade visual completa */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #F4F7F5;
  --surface: #FFFFFF;
  --border: #E0EAE5;
  --border-dark: #B8CCC2;
  --text: #1A2E25;
  --text-muted: #6B8278;
  --accent: #1D9E75;
  --accent-light: #EAF5EF;
  --green: #0F5041;
  --green-bg: #EAF5EF;
  --yellow: #7A5C00;
  --yellow-bg: #FFF7D6;
  --red: #C00000;
  --red-bg: #FCE4D6;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(15,80,65,0.10);
  --escuro: #0F5041;
  --dourado: #D4AC0D;
  --mint: #9FE1CB;
  --card-light: #EAF5EF;
}

body {
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── TOPBAR ── */
.topbar {
  background: var(--accent);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.topbar-back {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 18px;
  transition: background .15s;
}

.topbar-back:hover {
  background: rgba(255,255,255,.3);
}

.topbar-title {
  flex: 1;
}

.topbar h2 {
  font-size: 16px;
  font-weight: 600;
}

.topbar-sub {
  font-size: 11px;
  opacity: .8;
  margin-top: 1px;
}

.topbar-icon {
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  transition: transform .15s;
}

.topbar-icon:hover {
  transform: scale(1.1);
}

/* ── CONTAINER ── */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
}

.logo-top img{
  height: 32px;
  margin-right: 10px;
}

.login-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px 16px 40px;
  background:
    radial-gradient(circle at top center, rgba(124, 210, 108, 0.18), transparent 22%),
    linear-gradient(90deg, #f7fff2 0%, #eef8f4 46%, #e3f0ff 100%);
}

.login-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1D9E75 0%, #1D9E75 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 26px rgba(90, 173, 47, 0.24);
}

.login-pill-divider {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.4);
}

.login-pill-mark {
  width: 18px;
  height: 18px;
  border-radius: 999px 999px 999px 2px;
  background: rgba(255,255,255,0.92);
  transform: rotate(45deg);
}

.login-brand {
  position: absolute;
  top: 24px;
  left: 24px;
  margin: 0;
}

.login-brand img {
  width: min(132px, 34vw);
  height: auto;
  display: block;
}

.login-card {
  margin-top: 36px;
  width: 100%;
  max-width: 360px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(213, 226, 219, 0.85);
  border-radius: 24px;
  padding: 24px 22px 26px;
  box-shadow: 0 18px 40px rgba(130, 168, 124, 0.18);
  backdrop-filter: blur(10px);
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 22px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e7f0e7;
  color: #2e9a51;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.login-card h1 {
  margin-top: 10px;
  font-size: 28px;
  line-height: 1.1;
  color: #304236;
}

.login-subtitle {
  margin-top: 10px;
  margin-bottom: 22px;
  color: #68806f;
  font-size: 15px;
  line-height: 1.35;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-field {
  margin-bottom: 0;
  gap: 8px;
}

.login-field label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #667f69;
}

.login-field input {
  height: 46px;
  border-radius: 16px;
  border: 1px solid #d1ddd2;
  background: rgba(255,255,255,0.88);
  color: #42604b;
  padding: 0 16px;
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.login-field input::placeholder {
  color: #88a08e;
}

.login-field input:focus {
  border-color: #79c71a;
  box-shadow: 0 0 0 4px rgba(121, 199, 26, 0.12);
}

.btn.btn-primary.login-submit {
  margin-top: 8px;
  height: 48px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #1D9E75 0%, #1D9E75 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 24px rgba(90, 173, 47, 0.24);
}

.btn.btn-primary.login-submit:hover:not(:disabled) {
  background: linear-gradient(90deg, #7dcb10 0%, #52a92c 100%);
  transform: translateY(-1px);
}

.login-error {
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff2f2;
  border: 1px solid #f2c9c9;
  color: #c00000;
  font-size: 13px;
  line-height: 1.35;
}

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.card:last-child {
  margin-bottom: 0;
}

.card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 12px;
}

/* ── FIELDS ── */
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #F9FAFB;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  transition: all .15s;
}

.field textarea {
  height: 80px;
  padding: 10px 12px;
  resize: vertical;
  min-height: 60px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

.field input:disabled,
.field select:disabled {
  background: #e9ecef;
  cursor: not-allowed;
  opacity: .7;
}

.field-icon {
  position: relative;
}

.field-icon input {
  padding-left: 38px;
}

.field-icon .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-15%);
  font-size: 16px;
  color: var(--text-muted);
}

.row-fields {
  display: grid;
  gap: 10px;
}

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

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

/* ── BUTTONS ── */
.btn {
  height: 46px;
  border-radius: var(--radius);
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  transition: all .15s;
  width: 100%;
  text-decoration: none;
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent);
  filter: brightness(0.94);
}

.btn-success {
  background: var(--accent);
  color: #fff;
}

.btn-success:hover:not(:disabled) {
  background: var(--accent);
  filter: brightness(0.94);
}

.btn-warning {
  background: var(--yellow);
  color: #fff;
}

.btn-warning:hover:not(:disabled) {
  background: #654D00;
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: #9B0000;
}

.btn-outline {
  background: rgba(79, 143, 84, 0.08);
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(79, 143, 84, 0.14);
}

.btn-group {
  display: flex;
  gap: 8px;
}

.btn-group .btn {
  flex: 1;
}

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-green {
  background: var(--green-bg);
  color: var(--green);
}

.badge-yellow {
  background: var(--yellow-bg);
  color: var(--yellow);
}

.badge-red {
  background: var(--red-bg);
  color: var(--red);
}

.badge-blue {
  background: var(--accent-light);
  color: var(--accent);
}

/* ── ALERTS ── */
.alert {
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.alert .icon {
  flex-shrink: 0;
  font-size: 16px;
}

.alert-green {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid #A9D18E;
}

.alert-yellow {
  background: var(--yellow-bg);
  color: var(--yellow);
  border: 1px solid #FFD966;
}

.alert-red {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #F4AAAA;
}

.alert-blue {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid #9DC3E6;
}

/* ── INFO ROWS ── */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

.info-row .label {
  font-size: 12px;
  color: var(--text-muted);
}

.info-row .value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ── LIST ITEMS ── */
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .15s;
}

.list-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.list-item:last-child {
  margin-bottom: 0;
}

.list-item .main {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.list-item .sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── STATS ── */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat-box .stat-val {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
}

.stat-box .stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── TIMER ── */
.timer {
  text-align: center;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.timer .time-big {
  font-size: 48px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}

.timer .time-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.timer .time-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ── TOGGLE ── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.toggle {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--border);
  position: relative;
  cursor: pointer;
  transition: background .15s;
}

.toggle.on {
  background: var(--accent);
}

.toggle::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: left .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.toggle.on::after {
  left: 23px;
}

/* ── TAB BAR ── */
.tab-bar {
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  font-size: 10px;
  color: var(--text-muted);
  cursor: pointer;
  gap: 4px;
  transition: all .15s;
  text-decoration: none;
}

.tab-item.active {
  color: var(--accent);
  background: var(--accent-light);
}

.tab-item:hover {
  background: #F9FAFB;
}

.tab-icon {
  font-size: 20px;
}

/* ── LOADING ── */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: .5;
}

.empty-state p {
  font-size: 14px;
}

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ── MODAL ── */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: #f0f0f0;
}

.modal-body {
  padding: 16px;
}

.confirmar-liberacao-modal {
  width: min(540px, calc(100vw - 32px));
  border: 1px solid #cfe5d9;
  border-radius: 20px;
}

.confirmar-liberacao-modal .modal-header {
  padding: 20px 22px 16px;
}

.confirmar-liberacao-modal .modal-header h3 {
  margin-top: 5px;
  color: #0f5041;
  font-size: 20px;
}

.confirmar-liberacao-modal .modal-body {
  padding: 20px 22px 22px;
}

.confirmar-liberacao-texto {
  margin: 0 0 16px;
  color: #526b5d;
  line-height: 1.5;
}

.confirmar-liberacao-resumo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.confirmar-liberacao-resumo > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: #f4f9f6;
  border: 1px solid #d9e9df;
  border-radius: 12px;
}

.confirmar-liberacao-resumo span {
  color: #6d8173;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.confirmar-liberacao-resumo strong {
  color: #23352a;
  overflow-wrap: anywhere;
}

.confirmar-liberacao-aviso {
  padding: 12px 14px;
  color: #275446;
  background: #eaf6f0;
  border-left: 4px solid #1d9e75;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.confirmar-liberacao-observacoes {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: #fbfcfb;
  border: 1px solid #d9e9df;
  border-radius: 12px;
}

.confirmar-liberacao-observacoes span {
  color: #6d8173;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.confirmar-liberacao-observacoes p {
  margin: 6px 0 0;
  color: #23352a;
  line-height: 1.45;
  white-space: pre-wrap;
}

.confirmar-liberacao-acoes {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.confirmar-liberacao-cancelar {
  color: #315743;
  background: #eef4f0;
}

.confirmar-liberacao-confirmar {
  color: #fff;
  background: #0f604f;
}

@media (max-width: 560px) {
  .confirmar-liberacao-resumo { grid-template-columns: 1fr; }
  .confirmar-liberacao-acoes { flex-direction: column-reverse; }
  .confirmar-liberacao-acoes .btn { width: 100%; }
}

/* ── RESPONSIVE MOBILE ── */
@media (max-width: 480px) {
  .login-shell {
    justify-content: flex-start;
    padding-top: 88px;
  }

  .login-pill {
    align-self: center;
    transform: scale(0.94);
  }

  .login-brand {
    top: 18px;
    left: 18px;
  }

  .login-brand img {
    width: min(112px, 36vw);
  }

  .login-card {
    margin-top: 42px;
    max-width: 100%;
    padding: 22px 18px 22px;
    border-radius: 22px;
  }

  .login-card h1 {
    font-size: 24px;
  }

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

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

  .timer .time-big {
    font-size: 36px;
  }
}

/* ── DESKTOP LAYOUT (≥768px) ── */
@media (min-width: 768px) {

  /* Topbar: altura fixa para o sidebar se alinhar */
  .topbar {
    height: 60px;
    padding-left: 24px;
    padding-right: 24px;
  }

  /* Tab-bar vira sidebar lateral */
  .tab-bar {
    top: 60px;
    left: 0;
    bottom: 0;
    right: auto;
    width: 220px;
    flex-direction: column;
    align-items: stretch;
    border-top: none;
    border-right: 1px solid rgba(184, 210, 186, 0.7);
    background: rgba(255,255,255,0.78);
    box-shadow: 16px 0 40px rgba(100, 139, 93, 0.08);
    backdrop-filter: blur(12px);
    padding: 18px 0 28px;
    gap: 14px;
    justify-content: space-evenly;
  }

  .tab-item {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 18px 18px;
    font-size: 14px;
    font-weight: 700;
    color: #34503d;
    gap: 14px;
    border-radius: 24px;
    margin: 0 12px;
    min-height: 104px;
    text-align: left;
  }

  .tab-item.active {
    color: #0F5041;
    background: linear-gradient(180deg, rgba(29, 158, 117, 0.16), rgba(29, 158, 117, 0.08));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
  }

  .tab-item:hover {
    background: rgba(29, 158, 117, 0.08);
  }

  .tab-icon {
    font-size: 24px;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
  }

  /* Container: usa o espaço todo, offset do sidebar */
  .container {
    margin-left: 220px;
    margin-right: 0;
    max-width: none;
    padding: 24px 32px;
  }

  /* Remove padding extra do tab na parte de baixo */
  .pb-tab {
    padding-bottom: 24px;
  }

  /* Stats: 4 colunas no desktop */
  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Row fields col3 mantém 3 colunas em telas maiores */
  .row-fields.col3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* ── UTILITY CLASSES ── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 12px; }
.mt-2 { margin-top: 8px; }
.mb-2 { margin-bottom: 8px; }
.pb-tab { padding-bottom: 70px; }

/* DASHBOARD */
.dashboard-page {
  background:
    radial-gradient(circle at top left, rgba(135, 210, 19, 0.18), transparent 22%),
    linear-gradient(180deg, #f7fbf4 0%, #f3f8ff 100%);
}

.dashboard-layout {
  display: block;
  min-height: calc(100vh - 60px);
}

.dashboard-layout .dashboard-sidebar {
  flex: none;
}

.dashboard-topbar {
  position: sticky;
  top: 0;
  padding: 14px 18px;
  background: linear-gradient(90deg, #1D9E75 0%, var(--accent) 55%, #0F5041 100%);
  box-shadow: 0 14px 34px rgba(74, 133, 52, 0.26);
}

.dashboard-topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.dashboard-title-block {
  min-width: 0;
}

.dashboard-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-title-copy h2 {
  font-size: 18px;
}

.dashboard-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-admin-link a,
.dashboard-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.14);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-logout-btn {
  cursor: pointer;
}

.dashboard-menu-toggle,
.dashboard-menu-close {
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

.dashboard-menu-toggle {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255,255,255,0.16);
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.dashboard-menu-toggle span {
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

.dashboard-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 29, 22, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 120;
}

.dashboard-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.dashboard-sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  background: rgba(255,255,255,0.78);
  border-right: 1px solid rgba(184, 210, 186, 0.7);
  box-shadow: 16px 0 40px rgba(100, 139, 93, 0.08);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 220px;
  padding: 18px 0 28px;
  overflow-y: auto;
}

.dashboard-sidebar-header {
  display: none;
}

.dashboard-sidebar .tab-item {
  flex: none;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  border-radius: 24px;
  margin: 0 12px;
  padding: 18px 18px;
  min-height: 104px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: #34503d;
}

.dashboard-sidebar .tab-item.active {
  background: linear-gradient(180deg, rgba(29, 158, 117, 0.16), rgba(29, 158, 117, 0.08));
  color: #0F5041;
}

.dashboard-sidebar .tab-item:hover {
  background: rgba(29, 158, 117, 0.08);
}

.dashboard-sidebar .tab-icon {
  width: 28px;
  font-size: 24px;
  text-align: center;
  flex-shrink: 0;
}

.dashboard-nav-title {
  font-size: 15px;
  font-weight: 700;
  color: #34503d;
  line-height: 1.2;
}

.dashboard-nav-subtitle {
  display: none;
}

.dashboard-content {
  width: auto;
  max-width: none;
  margin-left: 220px;
  padding: 24px 26px 42px;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
  border-radius: 28px;
  padding: 24px;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at top right, rgba(135, 210, 19, 0.20), transparent 22%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(241, 249, 240, 0.96));
  border: 1px solid rgba(191, 219, 182, 0.9);
  box-shadow: 0 24px 46px rgba(120, 164, 98, 0.14);
}

.dashboard-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(29, 158, 117, 0.10);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-hero h1 {
  margin-top: 14px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  color: #26392c;
}

.dashboard-hero-text {
  max-width: 620px;
  margin-top: 12px;
  color: #678070;
  font-size: 16px;
  line-height: 1.45;
}

.dashboard-hero-meta {
  min-width: 220px;
  display: grid;
  gap: 12px;
}

.dashboard-meta-item {
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(198, 220, 192, 0.9);
}

.dashboard-meta-label {
  display: block;
  margin-bottom: 8px;
  color: #809184;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-meta-item strong {
  color: #304236;
  font-size: 18px;
}

.dashboard-stat-grid {
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-stat-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 18px 16px 20px;
  text-align: left;
  border: 1px solid rgba(191, 219, 182, 0.7);
  box-shadow: 0 18px 30px rgba(134, 164, 120, 0.10);
}

.dashboard-stat-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(29, 158, 117, 0.08), transparent 58%);
  pointer-events: none;
}

.dashboard-stat-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(29, 158, 117, 0.11);
  color: #396a24;
  margin-bottom: 18px;
}

.dashboard-stat-icon svg,
.dashboard-action-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-stat-box .stat-val {
  position: relative;
  font-size: 30px;
}

.dashboard-stat-box .stat-lbl {
  position: relative;
  margin-top: 8px;
  font-size: 12px;
}

.dashboard-actions-card,
.dashboard-info-card {
  border-radius: 28px;
  padding: 20px;
  border: 1px solid rgba(191, 219, 182, 0.7);
  box-shadow: 0 20px 36px rgba(134, 164, 120, 0.10);
}

.dashboard-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-section-text {
  margin-top: 6px;
  color: #708574;
  font-size: 14px;
}

.dashboard-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.dashboard-action-button {
  min-height: 92px;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 18px 18px;
  border-radius: 24px;
  text-align: left;
  gap: 14px;
}

.dashboard-action-button span:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-action-button strong {
  font-size: 16px;
}

.dashboard-action-button small {
  color: inherit;
  opacity: 0.78;
  font-size: 12px;
}

.dashboard-action-primary {
  box-shadow: 0 18px 28px rgba(29, 158, 117, 0.24);
}

.dashboard-action-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.dashboard-action-button.btn-outline .dashboard-action-icon {
  background: rgba(29, 158, 117, 0.10);
}

.dashboard-list-item {
  border-radius: 22px;
  padding: 16px 18px;
  border-color: rgba(191, 219, 182, 0.8);
  box-shadow: none;
}

.dashboard-list-item:hover {
  transform: translateY(-1px);
}

.dashboard-info-row {
  padding: 12px 0;
}

@media (max-width: 767px) {
  .dashboard-menu-toggle,
  .dashboard-menu-close {
    display: inline-flex;
  }

  .dashboard-topbar {
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
  }

  .dashboard-topbar-brand {
    min-width: 0;
  }

  .dashboard-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .dashboard-status-pill {
    font-size: 11px;
  }

  .dashboard-topbar-actions {
    margin-left: auto;
  }

  .dashboard-admin-link {
    display: none !important;
  }

  .dashboard-logout-btn {
    min-width: auto;
    padding: 0 12px;
  }

  .dashboard-layout {
    display: block;
  }

  .dashboard-sidebar {
    top: 0;
    left: 0;
    bottom: 0;
    width: min(82vw, 320px);
    position: fixed;
    z-index: 130;
    border-right: none;
    padding: 18px 12px 24px;
    transform: translateX(-100%);
    transition: transform .22s ease;
  }

  .dashboard-sidebar.open {
    transform: translateX(0);
  }

  .dashboard-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 4px 6px 12px;
  }

  .dashboard-sidebar-badge {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(29, 158, 117, 0.10);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
  }

  .dashboard-menu-close {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(29, 158, 117, 0.10);
    color: #386026;
    font-size: 24px;
  }

  .dashboard-sidebar .tab-item {
    margin: 0 2px;
    padding: 20px 18px;
    min-height: 98px;
  }

  .dashboard-content {
    padding: 18px 14px 34px;
  }

  .dashboard-hero {
    flex-direction: column;
    padding: 20px;
  }

  .dashboard-hero-text {
    font-size: 15px;
  }

  .dashboard-hero-meta {
    min-width: 0;
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-stat-grid,
  .dashboard-actions-grid {
    grid-template-columns: 1fr;
  }
}

/* APP PAGES */
.app-page {
  background:
    radial-gradient(circle at top left, rgba(135, 210, 19, 0.16), transparent 20%),
    linear-gradient(180deg, #f7fbf4 0%, #f3f8ff 100%);
}

.app-page .topbar {
  background: linear-gradient(90deg, #1D9E75 0%, var(--accent) 55%, #0F5041 100%);
  box-shadow: 0 14px 34px rgba(74, 133, 52, 0.22);
}

.app-page .container {
  max-width: 1180px;
  padding: 22px 26px 34px;
}

.app-page .card,
.app-surface {
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(191, 219, 182, 0.76);
  border-radius: 26px;
  padding: 20px;
  box-shadow: 0 18px 36px rgba(120, 160, 105, 0.10);
}

.app-page .card-title {
  color: #6d8173;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.app-page .field label {
  color: #677d6d;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.app-page .field input,
.app-page .field select,
.app-page .field textarea {
  min-height: 46px;
  border-radius: 16px;
  border-color: #d3dfd2;
  background: rgba(250, 252, 250, 0.95);
}

.app-page .field textarea {
  min-height: 110px;
  padding-top: 12px;
}

.app-page .field input:focus,
.app-page .field select:focus,
.app-page .field textarea:focus {
  box-shadow: 0 0 0 4px rgba(29, 158, 117, 0.10);
}

.app-page .btn {
  min-height: 48px;
  border-radius: 18px;
  font-weight: 700;
}

.app-page .btn-group {
  gap: 12px;
}

.app-page .list-item {
  border-radius: 22px;
  border: 1px solid rgba(191, 219, 182, 0.8);
  padding: 16px 18px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 12px 24px rgba(132, 166, 119, 0.08);
}

.app-page .list-item:hover {
  transform: translateY(-1px);
}

.app-page .badge {
  border-radius: 999px;
  font-weight: 700;
}

.app-shell {
  max-width: 1180px;
  margin: 0 auto;
}

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

.app-hero-copy h1 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
  color: #2f4134;
}

.app-hero-copy p {
  margin-top: 8px;
  color: #708573;
  font-size: 14px;
}

.app-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(29, 158, 117, 0.10);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.app-toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.app-toolbar .field {
  margin-bottom: 0;
  flex: 1;
  min-width: 180px;
}

.app-toolbar .btn {
  width: auto;
  padding: 0 18px;
}

.app-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.app-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(191, 219, 182, 0.8);
  color: #5d7463;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.app-chip.active {
  background: linear-gradient(180deg, rgba(29, 158, 117, 0.16), rgba(29, 158, 117, 0.08));
  border-color: rgba(29, 158, 117, 0.36);
  color: #0F5041;
}

.app-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-table-wrap {
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid rgba(191, 219, 182, 0.8);
  background: rgba(255,255,255,0.94);
}

.report-scroll-wrap {
  max-height: calc(100vh - 330px);
  overflow: auto;
  position: relative;
}

.report-sticky-table th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.report-sticky-table th:first-child,
.report-sticky-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 110px;
  background: #fff;
  box-shadow: 1px 0 0 rgba(191, 219, 182, 0.55);
}

.report-sticky-table th:first-child {
  z-index: 4;
  background: #edf7e9;
}

.report-sticky-table tbody tr:nth-child(even) td:first-child {
  background: #fbfdfb;
}

.report-sticky-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.report-sticky-table tfoot .report-total-pieces {
  font-weight: 800 !important;
  color: #102A22 !important;
  background: #DDEFE7 !important;
  font-size: 0.9rem !important;
  opacity: 1 !important;
  visibility: visible !important;
}


.report-sticky-table tfoot td:first-child {
  z-index: 3;
  background: #edf7e9;
}

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

.report-card-header .card-title {
  margin-bottom: 0;
}

.report-fullscreen-btn {
  flex-shrink: 0;
}

.report-export-btn {
  margin-left: auto;
  padding: 6px 10px !important;
  font-size: 0.76rem !important;
  opacity: 0.82;
}

.report-export-btn:hover {
  opacity: 1;
}

.report-fullscreen-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.report-fullscreen-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-table-card.is-fullscreen,
.report-table-card:fullscreen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 18px;
  border-radius: 0;
  overflow: hidden;
  background: var(--surface);
}

.report-table-card.is-fullscreen #tabelaContainer,
.report-table-card:fullscreen #tabelaContainer {
  flex: 1;
  min-height: 0;
}

.report-table-card.is-fullscreen .app-table-wrap,
.report-table-card:fullscreen .app-table-wrap {
  height: 100%;
  max-height: none;
  overflow: auto;
  border-radius: 12px;
}

.report-fullscreen-open .topbar,
.report-fullscreen-open .tab-bar {
  display: none;
}

.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.app-table th {
  padding: 12px 14px;
  text-align: left;
  background: rgba(29, 158, 117, 0.08);
  color: #58705d;
  font-size: 12px;
  white-space: nowrap;
}

.app-table td {
  padding: 12px 14px;
  border-top: 1px solid rgba(191, 219, 182, 0.4);
  vertical-align: middle;
}

.app-table tfoot td {
  background: rgba(29, 158, 117, 0.06);
  font-weight: 800;
}

.app-table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  width: auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 13px;
}

.page-topbar-accent-red {
  background: linear-gradient(90deg, #dc4d4d 0%, #c00000 100%) !important;
}

.page-topbar-accent-gold {
  background: linear-gradient(90deg, #d7a82f 0%, #7f6000 100%) !important;
}

.page-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-inline-note {
  margin-top: 10px;
  color: #7c8f80;
  font-size: 12px;
  text-align: center;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

@media (max-width: 767px) {
  .app-page .container {
    padding: 16px 14px 24px;
  }

  .app-page .card,
  .app-surface {
    border-radius: 22px;
    padding: 16px;
  }

  .app-hero {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .app-toolbar .field,
  .app-toolbar .btn {
    width: 100%;
  }

  .app-page .btn-group,
  .app-table-actions {
    flex-direction: column;
  }
}

/* PCP */
.pcp-page .container {
  max-width: 1320px;
}

.pcp-shell {
  position: relative;
}

.pcp-hero {
  align-items: center;
}

.pcp-view-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(237, 247, 232, 0.92));
  border: 1px solid rgba(151, 204, 136, 0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86), 0 10px 24px rgba(92, 140, 80, 0.08);
  flex-shrink: 0;
}

.pcp-view-tab {
  min-height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: 15px;
  background: transparent;
  color: #4f6756;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.pcp-view-tab::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #8fbf82;
  box-shadow: 0 0 0 3px rgba(143, 191, 130, 0.14);
}

.pcp-view-tab:hover {
  background: rgba(255,255,255,0.64);
  color: #0F5041;
}

.pcp-view-tab:focus-visible {
  outline: 3px solid rgba(29, 158, 117, 0.24);
  outline-offset: 2px;
}

.pcp-view-tab.active {
  background: linear-gradient(180deg, #ffffff 0%, #f8fff4 100%);
  color: #234d1b;
  box-shadow: 0 10px 20px rgba(29, 158, 117, 0.16), inset 0 -3px 0 #1D9E75;
  transform: translateY(-1px);
}

.pcp-view-tab.active::before {
  background: #1D9E75;
  box-shadow: 0 0 0 4px rgba(29, 158, 117, 0.16);
}

.pcp-view {
  display: none;
}

.pcp-view.active {
  display: block;
}

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

.pcp-muted {
  color: #708573;
  font-size: 13px;
}

.pcp-filter-bar {
  align-items: end;
}

.pcp-filter-bar .field {
  min-width: 150px;
}

.pcp-filter-bar button[type="submit"] {
  width: auto;
  padding: 0 18px;
}

.pcp-applied-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pcp-applied-filters span,
.pcp-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(29, 158, 117, 0.10);
  color: #45634b;
  font-size: 12px;
  font-weight: 800;
}

.pcp-state {
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
}

.pcp-state-info {
  background: var(--accent-light);
  color: var(--accent);
}

.pcp-state-warning {
  background: var(--yellow-bg);
  color: var(--yellow);
}

.pcp-state-empty {
  background: #f6f8f6;
  color: #708573;
}

.pcp-table-wrap {
  border-radius: 18px;
}

.pcp-table tbody tr {
  cursor: pointer;
}

.pcp-table tbody tr:hover td {
  background: rgba(29, 158, 117, 0.05);
}

.pcp-ok {
  color: #0F5041;
  font-weight: 800;
}

.pcp-risk {
  color: #b45309;
  font-weight: 800;
}

.pcp-priority-urgent {
  background: var(--red-bg);
  color: var(--red);
}

.pcp-priority-high {
  background: var(--yellow-bg);
  color: var(--yellow);
}

.pcp-priority-normal {
  background: var(--accent-light);
  color: var(--accent);
}

.pcp-priority-low {
  background: #edf2f0;
  color: #63756a;
}

/* Dashboard Supervisor */
.supervisor-dashboard-page .container {
  max-width: 1480px;
}

.supervisor-dashboard-page .app-hero-copy h1 {
  font-size: 24px;
  line-height: 1;
  margin: 4px 0 0;
}

.supervisor-dashboard-page .app-kicker {
  min-height: 22px;
  padding: 0 9px;
  font-size: 10px;
}

.supervisor-dashboard-page .pcp-card-head {
  margin-bottom: 8px;
}

.supervisor-dashboard-page .card-title {
  font-size: 11px;
}

.supervisor-dashboard-page .pcp-muted {
  font-size: 12px;
}

.supervisor-dashboard-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.supervisor-dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px !important;
}

.supervisor-dashboard-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.supervisor-dashboard-tabs {
  margin-left: auto;
}

.supervisor-dashboard-day-controls {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.supervisor-dashboard-date,
.supervisor-dashboard-toggle {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(151, 204, 136, 0.72);
  border-radius: 9px;
  background: #f8fbf7;
  color: #243f32;
  font-size: 12px;
  font-weight: 800;
}

.supervisor-dashboard-date input {
  height: 26px;
  border: none;
  background: transparent;
  color: #0f2f25;
  font: inherit;
  min-width: 136px;
}

.supervisor-dashboard-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #1D9E75;
}

.supervisor-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px;
}

.supervisor-dashboard-kpi {
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(191, 219, 182, 0.75);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(41, 68, 45, 0.07);
}

.supervisor-dashboard-kpi span {
  display: block;
  color: #65776a;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.supervisor-dashboard-kpi strong {
  display: block;
  margin-top: 4px;
  color: #102c24;
  font-size: 22px;
  line-height: 1;
}

.supervisor-dashboard-board-card {
  overflow: hidden;
  padding: 12px !important;
}

.supervisor-dashboard-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 11px;
  color: #5f7267;
  font-weight: 800;
}

.supervisor-dashboard-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.supervisor-dashboard-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.supervisor-dashboard-legend .is-op {
  background: #60a5fa;
}

.supervisor-dashboard-legend .is-start {
  background: #0ea5e9;
}

.supervisor-dashboard-legend .is-time {
  background: #818cf8;
}

.supervisor-dashboard-legend .is-units {
  background: #34d399;
}

.supervisor-dashboard-legend .is-stop {
  background: #ef4444;
}

.supervisor-dashboard-state {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}

.supervisor-dashboard-state.info {
  background: var(--accent-light);
  color: var(--accent);
}

.supervisor-dashboard-state.warning {
  background: var(--yellow-bg);
  color: var(--yellow);
}

.supervisor-dashboard-state.empty {
  background: #f6f8f6;
  color: #708573;
}

.supervisor-dashboard-board {
  --machine-label-width: 154px;
  border: 1px solid rgba(191, 219, 182, 0.75);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.supervisor-dashboard-ruler-row,
.supervisor-dashboard-row {
  display: grid;
  grid-template-columns: var(--machine-label-width) minmax(0, 1fr);
}

.supervisor-dashboard-ruler-label,
.supervisor-dashboard-machine {
  border-right: 1px solid rgba(191, 219, 182, 0.75);
  background: #fbfdf8;
  position: sticky;
  left: 0;
  z-index: 6;
}

.supervisor-dashboard-ruler-label {
  min-height: 26px;
  z-index: 7;
}

.supervisor-dashboard-ruler-scroll,
.supervisor-dashboard-lane-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x;
  user-select: none;
}

.supervisor-dashboard-ruler-scroll::-webkit-scrollbar,
.supervisor-dashboard-lane-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.supervisor-dashboard-ruler-scroll.is-dragging,
.supervisor-dashboard-lane-scroll.is-dragging {
  cursor: grabbing;
}

.supervisor-dashboard-ruler-scroll {
  border-bottom: 1px solid rgba(191, 219, 182, 0.75);
}

.supervisor-dashboard-ruler,
.supervisor-dashboard-lane {
  position: relative;
}

.supervisor-dashboard-ruler {
  height: 26px;
}

.supervisor-dashboard-ruler span {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  color: #20392f;
  font-size: 10px;
  font-weight: 900;
}

.supervisor-dashboard-row {
  min-height: 106px;
  border-bottom: 1px solid rgba(203, 220, 199, 0.46);
  box-shadow: inset 0 -10px 0 rgba(248, 251, 247, 0.72);
}

.supervisor-dashboard-row.is-idle {
  background: #fff3d8;
  box-shadow: inset 5px 0 0 #f79009, inset 0 -1px 0 rgba(176, 104, 0, 0.18);
}

.supervisor-dashboard-row:last-child {
  border-bottom: none;
}

.supervisor-dashboard-machine {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  max-width: var(--machine-label-width);
  overflow: hidden;
  padding: 0 12px;
  color: #0e2d24;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}

.supervisor-dashboard-machine > span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.supervisor-dashboard-row.is-idle .supervisor-dashboard-machine {
  background: #ffe4ad;
  color: #7a2e0e;
}

.supervisor-dashboard-machine small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  padding: 3px 6px;
  border-radius: 4px;
  background: #f79009;
  color: #b54708;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.supervisor-dashboard-row.is-idle .supervisor-dashboard-machine small {
  color: #3b1d00;
}

.supervisor-dashboard-machine small i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f79009;
}

.supervisor-dashboard-lane {
  min-height: 106px;
}

.supervisor-dashboard-lane.is-idle {
  background: #fff3d8;
}

.supervisor-dashboard-lane.is-idle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 49px;
  height: 2px;
  border-top: 2px dashed rgba(181, 71, 8, 0.72);
  pointer-events: none;
}

.supervisor-dashboard-baseline {
  position: absolute;
  left: 0;
  right: 0;
  top: 49px;
  height: 2px;
  background: rgba(16, 16, 16, 0.78);
  border-radius: 999px;
}

.supervisor-dashboard-hourline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(191, 219, 182, 0.42);
}

.supervisor-dashboard-cut {
  position: absolute;
  top: 46px;
  height: 6px;
  border-radius: 0;
  z-index: 2;
}

.supervisor-dashboard-cut.is-running {
  background: #101010;
  box-shadow: none;
}

.supervisor-dashboard-cut.is-waiting {
  background: #101010;
  box-shadow: none;
}

.supervisor-dashboard-cut.is-done {
  background: #101010;
}

.supervisor-dashboard-cut.has-stop {
  background-image: linear-gradient(90deg, #101010 0%, #101010 100%);
}

.supervisor-dashboard-cut-op {
  position: absolute;
  left: 28px;
  bottom: 17px;
  transform: none;
  width: max-content;
  max-width: none;
  padding: 1px 4px;
  border-radius: 4px;
  background: #eaf3ff;
  color: #0f3d6e;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  box-shadow: 0 0 0 2px #fff;
}

.supervisor-dashboard-stop {
  position: absolute;
  left: 0;
  top: 18px;
  max-width: calc(100% - 8px);
  min-height: 0;
  padding: 1px 4px;
  border-radius: 4px;
  background: #fff1f1;
  border: none;
  color: #b42318;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
  overflow: hidden;
  box-shadow: 0 0 0 2px #fff;
}

.supervisor-dashboard-finish {
  position: absolute;
  top: 50%;
  width: 1px;
  height: 1px;
  overflow: visible;
}

.supervisor-dashboard-start {
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 1px;
  overflow: visible;
}

.supervisor-dashboard-start-time {
  position: absolute;
  left: 0;
  bottom: 34px;
  transform: translateX(-50%);
  min-width: 54px;
  padding: 0;
  border-radius: 0;
  background: #e0f2fe;
  color: #075985;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 0 0 2px #fff;
  z-index: 4;
}

.supervisor-dashboard-start-dot {
  position: absolute;
  left: 0;
  top: -10px;
  width: 22px;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #fff;
  border: 5px solid #0ea5e9;
  box-shadow: 0 0 0 4px #fff;
  z-index: 5;
}

.supervisor-dashboard-finish-time,
.supervisor-dashboard-finish-units {
  position: absolute;
  left: 0;
  transform: translateX(-50%);
  min-width: 54px;
  padding: 0;
  border-radius: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  z-index: 4;
}

.supervisor-dashboard-finish-time {
  bottom: 34px;
  background: #f1f0ff;
  border: none;
  color: #312e81;
  box-shadow: 0 0 0 2px #fff;
}

.supervisor-dashboard-finish-units {
  top: 36px;
  background: #ecfdf3;
  border: none;
  color: #087443;
  box-shadow: 0 0 0 2px #fff;
}

.supervisor-dashboard-finish-dot {
  position: absolute;
  left: 0;
  top: -13px;
  width: 28px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #fff;
  border: 5px solid #101010;
  box-shadow: 0 0 0 4px #fff;
  z-index: 5;
}

@media (max-width: 900px) {
  .supervisor-dashboard-hero,
  .supervisor-dashboard-controls,
  .supervisor-dashboard-board-card .pcp-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .supervisor-dashboard-tabs {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .supervisor-dashboard-day-controls {
    justify-content: stretch;
    margin-top: 0;
  }

  .supervisor-dashboard-date,
  .supervisor-dashboard-toggle {
    width: 100%;
    justify-content: space-between;
  }

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

  .supervisor-dashboard-ruler-row,
  .supervisor-dashboard-row {
    grid-template-columns: var(--machine-label-width) minmax(0, 1fr);
  }

  .supervisor-dashboard-machine {
    padding: 0 8px;
    font-size: 10px;
  }
}

@media (max-width: 520px) {
  .supervisor-dashboard-board {
    --machine-label-width: 126px;
  }
}

@media (max-width: 520px) {
  .supervisor-dashboard-kpis {
    grid-template-columns: 1fr;
  }

  .supervisor-dashboard-legend {
    justify-content: flex-start;
  }
}

.pcp-drawer {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(18, 29, 22, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.pcp-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.pcp-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(760px, 94vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: -18px 0 48px rgba(41, 68, 45, 0.18);
  transform: translateX(100%);
  transition: transform .22s ease;
}

.pcp-drawer.open .pcp-drawer-panel {
  transform: translateX(0);
}

.pcp-drawer-header,
.pcp-drawer-footer {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(191, 219, 182, 0.7);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.pcp-drawer-footer {
  border-top: 1px solid rgba(191, 219, 182, 0.7);
  border-bottom: none;
  background: #f8fbf7;
}

.pcp-drawer-kicker {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

.pcp-drawer-header h2 {
  color: #2f4134;
  font-size: 20px;
  line-height: 1.2;
}

.pcp-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.pcp-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.pcp-detail-grid > div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(29, 158, 117, 0.07);
  border: 1px solid rgba(191, 219, 182, 0.7);
}

.pcp-detail-grid span,
.pcp-cut-row span {
  display: block;
  color: #748978;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.pcp-detail-grid strong {
  color: #2f4134;
}

.pcp-planning-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.pcp-planning-form .field {
  margin-bottom: 0;
}

.pcp-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 10px;
  color: #5f7564;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pcp-drawer-table-wrap {
  border-radius: 18px;
}

.pcp-material-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #f2f6f1;
}

.pcp-material-toggle button {
  min-height: 30px;
  padding: 0 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #65786a;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

.pcp-material-toggle button.active.pendente {
  background: var(--yellow-bg);
  color: var(--yellow);
}

.pcp-material-toggle button.active.disponivel {
  background: var(--green-bg);
  color: var(--green);
}

.pcp-material-toggle button.active.indisponivel {
  background: var(--red-bg);
  color: var(--red);
}

.pcp-material-select {
  min-width: 132px;
  min-height: 36px;
  border: 1px solid rgba(191, 219, 182, 0.9);
  border-radius: 12px;
  padding: 0 34px 0 12px;
  color: #4e6253;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  background: #f8fbf7;
  cursor: pointer;
}

.pcp-material-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(29, 158, 117, 0.10);
}

.pcp-material-select.pendente {
  background: var(--yellow-bg);
  color: var(--yellow);
  border-color: #ffd966;
}

.pcp-material-select.disponivel {
  background: var(--green-bg);
  color: var(--green);
  border-color: #a9d18e;
}

.pcp-material-select.indisponivel {
  background: var(--red-bg);
  color: var(--red);
  border-color: #f4aaaa;
}

.pcp-footer-actions {
  display: flex;
  gap: 8px;
}

.pcp-confirm-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pcp-confirm-columns h4 {
  color: #2f4134;
  margin-bottom: 8px;
}

.pcp-risk-list {
  padding-left: 18px;
  color: #5e705f;
  font-size: 13px;
  line-height: 1.5;
}

.pcp-confirm-actions {
  margin-top: 18px;
}

.pcp-op-card-list {
  display: grid;
  gap: 14px;
}

.pcp-op-card {
  border: 1px solid rgba(191, 219, 182, 0.8);
  border-radius: 22px;
  background: rgba(255,255,255,0.96);
  padding: 18px;
  box-shadow: 0 14px 28px rgba(132, 166, 119, 0.08);
}

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

.pcp-op-card-header h3 {
  color: #2f4134;
  font-size: 18px;
}

.pcp-op-card-header p {
  color: #708573;
  margin-top: 4px;
  font-size: 13px;
}

.pcp-op-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pcp-progress-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  color: #5e735f;
  font-size: 13px;
  margin-bottom: 14px;
}

.pcp-progress-bar {
  height: 12px;
  border-radius: 999px;
  background: #e7efe6;
  overflow: hidden;
  margin-top: 8px;
}

.pcp-progress-bar div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1D9E75, var(--accent));
}

.pcp-active-cuts {
  display: grid;
  gap: 8px;
}

.pcp-cut-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fbf7;
  border: 1px solid rgba(191, 219, 182, 0.55);
}

.pcp-cut-row strong {
  display: block;
  color: #2f4134;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.pcp-waiting {
  padding: 14px;
  border-radius: 16px;
  background: var(--yellow-bg);
  color: var(--yellow);
  font-weight: 800;
}

.pcp-child-ops {
  margin-top: 16px;
}

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

.pcp-child-op {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(191, 219, 182, 0.62);
}

.pcp-child-op strong,
.pcp-child-op span,
.pcp-child-op small {
  display: block;
}

.pcp-child-op strong {
  color: #2f4134;
  font-size: 13px;
}

.pcp-child-op span,
.pcp-child-op small {
  color: #708573;
  font-size: 12px;
  margin-top: 3px;
}

.pcp-child-op > div:last-child {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
  flex-shrink: 0;
}

/* SUPERVISOR */
.supervisor-alloc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.supervisor-alloc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(191, 219, 182, 0.8);
}

.supervisor-alloc-item strong {
  display: block;
  color: #2f4134;
  font-size: 14px;
}

.supervisor-alloc-item span {
  display: block;
  color: #708573;
  font-size: 12px;
  margin-top: 2px;
}

.supervisor-add-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(29, 158, 117, 0.05);
  border: 1px solid rgba(191, 219, 182, 0.7);
}

.supervisor-add-form .field {
  margin-bottom: 0;
}

.supervisor-derivadas-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.supervisor-derivada-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(191, 219, 182, 0.8);
  flex-wrap: wrap;
}

/* Busca por número de OP filha: realce da derivada que casou com o termo.
   A cor amarela é a mesma dos avisos de prioridade, para o supervisor ler
   como "olha aqui" e não como erro. */
.supervisor-derivada-item.is-match {
  border-color: #E0B75A;
  box-shadow: 0 0 0 2px rgba(224, 183, 90, 0.28);
}

.supervisor-match-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  vertical-align: middle;
}

/* Dica na linha da OP Origem quando ela entrou na lista por causa da filha. */
.supervisor-match-filha {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #8A6A1F;
}

.supervisor-derivada-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.supervisor-derivada-info strong {
  color: #2f4134;
  font-size: 14px;
}

.supervisor-derivada-info span {
  color: #708573;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.supervisor-derivada-maquina,
.supervisor-derivada-alocar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.supervisor-derivada-alocar select {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cdd9c8;
  background: #fff;
  min-width: 180px;
}

/* Alocacao multi-maquina: lista de chips + editar/adicionar */
.supervisor-derivada-maquinas {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  flex-shrink: 0;
}

.supervisor-derivada-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.supervisor-derivada-chip select {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cdd9c8;
  background: #fff;
  min-width: 180px;
}

@media (max-width: 900px) {
  .pcp-hero,
  .pcp-card-head,
  .pcp-op-card-header,
  .pcp-progress-row {
    flex-direction: column;
    display: flex;
    align-items: stretch;
  }

  .pcp-view-tabs,
  .pcp-filter-bar button[type="submit"],
  .pcp-card-head .btn {
    width: 100%;
  }

  .pcp-view-tab {
    flex: 1;
  }

  .pcp-detail-grid,
  .pcp-planning-form,
  .pcp-confirm-columns,
  .pcp-cut-row,
  .pcp-child-grid {
    grid-template-columns: 1fr;
  }

  .pcp-child-op {
    align-items: flex-start;
    flex-direction: column;
  }

  .pcp-child-op > div:last-child {
    align-items: flex-start;
    text-align: left;
  }

  .pcp-footer-actions {
    width: 100%;
    flex-direction: column;
  }

  .pcp-drawer-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ── Notificações PCP ────────────────────────────────────────────────────────── */

.topbar-notif {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #fff;
  flex-shrink: 0;
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #e74c3c;
  color: #fff;
  border-radius: 50%;
  font-size: 0.6rem;
  min-width: 17px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1;
  padding: 0 3px;
  pointer-events: none;
}

.notif-dropdown {
  position: fixed;
  top: 56px;
  right: 8px;
  width: 340px;
  max-width: calc(100vw - 16px);
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 300;
  max-height: 400px;
  overflow-y: auto;
}

.notif-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  font-weight: 600;
  font-size: 0.9rem;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.notif-item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f5f5f5;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item-content {
  flex: 1;
  font-size: 0.83rem;
  line-height: 1.4;
  color: #333;
}

.notif-item-time {
  font-size: 0.73rem;
  color: #999;
  margin-top: 0.3rem;
}

.notif-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #aaa;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}

.notif-dismiss:hover {
  color: #e74c3c;
}

.notif-empty {
  padding: 1.25rem 1rem;
  text-align: center;
  color: #999;
  font-size: 0.85rem;
}

/* ── Tablet (768px – 1024px) ─────────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1024px) {
  .container {
    max-width: 100%;
    padding: 14px 18px;
  }

  .dashboard-sidebar {
    width: 190px;
  }

  .dashboard-content {
    margin-left: 190px;
    padding: 18px 18px 34px;
  }

  .dashboard-sidebar .tab-item {
    padding: 14px 14px;
    min-height: 80px;
  }

  .pcp-view-tabs {
    flex-wrap: wrap;
  }

  .pcp-view-tab {
    flex: 1;
    min-width: 100px;
  }

  .app-table-wrap {
    font-size: 13px;
  }

  .pcp-planning-form,
  .pcp-detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card {
    padding: 16px;
  }

  .app-hero {
    flex-direction: row;
    align-items: center;
  }

  .modal-content {
    width: 90%;
    max-width: 640px;
  }
}

/* AMB Visual Identity Theme */
body {
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.topbar,
.dashboard-topbar,
.app-page .topbar {
  background: var(--escuro) !important;
  color: #fff;
  box-shadow: 0 10px 26px rgba(15,80,65,0.18) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.topbar h2,
.dashboard-title-copy h2 {
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.topbar-sub {
  color: rgba(255,255,255,0.68);
  opacity: 1;
}

.topbar-back,
.topbar-icon,
.topbar-notif,
.dashboard-menu-toggle,
.dashboard-logout-btn,
.dashboard-admin-link a,
.dashboard-status-pill {
  background: rgba(255,255,255,0.10) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  color: #fff !important;
  border-radius: 6px !important;
}

.topbar-back:hover,
.topbar-icon:hover,
.topbar-notif:hover,
.dashboard-logout-btn:hover,
.dashboard-admin-link a:hover {
  background: rgba(255,255,255,0.20) !important;
}

.container {
  max-width: 960px;
}

.app-page,
.dashboard-page,
.login-shell {
  background: var(--bg) !important;
}

.card,
.app-hero,
.dashboard-hero,
.dashboard-actions-card,
.dashboard-info-card,
.stat-box,
.dashboard-stat-box,
.corte-card,
.modal-content,
.pcp-drawer-panel,
.notif-dropdown {
  background: var(--surface) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

.card:hover,
.dashboard-stat-box:hover,
.corte-card:hover {
  border-color: var(--accent) !important;
  box-shadow: 0 8px 24px rgba(15,80,65,0.12) !important;
}

.app-hero,
.dashboard-hero,
.pcp-hero {
  background:
    radial-gradient(circle at top right, rgba(159,225,203,0.22), transparent 28%),
    var(--surface) !important;
}

.app-kicker,
.dashboard-kicker,
.login-eyebrow,
.card-title,
.pcp-drawer-kicker {
  color: var(--accent) !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
}

.app-hero h1,
.dashboard-hero h1,
.login-card h1,
.pcp-drawer-header h2 {
  color: var(--escuro) !important;
  font-weight: 800 !important;
  letter-spacing: -0.5px !important;
}

.app-hero p,
.dashboard-meta-label,
.dashboard-section-text,
.login-subtitle,
.pcp-muted,
.corte-subtitle,
.sub,
.field label {
  color: var(--text-muted) !important;
}

.btn,
.action-btn,
.pcp-view-tab,
.app-chip,
button,
input,
select,
textarea {
  font-family: 'Outfit', 'Segoe UI', sans-serif !important;
}

.btn {
  border-radius: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1px;
}

.btn-primary,
.btn-success,
.btn-finalizar {
  background: var(--escuro) !important;
  color: #fff !important;
  border: 1px solid var(--escuro) !important;
}

.btn-primary:hover:not(:disabled),
.btn-success:hover:not(:disabled),
.btn-finalizar:hover {
  background: linear-gradient(135deg, var(--accent), var(--escuro)) !important;
  filter: none !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(15,80,65,0.25) !important;
}

.btn-outline,
.btn-sec {
  background: transparent !important;
  color: var(--text-muted) !important;
  border: 1.5px solid var(--border) !important;
}

.btn-outline:hover:not(:disabled),
.btn-sec:hover {
  color: var(--escuro) !important;
  border-color: var(--escuro) !important;
  background: rgba(234,245,239,0.75) !important;
}

.btn-warning {
  background: var(--dourado) !important;
  color: var(--escuro) !important;
  border: 1px solid var(--dourado) !important;
}

.field input,
.field select,
.field textarea,
input,
select,
textarea {
  border: 1.5px solid var(--border) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--text) !important;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(29,158,117,0.12) !important;
}

.badge {
  border-radius: 20px !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
}

.badge-green,
.pcp-priority-normal {
  background: var(--card-light) !important;
  color: var(--accent) !important;
}

.badge-blue {
  background: #E7F0FF !important;
  color: #2563EB !important;
}

.badge-yellow,
.pcp-priority-high {
  background: #FEF3C7 !important;
  color: #92400E !important;
}

.badge-red,
.pcp-priority-urgent {
  background: #FEE2E2 !important;
  color: #991B1B !important;
}

.pcp-priority-low {
  background: #EDF2F0 !important;
  color: #63756A !important;
}

.stat-val,
.dashboard-stat-box .stat-val,
.kpi-valor {
  color: var(--escuro) !important;
  font-weight: 800 !important;
}

.stat-lbl,
.kpi-label,
.detail-label,
.dashboard-meta-label {
  color: var(--text-muted) !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
}

.dashboard-stat-box,
.stat-box {
  border-top: 3px solid var(--accent) !important;
}

.dashboard-stat-icon,
.dashboard-action-icon,
.card-icone {
  background: var(--card-light) !important;
  color: var(--accent) !important;
  border-radius: 10px !important;
}

.dashboard-action-primary .dashboard-action-icon {
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;
}

.app-table,
.pcp-table,
.report-sticky-table {
  border-collapse: collapse;
}

.app-table-wrap,
.pcp-table-wrap,
.report-table-card {
  border: 1.5px solid var(--border) !important;
  border-radius: 12px !important;
  background: var(--surface) !important;
}

.app-table th,
.pcp-table th,
.report-sticky-table th {
  background: var(--card-light) !important;
  color: var(--text-muted) !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid var(--border) !important;
}

.app-table td,
.pcp-table td,
.report-sticky-table td {
  color: var(--text) !important;
  border-bottom: 1px solid var(--border) !important;
}

.app-table tbody tr:hover td,
.pcp-table tbody tr:hover td,
.report-sticky-table tbody tr:hover td {
  background: #FAFCFB !important;
}

.app-toolbar,
.pcp-filter-bar,
.filtros-demo {
  background: var(--escuro) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 10px !important;
  padding: 12px 18px !important;
}

.app-toolbar label,
.pcp-filter-bar label {
  color: var(--mint) !important;
}

.app-toolbar input,
.app-toolbar select,
.pcp-filter-bar input,
.pcp-filter-bar select {
  background: rgba(255,255,255,0.12) !important;
  border: 1px solid rgba(255,255,255,0.20) !important;
  color: #fff !important;
}

.app-toolbar input::placeholder,
.pcp-filter-bar input::placeholder {
  color: rgba(255,255,255,0.55) !important;
}

.pcp-view-tabs {
  background: var(--surface) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

.pcp-view-tab {
  border-radius: 10px !important;
  color: var(--text-muted) !important;
}

.pcp-view-tab::before {
  background: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(29,158,117,0.14) !important;
}

.pcp-view-tab.active {
  background: var(--card-light) !important;
  color: var(--escuro) !important;
  box-shadow: inset 0 -3px 0 var(--accent) !important;
}

.pcp-drawer-header {
  background: var(--escuro) !important;
  color: #fff !important;
  border-bottom: none !important;
}

.pcp-drawer-header h2,
.pcp-drawer-header .pcp-drawer-kicker {
  color: #fff !important;
}

.modal-header,
.notif-dropdown-header {
  border-bottom: 1px solid var(--border) !important;
}

.login-shell {
  background:
    radial-gradient(circle at top left, rgba(29,158,117,0.14), transparent 24%),
    var(--bg) !important;
}

.login-pill,
.btn.btn-primary.login-submit {
  background: var(--escuro) !important;
}

.login-card {
  border: 1.5px solid var(--border) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(15,80,65,0.12) !important;
}

.report-fullscreen-icon svg,
.dashboard-stat-icon svg,
.dashboard-action-icon svg {
  stroke: currentColor;
}

/* Responsividade final: celular, tablet e desktop */
html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

.container,
.dashboard-content,
.app-page .container,
.pcp-page .container {
  width: 100%;
  min-width: 0;
}

.card,
.app-page .card,
.app-surface,
.dashboard-stat-box,
.dashboard-action-card,
.list-item,
.pcp-op-card,
.supervisor-alloc-item,
.supervisor-derivada-item {
  min-width: 0;
}

.topbar,
.dashboard-topbar,
.app-page .topbar {
  min-width: 0;
}

.topbar-title,
.dashboard-title-block,
.dashboard-topbar-brand,
.dashboard-topbar-actions {
  min-width: 0;
}

.topbar h2,
.topbar-sub,
.dashboard-user-line,
.dashboard-period-line,
.list-item .main,
.list-item .sub,
.pcp-op-card-header h3,
.supervisor-derivada-info strong,
.supervisor-derivada-info span {
  overflow-wrap: anywhere;
}

.app-hero,
.pcp-hero,
.report-card-header,
.pcp-card-head {
  min-width: 0;
}

.app-toolbar,
.pcp-filter-bar,
.report-filter-toolbar {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.app-toolbar .field,
.pcp-filter-bar .field,
.report-filter-toolbar .field {
  min-width: 0 !important;
  width: 100%;
}

/* O menu nativo do select abre sobre fundo branco no Windows/Chromium.
   Define contraste próprio para evitar opções brancas e ilegíveis. */
.report-filter-toolbar select option {
  background: #FFFFFF !important;
  color: #102A22 !important;
}

.app-toolbar .btn,
.pcp-filter-bar .btn,
.pcp-filter-bar button[type="submit"],
.report-filter-toolbar .btn {
  width: 100% !important;
}

.app-table-wrap,
.pcp-table-wrap,
.report-scroll-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.app-table,
.pcp-table,
.report-sticky-table {
  width: 100%;
  min-width: 720px;
}

.report-sticky-table {
  min-width: 1280px;
}

.pcp-view-tabs {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.pcp-view-tab {
  flex: 0 0 auto;
}

.pcp-drawer-panel,
.modal-content {
  max-width: calc(100vw - 24px);
}

.btn,
button,
input,
select,
textarea {
  max-width: 100%;
}

#descarteFields {
  overflow-x: auto;
}

#descarteFields > div {
  min-width: 360px;
}

@media (min-width: 1280px) {
  .app-page .container,
  .dashboard-content {
    padding-left: 36px !important;
    padding-right: 36px !important;
  }

  .dashboard-stat-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
  }

  .dashboard-actions-grid {
    grid-template-columns: repeat(4, minmax(210px, 1fr)) !important;
  }
}

@media (min-width: 768px) {
  .dashboard-content,
  .app-page .container,
  .container.app-sidebar-content {
    width: calc(100% - 206px) !important;
  }

  .dashboard-sidebar-collapsed .dashboard-content,
  .dashboard-sidebar-collapsed.app-page .container,
  .dashboard-sidebar-collapsed .container.app-sidebar-content {
    width: calc(100% - 72px) !important;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  .app-page .container,
  .dashboard-content {
    padding: 20px !important;
  }

  .dashboard-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .app-hero,
  .pcp-hero {
    align-items: flex-start !important;
  }

  .app-hero-copy {
    min-width: 0;
  }

  .pcp-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .pcp-cut-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  body {
    min-width: 0;
  }

  .dashboard-page::before,
  .app-page::before {
    display: none !important;
  }

  .topbar,
  .dashboard-topbar,
  .app-page .topbar {
    position: sticky !important;
    top: 0;
    left: 0 !important;
    width: 100% !important;
    margin-left: 0 !important;
    min-height: 56px !important;
    height: auto !important;
    padding: 8px 10px !important;
    gap: 8px !important;
  }

  .logo-top {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px;
  }

  .topbar-back,
  .topbar-icon,
  .topbar-notif,
  .dashboard-menu-toggle,
  .dashboard-action-pill {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
  }

  .dashboard-topbar-actions {
    gap: 6px !important;
  }

  .dashboard-status-pill,
  .dashboard-admin-pill,
  .dashboard-logout-btn {
    min-width: 0 !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  .topbar h2 {
    font-size: 16px !important;
    line-height: 1.1 !important;
  }

  .topbar-sub {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  .container,
  .dashboard-content,
  .app-page .container,
  .pcp-page .container {
    margin-left: 0 !important;
    padding: 14px 12px 24px !important;
    max-width: none !important;
  }

  .pb-tab {
    padding-bottom: 24px !important;
  }

  .card,
  .app-page .card,
  .app-surface,
  .dashboard-stat-box,
  .dashboard-action-card,
  .list-item,
  .pcp-op-card {
    border-radius: 12px !important;
    padding: 14px !important;
  }

  .app-hero,
  .pcp-hero,
  .report-card-header,
  .pcp-card-head,
  .pcp-op-card-header,
  .pcp-progress-row,
  .supervisor-alloc-item,
  .supervisor-derivada-item,
  .supervisor-derivada-maquina,
  .supervisor-derivada-maquinas,
  .supervisor-derivada-chip,
  .supervisor-derivada-alocar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .app-hero {
    gap: 12px !important;
    margin-bottom: 12px !important;
  }

  .app-hero-copy h1,
  .app-hero h1 {
    font-size: 26px !important;
    line-height: 1.1 !important;
  }

  .app-hero-copy p,
  .app-hero p {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  .row-fields,
  .row-fields.col2,
  .row-fields.col3,
  .pcp-detail-grid,
  .pcp-planning-form,
  .pcp-confirm-columns,
  .pcp-cut-row,
  .pcp-child-grid,
  .dashboard-stat-grid,
  .dashboard-actions-grid {
    grid-template-columns: 1fr !important;
  }

  .btn-group,
  .pcp-footer-actions,
  .pcp-drawer-footer {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .btn-group .btn,
  .pcp-footer-actions .btn,
  .pcp-drawer-footer .btn {
    width: 100% !important;
  }

  .app-toolbar,
  .pcp-filter-bar,
  .report-filter-toolbar {
    grid-template-columns: 1fr !important;
    padding: 12px !important;
  }

  .pcp-view-tabs {
    display: flex !important;
    width: 100% !important;
    padding: 4px !important;
  }

  .pcp-view-tab {
    min-width: max-content;
    min-height: 40px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
  }

  .app-table,
  .pcp-table {
    min-width: 680px;
  }

  .report-sticky-table {
    min-width: 1180px;
  }

  .report-scroll-wrap {
    max-height: calc(100vh - 250px);
  }

  .pcp-drawer-panel {
    inset: auto 0 0 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: min(92vh, 760px) !important;
    border-radius: 16px 16px 0 0 !important;
    transform: translateY(100%) !important;
  }

  .pcp-drawer.open .pcp-drawer-panel {
    transform: translateY(0) !important;
  }

  .pcp-drawer-header,
  .pcp-drawer-footer,
  .pcp-drawer-body {
    padding: 14px !important;
  }

  .pcp-drawer-header h2 {
    font-size: 18px !important;
  }

  .modal {
    padding: 10px !important;
    align-items: flex-end !important;
  }

  .modal-content {
    width: 100% !important;
    max-width: none !important;
    max-height: 92vh !important;
    border-radius: 16px 16px 0 0 !important;
    overflow: auto !important;
  }

  .notif-dropdown {
    position: fixed !important;
    top: 58px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
  }

  #descarteFields > div {
    min-width: 0 !important;
    grid-template-columns: 1fr 92px 100px !important;
  }
}

@media (max-width: 520px) {
  .dashboard-status-pill,
  .dashboard-admin-pill {
    display: none !important;
  }

  .dashboard-logout-btn {
    width: 38px !important;
    padding: 0 !important;
    font-size: 0 !important;
  }

  .dashboard-logout-btn::before {
    content: "Sair";
    font-size: 12px;
  }

  .app-hero-copy h1,
  .app-hero h1 {
    font-size: 24px !important;
  }

  .app-kicker {
    min-height: 24px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
  }

  .app-table th,
  .pcp-table th,
  .report-sticky-table th,
  .app-table td,
  .pcp-table td,
  .report-sticky-table td {
    padding: 10px !important;
    font-size: 12px !important;
  }

  .field input,
  .field select,
  .field textarea,
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .supervisor-derivada-alocar select,
  .supervisor-derivada-alocar .btn,
  .supervisor-derivada-chip select,
  .supervisor-derivada-chip .btn,
  .supervisor-derivada-chip .badge {
    width: 100% !important;
  }
}

@media (max-width: 380px) {
  .topbar,
  .dashboard-topbar,
  .app-page .topbar {
    padding: 7px 8px !important;
  }

  .container,
  .dashboard-content,
  .app-page .container,
  .pcp-page .container {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .card,
  .app-page .card,
  .dashboard-stat-box,
  .dashboard-action-card,
  .list-item,
  .pcp-op-card {
    padding: 12px !important;
  }

  #descarteFields {
    overflow-x: auto;
  }

  #descarteFields > div {
    min-width: 330px !important;
  }
}

/* Topbar: títulos alinhados no canto esquerdo */
.topbar,
.app-page .topbar {
  justify-content: flex-start !important;
  gap: 8px !important;
  padding-left: 10px !important;
}

.dashboard-topbar {
  justify-content: space-between !important;
  padding-left: 10px !important;
}

.topbar-title,
.dashboard-title-block {
  flex: 0 1 auto !important;
}

.logo-top img {
  margin-right: 0 !important;
}

@media (min-width: 768px) {
  .app-page .topbar,
  .dashboard-page .topbar {
    padding-left: 10px !important;
  }
}

@media (max-width: 767px) {
  .topbar,
  .dashboard-topbar,
  .app-page .topbar {
    padding-left: 8px !important;
  }
}

/* Tema escuro */
.dashboard-theme-toggle,
.login-theme-toggle {
  width: 38px;
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  background: rgba(255,255,255,0.10);
  color: #fff;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.dashboard-theme-toggle:hover,
.login-theme-toggle:hover {
  background: rgba(255,255,255,0.20);
  transform: translateY(-1px);
}

.topbar > .dashboard-theme-toggle,
.app-page .topbar > .dashboard-theme-toggle {
  margin-left: auto !important;
}

.dashboard-topbar-actions .dashboard-theme-toggle {
  margin-left: 0 !important;
}

.dashboard-theme-toggle svg,
.login-theme-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.theme-dark {
  --bg: #07130F;
  --surface: #0D1E18;
  --border: #203A32;
  --border-dark: #365A4E;
  --text: #EAF5EF;
  --text-muted: #9BB3A8;
  --accent: #36D39C;
  --accent-light: #12352A;
  --green: #9FE1CB;
  --green-bg: #12352A;
  --yellow: #F4C84D;
  --yellow-bg: #3B2D08;
  --red: #FF7B72;
  --red-bg: #3B1616;
  --shadow: 0 18px 42px rgba(0,0,0,0.34);
  --escuro: #07130F;
  --dourado: #F4C84D;
  --mint: #8FE8C8;
  --card-light: #12352A;
  background: #07130F !important;
  color: var(--text) !important;
  color-scheme: dark;
}

body.theme-dark.app-page,
body.theme-dark.dashboard-page,
body.theme-dark .login-shell,
body.theme-dark.login-shell {
  background:
    radial-gradient(circle at top left, rgba(54,211,156,0.12), transparent 24%),
    linear-gradient(180deg, #07130F 0%, #0A1914 100%) !important;
}

body.theme-dark .topbar,
body.theme-dark .dashboard-topbar,
body.theme-dark.app-page .topbar {
  background: #07130F !important;
  border-bottom-color: rgba(159,225,203,0.16) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,0.38) !important;
}

body.theme-dark.dashboard-page::before,
body.theme-dark.app-page::before {
  background: #07130F !important;
}

body.theme-dark .dashboard-sidebar {
  background: #0A1914 !important;
  border-right-color: #203A32 !important;
  color: #CFE5DC !important;
}

body.theme-dark .dashboard-sidebar .tab-item {
  color: #CFE5DC !important;
}

body.theme-dark .dashboard-sidebar .tab-item.active {
  background: #12352A !important;
  color: #EAF5EF !important;
  box-shadow: inset 3px 0 0 #36D39C !important;
}

body.theme-dark .dashboard-sidebar .tab-item:hover {
  background: #0F271F !important;
}

body.theme-dark .dashboard-sidebar-collapse {
  background: #12352A !important;
  border-color: #2B5448 !important;
  color: #9FE1CB !important;
}

body.theme-dark .dashboard-sidebar-header {
  color: #EAF5EF !important;
}

body.theme-dark .dashboard-sidebar-badge {
  background: #12352A !important;
  color: #9FE1CB !important;
}

body.theme-dark .dashboard-backdrop {
  background: rgba(0,0,0,0.58) !important;
}

body.theme-dark .card,
body.theme-dark .app-page .card,
body.theme-dark .app-surface,
body.theme-dark .login-card,
body.theme-dark .dashboard-stat-box,
body.theme-dark .dashboard-action-card,
body.theme-dark .dashboard-hero,
body.theme-dark .list-item,
body.theme-dark .pcp-op-card,
body.theme-dark .supervisor-alloc-item,
body.theme-dark .supervisor-derivada-item {
  background: rgba(13,30,24,0.96) !important;
  border-color: #203A32 !important;
  box-shadow: 0 18px 42px rgba(0,0,0,0.28) !important;
  color: #EAF5EF !important;
}

/* Vem depois da regra acima de propósito: o !important dela sobrescreveria o
   realce da busca e a filha encontrada ficaria igual às outras no tema escuro. */
body.theme-dark .supervisor-derivada-item.is-match {
  border-color: #E0B75A !important;
  box-shadow: 0 0 0 2px rgba(224, 183, 90, 0.35) !important;
}

body.theme-dark .supervisor-match-filha {
  color: #E0B75A;
}

body.theme-dark .app-hero h1,
body.theme-dark .app-hero-copy h1,
body.theme-dark .dashboard-hero-title,
body.theme-dark .card-title,
body.theme-dark .pcp-drawer-header h2,
body.theme-dark .pcp-op-card-header h3,
body.theme-dark .pcp-detail-grid strong,
body.theme-dark .pcp-child-op strong,
body.theme-dark .supervisor-alloc-item strong,
body.theme-dark .supervisor-derivada-info strong,
body.theme-dark .info-row .value,
body.theme-dark .dashboard-info-row .value,
body.theme-dark .login-card h1 {
  color: #EAF5EF !important;
}

body.theme-dark .app-hero p,
body.theme-dark .topbar-sub,
body.theme-dark .dashboard-period-line,
body.theme-dark .dashboard-user-line,
body.theme-dark .pcp-muted,
body.theme-dark .list-item .sub,
body.theme-dark .pcp-op-card-header p,
body.theme-dark .pcp-child-op span,
body.theme-dark .pcp-child-op small,
body.theme-dark .supervisor-alloc-item span,
body.theme-dark .supervisor-derivada-info span,
body.theme-dark .login-subtitle,
body.theme-dark .text-small {
  color: #9BB3A8 !important;
}

body.theme-dark .app-kicker,
body.theme-dark .login-eyebrow,
body.theme-dark .pcp-chip,
body.theme-dark .pcp-applied-filters span {
  background: #12352A !important;
  color: #8FE8C8 !important;
}

body.theme-dark .field label,
body.theme-dark .app-page .field label,
body.theme-dark .stat-lbl,
body.theme-dark .kpi-label,
body.theme-dark .detail-label,
body.theme-dark .dashboard-meta-label,
body.theme-dark .pcp-detail-grid span,
body.theme-dark .pcp-cut-row span {
  color: #9BB3A8 !important;
}

body.theme-dark .field input,
body.theme-dark .field select,
body.theme-dark .field textarea,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background: #07130F !important;
  border-color: #2B5448 !important;
  color: #EAF5EF !important;
}

body.theme-dark .field input::placeholder,
body.theme-dark .field textarea::placeholder,
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #738C82 !important;
}

body.theme-dark .field input:focus,
body.theme-dark .field select:focus,
body.theme-dark .field textarea:focus,
body.theme-dark input:focus,
body.theme-dark select:focus,
body.theme-dark textarea:focus {
  border-color: #36D39C !important;
  box-shadow: 0 0 0 4px rgba(54,211,156,0.16) !important;
}

body.theme-dark .app-toolbar,
body.theme-dark .pcp-filter-bar,
body.theme-dark .filtros-demo {
  background: #07130F !important;
  border-color: #203A32 !important;
}

body.theme-dark .app-toolbar input,
body.theme-dark .app-toolbar select,
body.theme-dark .pcp-filter-bar input,
body.theme-dark .pcp-filter-bar select {
  background: #0D1E18 !important;
  border-color: #2B5448 !important;
  color: #EAF5EF !important;
}

body.theme-dark .btn-outline,
body.theme-dark .btn-sec {
  background: transparent !important;
  border-color: #365A4E !important;
  color: #CFE5DC !important;
}

body.theme-dark .btn-outline:hover:not(:disabled),
body.theme-dark .btn-sec:hover {
  background: #12352A !important;
  border-color: #36D39C !important;
  color: #EAF5EF !important;
}

body.theme-dark .btn-primary,
body.theme-dark .btn-success,
body.theme-dark .btn-finalizar {
  background: #1D9E75 !important;
  border-color: #36D39C !important;
  color: #07130F !important;
}

body.theme-dark .btn-danger {
  background: #B42318 !important;
  color: #fff !important;
}

body.theme-dark .app-table-wrap,
body.theme-dark .pcp-table-wrap,
body.theme-dark .report-table-card,
body.theme-dark .report-scroll-wrap {
  background: #0D1E18 !important;
  border-color: #203A32 !important;
}

body.theme-dark .app-table th,
body.theme-dark .pcp-table th,
body.theme-dark .report-sticky-table th {
  background: #12352A !important;
  color: #9FE1CB !important;
  border-bottom-color: #203A32 !important;
}

body.theme-dark .app-table td,
body.theme-dark .pcp-table td,
body.theme-dark .report-sticky-table td {
  background: #0D1E18 !important;
  color: #EAF5EF !important;
  border-bottom-color: #203A32 !important;
}

body.theme-dark .app-table tbody tr:hover td,
body.theme-dark .pcp-table tbody tr:hover td,
body.theme-dark .report-sticky-table tbody tr:hover td {
  background: #12352A !important;
}

body.theme-dark .report-sticky-table th:first-child,
body.theme-dark .report-sticky-table td:first-child,
body.theme-dark .report-sticky-table tfoot td,
body.theme-dark .report-sticky-table tfoot td:first-child {
  background: #12352A !important;
}

body.theme-dark .pcp-view-tabs,
body.theme-dark .tab-nav {
  background: #07130F !important;
  border-color: #203A32 !important;
}

body.theme-dark .pcp-view-tab,
body.theme-dark .tab-nav button {
  color: #9BB3A8 !important;
}

body.theme-dark .pcp-view-tab.active,
body.theme-dark .tab-nav button.active {
  background: #12352A !important;
  color: #EAF5EF !important;
  box-shadow: inset 0 -3px 0 #36D39C !important;
}

body.theme-dark .pcp-drawer {
  background: rgba(0,0,0,0.62) !important;
}

body.theme-dark .pcp-drawer-panel,
body.theme-dark .modal-content,
body.theme-dark .notif-dropdown {
  background: #0D1E18 !important;
  border-color: #203A32 !important;
  color: #EAF5EF !important;
}

body.theme-dark .pcp-drawer-header {
  background: #07130F !important;
  border-bottom-color: #203A32 !important;
}

body.theme-dark .pcp-drawer-footer,
body.theme-dark .modal-header,
body.theme-dark .notif-dropdown-header {
  background: #0A1914 !important;
  border-color: #203A32 !important;
}

body.theme-dark .pcp-detail-grid > div,
body.theme-dark .pcp-cut-row,
body.theme-dark .pcp-child-op,
body.theme-dark .supervisor-add-form {
  background: #0A1914 !important;
  border-color: #203A32 !important;
}

body.theme-dark .badge-green,
body.theme-dark .pcp-priority-normal {
  background: #12352A !important;
  color: #8FE8C8 !important;
}

body.theme-dark .badge-blue {
  background: #10213A !important;
  color: #93C5FD !important;
}

body.theme-dark .badge-yellow,
body.theme-dark .pcp-priority-high,
body.theme-dark .pcp-waiting {
  background: #3B2D08 !important;
  color: #F4C84D !important;
}

body.theme-dark .badge-red,
body.theme-dark .pcp-priority-urgent {
  background: #3B1616 !important;
  color: #FFB4AA !important;
}

body.theme-dark .pcp-priority-low {
  background: #17231F !important;
  color: #A8BDB4 !important;
}

body.theme-dark .dashboard-stat-icon,
body.theme-dark .dashboard-action-icon,
body.theme-dark .card-icone {
  background: #12352A !important;
  color: #8FE8C8 !important;
}

body.theme-dark .alert,
body.theme-dark .empty-state {
  background: #0A1914 !important;
  border-color: #203A32 !important;
  color: #CFE5DC !important;
}

body.theme-dark .login-pill {
  background: #0D1E18 !important;
  border: 1px solid #203A32 !important;
  color: #CFE5DC !important;
}

.login-theme-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 20;
  background: #0F5041;
}

body.theme-dark .login-theme-toggle {
  background: #12352A;
  border-color: #2B5448;
  color: #9FE1CB;
}

/* Contraste final do modo escuro */
body.theme-dark,
body.theme-dark main,
body.theme-dark section,
body.theme-dark article,
body.theme-dark div,
body.theme-dark p,
body.theme-dark span,
body.theme-dark small,
body.theme-dark strong,
body.theme-dark b,
body.theme-dark li,
body.theme-dark td,
body.theme-dark th,
body.theme-dark label,
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark h5,
body.theme-dark h6,
body.theme-dark a {
  color: #EAF5EF !important;
}

body.theme-dark .topbar-sub,
body.theme-dark .dashboard-period-line,
body.theme-dark .dashboard-user-line,
body.theme-dark .app-hero p,
body.theme-dark .list-item .sub,
body.theme-dark .text-small,
body.theme-dark small,
body.theme-dark .pcp-muted,
body.theme-dark .stat-lbl,
body.theme-dark .kpi-label,
body.theme-dark .detail-label,
body.theme-dark .dashboard-meta-label,
body.theme-dark .field label,
body.theme-dark .pcp-detail-grid span,
body.theme-dark .pcp-cut-row span,
body.theme-dark .pcp-child-op span,
body.theme-dark .pcp-child-op small,
body.theme-dark .supervisor-alloc-item span,
body.theme-dark .supervisor-derivada-info span {
  color: #BFD4CA !important;
}

body.theme-dark .app-kicker,
body.theme-dark .login-eyebrow,
body.theme-dark .pcp-chip,
body.theme-dark .pcp-applied-filters span,
body.theme-dark .badge,
body.theme-dark .pcp-priority-urgent,
body.theme-dark .pcp-priority-high,
body.theme-dark .pcp-priority-normal,
body.theme-dark .pcp-priority-low {
  color: #F4FFFA !important;
}

body.theme-dark .btn,
body.theme-dark button,
body.theme-dark .btn-primary,
body.theme-dark .btn-success,
body.theme-dark .btn-finalizar,
body.theme-dark .btn-warning,
body.theme-dark .btn-danger,
body.theme-dark .dashboard-action-card,
body.theme-dark .dashboard-action-card *,
body.theme-dark .dashboard-action-primary,
body.theme-dark .dashboard-action-primary * {
  color: #F4FFFA !important;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark option {
  color: #F4FFFA !important;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #9BB3A8 !important;
}

/* Superfícies finais do modo escuro */
body.theme-dark .card,
body.theme-dark [class*="card"],
body.theme-dark [class*="Card"],
body.theme-dark .app-surface,
body.theme-dark .list-item,
body.theme-dark .info-row,
body.theme-dark .stat-box,
body.theme-dark .stat-item,
body.theme-dark .kpi-card,
body.theme-dark .dashboard-hero,
body.theme-dark .dashboard-stat-box,
body.theme-dark .dashboard-action-card,
body.theme-dark .dashboard-meta-item,
body.theme-dark .dashboard-info-row,
body.theme-dark .app-table-wrap,
body.theme-dark .pcp-table-wrap,
body.theme-dark .report-table-card,
body.theme-dark .report-scroll-wrap,
body.theme-dark .pcp-view-tabs,
body.theme-dark .pcp-drawer-panel,
body.theme-dark .pcp-detail-grid > div,
body.theme-dark .pcp-cut-row,
body.theme-dark .pcp-child-op,
body.theme-dark .pcp-op-card,
body.theme-dark .supervisor-alloc-item,
body.theme-dark .supervisor-derivada-item,
body.theme-dark .supervisor-add-form,
body.theme-dark .modal-content,
body.theme-dark .notif-dropdown,
body.theme-dark .empty-state,
body.theme-dark .alert,
body.theme-dark .login-card,
body.theme-dark .tab-content,
body.theme-dark .tab-nav,
body.theme-dark #tempoResumo,
body.theme-dark #saldoAlert,
body.theme-dark #consumoAlert {
  background: #0D1E18 !important;
  background-color: #0D1E18 !important;
  border-color: #203A32 !important;
  color: #EAF5EF !important;
  box-shadow: 0 18px 42px rgba(0,0,0,0.28) !important;
}

body.theme-dark .card *,
body.theme-dark [class*="card"] *,
body.theme-dark [class*="Card"] *,
body.theme-dark .app-surface *,
body.theme-dark .list-item *,
body.theme-dark .dashboard-stat-box *,
body.theme-dark .dashboard-action-card *,
body.theme-dark .pcp-op-card *,
body.theme-dark .modal-content *,
body.theme-dark .login-card * {
  color: inherit;
}

body.theme-dark .app-table th,
body.theme-dark .pcp-table th,
body.theme-dark .report-sticky-table th,
body.theme-dark .pcp-drawer-header,
body.theme-dark .pcp-drawer-footer,
body.theme-dark .modal-header,
body.theme-dark .notif-dropdown-header {
  background: #07130F !important;
  background-color: #07130F !important;
}

body.theme-dark .app-table td,
body.theme-dark .pcp-table td,
body.theme-dark .report-sticky-table td,
body.theme-dark .app-table tbody tr,
body.theme-dark .pcp-table tbody tr,
body.theme-dark .report-sticky-table tbody tr {
  background: #0D1E18 !important;
  background-color: #0D1E18 !important;
}

body.theme-dark .stat-val,
body.theme-dark .dashboard-stat-box .stat-val,
body.theme-dark .dashboard-stat-box .stat-val *,
body.theme-dark .kpi-valor {
  color: #F4FFFA !important;
  text-shadow: none !important;
}

body.theme-dark .supervisor-dashboard-date,
body.theme-dark .supervisor-dashboard-toggle,
body.theme-dark .supervisor-dashboard-kpi,
body.theme-dark .supervisor-dashboard-board,
body.theme-dark .supervisor-dashboard-ruler-label,
body.theme-dark .supervisor-dashboard-machine {
  background: #10261f !important;
  border-color: rgba(87, 131, 111, 0.75) !important;
  color: #edf7f1 !important;
}

body.theme-dark .supervisor-dashboard-date input,
body.theme-dark .supervisor-dashboard-kpi strong,
body.theme-dark .supervisor-dashboard-ruler span,
body.theme-dark .supervisor-dashboard-machine {
  color: #f7fff9 !important;
}

body.theme-dark .supervisor-dashboard-kpi span,
body.theme-dark .supervisor-dashboard-legend,
body.theme-dark .supervisor-dashboard-state.empty {
  color: #b7cabc !important;
}

body.theme-dark .supervisor-dashboard-row.is-idle {
  background: #3a260b !important;
  box-shadow: inset 5px 0 0 #f59e0b, inset 0 -1px 0 rgba(251, 191, 36, 0.16) !important;
}

body.theme-dark .supervisor-dashboard-row.is-idle .supervisor-dashboard-machine {
  background: #4a310d !important;
  color: #fff7df !important;
}

body.theme-dark .supervisor-dashboard-machine small {
  background: #f59e0b !important;
  color: #2b1600 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

body.theme-dark .supervisor-dashboard-machine small i {
  background: #f59e0b !important;
}

body.theme-dark .supervisor-dashboard-lane.is-idle::after {
  border-top-color: rgba(251, 191, 36, 0.85) !important;
}

body.theme-dark .supervisor-dashboard-ruler-scroll,
body.theme-dark .supervisor-dashboard-row {
  border-color: rgba(87, 131, 111, 0.6) !important;
}

body.theme-dark .supervisor-dashboard-hourline {
  background: rgba(87, 131, 111, 0.42) !important;
}

body.theme-dark .supervisor-dashboard-row {
  border-bottom-color: rgba(87, 131, 111, 0.34) !important;
  box-shadow: inset 0 -10px 0 rgba(10, 25, 19, 0.72);
}

body.theme-dark .supervisor-dashboard-finish-dot {
  box-shadow: 0 0 0 4px #10261f;
}

body.theme-dark .supervisor-dashboard-cut,
body.theme-dark .supervisor-dashboard-cut.is-running,
body.theme-dark .supervisor-dashboard-cut.is-waiting,
body.theme-dark .supervisor-dashboard-cut.is-done,
body.theme-dark .supervisor-dashboard-baseline {
  background: #f4fff7 !important;
}

body.theme-dark .supervisor-dashboard-cut-op {
  background: #14365d !important;
  color: #dcecff !important;
  box-shadow: 0 0 0 2px #10261f !important;
}

body.theme-dark .supervisor-dashboard-stop {
  background: #4a1414 !important;
  color: #ffd6d6 !important;
  box-shadow: 0 0 0 2px #10261f !important;
}

body.theme-dark .supervisor-dashboard-finish-time {
  background: #27215c !important;
  color: #e4e0ff !important;
  box-shadow: 0 0 0 2px #10261f !important;
}

body.theme-dark .supervisor-dashboard-finish-units {
  background: #123d2a !important;
  color: #c8f9dc !important;
  box-shadow: 0 0 0 2px #10261f !important;
}

body.theme-dark .supervisor-dashboard-finish-dot {
  background: #10261f !important;
  border-color: #f4fff7 !important;
}

body.theme-dark .supervisor-dashboard-start-time {
  background: #123f57 !important;
  color: #d8f1ff !important;
  box-shadow: 0 0 0 2px #10261f !important;
}

body.theme-dark .supervisor-dashboard-start-dot {
  background: #10261f !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 4px #10261f !important;
}

/* Dashboard supervisor: dark theme tuned for timeline readability */
body.theme-dark.supervisor-dashboard-page {
  background: #08130f !important;
}

body.theme-dark .supervisor-dashboard-board-card {
  background: #0d1f18 !important;
  border-color: #24443a !important;
}

body.theme-dark .supervisor-dashboard-board {
  background: #0a1813 !important;
  border-color: #2a4d42 !important;
}

body.theme-dark .supervisor-dashboard-ruler-label,
body.theme-dark .supervisor-dashboard-ruler-scroll,
body.theme-dark .supervisor-dashboard-machine {
  background: #0b1b15 !important;
  border-color: #28483e !important;
}

body.theme-dark .supervisor-dashboard-ruler {
  background: #10261f !important;
}

body.theme-dark .supervisor-dashboard-ruler span {
  color: #d9f4e5 !important;
}

body.theme-dark .supervisor-dashboard-row {
  background: #0d211a !important;
  border-bottom-color: rgba(83, 124, 106, 0.48) !important;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.03) !important;
}

body.theme-dark .supervisor-dashboard-lane {
  background: #0d211a !important;
}

body.theme-dark .supervisor-dashboard-row:nth-child(even),
body.theme-dark .supervisor-dashboard-row:nth-child(even) .supervisor-dashboard-lane {
  background: #10271f !important;
}

body.theme-dark .supervisor-dashboard-hourline {
  background: rgba(164, 190, 177, 0.24) !important;
}

body.theme-dark .supervisor-dashboard-baseline {
  background: rgba(222, 242, 232, 0.5) !important;
}

body.theme-dark .supervisor-dashboard-row.is-idle {
  background: #3a260b !important;
  box-shadow: inset 5px 0 0 #f59e0b, inset 0 -1px 0 rgba(251, 191, 36, 0.16) !important;
}

body.theme-dark .supervisor-dashboard-row.is-idle .supervisor-dashboard-lane {
  background: #3a260b !important;
}

body.theme-dark .supervisor-dashboard-row.is-idle .supervisor-dashboard-machine {
  background: #4a310d !important;
  color: #fff7df !important;
}

body.theme-dark .supervisor-dashboard-machine small {
  background: #f59e0b !important;
  color: #2b1600 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

body.theme-dark .supervisor-dashboard-machine small i {
  background: #7c2d12 !important;
}

body.theme-dark .supervisor-dashboard-lane.is-idle::after {
  border-top-color: rgba(251, 191, 36, 0.85) !important;
}

body.theme-dark .supervisor-dashboard-cut,
body.theme-dark .supervisor-dashboard-cut.is-running,
body.theme-dark .supervisor-dashboard-cut.is-waiting,
body.theme-dark .supervisor-dashboard-cut.is-done {
  background: #f8fffb !important;
}

body.theme-dark .supervisor-dashboard-cut-op {
  background: #173d63 !important;
  color: #e7f4ff !important;
  box-shadow: 0 0 0 2px #0d211a !important;
}

body.theme-dark .supervisor-dashboard-start-time {
  background: #12384b !important;
  color: #dff5ff !important;
  box-shadow: 0 0 0 2px #0d211a !important;
}

body.theme-dark .supervisor-dashboard-finish-time {
  background: #2b2766 !important;
  color: #e8e5ff !important;
  box-shadow: 0 0 0 2px #0d211a !important;
}

body.theme-dark .supervisor-dashboard-finish-units {
  background: #123b2b !important;
  color: #caf8df !important;
  box-shadow: 0 0 0 2px #0d211a !important;
}

body.theme-dark .supervisor-dashboard-stop {
  background: #541b1b !important;
  color: #ffdada !important;
  box-shadow: 0 0 0 2px #0d211a !important;
}

body.theme-dark .supervisor-dashboard-start-dot {
  background: #0d211a !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 4px #0d211a !important;
}

body.theme-dark .supervisor-dashboard-finish-dot {
  background: #0d211a !important;
  border-color: #f8fffb !important;
  box-shadow: 0 0 0 4px #0d211a !important;
}

/* Acompanhamento do dia: timeline compacta no padrao operacional */
.supervisor-dashboard-page .supervisor-dashboard-shell {
  width: calc(100% - 20px);
  max-width: none;
  margin: 0 auto;
  padding-top: 12px;
}

.supervisor-dashboard-page .supervisor-dashboard-board-card {
  padding: 4px !important;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.supervisor-dashboard-page .supervisor-dashboard-board-card .pcp-card-head {
  align-items: flex-start;
  padding: 0 0 12px;
}

.supervisor-dashboard-page .supervisor-dashboard-board-card .card-title {
  margin: 0 0 4px;
  color: #004d40;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
}

.supervisor-dashboard-page .supervisor-dashboard-board-card .pcp-muted {
  margin: 0;
  color: #526b63;
  font-size: 11px;
}

.supervisor-dashboard-page .supervisor-dashboard-controls {
  opacity: .78;
}

.supervisor-dashboard-page .supervisor-dashboard-date,
.supervisor-dashboard-page .supervisor-dashboard-toggle {
  min-height: 30px;
  padding: 0 8px;
  border-color: #d9e5e0;
  border-radius: 6px;
  background: #fff;
  font-size: 10px;
}

.supervisor-dashboard-page .supervisor-dashboard-board {
  --machine-label-width: 170px;
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.supervisor-dashboard-page .supervisor-dashboard-ruler-label,
.supervisor-dashboard-page .supervisor-dashboard-machine {
  border-right: 0;
  background: #fff;
}

.supervisor-dashboard-page .supervisor-dashboard-ruler-label,
.supervisor-dashboard-page .supervisor-dashboard-ruler,
.supervisor-dashboard-page .supervisor-dashboard-ruler-scroll {
  min-height: 30px;
  height: 30px;
}

.supervisor-dashboard-page .supervisor-dashboard-ruler-scroll {
  border-bottom: 1px solid #d9e5e0;
}

.supervisor-dashboard-page .supervisor-dashboard-ruler span {
  top: 3px;
  color: #526b63;
  font-size: 10px;
  font-weight: 500;
}

.supervisor-dashboard-page .supervisor-dashboard-row,
.supervisor-dashboard-page .supervisor-dashboard-lane {
  min-height: 96px;
  background: #fff !important;
  box-shadow: none !important;
}

.supervisor-dashboard-page .supervisor-dashboard-row.is-idle,
.supervisor-dashboard-page .supervisor-dashboard-row.is-idle .supervisor-dashboard-machine,
.supervisor-dashboard-page .supervisor-dashboard-row.is-idle .supervisor-dashboard-lane {
  background: #fff7e6 !important;
}

.supervisor-dashboard-page .supervisor-dashboard-row.is-idle .supervisor-dashboard-machine {
  box-shadow: inset 4px 0 0 #f59e0b !important;
}

.supervisor-dashboard-page .supervisor-dashboard-row,
.supervisor-dashboard-page .supervisor-dashboard-row.is-idle {
  border-bottom: 1px solid #d9e5e0;
}

.supervisor-dashboard-page .supervisor-dashboard-machine,
.supervisor-dashboard-page .supervisor-dashboard-row.is-idle .supervisor-dashboard-machine {
  justify-content: center;
  padding: 0 4px;
  background: #fff !important;
  color: #004d40 !important;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.supervisor-dashboard-page .supervisor-dashboard-machine small,
.supervisor-dashboard-page .supervisor-dashboard-row.is-idle .supervisor-dashboard-machine small {
  position: absolute;
  left: calc(var(--machine-label-width) + 8px);
  width: max-content;
  margin: 0;
  padding: 0;
  background: transparent !important;
  color: #61776f !important;
  font-size: 10px;
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  z-index: 8;
}

.supervisor-dashboard-page .supervisor-dashboard-lane.is-idle::after,
.supervisor-dashboard-page .supervisor-dashboard-hourline {
  display: none;
}

.supervisor-dashboard-page .supervisor-dashboard-baseline {
  top: 47px;
  height: 1px;
  background: #d9e5e0 !important;
}

.supervisor-dashboard-page .supervisor-dashboard-cut,
.supervisor-dashboard-page .supervisor-dashboard-cut.is-running,
.supervisor-dashboard-page .supervisor-dashboard-cut.is-waiting,
.supervisor-dashboard-page .supervisor-dashboard-cut.is-done,
.supervisor-dashboard-page .supervisor-dashboard-cut.has-stop {
  top: 44px;
  height: 7px;
  border-radius: 4px;
  background: #075b4c !important;
  background-image: none;
}

.supervisor-dashboard-page .supervisor-dashboard-cut.is-running,
.supervisor-dashboard-page .supervisor-dashboard-cut.is-waiting {
  background: #1c9b72 !important;
}

.supervisor-dashboard-page .supervisor-dashboard-cut-op,
.supervisor-dashboard-page .supervisor-dashboard-start-time,
.supervisor-dashboard-page .supervisor-dashboard-finish-time,
.supervisor-dashboard-page .supervisor-dashboard-finish-units,
.supervisor-dashboard-page .supervisor-dashboard-stop {
  min-width: 0;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.05;
  box-shadow: 0 0 0 2px #fff !important;
}

.supervisor-dashboard-page .supervisor-dashboard-cut-op {
  left: 0;
  bottom: 15px;
  background: #e1f0ff !important;
  color: #0066a6 !important;
}

.supervisor-dashboard-page .supervisor-dashboard-start-time,
.supervisor-dashboard-page .supervisor-dashboard-finish-time {
  bottom: 31px;
  background: #f0e7fa !important;
  color: #8255b0 !important;
}

.supervisor-dashboard-page .supervisor-dashboard-finish-units {
  top: 18px;
  background: #e6f6ed !important;
  color: #087443 !important;
}

.supervisor-dashboard-page .supervisor-dashboard-stop {
  top: 16px;
  max-width: none;
  background: #ffe8e2 !important;
  color: #d4432f !important;
  white-space: nowrap;
}

.supervisor-dashboard-page .supervisor-dashboard-start-dot,
.supervisor-dashboard-page .supervisor-dashboard-finish-dot {
  top: -5px;
  width: 10px;
  height: 10px;
  border-width: 2px;
  background: #fff !important;
  border-color: #075b4c !important;
  box-shadow: none !important;
}

@media (max-width: 900px) {
  .supervisor-dashboard-page .supervisor-dashboard-board-card .pcp-card-head {
    flex-direction: row;
    align-items: flex-start;
  }

  .supervisor-dashboard-page .supervisor-dashboard-board {
    --machine-label-width: 145px;
  }
}

.supervisor-dashboard-page .supervisor-dashboard-board-card {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.supervisor-dashboard-page .supervisor-dashboard-board-card .pcp-card-head {
  margin-bottom: 0 !important;
  padding-bottom: 2px !important;
}

.supervisor-dashboard-page .supervisor-dashboard-board-card .card-title {
  color: #004d40 !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  text-transform: none !important;
}

.supervisor-dashboard-page .supervisor-dashboard-ruler span:first-child {
  transform: translateX(-10px);
}

.supervisor-dashboard-page .supervisor-dashboard-ruler span:last-child {
  transform: translateX(-100%);
}

/* Destaque operacional para maquina sem OP em producao. */
.supervisor-dashboard-page .supervisor-dashboard-row.is-idle,
.supervisor-dashboard-page .supervisor-dashboard-row.is-idle .supervisor-dashboard-machine,
.supervisor-dashboard-page .supervisor-dashboard-row.is-idle .supervisor-dashboard-lane {
  background: #fff7e6 !important;
}

.supervisor-dashboard-page .supervisor-dashboard-row.is-idle .supervisor-dashboard-machine {
  box-shadow: inset 4px 0 0 #f59e0b !important;
}

body.theme-dark.supervisor-dashboard-page .supervisor-dashboard-row.is-idle,
body.theme-dark.supervisor-dashboard-page .supervisor-dashboard-row.is-idle .supervisor-dashboard-machine,
body.theme-dark.supervisor-dashboard-page .supervisor-dashboard-row.is-idle .supervisor-dashboard-lane {
  background: #3a260b !important;
}

.supervisor-dashboard-page .supervisor-dashboard-empty-label {
  position: absolute;
  left: 8px;
  top: 15px;
  color: #9a5b00;
  font-size: 10px;
  font-style: italic;
  font-weight: 400;
  white-space: nowrap;
}

/* Cabeçalho padrão das telas internas */
.topbar.app-standard-topbar,
.app-page .topbar.app-standard-topbar,
.dashboard-page .topbar.app-standard-topbar {
  min-height: 58px !important;
  padding: 8px 26px 8px 10px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.topbar.app-standard-topbar .app-menu-toggle,
.topbar.app-standard-topbar .topbar-back,
.topbar.app-standard-topbar .topbar-icon,
.topbar.app-standard-topbar .topbar-notif,
.topbar.app-standard-topbar .dashboard-theme-toggle,
.topbar.app-standard-topbar .dashboard-logout-btn,
.topbar.app-standard-topbar .dashboard-admin-link a {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 7px !important;
  flex: 0 0 38px !important;
}

.topbar.app-standard-topbar .dashboard-admin-link a,
.topbar.app-standard-topbar .dashboard-logout-btn {
  width: auto !important;
  min-width: 38px !important;
  padding: 0 12px !important;
  flex-basis: auto !important;
  white-space: nowrap;
}

.topbar.app-standard-topbar .logo-top {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar.app-standard-topbar .logo-top img {
  width: 34px !important;
  height: 34px !important;
  object-fit: contain;
  display: block;
}

.topbar.app-standard-topbar .topbar-title,
.topbar.app-standard-topbar .dashboard-title-block {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden;
}

.topbar.app-standard-topbar h2,
.topbar.app-standard-topbar .dashboard-title-copy h2 {
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar.app-standard-topbar .topbar-sub {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar.app-standard-topbar .topbar-actions,
.topbar.app-standard-topbar .dashboard-topbar-actions {
  margin-left: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
  min-width: max-content;
}

.topbar.app-standard-topbar .topbar-actions:empty {
  display: none !important;
}

.topbar.app-standard-topbar .topbar-icon {
  font-size: 20px;
  line-height: 1;
}

@media (min-width: 768px) {
  .topbar.app-standard-topbar .app-menu-toggle {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .topbar.app-standard-topbar,
  .app-page .topbar.app-standard-topbar,
  .dashboard-page .topbar.app-standard-topbar {
    min-height: 54px !important;
    padding: 8px 10px !important;
    gap: 8px !important;
  }

  .topbar.app-standard-topbar .app-menu-toggle,
  .topbar.app-standard-topbar .topbar-back,
  .topbar.app-standard-topbar .topbar-icon,
  .topbar.app-standard-topbar .topbar-notif,
  .topbar.app-standard-topbar .dashboard-theme-toggle {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    flex-basis: 36px !important;
  }

  .topbar.app-standard-topbar .logo-top,
  .topbar.app-standard-topbar .logo-top img {
    width: 32px !important;
    height: 32px !important;
  }

  .topbar.app-standard-topbar .topbar-actions,
  .topbar.app-standard-topbar .dashboard-topbar-actions {
    gap: 6px !important;
  }
}

/* Modal de confirmação da liberação — no fim para prevalecer sobre estilos globais. */
#confirmarLiberacaoModal { padding:24px; background:rgba(15,35,29,.62); backdrop-filter:blur(4px); }
#confirmarLiberacaoModal .confirmar-liberacao-modal {
  width:min(620px,calc(100vw - 32px)); max-width:620px; margin:auto; overflow:hidden;
  background:#fff; border:1px solid #cde2d7; border-radius:22px;
  box-shadow:0 28px 70px rgba(10,48,37,.28);
}
#confirmarLiberacaoModal .modal-header {
  padding:20px 24px 17px; background:linear-gradient(135deg,#f4fbf7,#e9f6ef); border-bottom:1px solid #d8e9df;
}
#confirmarLiberacaoModal .modal-header h3 { margin:6px 0 0; color:#123e32; font-size:20px; font-weight:750; line-height:1.25; }
#confirmarLiberacaoModal .modal-close {
  flex:0 0 34px; width:34px; height:34px; color:#47675a; background:rgba(255,255,255,.8); border:1px solid #d1e2d8;
}
#confirmarLiberacaoModal .modal-body { padding:22px 24px 24px; }
#confirmarLiberacaoModal .confirmar-liberacao-texto {
  display:flex;
  align-items:center;
  gap:18px;
  margin:0 0 22px;
  padding:22px;
  color:#4d3100;
  background:linear-gradient(135deg,#fff2b8 0%,#fff9df 100%);
  border:2px solid #e5a900;
  border-top:7px solid #d88d00;
  border-radius:16px;
  box-shadow:0 12px 26px rgba(180,112,0,.2);
}
#confirmarLiberacaoModal .confirmar-liberacao-texto-icone {
  display:grid;
  flex:0 0 56px;
  width:56px;
  height:56px;
  place-items:center;
  color:#fff;
  background:#c77800;
  border-radius:50%;
  box-shadow:0 8px 18px rgba(149,87,0,.3);
  font-size:30px;
  font-weight:900;
}
#confirmarLiberacaoModal .confirmar-liberacao-texto > div {
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:3px;
}
#confirmarLiberacaoModal .confirmar-liberacao-texto strong {
  color:#5c3600;
  font-size:22px;
  font-weight:900;
  line-height:1.2;
  text-transform:uppercase;
  letter-spacing:.02em;
}
#confirmarLiberacaoModal .confirmar-liberacao-texto div > span {
  color:#5e470f;
  font-size:17px;
  font-weight:700;
  line-height:1.5;
}
#confirmarLiberacaoModal .confirmar-liberacao-resumo { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:12px; }
#confirmarLiberacaoModal .confirmar-liberacao-resumo > div {
  min-width:0; padding:13px 14px; background:#f7faf8; border:1px solid #dce9e1; border-radius:13px;
}
#confirmarLiberacaoModal .confirmar-liberacao-resumo span,
#confirmarLiberacaoModal .confirmar-liberacao-observacoes span {
  display:block; margin-bottom:5px; color:#668073; font-size:10px; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
}
#confirmarLiberacaoModal .confirmar-liberacao-resumo strong {
  display:block; color:#1f382e; font-size:14px; line-height:1.4; overflow-wrap:anywhere;
}
#confirmarLiberacaoModal .confirmar-liberacao-resumo .confirmar-liberacao-unidades {
  position:relative;
  padding:16px 18px;
  background:linear-gradient(135deg,#0f604f 0%,#167a64 100%);
  border:2px solid #0b4f40;
  box-shadow:0 10px 22px rgba(15,96,79,.22);
}
#confirmarLiberacaoModal .confirmar-liberacao-unidades span {
  color:#c9f3e5;
  font-size:11px;
  letter-spacing:.08em;
}
#confirmarLiberacaoModal .confirmar-liberacao-unidades #modalLiberacaoUnidades {
  color:#fff;
  font-size:32px;
  font-weight:900;
  line-height:1.1;
  letter-spacing:-.02em;
}
#confirmarLiberacaoModal .confirmar-liberacao-unidades #modalLiberacaoUnidades::after {
  content:' unidades';
  margin-left:6px;
  color:#d9f7ed;
  font-size:13px;
  font-weight:700;
  letter-spacing:0;
}
#confirmarLiberacaoModal .confirmar-liberacao-observacoes {
  margin:0 0 12px; padding:13px 14px; background:#fff; border:1px solid #dce9e1; border-radius:13px;
}
#confirmarLiberacaoModal .confirmar-liberacao-observacoes p { margin:0; color:#354d42; font-size:13px; line-height:1.45; }
#confirmarLiberacaoModal .confirmar-liberacao-aviso {
  padding:12px 14px; color:#245b49; background:#eaf7f0; border:0; border-left:4px solid #1d9e75;
  border-radius:10px; font-size:13px; line-height:1.45;
}
#confirmarLiberacaoModal .confirmar-liberacao-acoes { display:flex; justify-content:flex-end; gap:10px; margin-top:22px; }
#confirmarLiberacaoModal .confirmar-liberacao-acoes .btn {
  width:auto; min-height:44px; margin:0; padding:0 18px; border:1px solid transparent;
  border-radius:12px; font-size:13px; font-weight:750;
}
#confirmarLiberacaoModal .confirmar-liberacao-cancelar { color:#315743; background:#fff; border-color:#cbded3; }
#confirmarLiberacaoModal .confirmar-liberacao-confirmar {
  color:#fff; background:#0f604f; box-shadow:0 8px 18px rgba(15,96,79,.2);
}
#confirmarLiberacaoModal .confirmar-liberacao-confirmar:hover { background:#0c5142; }
@media (max-width:560px) {
  #confirmarLiberacaoModal { padding:14px; }
  #confirmarLiberacaoModal .modal-header,
  #confirmarLiberacaoModal .modal-body { padding-left:18px; padding-right:18px; }
  #confirmarLiberacaoModal .confirmar-liberacao-resumo { grid-template-columns:1fr; }
  #confirmarLiberacaoModal .confirmar-liberacao-acoes { flex-direction:column-reverse; }
  #confirmarLiberacaoModal .confirmar-liberacao-acoes .btn { width:100%; }
}
