/* ============================================================
   Oficina Fácil — design system v2 "Aço & Sinal"
   Identidade: bancada de aço escuro + faixa de segurança âmbar.
   Mobile-first, sem framework. Todas as classes das views cobertas.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* paleta */
  --aco-900: #0b1220;   /* topbar / tinta */
  --aco-800: #131c2e;
  --aco-100: #e6ebf2;
  --papel: #eef2f7;     /* fundo da página */
  --superficie: #ffffff;
  --texto: #1b2434;
  --texto-2: #5b687d;
  --borda: #dde4ee;
  --azul: #2563eb;      /* ação principal */
  --azul-escuro: #1d4ed8;
  --azul-claro: #e8effd;
  --ambar: #f5a623;     /* faixa de segurança */
  --verde: #0e9f6e;
  --verde-claro: #def7ec;
  --vermelho: #e02424;
  --vermelho-claro: #fde8e8;
  --roxo: #6d5bd0;
  --roxo-claro: #eceafb;
  --sombra-1: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --sombra-2: 0 4px 12px rgba(15, 23, 42, .08), 0 12px 32px rgba(15, 23, 42, .10);
  --raio: 14px;
  --fonte-display: 'Sora', system-ui, sans-serif;
  --fonte-corpo: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--fonte-corpo);
  color: var(--texto);
  background: var(--papel);
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { font-family: var(--fonte-display); letter-spacing: -.02em; }
h1 { font-size: 1.45rem; font-weight: 800; margin-bottom: 1rem; }
h2 { font-size: 1.08rem; font-weight: 700; margin: 1.4rem 0 .6rem; }

/* ---------- topbar: aço escuro com faixa de segurança ---------- */
header.topo {
  background: linear-gradient(135deg, var(--aco-900) 0%, #16233c 100%);
  color: #fff;
  padding: .8rem 1.1rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 3px solid var(--ambar);
}
header.topo .logo {
  font-family: var(--fonte-display);
  font-weight: 800; font-size: 1.06rem; color: #fff; letter-spacing: -.01em;
}
header.topo .logo:hover { text-decoration: none; }
header.topo .mudo a { font-weight: 600; }

/* ---------- navegação: trilho de abas tipo pílula ---------- */
nav.menu {
  display: flex; gap: .3rem;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borda);
  overflow-x: auto; padding: .5rem .7rem;
  position: sticky; top: 0; z-index: 20;
  scrollbar-width: none;
}
nav.menu::-webkit-scrollbar { display: none; }
nav.menu a {
  padding: .5rem .85rem; white-space: nowrap; font-size: .9rem;
  font-weight: 500; color: #55627a; border-radius: 99px;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease;
}
nav.menu a:hover { background: var(--azul-claro); color: var(--azul-escuro); text-decoration: none; }
nav.menu a.ativo {
  background: var(--aco-900); color: #fff; font-weight: 600;
  box-shadow: var(--sombra-1);
}

main { padding: 1.2rem 1rem 3rem; max-width: 900px; margin: 0 auto; }

/* ---------- cartões ---------- */
.cartao {
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 1.1rem 1.2rem;
  margin-bottom: .9rem;
  box-shadow: var(--sombra-1);
  transition: box-shadow .2s ease, transform .2s ease;
}

