/* Human UI 2 — camada visual da casa. Fonte: assets/human-skin.css → public/ por sync-assets.
   Layout e anatomia continuam em assets/human-ui.css; aqui vive só identidade: tipografia,
   elevação, movimento e o momento de brilho do acento. Catálogo: docs/ui-layout.md.
   Canon (11/09/2026): raio 8px, pill só em status/badge/chip, UM brilho por página,
   movimento funcional 120–250 ms com prefers-reduced-motion, sem 3D/glassmorphism/biblioteca. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
}

:root {
  --mm-font: "Inter Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mm-font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, monospace;
  --mm-radius: .5rem; --mm-radius-sm: .375rem; --mm-radius-pill: 999px;
  --mm-border: #79838f; /* mais macio que o fio anterior e ainda 3:1 sobre superfícies claras */
  --mm-shadow-1: 0 1px 2px rgb(2 6 23 / .05), 0 2px 6px rgb(2 6 23 / .06);
  --mm-shadow-2: 0 2px 4px rgb(2 6 23 / .06), 0 6px 16px rgb(2 6 23 / .10);
  --mm-shadow-pop: 0 4px 12px rgb(2 6 23 / .10), 0 20px 48px rgb(2 6 23 / .18);
  --mm-dur-1: 120ms; --mm-dur-2: 200ms; --mm-ease: cubic-bezier(.2, .8, .2, 1);
}
[data-bs-theme="dark"], [data-theme="dark"] {
  /* dark em camadas de quase-preto: o fundo afunda, os painéis flutuam, o acento acende. */
  --mm-bg: #0a0e14; --mm-surface: #111722; --mm-surface-2: #161f2c;
  --mm-border: #66717d; --mm-border-strong: #7b8794;
  --mm-shadow-1: 0 1px 2px rgb(0 0 0 / .40), 0 2px 8px rgb(0 0 0 / .35);
  --mm-shadow-2: 0 2px 4px rgb(0 0 0 / .40), 0 6px 18px rgb(0 0 0 / .50);
  --mm-shadow-pop: 0 8px 20px rgb(0 0 0 / .50), 0 24px 56px rgb(0 0 0 / .60);
}

