/* ═══════════════════════════════════════════════════════════════════════════
   M7 Service Desk — componentes no Design System M7 (Dashboard M7)
   Regras portadas de web/src/styles.css da origem (classe de origem citada em
   cada bloco). Cores, fontes, raios, sombras e camadas vêm SÓ de m7-tokens.css.
   As classes do Service Desk foram mantidas: só o visual mudou.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ───────────────────────── Base (origem: GROUP 2) ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { max-width: 100%; overflow-x: clip; overscroll-behavior-x: none; }
html { background: var(--fundo-app); }
body {
  font-family: var(--font-body);
  font-size: .875rem;
  background: var(--fundo-app);
  color: var(--texto-valor);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, .card-title, .modal-title, .stat-value, .settings-section-title { font-family: var(--font-display); }
img { image-rendering: auto; }
::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); }
.num { font-variant-numeric: tabular-nums; }
.material-symbols-outlined { font-size: 1.2rem; line-height: 1; vertical-align: middle; user-select: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* foco visível global (WCAG 2.4.7) — origem: a:focus-visible, button:focus-visible… */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
[role="button"]:focus-visible, [tabindex]:focus-visible, .nav-item:focus-visible, .tema-circle:focus-visible {
  outline: 2.5px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.sidebar :focus-visible, .m7-header :focus-visible, .hero :focus-visible, .boot :focus-visible { outline-color: var(--destaque); }

/* skip link (WCAG 2.4.1) — origem: .skip-link */
.skip-link {
  position: fixed; left: 14px; top: -60px; z-index: var(--z-skip);
  background: var(--accent); color: var(--accent-text);
  padding: .65rem 1.2rem; border-radius: var(--r-pill);
  font-family: var(--font-display); font-weight: 700; font-size: .85rem;
  text-decoration: none; box-shadow: var(--shadow-3);
  transition: top var(--dur-2) var(--ease);
}
.skip-link:focus-visible { top: 14px; }
.main:focus, .page:focus { outline: none; }

/* movimento reduzido (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* scrollbars discretas — origem */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--texto-label) 45%, transparent) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--texto-label) 38%, transparent);
  border-radius: var(--r-pill); border: 2px solid transparent; background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--accent) 65%, transparent); background-clip: padding-box; }
.sidebar { scrollbar-color: var(--dark-field-brd) transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--dark-field-brd); background-clip: padding-box; }

@keyframes rot { to { transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ov-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes kpi-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes boot-flutua { from { transform: translate(0, 0) scale(1); } to { transform: translate(30px, 22px) scale(1.12); } }
@keyframes skel-brilho { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.girando { animation: rot .9s linear infinite; }

/* ───────────────────────── Layout raiz (origem: .app / .main / .block-container) ───────────────────────── */
#root {
  display: flex;
  min-height: 100vh;
  background:
    radial-gradient(1200px 620px at 82% -8%, color-mix(in srgb, var(--accent) 10%, transparent) 0%, transparent 60%),
    radial-gradient(1000px 560px at -6% 4%, color-mix(in srgb, var(--primaria) 12%, transparent) 0%, transparent 55%),
    var(--fundo-app);
  color: var(--texto-valor);
}
.main { flex: 1; min-width: 0; padding: 1rem 1rem 1.4rem; display: flex; flex-direction: column; }
.page {
  flex: 1;
  background: var(--fundo-card);
  border: 1px solid var(--borda);
  border-radius: var(--r-xl);
  padding: 1.5rem 1.7rem 1.8rem;
  box-shadow: var(--shadow-2);
  color: var(--texto-valor);
  min-width: 0;
  overflow-x: clip;
}
.page-enter { animation: page-in var(--dur-2) var(--ease) backwards; }

/* ───────────────────────── Sidebar (origem: .sidebar / .nav / .nav-item) ───────────────────────── */
.sidebar {
  width: 292px; min-width: 292px;
  background: var(--sidebar-grad);
  color: var(--on-dark);
  padding: 0 1rem 2rem;
  overflow-y: auto;
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid var(--dark-edge);
  box-shadow: var(--sidebar-shadow);
  display: flex; flex-direction: column;
}
.sidebar hr { border: none; border-top: 1px solid var(--dark-line); margin: .85rem 0; }
.sidebar-scrim { display: none; }
.sidebar-fechar { display: none; }
.m7-logo-img { display: block; margin: 1.1rem auto .4rem; width: 86%; max-width: 210px; height: auto; }
.m7-logo-img.custom { width: 64px; height: 64px; object-fit: contain; border-radius: var(--r-md); }
.m7-tagline-logo {
  font-family: var(--font-display); font-size: .9rem; font-weight: 800;
  letter-spacing: .18em; color: var(--destaque); text-align: center; text-transform: uppercase;
  margin: 0 auto .6rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.filtros-titulo {
  display: flex; align-items: center; gap: .45rem;
  font-family: var(--font-display); color: var(--destaque);
  font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  margin: 1rem 0 .5rem;
}
.filtros-titulo .material-symbols-outlined { font-size: 1.05rem; }
.nav { display: flex; flex-direction: column; gap: .2rem; margin: .45rem 0; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: .65rem; width: 100%;
  padding: .6rem .8rem; margin: 0;
  border-radius: var(--r-sm);
  background: none; font: inherit; text-align: left;
  color: var(--on-dark-soft);
  cursor: pointer; font-size: .92rem; font-weight: 500;
  border: 1px solid transparent;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
  user-select: none;
}
.nav-item .material-symbols-outlined { font-size: 1.25rem; color: var(--destaque); transition: color var(--dur-1) var(--ease); }
.nav-item:hover { background: var(--dark-hover); color: var(--on-dark); }
.nav-item:active { transform: translateY(1px); }
.nav-item.active {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--on-dark); font-weight: 600;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -1rem; top: 50%; transform: translateY(-50%);
  width: 4px; height: 62%; border-radius: 0 var(--r-pill) var(--r-pill) 0; background: var(--accent);
}
.nav-item.active .material-symbols-outlined { color: var(--accent); }
/* contador ao lado do item (origem: .filtro-badge) */
.badge {
  margin-left: auto;
  background: var(--accent); color: var(--accent-text);
  border-radius: var(--r-pill); padding: .02rem .42rem; min-width: 1.35rem; text-align: center;
  font-size: .66rem; font-weight: 800; line-height: 1.4;
}
.badge.warn { background: var(--destaque); color: var(--on-destaque); }
.badge.danger { background: var(--vermelho); color: var(--on-dark); }
/* aviso de escopo no topo do menu (campo em superfície escura da origem) */
.sidebar-escopo {
  margin: .2rem 0 .5rem; padding: .55rem .7rem;
  background: var(--dark-field); border: 1px solid var(--dark-field-brd); border-radius: var(--r-sm);
  font-size: .78rem; line-height: 1.5; color: var(--on-dark-soft);
}
.sidebar-escopo strong { color: var(--destaque); font-weight: 700; }

/* ───────────────────────── Header (origem: .m7-header) ───────────────────────── */
.m7-header {
  position: sticky; top: .55rem; z-index: var(--z-header);
  background: var(--header-grad);
  color: var(--on-dark); padding: .85rem 1.35rem; border-radius: var(--r-lg); margin-bottom: 1.3rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  box-shadow: var(--shadow-2); border: 1px solid var(--hd-edge);
}
.m7-overview-tag {
  font-family: var(--font-display); font-size: 1.12rem; font-weight: 300;
  letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark);
  margin: 0 auto 0 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.m7-overview-tag b { font-weight: 700; color: var(--ov-accent); margin-left: .4rem; }
.m7-controls { display: flex; align-items: center; gap: .8rem; }
.m7-menu-btn {
  flex: 0 0 auto; display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--r-sm); padding: 0;
  background: var(--hd-ctl-bg); border: 1px solid var(--hd-ctl-brd-strong);
  color: var(--on-dark); cursor: pointer;
  transition: all var(--dur-1) var(--ease);
}
.m7-menu-btn:hover { background: var(--destaque); color: var(--on-destaque); border-color: var(--destaque); }
.m7-menu-btn .material-symbols-outlined { font-size: 1.3rem; }
/* busca no header: campo de superfície escura (origem: .sidebar input) */
.search-wrap { position: relative; }
.search-icon {
  position: absolute; left: .6rem; top: 50%; transform: translateY(-50%);
  color: var(--on-dark-muted); pointer-events: none; font-size: 1.15rem;
}
.search-bar {
  width: 240px;
  background: var(--dark-field); color: var(--on-dark);
  border: 1px solid var(--dark-field-brd); border-radius: var(--r-sm);
  padding: .5rem .7rem .5rem 2.1rem; font-size: .85rem; font-family: inherit;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.search-bar::placeholder { color: var(--on-dark-muted); }
.search-bar:hover { border-color: var(--dark-field-brd-hover); }
.search-bar:focus { outline: none; border-color: var(--destaque); background: var(--dark-field-focus); }
/* botão de ícone do header (origem: .notif-btn) */
.notif-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  background: var(--hd-ctl-bg); border: 1px solid var(--hd-ctl-brd);
  color: var(--on-dark); border-radius: var(--r-sm); width: 36px; height: 36px; cursor: pointer; padding: 0;
  transition: background var(--dur-1) var(--ease);
}
.notif-btn:hover { background: var(--hd-ctl-bg-hover); }
.notif-btn .material-symbols-outlined { font-size: 1.32rem; }
/* usuário logado (origem: .m7-user) */
.m7-user {
  display: flex; align-items: center; gap: .5rem;
  background: var(--hd-ctl-bg); border: 1px solid var(--hd-ctl-brd);
  padding: .34rem .7rem; border-radius: var(--r-pill); font-size: .8rem; max-width: 260px; color: var(--on-dark);
}
.m7-user .material-symbols-outlined { font-size: 1.2rem; }
.m7-user-nome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m7-user.clicavel { cursor: pointer; transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease); }
.m7-user.clicavel:hover { background: var(--hd-ctl-bg-hover); border-color: var(--dark-field-brd-hover); }
.m7-user .avatar { width: 1.55rem; height: 1.55rem; font-size: .62rem; border-width: 1px; }
.m7-sair {
  cursor: pointer; display: flex; align-items: center; opacity: .85; border-radius: var(--r-xs);
  background: none; border: none; color: inherit; padding: 0; transition: opacity var(--dur-1) var(--ease);
}
.m7-sair:hover { opacity: 1; color: var(--ov-accent); }
/* troca de tema (origem: .tema-circles) */
.tema-circles { display: flex; align-items: center; gap: .55rem; }
.tema-circle {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--tema-ring);
  box-shadow: var(--tema-ring-shadow);
  background-clip: padding-box; cursor: pointer; overflow: hidden; padding: 0;
  transition: transform var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.tema-circle:hover { transform: scale(1.14); border-color: var(--on-dark); }
