/* =========================================================
   Agendar Quadra — estilos
   Mobile-first. Breakpoints: 768px (tablet/desktop) e 1100px
   ========================================================= */

/* ---------- 1. Variáveis ---------- z*/
:root {
  --bg: #0a0a0a;
  --card: #1a1a1a;
  --card-2: #242424;
  --btn-2: #2a2a2a;
  --orange: #ff7a00;
  --orange-soft: #ffb066;
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --line: rgba(255, 255, 255, .1);
  --t70: rgba(255, 255, 255, .7);
  --t60: rgba(255, 255, 255, .6);
  --t50: rgba(255, 255, 255, .5);
  --t35: rgba(255, 255, 255, .35);
  --radius: 16px;
  --radius-lg: 24px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; font-size: 16px; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 0; height: 0; }

.container { width: 100%; max-width: 480px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px)  { .container { max-width: 720px; padding-inline: 24px; } }
@media (min-width: 1100px) { .container { max-width: 900px; } }

/* ---------- 3. Cabeçalho e rodapé fixos ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(0, 0, 0, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.topbar__in { height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 800; font-size: 18px; letter-spacing: -.025em; }

.footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(0, 0, 0, .95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.footer__in { display: flex; gap: 12px; padding-block: 16px; }
#app { padding-bottom: 176px; min-height: calc(100vh - 56px); }

/* ---------- 4. Botões ---------- */
.chip {
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; transition: transform .15s;
}
.btn {
  min-height: 56px; padding: 0 20px; border-radius: var(--radius);
  font-weight: 700; font-size: 18px; transition: transform .15s, opacity .15s;
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
}
.btn--grow { flex: 2; }
.btn--ghost { background: var(--card); flex: 1; }
.btn--primary { background: var(--orange); color: #000; font-weight: 800; }
.btn--secondary { background: var(--btn-2); }
.btn--green { background: var(--green); color: #fff; font-weight: 800; }
.btn--text { color: var(--t60); font-weight: 600; font-size: 16px; min-height: 52px; }
.btn--sm { min-height: 52px; font-size: 16px; }
.btn:disabled { opacity: .3; }
.btn:active:not(:disabled), .chip:active, .opt:active:not(:disabled) { transform: scale(.97); }

/* ---------- 5. Cabeçalho da etapa ---------- */
.head { padding-block: 20px 16px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--orange); margin-bottom: 4px; }
.title { font-size: 24px; font-weight: 800; letter-spacing: -.025em; margin-bottom: 12px; }
.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress__bar { height: 100%; background: var(--orange); border-radius: 999px; transition: width .3s; }
@media (min-width: 768px) { .title { font-size: 30px; } }

.hint { font-size: 14px; color: var(--t50); margin-top: 4px; }
.muted { font-size: 14px; color: var(--t60); }
.strong { display: block; font-size: 18px; font-weight: 700; }
.banner { border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 12px; }
.banner--warn { background: rgba(245, 158, 11, .15); border: 1px solid rgba(245, 158, 11, .4); color: #fbbf24; }
.banner--err  { background: rgba(239, 68, 68, .1);  border: 1px solid rgba(239, 68, 68, .5);  color: #fca5a5; }

/* ---------- 6. Grades ---------- */
.grid { display: grid; gap: 12px; }
.grid--units, .grid--courts { grid-template-columns: 1fr; }
.grid--dates, .grid--hours { grid-template-columns: repeat(3, 1fr); }
.grid--dur { grid-template-columns: repeat(2, 1fr); }
.stack { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 768px) {
  .grid--units, .grid--courts { grid-template-columns: repeat(2, 1fr); }
  .grid--dates, .grid--hours { grid-template-columns: repeat(5, 1fr); }
  .grid--dur { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 7. Cartões e opções ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; }
.card--big { border-radius: var(--radius-lg); padding: 20px; }
.card--accent { border: 1px solid rgba(255, 122, 0, .4); }
.center { text-align: center; }

.unit { padding: 0; border: 2px solid transparent; transition: border-color .15s; }
.unit.is-sel { border-color: var(--orange); }
.unit__btn { width: 100%; display: flex; align-items: center; gap: 16px; padding: 16px 16px 4px; text-align: left; }
.unit__addr { display: block; padding: 2px 16px 16px 76px; font-size: 12px; text-decoration: underline; color: var(--orange-soft); }
.unit__addr:hover { color: var(--orange); }
.grow { flex: 1; }
.check { color: var(--orange); font-size: 24px; }

.opt {
  min-height: 60px; border-radius: var(--radius);
  background: var(--card); border: 2px solid transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-weight: 700; transition: transform .15s, border-color .15s;
}
.opt--row { flex-direction: row; justify-content: flex-start; gap: 16px; min-height: 68px; padding: 16px; text-align: left; width: 100%; }
.opt--row .check { margin-left: auto; }
.opt.is-sel { background: var(--orange); border-color: var(--orange); color: #000; }
.opt--row.is-sel { background: var(--card); color: #fff; border-color: var(--orange); }
.opt:disabled { background: var(--card-2); color: var(--t35); }
.opt small { font-size: 12px; font-weight: 600; opacity: .7; }
.opt .big { font-size: 18px; font-weight: 800; }
.opt--date { min-height: 68px; }
.opt--dur { min-height: 72px; }
.opt--dur .big { font-size: 20px; }

/* ---------- 8. Formulários ---------- */
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--t70); margin-bottom: 8px; }
.input {
  width: 100%; min-height: 56px; padding: 0 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  outline: none; transition: border-color .15s;
}
.input::placeholder { color: rgba(255, 255, 255, .3); }
.input:focus { border-color: var(--orange); }
.input--pass { letter-spacing: .15em; }
select.input { min-height: 48px; background: var(--card-2); border-radius: 12px; padding: 0 12px; }

/* ---------- 9. Resumo / pagamento / comprovante ---------- */
.summary { font-size: 14px; color: var(--t70); }
.summary b { color: #fff; display: block; margin-bottom: 4px; }
.accent { color: var(--orange); font-weight: 700; }
.total { font-size: 36px; font-weight: 800; color: var(--orange); }
.pix { font-size: 20px; font-weight: 800; letter-spacing: .025em; margin-block: 8px 12px; }
.eyebrow-lg { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--orange); margin-bottom: 12px; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; justify-content: space-between; gap: 12px; }
.row span:first-child { color: rgba(255, 255, 255, .55); }
.row span:last-child { font-weight: 700; text-align: right; }
.row--total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.row--total span:last-child { color: var(--orange); font-size: 20px; font-weight: 800; }
.party { font-size: 60px; text-align: center; }
.done h2 { font-size: 24px; font-weight: 800; text-align: center; }
.done p.sub { text-align: center; color: var(--t60); margin-top: 4px; }
@media (min-width: 768px) { .done, .pay { max-width: 520px; margin-inline: auto; } }

/* ---------- 10. Painel admin ---------- */
.admin { padding-block: 20px 16px; }
.admin h1 { font-size: 24px; font-weight: 800; letter-spacing: -.025em; margin-bottom: 4px; }
.admin .sub { font-size: 14px; color: var(--t50); margin-bottom: 16px; }
.login { max-width: 420px; }
.errtxt { font-size: 14px; color: #f87171; }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; }
.tab { min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--card); color: var(--t70); font-size: 14px; font-weight: 700; white-space: nowrap; }
.tab.is-sel { background: var(--orange); color: #000; }
.toolbar { display: grid; gap: 12px; margin-bottom: 12px; }
.linkbtn { color: var(--orange); font-size: 14px; font-weight: 600; text-align: left; }
.list { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .list { grid-template-columns: repeat(2, 1fr); } }
.res__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.res__name { font-size: 18px; font-weight: 800; word-break: break-word; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: rgba(255, 122, 0, .15); color: var(--orange); }
.label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .025em; color: var(--t50); }
.block { margin-top: 12px; }
.label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.saved { font-size: 12px; color: #4ade80; font-weight: 600; }
.pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pill { min-height: 44px; padding: 0 8px; border-radius: 12px; border: 1px solid transparent; background: var(--card-2); color: rgba(255, 255, 255, .55); font-size: 14px; font-weight: 700; }
.pill--pago    { background: rgba(34, 197, 94, .15);  color: #4ade80; border-color: rgba(34, 197, 94, .4); }
.pill--parcial { background: rgba(245, 158, 11, .15); color: #fbbf24; border-color: rgba(245, 158, 11, .4); }
.pill--nao_pago{ background: rgba(239, 68, 68, .15);  color: #f87171; border-color: rgba(239, 68, 68, .4); }
.btn-del { width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid rgba(239, 68, 68, .5); color: #f87171; font-weight: 700; }
.confirm { border-radius: 12px; background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .4); padding: 12px; }
.confirm p { font-size: 14px; font-weight: 600; color: #fca5a5; margin-bottom: 12px; }
.confirm__btns { display: flex; gap: 8px; }
.confirm__btns button { flex: 1; min-height: 48px; border-radius: 12px; font-weight: 700; }
.confirm__btns .no { background: var(--btn-2); }
.confirm__btns .yes { background: #dc2626; font-weight: 800; }
.confirm__btns button:disabled { opacity: .4; }
.empty { color: var(--t35); text-align: center; padding-block: 32px; grid-column: 1 / -1; }

/* ---------- 11. Utilitários (sem estilos inline por causa da CSP) ---------- */
.fw6 { font-weight: 600; }
.lh { line-height: 1.6; }
.white { color: #fff; }
.mb6 { margin-bottom: 6px; }
.mb12 { margin-bottom: 12px; }
.mt24 { margin-top: 24px; }
