/* ============================================================
   KKTECH SUPORTE TOTAL — Design System Git / Primer
   Inspirado no visual GitForge (Dark Canvas, Inter + Space Grotesk + JetBrains Mono)
   ============================================================ */

:root {
  /* ---- Superfícies Git / Primer ---- */
  --bg: #141415;          /* fundo escuro principal */
  --bg-header: #0f0f10;   /* sidebar / barra de navegacao */
  --panel: #1a1a1c;       /* cards e caixas de input */
  --panel-2: #202023;     /* painel elevado / hover */
  --input-bg: #1a1a1c;
  --hover: #202023;
  --border: #26262a;
  --border-soft: #1f1f23;

  /* ---- Tipografia e Texto ---- */
  --text: #e1e1e3;
  --muted: #8b8b93;
  --faint: #5b5b63;

  /* ---- Destaques e Cores Semânticas Git ---- */
  --accent: #4d82f3;      /* azul Git */
  --accent-soft: #6f9bf5;
  --highlight: #253861;
  --open: #00c08b;        /* verde Git (resolvido / conectado / aberto) */
  --closed: #a371f7;      /* roxo Git (concluído) */
  --danger: #e54d42;      /* vermelho Git */
  --attention: #d29922;   /* âmbar Git */
  --primary: #3d6de0;
  --primary-hover: #4d82f3;
  --wa: #25d366;

  /* Mapeamento de Compatibilidade KKTECH */
  --ok: #00c08b;
  --ok-dim: rgba(0, 192, 139, 0.14);
  --warning: #d29922;
  --warning-dim: rgba(210, 153, 34, 0.14);
  --bg-subtle: #18181b;
  --bg-canvas: #0f0f10;
  --signal: #00c08b;
  --signal-dim: rgba(0, 192, 139, 0.14);
  --work: #d29922;
  --work-dim: rgba(210, 153, 34, 0.14);
  --alarm: #e54d42;
  --alarm-dim: rgba(229, 77, 66, 0.14);
  --info: #4d82f3;
  --info-dim: rgba(77, 130, 243, 0.14);
  --bg-raised: #1a1a1c;
  --bg-inset: #141415;
  --edge: #26262a;
  --edge-soft: #1f1f23;
  --text-dim: #8b8b93;

  /* Alturas de controle padrão GitHub / Primer */
  --ctl-h: 33px;
  --ctl-h-sm: 27px;
  --ctl-h-lg: 39px;
  --bar-h: 58px;
  --radius: 6px;
  --radius-xs: 3px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Fontes Git */
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: var(--display);
  --font-body: var(--sans);
  --font-mono: var(--mono);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --focus-ring: #4d82f3;
  --scroll-thumb: #38383f;
  --scroll-thumb-hover: #4a4a52;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Scrollbars Git ---------- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 6px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }

html {
  height: 100%;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

body > main {
  flex: 1 0 auto;
  width: 100%;
}

a { color: var(--accent); text-decoration: none; transition: color 0.12s var(--ease); }
a:hover { color: var(--accent-soft); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin-bottom: 0.5em; }
h1 { font-family: var(--display); font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
h2 { font-family: var(--display); font-size: 1.15rem; font-weight: 600; color: var(--text); }
h3 { font-size: 0.92rem; font-weight: 600; color: var(--muted); }

code, pre, .mono { font-family: var(--mono); }
code {
  background: var(--highlight);
  color: #a9c6ff;
  border-radius: 4px;
  padding: 0.18em 0.4em;
  font-size: 85%;
}
.code:not(td) {
  font-family: var(--mono);
  font-size: 0.78rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--accent-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

td.code,
th.code {
  display: table-cell !important;
  vertical-align: middle !important;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-soft);
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid var(--border-soft) !important;
  padding: 9px 12px !important;
  white-space: nowrap;
}

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 16px; position: relative; }

/* ============================================================
   TOPNAV PÚBLICA (Estilo GitHub: barra escura sólida)
   ============================================================ */
.masthead {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--bar-h, 58px);
  box-sizing: border-box;
}

.masthead-row {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  min-height: var(--bar-h, 58px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--text); }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #1b2838, #141c24);
  border: 1px solid rgba(77, 130, 243, 0.4);
  box-shadow: 0 0 10px rgba(77, 130, 243, 0.25);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  flex-shrink: 0;
}

.brand h1 { font-family: var(--display); font-size: 1.05rem; font-weight: 700; margin: 0; line-height: 1.1; }
.brand p { font-size: 0.65rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 0.1rem; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--hover); text-decoration: none; }
.nav-links a.active { color: var(--text); background: var(--panel-2); font-weight: 600; }

/* Nav Dropdown (Menu Público de Atendimento) */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: inherit;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.nav-dropdown-trigger:hover,
.nav-dropdown.open .nav-dropdown-trigger {
  color: var(--text);
  background: var(--hover);
  text-decoration: none;
}

.nav-dropdown-trigger.active,
.nav-dropdown.active .nav-dropdown-trigger {
  color: var(--text);
  background: var(--panel-2);
  font-weight: 600;
}

.nav-dropdown-chevron {
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
  opacity: 0.75;
  flex-shrink: 0;
  margin-left: 1px;
}

.nav-dropdown:hover .nav-dropdown-chevron,
.nav-dropdown.open .nav-dropdown-chevron {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--accent);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 250px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(77, 130, 243, 0.15);
  padding: 6px;
  z-index: 1000;
  flex-direction: column;
  gap: 3px;
}

.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 10px;
  display: none;
}