.tema-circle.ativo { border-color: var(--on-dark); box-shadow: var(--tema-ring-active); }
.tema-circle.claro_azul { background-image: var(--tema-claro-swatch); }
.tema-circle.escuro_laranja { background-image: var(--tema-escuro-swatch); }

/* ───────────────────────── Botões (origem: .btn-primario / .holtec-btn / .btn-mini) ───────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1rem; border-radius: var(--r-sm); border: 1px solid var(--borda);
  background: var(--fundo-card-alt); color: var(--texto-valor);
  font-size: .85rem; font-weight: 600; font-family: inherit; cursor: pointer; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease), filter var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.btn .material-symbols-outlined { font-size: 1.1rem; }
.btn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 55%, var(--borda)); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; filter: none !important; }
.btn-ghost { background: var(--fundo-card-alt); color: var(--texto-valor); }
.btn-primary {
  background: var(--accent); color: var(--accent-text); border-color: var(--accent);
  font-family: var(--font-display); font-weight: 700; letter-spacing: .03em;
  box-shadow: var(--shadow-1);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); box-shadow: var(--accent-glow); border-color: var(--accent); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-danger { background: var(--vermelho); color: var(--on-dark); border-color: var(--vermelho); }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); border-color: var(--vermelho); }
.btn-success { background: var(--verde); color: var(--accent-text); border-color: var(--verde); }
.btn-success:hover:not(:disabled) { filter: brightness(1.08); border-color: var(--verde); }
.btn-soft-danger { background: color-mix(in srgb, var(--vermelho) 12%, transparent); color: var(--danger-ink); border-color: color-mix(in srgb, var(--vermelho) 35%, transparent); }
.btn-soft-danger:hover:not(:disabled) { background: var(--vermelho); color: var(--on-dark); border-color: var(--vermelho); }
.btn-sm { padding: .34rem .7rem; font-size: .78rem; }
.btn.is-loading { pointer-events: none; opacity: .75; }
.btn.is-loading::before {
  content: ''; width: .9em; height: .9em; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: rot .9s linear infinite;
}
.icon-btn {
  width: 32px; height: 32px; border-radius: var(--r-xs); border: 1px solid transparent; background: transparent;
  color: var(--texto-label); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--dur-1) var(--ease);
}
.icon-btn:hover { color: var(--danger-ink); background: color-mix(in srgb, var(--vermelho) 12%, transparent); }
.link-btn {
  background: none; border: none; padding: 0; font: inherit; cursor: pointer;
  color: var(--accent-ink); font-weight: 600; text-decoration: none;
}
.link-btn:hover { text-decoration: underline; }

/* ───────────────────────── Formulários (origem: .modal-form .campo / .block-container select) ───────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .32rem; min-width: 0; }
.form-label { font-size: .78rem; color: var(--texto-label); font-weight: 600; }
.form-input, .form-textarea {
  background: var(--fundo-card-alt); color: var(--texto-valor);
  border: 1px solid var(--borda); border-radius: var(--r-sm);
  padding: .6rem .72rem; font-size: .9rem; font-family: inherit; width: 100%;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.form-input::placeholder, .form-textarea::placeholder { color: color-mix(in srgb, var(--texto-label) 80%, transparent); }
.form-input:hover, .form-textarea:hover { border-color: color-mix(in srgb, var(--destaque) 45%, var(--borda)); }
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--destaque);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.form-input:disabled, .form-select:disabled, .form-textarea:disabled { opacity: .6; cursor: not-allowed; }
.form-input[aria-invalid="true"] { border-color: var(--vermelho); }
.form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  width: 100%;
  background-color: var(--fundo-card-alt);
  color: var(--texto-valor);
  border: 1.5px solid color-mix(in srgb, var(--primaria) 55%, var(--borda));
  border-radius: var(--r-sm);
  padding: .55rem 2.2rem .55rem .95rem;
  font-family: var(--font-body); font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: all var(--dur-1) var(--ease);
  background-image: var(--select-arrow);
  background-repeat: no-repeat; background-position: right .8rem center;
}
.form-select:hover { border-color: var(--destaque); }
.form-select option { background: var(--fundo-card); color: var(--texto-valor); font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primaria); }
input[type="color"] { cursor: pointer; border-radius: var(--r-xs); }
.form-hint { font-size: .74rem; color: var(--texto-label); }
.form-erro { font-size: .78rem; color: var(--danger-ink); }
/* campo de senha com "olho" (origem: .senha-field / .senha-olho) */
.senha-field { position: relative; display: block; }
.senha-field input { width: 100%; padding-right: 2.6rem; letter-spacing: .02em; }
.senha-olho {
  position: absolute; top: 50%; right: .45rem; transform: translateY(-50%);
  background: transparent; border: none; cursor: pointer; padding: .25rem; color: var(--texto-label);
  display: inline-flex; border-radius: var(--r-xs); transition: color var(--dur-1) var(--ease);
}
.senha-olho:hover { color: var(--destaque); }
.senha-olho .material-symbols-outlined { font-size: 1.2rem; }
.senha-regras { list-style: none; display: flex; flex-direction: column; gap: .45rem; padding-top: .2rem; }
.senha-regras li { display: flex; align-items: center; gap: .45rem; font-size: .82rem; color: var(--texto-label); transition: color var(--dur-2) var(--ease); }
.senha-regras li .material-symbols-outlined { font-size: 1.05rem; color: var(--texto-label); }
.senha-regras li.ok, .senha-regras li.ok .material-symbols-outlined { color: var(--success-ink); }

