/* ============================================================
   app.css — Sistema de Agendamentos SaaS
   Design: Luxo refinado · Escuro com acentos âmbar/dourado
   Mobile-first, totalmente responsivo
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Tokens de design ── */
:root {
  /* Cores base */
  --bg:          #202025;
  --bg2:         #111118;
  --bg3:         #18181f;
  --bg4:         #1f1f28;
  --border:      rgba(255,255,255,.08);
  --border2:     rgba(255,255,255,.14);

  /* Acento principal: âmbar/dourado */
  --gold:        #d4a853;
  --gold-light:  #e8c374;
  --gold-dim:    rgba(212,168,83,.15);
  --gold-glow:   rgba(212,168,83,.25);

  /* Texto */
  --txt:         #f0ede8;
  --txt2:        #9e9b94;
  --txt3:        #5c5a55;

  /* Semânticas */
  --success:     #2dba7e;
  --danger:      #e05252;
  --info:        #5b9bd5;
  --warn:        #d4a853;

  /* Layout */
  --radius:      14px;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --shadow:      0 4px 24px rgba(0,0,0,.45);
  --shadow-gold: 0 0 32px rgba(212,168,83,.18);

  /* Fonte */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Transição padrão */
  --ease: .18s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--txt);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--gold-light); }

img { max-width: 100%; display: block; }

button, input, select, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ══════════════════════════════════════════════════════════
   COMPONENTES GLOBAIS
   ══════════════════════════════════════════════════════════ */

/* ── Card ── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-body { padding: 1.5rem; }
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--txt);
}

/* ── Botões ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--gold);
  color: #0a0a0f;
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  box-shadow: var(--shadow-gold);
  color: #0a0a0f;
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn-outline:hover {
  background: var(--gold-dim);
  box-shadow: var(--shadow-gold);
}

.btn-ghost {
  background: transparent;
  color: var(--txt2);
  border-color: var(--border2);
}
.btn-ghost:hover { background: var(--bg4); color: var(--txt); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger:hover { background: rgba(224,82,82,.1); }

.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; border-radius: var(--radius); }
.btn-full { width: 100%; }
.btn-icon { padding: .6rem; width: 2.4rem; height: 2.4rem; }

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Formulário ── */
.form-group { display: flex; flex-direction: column; gap: .45rem; }
.form-label {
  font-size: .82rem;
  font-weight: 500;
  color: var(--txt2);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.form-control {
  background: var(--bg3);
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--txt);
  padding: .75rem 1rem;
  width: 100%;
  transition: all var(--ease);
  outline: none;
}
.form-control:focus {
  border-color: var(--gold);
  background: var(--bg4);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
.form-control::placeholder { color: var(--txt3); }
.form-control::-webkit-calendar-picker-indicator { filter: invert(.6); }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23d4a853' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.form-hint { font-size: .8rem; color: var(--txt3); }
.form-error { font-size: .8rem; color: var(--danger); display: none; }
.form-error.show { display: block; }
.form-control.invalid { border-color: var(--danger); }

/* ── Badge / Tag ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .65rem;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .03em;
}
.badge-success { background: rgba(45,186,126,.15); color: var(--success); }
.badge-danger  { background: rgba(224,82,82,.15);  color: var(--danger); }
.badge-warn    { background: rgba(212,168,83,.15);  color: var(--gold); }
.badge-info    { background: rgba(91,155,213,.15);  color: var(--info); }
.badge-ghost   { background: var(--bg4); color: var(--txt2); }

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

/* ── Loading spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast / Alertas ── */
.toast-container {
  position: fixed;
  top: 1rem; right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}
.toast {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: .85rem 1.2rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .9rem;
  min-width: 260px;
  max-width: 340px;
  box-shadow: var(--shadow);
  pointer-events: all;
  animation: toastIn .25s ease forwards;
}
.toast.toast-success { border-color: var(--success); }
.toast.toast-error   { border-color: var(--danger); }
@keyframes toastIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { to { opacity:0; transform:translateX(20px); } }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  z-index: 900;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity var(--ease);
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(.95);
  transition: transform var(--ease);
}
.modal-backdrop.open .modal { transform: scale(1); }
.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-family: var(--font-display); font-size: 1.2rem; }
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: .75rem;
}