.nav-dropdown:hover::after,
.nav-dropdown.open::after {
  display: block;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  display: flex;
  animation: navDropdownFade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes navDropdownFade {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.nav-dropdown-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 8px 10px !important;
  background: transparent !important;
  border-radius: var(--radius, 6px) !important;
  color: var(--text) !important;
  text-decoration: none !important;
  transition: background 0.12s var(--ease), color 0.12s var(--ease), transform 0.12s var(--ease);
}

.nav-dropdown-item:hover {
  background: var(--hover) !important;
  color: #ffffff !important;
  transform: translateX(2px);
}

.nav-dropdown-item.active {
  background: rgba(77, 130, 243, 0.12) !important;
  color: var(--accent) !important;
}

.nav-dropdown-icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: var(--radius, 6px) !important;
  background: var(--bg-canvas) !important;
  border: 1px solid var(--border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--accent-soft) !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), transform 0.15s var(--ease);
}

.nav-dropdown-icon svg,
.nav-dropdown-icon .icon {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: 0 !important;
  color: currentColor !important;
  stroke: currentColor !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

.nav-dropdown-item:hover .nav-dropdown-icon {
  border-color: rgba(77, 130, 243, 0.45) !important;
  background: var(--panel-2) !important;
  color: #ffffff !important;
  transform: scale(1.05);
}

.nav-dropdown-item.active .nav-dropdown-icon {
  border-color: var(--accent) !important;
  background: rgba(77, 130, 243, 0.18) !important;
  color: var(--accent) !important;
}

.nav-dropdown-text {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  text-align: left !important;
  flex: 1 1 auto;
}

.nav-dropdown-text strong {
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  line-height: 1.3 !important;
}

.nav-dropdown-item:hover .nav-dropdown-text strong,
.nav-dropdown-item.active .nav-dropdown-text strong {
  color: var(--accent) !important;
}

.nav-dropdown-text small {
  font-size: 0.72rem !important;
  color: var(--muted) !important;
  line-height: 1.25 !important;
  margin-top: 1px !important;
}

@media (max-width: 620px) {
  .nav-dropdown-menu {
    left: 0;
    transform: none;
  }
  @keyframes navDropdownFade {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

.led-strip { display: flex; align-items: center; gap: 12px; }
.led {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.led::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--open);
  box-shadow: 0 0 6px var(--open);
}
.led.amber::before { background: var(--attention); box-shadow: 0 0 6px var(--attention); }
.led.red::before { background: var(--danger); box-shadow: 0 0 6px var(--danger); }

/* ============================================================
   BOTÕES (Padrão GitHub / Primer)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid rgba(240, 246, 252, 0.12);
  border-radius: var(--radius);
  height: var(--ctl-h);
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  vertical-align: middle;
  box-sizing: border-box;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.08s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn svg,
.btn .icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: block;
  margin: 0;
}
.btn-sm svg,
.btn-sm .icon {
  width: 13px;
  height: 13px;
}
.btn-lg svg,
.btn-lg .icon {
  width: 18px;
  height: 18px;
}
.btn:hover {
  background: var(--hover);
  border-color: rgba(240, 246, 252, 0.22);
  color: var(--text);
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  border-color: rgba(240, 246, 252, 0.1);
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-danger {
  background: rgba(229, 77, 66, 0.12);
  border-color: rgba(229, 77, 66, 0.35);
  color: var(--danger);
  font-weight: 500;
}
.btn-danger:hover {
  background: rgba(229, 77, 66, 0.24);
  border-color: var(--danger);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.btn-ghost:hover {
  background: var(--panel-2);
  color: var(--text);
}

.btn-sm { height: var(--ctl-h-sm); padding: 0 10px; font-size: 12px; line-height: 1; box-sizing: border-box; vertical-align: middle; }
.btn-lg { height: var(--ctl-h-lg); padding: 0 20px; font-size: 14px; font-weight: 600; line-height: 1; box-sizing: border-box; vertical-align: middle; }
.btn-wa { background: #1b4d32; border-color: #25d366; color: #7de8cb; }
.btn-wa:hover { background: #25d366; color: #0f1c13; }

.btn-secondary {
  background: var(--panel-2);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--hover);
  border-color: var(--muted);
  color: #fff;
}

/* ============================================================
   ÍCONES SVG DO SISTEMA (Design Git / Feather / Lucide)
   ============================================================ */
svg.icon,
.icon svg,
svg[class*="icon"] {
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
  stroke-width: 2;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

svg.icon,
.icon svg {
  width: 18px;
  height: 18px;
}

/* Standalone .icon box para cards, serviços e estatísticas */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Modificadores de Tamanho de Ícones */
.icon-xs, svg.icon-xs { width: 12px !important; height: 12px !important; }
.icon-sm, svg.icon-sm { width: 14px !important; height: 14px !important; }
.icon-md, svg.icon-md { width: 18px !important; height: 18px !important; }
.icon-lg, svg.icon-lg { width: 22px !important; height: 22px !important; }
.icon-xl, svg.icon-xl { width: 28px !important; height: 28px !important; }
.icon-2xl, svg.icon-2xl { width: 36px !important; height: 36px !important; }

/* Box quadrado de ícone para destaques */
.icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.icon-box svg {
  width: 18px;
  height: 18px;
}

/* Ícones em Botões */
.btn svg,
.btn .icon {
  width: 15px;
  height: 15px;
  margin-right: 6px;
  flex-shrink: 0;
  vertical-align: -0.15em;
}
.btn-sm svg,
.btn-sm .icon {
  width: 13px;
  height: 13px;
  margin-right: 4px;
}
.btn-lg svg,
.btn-lg .icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}
.btn svg:only-child,
.btn .icon:only-child,
.btn-icon svg,
.btn-icon .icon {
  margin-right: 0 !important;
}

/* Botão só-ícone (padrão GitPrimer .icon-btn) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius);
  transition: color 0.12s var(--ease), background-color 0.12s var(--ease);
}
.icon-btn:hover {
  color: var(--danger);
  background: rgba(229, 77, 66, 0.12);
  border-color: rgba(229, 77, 66, 0.3);
}

/* Ícones em Títulos e Cabeçalhos */
h1 svg, h1 .icon, .page-head h1 svg, .page-head h1 .icon {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  vertical-align: -0.18em;
  color: var(--accent-soft);
  flex-shrink: 0;
}
h2 svg, h2 .icon, .card-title svg, .panel-head h2 svg {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: -0.16em;
  color: var(--accent-soft);
  flex-shrink: 0;
}
h3 svg, h3 .icon {
  width: 15px;
  height: 15px;
  margin-right: 6px;
  vertical-align: -0.14em;
  color: var(--muted);
  flex-shrink: 0;
}
h4 svg, h4 .icon {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -0.12em;
  color: var(--muted);
  flex-shrink: 0;
}

/* ============================================================
   CAMPOS DE FORMULÁRIO COM ÍCONES (input-icon-wrap)
   ============================================================ */
.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
  position: relative;
}
label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.4;
  min-height: 20px;
  color: var(--text);
}
label svg,
label .icon {
  width: 14px;
  height: 14px;
  color: var(--accent-soft);
  flex-shrink: 0;
  display: block;
  margin: 0;
}