/* interruptor (a origem não tem switch: usa o padrão "ligado = primária preenchida" do .chip-toggle) */
.toggle {
  width: 40px; height: 22px;
  background: var(--borda);
  border-radius: var(--r-pill);
  cursor: pointer; position: relative; flex-shrink: 0; border: none;
  transition: background var(--dur-1) var(--ease);
}
.toggle.on { background: var(--primaria); }
.toggle::after {
  content: ''; position: absolute; width: 16px; height: 16px; top: 3px; left: 3px;
  background: var(--fundo-card); border-radius: 50%; box-shadow: var(--shadow-1);
  transition: transform var(--dur-1) var(--ease);
}
.toggle.on::after { transform: translateX(18px); }
.toggle:disabled { opacity: .45; cursor: not-allowed; }

/* ───────────────────────── KPIs (origem: .kpi-grid / .kpi-card) ───────────────────────── */
.stats-row, .reports-kpis {
  display: grid; gap: .8rem; margin-bottom: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--kpi-min, 172px)), 1fr));
}
.stats-row > *, .reports-kpis > * { animation: kpi-in .38s var(--ease) backwards; }
.stats-row > *:nth-child(2), .reports-kpis > *:nth-child(2) { animation-delay: .05s; }
.stats-row > *:nth-child(3), .reports-kpis > *:nth-child(3) { animation-delay: .10s; }
.stats-row > *:nth-child(4), .reports-kpis > *:nth-child(4) { animation-delay: .15s; }
.stats-row > *:nth-child(n+5), .reports-kpis > *:nth-child(n+5) { animation-delay: .20s; }
.stat-card {
  position: relative; overflow: hidden;
  background: linear-gradient(158deg, var(--fundo-card-alt) 0%, var(--fundo-card) 60%);
  border: 1px solid var(--borda); border-radius: var(--r-md);
  padding: 1rem 1.1rem 1.05rem 1.2rem;
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
  box-shadow: var(--shadow-1); min-width: 0;
}
.stat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(var(--card-accent, var(--primaria)), color-mix(in srgb, var(--card-accent, var(--primaria)) 55%, transparent));
  transition: background var(--dur-1) var(--ease);
}
.stat-card::after {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 40%;
  background: linear-gradient(var(--sheen), transparent); opacity: .5; pointer-events: none;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); border-color: color-mix(in srgb, var(--accent) 40%, var(--borda)); }
.stat-label {
  font-family: var(--font-display);
  font-size: clamp(.6rem, .6vw + .4rem, .72rem);
  color: var(--texto-label); text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: .35rem; font-weight: 700; line-height: 1.15;
  min-height: 1.6em; display: flex; align-items: center; gap: .35rem;
}
.stat-value {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: clamp(1rem, .5vw + .78rem, 1.32rem); font-weight: 800; letter-spacing: -.01em;
  color: var(--texto-valor); line-height: 1.12; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-sub { font-size: .74rem; color: var(--texto-label); margin-top: .25rem; }
.stat-icon { display: none; }

/* ───────────────────────── Cartões e títulos (origem: .m7-card / .chart-title) ───────────────────────── */
.card, .info-block, .settings-section, .queue-col {
  position: relative;
  background: linear-gradient(158deg, var(--fundo-card-alt) 0%, var(--fundo-card) 62%);
  border: 1px solid var(--borda);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.card-header {
  padding: .85rem 1.15rem; border-bottom: 1px solid var(--borda);
  display: flex; align-items: center; gap: .6rem;
}
.card-title, .settings-section-title {
  font-family: var(--font-display); color: var(--texto-valor); font-size: .98rem; font-weight: 700;
  display: flex; align-items: center; gap: .4rem; flex: 1; min-width: 0;
}
.card-title::before, .settings-section-title::before {
  content: ''; width: 4px; height: 1.05em; border-radius: var(--r-pill); background: var(--destaque); flex-shrink: 0;
}
.info-block { padding: 1rem 1.15rem; overflow: visible; }
.info-block-title {
  font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--texto-label); margin-bottom: .6rem;
}
.info-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--borda); font-size: .85rem; }
.info-row:last-child { border-bottom: none; }
.info-row-label { color: var(--texto-label); }
.info-row-value { font-weight: 600; text-align: right; min-width: 0; }

/* hero do dashboard: faixa no gradiente do header da origem */
.hero {
  position: relative; overflow: hidden;
  background: var(--header-grad);
  color: var(--on-dark);
  border-radius: var(--r-lg); border: 1px solid var(--hd-edge);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap;
  box-shadow: var(--shadow-2);
}
.hero::after {
  content: ''; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--destaque) 28%, transparent), transparent 65%);
  pointer-events: none;
}
.hero-eyebrow {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ov-accent); margin-bottom: .4rem;
}
.hero-eyebrow::before { content: ''; width: 22px; height: 2px; border-radius: var(--r-pill); background: var(--ov-accent); }
.hero-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.hero-title em { font-style: normal; color: var(--ov-accent); }
.hero-sub { margin-top: .35rem; font-size: .9rem; color: var(--on-dark-soft); }
.hero-sub strong { color: var(--ov-accent); }
.hero-text { flex: 1 1 320px; position: relative; z-index: 1; }
.hero-mark { position: relative; z-index: 1; width: 132px; height: auto; flex-shrink: 0; filter: var(--boot-logo-shadow); }
.hero-divider { position: relative; z-index: 1; width: 1px; align-self: stretch; background: var(--dark-line); }