/* ── Tabelas ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.table th {
  padding: .75rem 1rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--txt3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--txt2);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg3); color: var(--txt); }

/* ── Stat card ── */
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.stat-label { font-size: .78rem; color: var(--txt3); text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-family: var(--font-display); font-size: 2rem; color: var(--txt); line-height: 1; }
.stat-sub   { font-size: .82rem; color: var(--txt3); }
.stat-up    { color: var(--success); }
.stat-down  { color: var(--danger); }

/* ══════════════════════════════════════════════════════════
   LAYOUT ADMIN
   ══════════════════════════════════════════════════════════ */

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  grid-row: 1 / -1;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-logo-sub {
  font-size: .75rem;
  color: var(--txt3);
  margin-top: .2rem;
}

.sidebar-nav { flex: 1; padding: 1rem 0; }
.nav-section {
  padding: .5rem 1.25rem .25rem;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--txt3);
  margin-top: .75rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1.25rem;
  color: var(--txt2);
  font-size: .9rem;
  border-radius: 0;
  transition: all var(--ease);
  cursor: pointer;
  position: relative;
  text-decoration: none;
}
.nav-item:hover { background: var(--bg3); color: var(--txt); }
.nav-item.active {
  color: var(--gold);
  background: var(--gold-dim);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold);
  border-radius: 0 3px 3px 0;
}
.nav-item svg { width: 18px; height: 18px; opacity: .8; }
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto;
  background: var(--gold-dim);
  color: var(--gold);
  font-size: .7rem;
  font-weight: 600;
  padding: .1rem .45rem;
  border-radius: 99px;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.sidebar-avatar {
  width: 34px; height: 34px;
  background: var(--gold-dim);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  color: var(--gold);
  font-weight: 600;
  flex-shrink: 0;
}
.sidebar-user-name { font-size: .85rem; font-weight: 500; color: var(--txt); }
.sidebar-user-role { font-size: .72rem; color: var(--txt3); }

/* Topbar admin */
.topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-title { font-family: var(--font-display); font-size: 1.35rem; color: var(--txt); }
.topbar-actions { display: flex; align-items: center; gap: .75rem; }

/* Main content */
.main-content {
  padding: 2rem;
  overflow-y: auto;
  min-height: 0;
}

/* Mobile: menu hamburguer */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  color: var(--txt);
}

/* ══════════════════════════════════════════════════════════
   BOOKING PAGE (PÚBLICA)
   ══════════════════════════════════════════════════════════ */

.booking-page {
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

/* Fundo decorativo */
.booking-page::before {
  content: '';
  position: fixed;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(212,168,83,.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.booking-header {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  position: relative;
  z-index: 1;
}
.booking-logo {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 2px solid var(--gold);
}
.booking-logo-placeholder {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 2px solid var(--gold);
  margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
}
.booking-business-name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  color: var(--txt);
  line-height: 1.1;
}
.booking-welcome-msg {
  color: var(--txt2);
  margin-top: .5rem;
  font-size: .95rem;
  max-width: 480px;
  margin-inline: auto;
}

/* Steps indicator */
.booking-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1.5rem 1.5rem .5rem;
  position: relative;
  z-index: 1;
}
.step-item {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 180px;
}
.step-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--txt3);
  background: var(--bg2);
  transition: all .3s;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.step-item.done .step-circle {
  border-color: var(--gold);
  background: var(--gold);
  color: #0a0a0f;
}
.step-item.active .step-circle {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-dim);
}
.step-label {
  font-size: .72rem;
  color: var(--txt3);
  margin-top: .3rem;
  text-align: center;
  transition: color .3s;
}
.step-item.active .step-label { color: var(--gold); }
.step-item.done  .step-label  { color: var(--txt2); }
.step-connector {
  flex: 1;
  height: 1.5px;
  background: var(--border2);
  position: relative;
  z-index: 0;
  transition: background .3s;
}
.step-connector.done { background: var(--gold); }
.step-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Booking body */
.booking-body {
  max-width: 560px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
  position: relative;
  z-index: 1;
}

/* Panel (etapa) */
.booking-panel {
  display: none;
  animation: panelIn .3s ease;
}
.booking-panel.active { display: block; }
@keyframes panelIn {
  from { opacity:0; transform:translateY(12px); }
  to   { opacity:1; transform:translateY(0); }
}
.booking-panel-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--txt);
  margin-bottom: 1.25rem;
}

