﻿*,

*::before,

*::after {

  box-sizing: border-box;

}



html,

body {

  margin: 0;

  padding: 0;

  height: 100%;

  overflow: hidden;

  font-family: var(--font);

  font-size: 15px;

  color: var(--text);

}



/*

 * Fibras só no body (linhas diagonais tipo sarja).
 * Navbar / painéis: transparentes ou sem hatch próprio — mesmo alinhamento (fixed).

 */

body.d2j-theme {

  background-color: var(--bg-app);

  background-image:

    repeating-linear-gradient(

      45deg,

      transparent 0,

      transparent calc(var(--texture-period) - var(--texture-line)),

      var(--texture-fg) calc(var(--texture-period) - var(--texture-line)),

      var(--texture-fg) var(--texture-period)

    ),

    repeating-linear-gradient(

      -45deg,

      transparent 0,

      transparent calc(var(--texture-period) - var(--texture-line)),

      var(--texture-fg) calc(var(--texture-period) - var(--texture-line)),

      var(--texture-fg) var(--texture-period)

    );

  background-attachment: fixed;

  background-repeat: repeat;

  position: relative;

}



/* Wash diagonal (index3 .denim-wash) — full viewport sob o conteúdo */

body.d2j-theme::before {

  content: "";

  position: fixed;

  inset: 0;

  z-index: 0;

  pointer-events: none;

  background: var(--bg-wash);

}



body.site-root {

  display: flex;

  flex-direction: column;

  height: 100vh;

  height: 100dvh;

  min-height: 100vh;

  overflow: hidden;

}



body.site-root > header.topbar,

body.site-root > .site-scroll {

  position: relative;

  z-index: 1;

}



body.site-root > header.topbar {

  flex-shrink: 0;

  z-index: 100;

}



/* —— Navbar: costura só na base; sem linha laranja solta —— */

.topbar {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 0.75rem;

  min-height: var(--nav-h);

  padding: 0.5rem 1rem;

  position: relative;

  border: none;

  border-bottom: 2px solid var(--nav-border);

  background-color: var(--nav-bg);

  background-image: none;

  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);

  color: var(--nav-text);

}



.topbar::after {

  content: "";

  position: absolute;

  left: 5px;

  right: 5px;

  bottom: 5px;

  border: none;

  border-bottom: 2px dashed var(--stitch);

  pointer-events: none;

  z-index: 1;

}



.topbar-nav a {

  text-decoration: none;

  color: var(--nav-text-muted);

  font-size: 0.88rem;

  padding: 0.35rem 0.6rem;

  border-radius: 6px;

  white-space: nowrap;

}



.topbar-nav a:hover {

  color: var(--nav-text);

  background: var(--glow-soft);

}



.topbar-nav a.is-active {

  color: var(--color-secondary);

  background: var(--glow-soft);

  font-weight: 600;

}



.topbar-user {

  font-size: 0.82rem;

  color: var(--nav-text-muted);

  max-width: 9rem;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

}



.topbar .btn-icon {

  color: var(--nav-text);

  border-color: var(--nav-border);

}



.topbar .btn-icon:hover {

  background: var(--glow-soft);

  border-color: var(--color-secondary);

}



.topbar .btn-ghost {

  color: var(--nav-text);

  border-color: var(--nav-border);

}



.topbar .btn-ghost:hover {

  background: var(--glow-soft);

}



/* Logo tipográfica index3 (h1 Denim2Jeans) */

.d2j-logo {

  margin: 0;

  font-weight: 900;

  letter-spacing: 5px;

  text-transform: uppercase;

  line-height: 1.15;

  text-decoration: none;

  background: linear-gradient(

    135deg,

    var(--brand-gradient-from) 0%,

    var(--brand-gradient-to) 100%

  );

  -webkit-background-clip: text;

  background-clip: text;

  -webkit-text-fill-color: transparent;

  color: transparent;

  filter: drop-shadow(var(--brand-shadow));

}