.input-icon-wrap,
.input-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100%;
  height: var(--ctl-h);
  box-sizing: border-box;
}

.textarea-icon-wrap {
  position: relative !important;
  display: block !important;
  width: 100%;
  box-sizing: border-box;
}

.input-icon-wrap > .field-icon,
.input-wrap > .field-icon,
.input-icon-wrap > svg,
.input-wrap > svg {
  position: absolute !important;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  pointer-events: none;
  z-index: 3;
  width: 16px;
  height: 16px;
  transition: color 0.15s var(--ease);
}
.input-icon-wrap > .field-icon svg,
.input-wrap > .field-icon svg,
.input-icon-wrap > svg,
.input-wrap > svg {
  width: 15px;
  height: 15px;
  display: block;
}

.input-icon-wrap > input,
.input-wrap > input,
.input-icon-wrap > select,
.input-wrap > select,
.input-icon-wrap > .dp-trigger {
  padding-left: 38px !important;
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box;
  display: block !important;
}

.textarea-icon-wrap > .field-icon,
.textarea-icon-wrap > svg {
  position: absolute !important;
  left: 12px;
  top: 12px;
  transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  pointer-events: none;
  z-index: 3;
  width: 16px;
  height: 16px;
  transition: color 0.15s var(--ease);
}
.textarea-icon-wrap > .field-icon svg,
.textarea-icon-wrap > svg {
  width: 15px;
  height: 15px;
}
.textarea-icon-wrap > textarea {
  padding-left: 38px !important;
  padding-top: 10px !important;
  width: 100%;
}

.input-icon-wrap:focus-within > .field-icon,
.input-icon-wrap:focus-within > svg,
.textarea-icon-wrap:focus-within > .field-icon,
.textarea-icon-wrap:focus-within > svg,
.input-wrap:focus-within > .field-icon,
.input-wrap:focus-within > svg {
  color: var(--focus-ring);
}

