/* ======================================================================
   PADLE CLUB — app.css (LIMPO)
   Objetivo: 1 ficheiro CSS por app, organizado por zonas.
   Regras:
   - Não “patchar no fim” sem apagar a zona antiga
   - Cada zona começa e acaba com comentários claros
   ====================================================================== */


/* ============================== ZONA: THEME (INÍCIO) ============================== */
:root{
  --bg:#f6f8fc;
  --panel:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --line:rgba(15,23,42,.08);

  --brand:#2563eb;
  --brand2:#6366f1;

  --success:#16a34a;
  --warning:#f59e0b;
  --danger:#ef4444;

  --radius:16px;
  --shadow:0 10px 24px rgba(2,6,23,.08);

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}
/* =============================== ZONA: THEME (FIM) =============================== */


/* ============================== ZONA: RESET (INÍCIO) ============================= */
*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(1100px 700px at 10% -10%, rgba(110,231,255,.14), transparent 55%),
    radial-gradient(900px 600px at 90% 0%, rgba(124,92,255,.12), transparent 52%),
    var(--bg);
}

a{ color:inherit; text-decoration:none; }
small{ color:var(--muted); }
/* =============================== ZONA: RESET (FIM) =============================== */


/* ============================ ZONA: UTILITÁRIOS (INÍCIO) ========================= */
.hr{ height:1px; background:var(--line); margin:14px 0; }
.hr-spaced{ margin-top:20px; }
.hr-top-gap{ margin-top:18px; }
.modal-top-grid{ margin-bottom:10px; }

.wrap{ max-width:1400px; margin:0 auto; }
.content{ padding:18px; }

.muted{ color:var(--muted); }
.fw-900{ font-weight:900; }
.section-title{ font-weight:950; font-size:16px; }
.help{ color:var(--muted); font-weight:750; font-size:12px; margin-top:2px; }
/* ============================= ZONA: UTILITÁRIOS (FIM) =========================== */


/* ============================= ZONA: CARD (INÍCIO) =============================== */
.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.card .card-h{ padding:18px 18px 10px; }
.card .card-b{ padding:0 18px 18px; }
/* ============================== ZONA: CARD (FIM) ================================= */


/* ============================= ZONA: BADGES (INÍCIO) ============================= */
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background:rgba(2,6,23,.02);
  color:var(--muted);
  font-weight:850;
  font-size:12px;
}

.badge-ok{
  background:rgba(34,197,94,.12);
  border-color:rgba(34,197,94,.25);
  color:#0f3d22;
}

.badge-warn{
  background:rgba(245,158,11,.14);
  border-color:rgba(245,158,11,.28);
  color:#4a2a06;
}
.badge-event{
  background:rgba(14,116,144,.14);
  border-color:rgba(14,116,144,.28);
  color:#0b3a46;
}
.badge-pack{
  background:rgba(37,99,235,.14);
  border-color:rgba(37,99,235,.35);
  color:#1e3a8a;
}
/* ========================= ZONA: SLOT TYPE PICKER (INÍCIO) ========================= */
.slot-type-picker{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
  margin-top:6px;
  margin-bottom:12px;
}
.slot-type-option{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  padding:10px 8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(2,6,23,.04);
  font-weight:900;
  color:var(--muted);
}
.slot-type-option img{
  width:72px;
  height:72px;
  object-fit:contain;
}
.slot-type-option.active{
  border-color:rgba(37,99,235,.4);
  box-shadow:0 8px 18px rgba(37,99,235,.18);
  color:#1e3a8a;
  background:#fff;
  outline:2px solid rgba(37,99,235,.5);
  outline-offset:2px;
}
.slot-type-picker.locked .slot-type-option{
  opacity:.65;
  cursor:default;
}
/* ========================== ZONA: SLOT TYPE PICKER (FIM) ========================== */
/* ============================== ZONA: BADGES (FIM) =============================== */


/* ============================ ZONA: FORMS (INÍCIO) =============================== */
.input, .select{
  width:100%;
  background:#fff;
  border:1px solid rgba(15,23,42,.12);
  color:var(--text);
  padding:12px 12px;
  border-radius:14px;
  outline:none;
}

.input:focus, .select:focus{
  border-color: rgba(37,99,235,.35);
  box-shadow: 0 0 0 4px rgba(37,99,235,.10);
}
/* ============================= ZONA: FORMS (FIM) ================================= */


