.agenda-panel {
  min-width: 0;
}

.agenda-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.agenda-date-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.agenda-nav-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
}

.agenda-current-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-transform: capitalize;
}

.agenda-current-date strong {
  font-size: 1.15rem;
}

.agenda-current-date span {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
}

.agenda-date-input {
  width: 165px;
}

.agenda-loading,
.agenda-empty {
  display: flex;
  min-height: 280px;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.agenda-empty {
  flex-direction: column;
  text-align: center;
}

.agenda-empty i {
  font-size: 2rem;
}

.agenda-empty h4,
.agenda-empty p {
  margin: 0;
}

.agenda-scroll {
  overflow: auto;
  max-height: calc(100vh - 250px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(32, 25, 20, .06);
}

.agenda-board {
  display: grid;
  grid-template-columns: 82px repeat(var(--agenda-columns), minmax(210px, 1fr));
  grid-template-rows: 76px var(--agenda-height);
  min-width: calc(82px + var(--agenda-columns) * 210px);
  position: relative;
}

.agenda-corner {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 6;
  background: #fbfaf8;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.agenda-employee-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem;
  background: #fbfaf8;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.agenda-employee-header strong,
.agenda-employee-header span {
  display: block;
}

.agenda-employee-header span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.agenda-employee-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  color: var(--gold-dark);
  background: rgba(201, 165, 106, .16);
  border-radius: 50%;
  font-weight: 800;
}

.agenda-time-axis {
  position: sticky;
  left: 0;
  z-index: 4;
  background: #fbfaf8;
  border-right: 1px solid var(--border);
}

.agenda-time-axis span {
  position: absolute;
  right: 12px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  transform: translateY(-50%);
}

.agenda-employee-column {
  position: relative;
  min-width: 0;
  border-right: 1px solid var(--border);
  background: linear-gradient(to bottom, rgba(250,249,247,.55), rgba(255,255,255,.8));
}

.agenda-grid-line {
  position: absolute;
  right: 0;
  left: 0;
  border-top: 1px dashed rgba(128, 116, 105, .16);
}

.agenda-grid-line-hour {
  border-top-style: solid;
  border-top-color: rgba(128, 116, 105, .28);
}

.agenda-booking {
  position: absolute;
  right: 6px;
  left: 6px;
  z-index: 2;
  overflow: hidden;
  padding: .55rem .65rem;
  text-align: left;
  color: #243126;
  background: #e1f3e4;
  border: 0;
  border-left: 4px solid #4c9f62;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(28, 44, 31, .10);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.agenda-booking:hover {
  z-index: 3;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(28, 44, 31, .16);
}

.agenda-booking strong,
.agenda-booking span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-booking strong {
  font-size: .88rem;
}

.agenda-booking-time,
.agenda-booking-client {
  font-size: .72rem;
}

.agenda-booking-time {
  margin-bottom: .12rem;
  font-weight: 800;
  opacity: .78;
}

.agenda-booking-client {
  margin-top: .1rem;
  opacity: .72;
}

.agenda-booking-payment {
  display: inline-block !important;
  width: fit-content;
  max-width: 100%;
  margin-top: .22rem;
  padding: .08rem .42rem;
  color: #5a4318;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(90, 67, 24, .14);
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 800;
}

.agenda-booking-payment-bono {
  color: #155568;
  background: rgba(207, 239, 247, .82);
  border-color: rgba(21, 85, 104, .18);
}

.agenda-booking-payment-redsys {
  color: #173b58;
  background: rgba(220, 238, 251, .84);
  border-color: rgba(23, 59, 88, .18);
}

.agenda-booking-pendiente {
  color: #5f4614;
  background: #fff1c8;
  border-left-color: #d9a824;
}

.agenda-booking-bono {
  color: #0f4f5c;
  background: #dff7fb;
  border-left-color: #36a9bc;
}

.agenda-booking-pagado {
  color: #1f4d2a;
  background: #def5e4;
  border-left-color: #45a95a;
}

.agenda-booking-cancelado {
  color: #684048;
  background: #f5e2e6;
  border-left-color: #b76777;
  opacity: .72;
}

.agenda-booking-no_presentado,
.agenda-booking-no-presentado,
.agenda-booking-no {
  color: #4b4657;
  background: #e7e7ea;
  border-left-color: #85858d;
  opacity: .82;
}

.agenda-detail-panel {
  width: min(430px, 94vw) !important;
}

.agenda-detail-eyebrow {
  display: block;
  color: var(--gold-dark);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.agenda-detail-status {
  margin-bottom: 1.5rem;
}

.agenda-detail-section {
  padding: 1.15rem 0;
  border-top: 1px solid var(--border);
}

.agenda-detail-section h6 {
  margin-bottom: .8rem;
  font-weight: 800;
}

.agenda-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .35rem 0;
}

.agenda-detail-row span {
  color: var(--muted);
}

.agenda-detail-row strong {
  text-align: right;
  font-size: .92rem;
}

.agenda-detail-note {
  margin: 0;
  padding: 1rem;
  color: var(--muted);
  background: #faf9f7;
  border-radius: 12px;
}

@media (max-width: 760px) {
  .agenda-toolbar {
    grid-template-columns: 1fr;
  }

  .agenda-current-date {
    align-items: flex-start;
    order: -1;
  }

  .agenda-date-input {
    width: 100%;
  }

  .agenda-scroll {
    max-height: calc(100vh - 320px);
  }
}

/* Agenda fase 2 */
.agenda-toolbar-actions { display:flex; gap:.75rem; align-items:center; }
.agenda-client-summary { display:flex; flex-direction:column; padding:1rem; margin-bottom:1.25rem; background:#faf9f7; border:1px solid var(--border); border-radius:14px; }
.agenda-client-summary span { color:var(--muted); font-size:.85rem; }
.agenda-edit-actions { display:grid; gap:.75rem; }
.agenda-client-search { position:relative; }
.agenda-client-results { position:absolute; z-index:1065; top:calc(100% + 6px); right:0; left:0; overflow:auto; max-height:260px; background:#fff; border:1px solid var(--border); border-radius:14px; box-shadow:0 16px 36px rgba(32,25,20,.14); }
.agenda-client-results button { display:flex; width:100%; flex-direction:column; padding:.8rem 1rem; text-align:left; background:#fff; border:0; border-bottom:1px solid var(--border); }
.agenda-client-results button:hover { background:#faf9f7; }
.agenda-client-results button span { color:var(--muted); font-size:.8rem; }
.agenda-selected-client { display:flex; align-items:center; justify-content:space-between; margin-top:.75rem; padding:.85rem 1rem; background:rgba(201,165,106,.12); border:1px solid rgba(201,165,106,.3); border-radius:14px; }
.agenda-selected-client div { display:flex; flex-direction:column; }
.agenda-selected-client span { color:var(--muted); font-size:.82rem; }
.agenda-employee-column { cursor:crosshair; }
#agendaReservaManualModal .form-control, #agendaReservaManualModal .form-select, .agenda-detail-panel .form-control, .agenda-detail-panel .form-select { min-height:46px; border-radius:12px; }
#agendaReservaManualModal textarea.form-control, .agenda-detail-panel textarea.form-control { min-height:100px; }
@media (max-width:760px) { .agenda-toolbar-actions { width:100%; flex-direction:column; align-items:stretch; } .agenda-toolbar-actions .agenda-date-input { width:100%; } }
