/* Horário Marcado — base visual
   Paleta inspirada na barbearia clássica: couro verde-garrafa das cadeiras e metais de latão. */
:root {
  /* Paleta Grafite e Cobre */
  --graphite: #24272c;
  --graphite-2: #33373e;
  --graphite-3: #3f444c;
  --copper: #c97b45;          /* destaque decorativo */
  --copper-strong: #a85a28;   /* botões e links (contraste AA com branco) */
  --copper-hover: #8f4b20;
  --copper-soft: #f8ebe1;
  --copper-tint: #fcf5ef;

  --ink: #1f2226;
  --ink-2: #4a4f57;
  --muted: #6e747d;
  --paper: #f4f5f7;
  --surface: #ffffff;
  --line: #e3e6ea;
  --ok: #2f7d55;
  --ok-soft: #e5f2eb;
  --red: #b3261e;
  --red-soft: #fbe9e7;
  --amber: #8a5a00;
  --amber-soft: #fff3d6;
  --blue: #2b5c8a;
  --blue-soft: #e7eff7;

  /* nomes antigos mantidos para compatibilidade */
  --green: var(--copper-strong);
  --green-2: var(--copper-hover);
  --green-soft: var(--copper-soft);
  --brass: var(--copper);
  --brass-soft: var(--copper-tint);

  --radius: 12px;
  --radius-sm: 8px;
  --font: "Avenir Next", "Segoe UI", "Helvetica Neue", Roboto, system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(31, 34, 38, .05), 0 6px 20px rgba(31, 34, 38, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink);
  background: var(--paper); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--copper-strong); }
.num, .time { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.big { font-size: 2rem; font-weight: 700; margin: .25em 0; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; border-radius: 4px; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: 0 1.1em; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--copper-strong); border-color: var(--copper-strong); color: #fff; }
.btn-primary:hover { background: var(--copper-hover); border-color: var(--copper-hover); }
.btn-dark { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.btn-dark:hover { background: var(--graphite-3); border-color: var(--graphite-3); }
.btn-brass { background: var(--copper-strong); border-color: var(--copper-strong); color: #fff; }
.btn-danger { color: var(--red); border-color: #e6c3bf; }
.btn-danger:hover { border-color: var(--red); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--copper-tint); border-color: transparent; }
.btn-sm { min-height: 34px; padding: 0 .75em; font-size: .875rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--copper-strong); font: inherit; text-decoration: underline; cursor: pointer; }

/* Formulários */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3em; }
.field { margin-bottom: 1rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .825rem; margin-top: .25em; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: .55em .75em; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid #c9d3ce; border-radius: var(--radius-sm);
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(201, 123, 69, .2); }
input[type="checkbox"], input[type="radio"] { width: 20px; min-height: 20px; height: 20px; accent-color: var(--copper-strong); margin: 0; }
.check { display: flex; gap: .6em; align-items: flex-start; font-weight: 400; }
.check input { flex: none; margin-top: 2px; }
.row { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.form-error { background: var(--red-soft); color: var(--red); padding: .7em .9em; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .925rem; }

/* Superfícies */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.narrow { max-width: 440px; width: 100%; }
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }

.badge { display: inline-block; font-size: .78rem; font-weight: 650; padding: .2em .65em; border-radius: 999px; background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--amber-soft); color: var(--amber); }
.badge-danger { background: var(--red-soft); color: var(--red); }
.badge-muted { background: #eef1ef; color: var(--ink-2); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-brass { background: var(--copper-soft); color: var(--copper-hover); }

/* Avisos rápidos */
#toasts { position: fixed; z-index: 100; left: 50%; bottom: 88px; transform: translateX(-50%); display: grid; gap: .5rem; width: min(92vw, 420px); }
.toast { background: var(--graphite); color: #fff; padding: .8em 1em; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: .95rem; animation: toast-in .18s ease-out; }
.toast.err { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(20, 33, 28, .45); display: grid; place-items: center; padding: 1rem; }
.modal { background: var(--surface); border-radius: var(--radius); width: min(560px, 100%); max-height: 92vh; overflow: auto; box-shadow: var(--shadow); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal header h2 { margin: 0; font-size: 1.1rem; }
.modal .body { padding: 1.25rem; }
.modal footer { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; padding: 1rem 1.25rem; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .modal-backdrop { place-items: end stretch; padding: 0; }
  .modal { border-radius: var(--radius) var(--radius) 0 0; width: 100%; }
}

.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--copper); border-radius: 50%; animation: spin .8s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: .25em; }

.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--copper); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .95rem; }
.logo { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.logo svg { width: 40px; height: 40px; flex: none; }
.logo .lt { font-weight: 750; font-size: 1.15rem; line-height: 1.05; color: #fff; letter-spacing: -.01em; }
.logo .lt span { display: block; color: var(--copper); }
.logo.on-light .lt { color: var(--graphite); }
