:root {
  --escuro: #231F20;
  --escuro-2: #2E2A2B;
  --escuro-3: #3A3536;
  --azul: #28668A;
  --azul-forte: #1F5373;
  --azul-claro: #7FB3D3;
  --azul-fundo: #E8F1F7;
  --branco: #FFFFFF;
  --fundo: #F4F2F1;
  --texto: #231F20;
  --texto-2: #5E5859;
  --linha: #E2DEDD;
  --verde: #3E9B5F;
  --vermelho: #C85A54;
  --ambar: #D99A2B;
  --raio: 14px;
  --sombra: 0 1px 2px rgba(35, 31, 32, .06), 0 4px 14px rgba(35, 31, 32, .06);
  --f-titulo: 'Rye', Georgia, serif;
  --f-rotulo: 'Oswald', 'Arial Narrow', sans-serif;
  --f-texto: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--f-texto); color: var(--texto); background: var(--fundo); font-size: 15px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--azul); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.oculto { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--azul-claro); outline-offset: 2px; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 0; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--azul); color: #fff; transition: background .15s, transform .05s; }
.btn:hover { background: var(--azul-forte); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.bloco { width: 100%; }
.btn.claro { background: #fff; color: var(--texto); border: 1px solid var(--linha); }
.btn.claro:hover { background: #f8f7f6; }
.btn.fantasma { background: transparent; color: var(--azul); }
.btn.fantasma:hover { background: var(--azul-fundo); }
.btn.verde { background: var(--verde); }
.btn.verde:hover { background: #347f4f; }
.btn.vermelho { background: var(--vermelho); }
.btn.vermelho:hover { background: #ad4b46; }
.btn.pequeno { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn.zap { background: #1f9e5a; }
.btn.zap:hover { background: #1a8a4e; }
.icone { width: 20px; height: 20px; flex: none; }

/* ---------- Formulários ---------- */
.campo { display: grid; gap: 6px; margin-bottom: 14px; }
.campo label, .rotulo { font-family: var(--f-rotulo); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--texto-2); }
.entrada { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--linha); border-radius: 12px; background: #fff; }
.entrada:focus { border-color: var(--azul); outline: 2px solid rgba(40, 102, 138, .2); }
textarea.entrada { min-height: 90px; resize: vertical; }
.erro-campo { color: var(--vermelho); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 6px 0; }
.check input { width: 22px; height: 22px; accent-color: var(--azul); margin: 0; flex: none; }
.segmento { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #ECE9E8; border-radius: 12px; padding: 4px; gap: 4px; }
.segmento button { min-height: 42px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; color: var(--texto-2); cursor: pointer; }
.segmento button[aria-pressed="true"] { background: #fff; color: var(--azul); box-shadow: var(--sombra); }

/* ---------- Cartões ---------- */
.card { background: #fff; border-radius: var(--raio); box-shadow: var(--sombra); padding: 16px; }
.card + .card { margin-top: 12px; }
.card h3 { font-family: var(--f-rotulo); font-weight: 500; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
.linha-info { display: flex; gap: 12px; align-items: flex-start; }
.linha-info .icone { color: var(--azul); margin-top: 2px; }
.muted { color: var(--texto-2); }
.pequeno-txt { font-size: 13px; }
.selo { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.selo::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.selo.aberto { background: rgba(62, 155, 95, .16); color: #7fd39c; }
.selo.fechado { background: rgba(200, 90, 84, .18); color: #f0a29d; }
.tag { display: inline-block; font-family: var(--f-rotulo); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; background: var(--azul-fundo); color: var(--azul); }
.tag.ambar { background: #FBF0DC; color: #9a6a14; }
.tag.verde { background: #E3F3E8; color: #2c7246; }
.tag.vermelho { background: #F8E5E4; color: #9d3e39; }
.tag.cinza { background: #EEECEB; color: #5E5859; }

/* ---------- Esqueleto ---------- */
.esq { background: linear-gradient(90deg, #e9e6e5 25%, #f3f1f0 50%, #e9e6e5 75%); background-size: 200% 100%; animation: esq 1.2s infinite; border-radius: 10px; }
.escuro .esq, .esq.escuro { background: linear-gradient(90deg, #2e2a2b 25%, #3a3536 50%, #2e2a2b 75%); background-size: 200% 100%; }
@keyframes esq { to { background-position: -200% 0; } }

/* ---------- Avisos ---------- */
.toasts { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; width: min(92vw, 420px); }
.toast { background: var(--escuro); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-weight: 500; animation: sobe .2s ease-out; }
.toast.erro { background: var(--vermelho); }
.toast.ok { background: var(--verde); }
@keyframes sobe { from { transform: translateY(8px); opacity: 0; } }
.aviso { padding: 12px 14px; border-radius: 12px; background: var(--azul-fundo); color: #1d4a64; font-size: 14px; }
.aviso.ambar { background: #FBF0DC; color: #7a5410; }
.aviso.vermelho { background: #F8E5E4; color: #8a3631; }
.faixa-demo { background: var(--ambar); color: #3b2a05; text-align: center; font-size: 13px; font-weight: 600; padding: 6px 12px; }

/* ---------- Modal ---------- */
.modal-fundo { position: fixed; inset: 0; background: rgba(20, 18, 18, .55); display: flex; align-items: flex-end; justify-content: center; z-index: 90; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); animation: sobe .2s ease-out; }
.modal h2 { font-family: var(--f-rotulo); font-weight: 600; font-size: 20px; margin-bottom: 14px; }
.modal .acoes { display: grid; gap: 10px; margin-top: 16px; }
@media (min-width: 700px) { .modal-fundo { align-items: center; } .modal { border-radius: 20px; } }

/* ---------- Horários (chips) ---------- */
.grade-horas { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.hora { min-height: 46px; border-radius: 10px; border: 1px solid var(--linha); background: #fff; font-family: var(--f-rotulo); font-size: 16px; letter-spacing: .02em; cursor: pointer; }
.hora:hover { border-color: var(--azul); }
.hora[aria-pressed="true"] { background: var(--azul); border-color: var(--azul); color: #fff; }
.hora.off { background: #EEECEB; color: #A19A9B; border-color: transparent; }
.hora.extra { border: 2px dashed var(--azul); }
.hora.fora { border-color: var(--ambar); }
.periodo { font-family: var(--f-rotulo); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-2); margin: 14px 0 8px; }