/* ── Tipografia: a família da casa em tudo; números tabulares onde há dado ── */
.mm-human {
  --bs-body-font-family: var(--mm-font);
  --bs-border-radius-sm: var(--mm-radius-sm);
  font-family: var(--mm-font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.mm-human h1, .mm-human h2, .mm-human h3 { letter-spacing: -.02em; }
.mm-human pre, .mm-human code, .mm-human .mm-codigo, .mm-human kbd { font-family: var(--mm-font-mono); }
.mm-mono { font-family: var(--mm-font-mono); font-size: .92em; letter-spacing: -.005em; }
.mm-num, .mm-facts dd, .mm-kpi dd { font-variant-numeric: tabular-nums; }
.mm-kicker { font-family: var(--mm-font-mono); font-size: .75rem; letter-spacing: .08em; }
.mm-facts dt {
  font-family: var(--mm-font-mono); font-size: .6875rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em;
}
.mm-kpi dt {
  font-family: var(--mm-font-mono); font-size: .6875rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em;
}
.mm-kpi dd { font-weight: 700; letter-spacing: -.01em; }

/* ── Elevação: painel flutua sobre o fundo por sombra + fio macio, não por borda gorda ── */
.mm-panel { box-shadow: var(--mm-shadow-1); }
.mm-panel.mm-workbench {
  box-shadow: var(--mm-shadow-1), 0 -4px 16px -8px color-mix(in srgb, var(--mm-accent) 40%, transparent);
}
.mm-chrome { box-shadow: 0 1px 3px rgb(2 6 23 / .05); }
[data-bs-theme="dark"] .mm-chrome, [data-theme="dark"] .mm-chrome { box-shadow: 0 1px 3px rgb(0 0 0 / .40); }
.mm-human .modal-content, .mm-human .dropdown-menu, .mm-human .offcanvas { box-shadow: var(--mm-shadow-pop); }

/* ── O momento de brilho: UM por página, sempre na cor do acento. Vai como background do
   próprio bloco — pseudo-elemento posicionado estourou scrollWidth no mobile (provado). ── */
.mm-opening {
  background: radial-gradient(640px 280px at 16% 0%,
    color-mix(in srgb, var(--mm-accent) 16%, transparent), transparent 70%) no-repeat top;
}
[data-bs-theme="dark"] .mm-opening, [data-theme="dark"] .mm-opening {
  background: radial-gradient(640px 300px at 16% 0%,
    color-mix(in srgb, var(--mm-accent) 26%, transparent), transparent 72%) no-repeat top;
}

/* ── Controles: transição curta, primário com brilho interno e lift no hover ── */
.mm-human .btn {
  transition: transform var(--mm-dur-1) var(--mm-ease), box-shadow var(--mm-dur-2) var(--mm-ease),
    background-color var(--mm-dur-1), border-color var(--mm-dur-1), color var(--mm-dur-1);
}
.mm-human .btn.btn-primary {
  background-image: linear-gradient(180deg, rgb(255 255 255 / .10), rgb(255 255 255 / 0) 55%);
}
.mm-human .btn:not(.disabled):not(:disabled):hover { transform: translateY(-1px); }
.mm-human .btn:not(.disabled):not(:disabled):active { transform: translateY(0) scale(.98); }
.mm-human .btn.btn-primary:not(:disabled):hover { box-shadow: 0 3px 10px -2px color-mix(in srgb, var(--mm-accent) 45%, transparent); }
.mm-human .form-control, .mm-human .form-select {
  border-color: var(--mm-border);
  transition: border-color var(--mm-dur-1), box-shadow var(--mm-dur-2);
}
.mm-human .form-control:hover:not(:disabled):not([readonly]),
.mm-human .form-select:hover:not(:disabled) { border-color: var(--mm-border-strong); }
.mm-human .input-group-text { border-color: var(--mm-border); }
.mm-human .nav-tabs .nav-link { transition: color var(--mm-dur-1), border-color var(--mm-dur-1), background-color var(--mm-dur-1); }
.mm-human .table tbody tr { transition: background-color var(--mm-dur-1); }

/* ── Estados e rótulos: pill e mono, a voz técnica da casa ── */
.mm-status { border-radius: var(--mm-radius-pill); font-family: var(--mm-font-mono); font-size: .6875rem; padding: .2rem .6rem; }
.mm-human .badge { border-radius: var(--mm-radius-pill); }
.mm-chip { border-radius: var(--mm-radius-pill); }

/* ── Cartão interativo: o lift que convida ao toque ── */
.mm-human a.mm-need, .mm-human button.mm-need, .mm-chip {
  transition: transform var(--mm-dur-1) var(--mm-ease), box-shadow var(--mm-dur-2) var(--mm-ease),
    border-color var(--mm-dur-1), background-color var(--mm-dur-1);
}
.mm-human a.mm-need:hover, .mm-human button.mm-need:hover {
  transform: translateY(-2px); box-shadow: var(--mm-shadow-2);
  border-color: color-mix(in srgb, var(--mm-accent) 55%, var(--mm-border));
}

/* ── Movimento: entrada de lista com stagger curto; skeleton no lugar do estado parado ── */
.mm-skeleton {
  position: relative; overflow: hidden; min-height: 1em; border-radius: var(--mm-radius-sm);
  background: var(--mm-surface-2); color: transparent !important;
}
.mm-skeleton::after { content: none; }
@media (prefers-reduced-motion: no-preference) {
  .mm-rows > *, .mm-human .list-group-item, .mm-need-row > * {
    animation: mm-entra var(--mm-dur-2) var(--mm-ease) backwards;
  }
  .mm-rows > :nth-child(2), .mm-human .list-group-item:nth-child(2), .mm-need-row > :nth-child(2) { animation-delay: 30ms; }
  .mm-rows > :nth-child(3), .mm-human .list-group-item:nth-child(3), .mm-need-row > :nth-child(3) { animation-delay: 60ms; }
  .mm-rows > :nth-child(4), .mm-human .list-group-item:nth-child(4), .mm-need-row > :nth-child(4) { animation-delay: 90ms; }
  .mm-rows > :nth-child(5), .mm-human .list-group-item:nth-child(5), .mm-need-row > :nth-child(5) { animation-delay: 120ms; }
  .mm-rows > :nth-child(6), .mm-human .list-group-item:nth-child(6), .mm-need-row > :nth-child(6) { animation-delay: 150ms; }
  .mm-rows > :nth-child(n+7), .mm-human .list-group-item:nth-child(n+7), .mm-need-row > :nth-child(n+7) { animation-delay: 180ms; }
  @keyframes mm-entra { from { opacity: 0; transform: translateY(4px); } }
  .mm-skeleton::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--mm-text) 7%, transparent), transparent);
    animation: mm-brilho 1.4s ease-in-out infinite;
  }
  @keyframes mm-brilho { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
}
@media (prefers-reduced-motion: reduce) {
  .mm-human *, .mm-human *::before, .mm-human *::after {
    animation: none !important; transition: none !important;
  }
}