.topbar-brand.d2j-logo {

  position: relative;

  display: inline-block;

  font-size: 0.95rem;

  letter-spacing: 0.12em;

  white-space: nowrap;

  padding-bottom: 0.35rem;

  /* Always light-on-denim (navbar stays dark in both themes) */
  background: linear-gradient(135deg, #f0f7ff 0%, #38bdf8 100%);

  -webkit-background-clip: text;

  background-clip: text;

  filter: drop-shadow(0 2px 10px rgba(56, 189, 248, 0.15));

}



.d2j-logo-version {

  position: absolute;

  left: 0;

  bottom: 0;

  z-index: 2;

  pointer-events: none;

  font-size: 0.55rem;

  font-weight: 700;

  letter-spacing: 0.04em;

  line-height: 1;

  text-transform: none;

  /* Reset parent gradient text clip */
  background: none;

  -webkit-background-clip: unset;

  background-clip: unset;

  -webkit-text-fill-color: rgba(224, 242, 254, 0.72);

  color: rgba(224, 242, 254, 0.72);

  filter: none;

}



html[data-theme="light"] .d2j-logo-version {

  -webkit-text-fill-color: rgba(226, 232, 240, 0.85);

  color: rgba(226, 232, 240, 0.85);

}



.topbar-nav {

  display: flex;

  align-items: center;

  gap: 0.35rem;

  flex: 1 1 auto;

  min-width: 0;

  overflow-x: auto;

  -webkit-overflow-scrolling: touch;

}



.topbar-end {

  display: flex;

  align-items: center;

  gap: 0.5rem;

  flex-shrink: 0;

}



.btn-icon {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  width: 2rem;

  height: 2rem;

  padding: 0;

  border: 1px solid var(--border);

  border-radius: 8px;

  background: transparent;

  color: var(--text);

  cursor: pointer;

}



.btn-icon:hover {

  background: var(--hover-tint);

  border-color: var(--brand-primary);

}



.btn-icon--ghost {

  border-color: transparent;

}



.btn-ghost,

button.btn-ghost {

  padding: 0.4rem 0.75rem;

  border: 1px solid var(--border);

  border-radius: 8px;

  background: transparent;

  color: var(--text);

  cursor: pointer;

  font-size: 0.85rem;

}



.btn-ghost:hover {

  background: var(--hover-tint);

}



.btn-primary,

button.btn-primary {

  padding: 0.5rem 1rem;

  border: 0;

  border-radius: 8px;

  background: var(--brand-primary);

  color: var(--text-on-brand);

  font-weight: 700;

  cursor: pointer;

}



.btn-danger {

  padding: 0.35rem 0.65rem;

  border: 1px solid var(--err);

  border-radius: 8px;

  background: transparent;

  color: var(--err);

  font-size: 0.8rem;

  cursor: pointer;

}



/* —— Theme switch index3 (Dark Denim / Inside Out) —— */

.theme-switch {

  display: inline-flex;

  background: var(--switch-track);

  padding: 6px;

  border-radius: 30px;

  border: 1px solid var(--switch-border);

  position: relative;

  z-index: 20;

}



.switch-btn {

  border: none;

  outline: none;

  padding: 10px 24px;

  font-size: 0.85rem;

  font-weight: 700;

  font-family: var(--font);

  border-radius: 20px;

  cursor: pointer;

  text-transform: uppercase;

  letter-spacing: 1px;

  background: transparent;

  color: var(--switch-idle-fg);

  box-shadow: none;

  transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;

}



.switch-btn.is-active {

  background: var(--switch-active-bg);

  color: var(--switch-active-fg);

  box-shadow: var(--switch-active-shadow);

}



.topbar .theme-switch {

  padding: 4px;

}



.topbar .switch-btn {

  padding: 6px 12px;

  font-size: 0.7rem;

}



/* —— Shell scroll —— */

.site-scroll {

  flex: 1 1 auto;

  min-height: 0;

  display: flex;

  flex-direction: column;

  overflow-x: hidden;

  overflow-y: auto;

  background: transparent;

}



.site-scroll > main {

  flex: 1 0 auto;

  width: 100%;

  max-width: 960px;

  margin: 0 auto;

  padding: 1.1rem 1rem 2rem;

}



.page-construcao .site-scroll > main {

  max-width: none;

  margin: 0;

  padding: 0;

  display: flex;

  flex-direction: column;

  flex: 1 1 auto;

  min-height: 0;

}



/* —— Scrollbars themed (Deep Denim / Inside Out — --stitch) —— */

.site-scroll,

.checklist-modal__body,

.feedback-modal__body,

.login-modal__panel.pocket,

.help-sidebar,

.dash-events,

.dash-table-wrap,

.topbar-nav,

.checklist-result-form textarea,

.feedback-modal__form textarea,

body.d2j-theme.page-login {

  scrollbar-width: thin;

  scrollbar-color: var(--stitch) transparent;

}



.site-scroll::-webkit-scrollbar,

.checklist-modal__body::-webkit-scrollbar,

.feedback-modal__body::-webkit-scrollbar,

.login-modal__panel.pocket::-webkit-scrollbar,

.help-sidebar::-webkit-scrollbar,

.dash-events::-webkit-scrollbar,

.dash-table-wrap::-webkit-scrollbar,

.topbar-nav::-webkit-scrollbar,

.checklist-result-form textarea::-webkit-scrollbar,

.feedback-modal__form textarea::-webkit-scrollbar,

body.d2j-theme.page-login::-webkit-scrollbar {

  width: 10px;

  height: 10px;

}



.site-scroll::-webkit-scrollbar-track,

.checklist-modal__body::-webkit-scrollbar-track,

.feedback-modal__body::-webkit-scrollbar-track,

.login-modal__panel.pocket::-webkit-scrollbar-track,

.help-sidebar::-webkit-scrollbar-track,

.dash-events::-webkit-scrollbar-track,

.dash-table-wrap::-webkit-scrollbar-track,

.topbar-nav::-webkit-scrollbar-track,

.checklist-result-form textarea::-webkit-scrollbar-track,

.feedback-modal__form textarea::-webkit-scrollbar-track,

body.d2j-theme.page-login::-webkit-scrollbar-track {

  background-color: transparent;

}



.site-scroll::-webkit-scrollbar-thumb,

.checklist-modal__body::-webkit-scrollbar-thumb,

.feedback-modal__body::-webkit-scrollbar-thumb,

.login-modal__panel.pocket::-webkit-scrollbar-thumb,

.help-sidebar::-webkit-scrollbar-thumb,

.dash-events::-webkit-scrollbar-thumb,

.dash-table-wrap::-webkit-scrollbar-thumb,

.topbar-nav::-webkit-scrollbar-thumb,

.checklist-result-form textarea::-webkit-scrollbar-thumb,

.feedback-modal__form textarea::-webkit-scrollbar-thumb,

body.d2j-theme.page-login::-webkit-scrollbar-thumb {

  background-color: var(--stitch);

  border-radius: 6px;

  border: 2px solid transparent;

  background-clip: padding-box;

}



.site-scroll::-webkit-scrollbar-thumb:hover,

.checklist-modal__body::-webkit-scrollbar-thumb:hover,

.feedback-modal__body::-webkit-scrollbar-thumb:hover,

.login-modal__panel.pocket::-webkit-scrollbar-thumb:hover,

.help-sidebar::-webkit-scrollbar-thumb:hover,

.dash-events::-webkit-scrollbar-thumb:hover,

.dash-table-wrap::-webkit-scrollbar-thumb:hover,

.topbar-nav::-webkit-scrollbar-thumb:hover,

.checklist-result-form textarea::-webkit-scrollbar-thumb:hover,

.feedback-modal__form textarea::-webkit-scrollbar-thumb:hover,

body.d2j-theme.page-login::-webkit-scrollbar-thumb:hover {

  background-color: color-mix(in srgb, var(--stitch) 78%, #000);

}



.site-scroll::-webkit-scrollbar-button,

.checklist-modal__body::-webkit-scrollbar-button,

.feedback-modal__body::-webkit-scrollbar-button,

.login-modal__panel.pocket::-webkit-scrollbar-button,

.help-sidebar::-webkit-scrollbar-button,

.dash-events::-webkit-scrollbar-button,

.dash-table-wrap::-webkit-scrollbar-button,

.topbar-nav::-webkit-scrollbar-button,

.checklist-result-form textarea::-webkit-scrollbar-button,

.feedback-modal__form textarea::-webkit-scrollbar-button,

body.d2j-theme.page-login::-webkit-scrollbar-button {

  display: none;

  height: 0;

  width: 0;

}



/* —— Content —— */

h1:not(.d2j-logo) {

  font-size: 1.25rem;

  margin: 0 0 0.35rem;

}



.muted {

  color: var(--text-muted);

  font-size: 0.9rem;

}



a {

  color: var(--brand-primary);

}



.grid {

  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));

  gap: 0.75rem;

  margin-top: 1rem;

}



a.card {

  display: block;

  text-decoration: none;

  color: inherit;

  border: 2px solid var(--pocket-border);

  border-radius: 0;

  padding: 1rem;

  background-color: var(--pocket-bg);

  background-image: none;

  box-shadow: var(--pocket-shadow);

  position: relative;

}



/* Costura inset — sem topo duplo (mesmo padrão create-box / papel.on) */

a.card::before {

  content: "";

  position: absolute;

  top: 5px;

  left: 5px;

  right: 5px;

  bottom: 5px;

  border: 2px dashed var(--stitch);

  border-radius: 0;

  pointer-events: none;

}



a.card:hover {

  border-color: var(--brand-primary);

}



a.card h2,

a.card .fase,

a.card .muted,

a.card > * {

  position: relative;

  z-index: 1;

}



a.card h2 {

  margin: 0 0 0.35rem;

  font-size: 1rem;

}



a.card .fase,

a.card .muted {

  position: relative;

}



.fase {

  font-size: 0.7rem;

  font-weight: 700;

  text-transform: uppercase;

  letter-spacing: 0.04em;

  color: var(--ok);

}



.fase.v2,

.fase.v3,

.fase.v4 {

  color: var(--text-muted);

}



.panel,

.card-box {

  background-color: var(--pocket-bg);

  background-image: none;

  border: 2px solid var(--pocket-border);

  border-radius: var(--radius);

  padding: 1.1rem;

  box-shadow: var(--pocket-shadow);

}



.tabs {

  display: flex;

  gap: 0.35rem;

  margin: 1rem 0 0 1.1rem;

  flex-wrap: wrap;

  align-items: flex-end;

  position: relative;

  z-index: 3;

}



/* Etiquetas: cor do botão light + borda 1px preta; costura inferior só na ativa */

.tabs--labels .tab-label,

.tabs a.tab-label {

  position: relative;

  display: inline-block;

  padding: 0.45rem 1rem 0.55rem;

  margin: 0;

  border: 1px solid var(--tab-border);

  border-radius: 0;

  background-color: var(--tab-bg);

  background-image: none;

  color: var(--tab-fg);

  font-size: 0.72rem;

  font-weight: 800;

  letter-spacing: 0.07em;

  text-transform: uppercase;

  text-decoration: none;

  z-index: 2;

  box-shadow: none;

}



.tabs--labels .tab-label::after,

.tabs a.tab-label::after {

  content: none;

}



.tabs--labels .tab-label.on,

.tabs a.tab-label.on {

  color: var(--tab-fg);

  z-index: 4;

  padding-bottom: 0.55rem;

  /* Encaixa na borda sólida 2px do .panel.pocket */

  margin-bottom: -2px;

  background-color: var(--tab-bg);

  border: 1px solid var(--tab-border);

  border-bottom: none;

  box-shadow: none;

}



/* Costura inferior alinhada ao pesponto do container (.pocket::before top: 5px) */

