/* DM Legal Firm — agendador. Paleta e tipografia da marca. */
@font-face {
  font-family: 'Enra Semi';
  src: url('/fonts/EnraSemi-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/fonts/HankenGrotesk-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f4f4;
  --surface: #ffffff;
  --ink: #111111;
  --navy: #1b2c4c;
  --accent: #5379c1;
  --muted: #505050;
  --line: #dcdfe5;
  --ok: #2f7d4f;
  --warn: #a8641a;
  --danger: #b3382c;
  --radius: 14px;
  --font: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-title: 'Enra Semi', 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3 { color: var(--navy); margin: 0 0 .4em; line-height: 1.2; font-weight: 600; font-family: var(--font-title); }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: var(--accent); margin: 0 0 .4rem; }

.shell { max-width: 980px; margin: 0 auto; padding: 32px 20px 64px; }
.shell.narrow { max-width: 620px; }
.shell.wide { max-width: 1180px; }

.brand { display: flex; align-items: center; margin-bottom: 28px; }
.brand a { display: inline-flex; }
.brand img { height: 40px; width: auto; display: block; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

/* Botões */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--navy);
  font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 10px; cursor: pointer;
  text-decoration: none; display: inline-block; transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--accent); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .day:focus-visible, .slot:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: #24396a; }
.btn.danger { color: var(--danger); border-color: #e3b9b4; }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }

/* Formulários */
label { display: block; font-size: .875rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=time], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
}
textarea { resize: vertical; min-height: 90px; }
.field { margin-bottom: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); font-size: .875rem; }
.check input { margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.alert { padding: 12px 14px; border-radius: 10px; font-size: .9rem; margin-bottom: 14px; border: 1px solid; }
.alert.error { background: #fbeceb; border-color: #e3b9b4; color: var(--danger); }
.alert.info { background: #eaf0fb; border-color: #c6d5f0; color: var(--navy); }
.alert.ok { background: #e8f4ec; border-color: #b9dcc6; color: var(--ok); }
.alert.warn { background: #fbf2e5; border-color: #ecd1a8; color: var(--warn); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eaeef5; color: var(--navy); }
.badge.confirmed { background: #e8f4ec; color: var(--ok); }
.badge.pending_payment { background: #fbf2e5; color: var(--warn); }
.badge.cancelled, .badge.expired, .badge.refunded { background: #f0f0f0; color: var(--muted); }
.badge.attention { background: #fbeceb; color: var(--danger); }

/* Listagem */
.list { display: grid; gap: 14px; }
.pro-block h2 { margin-bottom: 2px; }
.event-link {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; color: inherit;
  transition: border-color .15s, transform .15s;
}
.event-link:hover { border-color: var(--accent); transform: translateY(-1px); }
.event-link strong { color: var(--navy); font-family: var(--font-title); font-weight: 600; }

/* Agendamento */
.booker { display: grid; grid-template-columns: 300px 1fr; gap: 0; padding: 0; overflow: hidden; }
.booker .info { padding: 28px; border-right: 1px solid var(--line); background: #fafbfc; }
.booker .main { padding: 28px; min-width: 0; }
.meta { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; color: var(--muted); font-size: .9rem; }

.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cal-head h2 { margin: 0; }
.cal-head h2::first-letter { text-transform: uppercase; }
.pick { display: grid; grid-template-columns: 1fr 190px; gap: 24px; align-items: start; }
.slots-title { margin: 0 0 8px; }
.slots-title::first-letter { text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-grid .dow { text-align: center; font-size: .75rem; color: var(--muted); padding: 4px 0; text-transform: uppercase; letter-spacing: .05em; }
.day {
  aspect-ratio: 1; border: 0; border-radius: 50%; background: transparent; font: inherit; font-weight: 600; color: var(--muted);
  cursor: default; display: flex; align-items: center; justify-content: center;
}
.day.avail { background: #eaf0fb; color: var(--navy); cursor: pointer; }
.day.avail:hover { background: #d6e2f7; }
.day.selected { background: var(--navy); color: #fff; }
.day.blank { visibility: hidden; }

.slots { display: grid; gap: 8px; max-height: 420px; overflow: auto; padding-right: 4px; }
.slot {
  border: 1px solid var(--accent); color: var(--accent); background: #fff; border-radius: 10px; padding: 10px; font: inherit;
  font-weight: 600; cursor: pointer; text-align: center;
}
.slot:hover { background: var(--accent); color: #fff; }
.tz { margin-top: 14px; font-size: .85rem; color: var(--muted); }
.tz select { width: auto; padding: 4px 8px; font-size: .85rem; }

.summary { padding: 12px 14px; background: #eaf0fb; border-radius: 10px; margin-bottom: 18px; color: var(--navy); font-weight: 600; }

/* Admin */
.tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; font: inherit; font-weight: 600; color: var(--muted); padding: 10px 14px; cursor: pointer; }
.tab.active { color: var(--navy); border-bottom-color: var(--accent); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.rules .day-row { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); align-items: start; }
.rules .win { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.rules .win input { width: 150px; }
.stack > * + * { margin-top: 16px; }

@media (max-width: 760px) {
  .booker { grid-template-columns: 1fr; }
  .booker .info { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .pick { grid-template-columns: 1fr; }
  .shell { padding: 20px 14px 48px; }
  .booker .main, .booker .info { padding: 20px; }
}