/* ============================ ZONA: BUTTONS (INÍCIO) ============================= */
/* Fix: hover não estraga leitura do texto (overlay ::before). */
.btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  padding:12px 14px;
  border-radius:14px;
  font-weight:900;

  background:#fff;
  border:1px solid rgba(15,23,42,.14);

  /* garante texto legível */
  color: var(--text) !important;
  opacity: 1 !important;
  filter: none !important;

  cursor:pointer;
  user-select:none;
  overflow:hidden;

  transition: border-color .15s ease, box-shadow .15s ease;
}

/* overlay do hover atrás do texto */
.btn::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(2,6,23,.08);
  opacity:0;
  transition: opacity .15s ease;
  pointer-events:none;
}

/* hover “normal” */
.btn:hover::before{ opacity:1; }
.btn:hover{
  border-color: rgba(15,23,42,.22);
  box-shadow: 0 10px 22px rgba(2,6,23,.10);
}

/* tamanhos */
.btn-sm{
  padding:9px 12px;
  border-radius:12px;
  font-weight:850;
}
.btn-inline{
  white-space: nowrap;
}

/* variantes */
.btn-primary{
  border:none;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color:#fff !important;
  box-shadow: 0 10px 22px rgba(37,99,235,.18);
}
.btn-primary::before{ background: rgba(255,255,255,.16); }
.btn-primary:hover{ box-shadow: 0 12px 24px rgba(37,99,235,.22); }

.btn-outline{
  background:#fff;
  border:1px solid rgba(37,99,235,.42);
  color:#1d4ed8 !important;
}
.btn-outline::before{ background: rgba(37,99,235,.14); }

.btn-ghost{
  background:transparent;
  border-color:transparent;
  color: var(--text) !important;
}
.btn-ghost::before{ background: rgba(2,6,23,.08); }
.btn-ghost:hover{ border-color: rgba(15,23,42,.10); }