/* ───────────────────────── Tabelas (origem: .m7-table) ───────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
thead th {
  background: color-mix(in srgb, var(--fundo-card-alt) 88%, transparent);
  color: var(--texto-label); text-align: left; padding: .6rem .75rem; font-weight: 700;
  font-family: var(--font-display); font-size: .74rem; letter-spacing: .04em; text-transform: uppercase;
  border-bottom: 1px solid var(--borda); white-space: nowrap;
}
tbody td { padding: .6rem .75rem; border-bottom: 1px solid var(--borda); color: var(--texto-valor); vertical-align: middle; }
tbody tr { cursor: pointer; transition: background var(--dur-1) var(--ease); }
tbody tr:hover td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
tbody tr:last-child td { border-bottom: none; }
.table-wrap { overflow: auto; border: 1px solid var(--borda); border-radius: var(--r-md); }

/* ───────────────────────── Etiquetas, chips, prioridade (origem: .badge-eq / .badge-fora-ranking) ───────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap;
  border-radius: var(--r-pill); padding: .14rem .6rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  background: color-mix(in srgb, var(--texto-label) 14%, transparent); color: var(--texto-label);
}
.tag-open { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-ink); }
.tag-pending { background: color-mix(in srgb, var(--st-info) 16%, transparent); color: var(--st-info); }
.tag-awaiting_approval { background: color-mix(in srgb, var(--destaque) 22%, transparent); color: var(--gold-ink); }
.tag-resolved, .tag-approved { background: color-mix(in srgb, var(--st-ok) 16%, transparent); color: var(--st-ok); }
.tag-closed { background: color-mix(in srgb, var(--texto-label) 14%, transparent); color: var(--texto-label); }
.tag-cancelled, .tag-rejected, .tag-urgent { background: color-mix(in srgb, var(--st-ruim) 16%, transparent); color: var(--st-ruim); }
.tag-role { background: color-mix(in srgb, var(--role-cor, var(--texto-label)) 16%, transparent); color: var(--role-cor, var(--texto-label)); }
.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  border-radius: var(--r-pill); padding: .12rem .6rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .02em;
  background: color-mix(in srgb, var(--texto-label) 14%, transparent); color: var(--texto-label);
  border: 1px solid color-mix(in srgb, var(--texto-label) 30%, transparent);
}
.prio { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.prio-low { background: var(--st-ok); }
.prio-medium { background: var(--st-alerta); }
.prio-high { background: var(--st-aviso); }
.prio-critical { background: var(--st-ruim); box-shadow: 0 0 8px var(--st-ruim); }
.tone-accent  { background: color-mix(in srgb, var(--accent) 14%, transparent);  color: var(--accent-ink); }
.tone-info    { background: color-mix(in srgb, var(--st-info) 16%, transparent); color: var(--st-info); }
.tone-gold    { background: color-mix(in srgb, var(--destaque) 16%, transparent); color: var(--gold-ink); }
.tone-success { background: color-mix(in srgb, var(--st-ok) 16%, transparent);   color: var(--st-ok); }
.tone-muted   { background: color-mix(in srgb, var(--texto-label) 16%, transparent); color: var(--texto-valor); }
.tone-bg-accent { background: var(--accent); } .tone-bg-info { background: var(--st-info); } .tone-bg-gold { background: var(--destaque); }
.tone-bg-success { background: var(--verde); } .tone-bg-muted { background: var(--texto-label); }

/* ───────────────────────── Estados vazio / carregando (origem: .dt-vazio / .skel) ───────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  padding: 2.2rem .8rem; color: var(--texto-label); font-size: .86rem; text-align: center;
}
.empty-state-icon { font-size: 2.1rem; opacity: .55; line-height: 1; }
.empty-state-icon .material-symbols-outlined { font-size: 2.1rem; }
.empty-state-text { font-size: .95rem; color: var(--texto-valor); font-weight: 600; }
.empty-state-sub { font-size: .82rem; }
.skel-linha, .skel-bloco {
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--fundo-card-alt) 25%, color-mix(in srgb, var(--primaria) 12%, var(--fundo-card-alt)) 50%, var(--fundo-card-alt) 75%);
  background-size: 200% 100%;
  animation: skel-brilho 1.4s ease-in-out infinite;
}
.skel-linha { height: 14px; margin: .55rem 0; }
.skel-bloco { min-height: 92px; }
.spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--accent) 22%, transparent); border-top-color: var(--accent);
  animation: rot .9s linear infinite;
}

/* ───────────────────────── Comentários e faixas (origem: .info-box / .holtec-faixa) ───────────────────────── */
.comment {
  background: color-mix(in srgb, var(--primaria) 6%, var(--fundo-card-alt));
  border: 1px solid var(--borda); border-left: 4px solid var(--primaria); border-radius: var(--r-sm);
  padding: .85rem 1.05rem; color: var(--texto-valor);
}
.comment-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; flex-wrap: wrap; }
.comment-author { font-weight: 700; font-size: .85rem; }
.comment-date { font-size: .74rem; color: var(--texto-label); }
.comment-body { font-size: .88rem; line-height: 1.6; color: var(--texto-valor); }
.approval-banner {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .85rem 1rem; border-radius: var(--r-md);
  border: 1px solid color-mix(in srgb, var(--primaria) 34%, transparent);
  background: color-mix(in srgb, var(--primaria) 10%, transparent);
  font-size: .85rem; line-height: 1.5; color: var(--texto-valor);
}
.approval-banner.needs { border-color: color-mix(in srgb, var(--destaque) 40%, transparent); background: color-mix(in srgb, var(--destaque) 10%, transparent); }
.approval-banner.approved { border-color: color-mix(in srgb, var(--verde) 40%, transparent); background: color-mix(in srgb, var(--verde) 9%, transparent); }
.approval-banner.rejected { border-color: color-mix(in srgb, var(--vermelho) 40%, transparent); background: color-mix(in srgb, var(--vermelho) 9%, transparent); }
.approval-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; line-height: 1; }
.approval-text { flex: 1; min-width: 0; }
.approval-title { font-weight: 700; font-size: .9rem; margin-bottom: .15rem; }
.approval-sub { font-size: .8rem; color: var(--texto-label); line-height: 1.5; }
.aviso {
  display: flex; align-items: center; gap: .5rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--texto-valor); border-radius: var(--r-sm); padding: .55rem .85rem; font-size: .82rem;
}
.aviso .material-symbols-outlined { color: var(--accent-ink); font-size: 1.2rem; flex: 0 0 auto; }

/* ───────────────────────── Modais (origem: .modal-ov / .modal-card / .modal-head / .modal-form / .modal-foot) ───────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: var(--scrim); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  animation: ov-in var(--dur-1) var(--ease);
}
.modal {
  background: var(--fundo-card); border: 1px solid var(--borda); border-radius: var(--r-xl);
  width: min(620px, 94vw); max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-3);
  color: var(--texto-valor);
  animation: modal-in var(--dur-2) var(--ease);
}
.modal:focus { outline: none; }
.modal.modal-wide { width: min(1400px, 96vw); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .95rem 1.2rem; border-bottom: 1px solid var(--borda); }
.modal-title { font-family: var(--font-display); font-weight: 700; color: var(--texto-valor); font-size: 1rem; flex: 1; min-width: 0; }
.modal-body { display: flex; flex-direction: column; gap: .9rem; padding: 1.2rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: .6rem; padding: .95rem 1.2rem; border-top: 1px solid var(--borda); flex-wrap: wrap; }

/* ───────────────────────── Avisos rápidos (origem: .holtec-toast) ───────────────────────── */
.toast-wrap { position: fixed; right: 1rem; bottom: 1rem; z-index: var(--z-toast); display: flex; flex-direction: column; gap: .5rem; align-items: flex-end; }
.toast {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--fundo-card); color: var(--texto-valor); border: 1px solid var(--borda);
  border-left: 3px solid var(--verde); border-radius: var(--r-sm);
  padding: .6rem .9rem; box-shadow: var(--shadow-3); font-size: .84rem; max-width: min(380px, 90vw);
  animation: toast-in var(--dur-2) var(--ease);
}
.toast .material-symbols-outlined { font-size: 1.1rem; color: var(--success-ink); flex-shrink: 0; }
.toast.error { border-left-color: var(--vermelho); }
.toast.error .material-symbols-outlined { color: var(--danger-ink); }

