/* Estilos propios que complementan Tailwind (CDN). */

.nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  border-radius: .5rem;
  padding: .625rem .75rem;
  font-size: .875rem;
  font-weight: 500;
  color: rgb(203 213 225);
  transition: background-color .15s, color .15s;
}
.nav-link:hover { background: rgb(30 41 59); color: #fff; }
.nav-link.is-active { background: rgb(79 70 229); color: #fff; }
.nav-link.is-active [id^="nav-badge"] { background: rgba(255,255,255,.2); color: #fff; }

.kpi-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border-radius: .75rem;
  border: 1px solid rgb(226 232 240);
  background: #fff;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
}
.kpi-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: .625rem;
}

.filter-tab {
  border-radius: .375rem;
  padding: .375rem .75rem;
  color: rgb(100 116 139);
  transition: background-color .15s, color .15s;
}
.filter-tab:hover { color: rgb(15 23 42); }
.filter-tab.is-active { background: #fff; color: rgb(15 23 42); box-shadow: 0 1px 2px rgba(15,23,42,.08); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: .375rem;
  border: 1px solid rgb(226 232 240);
  color: rgb(71 85 105);
}
.icon-btn:hover { background: rgb(248 250 252); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  border-radius: 9999px;
  padding: .125rem .625rem;
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
}
.badge::before { content: ""; width: .375rem; height: .375rem; border-radius: 9999px; background: currentColor; }
.badge-confirmada { background: rgb(236 253 245); color: rgb(4 120 87); }
.badge-pendiente  { background: rgb(255 251 235); color: rgb(180 83 9); }
.badge-cancelada  { background: rgb(255 241 242); color: rgb(190 18 60); }
.badge-completada { background: rgb(241 245 249); color: rgb(71 85 105); }

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  border-radius: .5rem;
  background: #25d366;
  padding: .4rem .75rem;
  font-size: .75rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  transition: background-color .15s;
}
.btn-wa:hover { background: #1ebe5b; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  border-radius: .5rem;
  border: 1px solid rgb(226 232 240);
  padding: .4rem .75rem;
  font-size: .75rem;
  font-weight: 500;
  color: rgb(51 65 85);
  white-space: nowrap;
}
.btn-ghost:hover { background: rgb(248 250 252); }

.field {
  margin-top: .375rem;
  display: block;
  width: 100%;
  border-radius: .5rem;
  border: 1px solid rgb(226 232 240);
  padding: .5rem .75rem;
  font-size: .875rem;
}
.field:focus { outline: none; border-color: rgb(99 102 241); box-shadow: 0 0 0 3px rgba(99,102,241,.2); }
.field[readonly] { background: rgb(248 250 252); color: rgb(100 116 139); }

/* Calendario semanal */
.cal-slot { border-bottom: 1px solid rgb(241 245 249); border-left: 1px solid rgb(241 245 249); }
.cal-hour { position: relative; top: -.5rem; padding-right: .5rem; text-align: right; font-size: .6875rem; color: rgb(148 163 184); }
.cal-event {
  position: absolute;
  left: 3px;
  right: 3px;
  overflow: hidden;
  border-radius: .375rem;
  border-left: 3px solid;
  padding: .2rem .4rem;
  font-size: .6875rem;
  line-height: 1.25;
  cursor: default;
}
.cal-event.ev-confirmada { background: rgb(236 253 245); border-color: rgb(16 185 129); color: rgb(6 78 59); }
.cal-event.ev-pendiente  { background: rgb(255 251 235); border-color: rgb(251 191 36); color: rgb(120 53 15); }
.cal-event.ev-cancelada  { background: rgb(255 241 242); border-color: rgb(251 113 133); color: rgb(136 19 55); text-decoration: line-through; }
.cal-event.ev-completada { background: rgb(241 245 249); border-color: rgb(148 163 184); color: rgb(51 65 85); }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: rgb(244 63 94); z-index: 5; pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 9999px; background: rgb(244 63 94); }

.day-chip { display: flex; flex-direction: column; align-items: center; gap: .125rem; border-radius: .5rem; padding: .375rem 0; font-size: .6875rem; color: rgb(100 116 139); }
.day-chip .num { font-size: .9375rem; font-weight: 600; color: rgb(15 23 42); }
.day-chip .dot { width: .3rem; height: .3rem; border-radius: 9999px; background: rgb(99 102 241); }
.day-chip.is-selected { background: rgb(79 70 229); color: rgb(224 231 255); }
.day-chip.is-selected .num { color: #fff; }
.day-chip.is-selected .dot { background: #fff; }
.day-chip.is-today:not(.is-selected) .num { color: rgb(79 70 229); }

#toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

body.menu-open { overflow: hidden; }