/* Grade de serviços */
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.service-card {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.service-card:hover {
  border-color: var(--gold);
  background: var(--bg3);
}
.service-card.selected {
  border-color: var(--gold);
  background: var(--gold-dim);
  box-shadow: var(--shadow-gold);
}
.service-name { font-weight: 500; color: var(--txt); font-size: .95rem; }
.service-duration { font-size: .78rem; color: var(--txt3); }
.service-price { font-family: var(--font-display); color: var(--gold); font-size: 1.15rem; }

/* Grade de profissionais */
.pro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .75rem;
}
.pro-card {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem .75rem;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}
.pro-card:hover { border-color: var(--gold); background: var(--bg3); }
.pro-card.selected {
  border-color: var(--gold);
  background: var(--gold-dim);
  box-shadow: var(--shadow-gold);
}
.pro-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border2);
}
.pro-avatar-placeholder {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  border: 2px solid var(--border2);
}
.pro-card.selected .pro-avatar-placeholder { border-color: var(--gold); }
.pro-name { font-size: .88rem; font-weight: 500; color: var(--txt); }

/* Seletor de data */
.date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.date-month {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--txt);
}
.date-nav-btn {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--txt2);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--ease);
}
.date-nav-btn:hover { border-color: var(--gold); color: var(--gold); }

.date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.date-day-header {
  text-align: center;
  font-size: .7rem;
  color: var(--txt3);
  padding: .3rem 0;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.date-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  cursor: pointer;
  color: var(--txt2);
  transition: all .15s;
  border: 1.5px solid transparent;
}
.date-day:hover:not(.disabled):not(.empty) {
  background: var(--bg3);
  color: var(--txt);
  border-color: var(--border2);
}
.date-day.selected {
  background: var(--gold);
  color: #0a0a0f;
  font-weight: 600;
  border-color: var(--gold);
}
.date-day.today:not(.selected) {
  border-color: var(--gold);
  color: var(--gold);
}
.date-day.disabled { opacity: .25; cursor: not-allowed; }
.date-day.empty    { cursor: default; }

/* Slots de horário */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  margin-top: 1.25rem;
}
.slot-btn {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--txt2);
  padding: .6rem .5rem;
  font-size: .85rem;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.slot-btn:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.slot-btn.selected { background: var(--gold); color: #0a0a0f; border-color: var(--gold); font-weight: 600; }
.slot-btn.busy { background: var(--bg3); color: var(--txt3); cursor: not-allowed; opacity: .4; }

.no-slots {
  text-align: center;
  padding: 2rem;
  color: var(--txt3);
  font-size: .9rem;
}

/* Resumo do agendamento */
.booking-summary {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .9rem;
}
.summary-key { color: var(--txt3); }
.summary-val { color: var(--txt); font-weight: 500; }
.summary-price { color: var(--gold); font-family: var(--font-display); font-size: 1.25rem; }

/* ── Confirmação / Sucesso ── */
.booking-success {
  text-align: center;
  padding: 2.5rem 1rem;
}
.success-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(45,186,126,.12);
  border: 2px solid var(--success);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem;
  animation: successPop .5s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes successPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success-icon svg { color: var(--success); }
.success-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--txt);
  margin-bottom: .5rem;
}
.success-sub { color: var(--txt2); font-size: .95rem; max-width: 380px; margin: 0 auto 2rem; }
.success-details {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

/* Rodapé booking */
.booking-footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--txt3);
  font-size: .8rem;
}
.booking-footer a { color: var(--txt3); }
.booking-footer a:hover { color: var(--gold); }

/* ══════════════════════════════════════════════════════════
   PÁGINA DE LOGIN
   ══════════════════════════════════════════════════════════ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(212,168,83,.06) 0%, transparent 70%);
  pointer-events: none;
}
.login-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
}
.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.login-logo-mark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
}
.login-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: .4rem;
}
.login-sub { color: var(--txt2); font-size: .9rem; margin-bottom: 2rem; }
.login-form { display: flex; flex-direction: column; gap: 1.25rem; }
.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .82rem;
  color: var(--txt3);
}

/* ══════════════════════════════════════════════════════════
   AGENDA (visão dia / semana)
   ══════════════════════════════════════════════════════════ */