/* Cores Semânticas Auxiliares para Ícones */
.icon-wa, .icon-whatsapp { color: #25d366 !important; }
.icon-pdf { color: #ff5555 !important; }
.icon-trash { color: var(--danger) !important; }
.icon-check, .icon-check-circle { color: var(--open) !important; }
.icon-warn, .icon-alert-triangle, .icon-urgente { color: var(--attention) !important; }
.icon-credit-card { color: var(--accent-soft) !important; }
.icon-pix { color: #00bdae !important; }
.icon-lock, .icon-key { color: var(--accent-soft) !important; }

/* Ícones em Badges e Tags */
.badge svg,
.badge .icon,
.tag svg,
.tag .icon {
  width: 12px;
  height: 12px;
  vertical-align: -0.15em;
  margin-right: 4px;
}
.badge svg:only-child,
.tag svg:only-child {
  margin-right: 0 !important;
}

/* Ícones em Tabelas */
th svg, th .icon {
  width: 13px;
  height: 13px;
  vertical-align: -0.15em;
  margin-right: 4px;
  color: var(--faint);
}
td svg, td .icon {
  vertical-align: -0.15em;
  flex-shrink: 0;
}
td a.btn svg,
td button.btn svg {
  margin-right: 0 !important;
}

/* Ícones em Links de Navegação */
.nav-links a svg {
  width: 14px;
  height: 14px;
  margin-right: 5px;
  vertical-align: -0.15em;
}
.side-link svg {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -0.15em;
  flex-shrink: 0;
  color: var(--muted);
  transition: color 0.15s var(--ease);
}
.side-link:hover svg,
.side-link.active svg {
  color: var(--accent-soft);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md, 8px);
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.stat-icon svg,
.stat-icon .icon {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
  margin: 0 !important;
  vertical-align: 0 !important;
}
.stat-icon.sm,
.stat-icon[style*="width:36px"],
.stat-icon[style*="width: 36px"],
.stat-icon[style*="width:38px"],
.stat-icon[style*="width: 38px"],
.help-header-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: var(--radius, 6px) !important;
}
.stat-icon.sm svg,
.stat-icon[style*="width:36px"] svg,
.stat-icon[style*="width: 36px"] svg,
.stat-icon[style*="width:38px"] svg,
.stat-icon[style*="width: 38px"] svg,
.help-header-icon svg {
  width: 18px !important;
  height: 18px !important;
}
.brand-mark svg {
  width: 18px;
  height: 18px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
select,
.cselect-trigger,
.dp-trigger {
  width: 100%;
  height: var(--ctl-h);
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  line-height: normal;
  vertical-align: middle;
  box-sizing: border-box;
  display: block;
  transition: border-color 0.15s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
input[type="file"] {
  display: flex;
  align-items: center;
  padding-top: 4px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}
input[type="file"]::file-selector-button {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 2px 10px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  margin-right: 12px;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
input[type="file"]::file-selector-button:hover {
  background: var(--hover);
  border-color: var(--accent);
  color: #fff;
}
textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  min-height: 85px;
  resize: vertical;
  transition: border-color 0.15s var(--ease);
}

/* ============================================================
   FOCO VISÍVEL LIMPO (Padrão GitPrimer / Sem Halo Semi-transparente)
   Suprime totalmente halos azuis translúcidos (-webkit-focus-ring-color / box-shadow)
   ============================================================ */
*:focus,
*:focus-visible {
  outline: none !important;
}
:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}

/* Campos de texto, select, textarea e dropdowns customizados:
   borda sólida limpa de 1px na cor de foco, SEM outline do navegador e SEM halo semi-transparente */
input,
textarea,
select,
.cselect-trigger,
.dp-trigger {
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
input:not([type="checkbox"]):not([type="radio"]):focus-visible,
textarea:focus,
textarea:focus-visible,
select:focus,
select:focus-visible,
.cselect-trigger:focus,
.cselect-trigger:focus-visible,
.cselect.open .cselect-trigger,
.dp-trigger:focus,
.dp-trigger:focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  border-color: var(--focus-ring) !important;
}

/* Links, botões e elementos interativos navegados por teclado */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[tabindex]:focus-visible {
  outline: 1px solid var(--focus-ring) !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

/* Clique do mouse não exibe anel em links e botões */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.btn:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}

/* Checkbox e Radio */
input[type="checkbox"]:focus,
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus,
input[type="radio"]:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border-color: var(--focus-ring) !important;
}

input::placeholder, textarea::placeholder { color: var(--faint); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.form-grid > .field { margin-bottom: 0; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 1.5rem; flex-wrap: wrap; }
.form-actions .btn { height: var(--ctl-h); }

/* ============================================================
   CSELECT — Custom Dropdown Component (Git style)
   ============================================================ */
.cselect {
  position: relative;
  width: 100%;
  height: var(--ctl-h);
  display: block;
  box-sizing: border-box;
}
.cselect-trigger {
  width: 100%;
  height: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.cselect-trigger:hover {
  border-color: rgba(240, 246, 252, 0.25);
  background: var(--panel-2);
}
.cselect.open .cselect-trigger,
.cselect-trigger:focus,
.cselect-trigger:focus-visible {
  outline: none !important;
  border-color: var(--focus-ring) !important;
  box-shadow: none !important;
}
.cselect-trigger-content {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cselect-icon {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  flex-shrink: 0;
}
.cselect-icon svg {
  width: 15px;
  height: 15px;
}
.cselect-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text);
}
.cselect-chevron {
  width: 10px;
  height: 6px;
  color: var(--faint);
  flex-shrink: 0;
  margin-left: 8px;
  transition: transform 0.2s var(--ease);
}
.cselect.open .cselect-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.cselect-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  padding: 4px;
  z-index: 100;
  max-height: 240px;
  overflow-y: auto;
}
.cselect.open .cselect-menu {
  display: block;
}
.cselect-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}
.cselect-option:hover {
  background: var(--hover);
  color: #fff;
}
.cselect-option.active {
  background: rgba(77, 130, 243, 0.15);
  color: var(--accent);
  font-weight: 600;
}

/* ============================================================
   DATEPICKER — Custom Date Component (Git style)
   ============================================================ */
.datepicker {
  position: relative;
  width: 100%;
  height: var(--ctl-h);
  display: block;
  box-sizing: border-box;
}
.dp-trigger {
  width: 100%;
  height: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-sizing: border-box;
  vertical-align: middle;
  transition: border-color 0.15s var(--ease);
}
.dp-trigger:hover {
  border-color: rgba(240, 246, 252, 0.25);
}
.dp-trigger:focus,
.dp-trigger:focus-visible {
  outline: none !important;
  border-color: var(--focus-ring) !important;
  box-shadow: none !important;
}
.dp-trigger svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
  flex-shrink: 0;
}
.dp-label {
  font-size: 13px;
}
.dp-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  padding: 10px;
  z-index: 100;
  width: 260px;
}
.dp-panel[hidden] {
  display: none !important;
}
.dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.dp-title {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text);
  text-transform: capitalize;
}
.dp-nav {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  cursor: pointer;
}
.dp-nav:hover {
  background: var(--hover);
  color: var(--text);
}
.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.dp-dow {
  font-size: 10.5px;
  color: var(--faint);
  font-family: var(--mono);
  text-transform: uppercase;
  padding: 4px 0;
}
.dp-day {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 12px;
  padding: 6px 0;
  border-radius: 4px;
  cursor: pointer;
}
.dp-day:hover {
  background: var(--hover);
}
.dp-day.today {
  border: 1px solid var(--accent);
}
.dp-day.selected {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.dp-foot {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

/* ============================================================
   CARDS & PAINÉIS (Estilo Repositório GitHub / GitForge)
   ============================================================ */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: none;
}
.card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.card h2 .tag,
.card h2 .badge,
.card h2 .btn {
  margin-left: auto;
}
.tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 500;
  text-transform: uppercase;
}

/* ============================================================
   TABELAS (Estilo Lista de Commits / Arquivos Git)
   ============================================================ */
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: none;
  margin-bottom: 16px;
}
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
thead tr {
  background: #171719;
  border-bottom: 1px solid var(--border);
}
th {
  padding: 8px 12px;
  font-weight: 500;
  font-size: 11.5px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
}
td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td, tbody tr:hover { background: var(--hover); }
tr.empty td { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }

/* ============================================================
   BADGES (Pills Semânticas Estilo Primer)
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge:has(svg)::before,
.badge:has(.icon)::before {
  display: none !important;
}
.badge.ok { background: rgba(0, 192, 139, 0.12); color: var(--open); border-color: rgba(0, 192, 139, 0.3); }
.badge.work { background: rgba(210, 153, 34, 0.12); color: var(--attention); border-color: rgba(210, 153, 34, 0.3); }
.badge.alarm { background: rgba(229, 77, 66, 0.12); color: var(--danger); border-color: rgba(229, 77, 66, 0.3); }
.badge.info { background: rgba(77, 130, 243, 0.12); color: var(--accent-soft); border-color: rgba(77, 130, 243, 0.3); }
.badge.off { background: rgba(139, 139, 147, 0.12); color: var(--muted); border-color: var(--border); }

/* ============================================================
   ADMIN SIDEBAR & LAYOUT (70% centralizado após sidebar)
   ============================================================ */
.admin-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: var(--bg);
}
.admin-side {
  background: var(--bg-header);
  border-right: 1px solid var(--border);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-side .side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.admin-side .side-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 12px 8px 4px;
}
.admin-side a.side-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.admin-side a.side-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.admin-side a.side-link:hover { color: var(--text); background: var(--hover); text-decoration: none; }
.admin-side a.side-link.active {
  color: var(--accent-soft);
  background: rgba(77, 130, 243, 0.12);
  border-left: 2px solid var(--accent);
  font-weight: 600;
}
.admin-side .side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }

/* Conteúdo principal após sidebar: ocupa no máximo 70% e alinhado ao centro */
.admin-main {
  flex: 1;
  padding: 24px 20px 48px;
  min-width: 0;
  background: var(--bg);
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.admin-content {
  width: 100%;
  max-width: 70%;
  margin: 0 auto;
}
@media (max-width: 1366px) {
  .admin-content { max-width: 85%; }
}
@media (max-width: 1024px) {
  .admin-content { max-width: 95%; }
}
@media (max-width: 768px) {
  .admin-body { grid-template-columns: 1fr; }
  .admin-content { max-width: 100%; }
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.admin-head h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-head .sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 3px;
  font-family: var(--sans);
}

/* ============================================================
   STATS GRID (Estilo Métricas GitHub / GitForge)
   ============================================================ */
.stat-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
  overflow-x: auto;
}
@media (max-width: 900px) {
  .stat-grid {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: none;
}
.stat-card:has(.stat-icon),
.stat-card.stat-card-flex,
.help-stat-card {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 14px 16px !important;
}
.stat-info,
.help-stat-info {
  flex: 1;
  min-width: 0;
}
.stat-label,
.help-stat-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--mono);
  line-height: 1.2;
}
.stat-val,
.help-stat-val {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--display);
  color: var(--text);
  line-height: 1.2;
  margin-top: 3px;
}
.stat-sub,
.help-stat-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-card .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-card .k i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.stat-card .v { font-family: var(--display); font-size: 1.35rem; font-weight: 700; margin-top: 4px; color: var(--text); line-height: 1.2; }
.stat-card.ok .k { color: var(--open); } .stat-card.ok .v { color: var(--open); }
.stat-card.work .k { color: var(--attention); } .stat-card.work .v { color: var(--attention); }
.stat-card.alarm .k { color: var(--danger); } .stat-card.alarm .v { color: var(--danger); }
.stat-card.info .k { color: var(--accent-soft); } .stat-card.info .v { color: var(--accent-soft); }

/* ============================================================
   KANBAN DA BANCADA (Estilo GitHub Projects v2)
   ============================================================ */
.kanban-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1.2rem;
  min-height: calc(100vh - 200px);
  align-items: stretch;
}
.kanban-column {
  flex: 0 0 280px;
  background: var(--bg-header);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
}
.kanban-header {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.8rem;
}
.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
  overflow-y: auto;
}
.kanban-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.kanban-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}
.kanban-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kanban-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}
.kanban-actions { display: flex; gap: 0.4rem; align-items: center; }
.kanban-empty {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 2.2rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin: auto 0;
}

/* ============================================================
   DETALHES DE OS & RESUMO (Duas Colunas)
   ============================================================ */
.two-col { display: grid; grid-template-columns: 1.65fr 1fr; gap: 1.4rem; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.55rem 1.2rem; font-size: 0.88rem; }
.kv dt { font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 0.2rem; }
.kv dd { color: var(--text); }
.os-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-top: 1rem;
}
.os-total .label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.os-total .value { font-family: var(--display); font-size: 1.55rem; font-weight: 700; color: var(--open); }

/* ============================================================
   FLASHES & NOTIFICAÇÕES (Cores Sólidas e Bordas Finas dos 4 Lados)
   ============================================================ */
.flashes {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  width: 100%;
}
.flash {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #181d24;
  border: 1px solid #2e353f;
  border-radius: var(--radius);
  padding: 0.85rem 1.15rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #e6edf3;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.flash svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.flash.ok,
.flash.success {
  background: #0d281e;
  border: 1px solid #00c08b;
  color: #e6edf3;
}
.flash.ok svg,
.flash.success svg {
  color: #00c08b;
}
.flash.warn {
  background: #291e0a;
  border: 1px solid #d29922;
  color: #e6edf3;
}
.flash.warn svg {
  color: #d29922;
}
.flash.err,
.flash.danger,
.flash.alarm {
  background: #2c1214;
  border: 1px solid #e54d42;
  color: #e6edf3;
}
.flash.err svg,
.flash.danger svg,
.flash.alarm svg {
  color: #e54d42;
}
.flash.info {
  background: #101e33;
  border: 1px solid #4d82f3;
  color: #e6edf3;
}
.flash.info svg {
  color: #4d82f3;
}

/* Toast stack em cores sólidas */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #181d24;
  border: 1px solid #2e353f;
  border-radius: var(--radius);
  padding: 10px 16px;
  color: #e6edf3;
  font-size: 0.85rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  animation: toastIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.success, .toast.ok {
  background: #0d281e;
  border: 1px solid #00c08b;
}
.toast.success svg, .toast.ok svg {
  color: #00c08b;
}
.toast.warn {
  background: #291e0a;
  border: 1px solid #d29922;
}
.toast.warn svg {
  color: #d29922;
}
.toast svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-header);
  margin-top: auto !important;
  flex-shrink: 0;
  width: 100%;
  min-height: var(--bar-h, 58px);
  display: flex;
  align-items: center;
  padding: 0;
  font-size: 0.82rem;
  box-sizing: border-box;
}
.site-footer .container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0 16px !important;
  min-height: var(--bar-h, 58px);
  box-sizing: border-box;
}
.site-footer p {
  color: var(--muted);
  font-size: 0.78rem;
  font-family: var(--mono);
  margin: 0;
  line-height: 1.4;
}