/* ações coloridas */
.btn-green{
  border:none;
  background: linear-gradient(135deg, var(--success), #22c55e);
  color:#fff !important;
  box-shadow: 0 10px 22px rgba(34,197,94,.16);
}
.btn-green::before{ background: rgba(255,255,255,.16); }

.btn-orange{
  border:none;
  background: linear-gradient(135deg, var(--warning), #f97316);
  color:#fff !important;
  box-shadow: 0 10px 22px rgba(245,158,11,.16);
}
.btn-orange::before{ background: rgba(255,255,255,.16); }

.btn-red{
  border:none;
  background: linear-gradient(135deg, var(--danger), #f97316);
  color:#fff !important;
  box-shadow: 0 10px 22px rgba(239,68,68,.14);
}
.btn-red::before{ background: rgba(255,255,255,.16); }

/* disabled — nunca muda com hover e mantém legibilidade */
.btn:disabled,
.btn[disabled],
.btn.disabled,
.btn[aria-disabled="true"]{
  pointer-events:none;
  cursor:not-allowed;

  background:#e5e7eb !important;
  border-color:#cbd5e1 !important;
  color:#111827 !important;

  box-shadow:none !important;
}

.btn:disabled::before,
.btn[disabled]::before,
.btn.disabled::before,
.btn[aria-disabled="true"]::before{
  opacity:0 !important;
}
/* ============================= ZONA: BUTTONS (FIM) =============================== */


/* ============================= ZONA: LAYOUT (INÍCIO) ============================= */
.app{
  display:grid;
  grid-template-columns: 270px 1fr;
  min-height:100vh;
}

.sidebar{
  position:sticky;
  top:0;
  align-self:start;
  height:100vh;

  padding:18px;
  border-right:1px solid var(--line);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border-radius:14px;
}
.brand-logo{
  width:210px;
  height:auto;
  object-fit:contain;
}
.brand .dot{
  width:36px; height:36px;
  border-radius:12px;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
}

.nav{
  margin-top:14px;
  display:grid;
  gap:8px;
}
.nav a{
  padding:12px 12px;
  border-radius:14px;
  color:var(--muted);
  border:1px solid transparent;
  font-weight:800;
}
.nav a:hover{
  background:rgba(2,6,23,.04);
  color:var(--text);
}
.nav a.active{
  background: rgba(37,99,235,.10);
  border-color: rgba(37,99,235,.18);
  color: var(--text);
  font-weight:950;
}

.main{ display:flex; flex-direction:column; }

.topbar{
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
}
.topbar .row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.topbar .meta{
  color:var(--muted);
  font-weight:750;
}
/* ============================== ZONA: LAYOUT (FIM) =============================== */


/* =========================== ZONA: TOOLBAR/GRIDS (INÍCIO) ======================== */
.toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-bottom:14px;
}
.toolbar .left, .toolbar .right{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

/* calendário: mais respiro no topo */
.calendar-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:6px 4px 10px;
  margin-bottom:14px;
}
.calendar-toolbar .left,
.calendar-toolbar .right{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.date-nav{
  display:flex;
  align-items:center;
  gap:8px;
}
.date-field{
  position:relative;
  width:auto;
}
.date-field .input{
  width:auto;
}
.date-display{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  width:auto;
  white-space:nowrap;
  box-sizing:content-box;
}
.date-input{
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
}
.calendar-title{
  font-size:18px;
  font-weight:950;
  letter-spacing:.2px;
}

.grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  align-items:stretch;
  margin-top:14px;
}
.equal-cards > .card{
  display:flex;
  flex-direction:column;
  height:100%;
  align-self:stretch;
}
.equal-cards > .card .card-b{
  flex:1;
}
.club-data-card .form-grid{ gap:8px; }
.club-data-card .input,
.club-data-card .select{ padding:10px 4px 10px 12px; }
.club-data-card .input,
.club-data-card .select{
  padding:12px 8px;
  border-radius:14px;
}
.card-compact .card-h{ padding:14px 16px 6px; }
.card-compact .card-b{ padding:8px 16px 16px; }
.card-wide{ margin-top:14px; }
.match-height{ height:100%; }
.grid-3{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:14px;
  margin-top:14px;
}
.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
@media (max-width:980px){
  .grid-2,.grid-3,.form-grid{ grid-template-columns:1fr; }
}

.kpis{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}
@media (max-width:720px){
  .kpis{ grid-template-columns:1fr; }
}
.kpi{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background:#fff;
}
.kpi .n{ font-weight:950; font-size:20px; }
.kpi .l{ color:var(--muted); font-weight:800; font-size:12px; }

.item{
  border:1px solid var(--line);
  background:#fff;
  border-radius:14px;
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
/* ============================ ZONA: TOOLBAR/GRIDS (FIM) ========================== */


/* ============================= ZONA: TABLE (INÍCIO) ============================== */
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:#fff;
}
.table th,.table td{
  padding:12px;
  border-bottom:1px solid rgba(15,23,42,.06);
  font-size:14px;
}
.table th{
  background:rgba(2,6,23,.02);
  color:var(--muted);
  font-weight:950;
  text-align:left;
}
.table tr:last-child td{ border-bottom:none; }
.table-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.table-actions.tight{ gap:10px; }
.fields-head .table-actions,
.table-actions.tight{
  flex-wrap:nowrap;
}

/* ajustes só para os cartões Campos e Staff */
.fields-head, .staff-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:2px;
}
.fields-head .help, .staff-head .help{ margin-top:0; }
.staff-actions{ display:flex; gap:10px; flex-wrap:nowrap; }

.page-error{
  margin-top:12px;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(239,68,68,.10);
  border:1px solid rgba(239,68,68,.25);
  color:#7f1d1d;
  font-weight:800;
}
.page-error.success{
  background:rgba(34,197,94,.12);
  border-color:rgba(34,197,94,.25);
  color:#14532d;
}
/* ============================ ZONA: PAGINATION (INÍCIO) =========================== */
.pagination{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.pagination .btn{ min-width:34px; }
/* ============================= ZONA: PAGINATION (FIM) ============================ */
/* ============================== ZONA: TABLE (FIM) ================================ */


/* ============================== ZONA: TABS (INÍCIO) ============================== */
.tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:6px 0 14px;
}
.tab-btn{
  padding:8px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--muted);
  font-weight:900;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(2,6,23,.04);
}
.tab-btn.active{
  background:rgba(37,99,235,.12);
  border-color:rgba(37,99,235,.35);
  color:#1e3a8a;
}
.tab-panel{ display:none; }
.tab-panel.active{ display:block; }
/* =============================== ZONA: TABS (FIM) =============================== */