.tabs--labels .tab-label.on::after,

.tabs a.tab-label.on::after {

  content: "";

  position: absolute;

  left: 5px;

  right: 5px;

  top: 100%;

  /* 2px borda do painel + 5px inset da costura do .pocket */

  margin-top: 7px;

  height: 0;

  border: none;

  border-top: 2px dashed var(--stitch);

  pointer-events: none;

  z-index: 3;

}



/* Pedaco da aba sobre o container (cobre borda/costura do painel sob a etiqueta) */

.tabs--labels .tab-label.on::before,

.tabs a.tab-label.on::before {

  content: "";

  position: absolute;

  left: -1px;

  right: -1px;

  top: 100%;

  height: 14px;

  margin-top: -2px;

  background-color: var(--tab-bg);

  background-image: none;

  border-left: 1px solid var(--tab-border);

  border-right: 1px solid var(--tab-border);

  border-bottom: none;

  pointer-events: none;

  z-index: 1;

}



.tabs--labels .tab-label:not(.on):hover,

.tabs a.tab-label:not(.on):hover {

  color: var(--tab-fg);

  filter: brightness(0.97);

}



.panel {

  border-radius: 0 0 8px 8px;

}


.roles {

  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));

  gap: 0.6rem;

  margin-bottom: 1rem;

}



.role {

  position: relative;

  display: block;

  padding: 0.75rem;

  border: 2px solid var(--border);

  border-radius: 0;

  background-color: var(--bg-surface);

  color: var(--text);

  text-decoration: none;

}



.role:not(.on):hover {

  border-color: var(--color-primary);

  background-color: var(--hover-tint);

}



/* Selecionado: mesma costura do container (.pocket), sem topo duplo */

.role.on {

  background-color: var(--pocket-bg);

  background-image: none;

  border: 2px solid var(--pocket-border);

  color: var(--text);

  box-shadow: var(--pocket-shadow);

}



.role.on::before {

  content: "";

  position: absolute;

  top: 5px;

  left: 5px;

  right: 5px;

  bottom: 5px;

  border: 2px dashed var(--stitch);

  border-radius: 0;

  pointer-events: none;

}



.role h3 {

  margin: 0 0 0.2rem;

  font-size: 0.95rem;

  position: relative;

  z-index: 1;

}



.role p {

  margin: 0;

  font-size: 0.78rem;

  color: var(--text-muted);

  position: relative;

  z-index: 1;

}



.role.on p {

  color: var(--text-muted);

}



table {

  width: 100%;

  border-collapse: collapse;

  font-size: 0.88rem;

}

.table-scroll {

  max-width: 100%;

  overflow-x: auto;

  -webkit-overflow-scrolling: touch;

}

.table-scroll > table {

  min-width: 42rem;

}



th,

td {

  border: 1px solid var(--border);

  padding: 0.5rem;

  text-align: center;

}



th {

  background: var(--bg-app);

  color: var(--brand-primary);

}



td.l,

th.l {

  text-align: left;

  font-weight: 600;

}



th.col-all {

  vertical-align: bottom;

}



th.col-all label {

  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 0.35rem;

  cursor: pointer;

  font-weight: 600;

}



th.col-all input {

  margin: 0;

  cursor: pointer;

}



#perm-matrix .col-row {

  width: 3em;

  max-width: 3em;

  padding: 0.35rem 0.2rem;

  white-space: nowrap;

}



#perm-matrix th.col-row {

  font-size: 0.62rem;

  line-height: 1.1;

  font-weight: 600;

  vertical-align: middle;

}



.fase-inline {

  display: block;

  font-weight: 400;

  font-size: 0.72rem;

  color: var(--text-muted);

}



.ok {

  background: color-mix(in srgb, var(--ok) 18%, var(--bg-surface));

  color: var(--ok);

  border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--border));

  padding: 0.5rem 0.75rem;

  border-radius: 8px;

  margin-bottom: 0.75rem;

  font-size: 0.85rem;

}



.erro {

  background: color-mix(in srgb, var(--err) 18%, var(--bg-surface));

  color: var(--err);

  border: 1px solid color-mix(in srgb, var(--err) 40%, var(--border));

  padding: 0.5rem 0.75rem;

  border-radius: 8px;

  margin-bottom: 0.75rem;

  font-size: 0.85rem;

}



select,

textarea,

input[type="text"],

input[type="email"],

input[type="password"],

input[type="number"],

input[type="date"],

input[type="datetime-local"],

input:not([type]) {

  padding: 0.45rem 0.55rem;

  border-radius: 0;

  border: 1px solid var(--border);

  background: var(--bg-app);

  color: var(--text);

  width: 100%;

  max-width: 100%;

}



/* Themed date/time picker icons (native WebKit glyph + overlay via --text).

   Native ::-webkit-calendar-picker-indicator is opacity:0 but stays clickable.

   Visible glyph is label::after (mask + var(--text)) so Deep Denim / Inside Out stay legible. */

input[type="date"],

input[type="datetime-local"],

input[type="time"],

input[type="month"],

input[type="week"] {

  position: relative;

  padding-right: 2rem;

}



input[type="date"]::-webkit-calendar-picker-indicator,

input[type="datetime-local"]::-webkit-calendar-picker-indicator,

input[type="time"]::-webkit-calendar-picker-indicator,

input[type="month"]::-webkit-calendar-picker-indicator,

input[type="week"]::-webkit-calendar-picker-indicator {

  cursor: pointer;

  opacity: 0;

  position: absolute;

  right: 0.35rem;

  top: 50%;

  transform: translateY(-50%);

  width: 1.35em;

  height: 1.35em;

  margin: 0;

  padding: 0;

}



label:has(> input[type="date"]),

label:has(> input[type="datetime-local"]),

label:has(> input[type="time"]),

label:has(> input[type="month"]),

label:has(> input[type="week"]) {

  position: relative;

}



label:has(> input[type="date"])::after,

label:has(> input[type="datetime-local"])::after,

label:has(> input[type="month"])::after,

label:has(> input[type="week"])::after {

  content: "";

  position: absolute;

  right: 0.55rem;

  bottom: 0.55rem;

  width: 1.1em;

  height: 1.1em;

  pointer-events: none;

  z-index: 1;

  opacity: 0.85;

  background-color: var(--text);

  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11zM5 7V6h14v1H5z'/%3E%3C/svg%3E");

  -webkit-mask-size: contain;

  -webkit-mask-repeat: no-repeat;

  -webkit-mask-position: center;

  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11zM5 7V6h14v1H5z'/%3E%3C/svg%3E");

  mask-size: contain;

  mask-repeat: no-repeat;

  mask-position: center;

}



label:has(> input[type="time"])::after {

  content: "";

  position: absolute;

  right: 0.55rem;

  bottom: 0.55rem;

  width: 1.1em;

  height: 1.1em;

  pointer-events: none;

  z-index: 1;

  opacity: 0.85;

  background-color: var(--text);

  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67V7z'/%3E%3C/svg%3E");

  -webkit-mask-size: contain;

  -webkit-mask-repeat: no-repeat;

  -webkit-mask-position: center;

  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67V7z'/%3E%3C/svg%3E");

  mask-size: contain;

  mask-repeat: no-repeat;

  mask-position: center;

}



/* Select chevrons follow theme (native arrows stay dark on Deep Denim otherwise) */

html.d2j-theme select {

  color-scheme: light;

}



html.d2j-theme[data-theme="dark"] select {

  color-scheme: dark;

}



.form-grid {

  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));

  gap: 0.75rem;

  align-items: end;

}



.form-grid label {

  display: flex;

  flex-direction: column;

  gap: 0.25rem;

  font-size: 0.8rem;

  color: var(--text-muted);

}



.form-grid label.chk {

  flex-direction: row;

  align-items: center;

  gap: 0.4rem;

  padding-bottom: 0.35rem;

}