/* ───────────────────────── Notificações (origem: .notif-btn / .notif-badge / .notif-painel / .notif-item) ───────────────────────── */
.notif-wrap { position: relative; display: inline-flex; }
.notif-count {
  position: absolute; top: -5px; right: -5px; background: var(--vermelho); color: var(--on-dark);
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--r-pill);
  font-size: .62rem; font-weight: 800; display: flex; align-items: center; justify-content: center; line-height: 1;
  border: 1.5px solid var(--fundo-card);
}
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: var(--z-modal);
  width: 392px; max-width: 88vw; max-height: 70vh; display: flex; flex-direction: column; overflow: hidden;
  background: var(--glass-bg); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  color: var(--texto-valor); border: 1px solid var(--glass-brd); border-radius: var(--r-lg);
  box-shadow: var(--shadow-3); animation: pop-in var(--dur-1) var(--ease);
}
.notif-head {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .8rem 1rem; border-bottom: 1px solid var(--borda);
  font-weight: 700; font-size: .9rem;
  background: color-mix(in srgb, var(--fundo-card) 82%, transparent);
}
.notif-head strong { font-family: var(--font-display); }
.notif-link { background: transparent; border: none; cursor: pointer; color: var(--accent-ink); font-size: .74rem; font-weight: 700; padding: .2rem .35rem; border-radius: var(--r-xs); font-family: inherit; }
.notif-link:hover { text-decoration: underline; }
.notif-tabs { display: flex; gap: .35rem; padding: 0 .6rem; border-bottom: 1px solid var(--borda); background: color-mix(in srgb, var(--fundo-card) 82%, transparent); }
.notif-tabs button {
  flex: 1; padding: .55rem .6rem; background: none; border: none; border-bottom: 2.5px solid transparent; margin-bottom: -1px;
  color: var(--texto-label); font-family: inherit; font-weight: 600; font-size: .8rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.notif-tabs button:hover { color: var(--texto-valor); background: color-mix(in srgb, var(--primaria) 8%, transparent); }
.notif-tabs button.on { color: var(--accent-ink); border-bottom-color: var(--accent); }
.notif-tabs button span {
  background: var(--accent); color: var(--accent-text); border-radius: var(--r-pill);
  padding: .02rem .42rem; font-size: .66rem; font-weight: 800; line-height: 1.4;
}
.notif-list { overflow-y: auto; display: flex; flex-direction: column; }
.notif-empty { padding: 1.6rem .9rem; text-align: center; color: var(--texto-label); font-size: .82rem; }
.notif-item {
  width: 100%; display: flex; align-items: flex-start; gap: .65rem; text-align: left;
  padding: .7rem 1rem; border: none; border-bottom: 1px solid var(--borda);
  border-left: 3px solid transparent; background: transparent; color: var(--texto-valor);
  cursor: pointer; font-family: inherit; position: relative; transition: background var(--dur-1) var(--ease);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover, .notif-item:focus-visible { background: var(--fundo-card-alt); }
.notif-item.unread::after { content: ''; position: absolute; right: .55rem; top: .8rem; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.notif-ic { font-size: 1.28rem; margin-top: 1px; flex: 0 0 auto; color: var(--primaria); line-height: 1; }
.k-assigned { border-left-color: var(--accent); } .k-assigned .notif-ic { color: var(--accent-ink); }
.k-approval, .k-nf { border-left-color: var(--destaque); } .k-approval .notif-ic, .k-nf .notif-ic { color: var(--gold-ink); }
.k-unassigned, .k-comment, .k-summary { border-left-color: var(--primaria); } .k-unassigned .notif-ic, .k-comment .notif-ic, .k-summary .notif-ic { color: var(--primaria); }
.k-approved, .k-resolved { border-left-color: var(--verde); } .k-approved .notif-ic, .k-resolved .notif-ic { color: var(--success-ink); }
.k-rejected { border-left-color: var(--vermelho); } .k-rejected .notif-ic { color: var(--danger-ink); }
.notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-title { font-weight: 600; font-size: .83rem; line-height: 1.25; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.notif-text { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-meta { font-size: .76rem; color: var(--texto-label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-when { font-size: .7rem; color: var(--texto-label); white-space: nowrap; flex-shrink: 0; margin-right: .6rem; }
.notif-sla { font-style: normal; font-size: .66rem; font-weight: 700; padding: .05rem .45rem; border-radius: var(--r-pill); }
.notif-sla.late { background: color-mix(in srgb, var(--vermelho) 16%, transparent); color: var(--danger-ink); }
.notif-sla.risk { background: color-mix(in srgb, var(--destaque) 20%, transparent); color: var(--gold-ink); }

/* ───────────────────────── Tela de entrada (origem: .boot / .login-card / .campo) ───────────────────────── */
.boot {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.3rem; padding: 1rem;
  background: var(--boot-bg);
  overflow-y: auto; overflow-x: hidden;
}
.boot::before, .boot::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(70px); opacity: .32; z-index: 0;
  animation: boot-flutua 11s var(--ease) infinite alternate;
}
.boot::before { width: 460px; height: 460px; left: -140px; top: -120px; background: radial-gradient(circle, var(--brand-laranja) 0%, transparent 70%); }
.boot::after { width: 380px; height: 380px; right: -110px; bottom: -130px; background: radial-gradient(circle, var(--destaque) 0%, transparent 70%); animation-delay: -5s; }
.boot > * { position: relative; z-index: 1; }
.boot > img { width: 180px; filter: var(--boot-logo-shadow); }
.boot .spin {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--brand-laranja) 22%, transparent); border-top-color: var(--brand-laranja);
  animation: rot .9s linear infinite;
}
.boot .t1 { color: var(--boot-text); font-weight: 600; }
.login-card {
  background: var(--login-card-bg);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--login-card-brd); border-radius: var(--r-xl);
  padding: 1.8rem; width: min(388px, 92vw);
  display: flex; flex-direction: column; gap: .9rem; box-shadow: var(--shadow-3);
  border-top: 3px solid var(--brand-laranja);
  animation: modal-in var(--dur-2) var(--ease);
  color: var(--on-dark);
}
.login-titulo {
  font-family: var(--font-display); color: var(--on-dark); font-weight: 700; font-size: 1.05rem;
  letter-spacing: .06em; text-transform: uppercase; text-align: center; margin-bottom: .2rem;
}
.login-sub { font-size: .82rem; color: var(--login-label); text-align: center; line-height: 1.5; margin-top: -.4rem; }
.campo { display: flex; flex-direction: column; gap: .32rem; }
.campo > span:first-child { font-size: .74rem; font-weight: 600; letter-spacing: .04em; color: var(--login-label); text-transform: uppercase; }
.login-card .campo input {
  width: 100%;
  background: var(--login-field-bg); color: var(--on-dark); border: 1px solid var(--login-field-brd); border-radius: var(--r-sm);
  padding: .68rem .8rem; font-size: .9rem; font-family: inherit; transition: border-color var(--dur-1) var(--ease);
}
.login-card .campo input:focus { outline: none; border-color: var(--brand-laranja); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-laranja) 22%, transparent); }
.login-card .senha-olho { color: var(--login-label); }
.login-card .senha-olho:hover { color: var(--destaque); }
.login-erro { background: color-mix(in srgb, var(--vermelho) 18%, transparent); border: 1px solid var(--vermelho); color: var(--login-erro-text); border-radius: var(--r-sm); padding: .6rem .8rem; font-size: .82rem; }
.login-aviso { background: color-mix(in srgb, var(--verde) 18%, transparent); border: 1px solid var(--verde); color: var(--login-aviso-text); border-radius: var(--r-sm); padding: .6rem .8rem; font-size: .82rem; }
.btn-primario {
  background: var(--brand-laranja); color: var(--accent-text);
  border: none; border-radius: var(--r-sm); cursor: pointer;
  padding: .68rem 1.25rem; font-weight: 700; font-size: .9rem;
  font-family: var(--font-display); letter-spacing: .03em;
  transition: filter var(--dur-1) var(--ease), transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
  box-shadow: var(--shadow-1);
}
.btn-primario:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-laranja) 45%, transparent), 0 6px 20px color-mix(in srgb, var(--brand-laranja) 28%, transparent); }
.btn-primario:active { transform: translateY(0); }
.btn-primario:disabled { opacity: .55; cursor: default; filter: none; transform: none; box-shadow: none; }
.login-rodape { text-align: center; color: var(--login-label); font-size: .72rem; margin-top: .3rem; }
.login-troca {
  color: var(--brand-laranja); font-size: .82rem; text-align: center; cursor: pointer; user-select: none;
  padding: .3rem; border-radius: var(--r-xs); background: none; border: none; font-family: inherit;
}
.login-troca:hover { text-decoration: underline; }
/* a tela de entrada é sempre escura: regras de senha em tons do cartão de login */
.login-card .senha-regras li, .login-card .senha-regras li .material-symbols-outlined { color: var(--login-label); }
.login-card .senha-regras li.ok, .login-card .senha-regras li.ok .material-symbols-outlined { color: var(--login-aviso-text); }