.agenda-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.agenda-date-nav {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.agenda-date-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  min-width: 160px;
  text-align: center;
}
.agenda-view-toggle {
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.agenda-view-btn {
  padding: .5rem 1rem;
  font-size: .85rem;
  background: none;
  border: none;
  color: var(--txt2);
  cursor: pointer;
  transition: all var(--ease);
}
.agenda-view-btn.active { background: var(--gold-dim); color: var(--gold); }

/* Colunas de profissional */
.agenda-grid {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.agenda-pro-header {
  background: var(--bg3);
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: .88rem;
  font-weight: 500;
}
.agenda-pro-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.agenda-time-col {
  border-right: 1px solid var(--border);
  background: var(--bg3);
}
.agenda-time-slot {
  height: 60px;
  padding: 0 .75rem;
  display: flex;
  align-items: flex-start;
  padding-top: 4px;
  font-size: .72rem;
  color: var(--txt3);
  border-bottom: 1px solid var(--border);
}
.agenda-col { position: relative; border-right: 1px solid var(--border); }
.agenda-col:last-child { border-right: none; }
.agenda-cell {
  height: 60px;
  border-bottom: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: background var(--ease);
}
.agenda-cell:hover { background: var(--bg3); }

.agenda-event {
  position: absolute;
  left: 4px; right: 4px;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: .75rem;
  overflow: hidden;
  cursor: pointer;
  transition: filter var(--ease);
  z-index: 1;
}
.agenda-event:hover { filter: brightness(1.15); }
.agenda-event-name { font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-event-svc  { color: rgba(255,255,255,.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ══════════════════════════════════════════════════════════
   PÁGINA DE ACTION (confirmar/cancelar pelo cliente)
   ══════════════════════════════════════════════════════════ */

.action-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.action-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════
   PÁGINA 404 / SUSPENDED
   ══════════════════════════════════════════════════════════ */

.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.error-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 20vw, 9rem);
  color: var(--gold);
  opacity: .15;
  line-height: 1;
}
.error-msg { font-size: 1.1rem; color: var(--txt2); margin-top: .5rem; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVO MOBILE
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Sidebar vira drawer */
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .sidebar {
    position: fixed;
    left: -260px;
    top: 0; bottom: 0;
    width: 260px;
    z-index: 500;
    transition: left .3s ease;
    height: 100%;
    border-right: 1px solid var(--border2);
  }
  .sidebar.open { left: 0; }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 499;
  }
  .sidebar.open ~ .sidebar-overlay { display: block; }

  .menu-toggle { display: flex; }

  .topbar { padding: .85rem 1rem; }
  .topbar-title { font-size: 1.1rem; }

  .main-content { padding: 1.25rem 1rem; }

  /* Booking */
  .service-grid { grid-template-columns: 1fr; }
  .slot-grid { grid-template-columns: repeat(3, 1fr); }
  .pro-grid { grid-template-columns: repeat(3, 1fr); }

  .booking-header { padding: 2rem 1rem 1.5rem; }
  .booking-body   { padding: 1rem 1rem 3rem; }

  /* Agenda */
  .agenda-header { gap: .75rem; }
  .agenda-date-title { font-size: .95rem; min-width: 120px; }

  /* Modal */
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: 100%;
    max-height: 85vh;
  }

  /* Tabelas: scroll horizontal */
  .table-wrap { -webkit-overflow-scrolling: touch; }

  /* Steps simplificados */
  .step-label { display: none; }
  .booking-steps { gap: 0; padding: 1rem 1rem .5rem; }

  /* Login */
  .login-card { padding: 2rem 1.25rem; }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 400px) {
  .slot-grid { grid-template-columns: repeat(3, 1fr); }
  .pro-grid  { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr !important; }
}

/* ══════════════════════════════════════════════════════════
   UTILITÁRIOS
   ══════════════════════════════════════════════════════════ */

.d-flex    { display: flex; }
.d-grid    { display: grid; }
.d-none    { display: none !important; }
.d-block   { display: block; }

.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1  { gap: .5rem; }
.gap-2  { gap: 1rem; }
.gap-3  { gap: 1.5rem; }

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm     { font-size: .85rem; }
.text-xs     { font-size: .75rem; }
.text-muted  { color: var(--txt3); }
.text-gold   { color: var(--gold); }
.text-success{ color: var(--success); }
.text-danger { color: var(--danger); }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.font-display { font-family: var(--font-display); }

.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.w-full  { width: 100%; }
.rounded { border-radius: var(--radius); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}