.form-actions {

  grid-column: 1 / -1;

  display: flex;

  flex-wrap: wrap;

  gap: 0.5rem;

  margin-top: 0.35rem;

}



.btn,

button.btn {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  padding: 0.45rem 0.9rem;

  border: 1px solid var(--tab-border, #000);

  border-radius: 0;

  background: var(--tab-bg, #e2ebf5);

  color: var(--tab-fg, #1e293b);

  font-weight: 700;

  font-size: 0.8rem;

  letter-spacing: 0.04em;

  text-transform: uppercase;

  cursor: pointer;

  text-decoration: none;

}



.btn:hover,

button.btn:hover {

  filter: brightness(0.97);

}



.form-row {

  display: flex;

  flex-wrap: wrap;

  gap: 0.5rem;

  align-items: flex-end;

  margin-bottom: 0.75rem;

}



.form-row label {

  display: flex;

  flex-direction: column;

  gap: 0.25rem;

  font-size: 0.8rem;

  color: var(--text-muted);

  flex: 1;

  min-width: 140px;

}



.papel-card {

  border: 1px solid var(--border);

  border-radius: 10px;

  background: var(--bg-app);

  padding: 0.85rem;

  margin-bottom: 0.65rem;

}



.papel-card .meta {

  font-size: 0.75rem;

  color: var(--text-muted);

  margin-bottom: 0.5rem;

}



.papel-actions {

  display: flex;

  flex-wrap: wrap;

  gap: 0.4rem;

  align-items: center;

  margin-top: 0.5rem;

}



.create-box {

  position: relative;

  border: 2px solid var(--pocket-border);

  border-radius: 0;

  padding: 1.15rem 1.1rem;

  margin-bottom: 1.25rem;

  background-color: var(--pocket-bg);

  box-shadow: var(--pocket-shadow);

}



/* Costura inset — sem topo duplo */

.create-box::before {

  content: "";

  position: absolute;

  top: 5px;

  left: 5px;

  right: 5px;

  bottom: 5px;

  border: 2px dashed var(--stitch);

  border-radius: 0;

  pointer-events: none;

}



.create-box h3,

.create-box form,

.create-box > * {

  position: relative;

  z-index: 1;

}



.create-box h3 {

  margin: 0 0 0.75rem;

  font-size: 0.95rem;

}



/* —— Bolso jeans (index3 .pocket) —— */

.pocket {

  width: 100%;

  border-radius: 4px;

  position: relative;

  padding: 30px 25px;

  text-align: center;

  border: 2px solid var(--pocket-border);

  background-color: var(--pocket-bg);

  background-image: none;

  box-shadow: var(--pocket-shadow);

}



.pocket::before {

  content: "";

  position: absolute;

  top: 5px;

  left: 5px;

  right: 5px;

  bottom: 5px;

  border: 2px dashed var(--stitch);

  border-radius: 2px;

  pointer-events: none;

}



/* 2ª costura no topo: só no tema escuro */

.pocket::after {

  content: none;

}



html.d2j-theme[data-theme="dark"] .pocket::after {

  content: "";

  position: absolute;

  top: 13px;

  left: 5px;

  right: 5px;

  border-top: 2px dashed var(--stitch);

  pointer-events: none;

}



/* Painel de conteúdo (Acesso): mesmo pesponto .pocket, cantos top 90° / bottom ~8px */

.panel.pocket {

  text-align: left;

  width: 100%;

  border-radius: 0 0 8px 8px;

  padding: 1.65rem 1.4rem 1.5rem;

  margin-top: 0;

  z-index: 1;

}



.panel.pocket::before {

  border-radius: 0 0 5px 5px;

}



.panel.pocket > * {

  position: relative;

  z-index: 1;

}



/* —— Em construção = layout index3 —— */

.construcao {

  position: relative;

  flex: 1 1 auto;

  min-height: 100%;

  width: 100%;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  text-align: center;

  overflow: hidden;

}



.construcao-inner {

  position: relative;

  z-index: 10;

  max-width: 550px;

  width: 90%;

  padding: 20px;

}



.construcao-brand.d2j-logo {

  margin: 0 0 5px;

  font-size: 3.2rem;

  font-weight: 900;

  letter-spacing: 5px;

}



.construcao-tagline {

  margin: 0 0 35px;

  font-size: 1rem;

  font-weight: 500;

  color: var(--text-muted);

  letter-spacing: 3px;

  text-transform: uppercase;

}



.construcao-status-title {

  margin: 0 0 8px;

  font-size: 1.3rem;

  font-weight: 800;

  letter-spacing: 1px;

  text-transform: uppercase;

  color: var(--status-title);

}



.construcao-status-text {

  margin: 0;

  font-size: 0.95rem;

  line-height: 1.6;

  color: var(--status-text);

}



.construcao-foot {

  position: absolute;

  z-index: 10;

  bottom: 25px;

  left: 0;

  right: 0;

  margin: 0;

  padding: 0 1rem;

  font-size: 0.8rem;

  letter-spacing: 1px;

  color: var(--footer-color);

}



.construcao .theme-switch {

  margin-top: 35px;

}



/* —— Login (pocket + switch index3) —— */

body.d2j-theme.page-login {

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;

  text-align: center;

  overflow: auto;

  min-height: 100vh;

  min-height: 100dvh;

  padding: 1rem;

}



body.page-login .login-wrap {

  position: relative;

  z-index: 10;

  max-width: 550px;

  width: 90%;

  padding: 20px;

}



body.page-login .login-card.pocket {

  text-align: left;

  margin: 0 auto;

}



body.page-login .login-card .d2j-logo {

  margin: 0 0 5px;

  font-size: clamp(1.6rem, 5vw, 2.4rem);

  letter-spacing: 4px;

  text-align: center;

}



body.page-login .login-tagline {

  margin: 0 0 1.25rem;

  font-size: 0.9rem;

  font-weight: 500;

  color: var(--text-muted);

  letter-spacing: 3px;

  text-transform: uppercase;

  text-align: center;

}



body.page-login .login-card label {

  display: block;

  font-size: 0.8rem;

  font-weight: 600;

  margin: 0.75rem 0 0.3rem;

  color: var(--text-muted);

}



body.page-login .login-card button[type="submit"] {

  margin-top: 1rem;

  width: 100%;

}



body.page-login .login-wrap .theme-switch {

  margin-top: 35px;

}



body.page-login .login-foot {

  position: fixed;

  z-index: 10;

  bottom: 25px;

  left: 0;

  right: 0;

  margin: 0;

  font-size: 0.8rem;

  letter-spacing: 1px;

  color: var(--footer-color);

  text-align: center;

  pointer-events: none;

}



.hint {

  margin-top: 1rem;

  font-size: 0.75rem;

  color: var(--text-muted);

}

/* Login modal — também é o conteúdo principal da rota pública /login. */
body.login-modal-open {
  overflow: hidden;
}

body.login-modal-open .site-scroll {
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

body.login-modal-open > :not(.login-modal):not(script) {
  pointer-events: none;
  user-select: none;
}

.login-modal[hidden] {
  display: none !important;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 13, 25, 0.74);
  backdrop-filter: blur(3px);
}

body.page-login .login-modal__backdrop {
  background: transparent;
  backdrop-filter: none;
}

.login-modal__panel.pocket {
  width: min(440px, 100%);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: 2rem 1.75rem 1.5rem;
  text-align: left;
  color: var(--text);
}

.login-modal__panel:focus {
  outline: none;
}

.login-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  background: var(--bg-app);
  cursor: pointer;
  font: 700 1.35rem/1 var(--font);
}

.login-modal__close:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.login-modal .login-card,
.login-modal .login-card > * {
  position: relative;
  z-index: 1;
}

.login-modal .login-card .d2j-logo {
  margin: 0 0 5px;
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  letter-spacing: 4px;
  text-align: center;
}

.login-modal .login-tagline {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-align: center;
  text-transform: uppercase;
}

.login-modal .login-card label {
  display: block;
  margin: 0.75rem 0 0.3rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.login-modal .login-card button[type="submit"] {
  width: 100%;
  margin-top: 1rem;
}

.login-modal__alert {
  margin-bottom: 0.75rem;
}

.login-theme-picker {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.25rem;
}

.login-theme-circle {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.login-theme-circle--dark {
  background: #0d1e36;
}

.login-theme-circle--light {
  background: #e2ebf5;
}

.login-theme-circle:hover {
  transform: scale(1.08);
}

.login-theme-circle.is-active {
  border-color: var(--stitch);
}

.login-theme-circle:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .login-modal {
    padding: 0.65rem;
  }

  .login-modal__panel.pocket {
    max-height: calc(100dvh - 1.3rem);
    padding: 1.75rem 1.1rem 1.25rem;
  }

  .login-modal .login-card .d2j-logo {
    letter-spacing: 0.1em;
  }
}



/* —— Mobile —— */

@media (max-width: 640px) {

  .topbar {

    flex-wrap: wrap;

    padding: 0.5rem 0.75rem;

  }



  .topbar-nav {

    order: 3;

    width: 100%;

    padding-bottom: 0.15rem;

  }



  .topbar-user {

    display: none;

  }

  .topbar-end {
    order: 2;
    width: 100%;
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: center;
  }



  .topbar .theme-switch {

    order: 2;

  }



  .site-scroll > main {

    padding: 0.85rem 0.75rem 1.5rem;

  }



  .page-construcao .site-scroll > main {

    padding: 0;

  }



  .construcao-brand.d2j-logo {

    font-size: clamp(1.85rem, 9vw, 3.2rem);

    letter-spacing: 0.15em;

  }



  .topbar-brand.d2j-logo {

    font-size: 0.85rem;

    letter-spacing: 0.08em;

    padding-bottom: 0.3rem;

  }



  .d2j-logo-version {

    font-size: 0.5rem;

  }



  body.page-login .login-card .d2j-logo {

    letter-spacing: 0.12em;

  }



  .construcao-tagline {

    letter-spacing: 2px;

    margin-bottom: 1.5rem;

  }



  .pocket {

    padding: 24px 18px;

  }



  .switch-btn {

    padding: 8px 14px;

    font-size: 0.75rem;

  }



  table {

    font-size: 0.8rem;

  }



  th,

  td {

    padding: 0.35rem 0.3rem;

  }

}



/* —— Painel dashboard (Fábrica Jeans / WorkFloor ref) —— */

body.page-painel {
  overflow-x: clip;
}

body.page-painel .site-scroll > main {
  max-width: min(100%, clamp(68rem, 94vw, 100rem));
  padding: 1rem clamp(0.75rem, 2vw, 1.75rem) 2rem;
  min-width: 0;
  box-sizing: border-box;
}

body.page-painel .dash-panel {
  padding: clamp(0.85rem, 1.5vw, 1.15rem);
  min-width: 0;
  overflow-x: clip;
  box-sizing: border-box;
}

body.page-painel .panel.pocket {
  padding: clamp(1rem, 1.5vw, 1.65rem) clamp(0.85rem, 1.5vw, 1.4rem) 1.5rem;
  box-sizing: border-box;
}

body.page-painel .tabs--labels {
  margin-left: clamp(0.5rem, 1.5vw, 1.1rem);
  margin-right: clamp(0.5rem, 1.5vw, 1.1rem);
}

.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.35rem;
}

.dash-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dash-sub {
  margin: 0.2rem 0 0;
}

.dash-head-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
  justify-content: flex-end;
}

.dash-period-form {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

.dash-period-label {
  font-size: 0.8rem;
  margin: 0;
}

.dash-period-select {
  max-width: min(100%, 18rem);
  font-size: 0.85rem;
  padding: 0.25rem 0.4rem;
}

.dash-period-form--agregado {
  flex-wrap: wrap;
}

.dash-period-select--sm {
  max-width: 5.5rem;
}

.dash-period-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  max-width: 100%;
  min-width: 0;
}

.dash-period-tab {
  display: inline-block;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  background: var(--bg-surface);
  white-space: nowrap;
}

.dash-period-tab:hover {
  color: var(--text);
  border-color: var(--brand-primary);
}

.dash-period-tab.is-active {
  color: var(--text);
  border-color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 12%, var(--bg-surface));
}

