/* ContrataPUBLIC 2026.0.0.120 — camada visual (sem mudar fluxos nem regras).
   Paleta neutra quente, cor da marca só nos pontos de foco, bordas de 1px no lugar de sombras, cantos moderados,
   títulos em serifa editorial (Source Serif 4, hospedada no próprio site), barra inferior no celular,
   painéis que sobem de baixo, Início sem buracos. Carregada por último: só sobrepõe. Impressão/PDF não mudam (tudo em @media screen). */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 500 800; font-display: swap; src: url("../fonts/source-serif-4-latin.woff2") format("woff2"); }

@media screen {
  /* ---------- Tokens ---------- */
  :root {
    /* Normal (escuro quente, grafite) — substitui o azul-marinho/roxo neon */
    --bg: #1a1815; --panel: #22201c; --field: #2a2723; --navy: #1e1c19; --deeper: #151310;
    --text: #f1ede5; --muted: #ada594; --line: rgba(241, 237, 229, 0.11);
    --coral: #ee7a5d; --coral-2: #f08a52; --cyan: #2bb3cf; --cyan-bright: #48c4dd;
    --grad: linear-gradient(90deg, var(--coral), var(--coral));
    --shadow: none; --radius: 8px; --v120-foco: #ee7a5d; --v120-sel: rgba(238, 122, 93, 0.14);
    --tb-07041f: #141210; --tb-0b0733: #1a1815; --tb-0f0a3d: #1e1c19; --tb-1a1159: #2a2723; --tb-1a1446: #26231f; --tb-1d1260: #2c2925;
    --tb-a9a3c9: #ada594; --tb-8f8aa8: #968e7f; --tb-0b0733-35: rgba(26, 24, 21, 0.35); --tb-06041c-72: rgba(16, 14, 12, 0.72); --tb-040214-55: rgba(10, 9, 8, 0.55);
    --cc-k1: 0%; --cc-k2: 0%; --cc-kf: 0%; --cc-ev: 0%; --cc-glow: 0%; --cc-kb: 0%; --cc-lbl: 58%;
    --v120-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  }
  html[data-tema="claro"] {
    /* Claro: off-white e areia */
    --bg: #f5f2ec; --panel: #fffdf9; --field: #faf7f2; --navy: #eee8de; --deeper: #e7e0d4;
    --text: #1f1b16; --muted: #6a6256; --line: rgba(31, 27, 22, 0.13);
    --coral: #d4583a; --coral-2: #c9612d; --cyan: #0a7f99; --cyan-bright: #08718a;
    --shadow: none; --v120-foco: #d4583a; --v120-sel: rgba(212, 88, 58, 0.10);
    --tb-07041f: #e7e0d4; --tb-0b0733: #f0ebe2; --tb-0f0a3d: #f3eee6; --tb-1a1159: #fffdf9; --tb-1a1446: #faf7f2; --tb-1d1260: #ffffff;
    --tb-a9a3c9-14: rgba(31, 27, 22, 0.08); --tb-0b0733-35: rgba(255, 253, 249, 0.7);
    --cc-k1: 0%; --cc-k2: 0%; --cc-kf: 0%; --cc-ev: 0%; --cc-glow: 0%; --cc-kb: 0%; --cc-lbl: 62%;
  }
  html[data-tema="escuro"] { --shadow: none; --radius: 8px; --cc-k1: 0%; --cc-k2: 0%; --cc-kf: 0%; --cc-ev: 0%; --cc-glow: 0%; --cc-kb: 0%; --v120-foco: var(--coral); --v120-sel: rgba(238, 122, 93, 0.14); }

  /* ---------- Superfícies: 1px e divisórias, sem sombras pesadas ---------- */
  .card, .dash-card, .kb-col, .kb-card, .prod-card, .td-card, .dash-tipo, .cp-modal-box, .msg-drop, .gb-panel {
    box-shadow: none !important; border-width: 1px; border-radius: var(--radius);
  }
  .card, .dash-card, .kb-col, .prod-card, .td-card { background: var(--panel) !important; border-color: var(--line) !important; }
  .dash-card::before { height: 2px; background: var(--cc, var(--coral)); opacity: 0.9; }
  .kb-card { background: var(--field); border: 1px solid var(--line); }
  .kb-card:hover { border-color: color-mix(in srgb, var(--v120-foco) 45%, var(--line)); }
  .app-sidebar { border-right: 1px solid var(--line); box-shadow: none; }
  .workspace-topbar { border-bottom: 1px solid var(--line); box-shadow: none; background: var(--bg); }
  .dash-valor .dash-num { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--text); }

  /* ---------- Tipografia ---------- */
  h1, .ini-ola, .topbar-title, .cp-modal-head h2, .nv-titulo { font-family: var(--v120-serif); font-weight: 700; letter-spacing: -0.01em; }
  .ini-ola { font-size: 1.7rem; }
  .dash-label, .kb-title { letter-spacing: 0.06em; }
  body { -webkit-font-smoothing: antialiased; }

  /* ---------- Componentes ---------- */
  .btn { border-radius: 7px; box-shadow: none; transition: transform 0.08s ease, background-color 0.15s, border-color 0.15s; }
  .btn.primary { background: var(--v120-foco); border: 1px solid var(--v120-foco); color: #fff; }
  .btn.primary:hover { filter: brightness(1.06); }
  .btn.ghost { background: transparent; border: 1px solid var(--line); }
  .btn.ghost:hover { border-color: color-mix(in srgb, var(--v120-foco) 50%, var(--line)); }
  .btn:active, button:active, .nav-item:active, .bn-item:active, .ini-chip:active { transform: scale(0.96); }
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea {
    border: 1px solid var(--line); background: var(--field); border-radius: 6px; box-shadow: none;
  }
  input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus {
    outline: none; border-color: var(--v120-foco); box-shadow: 0 0 0 3px var(--v120-sel);
  }
  .nav-item[aria-pressed="true"] { background: var(--v120-sel) !important; color: var(--text) !important; box-shadow: inset 2px 0 0 var(--v120-foco) !important; }

  /* ---------- Tabelas limpas e densas ---------- */
  table { border-collapse: collapse; }
  .card table th, .card table td, .cp-modal-box table th, .cp-modal-box table td, .adm table th, .adm table td { padding: 0.34rem 0.55rem; border-bottom: 1px solid var(--line); }
  .card table thead th, .cp-modal-box table thead th { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: transparent; }
  .card table tbody tr:hover td { background: var(--v120-sel); }

  /* ---------- Barra lateral mais fina no computador ---------- */
  @media (min-width: 901px) {
    .app-sidebar { flex-basis: 232px; width: 232px; }
    .nav-item { min-height: 36px; padding-top: 0.38rem; padding-bottom: 0.38rem; }
  }

  /* ---------- Início: grade sem buracos ---------- */
  .ini-grade { grid-auto-flow: row dense; }
  .ini-grade.ini-mason { grid-auto-rows: 6px; row-gap: 0; align-items: stretch; }
  .ini-grade.ini-mason > .ini-card { margin-bottom: 0.9rem; }
  .ini-item { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 0.42rem 0.2rem; min-height: 40px; }
  .ini-item:last-child { border-bottom: 0; }
  .ini-lista { gap: 0; }
  .ini-sk { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 0.9rem; }
  .ini-sk > div { height: 170px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(90deg, var(--panel) 0%, var(--field) 50%, var(--panel) 100%); background-size: 200% 100%; animation: v120sk 1.2s ease-in-out infinite; }
  .ini-sk > div:nth-child(3n+2) { height: 120px; } .ini-sk > div:nth-child(4n+3) { height: 220px; }
  @keyframes v120sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
  @media (prefers-reduced-motion: reduce) { .ini-sk > div { animation: none; } }

  /* ---------- Celular ---------- */
  .bn { display: none; }
  @media (max-width: 900px) {
    body.bn-on .btn-hamburger { display: none !important; }
    body.bn-on .bn {
      display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
      background: var(--bg); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    }
    .bn-item { appearance: none; border: 0; background: none; color: var(--muted); font: inherit; font-size: 0.68rem; font-weight: 600;
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: 8px; cursor: pointer; transition: transform 0.08s; }
    .bn-item svg { width: 22px; height: 22px; }
    .bn-item[aria-current="page"] { color: var(--v120-foco); }
    .bn-item[aria-current="page"] svg { stroke-width: 2.4; }
    .bn-item[hidden] { display: none; }
    body.bn-on .version-bar { bottom: calc(61px + env(safe-area-inset-bottom)); font-size: 0.66rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: 3px; padding-bottom: 3px; }
    body.bn-on .workspace { padding-bottom: calc(6.4rem + env(safe-area-inset-bottom)); }
    body.bn-on .gb-wrap { display: none !important; }
    /* indicadores do Início: rolagem horizontal que para em cada um */
    .ini-chips { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
    .ini-chips::-webkit-scrollbar { display: none; }
    .ini-chip { flex: 0 0 auto; scroll-snap-align: start; }
    .ini-ola { font-size: 1.4rem; }
    /* painéis que sobem de baixo */
    .cp-modal:not([hidden]) { align-items: flex-end !important; }
    .cp-modal:not([hidden]) .cp-modal-box {
      position: fixed; left: 0; right: 0; bottom: 0; top: auto; margin: 0; width: 100% !important; max-width: none !important;
      max-height: 90vh; overflow: auto; border-radius: 14px 14px 0 0; border-bottom: 0; transform: none;
      animation: v120sobe 0.2s ease-out; padding-top: 18px; padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }
    .cp-modal:not([hidden]) .cp-modal-box::before { content: ""; position: absolute; top: 6px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: var(--line); background: color-mix(in srgb, var(--muted) 45%, transparent); }
    .cp-modal-box.v120-arrasta { animation: none; transition: none; }
    @keyframes v120sobe { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
  }
}
