:root {
  --ag-bg: #0a0a0a;
  --ag-surface: #161616;
  --ag-border: #2a2a2a;
  --ag-text: #f5f5f5;
  --ag-muted: #9a9a9a;
  --ag-primary: #ffffff;
  --ag-primary-text: #111111;
}

* {
  box-sizing: border-box;
}

body.agendamento-page {
  margin: 0;
  min-height: 100vh;
  background: var(--ag-bg);
  color: var(--ag-text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.agendamento-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.agendamento-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.agendamento-header-link {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: .875rem;
  white-space: nowrap;
}

.agendamento-header-link:hover {
  color: #fff;
}

.agendamento-logo {
  max-width: 180px;
  height: auto;
}

.ag-btn-secondary {
  background: transparent;
  color: var(--ag-primary-text, #fff);
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: .85rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.ag-btn-secondary:hover {
  border-color: rgba(255,255,255,.7);
  color: #fff;
}

.ag-alert--warning {
  background: #3a321f;
  border-color: #6b5a2f;
  color: #ffd580;
}

.agendamento-main {
  flex: 1;
  padding: 0 1rem 2rem;
}

@media (min-width: 576px) {
  .agendamento-main {
    padding: 0 1.5rem 2rem;
  }
}

.agendamento-footer {
  text-align: center;
  padding: 1rem;
  color: var(--ag-muted);
  font-size: .85rem;
}

.agendamento-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 992px) {
  .agendamento-layout {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }

  .agendamento-resumo.d-none {
    display: block !important;
  }
}

.agendamento-resumo {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: 1rem;
  padding: 1.25rem;
  position: sticky;
  top: 1rem;
}

.ag-resumo-handle {
  font-size: .85rem;
  color: var(--ag-muted);
  margin-bottom: 1rem;
}

.ag-resumo-titulo {
  font-size: 1.25rem;
  margin: 0 0 .5rem;
}

.ag-resumo-meta {
  color: var(--ag-muted);
  margin: 0;
}

.ag-step-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.ag-step-header h1 {
  font-size: 1.35rem;
  margin: 0;
}

@media (min-width: 576px) {
  .ag-step-header h1 {
    font-size: 1.75rem;
  }
}

.ag-btn-voltar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--ag-border);
  background: transparent;
  color: var(--ag-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ag-filtros {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.ag-chip {
  border: 1px solid var(--ag-border);
  background: transparent;
  color: var(--ag-text);
  border-radius: 999px;
  padding: .45rem 1rem;
  cursor: pointer;
  font-size: .9rem;
}

.ag-chip.is-active {
  background: var(--ag-primary);
  color: var(--ag-primary-text);
  border-color: var(--ag-primary);
}

.ag-servicos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 480px) {
  .ag-servicos-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

.ag-servico-card {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s;
}

.ag-servico-card:hover {
  border-color: #555;
}

.ag-servico-thumb {
  aspect-ratio: 4/3;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 2rem;
}

.ag-servico-body {
  padding: 1rem;
}

.ag-servico-body h3 {
  margin: 0 0 .35rem;
  font-size: 1rem;
}

.ag-servico-body p {
  margin: 0;
  color: var(--ag-muted);
  font-size: .9rem;
}

.ag-lista {
  display: grid;
  gap: .75rem;
}

.ag-item-btn {
  width: 100%;
  text-align: left;
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: .85rem;
  color: var(--ag-text);
  padding: 1rem 1.1rem;
  cursor: pointer;
}

.ag-item-btn:hover {
  border-color: #555;
}

.ag-calendario-nav {
  margin-bottom: 1rem;
  color: var(--ag-muted);
}

.agendamento-conteudo {
  min-width: 0;
  overflow-x: hidden;
}

.ag-datas-scroll {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: .5rem;
  margin-bottom: 1.25rem;
  scrollbar-width: none;
}

.ag-datas-scroll::-webkit-scrollbar {
  display: none;
}

.ag-data-btn {
  min-width: 3.5rem;
  border-radius: 999px;
  border: 1px solid var(--ag-border);
  background: transparent;
  color: var(--ag-text);
  padding: .65rem .5rem;
  cursor: pointer;
  text-align: center;
  flex-shrink: 0;
}

.ag-data-btn .dia-num {
  display: block;
  font-weight: 700;
  font-size: 1rem;
}

.ag-data-btn .dia-nome {
  display: block;
  font-size: .7rem;
  text-transform: uppercase;
  color: var(--ag-muted);
}

.ag-data-btn.is-active {
  background: var(--ag-primary);
  color: var(--ag-primary-text);
  border-color: var(--ag-primary);
}

.ag-data-btn.is-active .dia-nome {
  color: var(--ag-primary-text);
}

.ag-horarios-lista {
  display: grid;
  gap: .65rem;
  margin-bottom: 1rem;
}

.ag-horario-btn {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: .85rem;
  color: var(--ag-text);
  padding: .9rem 1rem;
  cursor: pointer;
  text-align: left;
}

.ag-horario-btn.is-active {
  border-color: var(--ag-primary);
}

.ag-horario-radio {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid var(--ag-border);
}

.ag-horario-btn.is-active .ag-horario-radio {
  border-color: var(--ag-primary);
  background: radial-gradient(circle, var(--ag-primary) 45%, transparent 50%);
}

.ag-resumo-box {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: .85rem;
  padding: .85rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.ag-resumo-box-icon {
  font-size: 1.5rem;
}

.ag-resumo-box-text {
  flex: 1;
}

.ag-link {
  background: none;
  border: none;
  color: var(--ag-muted);
  text-decoration: underline;
  cursor: pointer;
}

.ag-label {
  display: block;
  margin-bottom: .35rem;
  font-size: .9rem;
}

.ag-input {
  width: 100%;
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: .65rem;
  color: var(--ag-text);
  padding: .75rem .9rem;
}

.ag-input:focus {
  outline: none;
  border-color: #666;
}

.ag-hint {
  display: block;
  margin-top: .25rem;
  color: var(--ag-muted);
  font-size: .8rem;
}

.ag-cpf-salvo {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .4rem;
}

.ag-cpf-salvo .ag-hint {
  margin: 0;
}

.ag-aluno-info {
  background: var(--ag-surface);
  border: 1px solid var(--ag-border);
  border-radius: .85rem;
  padding: .85rem 1rem;
}

.ag-aluno-nome {
  font-weight: 600;
  color: var(--ag-text);
}

.ag-aluno-contratos {
  margin-top: .35rem;
  font-size: .875rem;
  color: var(--ag-muted);
}

.ag-input--readonly {
  cursor: default;
}

.ag-link--sm {
  font-size: .8rem;
  padding: 0;
}

.ag-link--spaced {
  margin-top: .4rem;
}

.ag-btn-primary {
  background: var(--ag-primary);
  color: var(--ag-primary-text);
  border: none;
  border-radius: 999px;
  padding: .85rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.ag-btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.ag-alert {
  background: #3a1f1f;
  border: 1px solid #6b2f2f;
  color: #ffb4b4;
  border-radius: .65rem;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
}

.ag-alert.is-success {
  background: #1f3a2a;
  border-color: #2f6b45;
  color: #b4ffcf;
}

.ag-sucesso {
  text-align: center;
  padding: 2.5rem 1rem;
}

.ag-sucesso h2 {
  font-size: 1.35rem;
  margin: .75rem 0 .5rem;
}

@media (min-width: 576px) {
  .ag-sucesso h2 {
    font-size: 1.75rem;
  }
}

.ag-sucesso i {
  font-size: 3rem;
  color: #4ade80;
}

.d-none {
  display: none !important;
}

.w-100 {
  width: 100%;
}

.text-secondary {
  color: var(--ag-muted);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -.5rem;
}

.col-md-6 {
  width: 100%;
  padding: 0 .5rem;
}

@media (min-width: 768px) {
  .col-md-6 {
    width: 50%;
  }
}

.g-3 > * {
  margin-bottom: 0;
}

.mt-3 {
  margin-top: 1rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

/* ── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 575px) {
  .agendamento-header {
    padding: 1rem;
  }

  .agendamento-logo {
    max-width: 140px;
  }

  .agendamento-header-link {
    font-size: .8rem;
  }

  .ag-form .row {
    flex-direction: column;
  }

  .ag-form .col-md-6 {
    width: 100%;
    padding: 0;
  }

  .ag-btn-primary,
  .ag-btn-secondary {
    width: 100%;
    padding: .85rem 1rem;
  }

  .ag-sucesso > div {
    flex-direction: column;
  }

  .ag-data-btn {
    min-width: 3rem;
    padding: .5rem .35rem;
  }

  .ag-data-btn .dia-num {
    font-size: .9rem;
  }

  .ag-horario-btn {
    padding: .75rem .85rem;
  }
}

.agendamento-layout--single .agendamento-conteudo {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}