/* ============================================================
   ESTOQUE — FOTOS DE PRODUTOS & NOTAS FISCAIS
   ============================================================ */
.product-thumb {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--panel-2);
  display: inline-block;
  vertical-align: middle;
}
.product-thumb-placeholder {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  vertical-align: middle;
}
.product-thumb-placeholder svg {
  width: 18px;
  height: 18px;
}
.nf-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius);
  background: rgba(77, 130, 243, 0.12);
  color: var(--accent-soft);
  border: 1px solid rgba(77, 130, 243, 0.3);
  font-size: 11.5px;
  font-family: var(--mono);
  text-decoration: none;
  transition: all 0.15s var(--ease);
}
.nf-badge svg {
  width: 13px;
  height: 13px;
}
.nf-badge:hover {
  background: rgba(77, 130, 243, 0.25);
  color: #fff;
  text-decoration: none;
}

/* ============================================================
   PAGAMENTOS — PIX DIRETO & MERCADO PAGO
   ============================================================ */
.payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 1rem;
}
.pix-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}
.pix-qr-frame {
  background: #ffffff;
  padding: 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  margin-bottom: 12px;
}
.pix-qr-frame svg {
  display: block;
  max-width: 190px;
  max-height: 190px;
  width: 100%;
  height: auto;
}
.pix-copia-cola-box {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  width: 100%;
}
.pix-copia-cola-box input {
  flex: 1;
  min-width: 0;
  height: var(--ctl-h);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  background: var(--bg);
}
.pix-copia-cola-box .btn {
  height: var(--ctl-h);
  flex-shrink: 0;
}

/* ============================================================
   ALINHAMENTOS VERTICAIS PRECISOS DE CONTROLES
   ============================================================ */
.input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.input-group > .input-icon-wrap,
.input-group > .cselect,
.input-group > input {
  flex: 1;
  min-width: 0;
  height: var(--ctl-h);
}
.input-group > .btn {
  flex-shrink: 0;
  height: var(--ctl-h);
}

.filter-bar {
  margin-bottom: 1rem;
  width: 100%;
}
.filter-bar form,
form.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}
.filter-bar .input-icon-wrap {
  flex: 1;
  min-width: 220px;
  height: var(--ctl-h);
}
.filter-bar .cselect {
  height: var(--ctl-h);
}
.filter-bar .btn {
  height: var(--ctl-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}
.row-actions form {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
}
.row-actions .btn {
  height: var(--ctl-h-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.mp-card {
  background: rgba(0, 158, 227, 0.08);
  border: 1px solid rgba(0, 158, 227, 0.3);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.btn-mp {
  background: #009ee3;
  border-color: #009ee3;
  color: #ffffff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn-mp:hover {
  background: #0081b8;
  border-color: #0081b8;
  color: #ffffff;
  text-decoration: none;
}


/* ============================================================
   MODAIS & CONFIRMAÇÕES (Estilo GitForge / Primer)
   ============================================================ */
/* ============================================================
   MODAIS & CONFIRMAÇÕES (Perfeito Alinhamento Horizontal e Vertical)
   ============================================================ */
.modal-overlay,
.modal-backdrop,
[id^="modal-"],
[id^="modalConfirmar"],
[id^="modalReagendar"],
[id^="modalCancelar"],
#modalReagendar {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  box-sizing: border-box !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  place-items: center !important;
  text-align: left !important;
  padding: 1.5rem 1rem !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.modal-overlay[style*="display: none"],
.modal-overlay[style*="display:none"],
[id^="modal-"][style*="display: none"],
[id^="modal-"][style*="display:none"],
[id^="modalConfirmar"][style*="display: none"],
[id^="modalConfirmar"][style*="display:none"],
[id^="modalReagendar"][style*="display: none"],
[id^="modalReagendar"][style*="display:none"],
[id^="modalCancelar"][style*="display: none"],
[id^="modalCancelar"][style*="display:none"],
#modalReagendar[style*="display: none"],
#modalReagendar[style*="display:none"] {
  display: none !important;
}

.modal-overlay > .modal,
.modal-overlay > .card,
.modal-backdrop > .modal,
.modal-backdrop > .card,
[id^="modal-"] > .modal,
[id^="modal-"] > .card,
[id^="modalConfirmar"] > .modal,
[id^="modalConfirmar"] > .card,
[id^="modalReagendar"] > .modal,
[id^="modalReagendar"] > .card,
[id^="modalCancelar"] > .modal,
[id^="modalCancelar"] > .card,
#modalReagendar > .modal,
#modalReagendar > .card {
  margin: auto !important;
  position: relative !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  box-sizing: border-box !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--border) !important;
  animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  width: 100%;
  max-width: 440px;
  padding: 1.4rem;
}
.modal.danger {
  border-color: var(--danger);
}
.modal h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.8rem;
}
.modal h3 svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}
.modal.danger h3 svg {
  color: var(--danger);
}
.modal p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1.4rem;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================================
   TOASTS (Notificações Flutuantes Git)
   ============================================================ */
