/* SC Ponto — estilos partilhados. Tokens iguais aos do standcristina.pt. */

@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/instrument-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/instrument-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/instrument-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Newsreader'; font-weight: 300; font-style: normal; font-display: swap; src: url(../fonts/newsreader-latin-300-normal.woff2) format('woff2'); }
@font-face { font-family: 'Newsreader'; font-weight: 300; font-style: italic; font-display: swap; src: url(../fonts/newsreader-latin-300-italic.woff2) format('woff2'); }
@font-face { font-family: 'Newsreader'; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/newsreader-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Newsreader'; font-weight: 400; font-style: italic; font-display: swap; src: url(../fonts/newsreader-latin-400-italic.woff2) format('woff2'); }

:root {
  --papel: #F7F4EE;
  --papel-2: #EFEAE0;
  --branco: #FFFFFF;
  --tinta: #1E1B18;
  --tinta-2: #4B463F;
  --suave: #6B645A;
  --linha: #E3DCCF;
  --linha-forte: #CFC6B6;
  --vermelho: #C7151C;
  --vermelho-escuro: #A31017;
  --vermelho-claro: #E5484D;
  --verde: #2F7D3A;
  --areia: #D3BE94;
  --azul: #2C4A7A;
  --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --corpo: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --raio: 6px;
  --sombra: 0 1px 2px rgba(30, 27, 24, .06), 0 8px 24px rgba(30, 27, 24, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papel); color: var(--tinta); font: 400 15px/1.5 var(--corpo); -webkit-font-smoothing: antialiased; }
a { color: var(--vermelho); text-decoration: none; }
a:hover { color: var(--vermelho-escuro); text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--vermelho); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Tipografia */
.titulo { font-family: var(--serif); font-weight: 300; font-size: 40px; line-height: 1.1; letter-spacing: -.3px; }
.titulo em, .serif em { font-style: italic; }
.serif { font-family: var(--serif); font-weight: 300; }
.sobretitulo { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--suave); }
.suave { color: var(--suave); }
.pequeno { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--raio); border: 1px solid var(--linha-forte); background: var(--branco); color: var(--tinta); font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--papel-2); text-decoration: none; color: var(--tinta); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primario { background: var(--vermelho); border-color: var(--vermelho); color: #fff; font-weight: 600; }
.btn-primario:hover { background: var(--vermelho-escuro); border-color: var(--vermelho-escuro); color: #fff; }
.btn-escuro { background: var(--tinta); border-color: var(--tinta); color: #fff; font-weight: 600; }
.btn-escuro:hover { background: #000; color: #fff; }
.btn-perigo { color: var(--vermelho-escuro); border-color: #E8B7B9; }
.btn-perigo:hover { background: #FBEDED; color: var(--vermelho-escuro); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-icone { min-height: 36px; width: 36px; padding: 0; }
.btn-link { border: none; background: none; color: var(--vermelho); padding: 0 4px; min-height: 0; }
.btn-link:hover { background: none; text-decoration: underline; color: var(--vermelho-escuro); }

/* Formulários */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > label, .rotulo { font-size: 13px; font-weight: 500; color: var(--tinta-2); }
.campo .ajuda { font-size: 12px; color: var(--suave); }
.entrada, select.entrada, textarea.entrada { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--linha-forte); border-radius: var(--raio); background: var(--branco); font-size: 15px; }
textarea.entrada { min-height: 84px; resize: vertical; }
.entrada:focus { border-color: var(--tinta-2); outline: none; box-shadow: 0 0 0 3px rgba(30, 27, 24, .08); }
.entrada[aria-invalid="true"] { border-color: var(--vermelho); }
.grelha-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.interruptor { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.interruptor input { width: 20px; height: 20px; accent-color: var(--tinta); }
input[type="color"].entrada { padding: 4px; width: 64px; }

/* Cartões e tabelas */
.cartao { background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio); padding: 18px 20px; }
.cartao-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.cartao-cab h2 { font-size: 16px; }
.tabela-envolvente { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th { text-align: left; font-size: 12px; font-weight: 500; color: var(--suave); padding: 8px 10px; border-bottom: 1px solid var(--linha); white-space: nowrap; }
.tabela td { padding: 10px; border-bottom: 1px solid var(--papel-2); vertical-align: middle; }
.tabela tr.clicavel { cursor: pointer; }
.tabela tr.clicavel:hover td { background: #FBF9F5; }
.tabela tr.inativo td { color: var(--suave); }
.tabela .dir { text-align: right; }
.tabela tr.fim-de-semana td { background: #FAF8F3; }

/* Chips de estado */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--papel-2); color: var(--tinta-2); white-space: nowrap; }
.chip-trabalho { background: #DCEBDD; color: #1F5A28; }
.chip-pausa { background: #F1E6CF; color: #6B4F12; }
.chip-fora { background: var(--papel-2); color: var(--tinta-2); }
.chip-alerta { background: #F9DEDF; color: var(--vermelho-escuro); }
.chip-info { background: #E4E9F4; color: var(--azul); }
.ponto { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }

/* Avatares */
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: #fff; flex-shrink: 0; }

/* Avisos */
.aviso { border-radius: var(--raio); padding: 12px 16px; font-size: 14px; border: 1px solid; }
.aviso-info { background: #FFF7E6; border-color: #E8D3A6; color: #6B4F12; }
.aviso-erro { background: #FBEDED; border-color: #E8B7B9; color: var(--vermelho-escuro); }
.aviso-ok { background: #EAF4EA; border-color: #BFDCC2; color: #1F5A28; }

/* Ecrã de autenticação / instalação */
.ecra-centro { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.caixa { width: 100%; max-width: 440px; background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio); padding: 32px; box-shadow: var(--sombra); }
.caixa-larga { max-width: 640px; }
.marca { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 24px; }
.marca-sc { width: 36px; height: 36px; border-radius: var(--raio); background: var(--vermelho); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 600 14px var(--corpo); }
.marca em { font-style: italic; font-weight: 300; }
.pilha { display: flex; flex-direction: column; gap: 16px; }
.linha-acoes { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.separador { height: 1px; background: var(--linha); margin: 8px 0; }
