@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Work+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink: #121212;
  --charcoal: #1A1A1A;
  --charcoal-2: #232323;
  --bone: #EDE8DE;
  --bone-2: #E1DACB;
  --silver: #C4C4C0;
  --silver-dim: #8C8C86;
  --line: #D8D2C4;
  --white: #FAF8F3;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Work Sans', sans-serif;
  background: var(--bone);
  color: var(--ink);
  line-height: 1.5;
}

h1, h2, h3, .display {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.mono { font-family: 'IBM Plex Mono', monospace; }
a { color: inherit; }

/* ---------- Hairline divider (signature element) ---------- */
.stripes {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--silver-dim) 15%, var(--silver-dim) 85%, transparent);
}

/* ---------- Header / Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--bone);
  padding: 30px 24px 64px;
}

.hero-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 920px;
  margin: 0 auto 56px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 64px; width: auto; display: block; }
.brand-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  letter-spacing: 0.14em;
  color: var(--white);
  text-transform: uppercase;
}

.nav-actions { display: flex; gap: 10px; align-items: center; }

.hero-content { max-width: 920px; margin: 0 auto; }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver-dim);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(46px, 8.5vw, 88px);
  color: var(--white);
  max-width: 780px;
  font-style: italic;
  font-weight: 400;
}
.hero h1 em { color: var(--silver); font-style: normal; }

.hero p {
  margin-top: 20px;
  max-width: 460px;
  color: #A8A196;
  font-size: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  border: none;
  border-radius: 2px;
  padding: 12px 22px;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: #000; }

.btn-ghost { background: transparent; color: var(--bone); border: 1px solid #3A3A3A; }
.btn-ghost:hover { border-color: var(--silver); color: var(--silver); }

.btn-small { padding: 8px 14px; font-size: 12px; }
.btn-outline { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-danger { background: transparent; border: 1.5px solid #8A5A52; color: #8A5A52; }
.btn-danger:hover { background: #8A5A52; color: var(--white); }

/* ---------- Main layout ---------- */
main {
  max-width: 920px;
  margin: -32px auto 0;
  padding: 0 24px 80px;
  position: relative;
}

.card {
  background: var(--white);
  border-radius: 2px;
  padding: 34px;
  box-shadow: 0 16px 40px -18px rgba(18,18,18,0.25);
  margin-bottom: 24px;
  border: 1px solid var(--line);
}

.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silver-dim);
  margin-bottom: 8px;
}

.section-title {
  font-size: 32px;
  margin-bottom: 22px;
  font-style: italic;
}

/* ---------- Steps ---------- */
.steps { display: flex; gap: 6px; margin-bottom: 28px; }
.step {
  flex: 1;
  padding: 10px 12px;
  border-radius: 2px;
  background: var(--bone-2);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--silver-dim);
  border-bottom: 2px solid transparent;
}
.step.active { background: var(--ink); color: var(--silver); }
.step.done { border-bottom-color: var(--ink); color: var(--ink); }

/* ---------- Choice grids ---------- */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.choice-card {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
  background: var(--white);
}
.choice-card:hover { border-color: var(--silver-dim); }
.choice-card.selected { border-color: var(--ink); background: var(--bone); }
.choice-card .name { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 20px; margin-bottom: 4px; }
.choice-card .meta { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--silver-dim); }

/* ---------- Date input ---------- */
input[type="date"], input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="time"] {
  font-family: 'Work Sans', sans-serif;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  min-width: 0;
  width: 100%;
  background: var(--white);
  color: var(--ink);
}
input:focus { outline: none; border-color: var(--ink); }
label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.03em; margin-bottom: 6px; color: var(--silver-dim); text-transform: uppercase; }
.field { margin-bottom: 16px; min-width: 0;}
select { font-family: 'Work Sans', sans-serif; }

/* ---------- Ticket-stub time slots ---------- */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.slot {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  padding: 12px 4px;
  border: 1px dashed var(--line);
  border-radius: 2px;
  cursor: pointer;
  background: var(--white);
}
.slot:hover { border-color: var(--silver-dim); border-style: solid; }
.slot.selected { background: var(--ink); color: var(--white); border-color: var(--ink); border-style: solid; }