.toast-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  border-left: 3px solid var(--open);
}
.toast.warn {
  border-left-color: var(--attention);
}
.toast.danger, .toast.error {
  border-left-color: var(--danger);
}
.toast svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--open);
}
.toast.warn svg {
  color: var(--attention);
}
.toast.danger svg, .toast.error svg {
  color: var(--danger);
}

.icon-sm { width: 14px; height: 14px; vertical-align: -2px; }

/* ============================================================
   SEÇÃO HERO & PÁGINAS PÚBLICAS (Estilo Git / Primer)
   ============================================================ */
.hero {
  padding: 3.5rem 0 2rem;
  max-width: 840px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
  background: rgba(77, 130, 243, 0.1);
  border: 1px solid rgba(77, 130, 243, 0.25);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 1.1rem;
}
.hero h2 {
  font-family: var(--display);
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: var(--text);
  margin-bottom: 1rem;
}
.hero h2 em {
  font-style: normal;
  color: var(--accent);
}
.lead {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 680px;
  margin-bottom: 1.8rem;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 2.2rem;
}

/* Painel de Diagnóstico / Métricas da Home */
.diag-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.diag-cell {
  display: flex;
  flex-direction: column;
}
.diag-cell .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.diag-cell .k i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--open);
}
.diag-cell .v {
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}

/* Seções e Cards de Serviço */
.section {
  padding: 2.6rem 0 1rem;
}
.section-head {
  margin-bottom: 1.5rem;
}
.section-head h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.section-head .sub {
  font-size: 0.88rem;
  color: var(--muted);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.service-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), transform 0.15s var(--ease);
}
.service-card:hover {
  border-color: var(--accent);
  background: var(--hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}
.service-card .service-card-icon,
.service-card > div.icon,
.service-card > .icon:not(svg) {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--border);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--accent-soft);
  margin-bottom: 14px;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: all 0.15s var(--ease);
}
.service-card:hover .service-card-icon {
  border-color: rgba(240, 246, 252, 0.2);
  background: var(--panel-3, #21262d);
}

/* Card top icons: ONLY direct child or inside .service-card-icon, NEVER inside buttons! */
.service-card > .service-card-icon svg,
.service-card > div.icon svg,
.service-card > svg.icon {
  width: 22px !important;
  height: 22px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  flex-shrink: 0;
  color: var(--accent-soft);
}

/* Specific theme highlights for contact cards */
.service-card .service-card-icon.service-card-icon-wa {
  color: #25d366 !important;
  background: rgba(37, 211, 102, 0.1) !important;
  border-color: rgba(37, 211, 102, 0.3) !important;
}
.service-card .service-card-icon.service-card-icon-wa svg {
  color: #25d366 !important;
}
.service-card:hover .service-card-icon.service-card-icon-wa {
  background: rgba(37, 211, 102, 0.18) !important;
  border-color: #25d366 !important;
  box-shadow: 0 0 12px rgba(37, 211, 102, 0.25);
}

.service-card .service-card-icon.service-card-icon-wrench {
  color: var(--accent-soft) !important;
  background: rgba(88, 166, 255, 0.1) !important;
  border-color: rgba(88, 166, 255, 0.3) !important;
}
.service-card .service-card-icon.service-card-icon-wrench svg {
  color: var(--accent-soft) !important;
}
.service-card:hover .service-card-icon.service-card-icon-wrench {
  background: rgba(88, 166, 255, 0.18) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 12px rgba(88, 166, 255, 0.25);
}

.service-card .service-card-icon.service-card-icon-calendar {
  color: #a371f7 !important;
  background: rgba(163, 113, 247, 0.1) !important;
  border-color: rgba(163, 113, 247, 0.3) !important;
}
.service-card .service-card-icon.service-card-icon-calendar svg {
  color: #a371f7 !important;
}
.service-card:hover .service-card-icon.service-card-icon-calendar {
  background: rgba(163, 113, 247, 0.18) !important;
  border-color: #a371f7 !important;
  box-shadow: 0 0 12px rgba(163, 113, 247, 0.25);
}

/* Service card buttons and button icons */
.service-card .hero-actions {
  margin-top: 1.25rem !important;
  display: flex !important;
  align-items: center !important;
}
.service-card .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  height: 36px !important;
  padding: 0 14px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  border-radius: var(--radius) !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
}
.service-card .btn svg,
.service-card .btn .icon {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: currentColor !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  flex-shrink: 0 !important;
}

.service-card h4 {
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.service-card p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Busca e Rastreio Rápido */
.track-box {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 480px;
}
.track-box input {
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Timeline Git (Commits / Histórico de Manutenção) */
.timeline {
  position: relative;
  padding-left: 28px;
  margin-top: 1.2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}
.tl-item {
  position: relative;
  margin-bottom: 1.35rem;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--border);
}
.tl-status {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
}
.tl-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.tl-note {
  font-size: 13px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-top: 6px;
}

/* Login Card Git */
.login-card {
  margin: 1.5rem auto 3rem;
}
.login-hint {
  font-size: 12px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-top: 1.25rem;
  text-align: center;
}
.login-hint strong {
  color: var(--accent-soft);
  font-family: var(--mono);
}

@media (max-width: 900px) {
  .admin-body { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--border); }
  .admin-side .side-label { display: none; }
  .admin-side .side-foot { margin: 0; border: none; padding: 0; }
  .admin-main { padding: 1.2rem 1rem 2.5rem; }
  .admin-content { max-width: 100%; }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .masthead-row { padding: 0.7rem 0.85rem; }
  .led-strip { display: none; }
  .card { padding: 1rem; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   PAGINAÇÃO (Estilo GitForge / Primer)
   ============================================================ */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 8px 2px;
  flex-wrap: wrap;
}
.pagination-info {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--mono);
}
.pagination {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  font-size: 0.82rem;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.15s var(--ease);
}
.page-link:hover {
  color: var(--text);
  background: var(--hover);
  border-color: var(--border-soft);
  text-decoration: none;
}
.page-link.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
  box-shadow: 0 0 10px rgba(61, 109, 224, 0.3);
}
.page-link.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
}

