/* Venus Agenda — estilos compartilhados (app e gerenciador) */
:root {
  --verde: #1e3b34;        /* couro da cadeira */
  --verde-2: #2b5247;
  --latao: #b98a3e;        /* acento único */
  --latao-claro: #f3e7cf;
  --fundo: #f2f5f4;
  --superficie: #ffffff;
  --linha: #dbe3e0;
  --linha-forte: #c3cfcb;
  --texto: #18211e;
  --texto-2: #56645f;
  --texto-3: #85928d;
  --ok: #2f7d57;
  --ok-fundo: #e2f2e9;
  --perigo: #b4412f;
  --perigo-fundo: #f8e4df;
  --aviso-fundo: #fbf1dc;
  --sombra: 0 10px 30px rgba(20, 40, 34, .18);
  --raio: 10px;
  --fonte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --verde: #16302a; --verde-2: #234a40; --latao: #d2a25a; --latao-claro: #3a3122;
    --fundo: #0f1715; --superficie: #17221f; --linha: #26342f; --linha-forte: #34453f;
    --texto: #e6eeeb; --texto-2: #a6b5b0; --texto-3: #74847e;
    --ok: #5fbf8d; --ok-fundo: #173327; --perigo: #e27c69; --perigo-fundo: #3a1f1a; --aviso-fundo: #33291a;
    --sombra: 0 10px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.45 var(--fonte); background: var(--fundo); color: var(--texto); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--verde-2); }
@media (prefers-color-scheme: dark) { a { color: var(--latao); } }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
.mudo { color: var(--texto-2); }
.fraco { color: var(--texto-3); font-size: 13px; }
:focus-visible { outline: 2px solid var(--latao); outline-offset: 2px; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--linha-forte); background: var(--superficie);
  border-radius: 8px; padding: 9px 14px; cursor: pointer; font-weight: 600; font-size: 14px; min-height: 40px; text-decoration: none; color: var(--texto); }
.btn:hover { border-color: var(--texto-3); }
.btn.primario { background: var(--verde); border-color: var(--verde); color: #fff; }
.btn.primario:hover { background: var(--verde-2); }
.btn.perigo { color: var(--perigo); border-color: color-mix(in srgb, var(--perigo) 40%, transparent); }
.btn.fantasma { border-color: transparent; background: transparent; }
.btn.pequeno { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.bloco { width: 100%; }

/* formulários */
.campo { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.campo > label, .rotulo { font-size: 13px; font-weight: 600; color: var(--texto-2); }
input[type=text], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--linha-forte); background: var(--superficie); border-radius: 8px; padding: 10px 12px; min-height: 42px; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--latao); box-shadow: 0 0 0 3px color-mix(in srgb, var(--latao) 25%, transparent); }
.linha-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--verde-2); }
.ajuda { font-size: 12.5px; color: var(--texto-3); margin-top: -2px; }

/* interruptor */
.chave { position: relative; width: 44px; height: 26px; flex: none; }
.chave input { opacity: 0; width: 0; height: 0; position: absolute; }
.chave span { position: absolute; inset: 0; background: var(--linha-forte); border-radius: 13px; transition: background .15s; cursor: pointer; }
.chave span::after { content: ""; position: absolute; width: 20px; height: 20px; top: 3px; left: 3px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.chave input:checked + span { background: var(--ok); }
.chave input:checked + span::after { transform: translateX(18px); }
.chave input:focus-visible + span { outline: 2px solid var(--latao); outline-offset: 2px; }

/* selos de situação */
.selo { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--linha); color: var(--texto-2); white-space: nowrap; }
.selo.ok { background: var(--ok-fundo); color: var(--ok); }
.selo.perigo { background: var(--perigo-fundo); color: var(--perigo); }
.selo.aviso { background: var(--aviso-fundo); color: #8a5d14; }
@media (prefers-color-scheme: dark) { .selo.aviso { color: var(--latao); } }

/* avisos */
.aviso-caixa { border-radius: var(--raio); padding: 12px 14px; background: var(--aviso-fundo); border: 1px solid color-mix(in srgb, var(--latao) 35%, transparent); font-size: 14px; }
.aviso-caixa.perigo { background: var(--perigo-fundo); border-color: color-mix(in srgb, var(--perigo) 35%, transparent); }
.aviso-caixa.ok { background: var(--ok-fundo); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }

/* janela (folha que sobe no celular, centralizada no computador) */
.veu { position: fixed; inset: 0; background: rgba(10, 22, 18, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: aparecer .15s ease-out; }
.folha { background: var(--superficie); width: 100%; max-width: 560px; max-height: 92vh; border-radius: 16px 16px 0 0; display: flex; flex-direction: column; box-shadow: var(--sombra); animation: subir .2s ease-out; }
.folha-topo { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--linha); }
.folha-topo h2 { flex: 1; }
.folha-corpo { padding: 16px; overflow-y: auto; overscroll-behavior: contain; }
.folha-rodape { display: flex; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linha); }
.folha-rodape .btn { flex: 1; }
.fechar { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--fundo); cursor: pointer; font-size: 20px; line-height: 1; color: var(--texto-2); }
@media (min-width: 700px) { .veu { align-items: center; } .folha { border-radius: 14px; } }
@keyframes aparecer { from { opacity: 0; } }
@keyframes subir { from { transform: translateY(24px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .veu, .folha { animation: none; } }

/* aviso flutuante */
#toasts { position: fixed; left: 50%; bottom: calc(148px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.toast { background: var(--verde); color: #fff; padding: 12px 14px; border-radius: 10px; box-shadow: var(--sombra); font-size: 14px; pointer-events: auto; animation: subir .2s ease-out; }
.toast.erro { background: var(--perigo); }

/* tela de entrada */
.entrada { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: var(--verde); }
.entrada-caixa { width: 100%; max-width: 380px; background: var(--superficie); border-radius: 14px; padding: 26px 22px; box-shadow: var(--sombra); }
.marca { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.marca-icone { width: 40px; height: 40px; border-radius: 10px; background: var(--verde); display: grid; place-items: center; flex: none; }
.marca strong { font-size: 19px; display: block; }
.marca small { color: var(--texto-3); }
.erro-form { color: var(--perigo); font-size: 14px; min-height: 20px; margin: -4px 0 10px; }
.olho { position: relative; }
.olho input { padding-right: 70px; }
.olho button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--texto-2); font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px; }

.vazio { text-align: center; padding: 40px 16px; color: var(--texto-2); }
.carregando { padding: 40px; text-align: center; color: var(--texto-3); }
