/* ============================================================================
   SKIN SPIN — segunda camada visual (redesign 18/out/26).
   Carrega DEPOIS do skin.css:  <link rel="stylesheet" href="skin-spin.css?v=1">

   Mesmas regras do skin.css:
   · Só cor de fundo/superfície, tipografia, forma e movimento de hover.
   · Cores semânticas de estado (verde/vermelho/azul) continuam iguais.
   · Nenhum seletor que a lógica usa; nenhuma animação de ENTRADA
     (o rerender troca o innerHTML a cada poll).
   Pra desligar: apagar a linha do <link>. Nada mais muda.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Caprasimo&family=Figtree:wght@400;500;600;700;800&display=swap');

/* ---------- paleta: creme + amarelo Spin ---------- */
:root {
  --bg: #f5ead8;
  --surface: #fbf4e8;
  --surface-2: #ebddc5;
  --border: rgba(32, 30, 29, .10);
  --text: #201e1d;
  --text-dim: #6e665a;
  --row-hover: #f8e9b8;
  --header-bg: #f5ead8;
  --chip-bg: #ebddc5;
  --accent: #f2c014;
  --accent-ink: #6b5200;   /* texto/ícone "amarelo" sobre creme: o amarelo puro não lê */
  --sage: #7a8a5e;
  --sage-soft: #e1eecc;
  --font-display: "Caprasimo", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --r-pill: 999px;
  --r-card: 28px;
  --shadow-sm: 0 1px 2px rgba(46, 43, 37, .14);
  --shadow-md: 0 3px 10px rgba(46, 43, 37, .16);
  --shadow-lg: 0 12px 32px rgba(46, 43, 37, .22);
}
body { background: var(--bg) !important; font-family: var(--font-body); }
::selection { background: rgba(242, 192, 20, .40); }

/* ---------- tipografia ---------- */
body, button, input, textarea, select,
.op-board-root, .cmz-board-root { font-family: var(--font-body) !important; }
/* títulos de tela e de painel ganham a voz display */
#app h1, #app h2, .op-modhead [style*="font-size:20px"], .op-modhead [style*="font-size:22px"],
#app [style*="font-size:26px"][style*="font-weight:800"],
#app [style*="font-size:28px"][style*="font-weight:800"] {
  font-family: var(--font-display) !important; font-weight: 400 !important; letter-spacing: 0 !important;
}

/* chips de serviço/filtro ligados (#1b1a16) ficam escuros: é estado, não ação */

/* ---------- faixas de cima: sem régua, mesma cor do fundo ---------- */
.op-modhead, .cmz-toolbar, .cmz-modhead {
  background: var(--bg) !important; border-bottom: 0 !important; box-shadow: none !important;
}

/* ---------- navegação: trilho em pílula, aba ativa vira "chip" claro ---------- */
.op-view { border-radius: var(--r-pill) !important; padding: 8px 16px !important; font-weight: 600 !important; }
.op-view[style*="background:#1b1a16"] {
  background: var(--surface) !important; color: var(--text) !important; box-shadow: var(--shadow-sm) !important;
}

/* ---------- painéis: superfície cheia, sem contorno, cantos generosos ---------- */
#app [style*="background:#fff"]:not(button):not(input),
#app [style*="background:#ffffff"]:not(button):not(input),
#app [style*="background:var(--surface)"]:not(button):not(input) {
  background: var(--surface) !important;
}
#app [style*="border:1px solid #e4e1d8"],
#app [style*="border:1px solid #e9e6dd"],
#app [style*="border:1px solid #eceadf"],
#app [style*="border:1px solid #e6e3da"] {
  border-color: transparent !important; box-shadow: var(--shadow-sm) !important;
}
#app [style*="border-radius:14px"],
#app [style*="border-radius:16px"],
#app [style*="border-radius:18px"] { border-radius: var(--r-card) !important; }

/* ---------- botões e etiquetas: pílula ---------- */
#app button[style*="border-radius"]:not([style*="50%"]),
.icon-btn, .ghost-btn, .pill { border-radius: var(--r-pill) !important; }
/* botão preto principal (+ Novo cliente, Criar tarefas…) vira amarelo com tinta escura */
#app button[style*="background:#1b1a16"][style*="color:#f2c500"] {
  background: var(--accent) !important; color: var(--text) !important;
}
#app button:not(:disabled):hover { filter: none; }
#app button[style*="background:var(--accent)"]:not(:disabled):hover,
#app button[style*="background:#f2c500"]:not(:disabled):hover { background: #d9a900 !important; }

/* ---------- campos ---------- */
#app input:not([type=checkbox]):not([type=radio]), #app select, #app textarea {
  border-radius: var(--r-pill) !important; background: var(--surface) !important; border-color: transparent !important;
}
#app textarea { border-radius: 20px !important; }
#app input:focus, #app textarea:focus, #app select:focus, #app [contenteditable]:focus {
  border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(242, 192, 20, .30) !important;
}
#app :focus-visible { outline: 2px solid var(--accent-ink) !important; outline-offset: 2px; }

/* ---------- linhas de tarefa ---------- */
#app [style*="border-top:1px solid #f0ede4"] { border-top-color: transparent !important; border-radius: 22px; }
#app [style*="border-top:1px solid #f0ede4"]:hover { background: var(--surface) !important; box-shadow: var(--shadow-md) !important; }

/* check de concluir: verde-sálvia ao mirar */
#app .md-check:hover { border-color: var(--sage) !important; box-shadow: 0 0 0 4px var(--sage-soft) !important; }

/* ---------- modal / painel lateral ---------- */
#app [style*="position:fixed"][style*="inset:0"] > [style*="background:#fff"],
#app [style*="position:fixed"][style*="inset:0"] > [style*="background:var(--surface)"] {
  border-radius: 32px !important; box-shadow: var(--shadow-lg) !important;
}

/* ---------- toast: pílula escura no rodapé ---------- */
.toast {
  background: var(--text) !important; color: var(--bg) !important; border: 0 !important;
  border-radius: var(--r-pill) !important; box-shadow: var(--shadow-lg) !important; padding: 12px 20px !important;
}
.toast .t-msg { color: rgba(245, 234, 216, .75) !important; }

/* ---------- modo escuro: mantém o do sistema, só troca o acento ---------- */
html[data-theme="dark"] {
  /* 31/out: preto, branco e amarelo são os protagonistas; neutros PUROS
     (o marrom quente de antes brigava com o amarelo) */
  --bg: #0b0b0b; --surface: #171717; --surface-2: #1f1f1f; --text: #f7f7f7; --text-dim: #9d9d9d;
  --header-bg: #0b0b0b; --chip-bg: #222222; --accent-ink: #FFC700;
  --border: rgba(255, 255, 255, .09); --row-hover: #1d1904;
  --sage: #FFE38A; --sage-soft: #151515;
}

/* fundo do quadro da Operação (injectOperacaoTheme pinta #f4f2ec) */
.op-board-root { background: var(--bg) !important; }
.op-board-root .op-open { background: var(--surface) !important; border-radius: var(--r-card) !important; }
.pg-faixa { background: var(--bg) !important; }