/* ============================ ZONA: PACK SUMMARY (INÍCIO) ============================ */
.pack-summary{
  border:1px solid var(--line);
  background:rgba(15,23,42,.02);
  border-radius:14px;
  padding:10px 12px;
}
.pack-summary-item{
  padding:10px 4px;
  border-bottom:1px solid rgba(15,23,42,.08);
}
.pack-summary-item:last-child{ border-bottom:none; }
.pack-summary-title{
  font-weight:900;
  margin-bottom:6px;
}
.pack-summary-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:6px;
}
.pack-remove{
  white-space:nowrap;
}
.pack-summary-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px 12px;
  font-size:13px;
  color:var(--muted);
}
.pack-summary-grid span{
  color:var(--text);
  font-weight:800;
  margin-right:4px;
}
/* ============================= ZONA: PACK SUMMARY (FIM) ============================= */


/* ============================= ZONA: MODAL (INÍCIO) ============================== */
.modal{
  position:fixed;
  inset:0;
  width:100vw;
  height:100vh;

  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;

  background: rgba(15,23,42,.45);
  z-index:9999;
}
.modal.open{ display:flex; }

.modal .box{
  width:min(560px,100%);
  background:rgba(255,255,255,.98);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  max-height:calc(100vh - 36px);
  overflow:hidden;
}
.modal .box.modal-large{
  width:min(860px,100%);
}
.modal .box-h{
  padding:16px 16px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid rgba(15,23,42,.06);
}
#slotModal .box-b{ padding:10px 16px 16px; }
.modal .box-b{
  padding:0 16px 16px;
  overflow-y:auto;
  flex:1 1 auto;
  min-height:0;
}
.modal .x{
  border:none;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  font-size:18px;
}
.modal .x:hover{ color:var(--text); }
.modal-title-row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.modal-title{ font-weight:950; font-size:16px; }
.modal-sub{ color:var(--muted); font-weight:750; font-size:12px; margin-top:2px; }
#confirmModal .modal-title{ font-size:18px; }
#confirmModal .modal-sub{ font-size:14px; }
#confirmModal .box-h{ border-bottom:none; }

.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.kv{
  padding:12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(2,6,23,.02);
}
.kv .k{ color:var(--muted); font-weight:750; font-size:12px; }
.kv .v{ font-weight:900; margin-top:6px; }
/* ============================== ZONA: MODAL (FIM) ================================ */


/* ============================ ZONA: CALENDÁRIO (INÍCIO) ========================== */
.calendar-board{ overflow:auto; border-radius:var(--radius); }
.calendar-grid{
  display:grid;
  grid-auto-rows:44px;
  min-width:980px;

  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  user-select:none;
}

/* header sticky */
.cg-head{
  position:sticky;
  top:0;
  z-index:20;
  background:#fff;
  border-bottom:1px solid rgba(15,23,42,.06);
}

/* coluna hora sticky */
.cg-time{
  position:sticky;
  left:0;
  z-index:15;

  background:#fff;
  border-right:1px solid rgba(15,23,42,.06);
  color:var(--muted);
  font-weight:950;

  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 8px;
  font-size:13px;
  text-align:center;
}
.cg-time-range{
  font-weight:950;
  letter-spacing:.1px;
  display:inline-flex;
  align-items:center;
  gap:4px;
  line-height:1.1;
}
.cg-time.cg-head{ z-index:30; }
.calendar-grid.slot-30 .cg-time-range{
  flex-direction:column;
  gap:2px;
}
.calendar-grid.slot-30 .cg-time-sep{
  display:none;
}

.cg-field{
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:950;
  border-right:1px solid rgba(15,23,42,.06);
}