/* ---------- métricas do painel ---------- */
.grade-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.cartao.metrica {
  text-align: center; padding: 1rem .4rem 1.1rem;
  position: relative; overflow: hidden;
}
.cartao.metrica::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: linear-gradient(180deg, var(--ambar), var(--azul));
  border-radius: 4px 0 0 4px;
}
.metrica b {
  display: block; font-family: var(--fonte-display);
  font-size: 2rem; font-weight: 800; color: var(--aco-900);
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.metrica span {
  font-size: .74rem; color: #66717e; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
}

/* ---------- formulários ---------- */
form.linha { display: grid; gap: .6rem; }
label { font-size: .85rem; font-weight: 600; color: #3c4a61; }
input, select, textarea {
  width: 100%; padding: .7rem .8rem;
  border: 1.5px solid var(--borda); border-radius: 10px;
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--texto);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
::placeholder { color: #98a4b5; }

/* ---------- botões ---------- */
button, .botao {
  display: inline-block;
  background: linear-gradient(180deg, var(--azul), var(--azul-escuro));
  color: #fff; border: 0; border-radius: 10px;
  padding: .72rem 1.15rem; font-size: .98rem; font-weight: 600;
  font-family: inherit; cursor: pointer; text-align: center;
  box-shadow: 0 1px 2px rgba(29, 78, 216, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
button:hover, .botao:hover { filter: brightness(1.07); text-decoration: none; box-shadow: 0 4px 12px rgba(29, 78, 216, .35); }
button:active, .botao:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(29, 78, 216, .3); }
button:focus-visible, .botao:focus-visible, a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .4); outline-offset: 2px;
}
.botao-verde { background: linear-gradient(180deg, #10b981, #0e9f6e); box-shadow: 0 1px 2px rgba(14, 159, 110, .35), inset 0 1px 0 rgba(255,255,255,.12); }
.botao-verde:hover { box-shadow: 0 4px 12px rgba(14, 159, 110, .35); }
.botao-claro {
  background: var(--azul-claro); color: var(--azul-escuro);
  box-shadow: none; border: 1px solid #cfdefb;
}
.botao-claro:hover { box-shadow: 0 2px 8px rgba(37, 99, 235, .15); }
.botao-mini { padding: .34rem .7rem; font-size: .84rem; border-radius: 8px; }

/* ---------- tabelas ---------- */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th {
  text-align: left; padding: .55rem .5rem;
  font-size: .72rem; font-weight: 700; color: #66717e;
  text-transform: uppercase; letter-spacing: .07em;
  border-bottom: 2px solid var(--borda);
}
td { text-align: left; padding: .62rem .5rem; border-bottom: 1px solid #e9eef5; }
tr:last-child td { border-bottom: 0; }
tbody tr, table tr { transition: background .12s ease; }
table tr:hover td { background: #f6f9fd; }

/* ---------- etiquetas de status ---------- */
.etiqueta {
  display: inline-flex; align-items: center; gap: .35em;
  padding: .18rem .6rem; border-radius: 99px;
  font-size: .74rem; font-weight: 700; letter-spacing: .01em;
  white-space: nowrap;
}
.etiqueta::before { content: ""; width: .45em; height: .45em; border-radius: 50%; background: currentColor; }
.et-orcamento { background: #fdf3d7; color: #92600a; }
.et-aprovada { background: var(--azul-claro); color: var(--azul-escuro); }
.et-em_andamento { background: var(--roxo-claro); color: var(--roxo); }
.et-concluida { background: var(--verde-claro); color: #046c4e; }
.et-cancelada { background: var(--vermelho-claro); color: #c81e1e; }

/* ---------- avisos ---------- */
.erro {
  background: var(--vermelho-claro); color: #c81e1e;
  padding: .7rem .9rem; border-radius: 10px; margin-bottom: .8rem;
  border: 1px solid #f8c9c9; font-weight: 500; font-size: .95rem;
}
.aviso-bemvindo {
  background: linear-gradient(135deg, #f0fdf6, var(--verde-claro));
  border: 1px solid #bcf0d8; border-radius: var(--raio);
  padding: 1.1rem 1.2rem; margin-bottom: 1.1rem; box-shadow: var(--sombra-1);
}
.aviso-bemvindo ol { margin: .5rem 0 0 1.2rem; }
.aviso-bemvindo li { margin: .2rem 0; }

.total-grande {
  font-family: var(--fonte-display); font-size: 1.5rem; font-weight: 800;
  color: #046c4e; font-variant-numeric: tabular-nums;
}
.rodape-acao { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.mudo { color: #66717e; font-size: .86rem; }

/* ---------- telas de entrada (login/registro) ---------- */
body:has(> .centro) {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(245, 166, 35, .16), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(37, 99, 235, .14), transparent 60%),
    var(--aco-900);
  display: grid; align-items: center;
}
.centro { max-width: 430px; margin: 6vh auto; padding: 0 1rem; width: 100%; }
.centro .marca {
  text-align: center; margin-bottom: 1.2rem;
  font-family: var(--fonte-display); font-size: 1.7rem; font-weight: 800;
  color: #fff; letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0, 0, 0, .4);
}
.centro .cartao {
  padding: 1.6rem 1.5rem; border: 0; box-shadow: var(--sombra-2);
  border-radius: 18px;
}
.centro h1 { font-size: 1.25rem; }
.centro button { width: 100%; margin-top: .2rem; padding: .8rem; }

@media (min-width: 700px) {
  h1 { font-size: 1.7rem; }
  main { padding-top: 1.6rem; }
  .metrica b { font-size: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