/* ---------- Appointment list ---------- */
.appt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  gap: 16px;
  flex-wrap: wrap;
}
.appt:last-child { border-bottom: none; }
.appt-info .name { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 19px; }
.appt-info .meta { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--silver-dim); margin-top: 2px; }

.badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid currentColor;
}
.badge-pendente { color: #8A6A1E; background: #F3E9D2; }
.badge-confirmado { color: #2C4A2C; background: #DCE7DC; }
.badge-cancelado { color: #7A3B34; background: #EBDAD7; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--silver-dim); }
.empty .display { font-size: 32px; color: var(--line); margin-bottom: 8px; }

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--white);
  padding: 14px 22px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 300;
  border-left: 3px solid var(--silver);
}
#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
#toast.error { border-left-color: #8A5A52; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(18,18,18,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal {
  background: var(--white);
  border-radius: 2px;
  padding: 34px;
  max-width: 380px;
  width: 100%;
  border: 1px solid var(--line);
  max-height: 85vh;
  overflow-y: auto;
}
.modal h3 { font-size: 28px; margin-bottom: 18px; font-style: italic; }
.hidden { display: none !important; }

.tab-row { display: flex; gap: 6px; margin-bottom: 20px; }
.tab-btn {
  flex: 1;
  background: var(--bone-2);
  border: none;
  padding: 10px;
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.03em;
  border-radius: 2px;
  cursor: pointer;
  color: var(--silver-dim);
}
.tab-btn.active { background: var(--ink); color: var(--silver); }

.link-btn {
  background: none; border: none; color: var(--ink);
  font-weight: 600; cursor: pointer; font-size: 13px; text-decoration: underline;
}
#btnAccount {
  text-decoration: none;
}
#btnAccount:hover {
  text-decoration: underline;
}

/* ---------- Password toggle ---------- */
.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 42px; }
.toggle-password {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  display: flex;
  align-items: center;
}
.toggle-password img { width: 18px; height: 18px; opacity: 0.6; }
.toggle-password:hover img { opacity: 1;}

.foto-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  display: block;
}
.foto-preview-sm {
  width: 44px;
  height: 44px;
}
.foto-preview-md {
  width: 56px;
  height: 56px;
}

.choice-card-com-foto {
  display: flex;
  align-items: center;
  gap: 14px;
}
.choice-card-com-foto .foto-preview {
  flex-shrink: 0;
}
.choice-card-com-foto .name {
  margin-bottom: 2px;
}
.choice-card-com-foto .info {
  min-width: 0;
}
.choice-card-com-foto .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.choice-card-com-foto .meta {
  white-space: normal;
  overflow-wrap: break-word;
}

/* ---------- Seções colapsáveis ---------- */
details.card > summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::marker { content: ""; }
details.card > summary::after {
  content: "▸";
  position: absolute;
  right: 0;
  top: 2px;
  font-size: 18px;
  color: var(--silver-dim);
  transition: transform 0.15s ease;
}
details.card[open] > summary::after {
  transform: rotate(90deg);
}
details.card .section-body {
  margin-top: 22px;
}

footer {
  text-align: center;
  padding: 32px 20px;
  color: var(--silver-dim);
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.04em;
}

/* ---------- Slot reservado (marca d'água) ---------- */
.slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.slot.slot-reservado {
  cursor: not-allowed;
  background: var(--bone-2);
  border-style: solid;
}
.slot.slot-reservado:hover {
  border-color: var(--line);
}

.slot-time { line-height: 1; }
.slot.slot-reservado .slot-time {
  color: var(--silver-dim);
  text-decoration: line-through;
  text-decoration-color: #8A5A52;
  text-decoration-thickness: 1.5px;
}

.slot-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8A5A52;
  background: #EBDAD7;
  padding: 2px 9px;
  border-radius: 20px;
}

@media (max-width: 600px) {
  .hero { padding: 22px 16px 46px; }
  main { padding: 0 16px 60px; }
  .card { padding: 24px; }
  .steps { flex-wrap: wrap; }
}

@keyframes pulseHighlight {
  0%, 100% { box-shadow: 0 0 0 0 rgba(18,18,18,0.35); }
  50% { box-shadow: 0 0 0 6px rgba(18,18,18,0.12); }
}
.tab-btn.highlight {
  animation: pulseHighlight 0.9s ease-in-out 2;
}