.dash-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.dash-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--dash-igual);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dash-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dash-igual);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  animation: dash-pulse 1.6s ease-in-out infinite;
}

@keyframes dash-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.dash-badge-muted {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.dash-panel {
  padding: 1rem 1.1rem 1.15rem;
}

.dash-turno-line {
  margin: 0 0 1rem;
  font-size: 0.85rem;
}

.dash-turno-line strong {
  color: var(--text);
}

.dash-empty {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  max-width: 32rem;
  margin: 0 auto;
}

.dash-empty h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
}

.dash-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(9.5rem, 100%), 1fr));
  gap: 0.65rem;
  margin-bottom: 1.1rem;
  min-width: 0;
}

.dash-kpi {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 5.5rem;
}

.dash-kpi-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dash-kpi-value {
  font-size: 1.55rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: var(--text);
}

.dash-kpi-value--time {
  letter-spacing: 0.04em;
}

.dash-kpi-unit {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.dash-kpi--ring {
  align-items: center;
}

.dash-ring-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  margin-top: 0.15rem;
}

.dash-ring {
  width: 64px;
  height: 64px;
  transform: rotate(-90deg);
}

.dash-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
}

.dash-ring-fg {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dasharray 0.4s ease;
}

.dash-ring-fg--dia {
  stroke: var(--stitch);
}

.dash-ring-fg--meta {
  stroke: var(--dash-acima);
}

.dash-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(min(220px, 100%), 300px);
  gap: clamp(0.65rem, 1.5vw, 1rem);
  align-items: start;
  min-width: 0;
}

@media (min-width: 1400px) {
  body.page-painel .dash-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  }
}

.dash-main,
.dash-side {
  min-width: 0;
}

.dash-section-title {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--status-title);
}

.dash-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  max-width: 100%;
}

@media (min-width: 1100px) {
  body.page-painel .dash-table-wrap {
    overflow-x: visible;
  }
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: clamp(0.78rem, 0.2vw + 0.74rem, 0.86rem);
  table-layout: fixed;
}