.cg-cell{
  border-right:1px solid rgba(15,23,42,.05);
  border-bottom:1px solid rgba(15,23,42,.05);
  background:#fff;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:0 10px;

  cursor:pointer;
}
.cg-left{ display:flex; align-items:center; min-width:0; }
.cg-right{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
}
.slot-name{
  font-size:14px;
}
.player-row{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px;
}
.player-row.pack-row{
  grid-template-columns: 1.2fr 0.8fr 1.5fr 0.8fr 0.8fr;
}
.pack-meta{
  font-size:12px;
  margin-top:4px;
}
.players-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.students-select{
  display:flex;
  flex-direction:column;
  min-width:140px;
}
.torneio-reserva-row{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap:12px;
  align-items:end;
}
.team-card{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  display:grid;
  gap:10px;
}
.team-header{
  font-weight:900;
}
.team-player{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.team-pay{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.toggle-inline{
  display:flex;
  align-items:center;
  gap:8px;
}
@media (max-width:720px){
  .player-row{
    grid-template-columns: 1fr;
  }
  .players-header{
    flex-direction:column;
    align-items:flex-start;
  }
  .students-select{
    width:100%;
  }
  .torneio-reserva-row,
  .team-player,
  .team-pay{
    grid-template-columns: 1fr;
  }
}
.cg-cell.booked, .cg-cell.booked *{ user-select:none; }
.cg-cell:hover{ background:rgba(37,99,235,.08); }
.cg-cell.free{ color:var(--muted); font-weight:850; }
.cg-cell.booked{
  background:linear-gradient(135deg, rgba(37,99,235,.14), rgba(99,102,241,.10));
  font-weight:950;
  cursor:grab;
}
.cg-cell.booked.slot-continue{
  border-bottom-color: transparent;
}
.cg-cell.booked.status-confirmed{
  background:linear-gradient(135deg, rgba(34,197,94,.14), rgba(34,197,94,.08));
}
.cg-cell.booked.status-pending{
  background:linear-gradient(135deg, rgba(249,115,22,.14), rgba(249,115,22,.08));
}
.cg-cell.booked.is-torneio{
  background:linear-gradient(135deg, rgba(59,130,246,.14), rgba(147,197,253,.18));
}
.cg-cell.booked.is-coach{
  background:linear-gradient(135deg, rgba(190,84,84,.18), rgba(240,200,200,.24));
}
.cg-cell.dragging{
  opacity:.6;
  cursor:grabbing;
}
.cg-cell.drop-target{
  background:rgba(34,197,94,.12);
  outline:2px dashed rgba(34,197,94,.45);
  outline-offset:-2px;
}
.cg-cell.selecting{
  background:rgba(37,99,235,.12);
  outline:2px solid rgba(37,99,235,.45);
  outline-offset:-2px;
}
/* ============================= ZONA: CALENDÁRIO (FIM) ============================ */

/* ============================= ZONA: RESERVAS (INÍCIO) ============================ */
.reservas-year-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
}
.month-card{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:#fff;
}
.month-title{
  font-weight:900;
  margin-bottom:6px;
}
.month-weekdays{
  display:grid;
  grid-template-columns:repeat(7, 1fr);
  gap:6px;
  font-size:11px;
  color:var(--muted);
  font-weight:850;
  margin-bottom:6px;
}
.month-weekdays span{ text-align:center; }
.month-grid{
  display:grid;
  grid-template-columns:repeat(7, 1fr);
  gap:6px;
}
.day-cell{
  border:1px solid rgba(15,23,42,.10);
  border-radius:10px;
  min-height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  font-size:12px;
  color:var(--text);
  background:#fff;
  position:relative;
  text-decoration:none;
}
.day-cell:hover{
  border-color:rgba(37,99,235,.35);
  box-shadow:0 10px 18px rgba(2,6,23,.08);
}
.day-cell.empty{
  border:0;
  background:transparent;
  pointer-events:none;
}
.day-cell.no-reservas{ color:var(--muted); }
.day-cell.has-reservas{ color:#0b255f; }
.day-cell.is-today{
  outline:2px solid rgba(16,185,129,.55);
  outline-offset:-2px;
}
.day-cell.heat-1{ background:rgba(37,99,235,.10); border-color:rgba(37,99,235,.18); }
.day-cell.heat-2{ background:rgba(37,99,235,.20); border-color:rgba(37,99,235,.28); }
.day-cell.heat-3{ background:rgba(37,99,235,.30); border-color:rgba(37,99,235,.38); }
.day-cell.heat-4{ background:rgba(37,99,235,.40); border-color:rgba(37,99,235,.48); }
.day-count{
  position:absolute;
  bottom:3px;
  right:6px;
  font-size:10px;
  font-weight:900;
  color:rgba(15,23,42,.65);
}
.reservas-legend{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.legend-item{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  color:var(--muted);
  font-weight:800;
}
.legend-dot{
  width:12px;
  height:12px;
  border-radius:6px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  display:inline-block;
}
.legend-dot.heat-1{ background:rgba(37,99,235,.10); border-color:rgba(37,99,235,.18); }
.legend-dot.heat-2{ background:rgba(37,99,235,.20); border-color:rgba(37,99,235,.28); }
.legend-dot.heat-3{ background:rgba(37,99,235,.30); border-color:rgba(37,99,235,.38); }
.legend-dot.heat-4{ background:rgba(37,99,235,.40); border-color:rgba(37,99,235,.48); }
.legend-dot.legend-empty{ background:#fff; }
@media (max-width:1200px){
  .reservas-year-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width:800px){
  .reservas-year-grid{ grid-template-columns:1fr; }
}
/* ============================= ZONA: RESERVAS (FIM) ============================ */


/* ============================= ZONA: UI KIT (INÍCIO) ============================= */
.ui-wrap{ max-width:1400px; margin:0 auto; padding:18px; }
.ui-section{ margin-bottom:14px; }
.ui-title{ font-weight:950; font-size:18px; }
.ui-sub{ color:var(--muted); font-weight:750; font-size:13px; margin-top:4px; }

/* grids */
.ui-2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.ui-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.ui-4{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }

@media (max-width:1100px){ .ui-4{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:980px){ .ui-2,.ui-3{ grid-template-columns:1fr; } }
@media (max-width:700px){ .ui-4{ grid-template-columns:1fr; } }

/* chips/pills */
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:9px 12px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  color:var(--text);
  font-weight:900;
  white-space:nowrap;
  cursor:pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pill:hover{
  border-color: rgba(15,23,42,.22);
  box-shadow: 0 10px 22px rgba(2,6,23,.10);
}
.pill-blue{ background:rgba(37,99,235,.10); border-color:rgba(37,99,235,.25); color:#0b255f; }
.pill-green{ background:rgba(34,197,94,.10); border-color:rgba(34,197,94,.25); color:#0f3d22; }
.pill-orange{ background:rgba(245,158,11,.12); border-color:rgba(245,158,11,.28); color:#4a2a06; }
.pill-red{ background:rgba(239,68,68,.10); border-color:rgba(239,68,68,.25); color:#4a1212; }

/* horizontal scroll */
.hscroll{
  display:flex;
  gap:10px;
  overflow:auto;
  padding:4px 2px 10px;
  -webkit-overflow-scrolling:touch;
}
.hscroll::-webkit-scrollbar{ height:8px; }
.hscroll::-webkit-scrollbar-thumb{ background:rgba(15,23,42,.12); border-radius:999px; }

.scroll-arrows{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  margin-top:6px;
}
.scroll-btn{
  padding:9px 10px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.14);
  background:#fff;
  cursor:pointer;
  font-weight:950;
}
.scroll-btn:hover{ box-shadow:0 10px 22px rgba(2,6,23,.10); }

/* segmented */
.segment{
  display:inline-flex;
  background: rgba(2,6,23,.03);
  border:1px solid rgba(15,23,42,.12);
  border-radius:16px;
  padding:6px;
  gap:6px;
  flex-wrap:wrap;
}
.seg-btn{
  border:1px solid transparent;
  background: transparent;
  padding:10px 12px;
  border-radius:12px;
  font-weight:950;
  cursor:pointer;
}
.seg-btn:hover{ background:rgba(2,6,23,.05); }
.seg-btn.active{
  background:#fff;
  border-color: rgba(15,23,42,.14);
  box-shadow: 0 1px 0 rgba(2,6,23,.04);
}
/* ============================== ZONA: UI KIT (FIM) =============================== */


/* =========================== ZONA: RESPONSIVE (INÍCIO) =========================== */
@media (max-width:920px){
  .app{ grid-template-columns:1fr; }

  .sidebar{
    position:fixed;
    left:0; right:0; bottom:0;
    height:auto;
    z-index:50;
    border-right:none;
    border-top:1px solid var(--line);
  }

  .brand{ display:none; }

  .nav{
    display:grid;
    grid-auto-flow:column;
    grid-auto-columns:1fr;
    gap:8px;
    margin:0;
  }
  .nav a{
    text-align:center;
    padding:10px 8px;
    font-size:13px;
  }

  .content{ padding-bottom:96px; }
  .calendar-grid{ min-width:860px; }
}
/* ============================ ZONA: RESPONSIVE (FIM) ============================= */


/* ======================================================================
   FIM DO FICHEIRO app.css
   ====================================================================== */
