.logout-button{margin-left:auto;background:transparent;color:#aa949c;padding:5px;display:grid;place-items:center}.logout-button:hover{color:var(--green-dark);background:var(--mint)}.logout-button svg{width:15px;height:15px}

/* Analytics & Dashboard dynamic styles */
.analytics-period-select {
  height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 14px;
  font-size: 11px;
  font-family: inherit;
  color: var(--ink);
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  font-weight: 600;
  transition: border-color 0.2s;
}
.analytics-period-select:focus,
.analytics-period-select:hover {
  border-color: var(--green);
}

.chart-point {
  cursor: pointer;
  transition: r 0.15s ease, stroke-width 0.15s ease, fill 0.15s ease;
}
.chart-point:hover {
  r: 7px;
  stroke: var(--green-dark);
  stroke-width: 3px;
  fill: #fff;
}

.chart-tooltip-box {
  position: absolute;
  pointer-events: none;
  background: #2e161f;
  color: #fff;
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transform: translate(-50%, -120%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
}
.chart-tooltip-box.visible {
  opacity: 1;
}

.ranking-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}
.ranking-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.ranking-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ranking-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ranking-icon {
  width: 32px;
  height: 32px;
  background: var(--mint);
  color: var(--green-dark);
  display: grid;
  place-items: center;
  font-size: 15px;
  border-radius: 6px;
  flex-shrink: 0;
}
.ranking-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.3px;
}
.ranking-sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.ranking-stats {
  text-align: right;
  font-family: 'DM Mono', monospace;
}
.ranking-revenue {
  font-size: 12px;
  font-weight: 700;
  color: var(--green-dark);
}
.ranking-pct {
  font-size: 10px;
  color: var(--muted);
}
.ranking-progress {
  height: 5px;
  background: #f1eaed;
  border-radius: 3px;
  overflow: hidden;
}
.ranking-progress span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 3px;
  transition: width 0.4s ease;
}

#btnEditGoal {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}
#btnEditGoal:hover {
  background: var(--mint);
  color: var(--green-dark);
}