.dash-table th,
.dash-table td {
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-table th:nth-child(1),
.dash-table td:nth-child(1) {
  width: 34%;
}

.dash-table th:nth-child(2),
.dash-table td:nth-child(2),
.dash-table th:nth-child(3),
.dash-table td:nth-child(3) {
  width: 4.25rem;
}

.dash-table th:nth-child(4),
.dash-table td:nth-child(4) {
  width: 18%;
}

.dash-table th:nth-child(5),
.dash-table td:nth-child(5) {
  width: 6.5rem;
}

.dash-table th:nth-child(6),
.dash-table td:nth-child(6) {
  width: 4.25rem;
}

@media (max-width: 900px) {
  .dash-table th:nth-child(6),
  .dash-table td:nth-child(6) {
    display: none;
  }
}

.dash-table th.l,
.dash-table td.l {
  text-align: left;
}

.dash-table th {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 800;
  background: transparent;
}

.dash-table tbody tr:last-child td {
  border-bottom: none;
}

.dash-row:hover {
  background: var(--hover-tint);
}

.dash-maq {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.dash-maq-ico {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background-color: var(--bg-surface);
  position: relative;
}

.dash-maq-ico::after {
  content: "";
  position: absolute;
  inset: 6px;
  background-color: var(--text-muted);
  opacity: 0.95;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 17h16v2H4v-2zm2-8.5L9.5 6h5L18 8.5V17H6V8.5zM9 17v-3h6v3H9zm1-7h4v1.5h-4V10z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 17h16v2H4v-2zm2-8.5L9.5 6h5L18 8.5V17H6V8.5zM9 17v-3h6v3H9zm1-7h4v1.5h-4V10z'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.dash-maq strong {
  display: block;
  font-weight: 800;
}

.dash-maq-tipo {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.dash-maq-op {
  display: block;
  font-size: 0.78rem;
}

.dash-num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.dash-status-text--abaixo { color: var(--dash-abaixo); }
.dash-status-text--igual { color: var(--dash-igual); }
.dash-status-text--acima { color: var(--dash-acima); }
.dash-status-text--parada { color: var(--dash-parada); }

.dash-bar-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  max-width: 100%;
}

.dash-bar-pct {
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.dash-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.dash-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  max-width: 100%;
}

.dash-bar-fill--abaixo { background: var(--dash-abaixo); }
.dash-bar-fill--igual { background: var(--dash-igual); }
.dash-bar-fill--acima { background: var(--dash-acima); }
.dash-bar-fill--parada { background: var(--dash-parada); }

.dash-badge {
  display: inline-block;
  padding: 0.22rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dash-badge--abaixo {
  color: #fff;
  background: var(--dash-abaixo);
}

.dash-badge--igual {
  color: #0b1a0f;
  background: var(--dash-igual);
}

.dash-badge--acima {
  color: #041018;
  background: var(--dash-acima);
}

.dash-badge--parada {
  color: #f8fafc;
  background: var(--dash-parada);
}

.dash-legend {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.dash-legend li,
.dash-donut-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dash-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dash-dot--abaixo { background: var(--dash-abaixo); }
.dash-dot--igual { background: var(--dash-igual); }
.dash-dot--acima { background: var(--dash-acima); }
.dash-dot--parada { background: var(--dash-parada); }

.dash-side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 0.9rem;
}

.dash-donut-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.dash-donut {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

.dash-donut-center {
  fill: var(--text);
  font-size: 1.1rem;
  font-weight: 900;
  font-family: var(--font);
}

.dash-donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
}

.dash-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(1.35rem, 1fr));
  align-items: end;
  gap: 0.25rem;
  min-height: 120px;
  padding-top: 0.35rem;
  overflow: hidden;
  max-width: 100%;
}

.dash-bar-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.dash-bar-val {
  font-size: 0.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  min-height: 0.9rem;
}

.dash-bar-vtrack {
  width: 100%;
  max-width: 28px;
  height: 80px;
  border-radius: 4px 4px 0 0;
  background: var(--border);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.dash-bar-vfill {
  display: block;
  width: 100%;
  background: var(--text-muted);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height 0.35s ease;
}

.dash-bar-col.is-current .dash-bar-vfill {
  background: var(--dash-acima);
}

.dash-bar-col.is-current .dash-bar-lab {
  color: var(--dash-acima);
  font-weight: 800;
}

.dash-bar-lab {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

.dash-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 220px;
  overflow-y: auto;
}

.dash-events li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}

.dash-events li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dash-ev-maq {
  grid-column: 1;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--status-title);
}

.dash-ev-time {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.dash-ev-msg {
  grid-column: 1;
  color: var(--text-muted);
  line-height: 1.35;
}

.dash-rank {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dash-rank-row {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr) auto auto;
  gap: 0.35rem 0.5rem;
  align-items: center;
  font-size: 0.8rem;
}

.dash-rank-pos {
  font-weight: 900;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.dash-rank-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-rank-val {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.dash-rank-pct {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  min-width: 2.5rem;
  text-align: right;
}

.dash-badge-agregado {
  border-color: color-mix(in srgb, var(--brand-primary) 40%, var(--border));
  color: var(--brand-primary);
}

.dash-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--stitch);
  font-size: 0.8rem;
}

.dash-auto {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--text-muted);
}

.dash-refresh-btn {
  padding: 0.15rem 0.55rem !important;
  font-size: 0.72rem !important;
}

@media (max-width: 1100px) {
  .dash-kpis {
    grid-template-columns: repeat(auto-fit, minmax(min(8.5rem, 100%), 1fr));
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1280px) {
  body.page-painel .dash-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .dash-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-kpi--ring:nth-child(5),
  .dash-kpi:last-child {
    grid-column: 1 / -1;
  }

  .dash-title {
    font-size: 1.25rem;
  }

  .dash-table {
    font-size: 0.78rem;
  }

  .dash-badge {
    white-space: normal;
    line-height: 1.2;
  }
}

/* === FEEDBACK FAB (etiqueta de couro — refs/gemini-ui/floatbutton.html) === */
.feedback-fab-wrap {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1080;
  pointer-events: none;
}

.leather-fab {
  width: 64px;
  height: 64px;
  padding: 0;
  margin: 0;
  border: none;
  outline: none;
  background: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s ease;
}

.leather-fab:hover,
.leather-fab:focus-visible {
  transform: scale(1.08) translateY(-3px);
  filter: brightness(1.1);
}

.leather-fab:active {
  transform: scale(0.95) translateY(1px);
}

.leather-tag {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, #bf723d 0%, #8f4b1e 100%);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.2),
    inset 0 -2px 5px rgba(0, 0, 0, 0.4);
}

.leather-tag::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1.5px dashed #50270a;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0.85;
}

.leather-tag::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border: 1.5px dashed #df9e6d;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0.5;
}

.engraved-icon {
  width: 28px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
  filter:
    drop-shadow(0px -1px 0px rgba(0, 0, 0, 0.6))
    drop-shadow(0px 1px 1px rgba(255, 255, 255, 0.15));
}

.engraved-icon svg {
  width: 100%;
  height: 100%;
  fill: #421e06;
}

body.feedback-modal-open .site-scroll {
  overflow: hidden;
}

.feedback-modal[hidden] {
  display: none !important;
}

.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.feedback-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.feedback-modal__panel {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  padding: 0;
  background-color: var(--bg-surface);
  border: 2px solid var(--pocket-border, var(--border));
  border-radius: 0 0 8px 8px;
  box-shadow: var(--pocket-shadow, 0 16px 48px rgba(15, 23, 42, 0.25));
  overflow: hidden;
  color: var(--text);
}

/* Costura periférica do bolso — escopo só no modal (não usa .pocket global) */
.feedback-modal__panel::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border: 2px dashed var(--stitch);
  border-radius: 0 0 5px 5px;
  pointer-events: none;
  z-index: 5;
}

/* Segunda costura horizontal do topo — apenas dark */
html.d2j-theme[data-theme="dark"] .feedback-modal__panel::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 5px;
  right: 5px;
  border-top: 2px dashed var(--stitch);
  pointer-events: none;
  z-index: 5;
}

.feedback-modal__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface);
  padding: 25px 20px 20px;
  margin: 0;
  flex-shrink: 0;
}

html.d2j-theme[data-theme="dark"] .feedback-modal__header {
  padding: 33px 20px 20px;
}

/* Costura inferior do cós */
.feedback-modal__header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 5px;
  right: 5px;
  border-bottom: 2px dashed var(--stitch);
  pointer-events: none;
  z-index: 5;
}

.feedback-modal__title {
  margin: 0 0 0 5px;
  padding: 0;
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
}

/* Rebite cobre envelhecido (Gemini rebite.html) */
.feedback-modal__close.rivet-close-btn {
  position: absolute;
  z-index: 10;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  top: 12px;
  right: 12px;
  background: radial-gradient(
    circle,
    #855831 0%,
    #a87243 40%,
    #6e4420 75%,
    #40230b 100%
  );
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.4),
    inset 0 2px 3px rgba(255, 255, 255, 0.25),
    inset 0 -3px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.feedback-modal__close.rivet-close-btn::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border-radius: 50%;
  border: 1.5px solid #4a2b13;
  background: transparent;
  pointer-events: none;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.4),
    0 1px 1px rgba(255, 255, 255, 0.15);
}