/* ============================================================
   DASHBOARD CHARTS (Grid de 3 Colunas)
   ============================================================ */
.dashboard-charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 20px;
}
@media (max-width: 1080px) {
  .dashboard-charts-grid {
    grid-template-columns: 1fr;
  }
}
.chart-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.chart-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.7;
}
.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.chart-header h3 {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-header h3 svg {
  color: var(--accent);
}
.chart-header .chart-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--accent-soft);
}
.chart-body {
  flex: 1;
  position: relative;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chart-body svg {
  width: 100%;
  height: 180px;
  overflow: visible;
}
.chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.74rem;
  font-family: var(--mono);
  color: var(--muted);
  flex-wrap: wrap;
}
.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ============================================================
   PORTAL EXCLUSIVO DO CLIENTE (/cliente)
   ============================================================ */
.client-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--bar-h, 58px);
  box-sizing: border-box;
}
.client-header-row {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  min-height: var(--bar-h, 58px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}
.client-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.client-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.client-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: all 0.15s var(--ease);
}
.client-nav a:hover {
  color: var(--text);
  background: var(--hover);
  text-decoration: none;
}
.client-nav a.active {
  color: #fff;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-weight: 600;
}
.client-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: var(--radius);
}
.client-banner {
  background: linear-gradient(135deg, rgba(77, 130, 243, 0.1), rgba(20, 20, 21, 0.95));
  border: 1px solid rgba(77, 130, 243, 0.25);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.client-banner h2 {
  font-size: 1.35rem;
  margin: 0 0 6px 0;
  color: #fff;
}
.client-banner p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

/* ============================================================
   TELA DE LOGIN SEM SCROLL (Zero Scroll Vertical)
   ============================================================ */
body.page-login {
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.page-login .masthead {
  flex-shrink: 0;
}

body.page-login main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  overflow: hidden;
}

body.page-login main > .container {
  width: 100%;
  max-width: 820px;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: auto;
}

body.page-login .flashes {
  width: 100%;
  max-width: 780px;
  margin-bottom: 0.75rem;
}

body.page-login .site-footer {
  flex-shrink: 0;
  margin-top: 0;
  border-top: 1px solid var(--border);
  min-height: var(--bar-h, 58px);
}

body.page-login .site-footer .container {
  padding: 0 16px !important;
  min-height: var(--bar-h, 58px);
}

/* Card unificado de login em 2 colunas */
.login-hub {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 32px;
  width: 100%;
  max-width: 800px;
  background: transparent;
  border: none !important;
  border-radius: 0;
  padding: 10px 0;
  box-shadow: none !important;
  align-items: stretch;
}

.login-hub-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding-right: 18px;
  border-right: 1px solid var(--border-soft);
}

.login-hub-header {
  margin-bottom: 10px;
}

.login-hub-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(77, 130, 243, 0.12);
  border: 1px solid rgba(77, 130, 243, 0.25);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  line-height: 1;
}

.login-hub-badge svg,
.login-hub-badge .icon {
  width: 13px !important;
  height: 13px !important;
  min-width: 13px !important;
  min-height: 13px !important;
  display: block !important;
  color: currentColor !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: 0 !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

.login-hub-title {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 3px 0;
  line-height: 1.2;
}

.login-hub-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
  margin: 0 0 10px 0;
}

.login-guide-boxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.login-guide-box {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.login-guide-box:hover {
  border-color: rgba(240, 246, 252, 0.2);
  background: var(--hover);
}

.login-guide-box .guide-icon {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.login-guide-box .guide-icon svg {
  width: 14px !important;
  height: 14px !important;
  display: block !important;
  color: currentColor !important;
  margin: 0 !important;
  vertical-align: 0 !important;
}

.login-guide-box.client .guide-icon {
  background: rgba(0, 192, 139, 0.12);
  color: #00c08b;
  border: 1px solid rgba(0, 192, 139, 0.3);
}

.login-guide-box.staff .guide-icon {
  background: rgba(77, 130, 243, 0.12);
  color: var(--accent);
  border: 1px solid rgba(77, 130, 243, 0.3);
}

.login-guide-box .guide-content,
.login-guide-box .guide-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  text-align: left;
}

.login-guide-box .guide-title {
  display: block !important;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.login-guide-box .guide-desc {
  font-size: 0.72rem;
  color: var(--text-dim, #8b8b93);
  line-height: 1.4;
  margin: 0;
}

.login-guide-box strong {
  display: inline !important;
  font-weight: 600;
  color: var(--text);
}

.login-hub-security {
  margin-top: 10px;
  font-size: 0.67rem;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
}

.login-hub-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-hub-form .form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.login-hub-form .form-head h2 {
  font-size: 1.02rem;
  margin: 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.login-hub-form .field {
  margin-bottom: 10px;
}

.login-hub-form .field label {
  font-size: 0.77rem;
  margin-bottom: 4px;
  font-weight: 500;
}

.login-hub-form .btn-submit {
  width: 100%;
  height: 38px;
  margin-top: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Em telas pequenas onde a altura pode ser menor que 520px, permite rolagem suave */
@media (max-height: 520px), (max-width: 680px) {
  body.page-login {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }
  body.page-login main {
    padding: 1rem 0;
    overflow-y: visible;
  }
  .login-hub {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  .login-hub-info {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 14px;
  }
}