/* === Acciones de la barra superior: buscador, notificaciones y avatar === */
.top-actions { position: relative; }
#topbarAvatar { cursor: pointer; transition: box-shadow .15s; user-select: none; }
#topbarAvatar:hover, #topbarAvatar:focus-visible { box-shadow: 0 0 0 3px #f5cfdd; outline: none; }
.icon-button.is-active { background: #f8dde7; color: var(--green-dark); }

.topbar-menu {
  position: absolute; top: calc(100% + 12px); right: 0; width: 300px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(42, 15, 25,.17); z-index: 30; overflow: hidden;
  animation: topbarMenuIn .14s ease;
}
.topbar-menu[hidden] { display: none; }
@keyframes topbarMenuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.topbar-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.topbar-menu-head strong { font-size: 13px; }
.topbar-menu-head span:not(:empty) { font: 10px 'DM Mono', monospace; color: var(--green-dark); background: var(--mint); padding: 3px 8px; border-radius: 20px; }
.topbar-menu-body { max-height: 340px; overflow-y: auto; }
.notif-item { display: flex; gap: 12px; align-items: flex-start; padding: 13px 17px; border-bottom: 1px solid var(--line); cursor: pointer; background: none; width: 100%; text-align: left; }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: #f8f3f5; }
.notif-item .notif-ic { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--mint); color: var(--green-dark); }
.notif-item .notif-ic.warm { background: #faeee4; color: #c37f4c; }
.notif-item .notif-ic svg { width: 15px; }
.notif-item strong { display: block; font-size: 11px; }
.notif-item small { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.notif-empty { padding: 34px 17px; text-align: center; color: var(--muted); font-size: 11px; }

.avatar-menu { width: 252px; }
.avatar-menu-head { display: flex; align-items: center; gap: 11px; padding: 16px 17px; border-bottom: 1px solid var(--line); }
.avatar-menu-head strong { display: block; font-size: 12px; }
.avatar-menu-head span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.topbar-menu-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 12px 17px; background: none; text-align: left; font-size: 12px; color: var(--ink); }
.topbar-menu-item:hover { background: #f8f3f5; }
.topbar-menu-item svg { width: 16px; color: #7c5e69; }
.topbar-menu-item.danger { color: #b5654a; border-top: 1px solid var(--line); }
.topbar-menu-item.danger svg { color: #b5654a; }

/* Modal de búsqueda global */
.search-modal.open { align-items: flex-start; }
.search-modal .modal { padding: 0; margin-top: 9vh; }
.search-modal-inner { width: min(560px, 100%); }
.search-modal-inner .close-modal { top: 20px; right: 18px; z-index: 2; color: var(--muted); }
.search-modal-field { display: flex; align-items: center; gap: 12px; padding: 20px 52px 20px 22px; border-bottom: 1px solid var(--line); }
.search-modal-field svg { width: 19px; color: var(--green); flex-shrink: 0; }
.search-modal-field input { flex: 1; border: 0; outline: 0; font-size: 16px; background: none; color: var(--ink); padding: 0; margin: 0; }
.search-results { max-height: 60vh; overflow-y: auto; }
.search-group-label { font: 9px 'DM Mono', monospace; letter-spacing: 1.3px; color: #ad99a0; padding: 15px 22px 6px; }
.search-result { display: flex; gap: 12px; align-items: center; padding: 11px 22px; cursor: pointer; width: 100%; text-align: left; background: none; }
.search-result:hover, .search-result.active { background: #f4edf0; }
.search-result .sr-ic { width: 32px; height: 32px; flex-shrink: 0; border-radius: 7px; display: grid; place-items: center; background: var(--mint); color: var(--green-dark); font-size: 14px; }
.search-result .sr-ic.warm { background: #faeee4; color: #c37f4c; }
.search-result .sr-ic.blue { background: #f1e6ea; color: #9f667b; }
.search-result .sr-ic svg { width: 16px; }
.search-result strong { display: block; font-size: 12px; }
.search-result small { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.search-result .sr-tag { margin-left: auto; font: 9px 'DM Mono', monospace; color: #ad99a0; text-transform: uppercase; letter-spacing: .5px; flex-shrink: 0; }
.search-empty { padding: 40px 22px; text-align: center; color: var(--muted); font-size: 12px; }
.search-hint { padding: 26px 22px; text-align: center; color: #ad99a0; font-size: 11px; }
/* === Selector de duración en el modal de reserva === */
.duration-switch { display: flex; gap: 8px; margin-top: 6px; }
.duration-switch button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 8px; border: 1px solid var(--line); background: #fff;
  color: var(--muted); font-size: 12px; font-weight: 600; border-radius: 4px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.duration-switch button svg { width: 14px; height: 14px; }
.duration-switch button:hover { border-color: #d6bec7; }
.duration-switch button.active {
  background: var(--mint); border-color: var(--green); color: var(--green-dark);
}

/* Opción de duración no disponible (no entra en el hueco libre) */
.duration-switch button:disabled { opacity: .4; cursor: not-allowed; }
.duration-switch button:disabled:hover { border-color: var(--line); }

/* Botón de confirmar cuando el horario no está permitido */
.primary-button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.primary-button:disabled:hover { background: var(--green-dark); }

/* Botón "Añadir cliente" cuando el nombre escrito en la reserva no está registrado */
.add-client-inline {
  align-items: center; gap: 8px; width: 100%;
  margin: -4px 0 14px; padding: 10px 12px;
  background: var(--mint); color: var(--green-dark);
  border: 1px dashed #daafbf; border-radius: 6px;
  font-size: 12px; font-weight: 600; cursor: pointer; text-align: left;
  transition: background .15s ease;
}
.add-client-inline:hover { background: #edced9; }
.add-client-inline svg { width: 16px; height: 16px; flex-shrink: 0; }
.add-client-inline b { font-weight: 800; }

/* Botones para compartir turnos libres y precios por WhatsApp (Agenda) */
.agenda-share-row { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.share-button {
  flex: 1; min-width: 155px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 14px; border: 1px solid #f0c3d3; border-radius: 6px;
  background: #f8e8ee; color: #800733; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.share-button:hover { background: #f7cfde; border-color: #e7a8bf; }
.share-button svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Día de la cita en el panel "Próximas citas" del Resumen */
.appointment time { display: flex; flex-direction: column; line-height: 1.25; }
.appt-day { font: 9px 'DM Mono', monospace; color: #ad99a0; text-transform: uppercase; margin-top: 2px; }