.feedback-modal__close .rivet-icon {
  width: 14px;
  height: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
  filter:
    drop-shadow(0px -1px 0px rgba(0, 0, 0, 0.8))
    drop-shadow(0px 1px 1px rgba(255, 255, 255, 0.2));
}

.feedback-modal__close .rivet-icon svg {
  width: 100%;
  height: 100%;
  fill: #2c1605;
}

.feedback-modal__close.rivet-close-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.05);
}

.feedback-modal__close.rivet-close-btn:active {
  transform: scale(0.96) translateY(1px);
}

.feedback-modal__close.rivet-close-btn:focus-visible {
  outline: 2px solid var(--color-secondary, #d97706);
  outline-offset: 3px;
}

/* Light: sombra um pouco mais suave no denim claro */
html.d2j-theme[data-theme="light"] .feedback-modal__close.rivet-close-btn {
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.28),
    inset 0 2px 3px rgba(255, 255, 255, 0.28),
    inset 0 -3px 4px rgba(0, 0, 0, 0.45);
}

html.d2j-theme[data-theme="light"] .feedback-modal__close.rivet-close-btn:hover {
  filter: brightness(1.1);
}

/* Dark: rebite 5px abaixo da 2ª costura top (13px + 2px + 5px) */
html.d2j-theme[data-theme="dark"] .feedback-modal__close.rivet-close-btn {
  top: 20px;
}