/* ───────────────────────── Configurações (origem: .tab, na vertical) ───────────────────────── */
.settings-grid { display: grid; grid-template-columns: 220px 1fr; gap: 1.4rem; }
.settings-nav { display: flex; flex-direction: column; gap: .2rem; }
.settings-nav-item {
  padding: .55rem .95rem; cursor: pointer; color: var(--texto-label);
  font-weight: 600; font-size: .88rem; border-left: 2.5px solid transparent;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.settings-nav-item:hover { color: var(--texto-valor); background: color-mix(in srgb, var(--primaria) 8%, transparent); }
.settings-nav-item.active { color: var(--accent-ink); border-left-color: var(--accent); background: color-mix(in srgb, var(--primaria) 8%, transparent); }
.settings-panel { display: flex; flex-direction: column; gap: 1.1rem; }
.settings-section-title { padding: .85rem 1.15rem; border-bottom: 1px solid var(--borda); }
.settings-row { padding: .95rem 1.15rem; border-bottom: 1px solid var(--borda); display: flex; align-items: center; gap: 1rem; }
.settings-row:last-child { border-bottom: none; }
.settings-row-info { flex: 1; min-width: 0; }
.settings-row-label { font-weight: 600; font-size: .88rem; margin-bottom: .15rem; }
.settings-row-desc { font-size: .78rem; color: var(--texto-label); line-height: 1.5; }
.logo-upload-area {
  border: 1.5px dashed var(--borda); border-radius: var(--r-md);
  padding: 1.4rem; text-align: center; cursor: pointer; position: relative;
  transition: all var(--dur-1) var(--ease);
}
.logo-upload-area:hover { border-color: var(--destaque); background: color-mix(in srgb, var(--destaque) 8%, transparent); }
.logo-upload-area input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.logo-preview { display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem; background: var(--fundo-card-alt); border: 1px solid var(--borda); border-radius: var(--r-sm); }
.logo-preview img { width: 48px; height: 48px; object-fit: contain; border-radius: var(--r-xs); }

/* ───────────────────────── Filas (quadro) ───────────────────────── */
.queue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: .9rem; }
.queue-col-header { padding: .8rem 1rem; border-bottom: 1px solid var(--borda); font-weight: 700; font-size: .85rem; font-family: var(--font-display); display: flex; align-items: center; gap: .5rem; }
.queue-col-body { padding: .6rem; display: flex; flex-direction: column; gap: .5rem; min-height: 320px; }
.queue-card {
  position: relative;
  background: var(--fundo-card); border: 1px solid var(--borda); border-radius: var(--r-sm);
  padding: .75rem .8rem; cursor: pointer; box-shadow: var(--shadow-1);
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.queue-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); border-color: color-mix(in srgb, var(--accent) 40%, var(--borda)); }
.queue-card-id { font-size: .68rem; color: var(--texto-label); margin-bottom: .35rem; font-family: var(--font-mono); }
.queue-card-title { font-size: .85rem; font-weight: 600; margin-bottom: .5rem; line-height: 1.4; }
.queue-card-meta { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }

/* ───────────────────────── Chamado (detalhe) ───────────────────────── */
.ticket-detail { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 1.2rem; }
.ticket-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.ticket-sidebar-panel { display: flex; flex-direction: column; gap: .9rem; }
.anexo-link {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem;
  background: var(--fundo-card-alt); border: 1px solid var(--borda); border-radius: var(--r-sm);
  color: var(--texto-valor); text-decoration: none; font-size: .82rem; cursor: pointer; text-align: left;
  font-family: inherit; transition: border-color var(--dur-1) var(--ease);
}
.anexo-link:hover { border-color: var(--destaque); }

/* ───────────────────────── Avatar (origem: .rep-avatar, com iniciais) ───────────────────────── */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--avatar-cor, var(--primaria)), color-mix(in srgb, var(--avatar-cor, var(--primaria)) 60%, transparent));
  border: 2px solid var(--borda);
  font-weight: 700; font-size: .78rem; color: var(--on-dark); overflow: hidden;
}

/* ───────────────────────── Lançamento de itens / RDV ───────────────────────── */
.item-type { display: inline-flex; align-items: center; gap: .35rem; height: 26px; padding: 0 .6rem; border-radius: var(--r-pill); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.item-type button { background: none; border: none; color: inherit; cursor: pointer; font-size: .7rem; padding: 0 0 0 2px; opacity: .75; }
.items-config { padding: .75rem; background: var(--fundo-card-alt); border: 1px solid var(--borda); border-radius: var(--r-sm); display: flex; flex-direction: column; gap: .6rem; }
.items-config-row { display: flex; align-items: center; gap: .5rem; font-size: .8rem; cursor: pointer; }
.items-config-row input { width: 16px; height: 16px; }
.items-config-label { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-label); margin-top: .25rem; }
.wizard-steps, .nf-steps { display: flex; align-items: center; gap: .5rem; list-style: none; flex-wrap: wrap; }
.wizard-steps li, .nf-steps li { display: flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600; color: var(--texto-label); }
.wizard-steps li .dot, .nf-steps li .dot { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 800; border: 2px solid var(--borda); }
.wizard-steps li.done .dot, .nf-steps li.done .dot { background: var(--verde); border-color: var(--verde); color: var(--on-dark); }
.wizard-steps li.now, .nf-steps li.now, .nf-steps li.done { color: var(--texto-valor); }
.wizard-steps li.now .dot, .nf-steps li.now .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.nf-steps li.bad { color: var(--danger-ink); }
.nf-steps li.bad .dot { background: var(--vermelho); border-color: var(--vermelho); color: var(--on-dark); }
.wizard-steps .sep, .nf-steps li + li::before { content: ''; width: 22px; height: 2px; border-radius: var(--r-pill); background: var(--borda); }
.items-step { display: flex; gap: 1.2rem; align-items: flex-start; }
.items-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: .9rem; }
.items-side { flex: 0 0 250px; display: flex; flex-direction: column; gap: .75rem; }
.items-table { border: 1px solid var(--borda); border-radius: var(--r-md); background: var(--fundo-card); overflow: hidden; }
.items-table.flat { border: none; border-radius: 0; background: transparent; }
.items-row { display: grid; grid-template-columns: 128px minmax(0,1fr) 40px 92px 104px 176px 32px; gap: .6rem; align-items: center; padding: .7rem .9rem; border-top: 1px solid var(--borda); font-size: .85rem; }
.items-row.ro { grid-template-columns: 140px minmax(0,1fr) 46px 100px 108px 200px; padding: .7rem 1.1rem; }
.items-row:first-child { border-top: none; }
.items-head { font-family: var(--font-display); font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--texto-label); padding-top: .6rem; padding-bottom: .6rem; background: var(--fundo-card-alt); }
.items-row .r { text-align: right; }
.items-row .muted { color: var(--texto-label); }
.items-desc { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.items-desc strong { font-weight: 600; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.items-desc small { font-size: .74rem; color: var(--texto-label); }
.items-files { display: flex; flex-wrap: wrap; gap: .35rem; min-width: 0; }
.items-empty { padding: 1.6rem; text-align: center; color: var(--texto-label); font-size: .85rem; }
.file-chip { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; height: 26px; padding: 0 .5rem; border-radius: var(--r-xs); background: color-mix(in srgb, var(--verde) 14%, transparent); color: var(--success-ink); font-size: .74rem; font-weight: 700; }
.file-chip a, .file-chip .file-chip-open { display: inline-flex; align-items: center; gap: .35rem; color: inherit; text-decoration: none; min-width: 0; background: none; border: none; font: inherit; cursor: pointer; padding: 0; }
.file-chip a:hover .file-chip-name, .file-chip .file-chip-open:hover .file-chip-name { text-decoration: underline; }
.file-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.file-chip button { background: none; border: none; color: inherit; cursor: pointer; font-size: .7rem; opacity: .75; }
.attach-btn { height: 28px; padding: 0 .6rem; border-radius: var(--r-xs); border: 1px dashed var(--borda); background: transparent; color: var(--texto-valor); font-size: .74rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.attach-btn:hover { border-color: var(--destaque); }
.attach-btn.missing { border-color: var(--danger-ink); background: color-mix(in srgb, var(--vermelho) 12%, transparent); color: var(--danger-ink); }
.items-composer { border: 1px solid var(--borda); border-radius: var(--r-md); background: var(--fundo-card); padding: .9rem; display: flex; flex-direction: column; gap: .75rem; }
.items-composer-grid { display: grid; grid-template-columns: minmax(0,1fr) 180px 76px 130px; gap: .6rem; }
.type-pill {
  height: 32px; padding: 0 .9rem; border-radius: var(--r-pill);
  border: 1.5px solid color-mix(in srgb, var(--primaria) 60%, var(--borda)); background: transparent; color: var(--texto-valor);
  font-size: .78rem; font-weight: 700; cursor: pointer; font-family: var(--font-display); letter-spacing: .03em;
  transition: all var(--dur-1) var(--ease);
}
.type-pill:hover { background: color-mix(in srgb, var(--primaria) 12%, transparent); border-color: var(--primaria); }
.type-pill.on { border-color: currentColor; box-shadow: var(--shadow-1); }
.drop { flex: 1 1 260px; min-height: 52px; border: 1.5px dashed var(--borda); border-radius: var(--r-md); background: var(--fundo-card-alt); display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: .5rem .9rem; cursor: pointer; font-size: .82rem; transition: border-color var(--dur-1) var(--ease); }
.drop span { color: var(--texto-label); font-size: .74rem; }
.drop:hover, .drop:focus-visible { border-color: var(--destaque); outline: none; }
.drop.has { border-color: var(--verde); background: color-mix(in srgb, var(--verde) 8%, transparent); }
.drop.need { border-color: color-mix(in srgb, var(--destaque) 60%, transparent); }
.items-total { border-radius: var(--r-lg); padding: 1.1rem; border: 1px solid var(--borda); background: linear-gradient(158deg, var(--fundo-card-alt) 0%, var(--fundo-card) 70%); display: flex; flex-direction: column; gap: .25rem; box-shadow: var(--shadow-1); }
.items-total span { font-family: var(--font-display); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-label); }
.items-total strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.items-total small { font-size: .78rem; color: var(--texto-label); }
.items-note { border-radius: var(--r-md); padding: .85rem 1rem; display: flex; flex-direction: column; gap: 3px; font-size: .8rem; line-height: 1.45; border: 1px solid transparent; }
.items-note strong { font-size: .85rem; }
.items-note span { color: var(--texto-label); }
.items-note.bad { background: color-mix(in srgb, var(--vermelho) 10%, transparent); border-color: color-mix(in srgb, var(--vermelho) 35%, transparent); } .items-note.bad strong { color: var(--danger-ink); }
.items-note.ok { background: color-mix(in srgb, var(--verde) 10%, transparent); border-color: color-mix(in srgb, var(--verde) 35%, transparent); } .items-note.ok strong { color: var(--success-ink); }
.items-note.gold { background: color-mix(in srgb, var(--destaque) 12%, transparent); border-color: color-mix(in srgb, var(--destaque) 38%, transparent); } .items-note.gold strong { color: var(--gold-ink); }
.bar { height: 6px; border-radius: var(--r-pill); background: var(--fundo-card-alt); overflow: hidden; }
.bar > div { height: 100%; border-radius: var(--r-pill); }
.route { display: flex; flex-direction: column; }
.route-step { display: flex; gap: .75rem; }
.route-step .rail { display: flex; flex-direction: column; align-items: center; }
.route-step .n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: .7rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.route-step.value .n { background: var(--destaque); color: var(--on-destaque); }
.route-step .line { flex: 1; width: 2px; background: var(--borda); margin: 3px 0; min-height: 14px; }
.route-step .txt { padding-bottom: .9rem; display: flex; flex-direction: column; gap: 2px; font-size: .82rem; }
.route-step .txt small { color: var(--texto-label); font-size: .74rem; }
.items-row.rdv { grid-template-columns: 82px minmax(0,1.05fr) minmax(0,1.25fr) 96px 86px 96px 128px 30px; }
.items-row.rdv.ro { grid-template-columns: 82px minmax(0,1.2fr) minmax(0,1.2fr) 96px 80px 100px 130px; }
.items-row.rdv .items-desc small { margin-top: 3px; }
.items-row.rdv .items-desc small.num { font-size: .7rem; letter-spacing: -.1px; overflow-wrap: anywhere; }
.items-row.rdv .item-type { height: 22px; font-size: .7rem; padding: 0 .5rem; }
.rdv-head { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: flex-end; padding: .75rem 1rem; border-radius: var(--r-md); background: var(--fundo-card-alt); border: 1px solid var(--borda); }
.rdv-head.flat { border: none; border-radius: 0; border-bottom: 1px solid var(--borda); padding: .6rem 1.1rem; }
.rdv-head > div, .rdv-pix { display: flex; flex-direction: column; gap: 2px; font-size: .82rem; }
.rdv-head span { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-label); }
.rdv-pix { flex: 1 1 240px; }
.rdv-pix .form-input { padding: .5rem .75rem; }
.rdv-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .6rem; }
.rdv-grid .form-group { margin: 0; }
.rdv-grid .span2 { grid-column: span 2; } .rdv-grid .span3 { grid-column: span 3; }