.feedback-modal__form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.feedback-modal__body {
  padding: 25px;
  overflow-y: auto;
  flex: 0 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.feedback-local-banner {
  margin: 0 0 20px;
  padding: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.4;
  border-radius: 8px;
  border: 1px dashed var(--stitch, var(--border));
  background: color-mix(in srgb, var(--stitch, #d97706) 5%, var(--bg-app));
  color: var(--text-muted);
}

.feedback-modal__form label {
  display: block;
  margin-top: 15px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.feedback-modal__form label:first-of-type {
  margin-top: 0;
}

.feedback-modal__form select,
.feedback-modal__form textarea {
  width: 100%;
  margin-top: 6px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-app, var(--bg-deep));
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.feedback-modal__form textarea {
  resize: none;
}

.feedback-modal__form textarea:disabled,
.feedback-modal__form select:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.feedback-tipo-desc {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.feedback-contexto {
  margin-top: 12px;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background-color: var(--bg-app);
  border: 1px solid var(--pocket-border, var(--border));
}

.feedback-check {
  display: flex !important;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0 !important;
  font-weight: 600 !important;
  font-size: 0.8rem !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: var(--text) !important;
  cursor: pointer;
}

.feedback-check input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.feedback-contexto-resumo {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.75rem;
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
}

.feedback-contexto-resumo dt {
  color: var(--text-muted);
  font-weight: 600;
}

.feedback-contexto-resumo dd {
  margin: 0;
  word-break: break-word;
  color: var(--text);
}

.feedback-alert {
  margin-top: 10px;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.35;
}

.feedback-alert--success {
  background: color-mix(in srgb, #16a34a 18%, var(--bg-surface));
  border: 1px solid color-mix(in srgb, #16a34a 40%, var(--bg-surface));
  color: var(--text);
}

.feedback-alert--error {
  background: color-mix(in srgb, #dc2626 16%, var(--bg-surface));
  border: 1px solid color-mix(in srgb, #dc2626 40%, var(--bg-surface));
  color: var(--text);
}

.feedback-alert--info {
  background: color-mix(in srgb, var(--color-primary) 14%, var(--bg-surface));
  border: 1px solid color-mix(in srgb, var(--color-primary) 35%, var(--bg-surface));
  color: var(--text);
}

.feedback-modal__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0 25px 25px;
  flex-shrink: 0;
}

.feedback-modal__btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .feedback-fab-wrap {
    bottom: max(1rem, env(safe-area-inset-bottom));
    right: max(1rem, env(safe-area-inset-right));
  }

  .leather-fab {
    width: 56px;
    height: 56px;
  }

  .engraved-icon {
    width: 24px;
    height: 24px;
  }

  .feedback-modal {
    padding: 8px;
    align-items: flex-end;
  }

  .feedback-modal__panel {
    width: 100%;
    max-height: min(92dvh, calc(100vh - 16px));
    border-radius: 0 0 8px 8px;
  }
}



/* --- MVP extras: mapa, fichas, resumos --- */
.mapa-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 1rem;
}
.mapa-stage {
  flex: 1 1 180px;
  min-width: 160px;
  max-width: 280px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 0.75rem 0.9rem;
  box-shadow: var(--pocket-shadow);
}
.mapa-stage-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}
.mapa-stage-ord {
  display: inline-flex;
  width: 1.5rem;
  height: 1.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--brand-primary);
  color: var(--text-on-brand);
  font-size: 0.75rem;
  font-weight: 700;
}
.mapa-postos {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mapa-postos li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
  padding: 0.35rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.mapa-pecas {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--brand-secondary);
  font-weight: 600;
}
.mapa-arrow {
  align-self: center;
  font-size: 1.5rem;
  color: var(--brand-secondary);
  opacity: 0.7;
}
.ficha-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.ficha-foto {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.ficha-foto--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px dashed var(--border);
  font-size: 0.8rem;
}
.resumo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}
.resumo-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text);
  box-shadow: var(--pocket-shadow);
}
.resumo-card .muted {
  color: var(--text-muted);
}
.resumo-card strong {
  color: var(--text);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .mapa-arrow { display: none; }
  .mapa-stage { max-width: none; }
}

/* --- Minha conta --- */
.topbar-account-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-account-link.is-active {
  color: var(--color-secondary);
  border-color: var(--color-secondary);
  background: var(--glow-soft);
}

.account-panel {
  text-align: left;
}

.account-state {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.account-state strong {
  color: var(--ok);
  text-transform: capitalize;
}

.account-form__section {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--stitch);
  font-size: 1rem;
  text-align: left;
}

.account-field-wide {
  grid-column: span 2;
}

.account-password-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

.account-password-card h2 {
  margin-top: 0;
}

@media (max-width: 640px) {
  .account-field-wide {
    grid-column: auto;
  }

  .topbar-account-link {
    padding-inline: 0.55rem;
  }
}

/* --- Ajuda do usuário --- */
.topbar-help-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-help-link.is-active {
  color: var(--color-secondary);
  border-color: var(--color-secondary);
  background: var(--glow-soft);
}

body.page-ajuda .site-scroll {
  scroll-behavior: smooth;
}

body.page-ajuda .site-scroll > main {
  max-width: min(100%, 78rem);
  min-width: 0;
}

.help-hero {
  margin-bottom: 1rem;
}

.help-hero h1 {
  margin-bottom: 0.4rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.help-hero p {
  max-width: 52rem;
}

.help-layout {
  display: grid;
  grid-template-columns: minmax(13rem, 17rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.help-sidebar {
  position: sticky;
  top: 1rem;
  min-width: 0;
  max-height: calc(100dvh - var(--nav-h) - 2rem);
  overflow-y: auto;
  overflow-x: hidden;
}

.help-tree,
.help-section {
  border: 2px solid var(--pocket-border);
  background: var(--pocket-bg);
  box-shadow: var(--pocket-shadow);
}

.help-tree {
  padding: 0.8rem;
}

.help-tree summary {
  cursor: pointer;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.help-tree nav {
  margin-top: 0.65rem;
}

.help-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.help-tree ul ul {
  margin: 0.2rem 0 0.35rem 0.45rem;
  padding-left: 0.7rem;
  border-left: 1px dashed var(--stitch);
}

.help-tree a {
  display: block;
  padding: 0.28rem 0.35rem;
  color: var(--text-muted);
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.8rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.help-tree a:hover,
.help-tree a:focus-visible {
  color: var(--text);
  background: var(--hover-tint);
}

.help-content {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.help-section {
  padding: clamp(1rem, 2vw, 1.4rem);
  min-width: 0;
  overflow-wrap: anywhere;
  scroll-margin-top: 1rem;
}

.help-section h2,
.help-section h3 {
  scroll-margin-top: 1rem;
}

.help-section h2 {
  margin: 0 0 0.75rem;
  color: var(--status-title);
  font-size: 1.15rem;
}

.help-section h3 {
  margin: 1.15rem 0 0.45rem;
  font-size: 0.95rem;
}

.help-section p,
.help-section li {
  line-height: 1.65;
}

.help-section p {
  margin: 0.5rem 0;
}

.help-section ul,
.help-section ol {
  margin: 0.55rem 0;
  padding-left: 1.3rem;
}

.help-note {
  margin-top: 0.9rem;
  padding: 0.75rem 0.85rem;
  border-left: 4px solid var(--stitch);
  background: var(--hover-tint);
  line-height: 1.5;
}

.help-tips {
  display: grid;
  gap: 0.35rem;
}

.help-back-top {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.85rem;
  font-weight: 700;
}

@media (max-width: 760px) {
  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .help-tree nav {
    columns: 2;
    column-gap: 1rem;
  }

  .help-tree > nav > ul > li {
    break-inside: avoid;
  }
}

@media (max-width: 480px) {
  .topbar-help-link {
    padding-inline: 0.55rem;
  }

  .help-tree nav {
    columns: 1;
  }

  .help-section {
    padding: 1rem 0.9rem;
  }
}

/* === CHECKLIST INTERATIVO === */
.checklist-fab-wrap {
  position: fixed;
  left: 1.5rem;
  bottom: 1.5rem;
  z-index: 1080;
}

.checklist-fab {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--stitch);
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(145deg, #173b67, #0d1e36);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38), inset 0 0 0 4px #173b67;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.checklist-fab:hover,
.checklist-fab:focus-visible {
  transform: translateY(-3px) scale(1.06);
  filter: brightness(1.16);
}

.checklist-fab:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
}

.checklist-fab__icon {
  font-size: 2rem;
  font-weight: 900;
}

.checklist-fab__badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 25px;
  padding: 3px 6px;
  border: 2px solid var(--bg-app);
  border-radius: 999px;
  color: #fff;
  background: #b45309;
  font: 800 0.68rem/1 var(--font);
}

body.checklist-modal-open .site-scroll {
  overflow: hidden;
}

.checklist-modal[hidden] {
  display: none !important;
}

.checklist-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.checklist-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 13, 25, 0.78);
  backdrop-filter: blur(2px);
}

.checklist-modal__panel {
  position: relative;
  width: min(1120px, 100%);
  height: min(850px, calc(100dvh - 36px));
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--text);
  background: var(--bg-app);
  border: 2px solid var(--pocket-border, var(--border));
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.checklist-modal__panel:focus {
  outline: none;
}

.checklist-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex: 0 0 auto;
  padding: 1.25rem 1.5rem;
  border-bottom: 2px dashed var(--stitch);
  background: var(--bg-surface);
}

.checklist-modal__header h2 {
  margin: 0.1rem 0 0.25rem;
  color: var(--text);
  font-size: clamp(1.25rem, 2.5vw, 1.85rem);
}

.checklist-modal__eyebrow {
  margin: 0;
  color: var(--stitch);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.checklist-progress {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.checklist-modal__close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  background: var(--bg-app);
  cursor: pointer;
  font: 700 1.65rem/1 var(--font);
}

.checklist-modal__close:hover,
.checklist-modal__close:focus-visible {
  color: #fff;
  background: #b45309;
  outline: 2px solid var(--stitch);
  outline-offset: 2px;
}

.checklist-modal__body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  -webkit-overflow-scrolling: touch;
}

.checklist-modal__alert {
  flex: 0 0 auto;
  padding: 0.65rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.checklist-modal__alert--error {
  color: #fff;
  background: #991b1b;
}

.checklist-modal__alert--success {
  color: #fff;
  background: #166534;
}

.checklist-intro {
  max-width: 780px;
  margin: 0 0 1rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.checklist-modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.checklist-module {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-surface);
  overflow: hidden;
}

.checklist-module summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 68px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
}

.checklist-module summary::-webkit-details-marker {
  display: none;
}

.checklist-module summary:hover,
.checklist-module summary:focus-visible {
  background: var(--hover-tint);
  outline: none;
}

.checklist-module__title,
.checklist-item__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.checklist-module__title strong,
.checklist-item__text strong {
  overflow-wrap: anywhere;
}

.checklist-module__title small,
.checklist-item__text small {
  color: var(--text-muted);
}

.checklist-status {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: 900;
}

.checklist-status--ok {
  color: var(--ok);
}

.checklist-status--problema {
  color: var(--err);
}

.checklist-status--pendente,
.checklist-status--pending {
  color: var(--text-muted);
}

.checklist-items {
  display: grid;
  border-top: 1px solid var(--border);
}

.checklist-item {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  background: var(--bg-app);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.checklist-item:last-child {
  border-bottom: 0;
}

.checklist-item:hover,
.checklist-item:focus-visible {
  background: var(--hover-tint);
  outline: 2px solid var(--color-secondary);
  outline-offset: -2px;
}

.checklist-back {
  margin: 0 0 0.8rem;
  padding: 0.45rem 0;
  border: 0;
  color: var(--color-primary);
  background: transparent;
  cursor: pointer;
  font: 700 0.85rem/1.3 var(--font);
}

.checklist-test-card,
.checklist-result-form {
  max-width: 820px;
  margin-inline: auto;
  padding: clamp(1rem, 3vw, 1.6rem);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
}

.checklist-test-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--stitch);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.checklist-test-card h3 {
  margin: 0.45rem 0 1.2rem;
}

.checklist-test-card__label {
  margin: 1rem 0 0.25rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.checklist-test-card__action {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.5;
}

.checklist-open-page {
  display: inline-flex;
  margin-top: 1rem;
}

.checklist-result-form {
  margin-top: 1rem;
}

.checklist-result-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.checklist-result-form legend,
.checklist-result-form > label,
.checklist-result-form #checklistProblemFields label {
  display: block;
  margin: 0 0 0.5rem;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.checklist-result-form > label,
.checklist-result-form #checklistProblemFields {
  margin-top: 1rem;
}

.checklist-result-form label span {
  color: var(--text-muted);
  font-weight: 500;
}

.checklist-result-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.checklist-result-option {
  position: relative;
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 0.8rem;
  border: 2px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  text-align: center;
}

.checklist-result-option input {
  position: absolute;
  opacity: 0;
}

.checklist-result-option span {
  color: var(--text);
  font-weight: 800;
}

.checklist-result-option:has(input:focus-visible) {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}

.checklist-result-option--ok:has(input:checked) {
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 16%, var(--bg-surface));
}

.checklist-result-option--problem:has(input:checked) {
  border-color: var(--err);
  background: color-mix(in srgb, var(--err) 16%, var(--bg-surface));
}

.checklist-result-form textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  resize: vertical;
  color: var(--text);
  background: var(--bg-app);
  font: inherit;
}

.checklist-result-form textarea:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 1px;
}

.checklist-save {
  width: 100%;
  min-height: 50px;
  margin-top: 1rem;
  font-weight: 800;
}

@media (max-width: 760px) {
  .checklist-modal {
    padding: 0;
    place-items: stretch;
  }

  .checklist-modal__panel {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .checklist-modal__header {
    padding: max(1rem, env(safe-area-inset-top)) 1rem 1rem;
  }

  .checklist-modules {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .checklist-fab-wrap {
    left: max(1rem, env(safe-area-inset-left));
    bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .checklist-fab {
    width: 56px;
    height: 56px;
  }

  .checklist-result-options {
    grid-template-columns: 1fr;
  }

  .checklist-modal__body {
    padding: 0.85rem;
  }
}