/* ───────────────────────── Notas fiscais ───────────────────────── */
.nf-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .75rem; }
.nf-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .75rem; }
.nf-docs { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .9rem; }
.nf-doc { border: 1px solid var(--borda); border-radius: var(--r-md); background: var(--fundo-card); padding: 1rem; display: flex; flex-direction: column; gap: .75rem; box-shadow: var(--shadow-1); }
.nf-doc-head { display: flex; justify-content: space-between; align-items: center; }
.nf-doc-head strong { font-family: var(--font-display); font-size: .9rem; }
.nf-doc-head .ok { font-size: .74rem; font-weight: 700; color: var(--success-ink); }
.nf-doc-head .pend { font-size: .74rem; font-weight: 700; color: var(--gold-ink); }
.nf-line { display: grid; grid-template-columns: minmax(0,1fr) 130px 70px 120px 32px; gap: .6rem; align-items: center; padding: .6rem .9rem; border-top: 1px solid var(--borda); font-size: .85rem; }
.nf-line.ro { grid-template-columns: minmax(0,1fr) 130px 70px 120px; }
.nf-line:first-child { border-top: none; }
.nf-line-head { font-family: var(--font-display); font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--texto-label); background: var(--fundo-card-alt); }
.nf-line .r { text-align: right; } .nf-line .muted { color: var(--texto-label); }
.nf-line.changed { background: color-mix(in srgb, var(--verde) 10%, transparent); }
.nf-line.removed { opacity: .7; background: color-mix(in srgb, var(--vermelho) 8%, transparent); }
.nf-line input.form-input { padding: .5rem .6rem; }
.nf-stage { display: inline-flex; align-items: center; height: 24px; padding: 0 .6rem; border-radius: var(--r-pill); font-size: .74rem; font-weight: 700; background: var(--fundo-card-alt); }
/* filtros, seleção e pagamento em lote do Financeiro */
.nf-filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.nf-filters label { display: flex; flex-direction: column; gap: .32rem; min-width: 150px; flex: 0 1 auto; }
.nf-filters label > span { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-label); }
.nf-bulkbar {
  position: sticky; top: .5rem; z-index: 5; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
  padding: .6rem .9rem; border-radius: var(--r-md); background: var(--fundo-card);
  border: 1px solid var(--accent); box-shadow: var(--shadow-2);
}
.nf-bulk-list { display: flex; flex-direction: column; max-height: 260px; overflow: auto; border: 1px solid var(--borda); border-radius: var(--r-sm); margin: .6rem 0 .9rem; }
.nf-bulk-row { display: flex; justify-content: space-between; gap: .75rem; padding: .55rem .75rem; border-bottom: 1px solid var(--borda); }
.nf-bulk-row:last-child { border-bottom: 0; }
tr.row-selected td { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.nf-stats .stat-card { text-align: left; cursor: pointer; font: inherit; color: inherit; width: 100%; }
.nf-stats .stat-card:hover { border-color: var(--accent); }

/* ───────────────────────── Responsivo (breakpoints da origem) ───────────────────────── */
@media (max-width: 1400px) {
  .sidebar { width: 258px; min-width: 258px; }
}
@media (min-width: 1101px) and (max-width: 1440px) {
  .main { padding: .85rem .85rem 1.3rem; }
  .page { padding: 1.35rem 1.35rem 1.6rem; }
  .m7-overview-tag { font-size: 1rem; letter-spacing: .12em; }
  .search-bar { width: clamp(150px, 14vw, 220px); }
}
/* ID de chamado (fonte mono) não quebra no meio */
td[style*="font-mono"] { white-space: nowrap; }
@media (max-width: 1100px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: var(--z-sidebar); transform: translateX(-100%);
    width: min(300px, 86vw); min-width: 0;
    transition: transform var(--dur-2) var(--ease); box-shadow: var(--shadow-3);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim {
    display: block; position: fixed; inset: 0; z-index: var(--z-scrim);
    background: var(--scrim-soft); backdrop-filter: blur(2px);
    animation: ov-in var(--dur-2) var(--ease);
  }
  .sidebar-fechar {
    display: inline-flex; align-items: center; justify-content: center;
    position: absolute; top: .6rem; right: .6rem; z-index: 2;
    width: 34px; height: 34px; border-radius: var(--r-sm); cursor: pointer;
    background: var(--dark-hover); border: 1px solid var(--dark-field-brd);
    color: var(--on-dark); padding: 0; transition: background var(--dur-1) var(--ease);
  }
  .sidebar-fechar:hover { background: var(--hd-ctl-bg-hover); }
  .main { width: 100%; }
  .m7-header { position: static; flex-wrap: wrap; row-gap: .6rem; }
  .m7-menu-btn { display: inline-flex; }
  .m7-overview-tag { margin-right: auto; }
}
@media (max-width: 900px) {
  .page { padding: 1.25rem 1.2rem 1.4rem; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; overflow-x: auto; gap: .35rem; padding-bottom: .35rem; border-bottom: 1px solid var(--borda); }
  .settings-nav-item { white-space: nowrap; border-left: none; border-bottom: 2.5px solid transparent; border-radius: var(--r-sm) var(--r-sm) 0 0; }
  .settings-nav-item.active { border-bottom-color: var(--accent); }
  .ticket-detail { grid-template-columns: minmax(0, 1fr); }
  .reports-charts, .dash-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .rdv-grid { grid-template-columns: 1fr 1fr; } .rdv-grid .span3 { grid-column: span 2; }
  .items-row.rdv, .items-row.rdv.ro { grid-template-columns: 1fr auto; }
  .items-step { flex-direction: column; }
  .items-side { flex: 1 1 auto; width: 100%; }
  .items-composer-grid { grid-template-columns: 1fr 1fr; }
  .items-row, .items-row.ro { grid-template-columns: 1fr auto; }
  .items-head { display: none; }
  .items-row > span[data-label]::before { content: attr(data-label) ': '; color: var(--texto-label); font-size: .7rem; }
  .items-row .r { text-align: left; }
  .nf-docs, .nf-grid2, .nf-grid3 { grid-template-columns: 1fr; }
  .nf-line, .nf-line.ro { grid-template-columns: 1fr 1fr; }
  .nf-line-head { display: none; }
}
@media (max-width: 720px) {
  .main { padding: .7rem .7rem 1.1rem; }
  .page { padding: 1.1rem 1rem 1.3rem; border-radius: var(--r-lg); }
  .stats-row, .reports-kpis { --kpi-min: 150px; gap: .6rem; }
  .m7-header { padding: .7rem .9rem; }
  .m7-overview-tag { font-size: .98rem; }
  .m7-controls { gap: .55rem; flex-wrap: wrap; justify-content: flex-end; }
  .search-wrap { order: 9; flex: 1 1 100%; }
  .search-bar { width: 100%; }
  .notif-panel { position: fixed; top: 64px; left: 8px; right: 8px; width: auto; max-width: none; max-height: 78vh; }
  .hero { padding: 1.1rem 1.1rem; }
  .hero-title { font-size: 1.3rem; }
  .hero-mark { width: 92px; }
  .hero-divider { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .modal { width: 100%; max-height: 92vh; }
  .modal-body { padding: 1rem; }
  .settings-row { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .settings-row input, .settings-row select { width: 100%; }
  /* tabelas viram cartões no celular (rótulo vem do cabeçalho via data-label) */
  .card table thead { display: none; }
  .card table, .card table tbody, .card table tr, .card table td { display: block; width: 100%; }
  .card table tr {
    background: var(--fundo-card-alt); border: 1px solid var(--borda); border-radius: var(--r-sm);
    margin: .6rem; width: auto; padding: .75rem .85rem;
  }
  .card table td {
    padding: .35rem 0; border: none; display: flex; justify-content: space-between; align-items: center;
    gap: .75rem; text-align: right; max-width: 100% !important;
  }
  .card table td::before {
    content: attr(data-label); font-family: var(--font-display); font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em; color: var(--texto-label); text-align: left; flex-shrink: 0;
  }
  .card table td:first-child { border-bottom: 1px solid var(--borda); padding-bottom: .55rem; margin-bottom: .25rem; }
  .card table td.empty-cell { display: block; text-align: center; }
  .card table td.empty-cell::before { display: none; }
  .card table tbody tr:hover td { background: transparent; }
}
@media (max-width: 480px) {
  .main { padding: .55rem .5rem 1rem; }
  .page { padding: .95rem .85rem 1.2rem; }
  .stats-row, .reports-kpis { --kpi-min: 140px; }
  .stat-card { padding: .85rem .9rem .9rem 1rem; }
  .m7-overview-tag { font-size: .9rem; letter-spacing: .1em; }
  .m7-user { max-width: 200px; }
  .m7-user-nome { max-width: 110px; }
  .login-card { padding: 1.4rem 1.2rem; }
  .boot > img { width: 150px; }
}

/* ── Notas fiscais: rascunhos ── */
.nf-drafts { padding: 0; overflow: hidden; border-color: color-mix(in srgb, var(--destaque) 55%, var(--borda)); }
.nf-drafts-head { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; padding: .75rem 1rem; border-bottom: 1px solid var(--borda); }
.nf-drafts-head span { font-size: .75rem; color: var(--texto-label); }
.nf-draft-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; padding: .6rem 1rem; border-bottom: 1px solid var(--borda); }
.nf-draft-row:last-child { border-bottom: 0; }
.nf-draft-main { flex: 1; min-width: 0; }
.nf-draft-name { font-weight: 600; color: var(--texto-valor); }
.nf-draft-sub { font-size: .75rem; color: var(--texto-label); }
.nf-draft-hint { flex: 1; font-size: .75rem; color: var(--texto-label); align-self: center; }
.nf-config-note { font-size: .75rem; color: var(--texto-label); }
.nf-draft-hint.saving, .nf-draft-hint.dirty { color: var(--texto-label); }
.nf-draft-hint.saved { color: var(--st-ok); }
.nf-draft-hint.error { color: var(--st-ruim); font-weight: 600; }
